/* ==========================================================================
   Private Solutions, Night Desk briefing stylesheet.
   Load order: briefing-tokens.css first, then this file.
   Motion rules: transform/opacity only. Never animate layout properties.
   Hairline rules only. Radius 0. No cards, no shadows.
   ========================================================================== */

/* ---- Reset / base ---- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: var(--weight-body);
  line-height: var(--leading-body);
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; }

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

/* Author display rules (e.g. .btn's inline-flex) must never defeat the
   hidden attribute; the UA's [hidden] rule loses to any author display. */
[hidden] { display: none !important; }

::selection { background: var(--color-accent); color: var(--color-on-accent); }

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
a.visually-hidden:focus {
  position: fixed;
  top: var(--space-3); left: var(--space-3);
  width: auto; height: auto;
  margin: 0; padding: var(--space-2) var(--space-3);
  clip: auto;
  background: var(--color-bg-raised);
  border: var(--hairline);
  z-index: 100;
}

.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

/* ---- Headings: display serif, sentence case, balanced ---- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  text-wrap: balance;
}
h1 { font-size: var(--text-h1); line-height: var(--leading-h1); }
h2 { font-size: var(--text-h2); line-height: var(--leading-h2); }
h3 { font-size: var(--text-h3); line-height: var(--leading-h3); }
p  { text-wrap: pretty; }

/* ---- Motto accent: the two load-bearing phrases in the H1.
   Large display text, so the 3:1 large-text bar applies with room. ---- */
.h1-accent { color: var(--color-accent); }

/* ---- Mono annotation voice ---- */
.mono-note {
  font-family: var(--font-mono);
  font-size: var(--text-meta);
  letter-spacing: var(--tracking-meta);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* ---- Buttons: Title Case labels, square, 44px targets ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: var(--weight-body-bold);
  text-decoration: none;
  border-radius: var(--radius);
  touch-action: manipulation;
  transition: background-color var(--duration-micro) var(--ease-out),
              color var(--duration-micro) var(--ease-out),
              border-color var(--duration-micro) var(--ease-out);
}
.btn--primary {
  background: var(--color-accent);
  color: var(--color-on-accent);
}
.btn--primary:hover { background: var(--color-accent-hover); }
.btn--ghost {
  border: var(--hairline);
  color: var(--color-text);
}
.btn--ghost:hover { border-color: var(--color-accent); color: var(--color-accent); }
.btn--small { min-height: 40px; padding: 8px 16px; font-size: 14px; }
.btn:disabled {
  color: var(--color-text-muted);
  border-color: var(--color-hairline);
  cursor: not-allowed;
  opacity: 0.55;
}

/* ---- Masthead ---- */
.masthead { border-bottom: var(--hairline); }
.masthead__inner {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  min-height: 96px;
}
.site-logo { display: inline-flex; flex-shrink: 0; }
.site-logo__img { width: auto; height: 36px; }
.masthead .site-logo__img { height: 72px; } /* footer keeps the 36px base */
.site-logo__img--light { display: none; }
.theme-light .site-logo__img--dark { display: none; }
.theme-light .site-logo__img--light { display: block; }

.site-nav { margin-left: auto; }
.site-nav__list {
  display: flex;
  gap: var(--space-4);
  list-style: none;
}
.site-nav__list a {
  font-size: 14px;
  text-decoration: none;
  color: var(--color-text-muted);
  padding-block: var(--space-2);
  transition: color var(--duration-micro) var(--ease-out);
}
.site-nav__list a:hover { color: var(--color-text); }

.masthead__utility {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.nav-phone {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--color-text-muted);
  transition: color var(--duration-micro) var(--ease-out);
}
.nav-phone:hover { color: var(--color-text); }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: var(--hairline);
  color: var(--color-text-muted);
  touch-action: manipulation;
  transition: color var(--duration-micro) var(--ease-out),
              border-color var(--duration-micro) var(--ease-out);
}
.theme-toggle:hover { color: var(--color-text); border-color: var(--color-text-muted); }
.theme-toggle__icon--sun { display: none; }
.theme-light .theme-toggle__icon--moon { display: none; }
.theme-light .theme-toggle__icon--sun { display: block; }

.nav-toggle {
  display: none;
  min-height: 44px;
  padding: 8px 14px;
  border: var(--hairline);
  font-size: 14px;
  touch-action: manipulation;
}

/* Mobile nav: JS collapses it; without JS it stays visible. */
@media (max-width: 900px) {
  .nav-phone, .masthead__utility .btn { display: none; }
  /* push the theme toggle and menu button to the right edge */
  .masthead__utility { margin-left: auto; }
  html.js .nav-toggle { display: inline-flex; }
  html.js .site-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0; /* track the real masthead height */
    background: var(--color-bg);
    border-bottom: var(--hairline);
    z-index: 50;
  }
  html.js .site-nav[data-open="true"] { display: block; }
  .masthead { position: relative; }
  .site-nav__list {
    flex-direction: column;
    gap: 0;
    padding: var(--space-3) var(--space-4);
  }
  .site-nav__list a {
    display: block;
    padding-block: var(--space-3);
    font-size: 16px;
  }
}
@media (min-width: 901px) {
  .nav-item--mobile { display: none; }
}

