/* Stars Reborn — shared stylesheet for the documentation pages.
 *
 * Tokens, base, nav and footer are extracted verbatim from index.html by
 * tools/ (see the scratch generator noted in docs/dev/build-and-release.md)
 * so the doc pages cannot drift away from the marketing page's palette.
 * index.html and roadmap.html keep their inline stylesheets: they carry
 * substantial page-specific CSS (starfield, carousel, print rules) that the
 * doc pages have no use for.
 *
 * Everything below the DOC PAGES banner is written for these pages only.
 */

:root {
  --bg-0: #070a11;
  --bg-1: #080c14;
  --bg-2: #0c1220;
  --bg-3: #0e1526;
  --line: rgba(192, 216, 255, 0.09);
  --line-strong: rgba(192, 216, 255, 0.18);
  --line-faint: rgba(192, 216, 255, 0.05);
  --ink: #c0d8ff;
  --ink-dim: #8a9cbf;
  --ink-faint: #6d7e9f;
  --ink-ghost: #3a485f;
  --teal: oklch(0.80 0.12 195);
  --teal-dim: oklch(0.55 0.10 195);
  --teal-glow: oklch(0.80 0.12 195 / 0.15);
  --violet: oklch(0.72 0.14 300);
  --amber: oklch(0.84 0.12 80);
  --rose: oklch(0.72 0.15 15);
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --sans: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg-1);
  color: var(--ink-dim);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}
body::before {
  /* scanline overlay */
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(192, 216, 255, 0.018) 0,
      rgba(192, 216, 255, 0.018) 1px,
      transparent 1px,
      transparent 3px
    );
  mix-blend-mode: screen;
}

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--ink); }

::selection { background: var(--teal); color: var(--bg-0); }

.mono { font-family: var(--mono); }
.ink { color: var(--ink); }
.dim { color: var(--ink-dim); }
.faint { color: var(--ink-faint); }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
}


/* ---------- NAV ---------- */
nav.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 12, 20, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
  padding: 0 40px;
  max-width: 1280px;
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--ink);
  text-transform: uppercase;
}
.brand-mark {
  width: 22px; height: 22px;
  border: 1px solid var(--teal);
  position: relative;
  display: inline-block;
}
.brand-mark::before, .brand-mark::after {
  content: ""; position: absolute;
  background: var(--teal);
}
.brand-mark::before { left: 50%; top: 2px; bottom: 2px; width: 1px; transform: translateX(-0.5px); }
.brand-mark::after  { top: 50%; left: 2px; right: 2px; height: 1px; transform: translateY(-0.5px); }
.brand-sub {
  color: var(--ink-faint);
  font-weight: 400;
  letter-spacing: 0.14em;
}
.nav-links {
  display: flex;
  gap: 2px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.nav-links a {
  color: var(--ink-dim);
  padding: 6px 11px;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: color .15s, border-color .15s, background .15s;
}
.nav-links a:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: rgba(192, 216, 255, 0.02);
}
.nav-links a.current {
  color: var(--ink);
  border-color: var(--line-strong);
  background: rgba(192, 216, 255, 0.04);
}
/* Primary CTA in the nav bar. Compact .btn: teal outline plus the site's
   8px bracket corners at opposite diagonals. */
.nav-links a.nav-download {
  color: var(--teal);
  border-color: var(--teal);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  position: relative;
  margin-left: 6px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.nav-links a.nav-download::after {
  content: "";
  position: absolute;
  top: -3px; left: -3px;
  width: 6px; height: 6px;
  border-top: 1px solid var(--teal);
  border-left: 1px solid var(--teal);
}
.nav-links a.nav-download::before {
  content: "";
  position: absolute;
  bottom: -3px; right: -3px;
  width: 6px; height: 6px;
  border-bottom: 1px solid var(--teal);
  border-right: 1px solid var(--teal);
}
.nav-links a.nav-download:hover {
  color: var(--ink);
  background: var(--teal-glow);
  box-shadow: 0 0 20px var(--teal-glow);
}
.nav-links a.nav-download .nd-glyph {
  font-size: 8px;
  line-height: 1;
  opacity: 0.75;
  transform: translateY(-1px);
}
/* Secondary to Download, so the two accents do not compete. */
.nav-links a.nav-discord {
  color: var(--teal-dim);
  border-color: transparent;
}
.nav-links a.nav-discord:hover {
  color: var(--teal);
  border-color: oklch(0.80 0.12 195 / 0.4);
  background: transparent;
}
/* Drawer equivalent. */
.nav-drawer-dl {
  color: var(--teal) !important;
  border: 1px solid var(--teal) !important;
  text-align: center;
  padding: 14px !important;
  letter-spacing: 0.18em !important;
  margin-top: 10px;
}
.nav-drawer-dl:hover { background: var(--teal-glow); }
/* The build stamp yields space before the links do. Higher specificity than
   the plain .nav-status rule below, which would otherwise win on source order. */
@media (max-width: 1240px) {
  nav.topnav .nav-status { display: none; }
}
.section-meta a { color: var(--teal-dim); text-decoration: none; }
.section-meta a:hover { color: var(--teal); }
.log-more {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-dim);
  text-decoration: none;
  border-bottom: 1px solid var(--teal-dim);
  padding-bottom: 2px;
}
.log-more:hover { color: var(--teal); border-bottom-color: var(--teal); }
.nav-status {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.12em;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---------- SECTIONS ---------- */
section {
  position: relative;
  padding: 100px 0;
  border-bottom: 1px solid var(--line);
}
section.alt { background: var(--bg-2); }
section.dark { background: var(--bg-0); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 56px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  gap: 40px;
}
.section-index {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--teal);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.section-title {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 44px;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1;
}
.section-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: right;
  white-space: nowrap;
}


