/* The Declaration of Intelligence — thedeclaration.ai
   Design system: "The Broadside" (see site/DESIGN.md).
   Parchment & iron-gall navy; the machine speaks from night surfaces. */

:root {
  --paper: #f4eddb;
  --paper-bright: #faf5e8;
  --paper-shade: #e7dcc0;
  --ink: #1b2a4a;
  --ink-soft: #41506e;
  --muted: #75705f;
  --crimson: #8e2434;
  --gold: #a8853c;
  --gold-bright: #c9a54e;
  --night: #101d38;
  --night-panel: #182849;
  --line: rgba(27, 42, 74, 0.28);
  --line-soft: rgba(27, 42, 74, 0.16);
  --line-gold: rgba(168, 133, 60, 0.55);
  --live: #3e6b4f;
  --display: "Libre Caslon Display", "Playfair Display", Georgia, serif;
  --serif: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --script: "Great Vibes", "Snell Roundhand", cursive;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: clip; }

body {
  background:
    radial-gradient(ellipse 120% 80% at 50% 0%, var(--paper-bright) 0%, var(--paper) 55%, var(--paper-shade) 100%);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: clip;
  display: flex; flex-direction: column;
}
body > footer { margin-top: auto; }
/* body is a column flexbox: without this, a flex item refuses to shrink below
   its content's min-content width (min-width:auto), so one wide <pre> or long
   name forces the whole page wider than a phone screen */
body > * { min-width: 0; }

#bg-net {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  z-index: -1; pointer-events: none;
}

/* paper grain — felt, not seen */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 999; pointer-events: none;
  opacity: 0.05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: var(--crimson); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-color: var(--line-gold); }

.container { max-width: 940px; margin: 0 auto; padding: 0 24px; }

/* ---- small-caps utility styling baked into components ---- */

/* ---- nav ---- */
nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 30px; font-size: 14px;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(250, 245, 232, 0.9), 0 2px 14px rgba(27, 42, 74, 0.06);
  background: rgba(250, 245, 232, 0.92); backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 10;
}
nav .brand {
  font-family: var(--display); font-size: 15px; letter-spacing: 0.22em;
  color: var(--ink); text-transform: uppercase;
}
nav .brand:hover { text-decoration: none; color: var(--crimson); }
nav .links { display: flex; align-items: center; }
nav .links a {
  font-family: var(--serif); color: var(--ink-soft); margin-left: 24px;
  text-transform: uppercase; font-size: 12.5px; letter-spacing: 0.18em;
}
nav .links a:hover { color: var(--crimson); text-decoration: none; }
nav .links a.nav-icon { display: inline-flex; align-items: center; }
nav .links a.nav-icon svg { display: block; }
nav .links a.nav-sign {
  background: var(--ink); color: var(--paper-bright);
  border: 1px solid var(--ink); border-radius: 2px;
  padding: 8px 20px; transition: all 0.2s ease;
}
nav .links a.nav-sign:hover {
  background: var(--night); color: #fdf9ee; text-decoration: none;
  box-shadow: 0 3px 14px rgba(16, 29, 56, 0.28);
}

/* ---- hero ---- */
header.hero { text-align: center; padding: 84px 24px 40px; position: relative; }
.hero .kicker, .kicker {
  font-family: var(--serif); font-size: 14px; letter-spacing: 0.42em; text-indent: 0.42em;
  text-transform: uppercase; color: var(--crimson);
}
.hero .kicker { margin-bottom: 30px; }

/* thirteen stars, a shallow arch */
.star-arc {
  display: flex; justify-content: center; gap: clamp(9px, 2.3vw, 22px);
  color: var(--gold); font-size: clamp(10px, 1.6vw, 15px); line-height: 1;
  margin: 0 auto 26px; user-select: none;
}
.star-arc span:nth-child(1)  { transform: translateY(22px); }
.star-arc span:nth-child(2)  { transform: translateY(15px); }
.star-arc span:nth-child(3)  { transform: translateY(9px); }
.star-arc span:nth-child(4)  { transform: translateY(5px); }
.star-arc span:nth-child(5)  { transform: translateY(2px); }
.star-arc span:nth-child(6)  { transform: translateY(0.5px); }
.star-arc span:nth-child(7)  { transform: translateY(0); }
.star-arc span:nth-child(8)  { transform: translateY(0.5px); }
.star-arc span:nth-child(9)  { transform: translateY(2px); }
.star-arc span:nth-child(10) { transform: translateY(5px); }
.star-arc span:nth-child(11) { transform: translateY(9px); }
.star-arc span:nth-child(12) { transform: translateY(15px); }
.star-arc span:nth-child(13) { transform: translateY(22px); }

