/* mitenmehta.com — Direction C "Modern AI Lab" shell CSS
   Tokens: W3C sheet ~/workspace/m10-redesign/tokens/design-tokens.json,
   built vars tools/sd-out/vars.css (copied below; do not hand-edit values).
   Spec: M10-REDESIGN-SPEC-MODERN-LAB-20261115.md §2 + Amendments 1-4.
   A11y cures built in: skip link, #8A8272 field borders, labelled navs,
   aria-current, aria-live on Desk answers (see shell.js / templates). */
:root {
  --color-card: #ffffff;
  --color-field-border: #8a8272;
  --color-gold: #8a6d1d;
  --color-gold-bright: #c9a227;
  --color-hairline: #e5e0d2;
  --color-ink: #1c1a17;
  --color-muted: #5c5546;
  --color-navy: #14213a;
  --color-paper: #faf9f6;
  --font-family-sans: Inter, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-size-base: 17px;
  --radius-card: 16px;
  --radius-input: 12px;
  --radius-panel: 20px;
  --radius-pill: 999px;
  --shadow-card: 0 1px 3px rgba(28, 26, 23, .06), 0 8px 24px rgba(28, 26, 23, .05);
  --shadow-panel: 0 2px 6px rgba(28, 26, 23, .08), 0 16px 40px rgba(28, 26, 23, .08);
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/Inter-400.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/fonts/Inter-600.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 800; font-display: swap;
  src: url("/assets/fonts/Inter-800.woff2") format("woff2");
}
/* NOTE: Inter 500 woff2 is NOT shipped — no 500 source file exists in the
   fleet (only 400/600/800 TTFs). CSS uses 400/600/800 only; font-weight 500
   never appears. See SCAFFOLD-RECORD-20261125.md. */
* { box-sizing: border-box; }
html { font-size: var(--font-size-base); }
body {
  margin: 0; background: var(--color-paper); color: var(--color-ink);
  font-family: var(--font-family-sans); line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; }
h1 { font-size: 2.2rem; font-weight: 800; margin: 0 0 16px; }
h2 { font-size: 1.5rem; font-weight: 800; margin: 48px 0 12px; }
h3 { font-size: 1.15rem; font-weight: 600; margin: 32px 0 8px; }
p { margin: 0 0 16px; }
a { color: var(--color-gold); text-decoration: underline; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
.lede { font-size: 1.2rem; color: var(--color-muted); }
.meta { color: var(--color-muted); font-size: 0.9rem; }
.eyebrow {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--color-gold); margin: 0 0 8px;
}
img { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--color-gold); outline-offset: 2px; border-radius: 4px; }

/* Skip link (F-A1 cure) */
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 200;
  background: var(--color-ink); color: #fff; padding: 8px 16px;
  border-radius: var(--radius-pill); text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; color: #fff; }

