/*
 * Miirae Core — inference_web stylesheet
 * Visual language: static/brand/design philosophy.txt
 * CMYK = signal energy (C incoming / M synthesis / Y volatility / K boundary).
 * Dual layer: .abstraction-field (emergent) + .app-shell (explicit epistemic surface).
 */

/* ─── Design tokens ─────────────────────────────────────────────── */
:root {
  color-scheme: dark;
  --void: #030508;
  --paper: #070b11;
  --paper-mid: #090d13;
  --ink: #eef5ff;
  --ink-soft: #c8d4e8;
  --muted: #9ca9bf;
  --line: #202c3f;
  --line-soft: #1a2434;
  --panel: #111722;
  --panel-highlight: #101723;
  --surface: #fbfdff;
  --surface-soft: #f4f7fb;
  --surface-ink: #132033;
  --surface-muted: #667386;
  --surface-line: #dbe4ef;
  --cyan: #7efef0;
  --cmyk-c: #00d8ff;
  --cmyk-m: #ff3fd2;
  --cmyk-y: #ffe44a;
  --cmyk-k: #6b7788;
  --err: #ff6b6b;

  --radius: 16px;
  --radius-sm: 12px;
  --radius-xs: 8px;

  --font-display: "Outfit", system-ui, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;

  --container-max: 1400px;
  --container-px: clamp(1rem, 3.5vw, 2.75rem);
  --flow-gutter: 96px;
  --aside-top: 1rem;
}

/* ─── Reset & base ──────────────────────────────────────────────── */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--void);
}

img, picture, svg { display: block; max-width: 100%; }

a { color: var(--cyan); }

/* ─── Accessibility helpers ─────────────────────────────────────── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.75rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--cyan);
  color: #061016;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
}
.skip-link:focus {
  left: 0.75rem;
  outline: 2px solid var(--cmyk-m);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─── Emergent layer: depth fields + CMYK interference ──────────── */
.abstraction-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    conic-gradient(from 210deg at 78% 8%,
      rgba(0, 216, 255, 0.14), transparent 55deg,
      rgba(255, 63, 210, 0.11) 45deg, transparent 70deg,
      rgba(255, 228, 74, 0.10) 40deg, transparent 120deg),
    radial-gradient(ellipse 90% 55% at 12% 88%, rgba(255, 63, 210, 0.10), transparent 50%),
    repeating-linear-gradient(168deg, transparent 0, transparent 16px,
      rgba(0, 216, 255, 0.09) 16px, rgba(0, 216, 255, 0.09) 17px),
    repeating-linear-gradient(79deg, transparent 0, transparent 22px,
      rgba(255, 63, 210, 0.07) 22px, rgba(255, 63, 210, 0.07) 23px),
    radial-gradient(circle at 2px 2px, rgba(0, 216, 255, 0.18) 1px, transparent 1px),
    radial-gradient(circle at 13px 16px, rgba(255, 228, 74, 0.12) 1px, transparent 1px);
  background-size:
    100% 100%, 100% 100%,
    100% 100%, 100% 100%,
    20px 21px, 20px 21px;
  background-color: var(--void);
}

/* ─── App shell: explicit epistemic surface ─────────────────────── */
.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(
    180deg,
    rgba(7, 11, 17, 0.72) 0%,
    rgba(7, 11, 17, 0.52) 35%,
    rgba(7, 11, 17, 0.62) 100%
  );
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-px);
}