/* ---- Footer ---- */
.site-footer {
  border-top: var(--hairline);
  margin-top: var(--space-7);
  padding-block: var(--space-6) var(--space-4);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-5);
}
.site-footer__brand { text-align: center; }
.site-footer__brand .site-logo { display: flex; justify-content: center; }
.site-footer .site-logo__img { height: 90px; }
.site-footer__brand p {
  margin-top: var(--space-3);
  max-width: 44ch;
  margin-inline: auto;
  font-size: 14px;
  color: var(--color-text-muted);
}
.site-footer__h {
  font-family: var(--font-mono);
  font-size: var(--text-meta);
  font-weight: var(--weight-body);
  letter-spacing: var(--tracking-meta);
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
  line-height: inherit;
  text-wrap: initial;
}
.site-footer ul { list-style: none; }
.site-footer ul li { margin-bottom: var(--space-2); }
.site-footer ul a {
  font-size: 14px;
  text-decoration: none;
  color: var(--color-text);
  transition: color var(--duration-micro) var(--ease-out);
}
.site-footer ul a:hover { color: var(--color-accent); }
.site-footer__legal {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: var(--hairline);
  font-family: var(--font-mono);
  font-size: var(--text-meta);
  color: var(--color-text-muted);
}
.site-footer__legal a { color: inherit; }
@media (max-width: 900px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .site-footer__grid { grid-template-columns: 1fr; }
}

/* ---- Stations wire: the one perpetually moving element ----
   Animation exists only inside no-preference, so reduced motion gets a
   static row by default rather than by override. Hover or focus pauses. */
.wire {
  display: flex;
  align-items: stretch;
  border-bottom: var(--hairline);
  min-height: 44px;
}
.wire__label {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding-inline: var(--space-4);
  border-right: var(--hairline);
  font-family: var(--font-mono);
  font-size: var(--text-wire);
  letter-spacing: var(--tracking-wire);
  text-transform: uppercase;
  color: var(--color-accent);
}
.wire__viewport {
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.wire__track {
  display: flex;
  width: max-content;
}
.wire__list {
  display: flex;
  list-style: none;
  white-space: nowrap;
}
.wire__list li {
  font-family: var(--font-mono);
  font-size: var(--text-wire);
  letter-spacing: var(--tracking-wire);
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.wire__list li::after {
  content: "·";
  color: var(--color-accent);
  margin-inline: 18px;
}
@media (prefers-reduced-motion: no-preference) {
  .wire__track {
    animation: wire-scroll var(--wire-duration) linear infinite;
  }
  .wire:hover .wire__track,
  .wire:focus .wire__track,
  .wire:focus-within .wire__track,
  .wire--paused .wire__track {
    animation-play-state: paused;
  }
}
@keyframes wire-scroll {
  to { transform: translateX(-50%); }
}

/* ---- Document grid: margin rail + capped text column ----
   The document sits left in the container; open space to the right is
   deliberate. Single column under 900px, rail marks become eyebrows. */
.doc-section {
  border-top: var(--hairline);
  padding-block: var(--space-6);
}
.doc-section--bluf {
  border-top: none;
  padding-block: var(--space-7) var(--space-6);
}
.doc-grid {
  display: grid;
  grid-template-columns: var(--rail-width) minmax(0, var(--measure));
  column-gap: var(--space-5);
}
.doc-rail__mark {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-meta);
  letter-spacing: var(--tracking-meta);
  color: var(--color-accent);
  padding-top: 6px; /* optical align with the H2 cap height */
}
.doc-rail__mark--bluf { padding-top: 0; }
.doc-rail__title {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: var(--tracking-meta);
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}
.doc-body > * + * { margin-top: var(--space-4); }

/* Margin annotations: the rail carries real notes, not just numbers. */
.doc-rail__sub {
  display: block;
  margin-top: var(--space-1);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: var(--tracking-meta);
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.doc-rail__note {
  display: block;
  margin-top: var(--space-2);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--color-text-muted);
  transition: color var(--duration-micro) var(--ease-out);
}
a.doc-rail__note:hover { color: var(--color-text); }

@media (max-width: 900px) {
  .doc-grid { grid-template-columns: minmax(0, 1fr); }
  .doc-rail { margin-bottom: var(--space-2); }
  .doc-rail__mark { padding-top: 0; }
  .doc-rail__sub { display: inline; margin-left: var(--space-2); }
  .doc-rail__title { display: inline; margin-left: var(--space-2); margin-top: 0; }
  .doc-rail__note {
    display: inline-block;
    margin: 0 0 0 var(--space-3);
    padding-block: var(--space-3); /* 44px+ touch target on mobile */
  }
}

/* ---- BLUF ---- */
.bluf__rule {
  width: 56px;
  height: 2px;
  background: var(--color-accent);
  margin-bottom: var(--space-4);
}
.bluf h1 { max-width: 22ch; }
.bluf__bottomline {
  font-size: 18px;
  color: var(--color-text-muted);
  max-width: 58ch;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-5);
}
.cta-row .btn--ghost { font-family: var(--font-mono); font-size: 14px; }

