/* Self-hosted fonts only: the site must load in China. Nuffle blocks briefly rather than
   swapping, so big headings never reflow from a fallback face. */
@font-face { font-family: 'Nuffle'; src: url(../fonts/Nuffle.woff2) format('woff2'); font-weight: 400; font-display: block; }
@font-face { font-family: 'Barlow'; src: url(../fonts/Barlow-Regular.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url(../fonts/Barlow-SemiBold.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; src: url(../fonts/BarlowCondensed-SemiBold.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; src: url(../fonts/BarlowCondensed-Bold.woff2) format('woff2'); font-weight: 700; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--fill);
  color: var(--ink);
  font: 400 1rem/1.4 var(--f-body);
  -webkit-text-size-adjust: 100%;
}
[hidden] { display: none !important; }

/* Phase 0 shell: a title bar, the tab list and one panel per tab. Phase 2 replaces this with the
   phone tab bar / tablet rail / wide sidebar from the mockups. */
.app-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  border-bottom: 1px solid var(--line2);
  background: var(--fill2);
}
.app-bar .brand { font-family: var(--f-display); font-size: 1.5rem; letter-spacing: .02em; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs a {
  font: 600 .85rem/1 var(--f-head); text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); text-decoration: none; padding: 10px 12px; border-radius: 8px; white-space: nowrap;
}
.tabs a[aria-current="page"] { color: var(--ink); background: var(--fill); }
.tabs a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
main { padding: 20px 16px; max-width: 1100px; }
main h1 { font-family: var(--f-display); font-weight: 400; font-size: 2rem; margin: 0 0 .4rem; }
main p { color: var(--muted); margin: 0; }