/* ─── CMYK strip (signal energy — overlapping fields) ───────────── */
.cmyk-bar {
  display: flex;
  width: 100%;
  height: 11px;
  flex-shrink: 0;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #020305;
}
.cmyk-swatch {
  flex: 1 1 28%;
  min-height: 11px;
  margin-left: -14%;
  opacity: 0.88;
  mix-blend-mode: screen;
}
.cmyk-swatch:first-child { margin-left: 0; }
.cmyk-swatch--c {
  background: linear-gradient(90deg, var(--cmyk-c), rgba(0, 216, 255, 0.45));
  z-index: 1;
  box-shadow: 12px 0 28px rgba(0, 216, 255, 0.35);
}
.cmyk-swatch--m {
  background: linear-gradient(90deg, rgba(255, 63, 210, 0.55), var(--cmyk-m));
  z-index: 2;
  box-shadow: 12px 0 28px rgba(255, 63, 210, 0.30);
}
.cmyk-swatch--y {
  background: linear-gradient(90deg, rgba(255, 228, 74, 0.50), var(--cmyk-y));
  z-index: 3;
  box-shadow: 10px 0 24px rgba(255, 228, 74, 0.22);
}
.cmyk-swatch--k {
  background: linear-gradient(90deg, rgba(8, 10, 14, 0.40), #0a0d12 55%, #050608);
  z-index: 4;
  mix-blend-mode: normal;
  opacity: 0.96;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* ─── Header ────────────────────────────────────────────────────── */
.site-header {
  flex-shrink: 0;
  padding-block: 1.25rem;
  border-bottom: 2px solid var(--line);
  background: linear-gradient(140deg, #101723 0%, #0d131d 100%);
  box-shadow:
    inset 0 0 0 1px rgba(0, 216, 255, 0.14),
    0 3px 0 rgba(255, 63, 210, 0.10);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-header__top {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 0.65rem;
}

.brand-mark {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  text-decoration: none;
  box-shadow:
    inset 0 0 0 1px rgba(0, 216, 255, 0.35),
    0 6px 24px rgba(0, 0, 0, 0.45),
    0 0 0 3px rgba(0, 216, 255, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.brand-mark:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 0 0 1px rgba(0, 216, 255, 0.50),
    0 10px 28px rgba(0, 216, 255, 0.18),
    0 0 0 3px rgba(0, 216, 255, 0.14);
}
.brand-mark:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.brand-mark picture { display: block; line-height: 0; }

.brand-mark__img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: var(--radius-xs);
  background: #ffffff;
}

.site-header__copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.brand-stratum {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(0, 216, 255, 0.78);
}

.tagline {
  margin: 0;
  max-width: 58ch;
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--ink-soft);
  font-weight: 500;
}

.language-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(0, 216, 255, 0.36);
  border-radius: 999px;
  background: rgba(7, 11, 17, 0.72);
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 700;
}

.language-toggle select {
  border: 0;
  border-radius: 999px;
  background: var(--cmyk-c);
  color: #031017;
  font: inherit;
  font-weight: 800;
  padding: 0.25rem 0.55rem;
}

@media (max-width: 640px) {
  .site-header__inner { gap: 0.9rem; flex-wrap: wrap; }
  .brand-mark__img { width: 56px; height: 56px; }
  .tagline { font-size: 0.92rem; }
  .site-header__top { margin-bottom: 0.5rem; }
}

/* ─── Error banner ──────────────────────────────────────────────── */
.banner-error {
  margin: 1rem 0 0;
  padding: 0.7rem 1rem;
  background: rgba(255, 107, 107, 0.10);
  color: var(--err);
  border-left: 3px solid var(--err);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  font-size: 0.95rem;
}

/* ─── Main layout ───────────────────────────────────────────────── */
.page-main {
  flex: 1;
  padding-block: 1.75rem 2.5rem;
  isolation: isolate;
}
.page-main:focus { outline: none; }

.layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
}

@media (min-width: 1100px) {
  .layout--with-results {
    grid-template-columns: minmax(0, 1.25fr) var(--flow-gutter) minmax(360px, 1fr);
    column-gap: 0;
    row-gap: 1.25rem;
    /* NOTE: intentionally no `align-items: start`.
       The aside must stretch to the grid row's full height so the
       sticky summary inside it has travel room. */
  }
  .layout--with-results .layout__primary { grid-column: 1; align-self: start; }
  .layout--with-results .layout__aside   { grid-column: 3; /* stretches by default */ }
}

.layout__primary { min-width: 0; display: flex; flex-direction: column; gap: 1.25rem; }
.layout__aside   { min-width: 0; }

/* ─── Flow overlay (per-model logit → summary pipelines) ────────── */
.flow-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
  filter: drop-shadow(0 0 3px rgba(0, 216, 255, 0.18));
}
.layout--with-results > .layout__primary,
.layout--with-results > .layout__aside { position: relative; z-index: 1; }

@media (max-width: 1099.98px) {
  .flow-overlay { display: none; }
  .layout--with-results {
    grid-template-columns: minmax(0, 1fr);
  }
  .layout--with-results .layout__primary,
  .layout--with-results .layout__aside { grid-column: auto; }
}

/* ─── Panels (cognitive surfaces) ───────────────────────────────── */
.panel {
  position: relative;
  --ink: var(--surface-ink);
  --ink-soft: #33465c;
  --muted: var(--surface-muted);
  --line: var(--surface-line);
  --line-soft: #edf2f7;
  --panel: #ffffff;
  --panel-highlight: var(--surface-soft);
  color: var(--ink);
  background: linear-gradient(160deg, var(--surface) 0%, #ffffff 58%, #f3f7fc 100%);
  border: 1px solid rgba(219, 228, 239, 0.95);
  border-radius: var(--radius);
  padding: 1.45rem;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85),
    6px 6px 0 rgba(0, 216, 255, 0.13),
    10px 10px 0 rgba(255, 63, 210, 0.055),
    0 18px 46px rgba(14, 26, 42, 0.14);
}

@media (min-width: 640px) {
  .panel { padding: 1.75rem 1.9rem; }
}

.panel__header { margin-bottom: 1rem; }

.panel-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.01em;
}

.panel-intro {
  margin: 0.35rem 0 0;
  font-size: 0.94rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* Panel variants — CMYK accent edges (signal-flow coding) */
.panel--form {
  border-top: 4px solid var(--cmyk-c);
  border-left: 3px solid rgba(255, 63, 210, 0.75);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9),
    6px 6px 0 rgba(0, 216, 255, 0.13),
    10px 10px 0 rgba(255, 63, 210, 0.06),
    inset 3px 0 0 rgba(255, 228, 74, 0.20);
}

.panel--results {
  border-top: 4px solid var(--cmyk-c);
  border-right: 2px solid rgba(0, 216, 255, 0.35);
}

.panel--highlights {
  border-top: 4px dashed var(--cmyk-m);
  border-left: 2px dotted var(--cmyk-c);
}

