/* Site element defaults and shared chrome (plan 2.2; review 6.3.2 to 6.3.9; mockup hybrid.html).
   Served at /site/site.css?v=<public/site/VERSION>. Reads the custom properties from /site/tokens.css.
   Only custom properties from tokens.css; no colour literals (Bundle 1 SPEC 0.3 lists what is banned). */

/* ---- Element defaults ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-sans); font-size: var(--step-0); font-weight: 400;
  line-height: 1.45; letter-spacing: 0; overflow-wrap: break-word; }
h1, h2, h3 { line-height: 1.2; font-weight: 600; letter-spacing: 0; }
b, strong { font-weight: 600; }
img { max-width: 100%; height: auto; }
figure { margin: 0; }
table, time { font-variant-numeric: lining-nums tabular-nums; }

/* ---- Links, focus, motion (plan 7) ---- */
a { color: var(--ink); text-decoration-line: underline; text-decoration-color: var(--ink);
  text-decoration-thickness: 1px; text-underline-offset: 0.2em;
  transition: text-decoration-thickness 120ms linear; }
a:hover, a:focus-visible { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
html.theme-switching *, html.theme-switching *::before, html.theme-switching *::after { transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important;
    animation-iteration-count: 1 !important; scroll-behavior: auto !important; } }
@media (forced-colors: active) { :focus-visible { outline-color: Highlight; } }

.site-vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- Container: max 75rem; gutter 1rem, 2rem from 48rem, 3rem from 80rem (review 6.3.3) ---- */
.site-wrap { max-width: var(--page-max); margin-inline: auto; padding-inline: 1rem; }
@media (min-width: 48rem) { .site-wrap { padding-inline: 2rem; } }
@media (min-width: 80rem) { .site-wrap { padding-inline: 3rem; } }

/* ---- Skip link ---- */
.site-skip { position: absolute; left: -9999px; top: 0.5rem; z-index: 20; display: inline-flex; align-items: center;
  min-height: 2.75rem; padding: 0 1rem; background: var(--paper); color: var(--ink);
  border: 1px solid var(--rule-strong); border-radius: var(--radius-control); }
.site-skip:focus { left: 1rem; }
/* The skip link target is focusable (tabindex="-1") so Enter moves focus to it; the landmark shows no ring. */
#main:focus { outline: none; }

/* ---- Button and shared control look (review 6.3.9 "Button") ---- */
.site-button, .site-control { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 0.75rem;
  border: 1px solid var(--rule-strong); border-radius: var(--radius-control); background-color: transparent;
  color: var(--ink); font-family: var(--font-sans); font-size: var(--step-0); font-weight: 600; line-height: 1.2;
  white-space: nowrap; cursor: pointer; transition: background-color 120ms linear; }
.site-button:hover, .site-control:hover { background-color: var(--plaque); }
.site-button[aria-pressed="true"] { background-color: var(--ink); border-color: var(--ink); color: var(--paper); }
.site-control { list-style: none; }
.site-control::-webkit-details-marker { display: none; }
.site-menu { position: absolute; right: 0; top: calc(100% + 0.25rem); z-index: 10; padding: 0.5rem 1rem;
  background: var(--paper); border: 1px solid var(--rule-strong); border-radius: var(--radius-control); }

/* ---- Header (plan 3; review 6.3.9). Not sticky. No band (review decision 8 A). ---- */
.site-header { position: relative; background: var(--paper); border-bottom: 1px solid var(--rule); }
.site-bar { display: flex; flex-wrap: wrap; align-items: center; column-gap: 1rem; min-height: 3.5rem; }
.site-name { order: 1; flex: 1 1 0%; min-width: 0; display: inline-flex; align-items: center; min-height: 2.75rem;
  font-size: var(--step-0); font-weight: 600; color: var(--ink); text-decoration-line: none; }
