:root {
  color-scheme: light;
  --ink: #25223b;
  --muted: #716c83;
  --subtle: #9b96aa;
  --paper: #f8f5ef;
  --paper-deep: #f0ebe2;
  --card: rgba(255, 255, 255, .92);
  --white: #fff;
  --border: #e5dfd6;
  --border-strong: #d8d0c4;
  --indigo: #5b50d6;
  --indigo-dark: #4035ad;
  --indigo-soft: #efedff;
  --teal: #168c80;
  --teal-soft: #e3f6f1;
  --amber: #c47a16;
  --amber-soft: #fff0d7;
  --rose: #bb4f6d;
  --rose-soft: #fdebf0;
  --shadow: 0 16px 42px rgba(56, 43, 28, .08);
  --shadow-soft: 0 8px 22px rgba(56, 43, 28, .06);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { min-width: 320px; scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 82% 4%, rgba(251, 211, 147, .25), transparent 24rem),
    linear-gradient(135deg, #faf8f3 0%, #f7f3ec 52%, #f4efe7 100%);
  line-height: 1.5;
}

button, textarea, input { font: inherit; }
button { color: inherit; }
a { color: inherit; }

button:focus-visible, a:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid rgba(91, 80, 214, .34);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: .75rem;
  left: .75rem;
  transform: translateY(-180%);
  padding: .7rem 1rem;
  border-radius: 10px;
  background: var(--ink);
  color: var(--white);
}
.skip-link:focus { transform: none; }

.workspace-shell {
  min-height: 100vh;
  display: grid;
  grid-template: 76px minmax(0, 1fr) / 252px minmax(0, 1fr);
}

.topbar {
  grid-column: 1 / -1;
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 76px;
  border-bottom: 1px solid rgba(216, 208, 196, .75);
  background: rgba(250, 248, 243, .87);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  height: 100%;
  padding: 0 1.5rem;
  text-decoration: none;
  border-right: 1px solid rgba(216, 208, 196, .75);
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--indigo);
  color: white;
  box-shadow: 0 7px 18px rgba(91, 80, 214, .24);
}
.brand__mark svg { width: 24px; fill: currentColor; }
.brand strong { display: block; font-size: 1.05rem; font-weight: 750; line-height: 1.05; letter-spacing: -.02em; }
.brand small { display: block; margin-top: .2rem; color: var(--muted); font-size: .69rem; }

.mode-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: .45rem; padding: 0 1rem; }
.mode-pill {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .42rem .7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  color: var(--muted);
  font-size: .7rem;
  font-weight: 700;
}
.mode-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 3px rgba(22, 140, 128, .13); }
.mode-pill--synthetic { color: var(--teal); border-color: rgba(22, 140, 128, .22); background: var(--teal-soft); }
.mode-pill--simulated { color: var(--amber); border-color: rgba(196, 122, 22, .22); background: var(--amber-soft); }

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  cursor: pointer;
}
.topbar > .icon-button { margin-right: 1.35rem; }
.icon-button:hover { border-color: var(--indigo); color: var(--indigo); }
.icon-button svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.sidebar {
  position: sticky;
  top: 76px;
  height: calc(100vh - 76px);
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  overflow-y: auto;
  padding: 1.5rem 1rem 1.2rem;
  border-right: 1px solid rgba(216, 208, 196, .75);
  background: rgba(246, 242, 235, .68);
}
.sidebar__section { padding: 0 .35rem; }
.eyebrow { margin: 0 0 .45rem; color: var(--subtle); font-size: .67rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }

.scenario-switcher { display: grid; gap: .5rem; }
.scenario-button {
  position: relative;
  width: 100%;
  padding: .75rem .8rem .75rem 1rem;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.scenario-button::before { content: ""; position: absolute; top: .85rem; bottom: .85rem; left: .35rem; width: 3px; border-radius: 4px; background: var(--scenario-accent, var(--indigo)); opacity: .28; }
.scenario-button strong { display: block; margin-bottom: .2rem; font-size: .76rem; }
.scenario-button small { display: block; color: var(--muted); font-size: .64rem; line-height: 1.4; }
.scenario-button:hover { background: rgba(255,255,255,.62); }
.scenario-button.is-active { border-color: var(--border); background: var(--white); box-shadow: var(--shadow-soft); }
.scenario-button.is-active::before { opacity: 1; }

.contour-nav { display: grid; gap: .4rem; }
.contour-button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: .65rem;
  width: 100%;
  padding: .68rem .72rem;
  border: 0;
  border-radius: 14px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.contour-button:hover { background: rgba(255,255,255,.62); }
.contour-button.is-active { background: var(--indigo-soft); color: var(--indigo-dark); }
.contour-button__icon { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 11px; background: var(--white); }
.contour-button__icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contour-button strong { font-size: .76rem; }
.contour-button .nav-count { min-width: 22px; padding: .15rem .35rem; border-radius: 99px; background: rgba(255,255,255,.85); color: var(--muted); font-size: .64rem; text-align: center; }
.sidebar__footer { margin-top: auto; padding: 1rem .45rem 0; border-top: 1px solid var(--border); }
.restart-note { display: flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .66rem; }
.restart-note svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; }

.workspace-main { min-width: 0; padding: 2rem clamp(1rem, 3vw, 3rem) 3.5rem; }
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 118px;
  max-width: 1480px;
  margin: 0 auto 1.3rem;
  padding: 1.25rem clamp(1.25rem, 2.4vw, 2.2rem);
  overflow: hidden;
  border: 1px solid #ded8fe;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 86% 18%, rgba(255,255,255,.52), transparent 14rem),
    linear-gradient(126deg, #eeebff 0%, #f6f1ff 48%, #ffedd6 100%);
  box-shadow: var(--shadow-soft);
}
.hero::after { content: ""; position: absolute; right: -35px; bottom: -65px; width: 210px; height: 210px; border: 40px solid rgba(255,255,255,.28); border-radius: 50%; }
.hero h1 { max-width: 760px; margin: 0; font-size: clamp(1.5rem, 2.4vw, 2.15rem); font-weight: 750; line-height: 1.08; letter-spacing: -.04em; }
.hero__copy { max-width: 680px; margin: .55rem 0 0; color: #635d78; font-size: .78rem; }
.hero__signal { position: relative; z-index: 1; flex: 0 0 145px; margin-right: 1rem; }
.hero__signal svg { width: 145px; fill: var(--white); stroke: var(--indigo); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 8px 14px rgba(91,80,214,.18)); }

.mobile-tabs { display: none; }
.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1fr) minmax(0, .9fr);
  gap: 1rem;
  max-width: 1480px;
  margin: 0 auto;
  align-items: start;
}
.workstream, .conversation-panel, .result-panel, .activity-section {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-soft);
}
.workstream { padding: 1.2rem; }
.conversation-panel, .result-panel { min-width: 0; min-height: 440px; overflow: hidden; }
.conversation-panel { display: flex; flex-direction: column; height: clamp(440px, calc(100vh - 275px), 620px); }
.section-heading, .panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.section-heading h2, .panel-heading h2 { margin: 0; font-size: 1.02rem; font-weight: 750; line-height: 1.2; letter-spacing: -.02em; }
.count-badge, .revision-chip { padding: .34rem .58rem; border-radius: 999px; background: var(--paper); color: var(--muted); font-size: .65rem; font-weight: 700; }
.section-heading--candidates { margin-top: 1.55rem; }
.text-button { padding: .25rem; border: 0; background: none; color: var(--indigo); font-size: .69rem; font-weight: 700; cursor: pointer; }
.text-button:hover { text-decoration: underline; }