/* ---- SS01 Capabilities: briefing contents list ---- */
.cap-list { list-style: none; margin-top: var(--space-4); }
.cap-list li { border-top: var(--hairline); }
.cap-list li:last-child { border-bottom: var(--hairline); }
.cap-list a {
  display: grid;
  grid-template-columns: 44px 1fr;
  grid-template-areas: "num title" "num desc";
  align-items: baseline;
  padding-block: var(--space-3);
  text-decoration: none;
}
.cap-list__num {
  grid-area: num;
  font-family: var(--font-mono);
  font-size: var(--text-meta);
  color: var(--color-text-muted);
  transition: color var(--duration-micro) var(--ease-out);
}
.cap-list__title {
  grid-area: title;
  font-weight: var(--weight-body-bold);
  transition: color var(--duration-micro) var(--ease-out);
}
.cap-list__desc {
  grid-area: desc;
  font-size: 14px;
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}
.cap-list a:hover .cap-list__title,
.cap-list a:hover .cap-list__num { color: var(--color-accent); }
.cap-list__all .cap-list__title { font-weight: var(--weight-body); font-style: italic; }

/* Catalogue rows without pages yet: same grid, no affordance */
.cap-list__static {
  display: grid;
  grid-template-columns: 44px 1fr;
  grid-template-areas: "num title" "num desc";
  align-items: baseline;
  padding-block: var(--space-3);
}
@media (min-width: 721px) {
  .cap-list__static {
    grid-template-columns: 44px minmax(16ch, 30ch) 1fr;
    grid-template-areas: "num title desc";
    column-gap: var(--space-4);
  }
}
.cap-list__tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: var(--tracking-meta);
  text-transform: uppercase;
  color: var(--color-accent);
  margin-left: var(--space-1);
}
.cap-list__tag--muted { color: var(--color-text-muted); }

@media (min-width: 721px) {
  .cap-list a {
    grid-template-columns: 44px minmax(16ch, 30ch) 1fr;
    grid-template-areas: "num title desc";
    column-gap: var(--space-4);
  }
  .cap-list__desc { margin-top: 0; }
}

/* ---- SS02 Method: numbered procedure ---- */
.method { list-style: none; margin-top: var(--space-4); }
.method__step {
  display: grid;
  grid-template-columns: 44px 1fr;
  column-gap: 0;
  border-top: var(--hairline);
  padding-block: var(--space-4);
}
.method__step:last-child { border-bottom: var(--hairline); }
.method__num {
  font-family: var(--font-mono);
  font-size: var(--text-meta);
  color: var(--color-accent);
  padding-top: 5px; /* optical align with the H3 cap height */
}
.method__step h3 { font-size: 18px; line-height: 26px; font-family: var(--font-body); font-weight: var(--weight-body-bold); }
.method__step p {
  margin-top: var(--space-2);
  font-size: 15px;
  color: var(--color-text-muted);
  max-width: 58ch;
}

/* ---- SS03 Record: figures block, mono, tabular, static ---- */
.record {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: var(--hairline);
  border-bottom: var(--hairline);
  margin-top: var(--space-4);
}
.record__item {
  padding: var(--space-4) var(--space-3) var(--space-4) 0;
}
.record__item + .record__item { border-left: var(--hairline); padding-left: var(--space-3); }
.record__label {
  font-family: var(--font-mono);
  font-size: var(--text-wire);
  letter-spacing: var(--tracking-wire);
  text-transform: uppercase;
  color: var(--color-text-muted);
  min-height: calc(2 * 1.65em); /* two label lines: figures keep one baseline */
}
.record__value {
  font-family: var(--font-mono);
  font-size: var(--text-figure);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  margin-top: var(--space-2);
}
.record__notes {
  margin-top: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-meta);
  color: var(--color-text-muted);
  line-height: 1.8;
}
@media (max-width: 720px) {
  .record { grid-template-columns: 1fr 1fr; }
  .record__item { border-top: var(--hairline); }
  .record__item:nth-child(-n+2) { border-top: none; }
  .record__item:nth-child(odd) { border-left: none; padding-left: 0; }
  .record__item:nth-child(even) { border-left: var(--hairline); }
}