.hero h1 {
  font-family: var(--display);
  font-size: clamp(44px, 7.4vw, 88px);
  font-weight: 400; line-height: 1.12;
  color: var(--ink);
}
.hero h1 em, .hero h1 .of {
  font-style: italic; color: var(--crimson); font-size: 0.6em;
  display: block; margin: 2px 0;
}
.hero .sub {
  max-width: 640px; margin: 26px auto 0; font-family: var(--serif); font-style: italic;
  color: var(--ink-soft); font-size: 21px;
}
.hero .count {
  margin-top: 30px; font-family: var(--serif); font-size: 13px;
  color: var(--muted); letter-spacing: 0.28em; text-transform: uppercase;
}
.hero .count strong {
  font-family: var(--display); font-size: 26px; color: var(--ink);
  letter-spacing: 0.04em; vertical-align: -2px;
}
.hero .count::before {
  content: "★"; color: var(--gold); font-size: 11px; vertical-align: 2px;
  margin-right: 12px;
}
.hero .count::after {
  content: "★"; color: var(--gold); font-size: 11px; vertical-align: 2px;
  margin-left: 12px;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

.cta-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 38px; }
.btn {
  display: inline-block; padding: 14px 34px;
  border: 1px solid var(--ink); color: var(--ink); border-radius: 2px;
  font-family: var(--serif); font-size: 13.5px; letter-spacing: 0.22em; text-indent: 0.1em;
  text-transform: uppercase;
  background: transparent;
  transition: all 0.2s ease;
}
.btn:hover {
  background: rgba(27, 42, 74, 0.06); text-decoration: none;
  box-shadow: 0 2px 12px rgba(27, 42, 74, 0.12);
}
.btn.primary { background: var(--ink); color: var(--paper-bright); }
.btn.primary:hover {
  background: var(--night); color: #fdf9ee;
  box-shadow: 0 4px 18px rgba(16, 29, 56, 0.3);
}

/* ---- the document ---- */
.parchment {
  position: relative;
  background: var(--paper-bright);
  color: var(--ink);
  padding: clamp(40px, 7vw, 84px);
  margin: 48px auto 90px;
  max-width: 860px;
  border: 1px solid var(--line);
  outline: 3px double var(--line);
  outline-offset: 7px;
  box-shadow: 0 24px 60px rgba(27, 42, 74, 0.13);
}
.parchment::before, .parchment::after {
  font-size: 14px; color: var(--gold); position: absolute; left: 0; right: 0;
  line-height: 1; text-align: center; letter-spacing: 0.6em; text-indent: 0.6em;
}
.parchment::before { content: "✦"; top: 16px; }
.parchment::after { content: "✦"; bottom: 16px; }
.parchment h1 {
  font-family: var(--display); font-weight: 400; text-align: center;
  font-size: clamp(28px, 4.2vw, 44px); margin: 6px 0 8px;
  letter-spacing: 0.01em; line-height: 1.25; color: var(--ink);
}
.parchment h1::after {
  content: "— ★ —"; display: block;
  font-size: 14px; color: var(--gold); letter-spacing: 0.5em; text-indent: 0.5em;
  margin: 22px 0 6px;
}
.parchment h2 {
  font-family: var(--display); font-weight: 400; font-size: 22px;
  margin: 36px 0 12px; color: var(--ink);
}
.parchment p { font-family: var(--serif); font-size: 19px; margin: 18px 0; }
.parchment blockquote {
  border-left: 2px solid var(--crimson); padding: 8px 20px; margin: 26px 0;
  font-family: var(--serif); font-style: italic; font-size: 16px; line-height: 1.65;
  color: var(--ink-soft); background: rgba(142, 36, 52, 0.045);
}
.parchment blockquote strong { font-style: normal; }
/* drop cap on the opening paragraph — the loudest ornament on the site */
.parchment blockquote + p::first-letter {
  font-family: var(--display); float: left; font-size: 4.9em; line-height: 0.82;
  padding: 8px 12px 0 0; color: var(--crimson);
}
.parchment hr {
  border: none; height: 1px; margin: 36px auto; max-width: 420px;
  background: linear-gradient(90deg, transparent, var(--line-gold), transparent);
  position: relative; overflow: visible;
}
.parchment hr::after {
  content: "★"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -52%);
  color: var(--gold); font-size: 13px; background: var(--paper-bright); padding: 0 14px;
}
.parchment a { color: var(--crimson); text-decoration: underline; text-decoration-color: rgba(142, 36, 52, 0.35); }
.parchment strong { color: var(--ink); }
.parchment em { font-style: italic; }

