/* SurveyTwine — Research Weave System.
   ONE contrast rule, no !important stacks: every surface sets --fg / --fg-muted
   / --title / --surface / --border on itself; components only ever reference
   those four custom properties. Put a component inside `.on-dark` (or a node
   that already redefines the tokens, e.g. .section--night) and every child
   recolors correctly with zero extra overrides. */
@import url("https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700;800&family=Source+Serif+4:opsz,wght@8..60,400;8..60,500;8..60,600;8..60,700&family=IBM+Plex+Mono:wght@400;500;600&display=swap");

:root {
  --parchment: #F3F0E8;
  --ink: #151B2C;
  --cobalt: #435FD6;
  --magenta: #C14C8A;
  --teal: #23988E;
  --gold: #D5A137;
  --success: #3AA977;
  --pending: #E3A33A;
  --risk: #D95368;
  --ai: #886ED1;

  --card-light: #FEFCF7;
  --card-dark: #212A40;
  --border-light: #D5D0C4;
  --border-dark: #39445E;
  --title-light: #222630;
  --title-dark: #F7F7F3;
  --body-light: #3A404C;
  --body-muted-light: #5B6170;
  --body-dark: #C7CDDC;
  --body-muted-dark: #9AA3BE;

  /* Contrast tokens — redefined inside .on-dark and night surfaces only. */
  --fg: var(--body-light);
  --fg-muted: var(--body-muted-light);
  --title: var(--title-light);
  --surface: var(--card-light);
  --border: var(--border-light);

  --font-sans: "Figtree", system-ui, -apple-system, sans-serif;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --announce-h: 36px;
  --header-h: 56px;
  --site-top-h: calc(var(--announce-h) + var(--header-h));
  --container: min(1120px, calc(100% - 2.5rem));
  --container-wide: min(1280px, calc(100% - 2rem));
  --radius-s: 3px;
  --radius-m: 6px;
  --radius-l: 10px;
  --shadow-soft: 0 10px 30px rgba(21, 27, 44, 0.09);
  --shadow-night: 0 16px 44px rgba(0, 0, 0, 0.38);
  --ease-weave: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--fg);
  background-color: var(--parchment);
  /* Research coordinate grid — dotted horizontal tracks + sparse vertical ticks.
     Not TeamDune's diagonal cool hatch, not TourAmber's dense linen rule. */
  background-image:
    radial-gradient(circle at 3px 3px, rgba(21, 27, 44, 0.075) 1px, transparent 1.5px),
    repeating-linear-gradient(90deg, transparent 0 259px, rgba(67, 95, 214, 0.05) 259px 260px),
    radial-gradient(ellipse 85% 48% at 4% 4%, rgba(67, 95, 214, 0.07), transparent 55%),
    radial-gradient(ellipse 70% 45% at 96% 98%, rgba(35, 152, 142, 0.06), transparent 52%);
  background-size: 11px 34px, 260px 100%, 100% 100%, 100% 100%;
  background-attachment: fixed;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: var(--cobalt); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--title);
  font-weight: 600;
  line-height: 1.16;
  margin: 0 0 0.65em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.1rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.35rem); }
h4 { font-size: 1rem; font-family: var(--font-sans); font-weight: 700; }

p { margin: 0 0 1em; color: var(--fg); }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
code { font-family: var(--font-mono); font-size: 0.92em; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

@keyframes weave-pulse {
  0%, 100% { box-shadow: inset 0 0 0 0 rgba(67, 95, 214, 0); }
  50% { box-shadow: inset 0 0 0 3px rgba(67, 95, 214, 0.32); }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes thread-draw {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ————————————————— Layout shell ————————————————— */
.site-shell { min-height: 100dvh; display: flex; flex-direction: column; position: relative; isolation: isolate; padding-top: var(--site-top-h); }
.site-shell > main { flex: 1 1 auto; }

.container { width: var(--container); margin-inline: auto; }
.container--wide { width: var(--container-wide); margin-inline: auto; }

.section { padding: 1.5rem 0; position: relative; }
.section--tight { padding: 1.1rem 0; }
.section--docs { padding-top: 1.5rem; padding-bottom: 2rem; }
.section--docs .legal-body, .section--docs .changelog { max-width: 68ch; }

.section--night,
.on-dark {
  --fg: var(--body-dark);
  --fg-muted: var(--body-muted-dark);
  --title: var(--title-dark);
  --surface: var(--card-dark);
  --border: var(--border-dark);
}

.section--night {
  color: var(--fg);
  background:
    linear-gradient(135deg, rgba(33, 42, 64, 0.9) 0%, transparent 55%),
    repeating-linear-gradient(90deg, rgba(57, 68, 94, 0.32) 0, rgba(57, 68, 94, 0.32) 1px, transparent 1px, transparent 76px),
    linear-gradient(180deg, #1a2236 0%, var(--ink) 100%);
}

.mt-s { margin-top: 0.75rem !important; }
.mt-m { margin-top: 1.5rem !important; }
.mt-l { margin-top: 2.5rem !important; }

.is-ok { color: var(--success) !important; }
.is-warn, .is-risk { color: var(--risk) !important; }
.is-pending { color: var(--pending) !important; }
.is-ai { color: var(--ai) !important; }
.is-open { display: block !important; }
.is-active { border-color: var(--gold) !important; }
.is-inview { animation: weave-pulse 0.65s var(--ease-weave) forwards; }
.is-drift { outline: 2px dashed var(--gold); outline-offset: -2px; }
.is-resolved { opacity: 0.72; }
.is-published { border-color: var(--success) !important; }
.is-saved::after { content: " · saved"; color: var(--success); font-weight: 600; }
.is-complete { border-color: var(--success) !important; }
.is-dragging { opacity: 0.55; }
.is-dimmed { opacity: 0.35; }
.is-gap { border-left: 3px solid var(--risk); }
.is-overlap { border-left: 3px solid var(--gold); }

/* ————————————————— Type utilities ————————————————— */
.kicker {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.65rem;
}

.lead { font-size: clamp(1.05rem, 2vw, 1.2rem); line-height: 1.6; color: var(--fg); max-width: 62ch; }

.mono-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
  font-weight: 600;
}

.hint-line {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--fg-muted);
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--cobalt);
  background: var(--surface);
  margin: 1rem 0 0;
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
}

.text-link {
  font-weight: 600;
  color: var(--cobalt);
  text-decoration: none;
  border-bottom: 1px solid rgba(67, 95, 214, 0.35);
}
.text-link:hover { color: var(--ink); border-bottom-color: var(--gold); }
.on-dark .text-link, .section--night .text-link { color: #A9B6FF; }

.linkish {
  background: none;
  border: none;
  padding: 0;
  font-weight: 700;
  color: var(--cobalt);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.86rem;
  text-decoration: underline;
  text-decoration-color: rgba(67, 95, 214, 0.4);
}
.linkish:hover { color: var(--ink); }

/* ————————————————— Site top: announce + header ————————————————— */
.site-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  width: 100%;
  min-height: var(--site-top-h);
  background: var(--card-light);
}

/* Thread announce — single centered line with a break knot.
   Distinct from SloganPrism spectrum rail and TeamDune terrain seam. */
.announce-bar--thread {
  min-height: var(--announce-h);
  color: #D5DBEC;
  font-size: 0.8rem;
  background: #151B2C;
  border-bottom: 1px dashed rgba(193, 76, 138, 0.45);
}
.announce-bar--thread .announce-bar-inner {
  width: var(--container-wide);
  margin-inline: auto;
  padding: 0.5rem 1rem;
  min-height: var(--announce-h);
  display: flex;
  align-items: center;
  justify-content: center;
}
.announce-bar--thread .announce-text {
  margin: 0;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.55rem 0.7rem;
  line-height: 1.3;
  text-align: center;
}
.announce-bar--thread .announce-wave {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #A9B8F2;
}
.announce-bar--thread .announce-break {
  width: 8px; height: 8px; border-radius: 50%;
  border: 2px solid var(--risk);
  background: #3a1a22;
  box-shadow: 0 0 0 2px rgba(217, 83, 104, 0.2);
  flex-shrink: 0;
}
.announce-bar--thread .announce-msg { color: #D5DBEC; font-weight: 500; }
.announce-bar--thread .announce-action {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: #F0C36A;
}
.announce-bar--thread .announce-action:hover,
.announce-bar--thread .announce-action:focus-visible {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.site-header {
  min-height: var(--header-h);
  background: rgba(254, 252, 247, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.header-inner {
  width: var(--container-wide);
  margin-inline: auto;
  padding: 0 1rem;
  min-height: var(--header-h);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
}

.header-left { display: flex; align-items: center; }
.header-actions { display: flex; align-items: center; gap: 0.65rem; }

.brand { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; color: var(--title-light); }
.brand-name { font-family: var(--font-sans); font-size: 1.05rem; font-weight: 800; letter-spacing: -0.02em; }
.brand-slogan-inline { color: var(--teal); font-weight: 600; }

.logo-mark { width: 2rem; height: 2rem; display: grid; place-items: center; flex-shrink: 0; }
.logo-mark svg { width: 100%; height: 100%; }
.logo-mark--hero { width: clamp(2.75rem, 5vw, 3.5rem); height: clamp(2.75rem, 5vw, 3.5rem); }

.nav-main { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0.15rem 0.3rem; }

.nav-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(21, 27, 44, 0.75);
  text-decoration: none;
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-s);
  border: 1px solid transparent;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.nav-link:hover { color: var(--ink); background: rgba(254, 252, 247, 0.9); border-color: var(--border-light); }
.nav-link.is-active {
  color: var(--ink) !important;
  background: var(--card-light) !important;
  border-color: var(--border-light) !important;
  box-shadow: inset 0 -2px 0 var(--gold);
}

.header-signin { font-size: 0.82rem; font-weight: 600; color: var(--body-light); text-decoration: none; }
.header-signin:hover { color: var(--ink); }

.nav-toggle {
  display: none;
  border: 1px solid var(--border-light);
  background: var(--card-light);
  color: var(--ink);
  border-radius: var(--radius-s);
  padding: 0.35rem 0.55rem;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid var(--border-light);
  background: var(--parchment);
}
.mobile-nav.is-open { display: flex; }
.mobile-nav a {
  text-decoration: none;
  font-weight: 600;
  color: var(--body-light);
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-s);
}
.mobile-nav a.is-active { background: var(--card-light); color: var(--ink); }

/* User menu */
.user-menu { position: relative; }
.user-avatar {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  background: var(--cobalt);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.user-dropdown {
  --fg: var(--body-light);
  --fg-muted: var(--body-muted-light);
  --surface: var(--card-light);
  --border: var(--border-light);
  display: none;
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-soft);
  padding: 0.5rem;
  flex-direction: column;
  z-index: 50;
}
.user-dropdown.is-open { display: flex; }
.user-workspace-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
  padding: 0.35rem 0.6rem 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.3rem;
}
.user-dropdown a,
.user-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-s);
  color: var(--fg);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--font-sans);
}
.user-dropdown a:hover,
.user-dropdown button:hover { background: var(--parchment); color: var(--ink); }
.user-dropdown button[data-sign-out] { color: var(--risk); margin-top: 0.2rem; border-top: 1px solid var(--border); border-radius: 0; padding-top: 0.6rem; }

