/* public/aether.css -- Aether's design system. Every page links this first and keeps page-specific rules after it.

   S148: direction A, "The Deliberation Room", chosen by Kai on 2026-10-20 from the three rendered directions
   (Aether's design-directions run dd-1792382560779-cy3oxb; the choice is recorded on the venture with
   origin `contract`). The critic recommended A on measured facts: zero tells (no monospace headings, no dark
   shell with a saturated indigo accent), every text colour above AA. The previous system -- a dark shell,
   IBM Plex Mono headings and an electric-indigo accent -- was exactly the developer-tool signature John read
   as "built by engineers".

   Colour (color_system): background #F7F5F1 warm off-white, the colour of heavy paper stock; surface #FFFFFF
   cards that lift off the paper by contrast, not by shadow; primary / text #1C1A17 ink with a warm undertone,
   never a lightened gray for body copy; secondary #6B6459 warm stone for metadata and provenance lines; accent
   #8B1A1A institutional crimson -- a dissent flag, a verdict stamp -- used at full saturation on ONE element
   per view, the primary action. There is deliberately no positive-signal colour: a Proceed is set in ink.
   Validate and Pivot keep a dark amber (#8A5A00, 5.4:1) because the page must still say "caution" without
   colour alone; a completed step keeps a muted green (#3D6B2E). Measured: every text token >= 4.5:1 on paper,
   card and elevated; faint/gray >= 3:1 and only ever on non-essential metadata.
   Type (typography): Playfair Display headings (36-48px for verdicts and stage titles, tight tracking), Source
   Serif 4 body at 16px / 1.7 for sustained reading, metadata at 12px caps-spaced 0.08em in stone -- the
   footnote register of a case document. Weight is reserved for verdicts and the primary action. Mono survives
   only for `code`.
   Layout (layout_notes): low density at the page, high density inside a structured component; 80px outer
   margins on desktop; hairline rules in stone at 30%; no rounded corners on primary containers (0 on verdict
   frames and panels, 2px on secondary elements); a 3px crimson left rule marks the active verdict; rhythm in
   multiples of 24 and 48. The old token names (--indigo, --cyan, --emerald, --rose, --violet) are kept as
   aliases so every existing page rule lands on the new palette without an edit. */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600;700&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,500;0,8..60,600;1,8..60,400&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --bg-deep:#F7F5F1; --bg-surface:#FFFFFF; --bg-elevated:#EFEBE4; --bg-card:#FFFFFF;
  --border-subtle:rgba(107,100,89,0.30); --border-strong:rgba(28,26,23,0.35);
  --text-primary:#1C1A17; --text-secondary:#3F3A33; --text-muted:#6B6459; --text-faint:#8A8277;
  --ink:#1C1A17; --stone:#6B6459;
  --crimson:#8B1A1A; --crimson-dim:rgba(139,26,26,0.08); --crimson-strong:#6E1414;
  --indigo:var(--crimson); --indigo-dim:var(--crimson-dim); --indigo-strong:var(--crimson-strong);
  --amber:#8A5A00; --amber-dim:rgba(138,90,0,0.10);
  --red:#8B1A1A; --red-dim:rgba(139,26,26,0.08);
  --green:#3D6B2E; --green-dim:rgba(61,107,46,0.10);
  --gray:#8A8277;
  /* the Hub's older token names, mapped onto the system so every existing rule lands on the new palette */
  --cyan:var(--crimson); --cyan-dim:var(--crimson-dim);
  --emerald:var(--green); --emerald-dim:var(--green-dim);
  --rose:var(--red); --rose-dim:var(--red-dim);
  --violet:var(--stone);
  --accent-cyan:var(--crimson); --accent-cyan-dim:var(--crimson-dim); --accent-emerald:var(--green); --accent-emerald-dim:var(--green-dim);
  --accent-amber:var(--amber); --accent-amber-dim:var(--amber-dim); --accent-rose:var(--red); --accent-rose-dim:var(--red-dim); --accent-violet:var(--stone);
  --radius-sm:2px; --radius-md:2px; --radius-lg:0;
  --display:'Playfair Display',Georgia,'Times New Roman',serif;
  --serif:'Source Serif 4',Georgia,'Times New Roman',serif;
  --sans:var(--serif);
  --mono:'IBM Plex Mono',ui-monospace,Menlo,Consolas,monospace;
  --fs-meta:12px; --fs-body:16px; --fs-h3:20px; --fs-h2:24px; --fs-h1:32px; --fs-verdict:48px;
  --rhythm:24px; --section:32px; --stage:48px; --verdict-air:64px; --dense:16px;
  --measure:66ch; --grid-max:1440px; --gutter:24px; --margin:80px;
}
html { background:var(--bg-deep); }
body { background:var(--bg-deep); color:var(--text-primary); font-family:var(--serif); font-size:var(--fs-body); line-height:1.7; -webkit-font-smoothing:antialiased; }
h1, h2, h3, .ae-h1, .ae-h2, .ae-h3 { font-family:var(--display); font-weight:600; letter-spacing:-.02em; color:var(--text-primary); line-height:1.2; }
h1, .ae-h1 { font-size:var(--fs-h1); } h2, .ae-h2 { font-size:var(--fs-h2); } h3, .ae-h3 { font-size:var(--fs-h3); }
.ae-meta { font-family:var(--serif); font-size:var(--fs-meta); letter-spacing:.08em; text-transform:uppercase; color:var(--text-muted); }
a { color:var(--crimson); }
code { font-family:var(--mono); font-size:.88em; }
:focus-visible { outline:2px solid var(--crimson); outline-offset:2px; }