.task-stack { display: grid; gap: .62rem; margin-top: .95rem; }
.task-card {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: .75rem;
  width: 100%;
  padding: .78rem;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--white);
  text-align: left;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.task-card:hover { transform: translateY(-1px); border-color: #cfc7bc; box-shadow: var(--shadow-soft); }
.task-card.is-selected { border-color: var(--indigo); box-shadow: 0 0 0 2px rgba(91,80,214,.1); }
.task-card__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--indigo-soft); color: var(--indigo); }
.task-card[data-status="attention"] .task-card__icon { background: var(--amber-soft); color: var(--amber); }
.task-card[data-status="done"] .task-card__icon { background: var(--teal-soft); color: var(--teal); }
.task-card__icon svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.task-card strong { display: block; font-size: .73rem; line-height: 1.35; }
.task-card small { color: var(--muted); font-size: .62rem; }
.task-card__arrow { color: var(--subtle); font-size: 1.1rem; }

.candidate-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin-top: .9rem; }
.candidate-card { position: relative; min-width: 0; padding: .85rem; border: 1px solid var(--border); border-radius: 16px; background: var(--white); cursor: pointer; }
.candidate-card:hover, .candidate-card.is-selected { border-color: var(--indigo); }
.candidate-card.is-stale { border-color: #ecc5cf; background: linear-gradient(145deg, var(--white), var(--rose-soft)); }
.candidate-card__top { display: flex; align-items: center; gap: .6rem; }
.candidate-card__top > span:last-child { min-width: 0; }
.avatar { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 12px; background: linear-gradient(145deg, var(--indigo-soft), #ddd8ff); color: var(--indigo-dark); font-size: .65rem; font-weight: 800; }
.candidate-card:nth-child(2n) .avatar { background: linear-gradient(145deg, var(--teal-soft), #c6ede5); color: #0b6d63; }
.candidate-card strong { display: block; overflow: hidden; font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.candidate-card small { color: var(--muted); font-size: .58rem; }
.score-row { display: flex; align-items: end; justify-content: space-between; margin-top: .7rem; }
.score { font-size: 1.3rem; font-weight: 750; line-height: 1; }
.score span { color: var(--subtle); font-size: .62rem; font-weight: 500; }
.coverage { color: var(--muted); font-size: .58rem; }
.progress { height: 4px; margin-top: .5rem; overflow: hidden; border-radius: 99px; background: var(--paper-deep); }
.progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--indigo), #8c82eb); }
.unknown-dot { position: absolute; top: .75rem; right: .75rem; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.stale-note { display: inline-block; margin-top: .55rem; padding: .24rem .4rem; border-radius: 7px; background: var(--rose-soft); color: var(--rose); font-size: .54rem; font-weight: 800; }

.panel-heading { min-height: 78px; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--border); }
.panel-heading p { margin: .2rem 0 0; color: var(--muted); font-size: .67rem; }
.assistant-avatar { display: flex; align-items: center; justify-content: center; gap: 3px; flex: 0 0 42px; width: 42px; height: 42px; border-radius: 14px; background: linear-gradient(145deg, var(--indigo), #776be5); box-shadow: 0 8px 18px rgba(91,80,214,.2); }
.assistant-avatar span { width: 4px; border-radius: 9px; background: white; }
.assistant-avatar span:nth-child(1) { height: 8px; }.assistant-avatar span:nth-child(2) { height: 16px; }.assistant-avatar span:nth-child(3) { height: 11px; }
.assistant-notice { margin: .8rem 1rem 0; padding: .75rem .85rem; border: 1px solid #ead3ae; border-radius: 12px; background: var(--amber-soft); color: #80500f; font-size: .67rem; }
.conversation { display: flex; flex: 1 1 auto; flex-direction: column; gap: .75rem; min-height: 100px; max-height: none; overflow-y: auto; padding: 1rem 1.2rem; scrollbar-color: var(--border) transparent; }
.conversation-empty { margin: auto 0; padding: 1rem; text-align: center; }
.conversation-empty svg { width: 45px; fill: none; stroke: var(--indigo); stroke-width: 1.4; }
.conversation-empty strong { display: block; margin-top: .65rem; font-size: .84rem; font-weight: 700; }
.conversation-empty p { max-width: 260px; margin: .35rem auto 0; color: var(--muted); font-size: .66rem; }
.message { max-width: 88%; padding: .72rem .82rem; border-radius: 15px; font-size: .7rem; white-space: pre-wrap; }
.message--human { align-self: flex-end; border-bottom-right-radius: 5px; background: var(--indigo); color: white; }
.message--assistant { align-self: flex-start; border-bottom-left-radius: 5px; background: var(--paper); }
.message--system, .message--failed { align-self: center; max-width: 100%; background: var(--amber-soft); color: #80500f; }
.quick-prompts { display: flex; gap: .45rem; overflow-x: auto; padding: .25rem 1.2rem .9rem; scrollbar-width: none; }
.quick-prompts::-webkit-scrollbar { display: none; }
.prompt-chip { flex: 0 0 auto; padding: .48rem .65rem; border: 1px solid var(--border); border-radius: 999px; background: var(--white); color: var(--indigo-dark); font-size: .62rem; cursor: pointer; }
.prompt-chip:hover { border-color: var(--indigo); background: var(--indigo-soft); }
.composer { margin: 0 1rem 1rem; padding: .75rem; border: 1px solid var(--border-strong); border-radius: 16px; background: var(--white); box-shadow: 0 8px 25px rgba(56,43,28,.06); }
.composer:focus-within { border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(91,80,214,.09); }
.composer textarea { display: block; width: 100%; min-height: 52px; max-height: 150px; resize: vertical; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: .72rem; }
.composer textarea::placeholder { color: var(--subtle); }
.composer__footer { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: .35rem; }
.composer__hint { color: var(--subtle); font-size: .57rem; }
.send-button { display: flex; align-items: center; gap: .45rem; padding: .58rem .75rem; border: 0; border-radius: 11px; background: var(--indigo); color: white; font-size: .66rem; font-weight: 700; cursor: pointer; }
.send-button:hover { background: var(--indigo-dark); }.send-button:disabled { opacity: .52; cursor: not-allowed; }
.send-button svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.panel-heading--result { min-height: 78px; }
.result-content { min-height: 365px; max-height: 510px; overflow-y: auto; padding: 1.15rem; }
.artifact-card { padding: 1rem; border: 1px solid var(--border); border-radius: 16px; background: var(--white); }
.artifact-card + .artifact-card { margin-top: .75rem; }
.artifact-head { display: flex; justify-content: space-between; gap: .75rem; }
.artifact-head h3 { margin: 0; font-size: .88rem; font-weight: 750; line-height: 1.25; }
.artifact-head p { margin: .3rem 0 0; color: var(--muted); font-size: .65rem; }
.status-label { flex: 0 0 auto; align-self: start; padding: .3rem .48rem; border-radius: 999px; background: var(--amber-soft); color: var(--amber); font-size: .56rem; font-weight: 800; }
.status-label--ready, .status-label--approved, .status-label--confirmed { background: var(--teal-soft); color: var(--teal); }
.status-label--stale, .status-label--conflict { background: var(--rose-soft); color: var(--rose); }
.document { margin-top: 1rem; padding: .85rem; border-left: 3px solid var(--indigo); border-radius: 0 12px 12px 0; background: #faf9ff; }
.document-section + .document-section { margin-top: .85rem; }
.document-section strong { display: block; margin-bottom: .22rem; color: var(--muted); font-size: .58rem; letter-spacing: .05em; text-transform: uppercase; }
.document-section p { margin: 0; font-size: .69rem; }
.document-note { margin: .75rem 0 0; padding: .65rem .72rem; border-radius: 11px; background: var(--amber-soft); color: #7b4d0c; font-size: .62rem; }
.change-banner { margin-bottom: .75rem; padding: .75rem .82rem; border: 1px solid #bde1d9; border-radius: 13px; background: var(--teal-soft); color: #12685f; }
.change-banner strong { display: block; margin-bottom: .25rem; font-size: .64rem; }.change-banner p { margin: 0; font-size: .63rem; }.change-banner p + p { margin-top: .25rem; }
.field-state { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem; padding: .65rem 0; border-bottom: 1px solid var(--border); }
.field-state:last-child { border: 0; }.field-state strong { display: block; font-size: .62rem; }.field-state p { margin: .2rem 0 0; font-size: .68rem; }
.state-dot { width: 9px; height: 9px; margin-top: .35rem; border-radius: 50%; background: var(--teal); }.state-dot--unknown { background: var(--amber); }.state-dot--conflict { background: var(--rose); }
.criterion { padding: .65rem 0; border-bottom: 1px solid var(--border); }.criterion:last-child { border: 0; }
.criterion__row { display: flex; justify-content: space-between; gap: .6rem; font-size: .66rem; }.criterion__row strong { font-size: .66rem; }.criterion__bar { height: 5px; margin-top: .4rem; border-radius: 99px; background: var(--paper-deep); overflow: hidden; }.criterion__bar i { display: block; height: 100%; background: var(--indigo); }
.evidence-block { margin-top: .85rem; padding: .78rem; border-radius: 13px; background: var(--paper); }
.evidence-block blockquote { margin: .4rem 0 0; font-size: .67rem; }.evidence-block small { color: var(--muted); font-size: .57rem; }
.why-button { display: inline-flex; align-items: center; gap: .35rem; margin-top: .65rem; padding: .3rem 0; border: 0; background: none; color: var(--indigo); font-size: .63rem; font-weight: 700; cursor: pointer; }
.why-button svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.meeting-card { margin-top: .75rem; padding: .85rem; border-radius: 14px; background: linear-gradient(135deg, var(--indigo-soft), #faf9ff); }
.meeting-time { margin: .45rem 0 .2rem; font-size: 1rem; font-weight: 750; }.meeting-card p { margin: 0; color: var(--muted); font-size: .63rem; }
.simulation-label { display: inline-flex; align-items: center; gap: .35rem; margin-top: .6rem; padding: .3rem .45rem; border-radius: 8px; background: var(--amber-soft); color: var(--amber); font-size: .55rem; font-weight: 700; }
.action-tray { min-height: 100px; padding: 1rem; border-top: 1px solid var(--border); background: rgba(248,245,239,.65); }
.action-tray__label { margin: 0 0 .6rem; color: var(--muted); font-size: .59rem; font-weight: 700; }
.action-list { display: flex; flex-wrap: wrap; gap: .45rem; }
.action-button { padding: .58rem .72rem; border: 1px solid var(--indigo); border-radius: 11px; background: var(--indigo); color: white; font-size: .63rem; font-weight: 700; cursor: pointer; }
.action-button--secondary { background: var(--white); color: var(--indigo); }.action-button:disabled { border-color: var(--border); background: var(--paper-deep); color: var(--subtle); cursor: not-allowed; }
.action-form__head { display: flex; align-items: start; justify-content: space-between; gap: .75rem; margin-bottom: .75rem; }
.action-form__head h3 { margin: 0; font-size: .78rem; }
.action-form__footer { display: flex; justify-content: flex-end; margin-top: .75rem; }
.form-field { display: grid; gap: .3rem; margin-top: .65rem; }
.form-field > span, .radio-list legend { color: var(--muted); font-size: .6rem; font-weight: 700; }
.form-field textarea, .form-field select, .form-field input {
  width: 100%;
  min-width: 0;
  padding: .58rem .65rem;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  outline: 0;
  background: var(--white);
  color: var(--ink);
  font-size: .67rem;
}
.form-field textarea { resize: vertical; }
.form-field textarea:focus, .form-field select:focus, .form-field input:focus { border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(91,80,214,.09); }
.form-readonly { padding: .7rem .75rem; border-radius: 12px; background: var(--paper); }
.form-readonly strong { display: block; font-size: .66rem; }.form-readonly p { margin: .3rem 0 0; font-size: .65rem; }.form-readonly small { display: block; margin-top: .4rem; color: var(--amber); font-size: .56rem; }
.form-error { color: var(--rose); font-size: .65rem; }
.radio-list { display: grid; gap: .45rem; margin: 0; padding: 0; border: 0; }
.radio-list legend { margin-bottom: .25rem; }
.radio-list label { display: flex; align-items: start; gap: .55rem; padding: .58rem .62rem; border: 1px solid var(--border); border-radius: 11px; background: var(--white); cursor: pointer; }
.radio-list label:has(input:checked) { border-color: var(--indigo); background: var(--indigo-soft); }
.radio-list input { margin-top: .15rem; accent-color: var(--indigo); }.radio-list span { font-size: .63rem; }.radio-list small { display: block; color: var(--muted); font-size: .56rem; }
.weight-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .35rem .55rem; }
.scorecard-fields { max-height: 235px; overflow-y: auto; padding-right: .2rem; }

.activity-section { max-width: 1480px; margin: 1rem auto 0; padding: 1rem 1.2rem; }
.activity-timeline { display: grid; gap: .7rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.activity-item { display: grid; grid-template-columns: 28px minmax(0,1fr) auto; gap: .7rem; align-items: start; }
.activity-item__dot { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--teal-soft); color: var(--teal); font-size: .65rem; font-weight: 800; }.activity-item p { margin: 0; font-size: .68rem; }.activity-item small { color: var(--muted); font-size: .58rem; }.activity-item time { color: var(--subtle); font-size: .57rem; }

.empty-state { padding: 2rem 1rem; color: var(--muted); text-align: center; font-size: .7rem; }
.empty-state strong { display: block; color: var(--ink); margin-bottom: .35rem; }
.error-state { margin: 1rem; padding: 1rem; border: 1px solid #ebc0cc; border-radius: 14px; background: var(--rose-soft); color: #813349; font-size: .7rem; }
.error-state button { margin-top: .7rem; }
.skeleton-card { display: grid; gap: .6rem; padding: 1rem; border: 1px solid var(--border); border-radius: 16px; background: white; }
.skeleton-card span { height: 12px; border-radius: 8px; background: linear-gradient(90deg, var(--paper-deep), #faf8f4, var(--paper-deep)); background-size: 200% 100%; animation: shimmer 1.35s infinite; }.skeleton-card span:nth-child(2) { width: 70%; }.skeleton-card span:nth-child(3) { width: 88%; }
@keyframes shimmer { to { background-position: -200% 0; } }

.toast-region { position: fixed; z-index: 60; right: 1.25rem; bottom: 1.25rem; display: grid; gap: .5rem; max-width: 340px; }
.toast { padding: .8rem 1rem; border: 1px solid var(--border); border-radius: 13px; background: var(--ink); color: white; box-shadow: var(--shadow); font-size: .67rem; }
.toast--error { background: #82354b; }
.drawer { width: min(480px, calc(100vw - 1rem)); height: 100vh; max-height: none; margin: 0 0 0 auto; padding: 0; border: 0; border-left: 1px solid var(--border); background: var(--paper); color: var(--ink); box-shadow: -18px 0 50px rgba(44,35,25,.15); }
.drawer::backdrop { background: rgba(37,34,59,.28); backdrop-filter: blur(2px); }
.drawer[open] { animation: drawer-in .2s ease-out; }
@keyframes drawer-in { from { transform: translateX(35px); opacity: .4; } }
.drawer__header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem; border-bottom: 1px solid var(--border); background: white; }.drawer__header h2 { margin: 0; font-size: 1.15rem; font-weight: 750; }.drawer__body { padding: 1.2rem; overflow-y: auto; }.source-card { margin-bottom: .75rem; padding: .9rem; border: 1px solid var(--border); border-radius: 14px; background: white; }.source-card h3 { margin: 0 0 .45rem; font-size: .72rem; }.source-card blockquote { margin: 0; padding-left: .7rem; border-left: 2px solid var(--teal); font-size: .69rem; }.source-meta { margin-top: .55rem; color: var(--muted); font-size: .58rem; word-break: break-word; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 1260px) {
  .workspace-shell { grid-template-columns: 214px minmax(0,1fr); }
  .topbar { grid-template-columns: 214px minmax(0,1fr) auto; }
  .workspace-grid { grid-template-columns: minmax(0,.82fr) minmax(0,1fr); }
  .result-panel { grid-column: 1 / -1; min-height: 0; }
  .result-content { min-height: 0; max-height: none; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; }.result-content > * { margin-top: 0 !important; }
}

@media (max-width: 1450px) and (min-width: 901px) {
  .candidate-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .workspace-shell { display: block; }
  .topbar { grid-template-columns: 1fr auto; min-height: 66px; }
  .brand { border-right: 0; padding: 0 1rem; }.brand__mark { width: 38px; height: 38px; }.mode-strip { grid-row: 2; grid-column: 1 / -1; justify-content: flex-start; overflow-x: auto; padding: .45rem 1rem; border-top: 1px solid var(--border); }.topbar > .icon-button { margin-right: 1rem; }
  .sidebar { position: static; height: auto; display: block; padding: .7rem 1rem; border-right: 0; border-bottom: 1px solid var(--border); overflow: visible; }.sidebar__section { padding: 0; }.sidebar .eyebrow, .scenario-button small, .sidebar__footer { display: none; }.scenario-switcher { display: flex; overflow-x: auto; padding-bottom: .2rem; }.scenario-button { flex: 0 0 auto; width: auto; max-width: 235px; padding: .6rem .75rem .6rem .9rem; }.scenario-button strong { margin: 0; }.contour-nav { display: flex; margin-top: .65rem; overflow-x: auto; }.contour-button { flex: 0 0 auto; width: auto; grid-template-columns: 28px auto auto; padding: .5rem .65rem; }.contour-button__icon { width: 28px; height: 28px; }.contour-button__icon svg { width: 15px; }
  .workspace-main { padding: 1rem; }.hero { min-height: 145px; padding: 1.5rem; }.hero__signal { display: none; }
  .workspace-grid { grid-template-columns: 1fr; }.result-panel { grid-column: auto; }.conversation-panel, .result-panel { min-height: 0; }.result-content { display: block; }.result-content > * + * { margin-top: .75rem !important; }
  .conversation-panel { height: auto; max-height: none; }
}

@media (max-width: 620px) {
  .brand small, .mode-pill--simulated { display: none; }
  .workspace-main { padding: .75rem; }.hero { min-height: 132px; margin-bottom: .75rem; border-radius: 18px; }.hero h1 { font-size: 1.55rem; }.hero__copy { font-size: .75rem; }
  .mobile-tabs { position: sticky; top: 108px; z-index: 15; display: grid; grid-template-columns: repeat(3,1fr); gap: .35rem; margin-bottom: .75rem; padding: .32rem; border: 1px solid var(--border); border-radius: 14px; background: rgba(250,248,243,.94); backdrop-filter: blur(10px); }.mobile-tab { padding: .55rem .35rem; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: .66rem; font-weight: 700; }.mobile-tab.is-active { background: white; color: var(--indigo); box-shadow: var(--shadow-soft); }
  [data-panel] { display: none; }[data-panel].is-mobile-active { display: block; }
  .workstream, .conversation-panel, .result-panel, .activity-section { border-radius: 18px; }
  .candidate-grid { grid-template-columns: 1fr 1fr; }.conversation { max-height: none; min-height: 320px; }.composer__hint { display: none; }.action-button { flex: 1 1 auto; }.activity-section { margin-top: .75rem; }
  .drawer { width: 100vw; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