/* ---- SS04 Area of operations ---- */
.ao-lede { color: var(--color-text-muted); }
.ao-figure {
  margin-top: var(--space-4);
  border: var(--hairline);
}
.ao-figure svg { width: 100%; height: auto; }
.ao-gridline { stroke: var(--color-hairline); stroke-width: 1; }
/* Scroll zoom: eases toward the station cluster once the figure is in
   view. Transform-only; all eleven stations stay inside the frame at
   scale 1.8 with origin 58.3% 89%. Reduced motion keeps the full map. */
.ao-figure { overflow: hidden; }
.ao-figure svg {
  transform-origin: 58.3% 89%;
  transition: transform 1100ms var(--ease-out);
}
.ao-figure.ao-figure--zoomed svg { transform: scale(1.8); }
@media (prefers-reduced-motion: reduce) {
  .ao-figure svg { transition: none; }
  .ao-figure.ao-figure--zoomed svg { transform: none; }
}

.ao-land {
  fill: var(--color-bg-raised);
  stroke: var(--color-hairline);
  stroke-width: 1;
}
.ao-points rect { fill: var(--color-accent); }
.ao-points text {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  fill: var(--color-text-muted);
}
.ao-figure figcaption {
  padding: var(--space-2) var(--space-3);
  border-top: var(--hairline);
}
@media (max-width: 720px) {
  /* keep the city names visible on phones; the scroll zoom brings the
     dense southern cluster up to a legible size, same as on desktop */
  .ao-points rect { width: 9px; height: 9px; }
}

.ao-index {
  list-style: none;
  margin-top: var(--space-4);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--space-2) var(--space-4);
  font-family: var(--font-mono);
  font-size: 13px;
}
.ao-index a {
  display: inline-block;
  padding-block: var(--space-2);
  text-decoration: none;
  color: var(--color-text);
  transition: color var(--duration-micro) var(--ease-out);
}
.ao-index a:hover { color: var(--color-accent); }
.ao-index__static { color: var(--color-text-muted); padding-block: var(--space-2); }

/* ---- FAQ accordion: native details, CSS-only collapse. Shared by homepage §05 and /faq/. ---- */
.faq-group { margin-top: var(--space-4); }
.faq-item { border-top: var(--hairline); }
.faq-item:last-child { border-bottom: var(--hairline); }
.faq-item summary {
  display: grid;
  grid-template-columns: 44px 1fr 24px;
  align-items: baseline;
  padding-block: var(--space-3);
  min-height: 44px;
  font-weight: var(--weight-body-bold);
  cursor: pointer;
  list-style: none;
  touch-action: manipulation;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item__num {
  font-family: var(--font-mono);
  font-size: var(--text-meta);
  font-weight: var(--weight-body);
  color: var(--color-text-muted);
}
.faq-item__marker {
  font-family: var(--font-mono);
  color: var(--color-text-muted);
  justify-self: end;
  transition: transform var(--duration-micro) var(--ease-out);
}
.faq-item[open] .faq-item__marker { transform: rotate(45deg); }
.faq-item summary:hover .faq-item__marker { color: var(--color-accent); }
.faq-item > p {
  padding: 0 0 var(--space-4) 44px;
  color: var(--color-text-muted);
  max-width: 58ch;
}
.faq-item > p a { color: var(--color-text); }
.faq-more { margin-top: var(--space-4); }
.link-arrow {
  font-family: var(--font-mono);
  font-size: 14px;
  text-decoration: none;
  color: var(--color-text);
  transition: color var(--duration-micro) var(--ease-out);
}
.link-arrow:hover { color: var(--color-accent); }

/* ---- End of document ---- */
.end-cta .end-mark { color: var(--color-accent); }
.end-cta h2 { max-width: 24ch; }
.end-cta__sub { color: var(--color-text-muted); max-width: 52ch; }

/* ---- Scroll reveal (JS adds .is-visible) ----
   Base state is fully visible; .is-visible plays a keyframe FROM hidden.
   Headless renderers and no-JS users always see content. Reduced motion
   zeroes --duration-reveal, so the animation resolves instantly. */
html.js .reveal.is-visible {
  animation: reveal-in var(--duration-reveal) var(--ease-out) backwards;
}
@keyframes reveal-in {
  from { opacity: 0; transform: translateY(12px); }
}

/* ==========================================================================
   Interior shell additions (spec addendum 2026-07-02).
   ========================================================================== */

/* ---- Path line: the document's running header ---- */
.path-line {
  border-bottom: var(--hairline);
}
.path-line ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  min-height: 40px;
  padding-block: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-wire);
  letter-spacing: var(--tracking-wire);
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.path-line li + li::before {
  content: "/";
  margin-inline: var(--space-2);
  color: var(--color-accent);
}
.path-line a {
  text-decoration: none;
  color: inherit;
  padding-block: var(--space-2);
  transition: color var(--duration-micro) var(--ease-out);
}
.path-line a:hover { color: var(--color-text); }