/* grid: 12 columns, 8 + 4 */
.ae-page { max-width:var(--grid-max); margin:0 auto; padding:var(--section) var(--margin) 96px; }
.ae-grid { display:grid; grid-template-columns:repeat(12, minmax(0,1fr)); gap:var(--gutter); align-items:start; }
.ae-main { grid-column:span 8; min-width:0; }
.ae-side { grid-column:span 4; min-width:0; position:sticky; top:52px; display:flex; flex-direction:column; gap:var(--rhythm); }
@media (max-width:1100px) { .ae-main, .ae-side { grid-column:span 12; } .ae-side { position:static; } }
@media (max-width:720px) { .ae-page { padding:var(--rhythm) 16px 72px; } }

/* surfaces and rhythm: a card lifts off the paper by contrast, not by shadow; no rounded primary containers */
.ae-card { background:var(--bg-surface); border:1px solid var(--border-subtle); border-radius:var(--radius-lg); padding:var(--rhythm); }
.ae-stack > * + * { margin-top:var(--rhythm); }
.ae-sections > * + * { margin-top:var(--section); }
.ae-dense > * + * { margin-top:var(--dense); }

/* buttons: ONE primary per view (interaction_patterns.primary_action) -- the only element at full crimson */
.ae-btn { font-family:var(--serif); font-size:15px; font-weight:600; padding:10px 16px; border-radius:var(--radius-md); border:1px solid var(--border-strong); background:transparent; color:var(--text-primary); cursor:pointer; text-decoration:none; display:inline-flex; align-items:center; gap:8px; line-height:1.2; }
.ae-btn:hover { border-color:var(--crimson); }
.ae-btn.primary { background:var(--crimson); border-color:var(--crimson); color:#fff; font-size:14px; letter-spacing:.08em; text-transform:uppercase; padding:13px 22px; }
.ae-btn.primary:hover { background:var(--crimson-strong); }
.ae-btn.ghost { border-color:var(--border-subtle); color:var(--text-secondary); font-weight:500; }
.ae-btn.muted { border-color:transparent; color:var(--text-muted); font-weight:500; }
.ae-btn.muted:hover { border-color:var(--border-subtle); color:var(--text-primary); }
.ae-btn:disabled { opacity:.5; cursor:default; }
.ae-btn.danger { color:var(--red); border-color:transparent; } .ae-btn.danger:hover { border-color:var(--red); }

/* badges: verdict colours only ever mean verdicts; icon + text, never colour alone (accessibility) */
.ae-badge { display:inline-flex; align-items:center; gap:6px; font-family:var(--serif); font-size:var(--fs-meta); letter-spacing:.06em; text-transform:uppercase; padding:3px 10px; border-radius:var(--radius-sm); border:1px solid var(--border-subtle); color:var(--text-secondary); white-space:nowrap; }
.ae-badge.v-Proceed { color:var(--ink); border-color:var(--ink); background:var(--bg-surface); }
.ae-badge.v-Validate, .ae-badge.v-Pivot { color:var(--amber); border-color:rgba(138,90,0,.45); background:var(--amber-dim); }
.ae-badge.v-Stop { color:var(--red); border-color:rgba(139,26,26,.45); background:var(--red-dim); }
.ae-badge.v-none { color:var(--text-muted); }
.ae-tag { display:inline-flex; align-items:center; gap:6px; font-family:var(--serif); font-size:var(--fs-meta); letter-spacing:.06em; text-transform:uppercase; color:var(--text-secondary); }
.ae-tag .dot { width:6px; height:6px; border-radius:50%; background:var(--tc,var(--gray)); }

/* VerdictBlock: full-width, 48px, a 3px rule in the verdict colour at the left margin -- the margin annotation of a reviewed document -- BEFORE any supporting content */
.ae-verdict { position:relative; padding:var(--verdict-air) var(--rhythm); border-radius:0; background:var(--bg-surface); border:1px solid var(--border-subtle); overflow:hidden; }
.ae-verdict::before { content:''; position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--vc,var(--gray)); }
.ae-verdict.v-Proceed { --vc:var(--ink); } .ae-verdict.v-Validate, .ae-verdict.v-Pivot { --vc:var(--amber); } .ae-verdict.v-Stop { --vc:var(--crimson); } .ae-verdict.v-none { --vc:var(--gray); }
.ae-verdict .word { font-family:var(--display); font-size:var(--fs-verdict); font-weight:700; letter-spacing:-.02em; line-height:1; color:var(--vc,var(--text-primary)); display:flex; align-items:center; gap:18px; }
.ae-verdict .word .icon { font-size:40px; line-height:1; }
.ae-verdict .label { font-size:18px; color:var(--text-primary); margin-top:18px; max-width:var(--measure); line-height:1.5; }
.ae-verdict .sub { font-family:var(--serif); font-size:var(--fs-meta); letter-spacing:.08em; text-transform:uppercase; color:var(--text-muted); margin-top:14px; }
@media (max-width:720px) { .ae-verdict { padding:40px 18px; } .ae-verdict .word { font-size:36px; } }

