/* The source mark keeps its original viewBox, paths, transform and colors. */
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; color: var(--text); font-size: 21px; font-weight: 760; letter-spacing: -.035em; text-decoration: none; white-space: nowrap; }
.brand-icon { display: block; flex: none; width: 52px; height: 52px; padding: 3px; border-radius: 13px; background: #071A15; }
.site { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 96px; }
.site nav { display: flex; gap: 10px; }
.site nav a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 64px; padding: 6px 9px; color: var(--text); text-decoration: none; font-size: 14px; white-space: nowrap; }
.site nav a:hover, .site nav a[aria-current] { background: var(--surface); border-radius: 7px; text-decoration: underline; }
@media (max-width: 700px) {
  .site { min-height: 80px; gap: 8px; }
  .brand { font-size: 17px; gap: 8px; }
  .brand-icon { width: 42px; height: 42px; border-radius: 10px; }
  .site nav { gap: 0; }
  .site nav a { min-width: 54px; padding-inline: 6px; font-size: 13px; }
}
/* Three nav links ("Phone AI Index", Privacy, Support) beside the brand on a phone: below 400 px the
   brand shows its mark only; the name stays readable to screen readers (visually hidden, not removed). */
@media (max-width: 430px) {
  .site nav a { min-width: 0; padding-inline: 6px; font-size: 13px; }
}
@media (max-width: 400px) {
  .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 350px) {
  .brand-icon { width: 36px; height: 36px; }
  .site nav a { padding-inline: 4px; font-size: 12px; }
}

/* Legal and 404 pages: a readable column with gutters (restored from the pre-redesign rules). */
body:not(.home) main { width: min(760px, calc(100% - 40px)); margin-inline: auto; padding-bottom: 48px; }
body:not(.home) .site { margin-bottom: 40px; }
body:not(.home) h1 { font-size: clamp(38px, 9vw, 58px); line-height: 1.04; margin: 0 0 20px; }
body:not(.home) h2 { font-size: 28px; line-height: 1.15; margin: 46px 0 18px; }
body:not(.home) h3 { font-size: 21px; line-height: 1.25; margin: 32px 0 12px; }
body:not(.home) .eyebrow { margin-bottom: 14px; }
body:not(.home) .card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; margin: 28px 0; }
body:not(.home) .card p:last-child { margin-bottom: 0; }
body:not(.home) ul { padding-left: 22px; }
body:not(.home) li { margin-bottom: 10px; }
body:not(.home) footer { margin-top: 64px; }

/* Light mode: a darker kraft paper so the ticket's perforated edge reads against the cream card. */
@media (prefers-color-scheme: light) {
  .record { --paper: #E8DCBC; }
}

/* Beta CTA: the release pill is now a link. */
a.release { color: inherit; text-decoration: none; }
a.release:hover, a.release:focus-visible { border-color: #8FC8AE; }
.release-note { margin: 10px 0 0; max-width: 34em; font-size: 13px; line-height: 1.5; color: var(--muted); }
.cta p { margin: 0 0 12px; }

/* Methodology pages (Phone AI Index protocol and datasets): data tables and code. */
.doc-table { overflow-x: auto; margin: 16px 0 28px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.45; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.doc th { color: var(--muted); font-size: 12px; font-weight: 650; letter-spacing: .02em; }
.doc pre { overflow-x: auto; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 13px; }
.doc code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .92em; }