/* ---- Briefing form system: quiet fields, register in the chrome ---- */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
}
@media (max-width: 720px) {
  .form-row { grid-template-columns: 1fr; }
}
.form-field { margin-bottom: var(--space-4); }
.form-row .form-field { margin-bottom: 0; }

.form-field label,
.form-group__label {
  display: block;
  font-size: 15px;
  font-weight: var(--weight-body-bold);
  margin-bottom: var(--space-2);
}
.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field input[type="date"],
.form-field input[type="search"],
.form-field input[type="password"],
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  font: inherit;
  color: var(--color-text);
  background: var(--color-bg-raised);
  border: var(--hairline);
  border-radius: var(--radius);
}
.form-field textarea { min-height: 120px; resize: vertical; }
.form-field input:focus-visible,
.form-field select:focus-visible,
.form-field textarea:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 1px;
}
.form-field .hint {
  margin-top: var(--space-2);
  font-size: 13px;
  color: var(--color-text-muted);
}
.req { color: var(--color-accent); }

.check-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2) var(--space-4);
}
@media (max-width: 720px) {
  .check-group { grid-template-columns: 1fr; }
}
.check-group label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 15px;
  font-weight: var(--weight-body);
  min-height: 44px;
  margin-bottom: 0;
}
.check-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-accent);
  flex-shrink: 0;
}

/* Grouped optional block, e.g. the insurance trio */
.form-group {
  border: var(--hairline);
  padding: var(--space-3) var(--space-3) 0;
  margin-bottom: var(--space-4);
}
.form-group__label { margin-bottom: var(--space-1); }
.form-group > .hint { margin: 0 0 var(--space-3); font-size: 13px; color: var(--color-text-muted); }

/* Second subject: native disclosure */
.subject-secondary { border-top: var(--hairline); }
.subject-secondary summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding-block: var(--space-3);
  font-weight: var(--weight-body-bold);
  cursor: pointer;
  list-style: none;
  touch-action: manipulation;
}
.subject-secondary summary::-webkit-details-marker { display: none; }
.subject-secondary summary::before {
  content: "+";
  font-family: var(--font-mono);
  color: var(--color-text-muted);
  transition: transform var(--duration-micro) var(--ease-out);
}
.subject-secondary[open] summary::before { transform: rotate(45deg); }
.subject-secondary summary:hover::before { color: var(--color-accent); }
.subject-secondary > div { padding-bottom: var(--space-3); }

/* Small structural utilities replacing inline styles */
.bluf__meta { margin-top: var(--space-4); line-height: 2; }
.note-alt { margin-top: var(--space-3); }
.form-step__intro { margin-bottom: var(--space-4); }
.form-field--gap-top { margin-top: var(--space-4); }

/* Honeypot: hidden from humans, present for bots */
.honeypot-field {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Case form: legend + fieldset primitives (tabs live in the
   case-tabs block further down) ---- */
.case-step__h { font: inherit; margin: 0; line-height: inherit; text-wrap: inherit; }
.form-step legend {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: var(--text-h2);
  line-height: var(--leading-h2);
  text-wrap: balance;
  padding: 0;
  margin-bottom: var(--space-4);
}
.form-step { border: 0; padding: 0; margin: 0; min-width: 0; }

.form-nav {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-4);
}
.form-nav[hidden] { display: none; }
.form-submit { margin-top: var(--space-4); }
.form-submit[hidden] { display: none; }
.attestation {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  border: var(--hairline);
  padding: var(--space-3);
  margin-block: var(--space-3) var(--space-4);
  font-size: 15px; /* the most consequential text on the page reads at label size */
}
.attestation input[type="checkbox"] {
  width: 18px; height: 18px;
  margin-top: 3px;
  accent-color: var(--color-accent);
  flex-shrink: 0;
}
.form-submit .hint {
  margin-top: var(--space-2);
  font-size: 13px;
  color: var(--color-text-muted);
}

/* ---- Channels page: direct lines, key blocks, notes ---- */
.lines {
  border-top: var(--hairline);
  border-bottom: var(--hairline);
  margin-block: var(--space-4);
}
.lines > div {
  display: grid;
  grid-template-columns: 140px 1fr;
  column-gap: var(--space-4);
  padding-block: var(--space-3);
}
.lines > div + div { border-top: var(--hairline); }
.lines dt {
  font-family: var(--font-mono);
  font-size: var(--text-wire);
  letter-spacing: var(--tracking-wire);
  text-transform: uppercase;
  color: var(--color-text-muted);
  align-self: center;
}
.lines dd a {
  display: inline-block;
  padding-block: var(--space-3);
  margin-block: calc(-1 * var(--space-3)); /* 44px+ hit area without moving the row */
  text-decoration: underline;
  text-decoration-color: var(--color-text-muted);
  text-underline-offset: 3px;
  color: var(--color-text);
  transition: color var(--duration-micro) var(--ease-out),
              text-decoration-color var(--duration-micro) var(--ease-out);
}
.lines dd a:hover { color: var(--color-accent); text-decoration-color: var(--color-accent); }
@media (max-width: 520px) {
  .lines > div { grid-template-columns: 1fr; row-gap: var(--space-1); }
}

