:root { --nav-height: calc(4rem + 1px); }

/* Header */
.hd { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--rule); }
.hd__in { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); min-height: 4rem; }
.wm { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; letter-spacing: -.03em; text-decoration: none; line-height: 1; }
.hd .wm { min-height: var(--tap); }
.wm__mark { display: block; flex: none; width: 2.25rem; padding: 3px; background: var(--paper-white); border-radius: 44% 40% 46% 38% / 40% 46% 38% 44%; box-shadow: 0 1px 0 rgb(72 48 24 / .12), 0 2px 5px rgb(72 48 24 / .18); rotate: -6deg; }
.wm__mark img { width: 100%; mix-blend-mode: multiply; border-radius: inherit; }
.wm--big { font-size: clamp(2.25rem, 11vw, 8rem); gap: .2em; line-height: .9; }
.wm--big .wm__mark { width: .95em; padding: .06em; }
.hd nav { display: flex; align-items: center; gap: var(--s-1); }
.hd nav a, .hd .iconbtn { display: inline-flex; align-items: center; gap: var(--s-2); min-height: var(--tap); padding-inline: var(--s-3); border-radius: var(--radius-control); font-size: var(--size-ui); font-weight: 500; text-decoration: none; white-space: nowrap; }
.hd nav a:hover, .hd .iconbtn:hover { background: var(--paper-white); box-shadow: var(--shadow-paper); }
.hd nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--text); border-radius: 0; }
.hd .iconbtn { width: var(--tap); justify-content: center; padding: 0; }
.hd .signin { min-width: var(--tap); justify-content: center; }
.hd .iconbtn[aria-expanded="true"] { background: var(--paper-white); box-shadow: var(--shadow-paper-inset); }
.bar-count { min-width: 1.5rem; padding: 2px 6px; border-radius: 8px; background: var(--paper-white); box-shadow: var(--shadow-paper); font-family: var(--font-mono); font-size: var(--size-cap); line-height: 1.4; text-align: center; }
.bar-count:empty { display: none; }

@media (max-width: 47.99em) {
  .hd .wm { font-size: 1.25rem; gap: .375rem; }
  .hd nav { gap: 0; }
  .hd nav a { padding-inline: var(--s-2); }
}

/* Search strip */
.search-strip { padding-block: var(--s-1) var(--s-3); }
.search-strip form { display: flex; gap: var(--s-2); }
.search-strip input { flex: 1; min-width: 0; height: var(--tap); padding-inline: var(--s-3); border: var(--field-border); border-radius: var(--radius-control); background: var(--paper-white); box-shadow: var(--shadow-paper-inset); font-size: var(--size-ui); }

/* Account menu */
.account { position: relative; }
.account-menu { position: absolute; top: calc(100% + var(--s-1)); right: 0; z-index: 41; min-width: 12rem; padding-block: var(--s-1); border-radius: var(--radius-card); background: var(--paper-white); box-shadow: 0 10px 24px -8px rgb(72 48 24 / .3); }
.account-menu[hidden] { display: none; }
.hd .account-menu a { display: flex; min-height: var(--tap); padding-inline: var(--s-4); border-radius: 0; }
.hd .account-menu a:hover { background: var(--paper); box-shadow: none; }

/* Flash */
.flash { margin-top: var(--s-4); }
.alert--notice { background: var(--paper-white); box-shadow: var(--shadow-paper); }
.alert--notice > .icon { color: var(--text); }

/* Form errors */
.form-errors { align-items: start; }
.form-errors ul { margin-top: var(--s-1); padding-left: 1.2em; list-style: disc; }

/* Guest import */
.guest-import { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); padding: var(--s-3) max(var(--gutter), (100% - var(--page-max)) / 2 + var(--gutter)); background: var(--paper-white); box-shadow: var(--shadow-paper); font-size: var(--size-ui); }
.guest-import[hidden], .guest-import-error:empty { display: none; }
.guest-import p { margin: 0; }
.guest-import > p:first-child { flex: 1 1 18rem; font-weight: 500; }
.guest-import-error { flex-basis: 100%; color: var(--error-ink); }

/* Footer */
.ft { margin-top: var(--s-24); padding-block: var(--s-10) var(--s-12); }
.ft nav { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-5); margin-top: var(--s-8); font-size: var(--size-ui); font-weight: 500; }
.ft nav a { text-decoration: none; min-height: var(--tap); display: inline-flex; align-items: center; }
.ft .cap { margin-top: var(--s-4); }
.ft .motto { margin-top: var(--s-3); font-size: clamp(1.25rem, 1rem + 1.5vw, 2.25rem); color: var(--text-soft); }
