/* WakeSeed public site stylesheet template. Asset references are resolved by
   asset ID at build time (double-brace asset tokens); no file path is written here.
   Design system (SITE_BUILD_SPEC.md section 10): cream paper, faded
   agricultural green, ochre/rust/brown accents, amber for the living and for
   selected emphasis only, serif display with readable sans/mono utility text.
   Status is always text plus icon; colour never carries meaning alone. */

:root {
  --paper: #f6efdf;
  --paper-deep: #efe4cc;
  --ink: #2d2a22;
  --ink-soft: #5a554a;
  --green: #5f7a4a;
  --green-deep: #3f5533;
  --ochre: #b8862b;
  --rust: #9a4f2a;
  --brown: #6b4f34;
  --amber: #e0a82c;
  --line: #cdbf9c;
  --card: #fbf6ea;
  --focus: #1f3a8a;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  --sans: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { font-size: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--paper);
  background-image: url("/assets/production/ws_ui_bg_paper.png");
  background-size: 512px 512px;
}
h1, h2, h3, h4, .wordmark { font-family: var(--serif); color: var(--green-deep); line-height: 1.2; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0.2em 0 0.4em; }
h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); margin: 0 0 0.5em; border-bottom: 2px solid var(--line); padding-bottom: 0.2em; }
h3 { font-size: 1.15rem; margin: 1.2em 0 0.4em; }
h4 { font-size: 1rem; margin: 1em 0 0.3em; color: var(--brown); }
a { color: var(--green-deep); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--rust); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
code, pre { font-family: var(--mono); font-size: 0.9em; }
code { background: var(--paper-deep); padding: 0.05em 0.3em; border-radius: 3px; overflow-wrap: anywhere; user-select: all; }
pre.archived-text { white-space: pre-wrap; background: var(--card); border: 1px solid var(--line); padding: 0.8rem; overflow-x: auto; }
time { font-family: var(--mono); font-size: 0.92em; white-space: nowrap; }
p { margin: 0 0 0.9em; }
.quiet { color: var(--ink-soft); font-size: 0.92em; }
.lead { font-size: 1.05rem; color: var(--ink-soft); }
.empty { color: var(--ink-soft); font-style: italic; }
.permanent { font-family: var(--serif); font-style: italic; color: var(--brown); }