/* ---------- CHANGELOG ---------- */
.changelog {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0;
}
.log-entry {
  display: contents;
}
.log-entry .ver {
  font-family: var(--mono);
  color: var(--ink);
  padding: 22px 20px 22px 0;
  border-top: 1px solid var(--line);
  position: relative;
}
.log-entry .ver .vnum {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.log-entry.current .ver .vnum { color: var(--teal); }
.log-entry .ver .vdate {
  display: block;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  margin-top: 4px;
  text-transform: uppercase;
}
.log-entry .ver .tag {
  display: inline-block;
  margin-top: 10px;
  font-size: 9px;
  letter-spacing: 0.22em;
  padding: 2px 7px;
  border: 1px solid var(--line-strong);
  color: var(--ink-dim);
  text-transform: uppercase;
}
.log-entry.current .ver .tag { color: var(--teal); border-color: var(--teal-dim); }
.log-entry .body {
  padding: 22px 0 22px 32px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  position: relative;
}
.log-entry .body::before {
  content: "";
  position: absolute;
  top: 32px; left: -4px;
  width: 7px; height: 7px;
  background: var(--ink-faint);
}
.log-entry.current .body::before { background: var(--teal); box-shadow: 0 0 8px var(--teal); }
.log-entry .title {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 12px;
  letter-spacing: 0.02em;
  font-weight: 600;
}
.log-entry ul {
  list-style: none;
  font-size: 14px;
  color: var(--ink-dim);
}
.log-entry li {
  padding: 4px 0 4px 20px;
  position: relative;
}
.log-entry li::before {
  content: "+";
  position: absolute;
  left: 0; top: 4px;
  color: var(--teal);
  font-family: var(--mono);
  font-weight: 700;
}
.log-entry li.fix::before { content: "~"; color: var(--amber); }
.log-entry li.rem::before { content: "−"; color: var(--rose); }
.log-entry li b { color: var(--ink); font-weight: 500; }


/* ---------- FOOTER ---------- */
footer {
  padding: 60px 40px 40px;
  background: var(--bg-0);
  border-top: 1px solid var(--line);
}
.foot-inner {
  max-width: 1280px; margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
}
.foot-col h5 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--ink-faint);
  text-transform: uppercase;
  margin-bottom: 14px;
  font-weight: 500;
}
.foot-col a {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-dim);
  padding: 4px 0;
  letter-spacing: 0.06em;
}
.foot-col a:hover { color: var(--ink); }
.foot-brand p {
  margin-top: 14px;
  font-size: 12px;
  color: var(--ink-faint);
  max-width: 32ch;
  line-height: 1.6;
}
.foot-base {
  max-width: 1280px; margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--ink-ghost);
  text-transform: uppercase;
}