.panel--summary {
  border: 2px solid var(--line);
  border-top: 4px solid var(--cyan);
  border-left: 3px dashed var(--cmyk-m);
  border-right: 2px dotted var(--cmyk-y);
  padding-left: 1.4rem;
  background:
    radial-gradient(circle at 100% 0%, rgba(0, 216, 255, 0.13), transparent 34%),
    radial-gradient(circle at 0% 100%, rgba(255, 63, 210, 0.10), transparent 32%),
    linear-gradient(152deg, transparent 55%, rgba(0, 216, 255, 0.07) 100%),
    repeating-linear-gradient(-11deg, transparent, transparent 14px,
      rgba(255, 63, 210, 0.05) 14px, rgba(255, 63, 210, 0.05) 15px),
    linear-gradient(135deg, #ffffff 0%, #f7fbff 45%, #eef5fb 100%);
  box-shadow:
    0 0 0 1px rgba(126, 254, 240, 0.20),
    6px 6px 0 rgba(0, 216, 255, 0.14),
    10px 10px 0 rgba(255, 63, 210, 0.06),
    0 0 56px rgba(0, 216, 255, 0.10);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* ── Sticky summary (desktop) ──────────────────────────────────────
 * The summary panel itself is the sticky element. Its containing
 * block is the <aside>, whose sticky scope spans the full layout
 * grid row (tall because of the primary column). Max-height is
 * capped to the viewport so the panel never bleeds past the top
 * or bottom edge. Internal scroll lives on the body, not the panel.
 * ──────────────────────────────────────────────────────────────── */
@media (min-width: 1100px) {
  .layout--with-results .panel--summary {
    position: sticky;
    top: var(--aside-top);
    max-height: calc(100vh - var(--aside-top) * 2);
    min-height: 0;
  }
  .layout--with-results .panel--summary .panel__header { flex-shrink: 0; }
  .layout--with-results .panel--summary .summary-placeholder,
  .layout--with-results .panel--summary .summary-body {
    overflow-y: auto;
    min-height: 0;
    padding-right: 0.25rem;
    scrollbar-color: var(--line) transparent;
    scrollbar-width: thin;
  }
  .layout--with-results .panel--summary .summary-body { flex: 1 1 auto; }
}

.panel--summary::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 6px;
  background: repeating-linear-gradient(
    0deg,
    var(--cmyk-c), var(--cmyk-c) 2px,
    transparent 2px, transparent 5px
  );
  opacity: 0.35;
  border-radius: var(--radius) 0 0 var(--radius);
  pointer-events: none;
}

/* ─── Form fields ───────────────────────────────────────────────── */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.field__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.field__hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

textarea,
input[type="url"],
input[type="text"],
select {
  width: 100%;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  padding: 0.72rem 0.85rem;
  font: inherit;
  box-shadow: inset 0 1px 3px rgba(15, 31, 52, 0.06);
}
textarea:focus,
input[type="url"]:focus,
input[type="text"]:focus,
select:focus {
  outline: none;
  border-color: rgba(46, 196, 255, 0.55);
  box-shadow:
    inset 0 1px 3px rgba(15, 31, 52, 0.06),
    0 0 0 3px rgba(46, 196, 255, 0.14);
}
textarea {
  resize: vertical;
  min-height: 200px;
  max-height: 60vh;
  font-family: var(--font-body);
  line-height: 1.55;
}

.field-group {
  border: 1px dashed var(--line);
  border-radius: var(--radius-xs);
  margin: 0 0 1rem;
  padding: 1rem 1.1rem 1.1rem;
  background: rgba(255, 255, 255, 0.62);
}

.field-group legend {
  padding: 0 0.4rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.field-group__intro {
  margin: 0 0 0.8rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.checkbox-grid {
  display: grid;
  gap: 0.65rem 1rem;
}
@media (min-width: 560px) {
  .checkbox-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 780px) {
  .checkbox-grid--model-groups { grid-template-columns: repeat(3, 1fr); }
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--ink);
}
.checkbox input[type="checkbox"] {
  accent-color: var(--cmyk-c);
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}
.checkbox--block { display: flex; }

.checkbox--model-group {
  align-items: flex-start;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  background: #ffffff;
}
.checkbox--model-group strong,
.checkbox--model-group small {
  display: block;
}
.checkbox--model-group small {
  margin-top: 0.22rem;
  color: var(--muted);
  line-height: 1.35;
}

.options-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem 1.25rem;
  margin-bottom: 0.9rem;
  align-items: end;
}
@media (min-width: 640px) {
  .options-row {
    grid-template-columns:
      minmax(9rem, auto)
      minmax(9rem, auto)
      minmax(0, 1fr);
  }
}

.field--inline {
  gap: 0.3rem;
  margin-bottom: 0;
  min-width: 0;
}
.field--inline select,
.field--inline input[type="text"] {
  padding-block: 0.5rem;
  width: 100%;
}
.options-row .checkbox--block {
  justify-self: start;
  padding-top: 0.25rem;
}

.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px dotted var(--line);
}
.checkbox-row__label {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-right: 0.25rem;
}