/* ————————————————— Buttons ————————————————— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-m);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s, color 0.15s, border-color 0.15s;
  line-height: 1.2;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 0.45rem 0.85rem; font-size: 0.82rem; }
.btn-lg { padding: 0.85rem 1.5rem; font-size: 1rem; }

.btn-primary { background: var(--cobalt); color: #fff; box-shadow: 0 8px 20px rgba(67, 95, 214, 0.28); }
.btn-primary:hover { background: #364DBB; box-shadow: 0 10px 24px rgba(67, 95, 214, 0.34); }

.btn-secondary {
  background: var(--card-light);
  color: var(--ink);
  border-color: var(--border-light);
}
.btn-secondary:hover { border-color: var(--cobalt); color: var(--cobalt); }
.section--night .btn-secondary, .on-dark .btn-secondary {
  background: rgba(67, 95, 214, 0.16);
  color: var(--title-dark);
  border-color: rgba(199, 205, 220, 0.4);
}
.section--night .btn-secondary:hover, .on-dark .btn-secondary:hover { background: var(--cobalt); color: #fff; }

.btn-ghost { background: transparent; color: var(--fg); border-color: var(--border); }
.btn-ghost:hover { background: rgba(67, 95, 214, 0.08); }
.section--night .btn-ghost, .on-dark .btn-ghost { color: var(--title-dark); border-color: rgba(199, 205, 220, 0.4); }

.btn-full { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: default; }

/* ————————————————— Weave Mast (page header) ————————————————— */
/* Two columns — chapter tick rail + title on the left, lead + action + an
   optional side panel on the right, all inside one dossier strip. Distinct
   from TeamDune's terrain-mast (bordered rail split) and TourAmber's
   page-mast (plain copy | panel split): the tick runs the full width above
   the shell, and the right column stacks lead → action → side panel instead
   of pinning a panel beside the copy. */
.weave-mast {
  position: relative;
  padding: 0;
  background:
    linear-gradient(100deg, rgba(21, 27, 44, 0.035) 0%, transparent 46%),
    linear-gradient(180deg, #FBF8F1 0%, var(--card-light) 100%);
  border-bottom: 2px solid var(--cobalt);
  overflow: hidden;
}

.weave-mast-tick {
  height: 6px;
  background: repeating-linear-gradient(90deg, var(--cobalt) 0 18px, var(--teal) 18px 28px, var(--gold) 28px 34px, transparent 34px 48px);
  opacity: 0.9;
}

.weave-mast--ink {
  --fg: var(--body-dark);
  --fg-muted: var(--body-muted-dark);
  --title: var(--title-dark);
  --surface: var(--card-dark);
  --border: var(--border-dark);
  background: linear-gradient(120deg, #1a2236 0%, var(--ink) 55%, #141a29 100%);
  border-bottom-color: var(--teal);
}
.weave-mast--ink .weave-mast-tick {
  background: repeating-linear-gradient(90deg, var(--teal) 0 16px, var(--cobalt) 16px 28px, var(--gold) 28px 34px, transparent 34px 46px);
}

.weave-mast-shell {
  display: grid;
  grid-template-columns: minmax(200px, 0.7fr) minmax(0, 1.3fr);
  gap: 1.25rem 2rem;
  align-items: start;
  padding: 1.35rem 1rem 1.25rem;
}

.weave-mast-left { min-width: 0; padding-right: 0.5rem; border-right: 1px solid var(--border); }
.weave-mast-left h1 { margin: 0; font-size: clamp(1.6rem, 3.2vw, 2.2rem); letter-spacing: -0.02em; }
.weave-mast--ink .weave-mast-left { border-right-color: var(--border-dark); }

.weave-mast-right { min-width: 0; display: flex; flex-direction: column; gap: 0.85rem; }
.weave-mast-right .lead { margin: 0; max-width: 64ch; font-size: 0.98rem; }
.weave-mast-action { display: flex; flex-wrap: wrap; gap: 0.65rem; align-items: stretch; }
.weave-mast-action > .btn { flex: 1 1 200px; }

@media (max-width: 900px) {
  .weave-mast-shell { grid-template-columns: 1fr; }
  .weave-mast-left { border-right: none; border-bottom: 1px solid var(--border); padding-bottom: 0.75rem; }
  .weave-mast--ink .weave-mast-left { border-bottom-color: var(--border-dark); }
}

/* Side panel — used inside weave-mast-right and standalone asides */
.side-panel {
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--cobalt);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-soft);
  color: var(--fg);
}
.weave-mast--ink .side-panel { border-left-color: var(--teal); }
.side-panel-chips { display: grid; gap: 0.4rem; margin-top: 0.5rem; }
.side-chip {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.82rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  background: rgba(67, 95, 214, 0.06);
}
.side-chip span { color: var(--fg-muted); font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase; }
.side-chip b { color: var(--title); }