/* ---------- MOBILE NAV (hidden ≥961px) ---------- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  min-height: 44px;
}
.nav-toggle:hover { color: var(--teal); border-color: var(--teal); }
.nav-toggle-bars { display: inline-flex; flex-direction: column; gap: 3px; }
.nav-toggle-bars i {
  display: block; width: 16px; height: 1.5px;
  background: currentColor;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(3) { transform: translateY(-4.5px) rotate(-45deg); }

.nav-drawer {
  display: none;
  flex-direction: column;
  background: var(--bg-2);
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
  padding: 18px 24px 24px;
}
.nav-drawer[data-open] { display: flex; }
.nav-drawer-hdr {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
  margin-bottom: 10px;
}
.nav-drawer a {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-decoration: none;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line-faint);
  display: block;
  min-height: 44px;
}
.nav-drawer a:hover, .nav-drawer a:active { color: var(--teal); }
.nav-drawer-cta {
  color: var(--teal) !important;
  margin-top: 6px;
  border: 1px solid var(--line-strong) !important;
  text-align: center;
  padding: 14px !important;
  letter-spacing: 0.18em !important;
}
.nav-drawer-ft {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
  margin-top: 14px;
  text-transform: uppercase;
  text-align: right;
}


/* ---------- TABLE SCROLL WRAP ---------- */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -2px;
  padding-bottom: 4px;
}
.table-scroll .table { min-width: 420px; }
.table-scroll .dt { min-width: 560px; }
.table-scroll .dt-ctl { min-width: 380px; }
.table-scroll::-webkit-scrollbar { height: 4px; }
.table-scroll::-webkit-scrollbar-track { background: rgba(192,216,255,0.04); }
.table-scroll::-webkit-scrollbar-thumb { background: var(--line-strong); }



/* ============================================================================
   DOC PAGES — guide.html, reference.html, changelog.html
   ==========================================================================*/

.doc-hero {
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  padding: 56px 0 44px;
}
.doc-hero .doc-kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--teal-dim);
  margin-bottom: 14px;
}
.doc-hero h1 {
  font-size: clamp(30px, 4.6vw, 50px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--ink);
  margin-bottom: 18px;
}
.doc-hero .doc-lede {
  max-width: 68ch;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-dim);
}
.doc-hero .doc-lede b { color: var(--ink); font-weight: 500; }
.doc-hero .doc-lede a { color: var(--teal-dim); text-decoration: none; border-bottom: 1px solid var(--teal-dim); }
.doc-hero .doc-lede a:hover { color: var(--teal); border-bottom-color: var(--teal); }

/* --- two-column shell: sticky contents rail + body --- */
.doc-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 56px;
  padding: 48px 0 80px;
  align-items: start;
}
.doc-toc {
  position: sticky;
  top: 78px;
  font-family: var(--mono);
  font-size: 12px;
  border-left: 1px solid var(--line);
  padding-left: 16px;
}
.doc-toc-hdr {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-ghost);
  margin-bottom: 12px;
}
.doc-toc a {
  display: block;
  padding: 5px 0;
  color: var(--ink-faint);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color .15s;
}
.doc-toc a:hover { color: var(--teal); }

.doc-body { min-width: 0; }
.doc-sec { margin-bottom: 56px; scroll-margin-top: 90px; }
.doc-sec:last-child { margin-bottom: 0; }
.doc-sec > h2 {
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 6px;
}
.doc-sec > h2::before {
  content: "▸ ";
  color: var(--teal-dim);
  font-size: 0.8em;
}
.doc-sec .sec-num {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-ghost);
  margin-bottom: 8px;
}
.doc-sec h3 {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin: 30px 0 10px;
}
.doc-sec p {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ink-dim);
  margin-bottom: 14px;
  max-width: 74ch;
}
.doc-sec p b, .doc-sec li b { color: var(--ink); font-weight: 500; }
.doc-sec p a, .doc-sec li a {
  color: var(--teal-dim);
  text-decoration: none;
  border-bottom: 1px solid var(--teal-dim);
}
.doc-sec p a:hover, .doc-sec li a:hover { color: var(--teal); border-bottom-color: var(--teal); }
.doc-sec ul, .doc-sec ol { margin: 0 0 16px 0; padding-left: 20px; max-width: 74ch; }
.doc-sec li { font-size: 14.5px; line-height: 1.7; color: var(--ink-dim); margin-bottom: 8px; }
.doc-sec ul { list-style: none; padding-left: 18px; }
.doc-sec ul > li { position: relative; }
.doc-sec ul > li::before {
  content: "—";
  position: absolute;
  left: -18px;
  color: var(--ink-ghost);
}
.doc-sec ol > li::marker { color: var(--teal-dim); font-family: var(--mono); font-size: 12px; }

/* --- callout --- */
.note {
  border-left: 2px solid var(--teal-dim);
  background: var(--bg-2);
  padding: 14px 18px;
  margin: 18px 0;
  max-width: 74ch;
}
.note.warn { border-left-color: var(--amber); }
.note .note-k {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal-dim);
  margin-bottom: 6px;
}
.note.warn .note-k { color: var(--amber); }
.note p { margin-bottom: 0; font-size: 14px; }
.note p + p { margin-top: 10px; }

