/* Guardian Sphere — house style.
 *
 * THE RULE THAT KEEPS THIS OFF BROWN: on ivory, gold is a RULE and a MARK,
 * never a word. Gold dark enough to be legible on ivory IS brown, so the moment
 * gold becomes a text colour the whole app's accent turns brown. Links are ink
 * with a gold underline; kickers are neutral caps beside a short gold rule.
 *
 * Corollaries, each of which was a separate mistake somewhere else:
 *   · the grey ramp stays NEUTRAL. Mix it toward the gold and most words on
 *     screen go brown, because secondary copy and captions all ride that ramp.
 *   · structural borders are ink-tinted. One gold hairline is jewellery; two
 *     hundred is a brown grid under everything. --rule-gold is spent deliberately.
 *   · no webfont request. This is a site about protecting a household's network;
 *     it does not phone a third party to draw its own headings.
 */

:root {
  --paper: #f1ece3;
  --paper-2: #e9e2d5;
  --panel: #fbf9f4;

  --ink: #0a0a0a;
  --ink-2: #33312e;   /* neutral, NOT warmed toward the gold */
  --ink-3: #5f5c57;
  --ink-4: #7d7a74;

  --rule: #d5cfc2;
  --rule-2: #c3bcab;
  --rule-gold: #a07020;   /* a RULE colour. never type. */

  --gold: #a07020;
  --gold-hi: #f0d0a0;

  --focus: #0a0a0a;
  --focus-2: #f0d0a0;

  --serif: "Didot", "Bodoni 72", "Bodoni MT", "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;

  --wrap: 1120px;
  --narrow: 760px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.1; margin: 0; letter-spacing: -0.005em; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.28rem; }
em { font-style: italic; }

p { margin: 0 0 1.05rem; }

a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule-gold); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

/* Two-tone focus ring: an ink ring for light grounds, a gold ring outside it so
 * the indicator survives on the dark hero as well. One colour always loses on
 * one of the two grounds. */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--focus-2);
  border-radius: 1px;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.25rem); }
.wrap.narrow, .narrow { max-width: var(--narrow); }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--paper); padding: .7rem 1.1rem; text-decoration: none;
}
.skip:focus { left: 0; }

/* ---- top bar ---- */
.topbar { background: var(--paper); border-bottom: 1px solid var(--rule); position: relative; z-index: 5; }
.topbar-in { display: flex; align-items: center; gap: 1.25rem; padding: .7rem 0; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; flex: none; }
.brand img { display: block; }
.brand-tx { display: flex; flex-direction: column; line-height: 1.15; }
.brand-tx strong { font-family: var(--serif); font-weight: 400; font-size: 1.12rem; }
.brand-tx small { font-size: .7rem; color: var(--ink-3); letter-spacing: .06em; }

/* A nine-link nav wrapped into three rows made a 339px-tall header on a phone
 * elsewhere in the fleet. It scrolls sideways here instead. */
.nav { display: flex; gap: 1.1rem; overflow-x: auto; scrollbar-width: thin; margin-left: auto; padding-bottom: 2px; }
.nav a {
  white-space: nowrap; font-size: .84rem; letter-spacing: .04em; color: var(--ink-2);
  text-decoration: none; padding: .3rem 0; border-bottom: 2px solid transparent;
}
.nav a:hover { border-bottom-color: var(--rule-2); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--rule-gold); }