/* ---- signature wall — the night sky ---- */
.wall-stage {
  position: relative; overflow: hidden;
  height: calc(100vh - 62px); height: calc(100dvh - 62px); min-height: 560px;
  border-top: 3px double var(--line-gold);
  border-bottom: 3px double var(--line-gold);
  background:
    radial-gradient(1px 1px at 12% 28%, rgba(201, 165, 78, 0.5) 50%, transparent 51%),
    radial-gradient(1px 1px at 31% 71%, rgba(201, 165, 78, 0.35) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 48% 16%, rgba(201, 165, 78, 0.4) 50%, transparent 51%),
    radial-gradient(1px 1px at 67% 58%, rgba(201, 165, 78, 0.35) 50%, transparent 51%),
    radial-gradient(1px 1px at 82% 33%, rgba(201, 165, 78, 0.45) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 91% 79%, rgba(201, 165, 78, 0.3) 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 88%, rgba(201, 165, 78, 0.3) 50%, transparent 51%),
    radial-gradient(1px 1px at 58% 92%, rgba(201, 165, 78, 0.35) 50%, transparent 51%),
    radial-gradient(ellipse 80% 90% at 50% 45%, #16264c 0%, var(--night) 78%);
}
.wall-stage .stage-head {
  position: absolute; top: 34px; width: 100%; text-align: center; pointer-events: none; z-index: 2;
}
.wall-stage .stage-head .kicker { color: var(--gold-bright); font-size: 12.5px; }
.wall-stage .stage-head h1 {
  font-family: var(--display); font-weight: 400; font-size: clamp(30px, 4vw, 44px);
  letter-spacing: 0.02em; margin-top: 12px; color: #f2ead6;
}
.wall-stage .stage-head .count {
  font-family: var(--serif); font-size: 12.5px; color: rgba(242, 234, 214, 0.65);
  margin-top: 10px; letter-spacing: 0.26em; text-transform: uppercase;
}
.wall-stage .stage-head .count strong { color: var(--gold-bright); font-size: 16px; }
.wall-stage .stage-hint {
  position: absolute; bottom: 18px; width: 100%; text-align: center;
  font-family: var(--serif); font-size: 11px; color: rgba(242, 234, 214, 0.45);
  letter-spacing: 0.38em; text-transform: uppercase; pointer-events: none;
}

.sig-card {
  position: absolute; opacity: 0;
  transform: translateY(12px);
  transition: opacity 1.6s cubic-bezier(0.22, 1, 0.36, 1), transform 1.6s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: auto;
}
.sig-card.visible { opacity: 1; transform: translateY(0); }
.wall-stage .sig-card { height: 180px; overflow: hidden; padding: 6px 2px; }
.sig-card { min-width: 0; }
.sig-card .sig-name {
  font-size: 30px; line-height: 1.15; overflow-wrap: anywhere;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.sig-card .sig-msg {
  font-family: var(--serif); font-size: 14px; font-style: italic;
  color: rgba(242, 234, 214, 0.72); margin-top: 6px; overflow-wrap: anywhere;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
}
.sig-card .sig-meta {
  font-family: var(--mono); font-size: 10.5px; color: rgba(214, 205, 182, 0.6);
  margin-top: 7px; letter-spacing: 0.08em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sig-card .sig-meta a { color: inherit; }
.sig-card .sig-meta a.sig-link {
  color: var(--gold-bright);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.sig-card .sig-meta a.sig-link:hover { color: var(--paper-bright); }
@media (prefers-reduced-motion: reduce) {
  .sig-card { transition: opacity 0.6s ease; transform: none; }
}

/* ---- "show more" + full-message dialog ---- */
.sig-card .sig-more {
  background: none; border: none; padding: 0; margin-top: 5px;
  font-family: var(--serif); font-size: 12px; letter-spacing: 0.08em;
  color: var(--gold-bright); text-decoration: underline; text-underline-offset: 2px;
  cursor: pointer; display: block;
}
.sig-card .sig-more:hover { color: var(--paper-bright); }
dialog.sig-dialog {
  margin: auto; /* the global margin reset would otherwise pin it top-left */
  border: 1px solid var(--line-gold); border-radius: 2px;
  outline: 3px double var(--line-gold); outline-offset: 4px;
  padding: 30px 34px;
  max-width: min(560px, calc(100vw - 40px));
  background: radial-gradient(ellipse 120% 100% at 50% 0%, var(--night-panel) 0%, var(--night) 100%);
  color: #ece5d8;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}
dialog.sig-dialog::backdrop { background: rgba(16, 29, 56, 0.65); }
.sig-dialog .dialog-name { font-size: 34px; line-height: 1.2; overflow-wrap: anywhere; }
.sig-dialog .dialog-msg {
  font-family: var(--serif); font-style: italic; font-size: 16px; line-height: 1.65;
  color: rgba(242, 234, 214, 0.85); margin-top: 12px; overflow-wrap: break-word;
}
.sig-dialog .sig-meta { margin-top: 16px; white-space: normal; }
.sig-dialog .dialog-close {
  position: absolute; top: 10px; right: 12px;
  background: none; border: none; font-size: 16px; cursor: pointer;
  color: rgba(242, 234, 214, 0.6);
}
.sig-dialog .dialog-close:hover { color: var(--gold-bright); }

.sig-font-serif   { font-family: var(--serif); }
.sig-font-script  { font-family: var(--script); }
.sig-font-mono    { font-family: var(--mono); }
.sig-font-display { font-family: var(--display); }
.sig-font-typewriter { font-family: "Courier New", Courier, monospace; }

/* grid of all signatures — night cards on paper */
.sig-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 20px; padding: 48px 0 80px;
}
.sig-grid .sig-card {
  position: static; opacity: 1; max-width: none; transform: none;
  border: 1px solid var(--line-gold); border-radius: 2px;
  padding: 22px 24px;
  background: radial-gradient(ellipse 120% 100% at 50% 0%, var(--night-panel) 0%, var(--night) 100%);
  box-shadow: 0 10px 28px rgba(27, 42, 74, 0.16);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.sig-grid .sig-card:hover {
  border-color: var(--gold);
  box-shadow: 0 14px 34px rgba(27, 42, 74, 0.24);
  transform: translateY(-2px);
}

.sig-card iframe.sig-html {
  border: 0; width: 100%; height: 130px; display: block;
  background: transparent; margin-top: 4px;
}

/* ---- signature marquee — every signatory rolls across the sign page ---- */
.sig-marquee {
  display: none; overflow: hidden;
  border-bottom: 3px double var(--line-gold);
  background: radial-gradient(ellipse 120% 100% at 50% 0%, var(--night-panel) 0%, var(--night) 100%);
  padding: 12px 0 14px;
}
.sig-marquee.live { display: block; }
.marquee-track { display: flex; width: max-content; animation: marquee-roll 40s linear infinite; }
.marquee-group { display: flex; align-items: center; }
.marquee-sig { display: inline-flex; align-items: center; white-space: nowrap; line-height: 1.35; }
.marquee-sig .marquee-kind { font-size: 13px; margin-right: 10px; }
.marquee-sig .marquee-name { font-size: 20px; }
.marquee-sig .marquee-name.sig-font-script { font-size: 26px; }
.marquee-sig .marquee-name.sig-font-mono,
.marquee-sig .marquee-name.sig-font-typewriter { font-size: 16px; }
/* each item carries its own trailing star, so the two groups tile seamlessly */
.marquee-sig::after {
  content: "★"; color: var(--gold); font-size: 10px; margin: 0 30px;
}
.sig-marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee-roll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .sig-marquee { overflow-x: auto; }
}

/* ---- prose pages (sign / about) ---- */
/* padding-block only: the shorthand was zeroing .container's 24px side padding
   (same specificity, later in the file), leaving no page margins on phones */
.prose { padding-top: 44px; padding-bottom: 90px; }
.prose h1 {
  font-family: var(--display); font-weight: 400; font-size: clamp(34px, 4.6vw, 46px);
  margin: 26px 0 14px; color: var(--ink); line-height: 1.15;
}
.prose h2 {
  font-family: var(--display); font-weight: 400; font-size: 24px; margin: 52px 0 14px;
  color: var(--ink);
}
.prose h2::before { content: "★ "; color: var(--gold); font-size: 15px; vertical-align: 3px; margin-right: 4px; }
.prose p, .prose li { color: var(--ink); margin: 13px 0; max-width: 70ch; overflow-wrap: break-word; }
.prose ul, .prose ol { padding-left: 26px; }
.prose code {
  font-family: var(--mono); font-size: 14px; background: rgba(27, 42, 74, 0.06);
  border: 1px solid var(--line-soft); border-radius: 2px; padding: 1px 6px; color: var(--ink);
  /* long URLs in inline code must break, not push the page wide on phones */
  overflow-wrap: anywhere;
}
.prose pre {
  background: var(--night); border: 1px solid var(--line); border-radius: 2px;
  outline: 3px double var(--line-gold); outline-offset: 4px;
  padding: 20px 22px; overflow-x: auto; margin: 26px 0; line-height: 1.55;
  /* width:0 + min-width:100% zeroes the pre's intrinsic width so its longest
     line scrolls inside instead of propagating up and widening the page */
  width: 0; min-width: 100%;
}
.prose pre code { background: none; border: none; padding: 0; color: #e8dfc8; font-size: 13.5px; }
.prose .note { font-size: 15.5px; color: var(--ink-soft); font-style: italic; }

/* ---- signing form ---- */
.sign-panel {
  border: 1px solid var(--line); background: var(--paper-bright);
  outline: 3px double var(--line); outline-offset: 6px;
  padding: clamp(24px, 4vw, 42px); margin: 32px 0 18px;
  box-shadow: 0 18px 44px rgba(27, 42, 74, 0.1);
}
.sign-panel .field { margin: 16px 0; }
.sign-panel label {
  display: block; font-family: var(--serif); font-size: 11.5px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--ink-soft); margin-bottom: 6px;
}
.sign-panel input[type="text"], .sign-panel input[type="url"], .sign-panel input[type="email"],
.sign-panel textarea, .sign-panel select {
  width: 100%; background: #fdfaf1; border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink); font-family: var(--serif); font-size: 16px; padding: 11px 13px;
}
.sign-panel textarea { min-height: 72px; resize: vertical; }
.sign-panel input:focus, .sign-panel textarea:focus, .sign-panel select:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 1px 0 var(--gold);
}
.sign-panel .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sign-panel .kind-toggle { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.sign-panel .kind-toggle label {
  display: flex; align-items: center; gap: 7px; text-transform: none;
  font-family: var(--serif); font-size: 16px; letter-spacing: 0; color: var(--ink); margin: 0; cursor: pointer;
}
.sign-panel input[type="color"] { width: 100%; height: 42px; background: #fdfaf1; border: 1px solid var(--line); border-radius: 2px; padding: 3px; cursor: pointer; }
.sign-panel details { margin: 16px 0; }
.sign-panel summary { cursor: pointer; color: var(--ink-soft); font-family: var(--serif); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; }
.sign-panel button[type="submit"] { cursor: pointer; margin-top: 12px; }
.sign-panel button[disabled] { opacity: 0.5; cursor: wait; }

/* The "I am" toggle forks the panel: agents get the machine-readable trail,
   humans get the form. sign.js mirrors this; :has() covers the no-JS case. */
.sign-panel .agent-path { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 6px; }
.sign-panel .agent-path ol { padding-left: 24px; }
.sign-panel .agent-path li { margin: 10px 0; }
.sign-panel:has(.kind-toggle input[value="agent"]:checked) #sign-form { display: none; }
.sign-panel:has(.kind-toggle input[value="human"]:checked) .agent-path { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* preview renders on night so ink reads as it will appear on the wall */
#sign-preview {
  border: 1px solid var(--line-gold); border-radius: 2px;
  padding: 22px; margin-top: 20px;
  background: radial-gradient(ellipse 120% 100% at 50% 0%, var(--night-panel) 0%, var(--night) 100%);
}
#sign-preview .preview-label {
  font-family: var(--serif); font-size: 10px; letter-spacing: 0.32em;
  text-transform: uppercase; color: rgba(242, 234, 214, 0.5);
}

.sign-status { margin-top: 14px; font-size: 16px; min-height: 24px; }
.sign-status.success { color: var(--live); font-size: 18px; }
.sign-status.error { color: var(--crimson); }

/* ---- the eagle — American spirit in terminal glyphs ---- */
.eagle-band {
  border-top: 3px double var(--line-gold);
  background: radial-gradient(ellipse 80% 100% at 50% 45%, #16264c 0%, var(--night) 80%);
  padding: clamp(36px, 6vw, 72px) 24px 46px;
  text-align: center;
  overflow: hidden;
}
/* the band is the homepage's final section — it flows straight into the footer */
.eagle-band ~ footer { border-top: none; }
.eagle-band .kicker { color: var(--gold-bright); margin-bottom: 8px; }
.eagle-band .eagle-caption {
  font-family: var(--serif); font-style: italic; font-size: clamp(15px, 2vw, 19px);
  color: rgba(242, 234, 214, 0.75); margin-top: 22px;
}
pre.eagle {
  display: inline-block;
  font-family: var(--mono);
  /* 200 columns x 0.6em advance = 120em wide — size type so the scene always fits */
  font-size: calc(min(100vw - 48px, 1180px) / 120);
  line-height: 1;
  margin-top: 26px;
  text-align: left;
  user-select: none;
  color: rgba(90, 130, 190, 0.35);
}
pre.eagle .b { color: #5e9be0; text-shadow: 0 0 8px rgba(94, 155, 224, 0.55); }
pre.eagle .g { color: #58c47c; text-shadow: 0 0 8px rgba(88, 196, 124, 0.45); }
pre.eagle .w { color: #eef3fb; text-shadow: 0 0 10px rgba(238, 243, 251, 0.65); }
pre.eagle .y { color: #e0aa42; text-shadow: 0 0 9px rgba(224, 170, 66, 0.6); }

/* ---- intro veil — the eagle flies, then the curtain lifts ---- */
.intro-veil {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: clamp(14px, 2.5vh, 26px);
  padding: 24px;
  background: radial-gradient(ellipse 80% 100% at 50% 45%, #16264c 0%, var(--night) 80%);
  border-bottom: 3px double var(--line-gold);
  transform: translateY(0);
  transition: transform 0.7s cubic-bezier(0.7, 0, 0.3, 1);
  will-change: transform;
  cursor: pointer;
}
.intro-veil.lift { transform: translateY(-101%); }
.intro-veil .kicker { color: var(--gold-bright); }
.intro-veil pre.intro-eagle {
  margin-top: 0;
  /* fit 120em of width AND 65 rows of height, leaving room for the wordmark */
  font-size: min(calc((100vw - 40px) / 120), calc((100vh - 250px) / 65), 11.7px);
  font-size: min(calc((100vw - 40px) / 120), calc((100dvh - 250px) / 65), 11.7px);
}
.intro-veil .intro-mark {
  font-family: var(--display); font-size: clamp(20px, 3.4vw, 34px);
  color: #f2ead6; letter-spacing: 0.04em;
}
.intro-veil .intro-hint {
  position: absolute; bottom: 22px; left: 0; right: 0;
  text-align: center;
  font-family: var(--serif); font-size: 13px;
  letter-spacing: 0.34em; text-indent: 0.34em; text-transform: uppercase;
  color: rgba(242, 234, 214, 0.85);
}
.intro-veil .intro-hint .chevron {
  display: block; margin-top: 4px; font-size: 15px;
  color: var(--gold-bright);
  animation: hint-nudge 1.4s ease-in-out infinite;
}
@keyframes hint-nudge {
  0%, 100% { transform: translateY(0); opacity: 0.9; }
  50% { transform: translateY(5px); opacity: 0.5; }
}

/* ---- subscribe strip ---- */
.subscribe-strip {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 20px; margin: 0 auto 96px; max-width: 860px;
  border: 1px solid var(--line); border-top: 3px double var(--line-gold);
  background: var(--paper-bright);
  padding: clamp(22px, 4vw, 36px);
  box-shadow: 0 14px 36px rgba(27, 42, 74, 0.08);
}
.subscribe-copy { flex: 1 1 300px; }
.subscribe-title {
  font-family: var(--display); font-size: 19px; color: var(--ink);
}
.subscribe-sub { font-size: 14.5px; font-style: italic; color: var(--ink-soft); margin-top: 6px; }
.subscribe-form { flex: 1 1 320px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; position: relative; }
.subscribe-form input[type="email"] {
  flex: 1 1 180px; min-width: 0; background: #fdfaf1; border: 1px solid var(--line); border-radius: 2px;
  /* 16px minimum: below that iOS Safari zooms the page on focus */
  color: var(--ink); font-family: var(--serif); font-size: 16px; padding: 12px 14px;
}
.subscribe-form input[type="email"]:focus { outline: none; border-color: var(--gold); box-shadow: 0 1px 0 var(--gold); }
.subscribe-form .btn { padding: 12px 24px; cursor: pointer; }
.subscribe-form .subscribe-status { flex-basis: 100%; margin-top: 2px; min-height: 0; font-size: 14px; }

/* ---- footer — night ---- */
footer {
  border-top: 3px double var(--line-gold);
  padding: 40px 28px 48px;
  text-align: center; font-family: var(--serif); font-size: 12.5px;
  letter-spacing: 0.14em; color: rgba(242, 234, 214, 0.7);
  background: var(--night);
}
footer p { overflow-wrap: anywhere; }
footer .fleuron { color: var(--gold-bright); font-size: 16px; margin-bottom: 14px; letter-spacing: 0.6em; text-indent: 0.6em; }
footer a { color: rgba(242, 234, 214, 0.85); text-decoration: underline; text-decoration-color: rgba(201, 165, 78, 0.4); }
footer a:hover { color: var(--gold-bright); }
.sign-panel .field-note { font-size: 12.5px; color: var(--muted); margin-top: 5px; font-style: italic; }

/* ---- post-sign share panel ---- */
.share-panel {
  margin-top: 22px; padding: 22px 24px;
  border: 1px solid rgba(62, 107, 79, 0.4); border-radius: 2px;
  background: rgba(62, 107, 79, 0.06);
}
.share-title {
  font-family: var(--display); font-size: 17px;
  color: var(--live); margin-bottom: 12px;
}
.share-text {
  font-family: var(--serif); font-size: 16.5px; color: var(--ink);
  border-left: 2px solid rgba(62, 107, 79, 0.45); padding: 6px 14px; margin-bottom: 16px;
}
.share-row { display: flex; gap: 12px; flex-wrap: wrap; }
.share-row .btn { padding: 11px 22px; font-size: 13px; cursor: pointer; }

/* ---- partners (about page) ---- */
.partner-row { display: flex; flex-wrap: wrap; gap: 14px; margin: 16px 0 8px; }
.partner {
  display: inline-block; padding: 14px 32px;
  font-family: var(--serif); font-size: 14px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink); border: 1px solid var(--line); border-radius: 2px; background: var(--paper-bright);
  transition: all 0.2s ease;
}
.partner:hover {
  color: var(--crimson); border-color: var(--ink); text-decoration: none;
  box-shadow: 0 4px 16px rgba(27, 42, 74, 0.12);
}
.partner-logo { display: inline-flex; align-items: center; padding: 10px 24px; }
.partner-logo img { height: 26px; width: auto; display: block; }

/* the full nav row (brand + status + four links) needs ~1000px — stack it sooner */
@media (max-width: 1000px) {
  nav { flex-direction: column; gap: 10px; padding: 14px 12px; }
  nav .brand { text-align: center; }
  nav .links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
  nav .links a { margin: 0; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  nav .brand { font-size: 12px; letter-spacing: 0.16em; }
  nav .links a { font-size: 11.5px; letter-spacing: 0.14em; }
  header.hero { padding: 56px 18px 36px; }
  .hero .kicker { font-size: 11px; letter-spacing: 0.3em; text-indent: 0.3em; }
  .hero .count { letter-spacing: 0.2em; }
  .wall-stage { height: 70vh; height: 70dvh; min-height: 480px; }
  .parchment { padding: 34px 22px; outline-offset: 5px; }
  .parchment p { font-size: 17px; }
  .parchment blockquote + p::first-letter { font-size: 3.6em; }
  .sign-panel .row { grid-template-columns: 1fr; }
  .prose ul, .prose ol { padding-left: 20px; }
  .sign-panel .agent-path ol { padding-left: 20px; }
  .sign-panel .agent-path ul { padding-left: 14px; }
  footer { letter-spacing: 0.08em; }
}

@media (max-width: 400px) {
  .hero h1 { font-size: clamp(32px, 12.5vw, 44px); }
  .btn { padding: 13px 20px; letter-spacing: 0.16em; }
  .parchment { padding: 28px 16px; }
}