/* ————————————————— Section headings & grid utility ————————————————— */
.sec-head { margin-bottom: 1rem; }
.sec-head .lead { margin-top: 0.35rem; }

.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; align-items: start; }
.three-col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.four-col { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.85rem; }

/* ————————————————— Workspace layout helpers ————————————————— */
/* .workspace-main is a SINGLE grid: the toolbar spans the full row, then
   content + aside sit as the second row of that same grid. Never place a
   label/grid/aside as siblings of a 2-col grid — that produced the
   TeamDune void bug. */
.workspace { display: flex; flex-direction: column; gap: 0.9rem; }
.workspace-main {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.62fr);
  gap: 1rem;
  align-items: start;
}
.workspace-toolbar { grid-column: 1 / -1; width: 100%; display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; justify-content: space-between; }
.workspace-content { min-width: 0; }
.workspace-aside { min-width: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.workspace-main--solo { grid-template-columns: 1fr; }
.workspace-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }

@media (max-width: 1024px) {
  .workspace-main { grid-template-columns: 1fr; }
}

/* ————————————————— Cards, chips, fact lines, legend, status ————————————————— */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 1rem 1.1rem;
  color: var(--fg);
  box-shadow: var(--shadow-soft);
}
.card h3, .card h4 { color: var(--title); }

.fact-lines, .receipt-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.fact-lines li, .receipt-lines li { display: flex; justify-content: space-between; gap: 0.75rem; font-size: 0.85rem; }
.fact-lines span, .receipt-lines span { color: var(--fg-muted); }
.fact-lines b, .receipt-lines b { color: var(--title); font-weight: 600; }
.fact-lines--dark { --fg-muted: var(--body-muted-dark); }
.fact-lines--dark b { color: var(--title-dark); }
.fact-lines--dark span { color: var(--body-muted-dark); }

.source-chip {
  display: block;
  font-size: 0.84rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  background: var(--surface);
  color: var(--fg);
  cursor: pointer;
}
.source-chip b { display: block; color: var(--title); }
.source-chip span { display: block; font-size: 0.76rem; color: var(--fg-muted); margin-top: 0.15rem; }
.source-chip input { margin-right: 0.4rem; accent-color: var(--cobalt); }
.source-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; margin-top: 0.75rem; }

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fg-muted);
}
.legend-item::before { content: ""; width: 9px; height: 9px; border-radius: 2px; background: var(--border); }
.legend-item--comparable::before, .legend-item--ok::before { background: var(--success); }
.legend-item--new::before { background: var(--ai); }
.legend-item--break::before, .legend-item--shortage::before { background: var(--risk); }
.legend-item--absent::before { background: var(--border); }
.legend-item--excess::before { background: var(--pending); }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-weight: 700;
}
.status-pill--success { color: var(--success); background: rgba(58, 169, 119, 0.12); }
.status-pill--pending { color: var(--pending); background: rgba(227, 163, 58, 0.14); }
.status-pill--risk { color: var(--risk); background: rgba(217, 83, 104, 0.12); }
.status-pill--ai { color: var(--ai); background: rgba(136, 110, 209, 0.12); }

.status-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 0.55rem; font-size: 0.9rem; }
.status-list i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 0.55rem; background: var(--border); }
.status-list i.ok { background: var(--success); box-shadow: 0 0 0 3px rgba(58, 169, 119, 0.2); }

.code-block, .code-textarea {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  color: var(--fg);
  padding: 1rem 1.1rem;
  overflow-x: auto;
}
.code-block { white-space: pre; }
.code-textarea { width: 100%; resize: vertical; min-height: 8rem; white-space: pre; }

/* ————————————————— Forms ————————————————— */
.form-field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 0.85rem; font-size: 0.85rem; font-weight: 700; color: var(--title); }
.form-field .field-hint { font-size: 0.76rem; color: var(--fg-muted); font-weight: 400; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; }
.form-stack { display: flex; flex-direction: column; gap: 0.9rem; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
select,
textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.9rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  background: var(--surface);
  color: var(--fg);
}
textarea { font-family: var(--font-mono); font-size: 0.82rem; resize: vertical; min-height: 5.5rem; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--cobalt); outline-offset: 1px; }
input[type="range"] { width: 100%; accent-color: var(--cobalt); }

.form-stack--underline input {
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  padding: 0.5rem 0.1rem;
}

.check-row, .checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--fg);
}
.check-row input[type="checkbox"], .check-row input[type="radio"],
.checkbox-row input[type="checkbox"], .checkbox-row input[type="radio"] { accent-color: var(--cobalt); width: 1rem; height: 1rem; flex-shrink: 0; }
.checkbox-row small { display: block; color: var(--fg-muted); font-weight: 400; }
.cookie-row { align-items: flex-start; margin-bottom: 0.6rem; }

/* Custom file picker — never rely on native "Choose File" label. */
.file-picker { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.file-picker-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.file-picker-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.9rem;
  border: 1px dashed var(--border) !important;
  border-radius: var(--radius-s);
  color: var(--title);
  font-weight: 700;
  font-size: 0.82rem;
}
.file-picker-btn:hover { border-color: var(--cobalt) !important; color: var(--cobalt); background: transparent; }
.file-picker-name { font-family: var(--font-mono); font-size: 0.78rem; color: var(--fg-muted); }

/* ————————————————— Thread Banner (home) —————————————————
   Full-width weave banner: a single centered column, never a left-rail +
   right-stage split. Horizontal space stays filled via a full-bleed rule and
   two edge-to-edge strip rows (signals, wave chips) instead of a second
   column. */
.brand-lockup { display: flex; align-items: center; gap: 0.65rem; }
.brand-lockup h1 { margin: 0; }
.brand-headline { margin-top: 0.15rem; }
.brand-desc { color: var(--fg); }

/* site-shell already pads for fixed .site-top — do not re-add announce height */
.thread-banner { padding: 2rem 0 2.25rem; position: relative; }
.thread-banner-hero { max-width: 42rem; margin-inline: auto; text-align: center; display: flex; flex-direction: column; align-items: center; }
.thread-banner-lockup { justify-content: center; }
.thread-banner-hero .mono-label { margin-top: 0.2rem; }
.thread-banner-headline { max-width: 30ch; }
.thread-banner-desc { max-width: 58ch; font-size: 1.02rem; }
.thread-banner-actions { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; margin-top: 0.3rem; }