.form-actions {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.4rem;
  font-weight: 600;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  border-radius: var(--radius-xs);
  cursor: pointer;
  text-decoration: none;
  transition: filter 0.12s ease, transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.btn-primary {
  background: linear-gradient(180deg, var(--cyan) 0%, #42d8c8 100%);
  color: #061016;
  border: 1px solid rgba(0, 216, 255, 0.70);
  box-shadow:
    0 2px 0 rgba(0, 216, 255, 0.35),
    4px 4px 0 rgba(0, 216, 255, 0.14),
    0 10px 26px rgba(0, 216, 255, 0.18);
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:active { transform: translateY(1px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35); }
.btn-primary:focus-visible { outline: 2px solid var(--cmyk-m); outline-offset: 3px; }

.btn-secondary {
  background:
    linear-gradient(135deg, rgba(0, 216, 255, 0.08), rgba(255, 255, 255, 0.92) 44%, rgba(255, 63, 210, 0.08));
  color: #193049;
  border: 1px dashed rgba(255, 63, 210, 0.42);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.56),
    2px 2px 0 rgba(0, 216, 255, 0.10);
}
.btn-secondary:hover {
  color: #07121f;
  border-color: rgba(255, 63, 210, 0.55);
  background:
    linear-gradient(135deg, rgba(0, 216, 255, 0.13), rgba(255, 255, 255, 0.96) 42%, rgba(255, 63, 210, 0.13));
}
.btn-secondary:active { transform: translateY(1px); }
.btn-secondary:focus-visible { outline: 2px solid var(--cmyk-m); outline-offset: 3px; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.95rem;
  font-weight: 600;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(126, 254, 240, 0.36);
  background: #101722;
  color: #eef5ff;
  cursor: pointer;
  transition: filter 0.12s ease, border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}
.btn-ghost:hover {
  color: #ffffff;
  border-color: rgba(0, 216, 255, 0.45);
  background: #142132;
}
.btn-ghost:active { transform: translateY(1px); }
.btn-ghost:focus-visible { outline: 2px solid var(--cmyk-m); outline-offset: 2px; }
.btn-ghost:disabled {
  opacity: 0.62;
  color: #9fb0c8;
  cursor: not-allowed;
}
.btn-ghost--quiet {
  color: #d2dbea;
  border-style: dashed;
  background: #0b111a;
}
.btn-ghost--quiet:hover {
  color: #ffffff;
  border-color: rgba(255, 63, 210, 0.45);
  background: #191324;
}

#chat-start {
  border-color: rgba(0, 216, 255, 0.68);
  background:
    linear-gradient(90deg, rgba(0, 216, 255, 0.26), rgba(126, 254, 240, 0.10)),
    #101722;
  color: #f7fbff;
  box-shadow:
    inset 3px 0 0 var(--cmyk-c),
    0 4px 16px rgba(0, 216, 255, 0.12);
}
#chat-start:hover {
  border-color: rgba(126, 254, 240, 0.84);
  background:
    linear-gradient(90deg, rgba(0, 216, 255, 0.34), rgba(126, 254, 240, 0.14)),
    #142132;
}

/* ─── Input modes: onboarding surface ───────────────────────────── */
.input-modes {
  margin-bottom: 1.55rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background:
    radial-gradient(circle at 12% 0%, rgba(0, 216, 255, 0.13), transparent 30%),
    radial-gradient(circle at 92% 18%, rgba(255, 63, 210, 0.11), transparent 30%),
    repeating-linear-gradient(135deg, transparent 0, transparent 11px,
      rgba(0, 216, 255, 0.04) 11px, rgba(0, 216, 255, 0.04) 12px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(244, 247, 251, 0.96) 100%);
  overflow: hidden;
}

.onboarding-note {
  padding: 1rem 1.15rem 0.9rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(255, 228, 74, 0.12), transparent 42%, rgba(0, 216, 255, 0.08));
}
.onboarding-note p {
  margin: 0;
  color: var(--muted);
}
.onboarding-note .eyebrow {
  margin-bottom: 0.25rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.input-tabs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: transparent;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 720px) {
  .input-tabs { grid-template-columns: repeat(3, 1fr); }
}

.input-tab {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(246, 251, 255, 0.96)),
    linear-gradient(90deg, rgba(0, 216, 255, 0.08), rgba(255, 63, 210, 0.08));
  color: var(--ink-soft);
  font-family: var(--font-display);
  text-align: left;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
  position: relative;
}
.input-tab:hover {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(239, 249, 255, 0.98)),
    linear-gradient(90deg, rgba(0, 216, 255, 0.15), rgba(255, 63, 210, 0.11));
  color: var(--ink);
  border-color: rgba(0, 216, 255, 0.42);
}
.input-tab:focus-visible {
  outline: 2px solid var(--cmyk-m);
  outline-offset: -3px;
  z-index: 1;
}
.input-tab[aria-selected="true"] {
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 63, 210, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(0, 216, 255, 0.18) 0%, rgba(255, 255, 255, 0.95) 100%);
  color: var(--ink);
  border-color: rgba(0, 216, 255, 0.36);
  box-shadow: 3px 3px 0 rgba(255, 228, 74, 0.18);
}
.input-tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cmyk-c), var(--cmyk-m) 60%, var(--cmyk-y));
}

.input-tab__label {
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.input-tab__sub {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--muted);
}
.input-tab[aria-selected="true"] .input-tab__sub { color: var(--ink-soft); }