.key-block {
  margin: 0;
  padding: var(--space-3);
  background: var(--color-bg-raised);
  border: var(--hairline);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--color-text);
  white-space: pre;
  overflow-x: auto;
}

.doc-note {
  border: var(--hairline);
  padding: var(--space-3);
  font-size: 15px;
  color: var(--color-text-muted);
}
.doc-note strong { color: var(--color-text); }

.key-copy {
  margin-top: var(--space-2);
  min-width: 176px; /* label swaps to Copied without the button resizing */
}

/* Sibling spacing inside channel sections (no inline styles) */
.doc-body h3 + .key-block { margin-top: var(--space-2); }
.doc-body .doc-note { margin-top: var(--space-5); }
.doc-body h3 { margin-top: var(--space-5); }
.form--gap-top { margin-top: var(--space-4); }
.muted-lede { margin-top: var(--space-3); color: var(--color-text-muted); }
.statement { font-size: 18px; } /* full-ink standing for statements of record */

/* ---- Field Note (blog post) template: article body + rail meta.
   Scoped under .post-body / .post-meta-rail so existing .doc-body pages
   are untouched. Closes the doc-body bare-list gap for posts only. ---- */
/* H2 gets --space-6 while H3 falls through to the --space-4 owl: the
   differential is deliberate hierarchy (major vs minor break), keep it. */
.post-body h2 { margin-top: var(--space-6); }
.post-body h2:first-child { margin-top: 0; }
.post-body ul,
.post-body ol {
  padding-left: 1.25em;
  color: var(--color-text);
}
.post-body ul { list-style: disc; }
.post-body ol { list-style: decimal; }
.post-body li + li { margin-top: var(--space-2); }
.post-body li::marker { color: var(--color-accent); }
.post-body a { color: var(--color-text); }
.post-body a:hover { color: var(--color-accent); }

.post-meta-rail .doc-rail__note {
  display: block;
  margin-top: var(--space-1);
}
.post-meta-rail .doc-rail__note:first-child { margin-top: 0; }

/* ---- Field Note callout: blockquote tip/resource boxes from the original posts.
   Hairline-framed aside, mono label, no cards, no fill. ---- */
.post-callout {
  margin: var(--space-5) 0 0; /* zero the UA blockquote inline margins */
  padding: var(--space-4) 0 var(--space-4) var(--space-4);
  border-left: none;
  border-top: var(--hairline);
  border-bottom: var(--hairline);
}
.post-callout__label {
  font-family: var(--font-mono);
  font-size: var(--text-meta);
  letter-spacing: var(--tracking-meta);
  text-transform: uppercase;
  color: var(--color-accent);
}
.post-callout > * + * { margin-top: var(--space-3); }

/* ---- Blog hub controls: category chips + keyword search.
   JS-only affordance: hidden until html.js so no-JS visitors never
   see dead controls. Rows hide via [hidden]; no animation. ---- */
.blog-controls { display: none; margin-bottom: var(--space-5); }
html.js .blog-controls { display: block; }
.blog-controls__field { max-width: 340px; margin-bottom: 0; }
.blog-controls__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.blog-chip {
  min-height: 44px;
  padding: 8px 14px;
  border: var(--hairline);
  font-family: var(--font-mono);
  font-size: var(--text-meta);
  letter-spacing: var(--tracking-meta);
  text-transform: uppercase;
  color: var(--color-text-muted);
  touch-action: manipulation;
  transition: color var(--duration-micro) var(--ease-out),
              border-color var(--duration-micro) var(--ease-out);
}
.blog-chip:hover { color: var(--color-text); border-color: var(--color-text-muted); }
.blog-chip[aria-pressed="true"] { color: var(--color-accent); border-color: var(--color-accent); }
.blog-controls__count { display: block; margin-top: var(--space-3); }
.blog-controls__empty {
  margin-top: var(--space-4);
  padding: var(--space-4);
  border: var(--hairline);
}
.blog-controls__empty .btn { margin-top: var(--space-3); }

/* ---- Field Note rail contents: quiet in-page jump list on long posts.
   Desktop only; on the collapsed single-column grid it would push the
   article down, so it hides where the rail stacks. ---- */
.rail-contents { display: grid; gap: 2px; margin-top: var(--space-3); }
.rail-contents__label { color: var(--color-text); }
.rail-contents a.doc-rail__note { text-decoration: none; }
.rail-contents a.doc-rail__note:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 900px) {
  .rail-contents { display: none; }
}