.thread-banner-rule {
  height: 1px;
  margin: 1.5rem 0 1.25rem;
  background: repeating-linear-gradient(90deg, var(--cobalt) 0 10px, transparent 10px 20px);
  opacity: 0.4;
}

.thread-banner-signals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; }
.thread-banner-signal {
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius-m);
  border: 1px solid var(--border-light);
  background: var(--card-light);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.thread-banner-signal span { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--fg-muted); }
.thread-banner-signal b { color: var(--title); font-size: 0.92rem; }

.thread-banner-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.thread-chip {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border-light);
  color: var(--body-muted-light);
  background: var(--card-light);
}
.thread-chip--case { border-color: var(--cobalt); color: var(--cobalt); font-weight: 600; }

@media (max-width: 720px) { .thread-banner-signals { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ————————————————— Thread Spine (home Continuity Stage) —————————————————
   The stage is a CENTER-COLUMN vertical timeline: one continuous thread line
   with a wave panel strung on it top to bottom, and break/new-measure notes
   called out to the left or right of the line — not a right-side stage card,
   not a 4-node horizontal drift strip. */
.thread-spine {
  padding: 1.25rem 1.1rem 0;
  background: var(--card-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.thread-spine-question {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-m);
  border: 1px solid var(--border-light);
  background: rgba(67, 95, 214, 0.05);
}
.thread-spine-question-text { font-family: var(--font-serif); font-size: 1.15rem; margin: 0.25rem 0 0; color: var(--title-light); }

.thread-spine-line { position: relative; display: flex; flex-direction: column; }
.thread-spine-line::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 2px;
  background: repeating-linear-gradient(180deg, var(--cobalt) 0 6px, transparent 6px 12px);
  opacity: 0.45;
  transform: translateX(-1px);
}

.spine-wave-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 440px) minmax(0, 1fr);
  gap: 1.1rem;
  align-items: start;
  padding: 1rem 0;
}
.spine-wave-row + .spine-wave-row { border-top: 1px dashed var(--border-light); }

.spine-node {
  position: absolute;
  left: 50%;
  top: 0.6rem;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--cobalt);
  border: 3px solid var(--card-light);
  box-shadow: 0 0 0 1px var(--cobalt);
  transform: translateX(-50%);
  z-index: 2;
}

.spine-wave-panel { position: relative; }
.wave-panel {
  padding: 0.8rem 0.9rem;
  border-radius: var(--radius-m);
  border: 1px solid var(--border-light);
  background: var(--card-light);
}
.wave-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.55rem; }
.wave-panel-head b { font-family: var(--font-serif); font-size: 1.05rem; color: var(--title-light); }
.wave-panel-head span { font-size: 0.76rem; color: var(--fg-muted); }
.wave-panel-metrics { display: flex; flex-direction: column; gap: 0.4rem; }

.spine-metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-s);
  border: 1px solid var(--border-light);
  background: var(--card-light);
  cursor: pointer;
  transition: transform 0.15s var(--ease-weave), box-shadow 0.15s;
}
.spine-metric-label { font-size: 0.82rem; color: var(--fg); }
.spine-metric-row b { font-size: 0.76rem; font-weight: 700; color: var(--title-light); }
.spine-metric-row:hover { transform: translateX(2px); box-shadow: var(--shadow-soft); }
.spine-metric-row.is-selected { box-shadow: 0 0 0 2px var(--cobalt) inset; }
.continuity-node--comparable { border-left: 4px solid var(--success); }
.continuity-node--new { border-left: 4px solid var(--ai); background: rgba(136, 110, 209, 0.08); }
.continuity-node--break { border-left: 4px solid var(--risk); background: rgba(217, 83, 104, 0.08); }
.continuity-node--absent { border-left: 4px solid var(--border-light); opacity: 0.55; }

.spine-callout { display: flex; flex-direction: column; gap: 0.5rem; padding-top: 0.15rem; }
.spine-callout--left { align-items: flex-end; text-align: right; }
.spine-callout--right { align-items: flex-start; text-align: left; }
/* Empty side rails must not read as blank parchment voids */
.spine-callout--empty {
  min-height: 4.5rem;
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-m);
  background:
    repeating-linear-gradient(135deg, rgba(67, 95, 214, 0.04) 0 6px, transparent 6px 12px),
    var(--card-light);
  align-items: stretch;
  justify-content: center;
  padding: 0.65rem 0.75rem;
}
.spine-callout--empty::before {
  content: "Steady · no break this wave";
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.spine-callout-item {
  max-width: 100%;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-m);
  border: 1px dashed var(--border-light);
  background: transparent;
}
.spine-callout-item .mono-label { display: block; margin-bottom: 0.15rem; }
.spine-callout-item b { display: block; font-size: 0.85rem; color: var(--title-light); }
.spine-callout-item p { margin: 0.2rem 0 0; font-size: 0.8rem; color: var(--fg-muted); }
.spine-callout-item--break { border-color: rgba(217, 83, 104, 0.5); }
.spine-callout-item--break .mono-label { color: var(--risk); }
.spine-callout-item--new { border-color: rgba(136, 110, 209, 0.5); }
.spine-callout-item--new .mono-label { color: var(--ai); }

.continuity-legend { display: flex; flex-wrap: wrap; gap: 0.85rem; padding-top: 0.3rem; border-top: 1px dashed var(--border-light); }

.continuity-conclusion {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-m);
  border: 1px solid rgba(58, 169, 119, 0.4);
  border-left: 3px solid var(--success);
  background: rgba(58, 169, 119, 0.07);
  animation: thread-draw 0.4s var(--ease-weave);
}
.continuity-conclusion .mono-label { color: var(--success); margin-bottom: 0.5rem; }

.thread-spine-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 -1.1rem;
  padding: 0.75rem 1.1rem;
  border-top: 1px solid var(--border-light);
  background: var(--card-light);
  border-radius: 0 0 var(--radius-l) var(--radius-l);
}
.thread-spine-stats { display: flex; flex-wrap: wrap; gap: 0.9rem; font-size: 0.78rem; color: var(--body-muted-light); }

@media (max-width: 860px) {
  .spine-wave-row { grid-template-columns: 1fr; padding-left: 1.35rem; }
  .thread-spine-line::before { left: 0.4rem; }
  .spine-node { left: 0.4rem; }
  .spine-callout--left, .spine-callout--right { align-items: flex-start; text-align: left; }
}

/* ————————————————— Thread Ledger (home secondary section) —————————————————
   A single continuous row list, not three equal-weight depth cards. */
.thread-ledger { display: flex; flex-direction: column; border-top: 1px solid var(--border-light); }
.thread-ledger-head, .thread-ledger-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 140px 160px;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem 0.2rem;
}
.thread-ledger-head { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--fg-muted); }
.thread-ledger-row { border-bottom: 1px solid var(--border-light); }
.thread-ledger-metric b { display: block; color: var(--title); font-size: 0.92rem; }
.thread-ledger-metric p { margin: 0.15rem 0 0; font-size: 0.82rem; color: var(--fg-muted); }
.thread-ledger-status {
  justify-self: start;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border-light);
}
.thread-ledger-status--comparable { color: var(--success); border-color: rgba(58, 169, 119, 0.4); }
.thread-ledger-status--adjusted { color: var(--pending); border-color: rgba(227, 163, 58, 0.45); }
.thread-ledger-status--break { color: var(--risk); border-color: rgba(217, 83, 104, 0.45); }