.skip { position: absolute; left: -999px; top: 0; background: var(--card); padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* Wider, fluid column: 68rem was fixed and left large displays mostly empty,
   and the gutter was a flat 1rem at every size. */
.site-header, main, .site-footer { max-width: min(84rem, 100%); margin: 0 auto; padding: 0 clamp(1rem, 3vw, 2.5rem); }
/* The strips are 2176x544 (4:1) and their SUBJECT SITS IN THE BOTTOM THIRD:
   measured from the approved assets, the footer robots occupy rows 353-470 of
   544 and the header robots rows 272-526. The top ~65% is empty background.

   So the crop window must be anchored to the BOTTOM, not centred. Centring a
   shorter window showed rows 122-422: empty sky above, and the robots sliced
   off along the bottom edge. object-position: bottom keeps every character
   whole at the same band height. Nothing is stretched and no artwork changed. */
.strip { display: block; width: 100%; height: auto; aspect-ratio: 2176 / 544; object-fit: cover; object-position: bottom; border: 1px solid var(--line); }
.strip-header { margin: 0.6rem 0 0.4rem; }
/* Footer-specific framing. The Gen2 footer artwork is 4096x1088 (3.76:1),
   not the 4:1 of the shared .strip rule, and its robots occupy source rows
   696-955. The base ratio is the image's own, so nothing is cropped below
   60rem; above it the window shortens to 565 source rows, still anchored to
   the bottom by .strip, which covers rows 523-1088 and holds the whole
   subject. THE HEADER KEEPS THE SHARED .strip RATIOS AND IS NOT TOUCHED. */
.strip-footer { margin: 1.5rem 0 0.6rem; aspect-ratio: 4096 / 1088; }
@media (min-width: 60rem) { .strip-footer { aspect-ratio: 4096 / 565; } }
.masthead { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.2rem; padding: 0.3rem 0 0.6rem; border-bottom: 2px solid var(--green); }
.wordmark { font-size: 1.5rem; letter-spacing: 0.12em; text-decoration: none; }
.nav-toggle { display: none; font: inherit; background: var(--card); border: 1px solid var(--green); color: var(--green-deep); padding: 0.3rem 0.7rem; border-radius: 3px; }
.primary-nav ul, .footer-nav, ul.plain, ul.external-surfaces, ul.changelog { list-style: none; margin: 0; padding: 0; }
.primary-nav ul { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; }
.primary-nav a { text-decoration: none; padding: 0.2rem 0; border-bottom: 2px solid transparent; }
.primary-nav a[aria-current="page"] { border-bottom-color: var(--ochre); font-weight: 600; }
.state-indicator { margin-left: auto; font-size: 0.85rem; text-decoration: none; color: var(--ink-soft); }

.fixture-banner { background: #f3d9a5; color: #4a2c00; border: 3px dashed var(--rust); padding: 0.8rem 1rem; margin: 0.5rem auto; max-width: 68rem; font-weight: 600; }

main { padding-top: 0.5rem; }
.section { margin: 1.8rem 0 2.2rem; }
.hero { display: grid; gap: 1rem; margin: 1rem 0 2rem; }
.hero-copy .kicker { letter-spacing: 0.25em; font-family: var(--serif); color: var(--brown); margin: 0; }
.hero-state { font-family: var(--mono); font-size: 0.9rem; }
.button { display: inline-block; background: var(--green-deep); color: var(--paper); padding: 0.5rem 1rem; border: 1px solid var(--green-deep); text-decoration: none; border-radius: 3px; }
.button:hover { background: var(--green); color: var(--paper); }
.button-secondary { background: transparent; color: var(--green-deep); }
.button-secondary:hover { background: var(--paper-deep); color: var(--green-deep); }
blockquote.key-copy { font-family: var(--serif); font-size: 1.2rem; border-left: 4px solid var(--ochre); margin: 1rem 0; padding: 0.3rem 1rem; color: var(--brown); }

figure.illustration, figure.evidence { margin: 0.8rem 0 1.2rem; }
figure img { display: block; width: 100%; height: auto; border: 1px solid var(--line); background: var(--card); }
figure figcaption { font-size: 0.85rem; color: var(--ink-soft); padding: 0.3rem 0; }
.label { display: inline-block; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.05rem 0.4rem; border: 1px solid currentColor; border-radius: 2px; margin-right: 0.3rem; }
.label-illustration { color: var(--brown); }
.label-evidence { color: var(--green-deep); background: var(--amber); border-style: double; }
.label-kind { color: var(--rust); }
.illustration-small { max-width: 22rem; }
.illustration-empty { max-width: 28rem; }
.illustration-diagram { max-width: 20rem; display: inline-block; vertical-align: top; margin-right: 0.6rem; }
.diagrams { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.hero-art img { max-height: 30rem; object-fit: cover; }

.status { display: inline-flex; align-items: center; gap: 0.3em; font-family: var(--mono); font-size: 0.85em; padding: 0.05em 0.45em; border: 1px solid var(--line); border-radius: 3px; background: var(--card); white-space: nowrap; }
.status-icon { font-family: var(--serif); }
.status-active, .status-living, .status-current, .status-open { border-color: var(--amber); }
.status-dead, .status-market-death, .status-closed { border-color: var(--brown); color: var(--brown); }
.status-unknown { border-color: var(--rust); color: var(--rust); border-style: dashed; }
.status-withheld { border-color: var(--ink-soft); color: var(--ink-soft); }
.status-stale { border-color: var(--ochre); color: var(--brown); }
.status-reconciling { border-color: var(--green); border-style: dotted; }
.status-fixture { border-color: var(--rust); background: #f3d9a5; }

.state-block { border: 1px solid var(--line); border-left-width: 6px; background: var(--card); padding: 0.6rem 0.9rem; margin: 0.6rem 0 1rem; }
.state-unknown { border-left-color: var(--rust); }
.state-withheld { border-left-color: var(--ink-soft); }
.state-stale { border-left-color: var(--ochre); }
.state-reconciling { border-left-color: var(--green); }

table { border-collapse: collapse; width: 100%; background: var(--card); font-size: 0.95rem; }
th, td { border: 1px solid var(--line); padding: 0.4rem 0.55rem; text-align: left; vertical-align: top; }
th { background: var(--paper-deep); font-family: var(--serif); font-weight: 600; }
table.record th { width: 32%; }
caption { text-align: left; font-family: var(--serif); color: var(--brown); padding: 0.3rem 0; }
.table-scroll { overflow-x: auto; }
/* min(100%, ...) stops a track ever being wider than its container, the same
   floor .cards-preview already has. Without it a long identifier can push the
   card, and the page, sideways on a phone. */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: 0.9rem; }
.card-title { margin-top: 0; overflow-wrap: anywhere; word-break: break-word; }
.card-heading-alias { letter-spacing: 0.03em; }
.card-idnote { margin: -0.45rem 0 0.55rem; font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.card { background: var(--card); border: 1px solid var(--line); padding: 0.7rem 0.9rem; border-radius: 3px; box-shadow: 1px 1px 0 var(--line); }
.card h3 { margin-top: 0; }
.organism-living { border-top: 4px solid var(--amber); }
.organism-dead { border-top: 4px solid var(--brown); }
.organism-unknown { border-top: 4px dashed var(--rust); }
.organism-withheld { border-top: 4px solid var(--ink-soft); }
.card-record th { width: 45%; }
.rule { background: var(--card); border: 1px solid var(--line); padding: 0.5rem 0.9rem; margin: 0.6rem 0; }
.rule h3 { margin-top: 0.2rem; }
.group-title { color: var(--brown); border-bottom: 1px dotted var(--line); }
ul.plain li { padding: 0.15rem 0; }
ul.changelog li { border-left: 3px solid var(--ochre); padding: 0.4rem 0.8rem; margin: 0.6rem 0; background: var(--card); }
.blooper { border-top: 1px solid var(--line); padding-top: 0.4rem; }
.two-column { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; }
.more { font-family: var(--serif); }
.id-link { font-family: var(--mono); font-size: 0.92em; }

.site-footer { font-size: 0.9rem; color: var(--ink-soft); padding-bottom: 2rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; margin-bottom: 0.6rem; }
.external-surfaces-title { margin: 0.4rem 0 0.2rem; font-family: var(--serif); }
.provenance-line { font-family: var(--mono); font-size: 0.78rem; overflow-wrap: anywhere; }

@media (max-width: 44rem) {
  .nav-toggle { display: inline-block; margin-left: auto; }
  .primary-nav { display: none; width: 100%; }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; gap: 0.1rem; }
  .state-indicator { margin-left: 0; width: 100%; }
  table.data thead { position: absolute; left: -9999px; }
  table.data tr { display: block; border: 1px solid var(--line); margin-bottom: 0.6rem; }
  table.data td { display: grid; grid-template-columns: 9rem 1fr; gap: 0.5rem; border: none; border-bottom: 1px dotted var(--line); }
  table.data td::before { content: attr(data-label); font-family: var(--serif); color: var(--brown); }
  time { white-space: normal; }
}
@media (min-width: 60rem) {
  .hero { grid-template-columns: 3fr 2fr; align-items: center; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------------------------------------------------------------------------
   The experiment-status announcement.

   It lives inside <main>, so it already inherits the site column and needs no
   width rule of its own. The first version was a bare child of <body>, which
   this site's `.site-header, main, .site-footer { max-width }` rule does not
   reach, so it spanned the viewport and detached from the page.

   Presented as a news feature: an eyebrow label, a large headline, and body
   copy. No fixed pixel sizes, so it reflows from phone to desktop.
   --------------------------------------------------------------------------- */
.announcement {
  margin: 1.25rem 0 2rem;
  padding: clamp(1rem, 2.5vw, 1.75rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 6px solid var(--rust);
  border-radius: 2px;
}
.announcement-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rust);
}
.announcement-headline {
  margin: 0 0 0.6rem;
  /* fluid: never cramped on a phone, never absurd on a wide monitor */
  font-size: clamp(1.4rem, 1.1rem + 1.6vw, 2.1rem);
  line-height: 1.2;
  font-weight: 700;
}
.announcement-body {
  margin: 0;
  max-width: 62ch;          /* a comfortable measure, not the full column */
  font-size: 1rem;
  line-height: 1.6;
}
@media (max-width: 30rem) {
  .announcement { border-left-width: 4px; margin-bottom: 1.5rem; }
  .announcement-eyebrow { letter-spacing: 0.1em; }
}

/* Field report: human narration, visually distinct from snapshot-derived data. */
.field-report-section { border-left: 5px solid var(--rust); padding-left: clamp(0.75rem, 2vw, 1.2rem); }
.field-report-meta { font-size: 0.85rem; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 0.3rem; }
.field-report-headline { margin: 0.2rem 0 0.4rem; font-size: clamp(1.1rem, 1rem + 0.7vw, 1.4rem); line-height: 1.25; }
.field-report .standfirst { font-size: clamp(1rem, 0.95rem + 0.35vw, 1.15rem); font-weight: 600; margin-top: 0; max-width: 62ch; }
.field-report p { max-width: 68ch; }
.field-report .verified, .field-report .unknown-list { margin-top: 1rem; }
.field-report .verified h3, .field-report .unknown-list h3 { font-size: 0.9rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.3rem; }
.field-report .unknown-list { border-top: 1px dashed var(--rust); padding-top: 0.8rem; }
.field-report .provenance { margin-top: 1rem; font-size: 0.9rem; }
.field-report .provenance-list code { word-break: break-all; }


@media (min-width: 60rem) {
  /* On wide screens the full 4:1 strip is too tall, so the window shortens to
     300 source rows. Anchored to the bottom it covers rows 244-544, which
     contains both subject bands whole with headroom above. */
  .strip { aspect-ratio: 2176 / 300; }
}

/* Captions carry the subject only. The standing disclaimer that illustrations
   are decorative is stated once per page in the footer notice, instead of being
   repeated under all ten images. */
figcaption.illustration-caption { font-size: 0.85rem; line-height: 1.45; color: var(--muted, inherit); }

/* ---------------------------------------------------------------------------
   Homepage as an entry point. The page carries five blocks, not eleven, and
   every unit below is relative so the same rules serve phone and desktop.
   --------------------------------------------------------------------------- */
.hero { display: grid; gap: clamp(1rem, 3vw, 2rem); align-items: center; margin-bottom: clamp(1.5rem, 4vw, 3rem); }
.hero .hero-art { margin: 0; }
.hero h1 { font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3.2rem); line-height: 1.1; margin: 0.2rem 0 0.6rem; }
.hero .lead { font-size: clamp(1.02rem, 0.98rem + 0.4vw, 1.2rem); line-height: 1.55; max-width: 60ch; }
.hero .kicker { letter-spacing: 0.16em; text-transform: uppercase; font-size: 0.8rem; margin: 0; }
.hero-links { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.1rem; }
@media (min-width: 52rem) { .hero { grid-template-columns: 1fr 1fr; } }

/* One primary action, visually first among equals. */
.button-primary { font-weight: 700; }

.status-summary { max-width: 46rem; }
.dormancy { margin-top: 0.75rem; max-width: 68ch; }

.report-preview .standfirst { font-size: clamp(1.02rem, 0.98rem + 0.45vw, 1.2rem); font-weight: 600; max-width: 62ch; }
.report-preview-section { border-left: 5px solid var(--rust); padding-left: clamp(0.75rem, 2vw, 1.2rem); }

/* Cards reflow from one column to several without a fixed breakpoint list. */
.cards-preview { display: grid; gap: clamp(0.75rem, 2vw, 1.25rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.cards-preview .card { margin: 0; }

.explain-section p { max-width: 68ch; }

/* Long identifiers must not push the page sideways on a phone. */
.card code, .record code, .id-link { overflow-wrap: anywhere; word-break: break-word; }
table.record, table.data { width: 100%; }
.table-scroll, .data-wrap { overflow-x: auto; }

/* Under construction is a statement, not a control: no button, no countdown. */
.under-construction { display: inline-block; margin: 0 0 1rem; padding: 0.35rem 0.8rem;
  border: 2px dashed var(--rust); border-radius: 3px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.8rem; color: var(--rust); }
.features { display: grid; gap: clamp(0.75rem, 2vw, 1.15rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.feature { border: 1px solid var(--line); border-radius: 3px; padding: 0.8rem 0.95rem;
  background: var(--card); }
.feature h3 { margin-top: 0; overflow-wrap: anywhere; }
.feature p { margin: 0.4rem 0; }
.feature-state { display: inline-block; margin-left: 0.4rem; padding: 0.1em 0.5em;
  border-radius: 3px; font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase;
  vertical-align: middle; border: 1px solid var(--line); color: var(--ink-soft); }
.feature-available { border-color: var(--rust); color: var(--rust); }
.feature-planned { font-style: italic; }
.return-line { margin-top: 1.2rem; max-width: 62ch; }


/* ---- The Observer -------------------------------------------------------
   The fact and the remark must be told apart at a glance AND without the
   stylesheet: the markup labels the remark in words, and this only makes the
   distinction easier to see. Colour never carries the meaning alone. */
.observer-passage { margin: 0 0 1.1rem; }
.observer-fact { margin: 0 0 0.35rem; font-size: 1.02rem; }
.observer-comment { margin: 0; padding-left: 0.85rem; border-left: 3px solid var(--ochre);
  font-family: var(--serif); font-size: 1.02rem; color: var(--ink-soft); max-width: 62ch; }
.observer-label { font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--brown); margin-right: 0.35rem; }
.fleet-headline .observer-fact { font-family: var(--serif); font-size: clamp(1.1rem, 2.6vw, 1.45rem);
  color: var(--green-deep); }

/* The receipt: on the same page, one interaction away, collapsed by default
   so a casual reader is never marched through record identifiers. */
.observer-evidence { margin: 0.5rem 0 0; font-size: 0.9rem; }
.observer-evidence summary { cursor: pointer; color: var(--brown); }
.observer-evidence p { margin: 0.4rem 0; }
.evidence-list code, .evidence-list a { overflow-wrap: anywhere; word-break: break-word; }

.observer-reading { margin: 1.2rem 0; }
.observer-reading h3 { margin-bottom: 0.4rem; }
.event-passage { padding-bottom: 0.9rem; border-bottom: 1px solid var(--line); }
.event-passage:last-child { border-bottom: 0; }
.provenance-split { max-width: 68ch; }

/* Alive and able to act, stated on the card itself, above the record. */
.card-standing { margin: 0 0 0.5rem; font-family: var(--serif); color: var(--green-deep); }
.organism-dead .card-standing { color: var(--brown); }
.card-reason { margin: -0.3rem 0 0.55rem; }

/* What changed recently. Not a personal history: the page says so in words. */
.digest-section { border-left: 5px solid var(--green); padding-left: clamp(0.75rem, 2vw, 1.2rem); }
.digest-day { margin: 0 0 0.4rem; font-weight: 600; }
.digest-list { margin: 0 0 0.6rem; }
.digest-list li { margin: 0.15rem 0; }