/* ---- Case intake tabs: one section, four cycled panels.
   Strip and count render only under html.js; without JS the four
   panels stack and the form submits exactly as before. ---- */
.case-tabs { display: none; }
html.js .case-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: var(--space-3);
}
.form-tab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-height: 44px;
  padding: 10px 0 12px;
  text-align: left;
  border: 0;
  border-bottom: var(--hairline);
  font-family: var(--font-mono);
  font-size: var(--text-meta);
  letter-spacing: var(--tracking-meta);
  line-height: 1.15;
  text-transform: uppercase;
  color: var(--color-text-muted);
  touch-action: manipulation;
  transition: color var(--duration-micro) var(--ease-out),
              border-color var(--duration-micro) var(--ease-out);
}
/* number and label stack on two lines: the numeral is the index tick, the
   label sits beneath it */
.form-tab__num { font-variant-numeric: tabular-nums; }
.form-tab__label { display: block; }
.form-tab:hover { color: var(--color-text); }
.form-tab--done { color: var(--color-text); border-bottom-color: var(--color-text-muted); }
.form-tab[aria-selected="true"] {
  color: var(--color-accent);
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: 11px; /* absorbs the thicker rule so the row height holds */
}
@media (max-width: 480px) {
  .form-tab { font-size: 10px; letter-spacing: 0.04em; }
}
.case-tabs__count { display: none; }
html.js .case-tabs__count { display: block; }

/* ---- Back to top: JS-injected floating control, appears after a
   viewport of scroll. Pure enhancement; no-JS pages never see it. ---- */
.back-to-top {
  position: fixed;
  right: var(--space-4);
  bottom: var(--space-4);
  z-index: 40;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: var(--hairline);
  background: var(--color-bg-raised);
  color: var(--color-text-muted);
  font-size: 18px;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  touch-action: manipulation;
  transition: opacity var(--duration-micro) var(--ease-out),
              color var(--duration-micro) var(--ease-out),
              border-color var(--duration-micro) var(--ease-out);
}
.back-to-top--visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { color: var(--color-accent); border-color: var(--color-accent); }
@media (prefers-reduced-motion: reduce) {
  .back-to-top { transition: none; }
}

/* ==========================================================================
   Hero full-page backdrop: the globe-to-map-to-tracking sequence runs as
   the homepage BACKGROUND (fixed layer, content scrolls above). JS builds
   the layer contents; no-JS sees the theme background only. The camera pan
   is a transform on the oversized map svg under a STATIC mask, so nothing
   repaints on scroll.
   ========================================================================== */
body.hero-backdrop .masthead,
body.hero-backdrop .wire,
body.hero-backdrop main,
body.hero-backdrop footer {
  position: relative;
  z-index: 1;
}
/* the masthead sits above the content layers so the mobile nav dropdown,
   which lives inside the masthead stacking context, paints over main
   instead of behind it (equal z-index would let later-in-DOM main win) */