.input-panel {
  padding: 1.35rem 1.35rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.input-panel[hidden] { display: none; }
.input-panel.is-muted {
  opacity: 0.58;
}
.input-panel.is-muted textarea,
.input-panel.is-muted input {
  cursor: not-allowed;
}

.input-panel__header h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
}
.input-panel__header p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ─── Chat partner choice ───────────────────────────────────────── */
.chat-partner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
}
@media (min-width: 640px) {
  .chat-partner { grid-template-columns: 1fr 1fr; }
}

.partner-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.7rem 0.85rem 0.8rem 2.2rem;
  border: 1px solid rgba(159, 176, 200, 0.22);
  border-radius: var(--radius-xs);
  background: #0b111a;
  color: #c3cede;
  cursor: pointer;
  opacity: 0.86;
  transition: border-color 0.14s ease, background 0.14s ease, color 0.14s ease, opacity 0.14s ease, box-shadow 0.14s ease;
}
.partner-card input[type="radio"] {
  position: absolute;
  left: 0.85rem;
  top: 0.9rem;
  width: 14px;
  height: 14px;
  accent-color: var(--cyan);
}
.partner-card:hover {
  border-color: rgba(126, 254, 240, 0.36);
  background: #101722;
  opacity: 1;
}
.partner-card:has(input:checked) {
  border-style: solid;
  border-color: rgba(126, 254, 240, 0.82);
  background:
    linear-gradient(90deg, rgba(0, 216, 255, 0.24), rgba(126, 254, 240, 0.10)),
    #101722;
  color: #f7fbff;
  opacity: 1;
  box-shadow:
    inset 4px 0 0 var(--cmyk-c),
    0 0 0 1px rgba(0, 216, 255, 0.12),
    0 8px 22px rgba(0, 216, 255, 0.12);
}
.partner-card__title {
  font-family: var(--font-display);
  font-weight: 600;
  color: #dbe5f4;
  font-size: 0.95rem;
}
.partner-card:has(input:checked) .partner-card__title { color: #ffffff; }
.partner-card__sub {
  font-size: 0.82rem;
  color: #9fb0c8;
  line-height: 1.45;
}
.partner-card:has(input:checked) .partner-card__sub { color: #cdefff; }

.interview-length {
  max-width: 18rem;
}
.interview-length input {
  background: #ffffff;
  color: #132033;
}

.chat-progress {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
  padding: 0.85rem;
  border: 1px solid rgba(126, 254, 240, 0.26);
  border-radius: var(--radius-xs);
  background: #0d141f;
}
.chat-progress__item {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  min-width: 0;
}
.chat-progress__summary {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.6rem;
  align-items: baseline;
  padding: 0.1rem 0 0.35rem;
  border-bottom: 1px solid rgba(126, 254, 240, 0.18);
}
.chat-progress__summary span,
.chat-progress__item span {
  color: #9fb0c8;
  font-size: 0.74rem;
}
.chat-progress__summary strong,
.chat-progress__item strong {
  color: #f4f8ff;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
}
.chat-progress__summary em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5.8rem;
  padding: 0.18rem 0.48rem;
  border: 1px solid rgba(255, 228, 74, 0.34);
  border-radius: 999px;
  color: #ffeaa0;
  background: rgba(255, 228, 74, 0.08);
  font-style: normal;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.chat-progress__summary em[data-level="moderate"] {
  border-color: rgba(0, 216, 255, 0.38);
  color: #9eefff;
  background: rgba(0, 216, 255, 0.09);
}
.chat-progress__summary em[data-level="conclusive"] {
  border-color: rgba(126, 254, 240, 0.48);
  color: #bafff7;
  background: rgba(126, 254, 240, 0.12);
}
.chat-progress__row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
}
.progress-bar {
  height: 0.45rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.progress-bar span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cmyk-c), var(--cmyk-m) 72%, var(--cmyk-y));
  transition: width 0.35s ease;
}

.persona-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.75rem 0.85rem 0.85rem;
  border-left: 3px dotted var(--cmyk-m);
  background: rgba(255, 63, 210, 0.04);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
}
.persona-field[hidden] { display: none; }
.persona-field textarea { resize: vertical; min-height: 70px; }