.site-name:hover, .site-name:focus-visible { text-decoration-line: underline; }
.site-nav { order: 3; flex: 1 0 100%; display: flex; flex-wrap: wrap; column-gap: 1.25rem; padding-bottom: 0.25rem; }
.site-nav a { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; min-inline-size: 2.75rem;
  font-size: var(--step-0); font-weight: 400;
  color: var(--ink); text-decoration-line: none; }
.site-nav a:hover, .site-nav a:focus-visible { text-decoration-line: underline; text-decoration-thickness: 1px; }
.site-nav a[aria-current="page"] { text-decoration-line: underline; text-decoration-thickness: 2px;
  text-decoration-color: var(--ink); text-underline-offset: 0.4rem; }
.site-theme { order: 2; position: relative; flex: 0 0 auto; }
@media (min-width: 48rem) {
  .site-bar { flex-wrap: nowrap; height: 3.5rem; column-gap: 1.5rem; }
  .site-name { flex: 0 1 auto; margin-right: auto; }
  .site-nav { order: 2; flex: 0 1 auto; flex-wrap: nowrap; padding-bottom: 0; }
  .site-theme { order: 3; }
}
/* Phone: the first row is exactly 2.75rem tall, so without top padding the theme control's border touches the viewport edge. */
@media (max-width: 47.99rem) {
  .site-bar { padding-top: 0.375rem; }
}
/* Five links hold 299 px of text at 44 px minimum each and must share one row down to 360 px, so space-between sets the gap: about 18 px at 402 px, about 7 px at 360 px. From 30rem the 1.25rem gap fits all five. */
@media (max-width: 29.99rem) { .site-nav { justify-content: space-between; column-gap: 0.25rem; } }

/* ---- Theme control (plan 4; review 6.3.9). The summary word follows <html data-theme-pref>
   through CSS, so neither React nor theme-control.js has to rewrite it. ---- */
.site-theme-word { display: none; }
:root:not([data-theme-pref="light"]):not([data-theme-pref="dark"]) .site-theme-word[data-pref="system"],
:root[data-theme-pref="light"] .site-theme-word[data-pref="light"],
:root[data-theme-pref="dark"] .site-theme-word[data-pref="dark"] { display: inline; }
.site-theme fieldset { min-width: 9rem; margin: 0; padding: 0; border: 0; }
.site-theme legend { padding: 0; font-size: var(--step--1); color: var(--ink-muted); }
.site-theme label { display: flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; cursor: pointer; }
.site-theme input[type="radio"] { width: 1rem; height: 1rem; margin: 0; accent-color: var(--ink); }

/* ---- Footer (plan 3; review 6.3.9) ---- */
.site-footer { margin-top: 4rem; border-top: 1px solid var(--rule); }
.site-footer-row { display: flex; flex-wrap: wrap; align-items: center; column-gap: 1.5rem; padding-block: 2rem;
  font-size: var(--step--1); color: var(--ink-muted); }
.site-footer-row a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--ink-muted);
  text-decoration-color: var(--ink-muted); }
.site-footer-stamp { display: inline-flex; align-items: center; min-height: 2.75rem; }

/* ---- Status template (plan 5.1; mockup part 4). Label column, then H1, sentences, destinations. ---- */
.site-status { padding-top: 3rem; }
@media (min-width: 48rem) { .site-status { padding-top: 4rem; } }
.site-status-grid { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 1.5rem; row-gap: 1rem; }
@media (min-width: 48rem) { .site-status-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); } }
@media (min-width: 64rem) {
  .site-status-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .site-status-label { grid-column: 1 / 4; }
  .site-status-body { grid-column: 4 / 11; }
}
.site-status-label { margin: 0; font-size: var(--step-0); font-weight: 600; }
.site-status-body h1 { margin: 0; font-size: clamp(var(--step-3), 0.475rem + 3.33vw, var(--step-4)); }
.site-status-body p { margin: 1rem 0 0; max-width: var(--measure-sans); }
.site-status-links { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.site-status-links a { display: inline-flex; align-items: center; min-height: 2.75rem; }

/* ---- Print ---- */
@media print {
  .site-skip, .site-theme { display: none; }
  a { text-decoration-thickness: 1px; }
}