@media (max-width: 720px) {
  .thread-ledger-head { display: none; }
  .thread-ledger-row { grid-template-columns: 1fr; gap: 0.35rem; padding: 0.9rem 0.2rem; }
  .thread-ledger-id { order: -1; }
}

/* ————————————————— Reading Room (Platform) ————————————————— */
.reading-room { display: flex; flex-direction: column; gap: 0.9rem; }
.reading-room-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.85rem; }
.chapter-tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chapter-tab {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-s);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg-muted);
  cursor: pointer;
}
.chapter-tab.is-active { background: var(--cobalt); color: #fff; border-color: var(--cobalt); }
.reading-room-chapters { position: relative; }
.chapter-panel { display: none; padding: 1rem 1.1rem; border-radius: var(--radius-m); border: 1px solid var(--border); background: var(--surface); }
.chapter-panel.is-active { display: block; animation: fade-up 0.3s var(--ease-weave); }
.chapter-panel p { font-size: 0.98rem; }
.chapter-expand { display: inline-block; margin: 0.5rem 0 0; }
.chapter-sources { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }

/* ————————————————— Survey Studio — Composer ————————————————— */
.composer-page-nav { display: flex; gap: 0.5rem; }
.composer-stage { display: flex; flex-direction: column; gap: 0.6rem; }
.composer-question {
  display: flex;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-m);
  border: 1px solid var(--border);
  background: var(--surface);
}
.composer-question-index { font-family: var(--font-mono); font-size: 0.9rem; font-weight: 700; color: var(--fg-muted); flex-shrink: 0; }
.composer-question-body { min-width: 0; }
.composer-question-text { font-family: var(--font-serif); font-size: 1.02rem; margin: 0 0 0.35rem; color: var(--title); }
.composer-question-meta { display: block; font-family: var(--font-mono); font-size: 0.72rem; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.composer-flag {
  display: inline-block;
  margin-top: 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-s);
}
.composer-flag--warn { background: rgba(217, 83, 104, 0.12); color: var(--risk); }
.composer-warning { margin-top: 0.75rem; padding: 0.85rem 1rem; border-radius: var(--radius-m); border: 1px solid rgba(217, 83, 104, 0.35); background: rgba(217, 83, 104, 0.06); }
.composer-warning .mono-label { color: var(--risk); margin-bottom: 0.5rem; }

.composer-side-tabs { display: flex; flex-direction: column; gap: 0.6rem; }
.composer-tab-rail { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.composer-tab {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-s);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg-muted);
  cursor: pointer;
}
.composer-tab.is-active { background: var(--magenta); color: #fff; border-color: var(--magenta); }
.composer-pane-wrap { padding: 0.85rem 1rem; border-radius: var(--radius-m); border: 1px solid var(--border); background: var(--surface); }
.composer-pane { display: none; }
.composer-pane.is-active { display: block; animation: fade-up 0.25s var(--ease-weave); }
.composer-pane .mono-label { display: block; margin-bottom: 0.4rem; }

/* ————————————————— Question Lineage — Acetate Desk ————————————————— */
.acetate-desk { display: flex; flex-direction: column; gap: 0.85rem; }
.acetate-sheets { display: flex; flex-direction: column; gap: 0.5rem; }
.acetate-sheet-toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-m);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: opacity 0.2s;
}
.acetate-sheet-toggle input { margin-top: 0.2rem; accent-color: var(--cobalt); }
.acetate-sheet-toggle span { display: block; }
.acetate-sheet-toggle b { display: block; font-size: 0.84rem; color: var(--title); }
.acetate-sheet-toggle em { display: block; font-family: var(--font-serif); font-style: italic; font-size: 0.95rem; color: var(--fg); margin: 0.2rem 0; }
.acetate-sheet-toggle small { display: block; font-family: var(--font-mono); font-size: 0.7rem; color: var(--fg-muted); text-transform: uppercase; }
.acetate-sheet-toggle.is-off { opacity: 0.4; }

.acetate-diff {
  padding: 0.9rem 1.05rem;
  border-radius: var(--radius-m);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  background: rgba(213, 161, 55, 0.07);
}
.acetate-diff .mono-label { margin-bottom: 0.5rem; }
.acetate-diff-removed { color: var(--risk); text-decoration: line-through; }
.acetate-diff-added { color: var(--success); font-weight: 700; }
.acetate-diff-note { margin: 0.5rem 0 0; font-size: 0.84rem; color: var(--fg-muted); }

.lineage-choices { display: flex; flex-direction: column; gap: 0.5rem; }
.lineage-choice {
  display: block;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-m);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
}
.lineage-choice input { margin-right: 0.4rem; accent-color: var(--cobalt); }
.lineage-choice b { color: var(--title); font-size: 0.86rem; }
.lineage-choice p { margin: 0.3rem 0 0; font-size: 0.8rem; color: var(--fg-muted); }
.lineage-choice.is-active { border-color: var(--cobalt); box-shadow: 0 0 0 1px var(--cobalt) inset; background: rgba(67, 95, 214, 0.06); }

/* ————————————————— Sample Distribution — Amphitheater ————————————————— */
.amphitheater { display: flex; flex-direction: column; gap: 0.9rem; }
.amphitheater-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; }
.amphitheater-legend { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.amphitheater-tiers { display: flex; flex-direction: column; gap: 0.65rem; }
.amphitheater-tier { display: grid; grid-template-columns: 130px 1fr; align-items: center; gap: 0.85rem; }
.amphitheater-tier-label { font-size: 0.84rem; font-weight: 700; color: var(--title); }
.amphitheater-tier-seats { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.amphitheater-seat {
  flex: 1 1 120px;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-m);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: transform 0.15s;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}
.amphitheater-seat:hover { transform: translateY(-1px); }
.amphitheater-seat b { font-size: 0.84rem; color: var(--title); }
.amphitheater-seat span { font-family: var(--font-mono); font-size: 0.82rem; color: var(--fg-muted); }
.amphitheater-seat--ok { border-left: 4px solid var(--success); }
.amphitheater-seat--shortage { border-left: 4px solid var(--risk); }
.amphitheater-seat--excess { border-left: 4px solid var(--pending); }
.amphitheater-seat.is-active { box-shadow: 0 0 0 2px var(--cobalt) inset; }
.amphitheater-readout { padding: 0.9rem 1rem; border-radius: var(--radius-m); border: 1px solid var(--border); background: var(--surface); }
.amphitheater-readout .mono-label { margin-bottom: 0.5rem; }

@media (max-width: 768px) { .amphitheater-tier { grid-template-columns: 1fr; } }

/* ————————————————— Response Quality — Inspection Carousel ————————————————— */
.inspection-carousel { display: flex; flex-direction: column; gap: 0.85rem; }
.inspection-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.85rem; }
.inspection-nav { display: flex; gap: 0.5rem; }
.inspection-track { position: relative; min-height: 190px; }
.inspection-slide {
  display: none;
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius-l);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.inspection-slide.is-active { display: block; animation: fade-up 0.3s var(--ease-weave); }
.inspection-slide-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: rgba(217, 83, 104, 0.12);
  color: var(--risk);
  font-weight: 700;
  margin-bottom: 0.6rem;
}
.inspection-slide-evidence { font-family: var(--font-serif); font-size: 1.02rem; color: var(--title); margin-bottom: 0.6rem; }
.inspection-slide-impact { font-size: 0.86rem; color: var(--fg-muted); margin-bottom: 0.8rem; }
.inspection-slide-impact b { color: var(--title); }
.inspection-slide-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.inspection-dots { display: flex; justify-content: center; gap: 0.4rem; }
.inspection-dot { width: 8px; height: 8px; border-radius: 50%; border: none; background: var(--border-light); cursor: pointer; padding: 0; }
.inspection-dot.is-active { background: var(--cobalt); }