/* ─── Chat window ───────────────────────────────────────────────── */
.chat-window {
  border: 1px solid rgba(126, 254, 240, 0.24);
  border-radius: var(--radius-xs);
  background:
    repeating-linear-gradient(-12deg, transparent 0, transparent 18px,
      rgba(255, 228, 74, 0.028) 18px, rgba(255, 228, 74, 0.028) 19px),
    linear-gradient(180deg, #0b1018 0%, #080c13 100%);
  padding: 0.85rem 0.9rem;
  min-height: 140px;
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  scrollbar-color: var(--line) transparent;
  scrollbar-width: thin;
}
.chat-window[data-empty="true"] {
  justify-content: center;
  align-items: center;
  text-align: center;
}
.chat-empty {
  color: #b9c7dc;
  font-size: 0.88rem;
  margin: 0;
  max-width: 36ch;
}
.chat-empty em { color: #eef5ff; font-style: normal; font-weight: 600; }

.chat-bubble {
  max-width: min(90%, 52ch);
  padding: 0.55rem 0.75rem 0.6rem;
  border-radius: 10px;
  font-size: 0.92rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.chat-bubble--you {
  align-self: flex-end;
  background: linear-gradient(180deg, rgba(0, 216, 255, 0.24) 0%, rgba(0, 216, 255, 0.12) 100%);
  border: 1px solid rgba(0, 216, 255, 0.48);
  color: #f7fbff;
  border-bottom-right-radius: 3px;
}
.chat-bubble--ai {
  align-self: flex-start;
  background: rgba(255, 63, 210, 0.12);
  border: 1px dashed rgba(255, 63, 210, 0.50);
  color: #f1f6ff;
  border-bottom-left-radius: 3px;
}
.chat-bubble--synthetic {
  border-style: solid;
  box-shadow: inset 3px 0 0 rgba(255, 228, 74, 0.62);
}
.chat-bubble--system {
  max-width: min(96%, 68ch);
  color: #c7d3e4;
  font-size: 0.86rem;
}
.chat-bubble--belief {
  align-self: flex-start;
  max-width: min(92%, 62ch);
  padding-block: 0.45rem;
  color: rgba(236, 241, 250, 0.92);
  font-size: 0.82rem;
  font-style: italic;
  background: rgba(255, 228, 74, 0.055);
  border: 1px solid rgba(255, 228, 74, 0.22);
  border-left: 3px solid rgba(255, 228, 74, 0.55);
}
.chat-bubble--thought {
  align-self: flex-start;
  max-width: min(94%, 68ch);
  color: rgba(238, 245, 255, 0.88);
  font-size: 0.84rem;
  background: rgba(126, 254, 240, 0.055);
  border: 1px solid rgba(126, 254, 240, 0.22);
  border-left: 3px solid rgba(126, 254, 240, 0.55);
}
/* Meta-cognitive frame: outer “reflection on reflection”, inner nested thought bubble */
.chat-bubble--thought-nested {
  padding: 0.65rem 0.75rem 0.75rem;
  background: linear-gradient(165deg, rgba(126, 254, 240, 0.07) 0%, rgba(80, 120, 200, 0.04) 100%);
  border: 1px solid rgba(126, 254, 240, 0.28);
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.chat-bubble__meta-shell {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.chat-bubble__meta-label {
  font-family: var(--font-display, system-ui, sans-serif);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(126, 254, 240, 0.75);
  padding: 0.15rem 0.2rem 0;
}
.chat-bubble__meta-inner-wrap {
  padding: 0.35rem 0.4rem 0.45rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px dashed rgba(126, 254, 240, 0.35);
}
.chat-bubble__meta-inner {
  margin: 0;
  padding: 0.5rem 0.65rem 0.55rem;
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1.5;
  color: rgba(230, 238, 252, 0.92);
  background: rgba(126, 254, 240, 0.06);
  border: 1px solid rgba(126, 254, 240, 0.2);
  border-bottom-left-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  white-space: pre-wrap;
  word-wrap: break-word;
}
.chat-bubble--context {
  align-self: flex-start;
  max-width: min(94%, 68ch);
  color: rgba(236, 241, 250, 0.92);
  font-size: 0.84rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(126, 254, 240, 0.22);
  border-left: 3px solid rgba(126, 254, 240, 0.55);
}
.chat-context-note {
  align-self: flex-start;
  max-width: min(92%, 62ch);
  color: var(--muted);
  font-size: 0.82rem;
}
.chat-context-note summary {
  display: inline-flex;
  width: 1.35rem;
  height: 1.35rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(126, 254, 240, 0.34);
  border-radius: 999px;
  color: var(--cyan);
  cursor: pointer;
  font-family: var(--font-display);
  font-style: italic;
  list-style: none;
  background: rgba(126, 254, 240, 0.055);
}
.chat-context-note summary::-webkit-details-marker {
  display: none;
}
.chat-context-note__body {
  margin-top: 0.35rem;
  padding: 0.45rem 0.65rem;
  border-left: 2px solid rgba(126, 254, 240, 0.24);
  color: rgba(200, 212, 232, 0.78);
  font-style: italic;
  background: rgba(255, 255, 255, 0.025);
  border-radius: var(--radius-xs);
}
.chat-bubble--thinking {
  align-self: flex-start;
  color: #c7d3e4;
  font-style: italic;
  border: 1px dotted var(--line);
  background: rgba(255, 255, 255, 0.02);
  white-space: nowrap;
  display: inline-flex;
  align-items: baseline;
}
.chat-bubble--thinking::after {
  content: "...";
  display: inline-block;
  width: 0ch;
  margin-left: 0.2rem;
  text-align: left;
  overflow: hidden;
  white-space: nowrap;
  animation: chat-dots-reveal 1.1s steps(4, end) infinite;
}
@keyframes chat-dots-reveal {
  0%, 20%   { width: 0ch; }
  40%       { width: 1ch; }
  60%       { width: 2ch; }
  80%, 100% { width: 3ch; }
}

.chat-composer {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.chat-composer textarea {
  resize: vertical;
  min-height: 60px;
  background: #ffffff;
  color: #132033;
}
.chat-composer textarea:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.chat-composer__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.chat-meta {
  color: #4d6077;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.chat-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.chat-error {
  margin: 0;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(255, 107, 107, 0.35);
  background: rgba(255, 107, 107, 0.08);
  color: #ffbcbc;
  font-size: 0.85rem;
}

.error { color: var(--err); }
.meta  { color: var(--muted); font-size: 0.88rem; margin: 0; }

/* ─── Results: model blocks ─────────────────────────────────────── */
.panel--results .model-block + .model-block { margin-top: 1rem; }

.model-block {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.2rem 1.25rem 1.35rem;
  background:
    radial-gradient(circle at 100% 0%, rgba(0, 216, 255, 0.10), transparent 32%),
    radial-gradient(circle at 0% 100%, rgba(255, 63, 210, 0.08), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    3px 3px 0 rgba(0, 216, 255, 0.08);
}

/* Micro-square ornament — weak evidence unit */
.model-block::after {
  content: "";
  position: absolute;
  bottom: 11px; right: 14px;
  width: 5px; height: 5px;
  background: rgba(255, 228, 74, 0.16);
  transform: rotate(9deg);
  pointer-events: none;
}

.model-block__accent {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  pointer-events: none;
}

.model-block--c1 { border-left: 3px dotted var(--cmyk-c); }
.model-block--c2 { border-left: 3px dotted var(--cmyk-m); }
.model-block--c3 { border-left: 3px dotted var(--cmyk-y); }
.model-block--c4 { border-left: 3px dotted var(--cmyk-k); }

.model-block--c1 .model-block__accent { background: linear-gradient(180deg, var(--cmyk-c), rgba(0, 216, 255, 0.32)); }
.model-block--c2 .model-block__accent { background: linear-gradient(180deg, var(--cmyk-m), rgba(255, 63, 210, 0.32)); }
.model-block--c3 .model-block__accent { background: linear-gradient(180deg, var(--cmyk-y), rgba(255, 228, 74, 0.35)); }
.model-block--c4 .model-block__accent { background: linear-gradient(180deg, var(--cmyk-k), rgba(107, 119, 136, 0.35)); }

.model-block__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
  letter-spacing: 0.01em;
}

.model-block__description,
.model-block__note {
  margin: 0.25rem 0 0.8rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.model-block__subtitle {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 1rem 0 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.source-detail {
  margin-top: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  background:
    linear-gradient(90deg, rgba(0, 216, 255, 0.055), rgba(255, 255, 255, 0.78) 40%, rgba(255, 228, 74, 0.045));
  overflow: hidden;
}
.source-detail summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0.9rem;
  cursor: pointer;
  font-weight: 600;
}
.source-detail summary::after {
  content: "Expand";
  flex: 0 0 auto;
  color: var(--surface-muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.source-detail[open] summary::after {
  content: "Collapse";
}
.source-detail summary small {
  color: var(--muted);
  font-weight: 500;
}
.source-detail[open] {
  padding: 0 0.9rem 0.9rem;
}
.source-detail[open] summary {
  margin-inline: -0.9rem;
  margin-bottom: 0.2rem;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(0, 216, 255, 0.13), rgba(244, 247, 251, 0.94) 52%, rgba(255, 63, 210, 0.08));
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

th, td {
  text-align: left;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  color: #e9f2ff;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(8, 12, 18, 0.92);
}

.mono { font-family: ui-monospace, monospace; font-size: 0.82rem; }
.num  { font-variant-numeric: tabular-nums; white-space: nowrap; }
.desc { color: var(--ink-soft); font-size: 0.84rem; }

.spikes { font-size: 0.84rem; color: var(--muted); padding-left: 1.1rem; margin: 0.25rem 0 0; }
.spikes li { margin: 0.25rem 0; }

/* ─── Highlights card (at-a-glance) ─────────────────────────────── */
.highlights {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.highlight-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem 1rem;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 228, 74, 0.14), transparent 28%),
    linear-gradient(145deg, var(--panel-highlight) 0%, var(--panel) 100%);
  box-shadow:
    3px 3px 0 rgba(0, 216, 255, 0.15),
    6px 6px 0 rgba(255, 63, 210, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Primitive fragment — cognitive entropy unit (misaligned micro-triangle) */
.highlight-card::before {
  content: "";
  position: absolute;
  top: 10px; right: 12px;
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 7px solid rgba(0, 216, 255, 0.22);
  transform: rotate(22deg);
  pointer-events: none;
}
.highlight-card--nature::before {
  border-bottom-color: rgba(255, 63, 210, 0.24);
  transform: rotate(-14deg);
}

.highlight-card--skills {
  border-top: 3px solid var(--cmyk-c);
  border-left: 2px dotted var(--cmyk-c);
}
.highlight-card--nature {
  border-top: 3px solid var(--cmyk-m);
  border-left: 2px dotted var(--cmyk-m);
}

.highlight-card__title {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.highlight-card__sub {
  margin: 0.2rem 0 0.7rem;
  font-size: 0.76rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cmyk-tick {
  display: inline-block;
  width: 14px;
  height: 3px;
  background: linear-gradient(90deg, var(--cmyk-c), var(--cyan));
  border-radius: 1px;
}
.cmyk-tick--m { background: linear-gradient(90deg, var(--cmyk-m), var(--cmyk-y)); }

.highlight-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.86rem;
}
.highlight-list--tight { gap: 0.3rem; }

.highlight-list li {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 0.45rem;
  align-items: baseline;
  padding: 0.4rem 0.55rem;
  border-left: 2px dotted var(--cyan);
  background: linear-gradient(90deg, rgba(126, 254, 240, 0.16), rgba(255, 255, 255, 0.32) 65%, rgba(255, 228, 74, 0.06));
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
}
.highlight-list li .chip-desc {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}
.highlight-list--tight li {
  grid-template-columns: auto 1fr;
  padding: 0.3rem 0.5rem;
}

.chip-id {
  font-family: ui-monospace, monospace;
  font-size: 0.74rem;
  color: var(--muted);
}
.chip-meta {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 0.74rem;
}
.chip-label { color: var(--ink-soft); }

.nature-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
@media (min-width: 460px) {
  .nature-split { grid-template-columns: 1fr 1fr; }
}

.nature-split__title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 0.4rem;
}

.highlight-card__empty {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  font-style: italic;
}
.highlight-card__empty--inline { margin: 0.25rem 0 0; }

/* ─── Summary panel ─────────────────────────────────────────────── */
.summary-lead {
  font-size: 0.94rem;
  color: var(--ink-soft);
  margin: 0.45rem 0 0;
  line-height: 1.55;
}

.summary-placeholder { margin-top: 0.85rem; }
.summary-muted { color: var(--muted); font-size: 0.92rem; margin: 0; line-height: 1.55; }

.summary-body .summary-headline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  margin: 0 0 1rem;
  line-height: 1.45;
  padding-bottom: 0.75rem;
  border-bottom: 1px dotted var(--line);
}

.summary-sub {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin: 1rem 0 0.4rem;
}

.summary-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.summary-list li { margin: 0.4rem 0; }
.summary-list--muted li { color: var(--muted); }

.summary-caveat {
  font-size: 0.84rem;
  color: var(--muted);
  margin: 1rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--line);
  font-style: italic;
}

.summary-error { color: var(--err); margin: 0 0 0.5rem; }

/* Structured loader — emergent-consolidation motif (3-beat pulse that loops
   until the API returns, then hands off to the resolved summary text). */
#summary-narrative.is-loading .summary-placeholder { display: block; }

.summary-loader {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.55rem;
  border-left: 2px dotted var(--cmyk-c);
  background: linear-gradient(90deg, rgba(0, 216, 255, 0.09), transparent);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.3;
}

.summary-loader__label { font-weight: 500; }

.summary-loader__dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
.summary-loader__dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cmyk-c);
  opacity: 0.35;
  animation: inference-consolidate 1.1s ease-in-out infinite;
}
.summary-loader__dots span:nth-child(2) {
  background: var(--cmyk-m);
  animation-delay: 0.18s;
}
.summary-loader__dots span:nth-child(3) {
  background: var(--cmyk-y);
  animation-delay: 0.36s;
}

@keyframes inference-consolidate {
  0%, 100% { transform: scale(0.85); opacity: 0.35; }
  40%      { transform: scale(1.25); opacity: 1; }
}

.summary-retry-row { margin: 0.9rem 0 0; }
.summary-retry { font-size: 0.88rem; padding: 0.45rem 1rem; }

/* Character-reveal affordance: soft cyan caret glow while summary text is
   being progressively written in. Removed automatically when reveal ends. */
.summary-body.is-revealing {
  position: relative;
  caret-color: var(--cmyk-c);
}
.summary-body.is-revealing::after {
  content: "";
  position: absolute;
  right: 0.75rem;
  top: 0.4rem;
  width: 2px;
  height: 1rem;
  background: var(--cmyk-c);
  box-shadow: 0 0 6px rgba(0, 216, 255, 0.55);
  animation: summary-caret 0.65s steps(2, start) infinite;
  pointer-events: none;
}
@keyframes summary-caret {
  to { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .summary-loader__dots span { animation: none; opacity: 0.85; }
  .summary-body.is-revealing::after { animation: none; opacity: 0.35; }
}

/* ─── Footer ────────────────────────────────────────────────────── */
.site-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding-block: 1.5rem 1.75rem;
  border-top: 2px solid var(--line);
  background: linear-gradient(180deg, rgba(18, 24, 32, 0.99) 0%, var(--paper) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 -12px 40px rgba(0, 0, 0, 0.25);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  justify-content: space-between;
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.site-footer__brand picture { display: block; line-height: 0; }

.site-footer__mark {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: var(--radius-xs);
  background: #ffffff;
  padding: 4px;
  box-shadow: inset 0 0 0 1px rgba(0, 216, 255, 0.22);
}

.site-footer__lead {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--ink-soft);
  max-width: 44ch;
}

.site-footer__cta {
  display: inline-block;
  padding: 0.55rem 1.2rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  color: #061016;
  background: linear-gradient(180deg, var(--cyan) 0%, #4dd9c8 100%);
  border: 1px solid rgba(126, 254, 240, 0.45);
  border-radius: var(--radius-xs);
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
.site-footer__cta:hover { filter: brightness(1.06); }
.site-footer__cta:focus-visible { outline: 2px solid var(--cmyk-m); outline-offset: 2px; }

/* ─── Inline code ───────────────────────────────────────────────── */
code {
  font-size: 0.85em;
  background: rgba(46, 196, 255, 0.12);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  border: 1px solid rgba(46, 196, 255, 0.15);
}