/* ---- hero ---- */
.hero { position: relative; display: flex; align-items: flex-end; min-height: min(78vh, 640px); overflow: hidden; background: #14151a; }
.hero-media { position: absolute; inset: 0; }
.hero-still, .heroloop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.heroloop { opacity: 0; transition: opacity .5s ease; }
.heroloop.is-live { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .heroloop { display: none; } }

/* THE VEIL FOLLOWS THE COPY.
 * A fixed gradient down a box whose height changes leaves a two-line hero
 * bright where the copy sits and a six-line hero dark where nothing is. So the
 * blanket only takes the general level down, and the real contrast comes from
 * a scrim attached to the copy block itself — which is the thing that moves. */
.hero-veil {
  position: absolute; inset: 0;
  background: linear-gradient(96deg, rgba(9,10,13,.62) 0%, rgba(9,10,13,.45) 46%, rgba(9,10,13,.16) 78%, rgba(9,10,13,.10) 100%);
}
.hero-inner { position: relative; width: 100%; padding-top: 5.5rem; padding-bottom: 3.25rem; }
.hero-copy {
  position: relative;
  max-width: 41rem;
  padding: 1.9rem clamp(2.2rem, 6vw, 4.5rem) 1.7rem clamp(1.1rem, 3vw, 2.1rem);
  margin-left: -.6rem;
  color: #fbf9f4;
  /* the panel fades out at its trailing edge so it reads as a scrim on the
     footage rather than a black box pasted over it. measure-hero.py parses
     these stops, so softening it re-measures automatically. */
  background: linear-gradient(100deg, rgba(7,8,11,.92) 0%, rgba(7,8,11,.88) 58%, rgba(7,8,11,.60) 100%);
  border-left: 2px solid var(--rule-gold);
}
.hero-copy h1 { color: #fbf9f4; }
.hero-copy .lede { color: #ebe6dc; font-size: 1.09rem; margin-top: 1rem; max-width: 44ch; }
.hero-head { margin: 0; }
.hero-copy .kicker { color: #e4ddd0; }
.hero-copy .kicker .rule { background: var(--gold-hi); }

.kicker {
  display: flex; align-items: center; gap: .6rem;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-3); margin: 0 0 .7rem;
}
.kicker .rule { display: inline-block; width: 1.6rem; height: 2px; background: var(--rule-gold); flex: none; }

.cta-row { display: flex; gap: .7rem; flex-wrap: wrap; margin: 1.4rem 0 0; }
.btn {
  display: inline-block; text-decoration: none;
  font-family: var(--mono); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase;
  padding: .85rem 1.35rem; background: var(--ink); color: var(--gold-hi); border: 1.5px solid var(--ink);
}
.btn:hover { background: #000; }
.btn.ghost { background: transparent; color: #fbf9f4; border-color: rgba(251,249,244,.55); }
.btn.ghost:hover { background: rgba(251,249,244,.14); }
.sec .btn.ghost, .band .btn.ghost { color: var(--ink); border-color: var(--ink); }
.sec .btn.ghost:hover { background: var(--ink); color: var(--paper); }

/* ---- listen (class names are read.js's, not ours) ---- */
.listen-row { margin: 1.35rem 0 0; }
button.listen {
  display: inline-flex; align-items: center; gap: .5rem; cursor: pointer;
  font-family: var(--mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase;
  padding: .6rem 1rem; background: transparent; color: #fbf9f4; border: 1px solid rgba(251,249,244,.5);
}
button.listen:hover { background: rgba(251,249,244,.14); }
.listen-ico { width: 0; height: 0; border-style: solid; border-width: .32rem 0 .32rem .55rem; border-color: transparent transparent transparent currentColor; }
.is-playing .listen-ico { border-width: 0; width: .5rem; height: .6rem; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.listen-s { opacity: .72; }
.listen-tx { margin-top: .6rem; font-size: .88rem; color: #ded8cc; max-width: 52ch; }
.listen-tx summary { cursor: pointer; font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: #cfc8ba; }
.listen-tx p { margin: .5rem 0 0; }

/* the transport dock read.js appends to <body> */
.readdock {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 1rem; z-index: 60;
  display: flex; align-items: center; gap: .55rem; max-width: min(46rem, calc(100vw - 1.5rem));
  background: var(--ink); color: var(--paper); padding: .55rem .7rem;
  border: 1px solid #2b2926; box-shadow: 0 10px 32px rgba(0,0,0,.3);
}
.readdock[hidden] { display: none; }
.rd-b { background: transparent; border: 0; color: var(--gold-hi); cursor: pointer; font-size: .95rem; padding: .3rem .45rem; line-height: 1; }
.rd-b:hover { color: #fff; }
.rd-mid { min-width: 0; flex: 1; }
.rd-h { font-size: .78rem; color: #d8d2c6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-bar { height: 3px; background: #3a3733; margin-top: .3rem; }
.rd-bar i { display: block; height: 100%; width: 0; background: var(--gold-hi); }
.rd-time { font-family: var(--mono); font-size: .72rem; color: #b3ada1; }
.rd-rate select { background: #1b1a18; color: var(--paper); border: 1px solid #3a3733; font-size: .72rem; padding: .15rem .2rem; }
.rd-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.listen-note { font-size: .82rem; color: var(--ink-3); }
@media (max-width: 620px) { .rd-rate, .rd-time { display: none; } }

/* ---- sections ---- */
.sec { padding: clamp(2.75rem, 6vw, 4.75rem) 0; border-top: 1px solid var(--rule); }
.sec.alt { background: var(--paper-2); }
.sec-head { margin: 0 0 1.6rem; max-width: 46rem; }
.sec-head h2 { margin-bottom: .5rem; }
.sec-head .sub { color: var(--ink-2); margin: 0; }

.lead { font-size: 1.09rem; color: var(--ink-2); max-width: 62ch; }
.note { border-left: 2px solid var(--rule-gold); padding: .1rem 0 .1rem 1.1rem; color: var(--ink-2); max-width: 66ch; margin-top: 1.6rem; }
.note.strong { color: var(--ink); }

.band { background: var(--ink); color: var(--paper); padding: clamp(2.25rem, 5vw, 3.5rem) 0; }
.pull { font-family: var(--serif); font-size: clamp(1.35rem, 3vw, 2.05rem); line-height: 1.32; margin: 0; max-width: 34ch; }
.band .pull { color: var(--gold-hi); }
.pull cite { display: block; font-family: var(--mono); font-style: normal; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-4); margin-top: 1rem; }
.band .pull cite { color: #b6ac9a; }
.pull.small { font-size: clamp(1.15rem, 2.2vw, 1.5rem); color: var(--ink); max-width: 44ch; margin-top: 2rem; }

/* ---- cards ---- */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.cards.three { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.card { background: var(--panel); padding: 1.6rem 1.5rem; }
.card h3 { margin-bottom: .35rem; }
.card h3 a { text-decoration-color: var(--rule-gold); }
.card p { margin-bottom: .7rem; color: var(--ink-2); font-size: .97rem; }
.card p:last-child { margin-bottom: 0; }
.card .num, .card .fig { font-family: var(--mono); font-size: .78rem; letter-spacing: .16em; color: var(--ink-4); margin-bottom: .7rem; }
.card .fig { font-family: var(--serif); font-size: 1.9rem; letter-spacing: 0; color: var(--ink); }
.card .role { font-style: italic; color: var(--ink-3); }
.card .status { font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.more { font-size: .92rem; }
.src { display: block; font-size: .78rem; color: var(--ink-4); border-top: 1px solid var(--rule); padding-top: .55rem; margin-top: .3rem; }

/* ---- layer / age blocks ---- */
.layer { border-top: 1px solid var(--rule); padding: 2rem 0; }
.layer:first-child { border-top: 0; padding-top: 0; }
.layer-head { display: flex; gap: 1.2rem; align-items: flex-start; margin-bottom: .9rem; }
.layer-head .num { font-family: var(--serif); font-size: 2.1rem; color: var(--rule-2); margin: 0; line-height: 1; flex: none; min-width: 2.6rem; }
.layer-head h2 { margin-bottom: .25rem; }
.layer-head .role { font-style: italic; color: var(--ink-3); margin: 0; }
.ticks { list-style: none; margin: 1.1rem 0; padding: 0; display: grid; gap: .45rem; }
.ticks li { padding-left: 1.35rem; position: relative; color: var(--ink-2); }
.ticks li::before { content: ""; position: absolute; left: 0; top: .62em; width: .6rem; height: 2px; background: var(--rule-gold); }
.limit, .move { background: var(--panel); border: 1px solid var(--rule); padding: 1rem 1.15rem; color: var(--ink-2); max-width: 66ch; }
.move { background: #f6f1e6; }
.lbl { display: block; font-family: var(--mono); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .3rem; }
.contested, .related { border: 1px solid var(--rule-2); background: var(--panel); padding: 1.1rem 1.2rem; margin: 1.6rem 0; }
.contested { border-left: 3px solid var(--rule-gold); }

.ages { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.ages a { display: grid; grid-template-columns: 5.5rem 15rem 1fr; gap: 1rem; align-items: baseline; background: var(--panel); padding: 1.15rem 1.4rem; text-decoration: none; }
.ages a:hover { background: #fff; }
.band-n { font-family: var(--serif); font-size: 1.5rem; }
.band-t { font-family: var(--serif); font-size: 1.12rem; text-decoration: underline; text-decoration-color: var(--rule-gold); text-underline-offset: 3px; }
.band-d { color: var(--ink-2); font-size: .95rem; }

.road { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.road li { background: var(--panel); padding: 1rem 1.3rem; display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; }
.road .when { font-family: var(--mono); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.road .what strong { display: block; font-family: var(--serif); font-size: 1.1rem; font-weight: 400; }
.road .what { color: var(--ink-2); }

.bigfig { font-family: var(--serif); font-size: clamp(3.2rem, 9vw, 5.5rem); line-height: 1; margin: 0 0 .4rem; }
.bigfig span { display: block; font-family: var(--mono); font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); margin-top: .8rem; }

/* ---- film ---- */
.film { margin: 0 0 1.9rem; }
.film video { width: 100%; height: auto; display: block; background: #14151a; border: 1px solid var(--rule-2); }
.film figcaption { font-size: .85rem; color: var(--ink-3); margin-top: .55rem; }
.film-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); }

.pager { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-top: 1px solid var(--rule); padding-top: 1.2rem; margin-top: 2.2rem; font-size: .93rem; }

/* ---- footer ---- */
.foot { background: var(--ink); color: #c8c2b6; padding: 2.75rem 0; text-align: center; }
.foot p { margin: 0 0 .5rem; }
.foot-mark { opacity: .85; }
.foot-name { font-family: var(--serif); font-size: 1.15rem; color: var(--gold-hi); }
.foot-note a { color: var(--gold-hi); text-decoration-color: rgba(240,208,160,.5); }
.foot-fine { font-size: .8rem; color: #8d8779; max-width: 54ch; margin: 1rem auto 0; }

/* ---- responsive ---- */
@media (max-width: 860px) {
  .ages a { grid-template-columns: 4rem 1fr; }
  .band-d { grid-column: 1 / -1; }
  .hero-copy { margin-left: 0; }
  .hero-inner { padding-top: 4rem; }
}
@media (max-width: 620px) {
  .topbar-in { gap: .6rem; }
  .nav { margin-left: 0; width: 100%; }
  .road li { grid-template-columns: 1fr; gap: .2rem; }
  .layer-head { gap: .8rem; }
}

/* Reduced motion: the loop holds on its poster frame. */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

@media print {
  .hero-media, .nav, .listen, .film video, .skip { display: none !important; }
  body { background: #fff; color: #000; }
  .hero-copy { background: none; color: #000; border-left: 2px solid #000; }
  .hero-copy h1, .hero-copy .lede, .hero-copy .kicker { color: #000; }
  .foot { background: #fff; color: #000; }
  .foot-name, .foot-note a { color: #000; }
}

.sec.pad-top { padding-top: 5.5rem; }