/* tabs */
.ae-tabs { display:flex; gap:4px; border-bottom:1px solid var(--border-subtle); margin-bottom:var(--rhythm); overflow-x:auto; }
.ae-tab { font-family:var(--serif); font-size:14px; padding:10px 14px; border:0; background:transparent; color:var(--text-muted); cursor:pointer; border-bottom:2px solid transparent; margin-bottom:-1px; white-space:nowrap; }
.ae-tab[aria-selected="true"] { color:var(--text-primary); border-bottom-color:var(--crimson); }
.ae-tab:hover { color:var(--text-primary); }
.ae-tab .n { color:var(--text-faint); margin-left:6px; }
.ae-pane[hidden] { display:none; }

/* weight bar: none / weak / medium / strong, set in ink */
.ae-weight { display:inline-grid; grid-template-columns:repeat(4, 14px); gap:3px; vertical-align:middle; }
.ae-weight i { height:6px; border-radius:1px; background:var(--border-subtle); }
.ae-weight[data-w="weak"] i:nth-child(-n+1), .ae-weight[data-w="medium"] i:nth-child(-n+2), .ae-weight[data-w="strong"] i:nth-child(-n+4) { background:var(--ink); }
.ae-weight[data-w="medium"] i:nth-child(-n+3) { background:var(--ink); }

/* banners: amber = a caution that needs attention, never decoration */
.ae-banner { display:flex; gap:12px; align-items:flex-start; padding:14px 16px; border-radius:var(--radius-md); border:1px solid rgba(138,90,0,.45); border-left-width:3px; background:var(--amber-dim); color:var(--text-primary); }
.ae-banner .icon { color:var(--amber); font-size:18px; line-height:1.2; }
.ae-banner.err { border-color:rgba(139,26,26,.45); background:var(--red-dim); } .ae-banner.err .icon { color:var(--red); }
.ae-banner.info { border-color:var(--border-subtle); background:var(--bg-elevated); } .ae-banner.info .icon { color:var(--text-muted); }

/* forms */
.ae-in { font-family:var(--serif); font-size:var(--fs-body); background:var(--bg-surface); color:var(--text-primary); border:1px solid var(--border-strong); border-radius:var(--radius-sm); padding:10px 12px; width:100%; outline:none; }
.ae-in:focus { border-color:var(--crimson); }
.ae-label { display:block; font-size:var(--fs-meta); letter-spacing:.08em; text-transform:uppercase; color:var(--text-muted); margin-bottom:6px; }

/* toast: bottom-right, 3 seconds, never a modal */
#ae-toast { position:fixed; right:24px; bottom:24px; z-index:9999; display:flex; flex-direction:column; gap:8px; pointer-events:none; }
.ae-toast { background:var(--bg-surface); border:1px solid var(--border-strong); color:var(--text-primary); border-radius:var(--radius-md); padding:12px 16px; font-size:15px; box-shadow:0 12px 32px rgba(28,26,23,.18); opacity:0; transform:translateY(6px); transition:opacity .15s, transform .15s; max-width:420px; }
.ae-toast.show { opacity:1; transform:none; }
.ae-toast.err { border-color:var(--red); }
.ae-toast.ok { border-color:var(--green); }

/* founder-owned text: the founder's words set in italic on a faint crimson wash wherever they appear */
.ae-founder-words { font-family:var(--serif); font-style:italic; color:var(--text-primary); background:var(--crimson-dim); padding:2px 6px; border-radius:var(--radius-sm); }

.ae-sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