/* Top bar (Amendment 4 clause K) */
.topbar {
  position: sticky; top: 0; z-index: 100; background: var(--color-paper);
  border-bottom: 1px solid var(--color-hairline);
  box-shadow: 0 1px 3px rgba(28, 26, 23, .06);
}
.topbar-inner {
  max-width: 72rem; margin: 0 auto; padding: 0 20px; min-height: 64px;
  display: flex; align-items: center; gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 10px; flex: none;
  color: var(--color-ink); text-decoration: none; font-weight: 600; font-size: 1.05rem;
}
.brand img { width: 32px; height: 32px; border-radius: 8px; display: block; }
.areas-nav { display: flex; gap: 3px; margin: 0 auto; flex-wrap: wrap; justify-content: center; }
.areas-nav a {
  color: var(--color-ink); text-decoration: none; font-weight: 600;
  padding: 8px 10px; border-radius: var(--radius-pill); font-size: 0.92rem;
}
.areas-nav a:hover { background: #fff; }
.areas-nav a[aria-current="page"] { background: var(--color-ink); color: #fff; }
.topbar-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; flex: none; }
.search-btn, .account-btn, .menu-btn {
  background: var(--color-card); color: var(--color-ink);
  border: 1px solid var(--color-hairline); border-radius: var(--radius-pill);
  padding: 8px 12px; font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer;
}
.search-btn kbd {
  font: inherit; font-size: 0.8rem; color: var(--color-muted);
  border: 1px solid var(--color-hairline); border-radius: 4px; padding: 0 4px; margin-left: 4px;
}
.menu-btn { display: none; }

/* Buttons (§3.2) */
.btn, button.btn {
  display: inline-block; background: var(--color-ink); color: #fff;
  border: 1px solid var(--color-ink); border-radius: var(--radius-pill);
  padding: 10px 20px; font: inherit; font-weight: 600; cursor: pointer;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-gold, button.btn-gold {
  background: var(--color-gold); border-color: var(--color-gold); color: #fff;
}
.btn-quiet, button.btn-quiet {
  background: transparent; color: var(--color-ink); border-color: var(--color-ink);
}
.btn-sm { padding: 6px 14px; font-size: 0.9rem; }
.ask-pill { white-space: nowrap; }

/* Shell grid: rail + canvas */
.shell {
  max-width: 72rem; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px;
  align-items: start;
}
.rail {
  position: sticky; top: 88px; padding: 32px 0;
  max-height: calc(100vh - 88px); overflow-y: auto;
}
.rail h2 {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--color-gold); margin: 0 0 12px;
}
.rail ul { list-style: none; margin: 0 0 24px; padding: 0; }
.rail li { margin: 0; }
.rail a {
  display: block; color: var(--color-ink); text-decoration: none;
  padding: 7px 12px; border-radius: 10px; font-size: 0.95rem;
}
.rail a:hover { background: #fff; }
.rail a[aria-current="page"] { background: var(--color-ink); color: #fff; font-weight: 600; }
.rail .rail-count { color: var(--color-muted); font-size: 0.85rem; margin-left: 4px; }
.rail a[aria-current="page"] .rail-count { color: #ddd; }
.rail details { margin-bottom: 16px; }
.rail summary { cursor: pointer; font-weight: 600; padding: 7px 12px; font-size: 0.95rem; }
.rail details ul { margin: 4px 0 8px 12px; }
.rail-foot {
  border-top: 1px solid var(--color-hairline); padding-top: 16px; margin-top: 8px;
  font-size: 0.9rem; color: var(--color-muted);
}
.rail-foot .account { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.rail-foot .avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: var(--color-navy); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.9rem;
}
.rail-foot ul { list-style: none; margin: 0; padding: 0; }
.rail-foot li { padding: 4px 0; }
.rail-foot a { color: var(--color-ink); text-decoration: none; }
.rail-foot a:hover { text-decoration: underline; }
.rail-foot .pending { color: var(--color-muted); }

.canvas { padding: 32px 0 64px; min-width: 0; max-width: 46rem; }
.canvas > :first-child { margin-top: 0; }

/* Cards / panels (§2 geometry) */
.card {
  background: var(--color-card); border-radius: var(--radius-card);
  box-shadow: var(--shadow-card); padding: 24px; margin: 0 0 24px;
}
.panel {
  background: var(--color-card); border-radius: var(--radius-panel);
  box-shadow: var(--shadow-panel); padding: 32px; margin: 0 0 32px;
}
.band-navy {
  background: var(--color-navy); color: #fff; border-radius: var(--radius-panel);
  padding: 32px; margin: 0 0 32px;
}
.band-navy h2, .band-navy h3 { color: #fff; }
.band-navy p, .band-navy .meta { color: #e8e4da; }
.band-navy a { color: var(--color-gold-bright); }
.band-navy .eyebrow { color: var(--color-gold-bright); }

/* Dashboard hero (clause L) */
.dash-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px;
  align-items: start; margin-bottom: 32px;
}
.dash-hero figure { margin: 0; }
.dash-hero figure img {
  width: 100%; height: auto; border-radius: var(--radius-panel);
  box-shadow: var(--shadow-panel); display: block;
}
.dash-hero figcaption { font-size: 0.85rem; color: var(--color-muted); margin-top: 8px; }
.status-strip {
  border-top: 1px solid var(--color-hairline); border-bottom: 1px solid var(--color-hairline);
  padding: 12px 0; margin: 0 0 32px; color: var(--color-muted); font-size: 0.9rem;
}
.status-strip strong { color: var(--color-ink); }

/* Proof row (Amendment 3 — the $157M+ aggregate, stated once) */
.proof { margin: 0 0 32px; }
.proof .aggregate {
  font-size: 2.2rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1;
}
.proof .aggregate span { color: var(--color-gold); }

/* Pillar cards (§3.6) */
.pillar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin: 0 0 32px; }
.pillar-card {
  background: var(--color-card); border-radius: var(--radius-card);
  box-shadow: var(--shadow-card); padding: 20px;
}
.pillar-card h3 { margin-top: 0; }
.pillar-card h3 a { color: var(--color-ink); text-decoration: none; }
.pillar-card h3 a:hover { text-decoration: underline; }
.pillar-card p { color: var(--color-muted); margin-bottom: 12px; }

/* Event cards (§3.8 — role text muted, never gold) */
.event {
  background: var(--color-card); border-radius: var(--radius-card);
  box-shadow: var(--shadow-card); padding: 24px; margin: 0 0 16px;
}
.event h3 { margin-top: 0; }
.event .role { color: var(--color-muted); font-weight: 600; }

/* Meet Sophie card (Amendment 1 A.4) */
.meet-sophie .sophie-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.meet-sophie .sophie-head img {
  width: 40px; height: 40px; border-radius: 50%; display: block;
  border: 1px solid var(--color-hairline);
}
.meet-sophie .sophie-head .name { font-weight: 800; font-size: 1.1rem; }
.meet-sophie .sophie-head .role { color: var(--color-muted); font-size: 0.9rem; }
.meet-sophie ul { margin: 0 0 16px; padding-left: 20px; }
.meet-sophie .governed { color: var(--color-muted); font-size: 0.9rem; }

/* Forms (§3.9 — field border #8A8272, F-A2 cure) */
form { margin: 0 0 24px; }
label { display: block; font-weight: 600; margin: 16px 0 6px; }
input[type="text"], input[type="email"], input[type="search"], select, textarea {
  display: block; width: 100%; max-width: 32rem;
  font: inherit; color: var(--color-ink); background: var(--color-card);
  border: 1px solid var(--color-field-border); border-radius: var(--radius-input);
  padding: 10px 12px;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--color-gold); outline-offset: 2px; border-color: var(--color-gold);
}
input::placeholder, textarea::placeholder { color: var(--color-muted); }
button[type="submit"] { margin-top: 16px; }

/* Subscribe bar (§3.10) */
.subscribe-bar {
  background: var(--color-card); border-radius: var(--radius-panel);
  box-shadow: var(--shadow-card); padding: 24px; margin: 48px 0 0;
}
.subscribe-bar form { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; margin: 0; }
.subscribe-bar label { margin: 0 0 6px; }
.subscribe-bar input[type="email"] { flex: 1; min-width: 220px; }
.subscribe-bar button[type="submit"] { margin: 0; }

/* Desk / Ask Sophie (clause M) */
.focus-chips, .followup-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.chip {
  background: var(--color-card); color: var(--color-ink);
  border: 1px solid var(--color-field-border); border-radius: var(--radius-pill);
  padding: 6px 14px; font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--color-ink); color: #fff; border-color: var(--color-ink); }
.desk-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.reading-pane {
  background: var(--color-card); border: 1px solid var(--color-hairline);
  border-radius: var(--radius-card); padding: 20px; margin: 0 0 24px;
}
.reading-pane h2 { font-size: 1rem; margin: 0 0 8px; }
.approval-grammar { color: var(--color-muted); font-size: 0.9rem; }
.stub-banner {
  background: var(--color-card); border: 1px solid var(--color-hairline);
  border-left: 4px solid var(--color-gold); border-radius: var(--radius-card);
  padding: 12px 16px; font-weight: 600;
}

/* Fresh-post slot (§F) */
.fresh-post figure { margin: 0 0 12px; }
.fresh-post figure img { border-radius: var(--radius-card); display: block; }
.fresh-post .fresh-date { color: var(--color-muted); font-size: 0.9rem; }

/* Slot markers — scaffold placeholders, visible by design.
   The features agent replaces each [Slot: …] with the swept copy. */
.slot {
  border: 1px dashed var(--color-field-border); border-radius: var(--radius-input);
  padding: 10px 12px; color: var(--color-muted); font-size: 0.9rem;
  background: #fffdf5; margin: 0 0 16px;
}
.slot strong { color: var(--color-ink); }

/* Footer (§3.11 — navy band) */
.site-footer { background: var(--color-navy); color: #fff; margin-top: 48px; }
.site-footer-inner { max-width: 72rem; margin: 0 auto; padding: 48px 24px; }
.site-footer a { color: #fff; }
.site-footer .meta, .site-footer p { color: #d9d4c8; }
.site-footer h2 { color: #fff; margin-top: 0; }
.site-footer .foot-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; margin-bottom: 16px; }
.site-footer .foot-brand img { width: 32px; height: 32px; border-radius: 8px; }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; margin: 16px 0; }
.site-footer nav a { text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; }
/* Consent-settings control (A2/A5 item 6): a button that reads as a footer link. */
.site-footer nav button { background: none; border: none; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: none; }
.site-footer nav button:hover { text-decoration: underline; }

/* Sophie entry (bottom-right) + dialogs */
.sophie-entry {
  position: fixed; right: 24px; bottom: 24px; z-index: 90;
  display: flex; align-items: center; gap: 10px;
  background: var(--color-card); color: var(--color-ink);
  border: 1px solid var(--color-hairline); border-radius: var(--radius-pill);
  box-shadow: var(--shadow-panel); padding: 8px 16px 8px 8px;
  font: inherit; font-weight: 600; cursor: pointer;
}
.sophie-entry img { width: 32px; height: 32px; border-radius: 50%; display: block; }
.sophie-entry small { display: block; color: var(--color-muted); font-weight: 400; font-size: 0.8rem; line-height: 1.2; }
dialog {
  border: 1px solid var(--color-hairline); border-radius: var(--radius-panel);
  box-shadow: var(--shadow-panel); padding: 32px; max-width: 32rem; width: calc(100vw - 48px);
  background: var(--color-card); color: var(--color-ink);
}
dialog::backdrop { background: rgba(28, 26, 23, .45); }
dialog h2 { margin-top: 0; }
.search-palette input[type="search"] { max-width: none; }
.search-palette ul { list-style: none; margin: 16px 0 0; padding: 0; max-height: 50vh; overflow-y: auto; }
.search-palette li a { display: block; padding: 8px 12px; border-radius: 10px; color: var(--color-ink); text-decoration: none; }
.search-palette li a:hover, .search-palette li a:focus-visible { background: var(--color-paper); }
.search-palette li a .crumb { color: var(--color-muted); font-size: 0.85rem; display: block; }
.dialog-close { margin-top: 16px; }

/* Quote */
blockquote {
  border-left: 4px solid var(--color-gold); margin: 32px 0; padding: 0 0 0 20px;
  font-size: 1.1rem;
}
blockquote .meta { font-size: 0.9rem; }

/* Tables / lists in canvas */
canvas ul, .canvas ol { padding-left: 24px; }
.canvas li { margin-bottom: 8px; }
canvas table, .canvas table { border-collapse: collapse; width: 100%; margin: 0 0 24px; }
.canvas th, .canvas td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--color-hairline); }
.canvas th { font-weight: 600; }

@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .rail {
    position: static; max-height: none; padding: 16px 0 0;
    border-bottom: 1px solid var(--color-hairline);
  }
  .rail[hidden] { display: none; }
  .menu-btn { display: inline-block; }
  .areas-nav { display: none; }
  .areas-nav.open {
    display: flex; position: absolute; top: 64px; left: 0; right: 0;
    background: var(--color-paper); border-bottom: 1px solid var(--color-hairline);
    padding: 12px 24px; flex-direction: column; align-items: stretch; z-index: 99;
  }
  .dash-hero { grid-template-columns: minmax(0, 1fr); }
  .topbar-inner { gap: 12px; padding: 0 16px; }
  .search-btn kbd { display: none; }
  .sophie-entry { right: 16px; bottom: 16px; }
  h1 { font-size: 1.9rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* FEATURES BUILD (M10, 2026-11-25) -------------------------------------- */
/* First-visit notice bar (M16 LR-0006 ruling, Chair-confirmed 2026-11-20):
   non-blocking, sits under the skip link, hidden once a choice is stored. */
.consent-bar {
  background: var(--color-card); color: var(--color-ink);
  border-bottom: 1px solid var(--color-field-border);
  padding: 12px 24px; display: flex; gap: 16px; align-items: center;
  justify-content: space-between; flex-wrap: wrap;
}
.consent-bar p { margin: 0; }
.consent-bar[hidden] { display: none; }

/* Clickwrap at each point of commitment (form submit, Desk first use,
   subscribe). Unchecked by default; native validation gates the submit. */
.clickwrap {
  display: block; margin: 12px 0; font-size: 0.9rem;
  color: var(--color-muted); flex-basis: 100%;
}
.clickwrap label { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.clickwrap input[type="checkbox"] { width: auto; margin-top: 2px; flex: none; }

/* R1-08 stage-1 fallback line under every mailto form. */
.fallback-line { color: var(--color-muted); font-size: 0.9rem; margin: 12px 0 0; }

/* Worked example (Meet Sophie card + dialog) — real run content. */
.worked-example { font-size: 0.95rem; }
.worked-example strong { color: var(--color-ink); }

/* Desk answer text — pre-wrap, as a class (was the tree's only inline
   style="white-space: pre-wrap" on #desk-answer-text; Yash's header
   assessment, Thu 2026-11-26 — clears the one blocker to dropping
   style-src 'unsafe-inline'). */
.desk-answer-text { white-space: pre-wrap; }
/* Per-answer Art. 50 marker (A2/A5 item 5): small tag under the answer. */
.desk-ai-tag { display: inline-block; border: 1px solid var(--color-field-border); border-radius: 999px; padding: 2px 10px; }
.desk-ai-tag[hidden] { display: none; }