body.hero-backdrop .masthead { z-index: 3; }
.page-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: var(--color-bg);
}
@supports (background: color-mix(in oklab, #000 50%, #fff)) {
  body.hero-backdrop--live .page-backdrop {
    background-color: color-mix(in oklab, #0e1116 calc((1 - var(--hero-t, 1)) * 100%), var(--color-bg));
  }
  body.hero-backdrop--live .hero-stage {
    color: color-mix(in oklab, #e8eaed calc((1 - var(--hero-t, 1)) * 100%), var(--color-text));
  }
  body.hero-backdrop--live .hero-stage .bluf__bottomline {
    color: color-mix(in oklab, #9aa3ad calc((1 - var(--hero-t, 1)) * 100%), var(--color-text-muted));
  }
  /* the night opening is a dark-theme device; the light theme opens on
     its own ground with the light globe palette (Raven 2026-07-04) */
  .theme-light body.hero-backdrop--live .page-backdrop { background-color: var(--color-bg); }
  .theme-light body.hero-backdrop--live .hero-stage { color: var(--color-text); }
  .theme-light body.hero-backdrop--live .hero-stage .bluf__bottomline { color: var(--color-text-muted); }
}
/* left readability scrim (Raven 2026-07-04): a page-ground gradient over
   the whole backdrop stack behind the content column. Its opacity rides
   the same --hero-t ease as the map crossfade, so it arrives exactly when
   the map tiles appear; after the fade to black it matches the ground and
   costs nothing. Static scenes get it at full strength via the fallback. */
.page-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--color-bg) 0%, var(--color-bg) 20%, transparent 58%);
  opacity: var(--hero-t, 1);
}
.page-backdrop__globe,
.page-backdrop__map {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.page-backdrop__globe canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.page-backdrop__globe {
  -webkit-mask-image: radial-gradient(115% 115% at 62% 46%, #000 55%, transparent 92%);
  mask-image: radial-gradient(115% 115% at 62% 46%, #000 55%, transparent 92%);
}
/* moving svg under a static mask: fade under the left content column plus
   an edge vignette so the map dissolves into the page */
.page-backdrop__map {
  opacity: 0;
  -webkit-mask-image:
    linear-gradient(90deg, rgba(0, 0, 0, 0.07) 0%, rgba(0, 0, 0, 0.38) 34%, #000 62%),
    radial-gradient(130% 130% at 60% 50%, #000 58%, transparent 94%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, rgba(0, 0, 0, 0.07) 0%, rgba(0, 0, 0, 0.38) 34%, #000 62%),
    radial-gradient(130% 130% at 60% 50%, #000 58%, transparent 94%);
  mask-composite: intersect;
}
.page-backdrop__map svg {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none; /* the street-scale layout size must beat the global responsive cap */
  will-change: transform;
}
body.hero-backdrop--static .page-backdrop__map { opacity: 1; }
body.hero-backdrop--static .page-backdrop__globe { display: none; }

/* content scrim variant for the mask-vs-scrim A/B (hero-dev ?scrim=1) */
body.backdrop-scrim .page-backdrop__map {
  -webkit-mask-image: radial-gradient(130% 130% at 55% 50%, #000 60%, transparent 97%);
  mask-image: radial-gradient(130% 130% at 55% 50%, #000 60%, transparent 97%);
}
body.backdrop-scrim main .doc-body {
  background: color-mix(in srgb, var(--color-bg) 78%, transparent);
  box-shadow: 0 0 0 16px color-mix(in srgb, var(--color-bg) 78%, transparent);
}

/* background register: map tiles recede to 0.2 (Raven: never more than
   20 percent); the tracking overlay peaks at 0.3 and is scroll-gated by
   the visibility envelope in hero-sequence. Static scenes (reduced
   motion, script failure) have no envelope and keep the CSS value. */
.page-backdrop__map svg > g:not(.hero-track) { opacity: 0.2; }
.page-backdrop__map svg .hero-track { opacity: 0.3; }

@media (prefers-reduced-motion: reduce) {
  .page-backdrop__map { opacity: 1; }
  .page-backdrop__globe { display: none; }
}

/* Light tier (phones and tablets): the map layer is a pre-rendered WebP,
   not the live SVG. Sized taller than the viewport so it can pan; dimmed
   to the same background register as the desktop map tiles. */
body.hero-backdrop--lite .page-backdrop__map {
  height: 130vh;
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  background-image: url("/assets/maps/toronto_map_mobile_dark.webp");
  opacity: 0.2;
  transform: translate3d(0, var(--map-pan, 0px), 0);
}
.theme-light body.hero-backdrop--lite .page-backdrop__map {
  background-image: url("/assets/maps/toronto_map_mobile_light.webp");
}

/* Part D tracking overlay (injected into the map svg; coordinates are
   viewBox units). The route path is motion geometry only and is never
   painted: fill none below, stroke stays at the svg default of none. */
.hero-track path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.hero-track circle { stroke: none; }
.hero-track__dot--subject { fill: var(--track-subject); }
.hero-track__dot--pi { fill: var(--track-inv1); }
.hero-track text {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.12em;
  fill: var(--track-label);
}
.hero-track__unit--subject text { fill: var(--track-subject); }
.hero-track__unit--pi text { fill: var(--track-inv1); }
.hero-track__dest-ring { fill: none; stroke: var(--track-inv1-halo); stroke-width: 3; }

/* ==========================================================================
   Internal portal (docs/superpowers/specs/2026-07-04-internal-portal-design.md).
   Reuses the briefing article system and the shared .form-field inputs; only
   the login card, the resource index rows, the masthead logout affordance,
   and a small eyebrow label are new.
   ========================================================================== */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}
.internal-main { padding-block: var(--space-6) var(--space-7); }
.internal-mast__right { display: flex; align-items: center; gap: var(--space-4); }
.internal-mast__tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.internal-logout { margin: 0; }
.internal-logout__btn {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--color-text);
  background: none;
  border: var(--hairline);
  padding: 6px 12px;
  cursor: pointer;
}
.internal-logout__btn:hover { border-color: var(--color-accent); color: var(--color-accent); }

.internal-login { max-width: 34rem; margin-inline: auto; }
.internal-login h1 { margin-bottom: var(--space-5); }
.internal-login__error {
  border-left: 2px solid var(--color-accent);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-5);
  color: var(--color-text);
  background: var(--color-bg-raised);
}

.internal-index { list-style: none; margin: 0; padding: 0; }
.internal-index__item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-top: var(--hairline);
}
.internal-index__item:last-child { border-bottom: var(--hairline); }
.internal-index__title { font-family: var(--font-display); font-size: var(--text-h3); }
.internal-index__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.internal-index__item--pending .internal-index__title { color: var(--color-text-muted); }
.internal-footer { margin-top: var(--space-7); }