/* --- data tables --- */
.dt {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 12.5px;
  margin: 6px 0 18px;
}
.dt th {
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-ghost);
  padding: 8px 12px 8px 0;
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
.dt td {
  padding: 9px 12px 9px 0;
  border-bottom: 1px solid var(--line-faint);
  color: var(--ink-dim);
  vertical-align: top;
}
.dt tbody tr:hover td { background: rgba(192, 216, 255, 0.02); }
.dt td b { color: var(--ink); font-weight: 700; }
.dt td .mono { color: var(--teal); }
.dt-note { color: var(--ink-ghost); font-size: 11px; }
.dt-foot { font-family: var(--mono); font-size: 11.5px; color: var(--ink-faint); margin-top: -6px; }
.dt-roles td:last-child, .dt td:last-child { font-family: var(--sans); font-size: 13.5px; line-height: 1.6; }
.dt-roles td i, .dt td i { color: var(--ink-faint); font-style: normal; }

/* --- controls --- */
.ctl-group { margin-bottom: 34px; }
.ctl-h {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
  scroll-margin-top: 90px;
}
.ctl-intro { font-size: 14px; line-height: 1.7; color: var(--ink-dim); margin-bottom: 12px; max-width: 74ch; }
.dt-ctl td { border-bottom: 1px solid var(--line-faint); }
.ctl-keys { width: 34%; white-space: normal; padding-right: 20px !important; }
.ctl-act { font-family: var(--sans); font-size: 13.5px; }
.ctl-act b { display: block; font-family: var(--mono); font-size: 12.5px; color: var(--ink); margin-bottom: 3px; }
.ctl-desc { display: block; color: var(--ink-faint); line-height: 1.6; }
kbd {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1;
  padding: 5px 8px;
  color: var(--ink);
  background: var(--bg-3);
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  white-space: nowrap;
  margin: 2px 0;
}
.kplus { color: var(--ink-ghost); font-family: var(--mono); font-size: 11px; margin: 0 2px; }

/* --- lists with a bit of ceremony --- */
.victory-list, .ai-list, .triangle-list { max-width: 74ch; }
.triangle-list { list-style: none; padding-left: 0; }
.triangle-list li { padding-left: 18px; position: relative; }
.triangle-list li::before { content: "▲"; position: absolute; left: 0; color: var(--teal-dim); font-size: 10px; top: 5px; }

/* --- step cards for the first-match walkthrough --- */
.steps { counter-reset: step; margin: 18px 0 24px; }
.step {
  counter-increment: step;
  border-left: 1px solid var(--line-strong);
  padding: 0 0 22px 22px;
  position: relative;
}
.step:last-child { padding-bottom: 0; }
.step::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: -13px;
  top: 0;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--teal);
  background: var(--bg-1);
  border: 1px solid var(--teal-dim);
}
.step h4 {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.step p { margin-bottom: 0; }

/* --- changelog page --- */
.log-page { padding: 40px 0 80px; }
.log-page .changelog { max-width: none; }

@media (max-width: 1000px) {
  .doc-shell { grid-template-columns: 1fr; gap: 0; }
  .doc-toc {
    position: static;
    border-left: none;
    border-bottom: 1px solid var(--line);
    padding: 0 0 20px;
    margin-bottom: 32px;
    columns: 2;
  }
}
@media (max-width: 640px) {
  .doc-hero { padding: 36px 0 30px; }
  .doc-shell { padding: 32px 0 56px; }
  .doc-sec { margin-bottom: 42px; }
  .doc-sec > h2 { font-size: 21px; }
  .doc-toc { columns: 1; }
  .ctl-keys { width: 42%; }
  .dt { font-size: 11.5px; }
}


/* ============================================================================
   RESPONSIVE — the shared-component half of index.html's media queries.
   These were missed in the first extraction, which left the doc pages with no
   mobile nav collapse at all: the links stayed visible and the MENU toggle
   never appeared.
   ==========================================================================*/

@media (max-width: 960px) {
  .nav-links, .nav-status { display: none; }
  .nav-toggle { display: inline-flex; }
  .container, .nav-inner { padding: 0 24px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .section-title { font-size: 32px; }
  .foot-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 14px; line-height: 1.5; }
  .container, .nav-inner { padding: 0 18px; }
  .nav-inner { height: 58px; }
  .brand { font-size: 14px; letter-spacing: 0.14em; }
  .brand-sub { display: none; }
  .nav-toggle { padding: 8px 12px; font-size: 10px; }
  .nav-toggle-label { display: none; }
  .foot-inner { grid-template-columns: 1fr; gap: 28px; }
  .foot-base { flex-direction: column; gap: 8px; align-items: flex-start; }
  .log-entry { grid-template-columns: 1fr; gap: 10px; }
}