/* ————————————————— Open-Text Themes — Weave Wall ————————————————— */
.weave-wall { display: flex; flex-wrap: wrap; gap: 0.6rem; align-content: flex-start; }
.weave-wall-phrase {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.92rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-m);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg);
  transition: opacity 0.2s, border-color 0.2s;
}
.weave-wall-phrase.is-highlight { border-color: var(--gold); background: rgba(213, 161, 55, 0.1); color: var(--title); }
.weave-wall-themes { display: flex; flex-direction: column; gap: 0.5rem; }
.weave-wall-theme {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius-m);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  text-align: left;
}
.weave-wall-theme b { color: var(--title); font-size: 0.86rem; }
.weave-wall-theme span { font-family: var(--font-mono); font-size: 0.72rem; color: var(--fg-muted); }
.weave-wall-theme.is-active { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }

/* ————————————————— Trends — Comparability Window ————————————————— */
.comparability-window { display: flex; flex-direction: column; gap: 0.9rem; }
.comparability-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.comparability-chart {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  height: 140px;
  padding: 0 0.5rem;
  border-bottom: 1px solid var(--border);
}
.comparability-point {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: calc(var(--v, 4) * 22px);
  min-height: 20px;
  border-radius: var(--radius-s) var(--radius-s) 0 0;
  background: linear-gradient(180deg, rgba(67, 95, 214, 0.75), rgba(67, 95, 214, 0.35));
  position: relative;
  transition: opacity 0.2s;
}
.comparability-point b {
  position: absolute;
  top: -1.4rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--title);
  font-weight: 700;
}
.comparability-point--dim { background: repeating-linear-gradient(45deg, rgba(217, 83, 104, 0.35) 0 6px, rgba(217, 83, 104, 0.2) 6px 12px); }
.comparability-dims { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
.comparability-toggle {
  display: block;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-m);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
}
.comparability-toggle input { margin-right: 0.4rem; accent-color: var(--cobalt); }
.comparability-toggle b { color: var(--title); font-size: 0.84rem; }
.comparability-toggle span { display: block; font-size: 0.78rem; color: var(--fg-muted); margin-top: 0.2rem; }
.comparability-toggle.is-comparable { border-left: 3px solid var(--success); }
.comparability-toggle.is-drift { border-left: 3px solid var(--risk); }
.comparability-readout { padding: 0.85rem 1rem; border-radius: var(--radius-m); border: 1px solid var(--border); background: rgba(67, 95, 214, 0.05); font-size: 0.9rem; }
.comparability-readout p { margin: 0; }

@media (max-width: 640px) { .comparability-dims { grid-template-columns: 1fr; } }

/* ————————————————— Research Threads — Argument Surface ————————————————— */
.argument-surface { display: flex; flex-direction: column; gap: 1rem; }
.argument-decision { padding-bottom: 0.75rem; border-bottom: 1px solid var(--border); }
.argument-decision .lead { margin-top: 0.3rem; }
.argument-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.argument-column { display: flex; flex-direction: column; gap: 0.6rem; }
.argument-column .mono-label { margin-bottom: 0.2rem; }
.argument-card {
  padding: 0.8rem 0.95rem;
  border-radius: var(--radius-m);
  border: 1px solid var(--border);
  background: var(--surface);
}
.argument-card b { display: block; color: var(--title); font-size: 0.88rem; margin-bottom: 0.3rem; }
.argument-card p { margin: 0; font-size: 0.84rem; color: var(--fg-muted); }
.argument-card--support { border-left: 3px solid var(--success); }
.argument-card--against { border-left: 3px solid var(--risk); }
.argument-followups { padding: 0.85rem 1rem; border-radius: var(--radius-m); border: 1px solid var(--border); background: rgba(213, 161, 55, 0.07); border-left: 3px solid var(--gold); }
.followup-list { margin: 0.4rem 0 0; padding-left: 1.2em; font-size: 0.88rem; }

@media (max-width: 768px) { .argument-columns { grid-template-columns: 1fr; } }

/* ————————————————— Developers — Event Switchboard ————————————————— */
.event-switchboard { display: grid; grid-template-columns: minmax(180px, 0.75fr) minmax(0, 1.1fr) minmax(200px, 0.85fr); gap: 0.9rem; }
.switchboard-col { display: flex; flex-direction: column; gap: 0.6rem; }
.switchboard-event-list, .delivery-targets, .webhook-list, .switchboard-event-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; font-size: 0.84rem; }
.switchboard-event-list li, .webhook-list li { padding: 0.5rem 0.65rem; border-radius: var(--radius-s); border: 1px solid var(--border); background: var(--surface); }
.switchboard-map { display: flex; flex-direction: column; gap: 0.45rem; }
.switchboard-map-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-s);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.82rem;
}
.switchboard-map-row b { color: var(--title); }
.switchboard-map-row span { color: var(--fg-muted); font-family: var(--font-mono); font-size: 0.74rem; }
.switchboard-map-row.is-highlight { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.delivery-targets li { padding: 0.5rem 0.65rem; border-radius: var(--radius-s); border: 1px solid var(--border); background: var(--surface); }
.switchboard-preview { display: flex; flex-direction: column; gap: 0.5rem; }
.recipe-preview-card {
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-m);
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--fg);
}
.recipe-preview-card b { font-family: var(--font-sans); color: var(--title); font-size: 0.82rem; }
.recipe-preview-empty { font-size: 0.82rem; color: var(--fg-muted); font-style: italic; }
.event-switchboard.is-running { animation: weave-pulse 0.5s var(--ease-weave); }

.integrations-strip { margin-top: 1rem; padding-top: 0.9rem; border-top: 1px solid var(--border); }
.integrations-chips, .integrations-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.integration-chip {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg-muted);
}

@media (max-width: 1024px) { .event-switchboard { grid-template-columns: 1fr; } }

/* Integrations page hub rows */
.integrations-list { display: flex; flex-direction: column; gap: 0.6rem; }
.hub-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-m);
  border: 1px solid var(--border-light);
  background: var(--card-light);
}
.hub-row b { color: var(--title-light); }
.hub-row span { color: var(--body-muted-light); font-size: 0.84rem; }
.hub-row small { color: var(--body-muted-light); font-family: var(--font-mono); font-size: 0.72rem; }

@media (max-width: 768px) { .hub-row { grid-template-columns: 1fr; } }

/* ————————————————— Pricing — Scope Interview ————————————————— */
.scope-interview { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 1.1rem; align-items: start; margin-bottom: 1.1rem; }
.scope-questions { display: flex; flex-direction: column; gap: 0.4rem; }
.scope-factors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; margin-top: 0.75rem; }
.scope-explain { padding: 1rem 1.1rem; border-radius: var(--radius-l); border: 1px solid var(--border-light); background: var(--card-light); box-shadow: var(--shadow-soft); }
.scope-explain-list { margin: 0.6rem 0 0.75rem; }
.scope-explain-note { font-size: 0.8rem; color: var(--body-muted-light); margin: 0; }

.plan-recommendation {
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius-l);
  border: 1px solid var(--border-light);
  background: var(--card-light);
  box-shadow: var(--shadow-soft);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 1.5rem;
}
.plan-summary .mono-label { margin-bottom: 0.35rem; }
.plan-summary h3 { margin: 0 0 0.35rem; }
.plan-price { font-family: var(--font-serif); font-size: 2rem; color: var(--title-light); margin: 0 0 0.6rem; }
.plan-price span { font-family: var(--font-sans); font-size: 0.85rem; color: var(--body-muted-light); font-weight: 600; }
.plan-feats { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; font-size: 0.85rem; }
.plan-feats li { padding-left: 1.1rem; position: relative; }
.plan-feats li::before { content: "\2713"; position: absolute; left: 0; color: var(--success); font-weight: 700; }
.plan-quotas { display: grid; gap: 0.85rem; align-content: start; }
.plan-trial-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.ladder-note { font-size: 0.78rem; color: var(--body-muted-light); margin: 0; }

@media (max-width: 1024px) { .scope-interview, .plan-recommendation { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .scope-factors { grid-template-columns: 1fr; } }

/* ————————————————— Audit Wizard (audit-surveys) ————————————————— */
.audit-step-rail { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.audit-step-tab {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-s);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg-muted);
  cursor: pointer;
}
.audit-step-tab.is-active { background: var(--cobalt); color: #fff; border-color: var(--cobalt); }
.audit-pane { display: none; }
.audit-pane.is-active { display: block; animation: fade-up 0.3s var(--ease-weave); }
.match-list { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.75rem; }
.match-row {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr) auto;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-m);
  border: 1px solid var(--border);
  background: var(--surface);
}
.match-row-q b { display: block; color: var(--title); font-size: 0.86rem; }
.match-row-q p { margin: 0.2rem 0 0; font-size: 0.8rem; color: var(--fg-muted); }
.match-row-note { font-size: 0.8rem; color: var(--fg-muted); }
.match-row-actions { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; justify-content: flex-end; }
.match-confidence { font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase; padding: 0.2rem 0.45rem; border-radius: 999px; font-weight: 700; }
.match-confidence--high { background: rgba(58, 169, 119, 0.15); color: var(--success); }
.match-confidence--medium { background: rgba(227, 163, 58, 0.16); color: var(--pending); }
.match-confidence--n\/a, .match-confidence--new { background: rgba(136, 110, 209, 0.14); color: var(--ai); }
.match-row--confirmed { border-left: 3px solid var(--success); }
.match-row--review { border-left: 3px solid var(--pending); }
.match-row--new { border-left: 3px solid var(--ai); }
.match-row--split { border-left: 3px solid var(--gold); opacity: 0.85; }
.scope-checklist { list-style: none; margin: 0.5rem 0; padding: 0; display: grid; gap: 0.5rem; }
.scope-summary { padding: 0.8rem 0.95rem; border-radius: var(--radius-m); border: 1px solid var(--border); background: rgba(67, 95, 214, 0.06); margin-top: 0.6rem; }
.scope-summary .mono-label { margin-bottom: 0.35rem; }
.scope-summary p { margin: 0; font-size: 0.86rem; }

@media (max-width: 768px) { .match-row { grid-template-columns: 1fr; } .match-row-actions { justify-content: flex-start; } }

/* ————————————————— About ————————————————— */
.about-weave-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr); gap: 1.75rem; align-items: start; }
.mission-sentence { padding: 0.75rem 0.95rem; border-left: 3px solid var(--gold); background: rgba(213, 161, 55, 0.08); border-radius: 0 var(--radius-s) var(--radius-s) 0; }
.about-keywords { list-style: none; margin: 0.75rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.45rem; }
.about-keywords li {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border-light);
  background: var(--card-light);
  color: var(--body-muted-light);
}
.weave-coordinate-grid { display: grid; gap: 0.6rem; margin-top: 0.6rem; }
.weave-coordinate-node { padding: 0.7rem 0.85rem; border-radius: var(--radius-m); border: 1px solid var(--border-light); background: var(--card-light); }
.weave-coordinate-node b { display: block; color: var(--title-light); font-size: 0.84rem; margin-bottom: 0.25rem; }
.weave-coordinate-node p { margin: 0; font-size: 0.8rem; color: var(--body-muted-light); }

.weave-timeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.weave-timeline-node { padding: 0.85rem 0.95rem; border-top: 3px solid var(--cobalt); background: var(--card-light); border-radius: 0 0 var(--radius-m) var(--radius-m); box-shadow: var(--shadow-soft); }
.weave-timeline-node time { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; color: var(--body-muted-light); }
.weave-timeline-node h3 { margin: 0.4rem 0 0.4rem; font-size: 1.05rem; }
.weave-timeline-node p { margin: 0; font-size: 0.84rem; color: var(--body-light); }

.about-model-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.about-model-card { padding: 1rem 1.1rem; border-radius: var(--radius-m); border: 1px solid var(--border-light); background: var(--card-light); box-shadow: var(--shadow-soft); }
.about-model-card ul { margin: 0.5rem 0 0; padding-left: 1.2em; font-size: 0.86rem; }
.about-not-note { font-size: 0.82rem; color: var(--body-muted-light); margin-top: 0.5rem; }

@media (max-width: 1024px) { .about-weave-grid { grid-template-columns: 1fr; } .weave-timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); } .about-model-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .weave-timeline { grid-template-columns: 1fr; } }

/* ————————————————— Security ————————————————— */
.boundary-groups { display: flex; flex-direction: column; gap: 1.25rem; }
.boundary-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; margin-top: 0.6rem; }
.boundary-card { padding: 0.85rem 0.95rem; border-radius: var(--radius-m); border: 1px solid var(--border); background: var(--surface); }
.boundary-card b { display: block; color: var(--title); font-size: 0.86rem; margin-bottom: 0.3rem; }
.boundary-card p { margin: 0; font-size: 0.84rem; color: var(--fg-muted); }
.security-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; font-size: 0.86rem; }

@media (max-width: 768px) { .boundary-card-grid { grid-template-columns: 1fr; } }

/* ————————————————— Contact ————————————————— */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr); gap: 1.75rem; align-items: start; }
.contact-form { max-width: 46ch; }
.contact-aside { padding: 1rem 1.1rem; border-radius: var(--radius-l); border: 1px solid var(--border-light); background: var(--card-light); box-shadow: var(--shadow-soft); }

@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

/* ————————————————— Help / changelog / status boilerplate ————————————————— */
.help-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.help-list li a {
  display: block;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-m);
  border: 1px solid var(--border-light);
  background: var(--card-light);
  color: var(--title-light);
  text-decoration: none;
  font-weight: 600;
}
.help-list li a:hover { border-color: var(--cobalt); color: var(--cobalt); }

.changelog { display: flex; flex-direction: column; gap: 1.1rem; }
.changelog article { padding-left: 1.1rem; border-left: 2px solid var(--border-light); }
.changelog time { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; color: var(--body-muted-light); }
.changelog h3 { margin: 0.3rem 0 0.35rem; font-size: 1.05rem; }
.changelog p { margin: 0; }

.legal-body { max-width: 68ch; color: var(--fg); }
.legal-body h2 { margin-top: 1.75rem; }
.legal-body ul { padding-left: 1.4em; }
.cookie-settings-panel { max-width: 46ch; margin-top: 1.5rem; padding: 1rem 1.1rem; border-radius: var(--radius-m); border: 1px solid var(--border-light); background: var(--card-light); }

/* ————————————————— Footer ————————————————— */
.site-footer {
  --fg: var(--body-dark);
  --fg-muted: var(--body-muted-dark);
  --title: var(--title-dark);
  --surface: var(--card-dark);
  --border: var(--border-dark);
  background: var(--ink);
  color: var(--fg);
  padding-top: 2rem;
}

.footer-grid {
  width: var(--container-wide);
  margin-inline: auto;
  padding: 0 1rem 1.75rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}
.footer-col h4 { color: var(--title); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.75rem; font-family: var(--font-sans); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.footer-col a { color: var(--fg); text-decoration: none; font-size: 0.86rem; }
.footer-col a:hover { color: var(--gold); }

.footer-bar { border-top: 1px solid var(--border); padding: 1.1rem 0; }
.footer-bar-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; }
.footer-bar-inner > span { font-size: 0.8rem; color: var(--fg-muted); }
.footer-tagline { flex: 1 1 320px; font-size: 0.8rem; color: var(--fg-muted); margin: 0; max-width: 52ch; }
.footer-legal { display: flex; gap: 1rem; }
.footer-legal a { color: var(--fg-muted); text-decoration: none; font-size: 0.8rem; }
.footer-legal a:hover { color: var(--gold); }

@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* ————————————————— Sign-in — Weave shell ————————————————— */
.auth-shell--weave { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }

.auth-weave-strip {
  --fg: var(--body-dark);
  --fg-muted: var(--body-muted-dark);
  --title: var(--title-dark);
  padding: clamp(2rem, 6vw, 4rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  background: linear-gradient(150deg, #1a2236 0%, var(--ink) 60%, #131826 100%);
  color: var(--fg);
  position: relative;
  overflow: hidden;
}
.auth-weave-strip::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 42px, rgba(67, 95, 214, 0.14) 42px 43px),
    repeating-linear-gradient(90deg, transparent 0 240px, rgba(213, 161, 55, 0.1) 240px 241px);
  pointer-events: none;
}
.auth-brand--light {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: #F7F7F3;
  margin-bottom: 0.4rem;
}
.auth-brand--light .brand-name { font-size: 1.1rem; color: inherit; }
/* Dark strip: override global a:hover { color: var(--ink) } which was black-on-navy */
.auth-weave-strip a:hover,
.auth-weave-strip a:focus-visible {
  color: #F7F7F3;
}
.auth-weave-strip .auth-brand--light:hover,
.auth-weave-strip .auth-brand--light:focus-visible,
.auth-weave-strip .auth-brand--light:hover .brand-name,
.auth-weave-strip .auth-brand--light:focus-visible .brand-name {
  color: #D5A137;
}
.auth-weave-kicker { position: relative; z-index: 1; color: var(--body-muted-dark); }
.auth-weave-title { position: relative; z-index: 1; color: var(--title-dark); font-size: clamp(1.5rem, 3vw, 2rem); }
.auth-weave-lead { position: relative; z-index: 1; color: var(--body-dark); max-width: 46ch; }

.weave-strip-coordinates { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; margin-top: 0.5rem; }
.weave-strip-coordinate { padding: 0.6rem 0.75rem; border-radius: var(--radius-m); border: 1px solid var(--border-dark); background: rgba(33, 42, 64, 0.75); }
.weave-strip-coordinate span { font-family: var(--font-mono); font-size: 0.66rem; color: var(--gold); }
.weave-strip-coordinate b { display: block; font-size: 0.8rem; color: var(--title-dark); margin: 0.2rem 0 0.1rem; }
.weave-strip-coordinate em { display: block; font-style: normal; font-size: 0.78rem; color: var(--body-muted-dark); }

.auth-weave-track { position: relative; z-index: 1; margin-top: 0.75rem; padding-top: 0.9rem; border-top: 1px solid var(--border-dark); }
.weave-strip-track { display: flex; gap: 0.4rem; margin: 0.5rem 0 0.75rem; }
.weave-strip-track-node {
  flex: 1;
  text-align: center;
  padding: 0.4rem 0.3rem;
  border-radius: var(--radius-s);
  border: 1px solid var(--border-dark);
  background: rgba(35, 152, 142, 0.14);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--body-dark);
}

.auth-form-pane--parchment { display: flex; flex-direction: column; justify-content: center; padding: clamp(2rem, 6vw, 4rem); background: var(--parchment); }
.auth-form-inner { max-width: 380px; width: 100%; margin-inline: auto; }
.auth-form-inner h2 { font-size: 1.55rem; }
.auth-submit { width: 100%; margin-top: 0.3rem; }
.auth-alt { font-size: 0.85rem; color: var(--body-muted-light); margin-top: 0.9rem; }
.auth-alt--secondary { font-size: 0.8rem; }
.auth-alt a { color: var(--cobalt); text-decoration: none; font-weight: 600; }
.auth-alt a:hover,
.auth-alt a:focus-visible {
  color: #364DBB;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
.auth-form-pane--parchment .btn-primary:hover {
  color: #fff;
}
.auth-foot { margin-top: 1.5rem; font-size: 0.74rem; color: var(--body-muted-light); }

@media (max-width: 900px) { .auth-shell--weave { grid-template-columns: 1fr; } }

/* ————————————————— Responsive: nav/header ————————————————— */
@media (max-width: 1024px) {
  .nav-main { display: none; }
  .header-inner { grid-template-columns: auto auto; }
  .nav-toggle { display: inline-flex; }
  .header-actions .btn-sm, .header-signin { display: none; }
}
@media (max-width: 640px) {
  .two-col, .three-col, .four-col { grid-template-columns: 1fr; }
}


/* Trends explain + argument meta density */
.comparability-explain-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 0.75rem;
}
.comparability-explain {
  padding: 0.7rem 0.8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-m);
  min-width: 0;
}
.comparability-explain b { display: block; color: var(--title); font-size: 0.85rem; margin-bottom: 0.25rem; }
.comparability-explain p { margin: 0; font-size: 0.8rem; color: var(--fg); line-height: 1.4; }
.receipt-lines--inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
}
.receipt-lines--inline li { display: flex; gap: 0.4rem; font-size: 0.78rem; }
.argument-meta {
  margin-bottom: 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
}
@media (max-width: 900px) {
  .comparability-explain-grid { grid-template-columns: 1fr; }
}


/* Gap-fill: quality policy + theme detail + amphitheater density */
.inspection-policy {
  margin-top: 0.75rem;
  padding: 0.75rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--pending);
  border-radius: var(--radius-m);
  color: var(--fg);
}
.inspection-policy b { color: var(--title); }
.inspection-slide-meta {
  display: block;
  margin: 0.25rem 0 0.45rem;
  color: var(--fg-muted);
}
.weave-theme-detail {
  margin-top: 0.85rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
}
.weave-theme-detail-pane[hidden] { display: none !important; }
.weave-theme-quotes {
  margin: 0.55rem 0;
  padding: 0.55rem 0.65rem;
  background: rgba(67, 95, 214, 0.06);
  border-radius: var(--radius-s);
}
.weave-theme-quotes p {
  margin: 0.25rem 0 0;
  font-family: var(--font-serif);
  font-size: 0.9rem;
  color: var(--title);
  line-height: 1.45;
}
.weave-wall-phrase.is-highlight {
  background: rgba(193, 76, 138, 0.14);
  color: var(--title);
  outline: 1px solid rgba(193, 76, 138, 0.35);
}
.weave-wall-phrase.is-dimmed {
  opacity: 0.38;
  color: var(--fg-muted);
}
