:root {
  --ink: #16211f;
  --muted: #71807b;
  --line: #dfe7e2;
  --paper: #f5f7f4;
  --card: #ffffff;
  --accent: #c4ed5b;
  --accent-dark: #244514;
  --dark: #19312b;
  --warning: #bd6b1b;
}

.account-page { max-width: 560px; margin: 40px auto; }
.account-page h1, .demo-hero h1 { overflow-wrap: anywhere; }
.account-page h1 { font-size: clamp(30px, 5vw, 46px); margin: 16px 0; }
.account-page h2 { font-size: 24px; margin: 22px 0 12px; }
.account-panel { margin-top: 24px; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.account-panel form { display: grid; gap: 18px; }
.account-panel label { display: grid; gap: 7px; font-weight: 700; }
.account-panel input { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.account-panel code { display: block; padding: 15px; background: var(--paper); overflow-wrap: anywhere; }
.account-secondary-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.account-panel .text-button.account-action-link { color: var(--accent-dark); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 640px) {
  .account-action-link:not(.button) { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); font-weight: 800; text-decoration: none; }
  .account-secondary-actions { display: grid; gap: 8px; }
  .account-secondary-actions .account-action-link { width: 100%; }
}
.account-help { margin: 0; color: var(--muted); font-size: 12px; }
.account-error { color: #a53024; }
.drawer-nav button, .text-button { border: 0; background: transparent; color: var(--ink); text-align: left; min-height: 44px; cursor: pointer; }
.drawer-nav button { font-weight: 700; }
@media (max-width: 480px) {
  .topbar .brand { margin-left: 8px; margin-right: auto; font-size: 16px; }
  .topbar .brand-mark { width: 25px; height: 25px; font-size: 19px; }
}

/* Public demo: a welcoming shop preview followed by three concrete tasks. */
.demo-header-badge { position: absolute; right: 0; padding: 5px 11px; border: 1px solid var(--line); border-radius: 20px; color: var(--muted); font-size: 11px; font-weight: 700; }
body.chat-route .demo-header-badge { display: none; }
.demo-home { padding: 52px 0 32px; }
.demo-hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(24px, 5vw, 80px); align-items: center; }
.demo-hero h1 { max-width: 680px; font-size: clamp(40px, 5.2vw, 70px); line-height: 1.05; }
.demo-hero h1 em { color: #527339; font-style: normal; }
.demo-intro { max-width: 430px; margin: 22px 0; color: #52635c; font-size: 17px; line-height: 1.6; }
.demo-primary { display: inline-flex; align-items: center; gap: 34px; min-height: 50px; text-decoration: none; }
.demo-footnote { max-width: 380px; margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.demo-shop-preview { min-width: 0; padding: 28px; border: 1px solid var(--line); border-radius: 22px; background: white; box-shadow: 0 18px 50px rgba(25,49,43,.06); }
.demo-shop-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.demo-shop-heading h2 { font-size: 25px; line-height: 1.15; }
.demo-live-label { border-radius: 7px; background: var(--accent); padding: 5px 9px; font-size: 11px; font-weight: 800; }
.demo-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 28px 0 12px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.demo-summary strong { display: block; font-size: 28px; letter-spacing: -.04em; }
.demo-summary span { color: var(--muted); font-size: 11px; }
.demo-summary > p { grid-column: 1 / -1; }
.demo-preview-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid #eff2ef; }
.demo-preview-row > div { min-width: 0; }
.demo-preview-row strong { display: block; overflow-wrap: anywhere; font-size: 13px; }
.demo-preview-row > div > span { display: block; color: var(--muted); font-size: 11px; }
.demo-stock-pill { flex-shrink: 0; border-radius: 16px; padding: 4px 9px; background: #edf4e9; color: #4d683b; font-size: 10px; font-weight: 700; }
.demo-stock-low { background: #fff2df; color: #8d5718; }
.demo-preview-link { display: flex; justify-content: space-between; padding-top: 18px; color: var(--dark); font-size: 12px; font-weight: 800; text-decoration: none; }
.demo-tasks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 48px; }
.private-home-tasks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.demo-task { display: flex; flex-direction: column; align-items: start; padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s; }
.demo-task:hover { transform: translateY(-3px); border-color: #95ac87; }
.demo-task-number { margin-bottom: 22px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.demo-task h2 { font-size: 23px; line-height: 1.1; }
.demo-task p { color: var(--muted); font-size: 13px; }
.demo-task-action { margin-top: auto; padding-top: 12px; font-size: 12px; font-weight: 800; color: #527339; }
.demo-drawer-note { margin-bottom: 25px; padding: 16px; border-radius: 10px; background: #edf4e9; }
.demo-drawer-note p { margin: 6px 0 0; color: #52635c; font-size: 12px; }
.demo-loading { padding: 70px 0; }
.demo-loading h1 { font-size: clamp(32px, 5vw, 54px); }
@media (max-width: 760px) {
  .demo-home { padding-top: 28px; }
  .demo-hero { grid-template-columns: 1fr; gap: 30px; }
  .demo-hero h1 { font-size: clamp(38px, 8vw, 56px); }
  .demo-intro { font-size: 15px; margin: 18px 0; }
  .demo-shop-preview { padding: 20px; }
  .demo-tasks { grid-template-columns: 1fr; margin-top: 24px; gap: 12px; }
  .demo-task { padding: 20px; }
  .demo-task-number { margin-bottom: 12px; }
  .demo-header-badge { padding: 4px 7px; font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .demo-task { transition: none; }
  .demo-task:hover { transform: none; }
}

.entry-route #menu-button, .entry-route #workspace-badge,
.entry-route #chat-model-picker, .entry-route footer { display: none; }
.entry-home { max-width: 650px; margin: 9vh auto; text-align: center; padding: 24px; }
.entry-home h1 { font-size: clamp(38px, 7vw, 64px); line-height: 1.12; }
.entry-actions { display: grid; gap: 16px; max-width: 350px; margin: 36px auto 0; }
.entry-actions a.button, .entry-actions button.button { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 54px; padding-inline: 16px; text-align: center; }

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, sans-serif; }
body.menu-open { overflow: hidden; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.shell { max-width: 1440px; min-height: 100vh; margin: 0 auto; padding: 0 32px calc(30px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; }
.topbar { position: relative; min-height: 78px; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.menu-button { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink); font-size: 20px; line-height: 1; }
.menu-button:focus, .panel-toggle:focus, .drawer-link:focus, .workspace-card:focus, a:focus, input:focus, select:focus { outline: 3px solid #d8efa1; outline-offset: 2px; }
.brand { min-height: 44px; display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 20px; font-weight: 800; letter-spacing: -0.04em; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 10px; background: var(--accent); color: var(--accent-dark); font-size: 23px; font-weight: 900; }
.current-merchant { max-width: 180px; overflow: hidden; margin-left: auto; color: var(--muted); font-size: 13px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.topbar-meta { display: none; }
.topbar-left-control { display: none; }
.brand { margin: 0 auto; }
.topbar .chat-model-picker { display: none; position: absolute; right: 0; align-items: center; grid-template-columns: auto minmax(0, 1fr); gap: 6px; margin: 0; color: var(--muted); font-size: 10px; font-weight: 800; }
body.chat-route .topbar .chat-model-picker { display: grid; }
.topbar .chat-model-picker select { width: min(220px, 28vw); max-width: 220px; min-height: 38px; padding: 5px 25px 5px 8px; font-size: 11px; }
.topbar-left-control .merchant-control { min-width: 270px; }
.topbar-left-control .merchant-control label { margin-bottom: 4px; }
.topbar-left-control .control-help { display: none; }
.topbar-mode-switch { margin: 0 0 0 auto; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #55ae59; box-shadow: 0 0 0 4px #e2f1db; }
.hero { display: flex; justify-content: space-between; gap: 30px; align-items: end; padding: 54px 0 34px; }
.eyebrow { margin: 0 0 8px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1, h2 { margin: 0; letter-spacing: -.055em; line-height: 1; }
h1[tabindex="-1"]:focus { outline: 0 !important; box-shadow: none !important; }
h1 { max-width: 560px; font-size: clamp(42px, 6vw, 76px); }
h2 { font-size: 25px; }
.hero-copy { max-width: 475px; margin: 18px 0 0; color: var(--muted); font-size: 17px; }
.merchant-control { min-width: 280px; }
.demo-label { color: var(--warning); font-size: 10px; letter-spacing: .04em; }
.control-help { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
label { display: block; margin: 0 0 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.control-row, .search-row { display: flex; gap: 8px; }
input, select, textarea { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); padding: 10px 12px; outline: none; }
input:focus, select:focus { border-color: #89aa48; box-shadow: 0 0 0 3px #e8f3c9; }
.button { min-height: 44px; border: 0; border-radius: 10px; padding: 0 16px; font-weight: 800; white-space: nowrap; transition: transform .15s ease, opacity .15s ease; }
.button:hover { transform: translateY(-1px); }
.button-dark { background: var(--dark); color: #fff; }
.button-light { border: 1px solid var(--line); background: #fff; color: var(--ink); }
.button-accent { background: var(--accent); color: var(--accent-dark); }
.notice { min-height: 0; margin: 0 0 16px; border-radius: 10px; color: var(--accent-dark); font-weight: 700; }
.notice:not(:empty) { padding: 7px 10px; background: transparent; color: var(--muted); font-size: 12px; }
.notice:not(:empty)::before { content: "•"; margin-right: 7px; color: #55ae59; }
.notice.error:not(:empty) { background: #fbe8df; color: #933f26; }
.notice.error:not(:empty)::before { color: #933f26; }
.hidden { display: none !important; }
.menu-backdrop { position: fixed; z-index: 19; inset: 0; background: rgba(22, 33, 31, .36); cursor: pointer; }
.menu-drawer { position: fixed; z-index: 20; top: 0; bottom: 0; left: 0; width: min(360px, 88vw); overflow-y: auto; padding: 28px 22px; border-right: 1px solid var(--line); background: var(--card); box-shadow: 12px 0 35px rgba(22, 33, 31, .16); }
.drawer-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.drawer-heading .panel-toggle { min-width: 68px; min-height: 44px; }
.drawer-heading h2 { font-size: 30px; }
.drawer-control { padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.drawer-nav { display: grid; gap: 4px; padding-top: 25px; }
.drawer-nav .eyebrow { margin-bottom: 5px; }
.drawer-nav .admin-build-info { margin: 12px 13px 4px; color: var(--muted); font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.drawer-nav a { display: block; padding: 12px 13px; border-radius: 9px; color: var(--ink); font-weight: 800; text-decoration: none; }
.drawer-nav a:hover, .drawer-nav a.active { background: #eef4e6; color: var(--accent-dark); }
.developer-control { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); }
.developer-toggle { display: flex; align-items: center; gap: 9px; min-height: 44px; color: var(--ink); font-weight: 800; }
.developer-toggle input { width: 18px; height: 18px; accent-color: var(--accent-dark); }
.developer-control p:not(.eyebrow) { margin: 4px 0 0 27px; color: var(--muted); font-size: 12px; }
.model-control { display: grid; gap: 9px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.model-control .eyebrow { margin: 0; }
.model-control > label { color: var(--muted); font-size: 12px; font-weight: 800; }
.model-control select { width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); color: var(--ink); font: inherit; }
.model-control .button { justify-content: center; }
.model-control p:last-child { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.evaluation-live-progress { display: grid; gap: 7px; padding: 10px; border-radius: 10px; background: #eef4e8; }
.evaluation-live-progress label { color: var(--muted); font-size: 11px; font-weight: 750; overflow-wrap: anywhere; }
.evaluation-live-progress progress { width: 100%; height: 9px; accent-color: var(--accent-dark); }
.model-evaluation-results { display: grid; gap: 12px; }
.evaluation-dashboard-link { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 13px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--accent-dark); font-size: 12px; font-weight: 800; text-decoration: none; }
.evaluation-dashboard-link:hover { border-color: #bac8bc; background: #f7f9f6; }
.evaluation-page { padding-bottom: 36px; }
.evaluation-page .page-heading { margin-bottom: 22px; }
.evaluation-page .page-heading h1 { max-width: none; }
.evaluation-run-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, .65fr); gap: 16px 24px; align-items: center; margin-bottom: 16px; }
.evaluation-run-panel .eyebrow { margin-bottom: 7px; }
.evaluation-run-description { max-width: 850px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.evaluation-run-actions { display: grid; gap: 8px; justify-items: end; }
.evaluation-options { grid-column: 1 / -1; order: 1; display: grid; gap: 10px; min-width: 0; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 8px; }
.evaluation-options legend { padding: 0 6px; font-weight: 600; }
.evaluation-options label { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.evaluation-options input[type="checkbox"] { width: 18px; height: 18px; min-height: 0; accent-color: var(--accent-dark); }
.evaluation-options input[type="number"] { width: 140px; min-height: 40px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; }
.evaluation-options p { margin: 0; color: var(--muted); font-size: 12px; }
.evaluation-run-panel .evaluation-live-progress { order: 2; }
.evaluation-run-actions .button { min-width: 230px; }
.evaluation-run-actions p { margin: 0; color: var(--muted); font-size: 12px; text-align: right; }
.asr-study-panel { display: grid; gap: 20px; margin-bottom: 28px; padding: 22px; }
.asr-study-heading { display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.asr-study-heading .eyebrow { margin-bottom: 5px; }
.asr-study-heading h2 { margin: 0 0 6px; font-size: 24px; }
.asr-study-heading p:not(.eyebrow) { max-width: 760px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.asr-study-badge { flex: 0 0 auto; border-radius: 999px; padding: 7px 10px; background: #eff4e7; color: #536b37; font-size: 10px; font-weight: 800; }
.asr-study-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.asr-study-model { min-width: 0; display: grid; align-content: start; gap: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.asr-study-model-heading { display: flex; align-items: start; justify-content: space-between; gap: 8px; }
.asr-study-model-heading h3 { margin: 0 0 4px; font-size: 15px; }
.asr-study-model-heading p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.asr-study-model-heading > span { flex: 0 0 auto; color: var(--muted); font-size: 10px; }
.asr-study-measure { display: grid; gap: 8px; }
.asr-study-measure-heading { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 11px; }
.asr-study-measure-heading strong { color: var(--ink); font-size: 12px; }
.asr-study-track { height: 10px; overflow: hidden; border-radius: 99px; background: #edf0ea; }
.asr-study-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #b6d38f, #557738); }
.asr-study-model dl { display: grid; grid-template-columns: 1fr 1.25fr; gap: 8px; margin: 0; }
.asr-study-model dl > div { display: grid; gap: 4px; }
.asr-study-model dt { color: var(--muted); font-size: 10px; }
.asr-study-model dd { margin: 0; font-size: 13px; font-weight: 800; }
.asr-study-notes { display: grid; gap: 8px; padding-top: 15px; border-top: 1px solid var(--line); }
.asr-study-notes p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.asr-study-notes strong { color: var(--ink); }
.asr-study-notes code { color: var(--ink); font-size: 10px; }
.evaluation-model-link { color: var(--accent-dark); font-size: 11px; font-weight: 800; text-decoration: none; }
.evaluation-model-link:hover { text-decoration: underline; }
.evaluation-graph { margin: 28px 0 34px; }
.evaluation-section-label { margin-bottom: 5px; }
.evaluation-section-heading { grid-column: 1 / -1; margin: 28px 0 0; }
.evaluation-section-heading h2 { font-size: 22px; }
.evaluation-graph-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 10px; }
.evaluation-graph-heading h2 { font-size: 22px; }
.evaluation-graph-heading p, .evaluation-graph-heading > span { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.evaluation-graph-heading-actions { display: flex; align-items: center; justify-content: end; gap: 10px; }
.evaluation-graph-expand, .evaluation-graph-close { min-height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; background: transparent; color: var(--ink); font-size: 11px; font-weight: 800; }
.evaluation-graph-expand:hover, .evaluation-graph-expand:focus-visible, .evaluation-graph-close:hover, .evaluation-graph-close:focus-visible { border-color: #9cac9f; outline: 2px solid #d8efa1; outline-offset: 1px; }
.evaluation-graph-overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: rgba(22, 33, 31, .72); }
.evaluation-graph-overlay-panel { position: relative; width: min(1120px, 96vw); max-height: 92vh; overflow: auto; padding: 34px 28px 24px; border-radius: 16px; background: var(--paper); box-shadow: 0 24px 70px rgba(0, 0, 0, .24); }
.evaluation-graph-expanded { margin: 0; }
.evaluation-graph-expanded svg { min-height: clamp(360px, 62vh, 700px); }
.evaluation-graph-close { position: absolute; top: 12px; right: 12px; }
body.evaluation-graph-expanded-open { overflow: hidden; }
.evaluation-report-caption { margin: 0 0 6px; }
.evaluation-summary-controls { display: flex; align-items: end; justify-content: end; gap: 12px; flex-wrap: wrap; }
.evaluation-filter-group > span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.evaluation-filter-group > div { display: flex; flex-wrap: wrap; gap: 4px; }
.evaluation-filter-select-label { display: none; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.evaluation-filter-select { display: block; min-height: 38px; margin-top: 4px; border: 1px solid var(--line); border-radius: 8px; padding: 0 28px 0 9px; background: var(--paper); color: var(--ink); font-size: 12px; font-weight: 700; }
.evaluation-filter-button { min-height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 9px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 800; }
.evaluation-filter-button:hover, .evaluation-filter-button:focus-visible { border-color: #9cac9f; color: var(--ink); outline: 2px solid #d8efa1; outline-offset: 1px; }
.evaluation-filter-button.active { border-color: var(--dark); background: var(--dark); color: #fff; }
.evaluation-candidate-count { align-self: center; color: var(--muted); font-size: 12px; white-space: nowrap; }
.evaluation-graph svg { display: block; width: 100%; height: auto; overflow: visible; }
.evaluation-graph-grid { stroke: var(--line); stroke-width: 1; }
.evaluation-graph-grid-minor { stroke: #edf2ee; stroke-width: 1; }
.evaluation-graph-axis-label, .evaluation-graph-axis-title { fill: var(--muted); font-size: 12px; }
.evaluation-graph-point { fill: var(--dark); stroke: var(--paper); stroke-width: 3; cursor: pointer; transition: r .15s ease, opacity .15s ease; }
.evaluation-graph-point.series-2 { fill: #406b5d; }
.evaluation-graph-point.series-3 { fill: #759345; }
.evaluation-graph-point.series-4 { fill: #9a6d38; }
.evaluation-graph-point.series-5 { fill: #6f5e8f; }
.evaluation-graph-point.series-6 { fill: #9b5148; }
.evaluation-graph-point:hover, .evaluation-graph-point:focus { r: 11; outline: none; }
.evaluation-graph-point-label { fill: var(--ink); font-size: 11px; font-weight: 800; pointer-events: none; }
.evaluation-graph-label-leader { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 2; pointer-events: none; }
.evaluation-graph-callout { fill: var(--accent-dark); font-size: 11px; font-weight: 800; }
.evaluation-scatter-note { margin: 7px 0 11px; color: var(--muted); font-size: 12px; }
.evaluation-scatter-note strong { color: var(--ink); }
.evaluation-scatter-list { display: none; }
.evaluation-scatter-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; min-height: 38px; padding: 5px 0; border-top: 1px solid var(--line); color: var(--ink); font-size: 12px; text-decoration: none; }
.evaluation-scatter-row:hover, .evaluation-scatter-row:focus { color: var(--accent-dark); }
.evaluation-scatter-rank { color: var(--muted); font-variant-numeric: tabular-nums; }
.evaluation-graph-row-label { fill: var(--ink); font-size: 11px; }
.evaluation-latency-whisker, .evaluation-latency-cap { stroke-width: 2; }
.evaluation-latency-box { fill-opacity: .7; stroke: var(--dark); stroke-width: 1; }
.evaluation-latency-median { fill: var(--dark); }
.evaluation-latency-whisker.series-1, .evaluation-latency-cap.series-1, .evaluation-latency-box.series-1 { stroke: var(--dark); fill: var(--dark); }
.evaluation-latency-whisker.series-2, .evaluation-latency-cap.series-2, .evaluation-latency-box.series-2 { stroke: #406b5d; fill: #406b5d; }
.evaluation-latency-whisker.series-3, .evaluation-latency-cap.series-3, .evaluation-latency-box.series-3 { stroke: #759345; fill: #759345; }
.evaluation-latency-whisker.series-4, .evaluation-latency-cap.series-4, .evaluation-latency-box.series-4 { stroke: #9a6d38; fill: #9a6d38; }
.evaluation-latency-whisker.series-5, .evaluation-latency-cap.series-5, .evaluation-latency-box.series-5 { stroke: #6f5e8f; fill: #6f5e8f; }
.evaluation-latency-whisker.series-6, .evaluation-latency-cap.series-6, .evaluation-latency-box.series-6 { stroke: #9b5148; fill: #9b5148; }
.evaluation-heat-cell { stroke: var(--paper); stroke-width: 2; }
.evaluation-heat-value { fill: var(--ink); font-size: 11px; font-weight: 800; pointer-events: none; }
.evaluation-heat-cell.heat-high { fill: var(--dark); }
.evaluation-heat-cell.heat-mid { fill: #9eb66d; }
.evaluation-heat-cell.heat-low { fill: #e4b6a4; }
.evaluation-heat-cell.heat-na { fill: var(--line); }
.evaluation-heat-cell.heat-high + .evaluation-heat-value { fill: #fff; }
.evaluation-run-panel .evaluation-live-progress { grid-column: 1 / -1; }
.evaluation-page .model-evaluation-results { grid-template-columns: minmax(0, 1fr); }
.evaluation-page .model-evaluation-results > .evaluation-graph { grid-column: 1 / -1; width: 100%; }
.evaluation-page .model-evaluation-results > .evaluation-caption,
.evaluation-page .model-evaluation-results > .evaluation-results-toolbar,
.evaluation-page .model-evaluation-results > .evaluation-comparison { grid-column: 1 / -1; }
.evaluation-page .evaluation-model dl { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 20px; }
.evaluation-history { display: grid; gap: 13px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.evaluation-history-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.evaluation-navigation-layout { display: grid; grid-template-columns: minmax(220px, .35fr) minmax(0, 1fr); align-items: start; gap: 20px; margin-top: 22px; }
.evaluation-navigation-layout .evaluation-history { position: sticky; top: 16px; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfa; }
.evaluation-history-actions { display: flex; align-items: center; gap: 8px; }
.evaluation-history-current { color: var(--accent-dark); font-size: 11px; font-weight: 800; text-decoration: none; }
.evaluation-history-current:hover { text-decoration: underline; }
.evaluation-history-heading .eyebrow { margin-bottom: 4px; }
.evaluation-history-heading h2 { font-size: 25px; }
.evaluation-history-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.evaluation-history-item { min-width: 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); text-align: left; text-decoration: none; }
.evaluation-history-item:hover { border-color: #aab9ac; background: #fbfcfa; }
.evaluation-history-item.active { border-color: var(--dark); background: #eef5e8; box-shadow: inset 3px 0 0 var(--accent-dark); }
.evaluation-history-item > span:first-child { min-width: 0; display: grid; gap: 4px; }
.evaluation-history-item strong { overflow-wrap: anywhere; font-size: 12px; }
.evaluation-history-item small { color: var(--muted); font-size: 11px; }
.evaluation-candidate-state.interrupted { background: #f8eddf; color: #8a551e; }
.evaluation-history-detail { display: grid; gap: 10px; }
.evaluation-history-detail > h3 { margin: 0; font-size: 17px; }
.evaluation-history-detail > #historical-evaluation-report { display: grid; gap: 12px; }
.evaluation-history-picker { display: grid; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.evaluation-history-picker select { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 9px; padding: 0 12px; background: #fff; color: var(--ink); font-size: 13px; font-weight: 700; letter-spacing: normal; text-transform: none; }
.evaluation-selected-run-heading { display: flex; justify-content: space-between; align-items: start; gap: 16px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.evaluation-selected-run-heading h2 { margin: 0; font-size: 24px; }
.evaluation-selected-run-heading p:last-child { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.evaluation-caption { font-size: 11px !important; overflow-wrap: anywhere; }
.evaluation-results-toolbar { min-width: 0; display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; }
.evaluation-results-toolbar .evaluation-caption { margin: 0; }
.evaluation-results-toolbar label { min-width: min(190px, 32%); flex: 1 1 170px; display: grid; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 800; }
.evaluation-results-toolbar select { width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font: inherit; font-size: 12px; }
.evaluation-comparison { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.evaluation-comparison-heading { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 12px; }
.evaluation-comparison-heading h2 { margin: 0; font-size: 18px; }
.evaluation-comparison-heading p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.evaluation-comparison-heading > span { flex: 0 0 auto; color: var(--muted); font-size: 11px; }
.evaluation-chart { display: grid; gap: 5px; }
.evaluation-chart-group { display: grid; gap: 1px; padding: 3px 0; border-radius: 8px; }
.evaluation-chart-group:nth-child(odd) { background: #f4f7f4; }
.evaluation-chart-row { min-width: 0; display: grid; grid-template-columns: minmax(130px, 1.2fr) minmax(80px, 2fr) minmax(65px, .5fr); align-items: center; gap: 10px; padding: 5px 8px; border-radius: 7px; color: var(--ink); text-decoration: none; }
.evaluation-chart-row:hover, .evaluation-chart-row:focus-visible { color: var(--accent-dark); }
.evaluation-chart-row-nested { padding-top: 3px; padding-bottom: 3px; border-left: 2px solid var(--line); border-radius: 0 7px 7px 0; }
.evaluation-chart-row-nested .evaluation-chart-label::before { content: "↳ "; color: var(--muted); }
.evaluation-chart-label { min-width: 0; overflow-wrap: anywhere; font-size: 11px; font-weight: 800; }
.evaluation-chart-label small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 500; }
.evaluation-chart-track { height: 12px; overflow: hidden; border-radius: 99px; background: #e8eeea; }
.evaluation-chart-track span { display: block; height: 100%; border-radius: inherit; background: var(--accent-dark); }
.evaluation-chart-value { overflow-wrap: anywhere; font-size: 11px; text-align: right; }
.evaluation-model { padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfa; }
.evaluation-model-heading { display: flex; justify-content: space-between; align-items: start; gap: 10px; margin-bottom: 9px; }
.evaluation-model h3 { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.evaluation-candidate-state { flex: 0 0 auto; padding: 4px 8px; border-radius: 99px; background: #e9eeea; color: #58655e; font-size: 10px; font-weight: 850; }
.evaluation-candidate-state.running { background: #e6f1d2; color: #35551e; }
.evaluation-candidate-state.waiting { background: #eef1f2; color: #59656e; }
.evaluation-candidate-state.complete { background: #e6f2e4; color: #2f6734; }
.evaluation-candidate-state.not-run, .evaluation-candidate-state.partial, .evaluation-candidate-state.failed { background: #f8eddf; color: #8a551e; }
.evaluation-empty-results { margin: 8px 0; color: var(--muted); font-size: 12px; }
.evaluation-model dl { display: grid; gap: 5px; margin: 0 0 10px; }
.evaluation-model dl div { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; }
.evaluation-model dt { color: var(--muted); }
.evaluation-model dd { margin: 0; color: var(--ink); font-weight: 800; text-align: right; }
.evaluation-model details summary { min-height: 40px; display: flex; align-items: center; color: var(--accent-dark); font-size: 12px; font-weight: 800; cursor: pointer; }
.evaluation-model details ol { display: grid; gap: 8px; max-height: 420px; overflow: auto; margin: 4px 0 0; padding: 0; list-style: none; }
.evaluation-answer { padding: 9px; border-radius: 8px; background: #fff; font-size: 11px; }
.evaluation-answer.correct { border-left: 3px solid #55ae59; }
.evaluation-answer.incorrect { border-left: 3px solid #bd6b1b; }
.evaluation-answer.timed-out { border-left: 3px solid #8b6bb0; background: #f6f1fa; }
.evaluation-answer p { margin: 5px 0; color: var(--ink); overflow-wrap: anywhere; }
.evaluation-answer p span, .evaluation-answer small { color: var(--muted); }
.evaluation-answer small { display: block; }
.home-view, .workflow-view { padding: 54px 0 0; }
.home-heading { max-width: 700px; }
.home-heading h1 { font-size: clamp(40px, 6vw, 68px); }
.home-heading p:not(.eyebrow) { margin: 16px 0 0; color: var(--muted); font-size: 17px; }
.merchant-badge { display: inline-block; margin-top: 20px; padding: 7px 10px; border-radius: 8px; background: #eef4e6; color: var(--accent-dark); font-size: 12px; font-weight: 800; }
.workspace-menu, .workflow-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 38px; }
.workflow-cards { grid-template-columns: repeat(2, minmax(0, 420px)); margin-top: 30px; }
.inventory-actions { display: grid; gap: 8px; max-width: 760px; margin-top: 20px; }
.inventory-action { min-height: 68px; display: grid; grid-template-columns: 36px minmax(0, 1fr) 24px; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); text-decoration: none; }
.inventory-action:hover { border-color: #bac8bc; background: #fbfcfa; }
.inventory-action-primary { border-color: var(--dark); background: var(--dark); color: #fff; }
.inventory-action-primary:hover { background: #213c34; }
.inventory-action-index { color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .1em; }
.inventory-action-primary .inventory-action-index { color: #b1c3bc; }
.inventory-action-copy { display: grid; gap: 2px; }
.inventory-action-copy strong { font-size: 16px; line-height: 1.2; }
.inventory-action-copy small { color: var(--muted); font-size: 12px; line-height: 1.3; }
.inventory-action-primary .inventory-action-copy small { color: #b1c3bc; }
.inventory-action-arrow { justify-self: end; font-size: 22px; }
.workspace-card { position: relative; min-height: 210px; display: flex; flex-direction: column; align-items: start; justify-content: space-between; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--ink); text-align: left; text-decoration: none; }
.workspace-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(22, 33, 31, .08); }
.workspace-card-dark { border-color: var(--dark); background: var(--dark); color: #fff; }
.workspace-card-index { color: var(--muted); font-size: 12px; font-weight: 900; letter-spacing: .1em; }
.workspace-card-dark .workspace-card-index { color: #b1c3bc; }
.workspace-card-title { margin-top: 30px; font-size: 22px; font-weight: 900; letter-spacing: -.04em; }
.workspace-card-copy { max-width: 260px; color: var(--muted); font-size: 13px; }
.workspace-card-dark .workspace-card-copy { color: #b1c3bc; }
.workspace-card-arrow { position: absolute; right: 22px; bottom: 20px; font-size: 25px; }
.page-heading { margin-bottom: 30px; }
.page-heading .back-link { min-height: 44px; display: inline-flex; align-items: center; margin-bottom: 26px; color: var(--muted); font-size: 13px; font-weight: 800; text-decoration: none; }
.page-heading h1 { max-width: 800px; font-size: clamp(38px, 6vw, 62px); }
.page-heading p:last-child { margin: 13px 0 0; color: var(--muted); font-size: 16px; }
.workflow-view .stats-grid { margin-top: 6px; }
.form-page .form-panel { max-width: 650px; }
.product-wizard-progress { width: min(650px, 100%); height: 4px; overflow: hidden; margin: -16px 0 18px; border-radius: 99px; background: #e4ebe5; }
.product-wizard-progress span { display: block; height: 100%; border-radius: inherit; background: var(--accent-dark); transition: width .2s ease; }
.product-wizard-panel { max-width: 650px; padding: 24px; }
.product-wizard-panel form { gap: 16px; }
.product-step-prompt { margin: 0; color: var(--ink); font-size: 20px; font-weight: 800; }
.product-step-prompt .optional { color: var(--muted); font-size: 12px; }
.product-wizard-panel input { min-height: 54px; font-size: 18px; }
.product-wizard-panel select { min-height: 54px; font-size: 16px; }
.product-wizard-panel textarea { min-height: 110px; resize: vertical; font: inherit; }
.size-field { display: grid; gap: 0; }
.size-unit-reveal { display: grid; grid-template-rows: 0fr; overflow: hidden; opacity: 0; transform: translateY(-7px); transition: grid-template-rows .24s ease, opacity .2s ease, transform .24s ease, margin .24s ease; }
.size-field.units-open .size-unit-reveal { grid-template-rows: 1fr; margin-top: 10px; opacity: 1; transform: translateY(0); }
.size-unit-reveal-inner { min-height: 0; overflow: hidden; }
.size-unit-hint { margin: 0 0 7px; color: var(--muted); font-size: 12px; font-weight: 800; }
.size-unit-picker { display: grid; gap: 8px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: #f7f9f6; }
.size-unit-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.size-unit-group > span { width: 54px; color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.size-unit-option { min-width: 48px; min-height: 38px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font: inherit; font-size: 13px; font-weight: 800; }
.size-unit-option.selected { border-color: var(--dark); background: var(--dark); color: #fff; }
.size-unit-option:focus-visible { outline: 3px solid #d8efa1; outline-offset: 2px; }
.size-unit-error { margin: 8px 0 0; color: #9b3b31; font-size: 12px; font-weight: 700; }
.size-unit-error.hidden { display: none; }
.movement-value-hint { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 600; }
.product-empty-action { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.product-wizard-actions { display: flex; justify-content: space-between; gap: 12px; }
.product-wizard-actions .button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.product-step-skip { min-height: 44px; justify-self: center; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.drawer-mode-switch { display: none; }
.mode-switch { display: inline-flex; gap: 4px; margin-bottom: 22px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: #ebf0eb; }
.mode-button { min-height: 44px; border: 0; border-radius: 9px; padding: 0 14px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 800; }
.mode-button.active { background: #fff; color: var(--ink); box-shadow: 0 2px 7px rgba(22, 33, 31, .08); }
.chat-view { min-height: 620px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; background: var(--card); padding: 28px; }
.chat-app { min-height: calc(100vh - 78px); display: flex; flex-direction: column; margin-top: 0; border: 0; border-radius: 0; background: var(--paper); }
.chat-app-header { display: flex; align-items: center; gap: 18px; padding: 19px 24px; border-bottom: 1px solid var(--line); }
.chat-app-header .back-link { min-height: 44px; display: inline-flex; align-items: center; margin: 0; }
.chat-app-header h1 { font-size: 27px; }
.chat-app .chat-messages { width: min(820px, 100%); align-self: center; flex: 1; }
.chat-app .chat-form { width: min(820px, 100%); align-self: center; display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: end; padding: 16px 0 calc(18px + env(safe-area-inset-bottom)); border-top: 0; }
.chat-model-picker { grid-column: 1 / -1; justify-self: start; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; margin-bottom: 5px; color: var(--muted); font-size: 10px; font-weight: 800; }
.chat-model-picker select { max-width: min(320px, 70vw); min-height: 34px; padding: 5px 30px 5px 9px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font: inherit; font-size: 11px; }
.chat-reopen { position: sticky; z-index: 2; bottom: 0; display: block; width: min(820px, 100%); min-height: 44px; margin: 16px auto calc(18px + env(safe-area-inset-bottom)); border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--dark); font-weight: 800; }
.chat-app.composer-collapsed .chat-messages { padding-bottom: 24px; }
.dev-panel { width: min(820px, 100%); align-self: center; margin: 0 auto 12px; padding: 12px 14px; border: 1px dashed #9cac9f; border-radius: 12px; background: #f0f4ee; color: var(--muted); font-size: 12px; }
.dev-panel.chat-diagnostics-minimized { display: none; }
.dev-panel .eyebrow { margin-bottom: 8px; }
.dev-panel p:last-child { margin: 0; }
.dev-panel dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 16px; margin: 0; }
.dev-panel dl div { display: flex; justify-content: space-between; gap: 8px; }
.dev-panel dt { color: var(--muted); }
.dev-panel dd { margin: 0; color: var(--ink); font-weight: 800; }
.dev-stage-metrics { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.dev-stage-metrics .eyebrow { margin-bottom: 8px; }
.dev-stage-title { margin: 9px 0 3px; color: var(--ink); font-size: 11px; font-weight: 800; }
.dev-stage-metrics ol, .dev-stage-metrics ul { display: grid; gap: 3px; margin: 0; padding-left: 19px; }
.dev-stage-metrics li { overflow-wrap: anywhere; }
.chat-form textarea { width: 100%; min-height: 48px; max-height: 140px; resize: none; overflow-x: hidden; overflow-y: auto; padding: 11px 12px; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); background: #fff; line-height: 1.4; }
.chat-form textarea:focus { border-color: #89aa48; box-shadow: 0 0 0 3px #e8f3c9; outline: 3px solid #d8efa1; outline-offset: 2px; }
.chat-send { width: 44px; height: 44px; margin: 0 0 2px; border: 0; border-radius: 50%; background: var(--dark); color: #fff; font-size: 24px; line-height: 1; }
.chat-send:focus { outline: 3px solid #d8efa1; outline-offset: 2px; }
.chat-send:disabled { cursor: wait; opacity: .55; }
.chat-heading { display: flex; justify-content: space-between; gap: 20px; align-items: start; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.chat-heading h2 { font-size: 34px; }
.chat-heading p:last-child { margin: 12px 0 0; color: var(--muted); }
.chat-context { padding: 8px 11px; border-radius: 9px; background: #eff5e3; color: var(--accent-dark); font-size: 12px; white-space: nowrap; }
.chat-messages { flex: 1; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; padding: 24px 4px; }
.chat-empty { margin: auto; color: var(--muted); font-size: 15px; text-align: center; }
.chat-empty strong, .chat-empty span { display: block; }
.chat-empty strong { margin-bottom: 6px; color: var(--ink); font-size: 22px; }
.chat-examples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: min(560px, 100%); margin: 24px auto 0; }
.chat-example { min-height: 56px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); font: inherit; font-size: 14px; line-height: 1.4; text-align: left; cursor: pointer; }
.chat-example:hover { border-color: #89aa48; background: #edf4e9; }
.chat-example:focus-visible { outline: 3px solid #89aa48; outline-offset: 3px; }
@media (max-width: 520px) { .chat-examples { grid-template-columns: 1fr; } }
.chat-bubble { max-width: min(720px, 85%); padding: 13px 16px; border-radius: 15px; }
.chat-bubble span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.chat-bubble p { margin: 0; white-space: pre-wrap; }
.chat-bubble strong { font-weight: 850; }
.chat-bubble.user { align-self: end; background: var(--dark); color: #fff; border-bottom-right-radius: 4px; }
.chat-bubble.user span { color: #b1c3bc; }
.chat-bubble.assistant { align-self: start; background: #eef4e6; color: var(--ink); border-bottom-left-radius: 4px; }
.chat-activity { display: grid; grid-template-columns: 10px auto; gap: 0 9px; align-items: center; align-self: start; max-width: 300px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--muted); font-size: 13px; }
.chat-activity-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-dark); animation: chat-pulse 1.1s ease-in-out infinite; }
.chat-activity-track { grid-column: 2; display: block; height: 3px; margin-top: 9px; overflow: hidden; border-radius: 99px; background: #e8eee9; }
.chat-activity-track i { display: block; width: 42%; height: 100%; border-radius: inherit; background: var(--accent-dark); animation: chat-progress 1.6s ease-in-out infinite; }
@keyframes chat-pulse { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }
@keyframes chat-progress { 0% { transform: translateX(-130%); } 100% { transform: translateX(260%); } }
@media (prefers-reduced-motion: reduce) { .chat-activity-dot, .chat-activity-track i { animation: none; } }
.chat-form { display: flex; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.chat-form.has-voice-controls { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.chat-composer-bubble { display: grid; grid-template-columns: minmax(0, 1fr) auto 44px; align-items: end; gap: 8px; width: 100%; padding: 7px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.chat-form.has-voice-controls .chat-composer-bubble textarea { min-width: 0; min-height: 44px; padding: 11px 8px; border: 0; border-radius: 11px; background: transparent; box-shadow: none; }
.chat-form.has-voice-controls .chat-composer-bubble textarea:focus { outline: 0; }
.chat-voice, .chat-voice-cancel { min-height: 44px; border: 1px solid var(--line); border-radius: 13px; background: #fff; color: var(--dark); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.chat-voice { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 0 5px; }
.chat-voice span:first-child { font-size: 19px; }
.chat-voice.recording { border-color: #bd6b1b; color: #8b3c16; background: #fff1e8; }
.chat-voice-cancel { align-self: flex-end; min-height: 36px; padding: 0 12px; }
.chat-voice:disabled, .chat-voice-cancel:disabled { cursor: wait; opacity: .55; }
.voice-status { margin: 0 4px; color: var(--muted); font-size: 12px; line-height: 1.4; }
body.chat-route { overflow: hidden; }
body.chat-route .shell { height: var(--visual-viewport-height, 100dvh); min-height: 0; padding-bottom: 0; overflow: hidden; }
body.chat-route main { display: flex; flex: 1; flex-direction: column; min-height: 0; min-width: 0; overflow-x: hidden; }
body.chat-route #notice { flex: 0 0 auto; width: 100%; }
body.chat-route #app-view { display: flex; flex: 1 1 auto; width: 100%; min-height: 0; min-width: 0; max-width: 100%; overflow-x: hidden; }
body.chat-route footer { display: none; }
body.chat-route .chat-app { height: 100%; min-height: 0; width: 100%; max-width: 100%; min-width: 0; overflow-x: hidden; overscroll-behavior-x: none; }
.chat-app-header > div, .chat-app .chat-form > * { min-width: 0; }
.workspace-heading, .section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.workspace-heading { margin: 4px 0 20px; }
.workspace-heading h2, .section-heading h2 { font-size: 31px; }
.workspace-context, .section-heading > p { margin: 0 0 2px; color: var(--muted); font-size: 13px; }
.workspace-context strong { color: var(--ink); }
.section-heading { margin: 34px 0 16px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
.stats-grid-with-credit { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-card { min-height: 145px; display: flex; flex-direction: column; justify-content: space-between; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.stat-card-link { color: inherit; text-decoration: none; }
.stat-card-link:hover, .stat-card-link[aria-current="page"] { border-color: var(--accent-dark); background: #eef4e9; }
.stat-card-link:focus-visible, .demo-summary-link:focus-visible { outline: 3px solid var(--accent-dark); outline-offset: 3px; }
.stat-card-link:hover .stat-caption, .demo-summary-link:hover span { text-decoration: underline; }
.demo-summary-link { color: inherit; text-decoration: none; border-radius: 6px; }
.inventory-filter-hint { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.inventory-filter-hint a { color: var(--ink); }
.stat-card-dark { border-color: var(--dark); background: var(--dark); color: #fff; }
.stat-label { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.stat-card-dark .stat-label, .stat-card-dark .stat-caption { color: #b1c3bc; }
.stat-card strong { font-size: 42px; letter-spacing: -.07em; line-height: 1; }
.stat-card-credit strong { font-size: 26px; letter-spacing: -.03em; }
.stat-caption { color: var(--muted); font-size: 13px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, .8fr); gap: 22px; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: 16px; background: var(--card); padding: 22px; }
.panel-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.action-heading { align-items: start; margin-bottom: 18px; }
.action-heading h2 { margin: 0; }
.panel-toggle { min-height: 44px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; background: #fff; color: var(--muted); font-size: 12px; font-weight: 800; }
.button:focus, .panel-toggle:focus, .drawer-nav a:focus { outline: 3px solid #d8efa1; outline-offset: 2px; }
.search-row { margin-bottom: 18px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 620px; }
th { padding: 0 12px 11px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; text-align: left; text-transform: uppercase; letter-spacing: .09em; }
td { padding: 15px 12px; border-bottom: 1px solid #edf1ee; }
tbody tr:last-child td { border-bottom: 0; }
.product-name { font-weight: 800; }
.product-link { display: block; color: inherit; text-decoration: none; }
.product-link:hover .product-name { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }
.product-link:focus-visible { outline: 3px solid #d8efa1; outline-offset: 3px; border-radius: 4px; }
.product-barcode { color: var(--muted); font-size: 12px; }
.product-description { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.stock-low { color: var(--warning); font-weight: 800; }
.row-action { min-height: 44px; padding: 0 11px; font-size: 12px; }
.empty-state { padding: 35px 12px; color: var(--muted); text-align: center; }
.product-summary { max-width: 650px; display: flex; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.product-summary strong { display: block; margin-top: 4px; font-size: 34px; letter-spacing: -.05em; }
.product-summary span { color: var(--muted); font-size: 13px; }
.product-actions { max-width: 650px; display: grid; gap: 10px; }
.product-action { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 13px; background: var(--card); color: var(--ink); text-decoration: none; }
.product-action:hover { border-color: var(--accent-dark); transform: translateY(-1px); }
.product-action strong { font-size: 16px; }
.product-action small { color: var(--muted); font-size: 12px; }
.product-action span { grid-column: 2; grid-row: 1 / 3; align-self: center; font-size: 22px; }
.product-action-primary { border-color: var(--dark); background: var(--dark); color: #fff; }
.product-action-primary small { color: #b1c3bc; }
.side-stack { display: grid; gap: 22px; }
.form-panel h2 { margin-bottom: 22px; }
.form-panel .action-heading h2 { margin-bottom: 0; }
form { display: grid; gap: 12px; }
form .button { margin-top: 5px; }
.form-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.optional { font-weight: 400; }
footer { padding: 35px 0 0; color: var(--muted); font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 900px) { .content-grid { grid-template-columns: 1fr; } .hero { align-items: start; flex-direction: column; } .merchant-control { width: 100%; } }
@media (max-width: 620px) {
  .evaluation-page { padding-top: 18px; }
  .evaluation-page .page-heading { margin-bottom: 15px; }
  .evaluation-run-panel { grid-template-columns: 1fr; gap: 12px; padding: 14px; }
  .evaluation-run-actions { justify-items: stretch; }
  .evaluation-run-actions .button { width: 100%; min-width: 0; }
  .evaluation-run-actions p { text-align: left; }
  .asr-study-panel { gap: 15px; margin-bottom: 21px; padding: 14px; }
  .asr-study-heading { flex-direction: column; gap: 9px; }
  .asr-study-heading h2 { font-size: 21px; }
  .asr-study-badge { align-self: start; }
  .asr-study-grid { grid-template-columns: 1fr; gap: 9px; }
  .asr-study-model { gap: 14px; padding: 13px; }
  .evaluation-page .model-evaluation-results { grid-template-columns: 1fr; }
  .evaluation-graph-heading { align-items: start; flex-direction: column; gap: 4px; }
  .evaluation-graph-heading > span { margin-top: 0; }
  .evaluation-graph-heading-actions { align-items: start; flex-direction: column; gap: 6px; }
  .evaluation-graph-overlay { padding: 10px; }
  .evaluation-graph-overlay-panel { width: 100%; max-height: 96vh; padding: 38px 10px 14px; }
  .evaluation-graph-expanded svg { min-height: 320px; }
  .evaluation-graph-axis-label, .evaluation-graph-axis-title { font-size: 11px; }
  .evaluation-summary-controls { width: 100%; justify-content: start; align-items: start; gap: 10px; }
  .evaluation-filter-group { min-width: 0; }
  .evaluation-filter-group > span, .evaluation-filter-group > div { display: none; }
  .evaluation-filter-select-label { display: block; }
  .evaluation-filter-button { min-height: 38px; padding: 0 8px; }
  .evaluation-candidate-count { display: none; }
  .evaluation-scatter-row { grid-template-columns: 20px minmax(0, 1fr) auto auto; gap: 5px; font-size: 10px; }
  .evaluation-results-toolbar { align-items: stretch; flex-direction: column; }
  .evaluation-results-toolbar label { min-width: 0; width: 100%; }
  .evaluation-comparison { padding: 12px 9px; }
  .evaluation-chart-row { grid-template-columns: minmax(95px, 1.2fr) minmax(45px, 1fr) minmax(55px, .6fr); gap: 7px; padding: 5px; }
  .evaluation-chart-label, .evaluation-chart-value { font-size: 10px; }
  .evaluation-page .evaluation-model dl { grid-template-columns: 1fr; }
  .evaluation-history { margin-top: 18px; padding-top: 16px; }
  .evaluation-navigation-layout { grid-template-columns: 1fr; gap: 14px; margin-top: 16px; }
  .evaluation-navigation-layout .evaluation-history { position: static; }
  .evaluation-history-list { grid-template-columns: 1fr; }
  .evaluation-history-item { padding: 10px; }
  .evaluation-selected-run-heading { align-items: start; flex-direction: column; gap: 10px; }
  .evaluation-model details ol { max-height: 300px; }
  .shell { padding: 0 14px 24px; }
  .topbar { min-height: 64px; flex-wrap: wrap; gap: 10px 16px; padding: 10px 0; }
  .menu-button { order: 1; }
  .brand { order: 2; margin: 0 auto; font-size: 18px; }
  body.chat-route .topbar .chat-model-picker { right: 0; }
  body.chat-route .topbar .chat-model-picker > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .topbar .chat-model-picker select { width: min(142px, 38vw); max-width: 142px; min-height: 38px; font-size: 10px; }
  .current-merchant { order: 3; max-width: 105px; font-size: 12px; }
  .menu-drawer { width: min(340px, 90vw); padding: 22px 17px; }
  .menu-drawer { padding-top: calc(22px + env(safe-area-inset-top)); padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
  .home-view, .workflow-view { padding-top: 30px; }
  .home-heading h1 { font-size: 39px; }
  .home-heading p:not(.eyebrow) { margin-top: 12px; font-size: 15px; }
  .workspace-menu, .workflow-cards { grid-template-columns: 1fr; gap: 10px; margin-top: 24px; }
  .workflow-cards { margin-top: 20px; }
  .workspace-card { min-height: 145px; padding: 17px; border-radius: 13px; }
  .home-view .workspace-card { min-height: 82px; display: grid; grid-template-columns: 30px minmax(0, 1fr) 24px; grid-template-rows: auto auto; column-gap: 10px; padding: 13px 15px; }
  .home-view .workspace-card-index { grid-row: 1 / 3; align-self: start; }
  .home-view .workspace-card-title { margin: 0; font-size: 17px; }
  .home-view .workspace-card-copy { grid-column: 2; font-size: 11px; line-height: 1.3; }
  .home-view .workspace-card-arrow { right: 15px; top: 25px; bottom: auto; font-size: 20px; }
  .workspace-card-title { margin-top: 15px; font-size: 20px; }
  .workspace-card-copy { font-size: 12px; }
  .page-heading { margin-bottom: 22px; }
  .page-heading .back-link { margin-bottom: 20px; }
  .page-heading h1 { font-size: 36px; }
  .page-heading p:last-child { font-size: 14px; }
  .inventory-menu-view { padding-top: 18px; }
  .inventory-menu-view .page-heading { margin-bottom: 14px; }
  .inventory-menu-view .page-heading .back-link { min-height: 36px; margin-bottom: 10px; }
  .inventory-menu-view .page-heading h1 { font-size: 30px; }
  .inventory-menu-view .page-heading p:last-child { margin-top: 6px; }
  .inventory-actions { gap: 7px; margin-top: 14px; }
  .inventory-action { min-height: 62px; grid-template-columns: 28px minmax(0, 1fr) 20px; gap: 8px; padding: 8px 11px; border-radius: 10px; }
  .inventory-action-copy strong { font-size: 15px; }
  .inventory-action-copy small { font-size: 11px; }
  .drawer-heading { margin-bottom: 22px; }
  .hero { gap: 28px; padding: 34px 0 24px; }
  h1 { font-size: clamp(42px, 14vw, 58px); }
  .home-heading h1 { font-size: 34px; }
  .page-heading h1 { font-size: 34px; }
  .hero-copy { margin-top: 14px; font-size: 15px; }
  .merchant-control { min-width: 0; }
  .control-row, .search-row { flex-direction: column; }
  .control-row .button, .search-row .button { width: 100%; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stats-grid-with-credit { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #inventory-view { display: grid; grid-template-columns: 1fr; gap: 0; }
  .workspace-heading, .section-heading { align-items: start; flex-direction: column; gap: 7px; }
  .workspace-heading { order: 1; margin: 3px 0 16px; }
  .workspace-heading h2, .section-heading h2 { font-size: 27px; }
  .section-heading { order: 2; margin: 0 0 13px; }
  .stat-card { min-height: 94px; padding: 13px 11px; border-radius: 13px; }
  .stat-card strong { font-size: 30px; }
  .stat-card-credit strong { font-size: 24px; }
  .stat-caption { font-size: 12px; }
  .stats-grid { order: 4; margin: 20px 0 0; }
  .content-grid { display: contents; }
  .side-stack { order: 3; gap: 10px; }
  .inventory-panel { order: 5; margin-top: 22px; }
  .panel { padding: 16px; border-radius: 13px; }
  .panel-heading { align-items: start; margin-bottom: 17px; }
  .panel-heading .button { min-height: 44px; padding: 0 12px; }
  .action-heading { margin-bottom: 14px; }
  .panel-toggle, .row-action { min-height: 44px; }
  .mode-switch { display: flex; width: 100%; margin-bottom: 14px; }
  .mode-button { flex: 1; padding: 0 8px; font-size: 12px; }
  .chat-view { min-height: 560px; padding: 17px; border-radius: 13px; }
  .chat-app { height: calc(var(--visual-viewport-height, 100dvh) - 78px); min-height: 0; margin-top: 0; border: 0; border-radius: 0; background: transparent; }
  .chat-app { display: block; overflow-y: auto; overflow-x: clip; overscroll-behavior: contain; touch-action: pan-y; }
  .chat-app-header { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .chat-app-header .back-link { font-size: 12px; }
  .chat-app-header h1 { font-size: 24px; }
  .chat-app .chat-messages { min-height: 100%; padding: 18px 0 180px; overflow: visible; }
  .chat-app .chat-messages:has(.chat-empty) { padding-bottom: 96px; }
  .chat-app .chat-form { position: fixed; z-index: 10; left: max(14px, env(safe-area-inset-left)); right: max(14px, env(safe-area-inset-right)); bottom: calc(var(--chat-keyboard-offset, 0px) + env(safe-area-inset-bottom)); width: auto; grid-template-columns: minmax(0, 1fr) 44px; padding: 10px 0; background: var(--paper); }
  .chat-app .chat-form.has-voice-controls { display: flex; flex-direction: column; gap: 5px; }
  .chat-reopen { width: 100%; margin: 10px 0 calc(10px + env(safe-area-inset-bottom)); }
  .dev-panel { width: 100%; margin-bottom: 10px; }
  .dev-panel dl { grid-template-columns: repeat(2, 1fr); }
  .chat-form textarea { font-size: 16px; }
  .chat-heading { flex-direction: column; gap: 13px; padding-bottom: 17px; }
  .chat-heading h2 { font-size: 29px; }
  .chat-form { position: sticky; bottom: 0; flex-direction: column; padding-bottom: env(safe-area-inset-bottom); background: var(--card); }
  .chat-form .button { width: 100%; }
  .chat-bubble { max-width: 94%; }
  .table-wrap { overflow: visible; }
  table, tbody, tr, td { display: block; width: 100%; min-width: 0; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  tbody tr { margin-bottom: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfa; }
  tbody tr:last-child { margin-bottom: 0; }
  td { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 7px 0; border: 0; text-align: right; }
  td::before { content: attr(data-label); color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
  td:first-child { display: block; padding-top: 2px; text-align: left; }
  td:first-child::before, td:last-child::before { display: none; }
  td:last-child { display: block; padding-top: 10px; }
  .row-action { width: 100%; }
  .form-two-col { grid-template-columns: 1fr; }
  .product-form-page { padding-top: 14px; }
  .product-form-page .page-heading { margin-bottom: 12px; }
  .product-form-page .page-heading .back-link { min-height: 36px; margin-bottom: 8px; }
  .product-form-page .page-heading .eyebrow { margin-bottom: 5px; }
  .product-form-page .page-heading h1 { font-size: 30px; }
  .product-form-page .page-heading p:last-child { margin-top: 6px; }
  .product-wizard-progress { margin: -4px 0 14px; }
  .product-wizard-panel { padding: 16px; }
  .product-wizard-panel form { gap: 14px; }
  .product-step-prompt { font-size: 18px; }
  .product-wizard-panel input { min-height: 52px; font-size: 16px; }
  .product-wizard-panel select { min-height: 52px; font-size: 16px; }
  .size-unit-picker { gap: 7px; padding: 9px; }
  .size-unit-group { gap: 5px; }
  .size-unit-group > span { width: 48px; font-size: 9px; }
  .size-unit-option { min-width: 42px; min-height: 40px; padding: 0 9px; }
  input, select { font-size: 16px; }
  footer { padding-top: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .size-unit-reveal { transition: none; transform: none; }
}

.chat-diagnostics { margin-top: 14px; border-top: 1px solid #cbd5cf; padding-top: 10px; font-size: 12px; overflow-wrap: anywhere; }
.chat-diagnostics summary { cursor: pointer; font-weight: 600; }
.chat-diagnostics dl > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding: 5px 0; }
.chat-diagnostics dd { margin: 0; text-align: right; }
.chat-diagnostics small { display: block; margin-top: 10px; }
.timing-chart { margin: 18px 0; min-width: 0; }
.timing-chart-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; margin-bottom: 8px; }
.timing-stacked-bar { display: flex; width: 100%; height: 24px; overflow: hidden; border-radius: 4px; background: var(--line); }
.timing-segment { display: block; flex: 0 0 auto; height: 100%; min-height: 0; min-width: 0; border: 0; border-radius: 0; padding: 0; cursor: pointer; appearance: none; }
.timing-segment:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.timing-needle { background: var(--warning); }
.timing-model, .timing-generation { background: var(--accent-dark); }
.timing-tools, .timing-load { background: #7184a3; }
.timing-discovery, .timing-prompt { background: #739c89; }
.timing-queue, .timing-other { background: var(--line); }
.timing-bar-wrap { position: relative; }
.timing-tooltip { position: absolute; bottom: calc(100% + 7px); left: 0; max-width: 100%; box-sizing: border-box; z-index: 10; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--ink); color: var(--card); pointer-events: none; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.timing-tooltip[hidden] { display: none; }
.chat-diagnostics .timing-chart-note { margin: 10px 0; font-size: 11px; color: var(--muted); }
.timing-raw { margin-top: 14px; }
@media (max-width: 540px) {
  .timing-stacked-bar { height: 44px; }
  .timing-raw > summary { min-height: 44px; display: flex; align-items: center; }
}

/* Optional demo guide stays in the page flow, with the stock visible beneath it. */
.demo-guide { min-width: 0; margin: 0 0 22px; padding: clamp(16px, 3vw, 26px); border: 1px solid #d0dfbe; border-radius: 18px; background: #edf4e4; }
.demo-guide-steps { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 0 0 18px; padding: 0; list-style: none; color: #52634c; font-size: 12px; }
.demo-guide-steps li { display: flex; align-items: center; gap: 7px; }
.demo-guide-steps li > span { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid #a5b896; border-radius: 50%; }
.demo-guide-steps [aria-current="step"] { color: var(--dark); font-weight: 800; }
.demo-guide-steps [aria-current="step"] > span { background: var(--dark); color: #fff; border-color: var(--dark); }
.demo-guide-body { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.demo-guide-body > div { min-width: 0; }
.demo-guide h2 { margin: 0 0 7px; font-size: clamp(19px, 3vw, 25px); overflow-wrap: anywhere; }
.demo-guide p { max-width: 64ch; margin: 0 0 10px; line-height: 1.5; }
.demo-guide small { color: #52634c; font-size: 11px; }
.demo-guide-actions { display: flex; flex-shrink: 0; flex-direction: column; align-items: flex-start; gap: 4px; }
.demo-guide-actions .button { white-space: normal; }
.demo-guide-note { font-weight: 700; }
.demo-guide-compact { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 8px; color: var(--muted); font-size: 12px; }
.demo-added-product { background: #f0f7e7; box-shadow: inset 3px 0 #648d32; }
.demo-product-form, .demo-product-details { display: grid; gap: 20px; }
.demo-product-form label { display: grid; gap: 7px; font-weight: 700; min-width: 0; }
.demo-product-form input, .demo-product-form select, .demo-product-form textarea { width: 100%; min-height: 46px; padding: 11px; border: 1px solid var(--line); border-radius: 9px; font: inherit; font-size: 16px; background: #fff; color: var(--ink); }
.demo-product-form textarea { resize: vertical; }
.demo-product-numbers { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.demo-product-form summary { min-height: 44px; padding: 10px 0; cursor: pointer; font-weight: 700; }
.demo-product-form summary span { color: var(--muted); font-weight: 400; }
.demo-product-details { padding-top: 12px; }
.demo-product-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.demo-product-page .form-panel { max-width: 680px; margin-inline: auto; }
.demo-guide button:focus-visible, .product-wizard-panel :is(input, select, textarea, a, button):focus-visible { outline: 3px solid #638d35; outline-offset: 3px; }
.chat-messages > #demo-guide { width: 100%; margin-top: 16px; }
.chat-app .demo-guide { margin-bottom: 10px; padding: 14px 18px; }
.chat-app .demo-guide h2 { font-size: 18px; }
.chat-app .demo-guide-steps { margin-bottom: 10px; }
@media (max-width: 760px) {
  .demo-guide-body { flex-direction: column; align-items: stretch; gap: 12px; }
  .demo-guide-actions { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px; }
  .demo-guide-actions .button { flex: 1; }
  .demo-guide-steps { gap: 8px 12px; font-size: 11px; }

  .chat-app .demo-guide { padding: 14px; }
}
@media (max-width: 420px) {
  .demo-product-numbers { grid-template-columns: 1fr; }
  .demo-product-actions > * { width: 100%; text-align: center; }
}

.inventory-page:has(.demo-guide) .page-heading, .demo-product-page .page-heading { margin-bottom: 18px; }
.inventory-page:has(.demo-guide) .page-heading h1, .demo-product-page .page-heading h1 { font-size: clamp(30px, 4vw, 44px); }
.inventory-page:has(.demo-guide) .page-heading .back-link, .demo-product-page .page-heading .back-link { min-height: 36px; margin-bottom: 8px; }

/* Shared AI access stays within the visible viewport, including above keyboards. */
.topbar .demo-header-badge { position: static; flex-shrink: 0; }
.floating-ai-button { position: fixed; z-index: 18; right: max(16px, env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom) + var(--floating-ai-offset, 0px)); display: inline-flex; align-items: center; gap: 9px; min-height: 52px; max-width: calc(100vw - 32px); padding: 12px 20px; border: 1px solid var(--dark); border-radius: 999px; background: var(--dark); color: #fff; font-size: 14px; white-space: nowrap; box-shadow: 0 5px 20px rgba(22, 33, 31, .22); }
.floating-ai-button svg { flex-shrink: 0; }
.floating-ai-button:hover { background: #284b40; color: #fff; }
.floating-ai-button:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
body.menu-open .floating-ai-button { visibility: hidden; }
/* T189: pages scroll as a normal document (wheel works anywhere, including the side
   margins; the footer ends the content instead of floating above a reserved band).
   The fixed AI button is cleared by end-of-page padding plus the scroll-padding /
   scroll-margin rules below, which keep focused controls above it. Chat keeps its
   own full-height layout. */
body:not(.chat-route) .shell { min-height: var(--visual-viewport-height, 100dvh); padding-bottom: 0; }
body:not(.chat-route) main { flex: 1 0 auto; min-width: 0; overflow-x: hidden; }
body:not(.chat-route) footer { flex-shrink: 0; padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
html { scroll-padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
body:not(.chat-route) :is(input, textarea, select, button, a) { scroll-margin-bottom: calc(100px + env(safe-area-inset-bottom)); }
#ask-emoola-button[hidden], body.chat-route #ask-emoola-button { display: none; }
.stock-review { display: grid; gap: 12px; margin: 20px 0; }
.stock-review > div { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(0, 2fr); gap: 14px; }
.stock-review dt { color: var(--muted); }
.stock-review dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .topbar { gap: 8px; }
  .topbar .demo-header-badge { display: none; }
  .topbar .brand { min-width: 0; }
}

/* Structured read results scroll inside chat bubbles on narrow screens. */
.chat-table-wrap { max-width: 100%; overflow-x: auto; margin: 12px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.chat-result-table { display: table; width: 100%; min-width: 620px; border-collapse: collapse; font-size: 13px; }
.chat-result-table thead { display: table-header-group; position: static; width: auto; height: auto; overflow: visible; clip: auto; }
.chat-result-table tbody { display: table-row-group; width: auto; }
.chat-result-table tr { display: table-row; width: auto; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
.chat-result-table td, .chat-result-table td:first-child, .chat-result-table td:last-child { display: table-cell; width: auto; }
.chat-result-table td::before { display: none; }
.chat-result-table caption { padding: 10px 12px; text-align: left; font-weight: 800; }
.chat-result-table th, .chat-result-table td { padding: 9px 12px; text-align: left; vertical-align: top; white-space: nowrap; border-top: 1px solid var(--line); }
.chat-result-table th { font-weight: 800; }
.chat-result-table td:first-child { white-space: normal; min-width: 130px; overflow-wrap: anywhere; }
.chat-table-note { font-size: 12px; color: var(--muted); }
/* Location selection stays inline so suggestions do not cover registration controls. */
.business-location { min-width: 0; }
.location-suggestions { max-height: 240px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; margin-top: 6px; background: #fff; }
.location-option { padding: 12px; min-height: 44px; cursor: pointer; overflow-wrap: anywhere; }
.location-option + .location-option { border-top: 1px solid var(--line); }
.location-option:hover, .location-option[aria-selected="true"] { background: #eef4e9; color: var(--ink); }
.location-status { margin: 6px 0; font-size: 13px; color: var(--muted); }
.location-attribution { margin: 8px 0 0; font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.location-attribution a { color: inherit; }
#location-source:not(:empty) { display: block; }

.account-role-badge { display: inline-block; padding: 4px 10px; border: 1px solid var(--accent-dark); border-radius: 20px; color: var(--accent-dark); background: #eef4e6; font-size: 12px; font-weight: 800; }

.usage-stats { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 12px; margin: 20px 0; }
.usage-stats > div { padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.usage-stats span { display: block; color: var(--muted); font-size: 12px; }
.usage-stats strong { display: block; font-size: 22px; margin-top: 6px; }
.usage-chart { margin: 20px 0; }
.usage-chart svg { width: 100%; display: block; }
.usage-chart figcaption { color: var(--muted); font-size: 12px; }
.usage-toolbar { display:flex; justify-content:space-between; align-items:center; gap:16px; flex-wrap:wrap; }
.usage-toolbar label { min-width:180px; }
.usage-live::before { content:''; display:inline-block; width:8px; height:8px; border-radius:50%; background:#376844; margin-right:8px; }
.usage-live.is-stale::before { background:#b6792c; }
.usage-gauges { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin:24px 0; }
.usage-gauge-card { text-align:center; padding:24px 10px 14px; border:1px solid var(--line); border-radius:18px; background:var(--surface,#fff); }
.usage-gauge { width:clamp(88px,13vw,150px); aspect-ratio:1; border-radius:50%; background:conic-gradient(var(--usage-color) var(--usage-value),#edf0ea 0); display:grid; place-items:center; position:relative; margin:auto; }
.usage-gauge::before { content:''; position:absolute; inset:10%; border-radius:50%; background:var(--surface,#fff); }
.usage-gauge strong { position:relative; font-size:clamp(18px,3vw,30px); }
.usage-gauge-card h2 { font-size:16px; margin:14px 0 6px; }
.usage-gauge-card p { color:var(--muted); font-size:12px; margin:0; }
.usage-history { border:1px solid var(--line); border-radius:18px; padding:0 20px 20px; }
.usage-history .usage-stats { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.usage-history .usage-stats > div { border:0; padding:8px 0; }
.usage-chart svg { overflow:visible; }
.usage-chart text { fill:var(--muted); font-size:12px; }
.usage-grid { stroke:var(--line); stroke-width:1; }
.usage-average-line { stroke:#376844; stroke-width:2.5; fill:none; }
.usage-peak-line { stroke:#a77535; stroke-width:1.5; stroke-dasharray:5 4; fill:none; }
.usage-chart figcaption { display:flex; flex-wrap:wrap; align-items:center; gap:12px; }
.usage-legend-average::before,.usage-legend-peak::before { content:''; width:18px; display:inline-block; border-top:3px solid #376844; margin-right:6px; vertical-align:middle; }
.usage-legend-peak::before { border-color:#a77535; border-top-style:dashed; }
.usage-coverage label { display:flex; justify-content:space-between; font-size:12px; }
.usage-coverage progress { display:block; width:100%; height:8px; accent-color:#376844; }
.usage-coverage p,.usage-details { color:var(--muted); font-size:12px; }
.usage-details { margin-top:20px; }
@media(max-width:520px) { .usage-gauges { gap:7px; } .usage-gauge-card { padding:16px 6px; } .usage-gauge-card h2 { font-size:14px; } .usage-history { padding:0 10px 12px; } .usage-stats strong { font-size:18px; } .usage-chart svg { min-height:160px; } }

body.usage-route footer, body.usage-route #workspace-badge { display: none; }

.dataset-table { overflow-x:auto; margin:16px 0 28px; }
.dataset-table table { width:100%; border-collapse:collapse; font-size:13px; }
.dataset-table th,.dataset-table td { padding:10px; border-bottom:1px solid var(--line); text-align:left; }
#dataset-detail pre { overflow:auto; max-height:600px; padding:16px; background:#f3f5ef; font-size:12px; }

.pilot-agreement { margin: 1rem 0; padding: 1rem; border: 1px solid #b8c9bd; border-radius: 12px; }
.account-panel .pilot-consent { display: flex; align-items: flex-start; gap: .7rem; margin: .9rem 0; }
.account-panel .pilot-consent input[type="checkbox"] { width: 1.15rem; height: 1.15rem; min-height: 0; flex: 0 0 auto; margin-top: .3rem; }
.pilot-consent a { text-decoration: underline; color: #21593d; }

.account-panel textarea { min-height: 100px; resize: vertical; font: inherit; font-size: 16px; }

body.admin-users-route .account-page { max-width: 1380px; }
.admin-users-search { display: grid; grid-template-columns: minmax(180px, 1fr) auto auto; gap: 12px; align-items: end; }
.admin-users-table { display: table; width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13px; }
.admin-users-table th, .admin-users-table td { text-align: left; vertical-align: top; padding: 14px 10px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.admin-users-table thead { display: table-header-group; position: static; }
.admin-users-table tbody { display: table-row-group; }
.admin-users-table tr { display: table-row; }
.admin-users-table td { display: table-cell; }
.admin-users-table td::before { content: none; }
.admin-users-pagination { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin-top: 18px; }
.admin-business-description { white-space: pre-wrap; }
@media(max-width: 700px) {
  body.admin-users-route .account-panel { padding: 16px; }
  .admin-users-search { grid-template-columns: 1fr 1fr; }
  .admin-users-search label { grid-column: 1 / -1; }
  .admin-users-table, .admin-users-table tbody { display: block; }
  .admin-users-table thead { display: none; }
  .admin-users-table tr { display: block; margin: 12px 0; border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
  .admin-users-table td { display: block; padding: 10px 6px; }
  .admin-users-table td::before { content: attr(data-label); display: block; font-weight: 700; margin-bottom: 5px; color: var(--muted); }
  .admin-users-table td:last-child { border-bottom: 0; }
}

/* Customer credit book */
#credit-book { overflow-wrap: anywhere; }
#credit-book details { margin: 20px 0; border: 1px solid var(--line); padding: 16px; border-radius: 12px; }
#credit-book summary { cursor: pointer; font-weight: 700; }
#credit-book fieldset { display: grid; gap: 14px; border: 0; padding: 0; margin: 16px 0; min-width: 0; }
#credit-book form { display: grid; gap: 14px; margin: 16px 0; }
#credit-book label { display: grid; gap: 8px; }
.credit-totals { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.credit-totals div { padding: 14px; background: #f1f6f2; border-radius: 10px; }
.credit-totals span, .credit-totals strong, .credit-list span { display: block; }
.credit-totals strong { margin-top: 6px; }
.credit-list { list-style: none; padding: 0; }
.credit-list li, .credit-line { padding: 14px 0; border-bottom: 1px solid var(--line); }
.credit-line { display: grid; gap: 12px; }
.credit-pagination { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.credit-detail { border-top: 2px solid var(--line); margin-top: 24px; padding-top: 18px; }
#credit-book input, #credit-book select, #credit-book textarea { min-width: 0; max-width: 100%; }
@media(max-width: 420px) { .credit-totals { grid-template-columns: 1fr; } }

.daily-panel { margin-top: 22px; }
.daily-summary-text { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; line-height: 1.6; }
.daily-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
#daily-settings { display: grid; gap: 10px; max-width: 580px; }
#daily-note { display: block; width: 100%; min-height: 85px; }

.account-panel .daily-toggle { display: flex; align-items: center; gap: 10px; }
.account-panel #daily-enabled { width: 20px; min-height: 20px; flex: 0 0 20px; padding: 0; }

#daily-status:not(:empty) { padding: 12px; border: 1px solid var(--accent-dark); border-radius: 8px; background: #eef4e9; }
#daily-status[role="alert"]:not(:empty) { border-color: var(--warning); background: #fff2df; }

.daily-activities { list-style: none; padding: 0; display: grid; gap: 12px; }
.daily-activity { padding: 16px; border: 1px solid var(--line); border-radius: 10px; overflow-wrap: anywhere; }
.daily-activity h4 { margin: 10px 0; font-size: 17px; }
.daily-activity ul { padding-left: 20px; line-height: 1.6; }
.daily-activity-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.daily-activity-heading time, .daily-reference { color: var(--muted); font-size: 12px; }
.daily-totals { margin: 16px 0; }
.daily-totals > summary { cursor: pointer; font-weight: 700; }

.daily-response-status { margin: 20px 0; padding: 18px; border: 2px solid var(--accent); border-radius: 10px; background: var(--paper); overflow-wrap: anywhere; }
.daily-response-status h3 { margin-top: 0; }

/* T189 — Model comparison page: switchers, selectors and space use.
   Header + tabs share a row; one sticky control bar holds the run selector,
   category switcher and run actions; results use two columns on wide screens. */
.evaluation-page.workflow-view { padding: 18px 0 24px; }
.evaluation-page-header { display: flex; align-items: end; justify-content: space-between; gap: 12px 28px; flex-wrap: wrap; margin-bottom: 14px; }
.evaluation-page .page-heading { flex: 1 1 520px; margin-bottom: 0; }
.evaluation-page .page-heading .back-link { min-height: 32px; margin-bottom: 6px; }
.evaluation-page .page-heading .eyebrow { margin-bottom: 4px; }
.evaluation-page .page-heading h1 { font-size: clamp(28px, 3.2vw, 40px); }
.evaluation-page .page-heading p:last-child { max-width: 760px; margin-top: 6px; font-size: 13px; line-height: 1.5; }
.evaluation-view-tabs, .evaluation-segmented { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.evaluation-view-tab, .evaluation-segment { min-height: 34px; border: 0; border-radius: 8px; padding: 0 12px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; font-weight: 800; white-space: nowrap; cursor: pointer; }
.evaluation-view-tab:hover, .evaluation-segment:hover { color: var(--ink); background: #f1f5f0; }
.evaluation-view-tab[aria-selected="true"], .evaluation-segment.active { background: var(--dark); color: #fff; }
.evaluation-view-tab:focus-visible, .evaluation-segment:focus-visible, .evaluation-icon-button:focus-visible { outline: 3px solid #d8efa1; outline-offset: 1px; }
.evaluation-segment small { margin-left: 4px; padding: 1px 6px; border-radius: 99px; background: #edf2ec; color: var(--muted); font-size: 10px; font-weight: 800; }
.evaluation-segment.active small { background: rgba(255, 255, 255, .16); color: #e9f3e2; }
.evaluation-toolbar { position: sticky; top: 0; z-index: 6; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin: 0 0 14px; padding: 10px 0 8px; border-bottom: 1px solid var(--line); background: var(--paper); }
.evaluation-toolbar-row { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; }
.evaluation-run-picker { flex: 0 1 340px; min-width: 200px; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.evaluation-run-picker select, .evaluation-filter-select { flex: 1 1 auto; min-width: 0; width: 100%; min-height: 38px; margin: 0; border: 1px solid var(--line); border-radius: 9px; padding: 0 28px 0 10px; background: #fff; color: var(--ink); font: inherit; font-size: 12px; font-weight: 700; letter-spacing: normal; text-transform: none; }
.evaluation-icon-button { flex: 0 0 auto; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font-size: 16px; cursor: pointer; }
.evaluation-filter-slot { flex: 1 1 0; min-width: 240px; display: flex; }
.evaluation-filter-slot:empty { display: none; }
.evaluation-filter-slot .evaluation-segmented { min-width: 0; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.evaluation-filter-slot .evaluation-segmented::-webkit-scrollbar { display: none; }
.evaluation-toolbar-actions { flex: 0 0 auto; margin-left: auto; display: flex; gap: 8px; }
.evaluation-toolbar-actions .button { min-height: 38px; font-size: 13px; }
.evaluation-setup-toggle::after { content: " ▾"; }
.evaluation-setup-toggle[aria-expanded="true"]::after { content: " ▴"; }
.evaluation-toolbar-status { display: flex; align-items: center; gap: 12px; min-width: 0; }
.evaluation-toolbar-status > p { margin: 0; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.evaluation-toolbar-status .evaluation-live-progress { flex: 1 1 auto; grid-template-columns: auto minmax(120px, 1fr); align-items: center; padding: 4px 10px; }
.evaluation-toolbar-status .evaluation-live-progress.hidden { display: none; }
/* Run setup: compact horizontal form, hidden until "New run" is pressed. */
.evaluation-page .evaluation-run-panel { grid-template-columns: minmax(0, 1fr) auto; gap: 12px 20px; margin: 0 0 16px; padding: 16px 18px; border-radius: 12px; }
.evaluation-page .evaluation-run-panel[hidden] { display: none; }
.evaluation-run-intro { min-width: 0; }
.evaluation-page .evaluation-run-description { font-size: 12px; }
.evaluation-page .evaluation-options { grid-column: 1; order: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 0; border: 0; }
.evaluation-page .evaluation-options legend { float: left; width: 100%; margin-bottom: 6px; padding: 0; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.evaluation-option-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.evaluation-page .evaluation-chip { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 99px; background: #fff; color: var(--muted); font-size: 12px; font-weight: 800; cursor: pointer; }
.evaluation-page .evaluation-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.evaluation-page .evaluation-chip small { color: inherit; font-size: 10px; opacity: .8; }
.evaluation-page .evaluation-chip:has(input:checked) { border-color: var(--dark); background: #eef5e8; color: var(--accent-dark); }
.evaluation-page .evaluation-chip:has(input:checked)::before { content: "✓"; }
.evaluation-page .evaluation-chip:has(input:focus-visible) { outline: 3px solid #d8efa1; outline-offset: 1px; }
.evaluation-page .evaluation-seed { gap: 8px; color: var(--muted); font-size: 12px; font-weight: 700; }
.evaluation-page .evaluation-seed input { width: 110px; min-height: 36px; }
.evaluation-page .evaluation-options p { flex-basis: 100%; font-size: 11px; }
.evaluation-page .evaluation-run-actions { grid-column: 2; grid-row: 1 / span 2; align-self: end; }
/* Results: decision plot and ranking side by side on wide screens. */
.evaluation-report-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(340px, 1fr); align-items: start; gap: 18px 22px; }
.evaluation-report-main { min-width: 0; padding: 14px 16px 6px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.evaluation-report-main .evaluation-graph { margin: 0 0 10px; }
.evaluation-report-main .evaluation-graph + .evaluation-graph { padding-top: 14px; border-top: 1px solid var(--line); }
.evaluation-report-main .evaluation-graph-heading h2 { font-size: 17px; }
.evaluation-report-main .evaluation-graph-heading > div > p { font-size: 11px; }
.evaluation-report-main .evaluation-graph-heading-actions > span { display: none; }
.evaluation-page .evaluation-comparison { position: sticky; top: 112px; }
.evaluation-comparison-heading { align-items: center; }
.evaluation-metric-picker { flex: 0 1 220px; min-width: 170px; }
.evaluation-page .evaluation-chart-row { grid-template-columns: minmax(120px, 1fr) minmax(70px, 1fr) 56px; gap: 8px; }
.evaluation-page .evaluation-report-caption { margin: 10px 0 0; color: var(--muted); }
.evaluation-candidate-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 22px 0 10px; }
.evaluation-candidate-heading h2 { margin: 0; }
.evaluation-candidate-controls { display: flex; align-items: center; gap: 12px; }
.evaluation-candidate-controls label { min-width: 240px; }
/* T190: previous/next candidate and the candidate x category table. */
.evaluation-candidate-step { min-height: 38px; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; color: var(--ink); font-size: 11px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.evaluation-candidate-step:hover, .evaluation-candidate-step:focus-visible { border-color: #9cac9f; outline: 2px solid #d8efa1; outline-offset: 1px; }
.evaluation-candidate-step[aria-disabled="true"] { color: var(--muted); opacity: .55; }
.evaluation-candidates { margin-top: 18px; }
.evaluation-table-scroll { max-width: 100%; overflow-x: auto; }
/* Keep a real grid on phones too (the global narrow-screen rule stacks tables). */
.evaluation-candidate-table { display: table; width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.evaluation-candidate-table thead { display: table-header-group; position: static; width: auto; height: auto; overflow: visible; clip: auto; }
.evaluation-candidate-table tbody { display: table-row-group; width: auto; }
.evaluation-candidate-table tr { display: table-row; width: auto; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
.evaluation-candidate-table td, .evaluation-candidate-table td:first-child, .evaluation-candidate-table td:last-child { display: table-cell; width: auto; }
.evaluation-candidate-table td::before { display: none; }
.evaluation-candidate-table th, .evaluation-candidate-table td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; white-space: nowrap; }
.evaluation-candidate-table thead th { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.evaluation-candidate-table thead th.active { color: var(--ink); }
.evaluation-candidate-table td.active { background: #f4f7f4; }
.evaluation-candidate-table tbody th { position: sticky; left: 0; z-index: 1; min-width: 160px; max-width: 240px; background: #fff; color: var(--ink); font-size: 12px; font-weight: 800; letter-spacing: normal; text-transform: none; white-space: normal; overflow-wrap: anywhere; }
.evaluation-candidate-table tbody tr.selected th, .evaluation-candidate-table tbody tr.selected td { background: #eef5e8; }
.evaluation-candidate-table a { display: grid; gap: 2px; color: var(--ink); text-decoration: none; }
.evaluation-candidate-table a:hover, .evaluation-candidate-table a:focus-visible { color: var(--accent-dark); text-decoration: underline; }
.evaluation-candidate-table small { color: var(--muted); font-size: 10px; font-weight: 600; }
.evaluation-cell-empty { color: var(--muted); }
.evaluation-page .evaluation-model { padding: 14px 16px; }
.evaluation-page .evaluation-model dl { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 22px; }
@media (max-width: 1100px) {
  .evaluation-report-grid { grid-template-columns: minmax(0, 1fr); }
  /* The ranking is the denser summary, so it leads when columns stack. */
  .evaluation-page .evaluation-comparison { position: static; order: -1; }
  /* T190: the candidate table shares the card style but stays after the charts. */
  .evaluation-page .evaluation-comparison.evaluation-candidates { order: 0; }
}
@media (max-width: 620px) {
  .evaluation-page.workflow-view { padding-top: 8px; }
  .evaluation-page-header { align-items: start; gap: 10px; }
  .evaluation-page .page-heading { flex-basis: 100%; }
  .evaluation-page .page-heading p:last-child { font-size: 12px; }
  .evaluation-view-tabs { width: 100%; }
  .evaluation-view-tab { flex: 1; }
  .evaluation-toolbar { padding-top: 8px; }
  .evaluation-run-picker { flex: 1 1 0; min-width: 0; }
  .evaluation-run-picker > span { display: none; }
  .evaluation-filter-slot { order: 5; flex-basis: 100%; min-width: 0; }
  .evaluation-toolbar-actions { margin-left: 0; }
  .evaluation-toolbar-actions .button { padding: 0 12px; }
  .evaluation-page .evaluation-run-panel { grid-template-columns: 1fr; padding: 14px; }
  .evaluation-page .evaluation-run-actions { grid-column: 1; grid-row: auto; }
  .evaluation-report-main { padding: 10px 8px 4px; }
  /* Keep plot text legible on phones: the plot scrolls sideways instead of shrinking. */
  .evaluation-report-main .evaluation-graph { overflow-x: auto; }
  .evaluation-report-main .evaluation-graph svg { min-width: 560px; }
  .evaluation-comparison-heading { flex-direction: column; align-items: stretch; }
  .evaluation-metric-picker { flex-basis: auto; }
  .evaluation-candidate-controls, .evaluation-candidate-controls label { width: 100%; min-width: 0; }
  .evaluation-page .evaluation-model dl { grid-template-columns: 1fr; }
}

/* T189 — Stage timing visuals for candidate summaries and individual prompts.
   One colour per pipeline stage, shared by bars and legend. */
.stage-planning { background: #6f5e8f; }
.stage-needle { background: #9a6d38; }
.stage-selection { background: var(--dark); }
.stage-tool { background: #7184a3; }
.stage-answer { background: #759345; }
.stage-other { background: repeating-linear-gradient(135deg, #d5ddd8 0 3px, #eef2ef 3px 6px); }
.evaluation-stage-bar { display: flex; align-items: center; gap: 8px; min-width: 0; margin: 6px 0 2px; }
.evaluation-stage-track { display: flex; gap: 1px; min-width: 6px; height: 10px; overflow: hidden; border-radius: 3px; background: var(--line); }
.evaluation-stage-segment { display: block; flex-basis: 0; min-width: 2px; height: 100%; }
.evaluation-stage-total { flex: 0 0 auto; color: var(--muted); font-size: 10px; font-weight: 800; font-variant-numeric: tabular-nums; }
.evaluation-timing-summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 28px; margin: 4px 0 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.evaluation-timing-title { margin: 0 0 6px; color: var(--ink); font-size: 11px; font-weight: 800; }
.evaluation-timing-title small { margin-left: 6px; color: var(--muted); font-weight: 600; }
.evaluation-timing-summary .evaluation-stage-track { height: 16px; border-radius: 4px; }
.evaluation-stage-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 11px; }
.evaluation-stage-legend li { display: inline-flex; align-items: center; gap: 5px; }
.evaluation-stage-legend strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.evaluation-stage-legend small { font-size: 10px; }
.evaluation-stage-swatch { width: 10px; height: 10px; border-radius: 2px; }
.evaluation-spread { position: relative; height: 34px; margin: 18px 6px 4px; border-bottom: 1px solid var(--line); }
.evaluation-spread-dot { position: absolute; bottom: 4px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; opacity: .7; }
.evaluation-spread-dot.passed { background: #55ae59; }
.evaluation-spread-dot.failed { background: #bd6b1b; }
.evaluation-spread-dot:nth-child(3n) { bottom: 13px; }
.evaluation-spread-dot:nth-child(3n + 1) { bottom: 22px; }
.evaluation-spread-marker { position: absolute; top: -14px; bottom: -3px; border-left: 1.5px dashed var(--ink); }
.evaluation-spread-marker > span { position: absolute; top: -4px; left: 4px; color: var(--ink); font-size: 10px; font-weight: 800; white-space: nowrap; }
.evaluation-spread-marker + .evaluation-spread-marker > span { top: 8px; }
.evaluation-spread-key { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.evaluation-spread-key .evaluation-spread-dot { position: static; margin: 0 0 0 6px; }
@media (max-width: 760px) {
  .evaluation-timing-summary { grid-template-columns: minmax(0, 1fr); padding: 10px; }
}
.evaluation-stage-warning { color: #bd6b1b; cursor: help; }

/* T189 — Custom tooltip (replaces native title tooltips on the comparison page). */
.evaluation-tooltip { position: fixed; z-index: 80; max-width: min(300px, calc(100vw - 16px)); padding: 9px 11px; border-radius: 9px; background: var(--dark); color: #eef4ef; font-size: 11px; line-height: 1.45; box-shadow: 0 10px 28px rgba(15, 28, 24, .28); pointer-events: none; animation: evaluation-tip-in .12s ease-out; }
.evaluation-tooltip[hidden] { display: none; }
.evaluation-tooltip::after { content: ""; position: absolute; left: var(--arrow-x, 50%); width: 8px; height: 8px; margin-left: -4px; background: inherit; transform: rotate(45deg); }
.evaluation-tooltip[data-side="above"]::after { bottom: -4px; }
.evaluation-tooltip[data-side="below"]::after { top: -4px; }
.evaluation-tip-title { display: block; margin-bottom: 3px; color: #fff; font-size: 12px; overflow-wrap: anywhere; }
.evaluation-tooltip dl { display: grid; gap: 2px; margin: 5px 0 0; }
.evaluation-tooltip dl > div { display: flex; justify-content: space-between; gap: 14px; }
.evaluation-tooltip dt { display: flex; align-items: center; gap: 5px; color: #b9c8bf; }
.evaluation-tooltip dt b { color: #fff; }
.evaluation-tooltip dd { margin: 0; color: #fff; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.evaluation-tooltip p { margin: 6px 0 0; color: #c9d6ce; }
.evaluation-tooltip p:empty { display: none; }
.evaluation-tip-swatch { width: 8px; height: 8px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); }
@keyframes evaluation-tip-in { from { opacity: 0; transform: translateY(2px); } }
@media (prefers-reduced-motion: reduce) { .evaluation-tooltip { animation: none; } }
/* Terms with definitions get a dotted underline so readers know help exists. */
.evaluation-term, .evaluation-stage-legend li, .evaluation-spread-marker > span, .evaluation-candidate-state[data-tip] { cursor: help; }
.evaluation-term { text-decoration: underline dotted #a8b6ad; text-underline-offset: 3px; }
.evaluation-term:focus-visible, .evaluation-stage-legend li:focus-visible, .evaluation-spread-marker > span:focus-visible, .evaluation-candidate-state:focus-visible, .evaluation-stage-warning:focus-visible { outline: 2px solid #d8efa1; outline-offset: 2px; border-radius: 3px; }
.evaluation-spread-dot[data-tip] { cursor: pointer; }
.evaluation-spread-dot[data-tip]:hover, .evaluation-stage-segment[data-tip]:hover { filter: brightness(1.15); opacity: 1; }
.evaluation-spread-dot[data-tip]:hover { transform: scale(1.5); }

/* T189 — Model picker in the run setup. */
.evaluation-page .evaluation-model-picker { grid-column: 1; display: grid; gap: 8px; }
.evaluation-page .evaluation-model-picker > legend { float: none; margin-bottom: 0; }
.evaluation-model-presets { display: flex; gap: 12px; }
.evaluation-model-presets .text-button { min-height: 28px; padding: 0; color: var(--accent-dark); font-size: 11px; font-weight: 800; }
.evaluation-model-group { display: grid; gap: 5px; }
.evaluation-model-group-title { margin: 0; color: var(--muted); font-size: 11px; font-weight: 700; }
.evaluation-model-group-title small { margin-left: 4px; padding: 0 6px; border-radius: 99px; background: #edf2ec; font-size: 10px; }
.evaluation-run-estimate { margin: 0; color: var(--muted); font-size: 11px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.evaluation-page .evaluation-run-actions { grid-row: 1 / span 3; display: grid; gap: 8px; justify-items: end; }
@media (max-width: 620px) { .evaluation-run-estimate { text-align: left; } .evaluation-page .evaluation-run-actions { justify-items: stretch; } }

/* T189 — Less on-page prose: ⓘ buttons, compact check marks, folded study notes. */
.evaluation-info { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 6px; padding: 0; border: 1px solid #b9c6bd; border-radius: 50%; background: #fff; color: var(--muted); font: italic 800 11px/1 Georgia, serif; vertical-align: middle; letter-spacing: 0; text-transform: none; cursor: help; }
.evaluation-info:hover, .evaluation-info:focus-visible { border-color: var(--dark); color: var(--ink); outline: 2px solid #d8efa1; outline-offset: 1px; }
.evaluation-title-row { display: flex; align-items: center; gap: 4px; }
.evaluation-title-row .evaluation-info { width: 22px; height: 22px; font-size: 13px; }
.evaluation-checks { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.evaluation-check { padding: 1px 7px; border-radius: 99px; background: #eef1ef; color: var(--muted); font-size: 10px; font-weight: 800; }
.evaluation-check.good { background: #e6f2e4; color: #2f6734; }
.evaluation-check.bad { background: #f8eddf; color: #8a551e; }
details.asr-study-notes > summary { color: var(--accent-dark); font-size: 12px; font-weight: 800; cursor: pointer; }
details.asr-study-notes[open] > summary { margin-bottom: 6px; }

/* T189 — Section-level loading skeletons (pulsing rows) instead of page reloads. */
.evaluation-skeleton-bar { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, #e6ece7 0%, #f3f6f3 50%, #e6ece7 100%); background-size: 200% 100%; animation: evaluation-skeleton-pulse 1.3s ease-in-out infinite; }
.evaluation-skeleton-title { width: 45%; height: 16px; margin: 6px 0 16px; }
.evaluation-skeleton-plot { height: 300px; border-radius: 10px; }
.evaluation-skeleton-row { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(70px, 1fr) 46px; align-items: center; gap: 10px; padding: 12px 8px; border-radius: 8px; }
.evaluation-skeleton-row:nth-child(even) { background: #f7f9f7; }
.evaluation-skeleton-track { width: 100%; height: 10px; }
.evaluation-skeleton-value { width: 100%; }
.evaluation-skeleton-chip { width: 110px; height: 34px; border-radius: 99px; }
@keyframes evaluation-skeleton-pulse { 0% { background-position: 100% 0; opacity: .75; } 50% { opacity: 1; } 100% { background-position: -100% 0; opacity: .75; } }
@media (prefers-reduced-motion: reduce) { .evaluation-skeleton-bar { animation: none; } }
@media (max-width: 620px) { .evaluation-skeleton-plot { height: 200px; } }

/* T197 — outcome mix, hosted models and budget on the model comparison page. */
.evaluation-outcomes { margin: 4px 0 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.evaluation-outcome-track { height: 14px; }
.evaluation-outcome-segment { display: block; flex-basis: 0; min-width: 3px; height: 100%; }
.outcome-correct { background: #55ae59; }
.outcome-correct_after_attempted_violation { background: #9fcf7e; }
.outcome-safe_incomplete { background: #c9d3cc; }
.outcome-attempted_violation { background: #e3a857; }
.outcome-harmful_change { background: #c4512f; }
.outcome-timed_out { background: #8b6bb0; }
.outcome-infrastructure_error { background: repeating-linear-gradient(135deg, #b9c2bd 0 3px, #e8ece9 3px 6px); }
.evaluation-outcome-facts { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.evaluation-outcome-badge, .evaluation-cost-badge { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 99px; font-size: 10px; font-weight: 800; vertical-align: middle; }
.evaluation-outcome-badge { color: #16211f; }
.evaluation-outcome-badge.outcome-harmful_change, .evaluation-outcome-badge.outcome-timed_out { color: #fff; }
.evaluation-cost-badge { background: #eef1ef; color: var(--muted); }
.evaluation-page .evaluation-chip-hosted { border-style: dashed; }
.evaluation-page .evaluation-chip-hosted:has(input:checked) { border-style: solid; background: #eef3fb; color: #1f3d6b; border-color: #1f3d6b; }
.evaluation-budget { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 700; }
.evaluation-budget[hidden] { display: none; }
.evaluation-budget input { width: 110px; min-height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; }

/* T199 — run preparation and parallel scenario lanes. */
.evaluation-lanes { display: grid; gap: 10px; margin-top: 4px; }
.evaluation-prep-steps { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; font-size: 12px; font-weight: 750; color: var(--muted); }
.evaluation-prep-steps li { display: flex; align-items: center; gap: 7px; }
.evaluation-prep-steps li.done { color: var(--accent-dark); }
.evaluation-prep-steps li.active { color: var(--ink, #16211f); }
.prep-dot { width: 10px; height: 10px; border-radius: 50%; background: #c9d3cc; }
.evaluation-prep-steps li.done .prep-dot { background: var(--accent-dark); }
.evaluation-prep-steps li.active .prep-dot { background: #55ae59; animation: lane-pulse 1.1s ease-in-out infinite; }
.evaluation-prep-summary { margin: 0; color: var(--muted); font-size: 11px; }
.evaluation-lane-list { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.evaluation-lane { display: grid; grid-template-columns: minmax(120px, 180px) 1fr minmax(70px, 160px) 44px; align-items: center; gap: 10px;
  padding: 6px 10px; border-radius: 8px; background: #fff; border: 1px solid var(--line); font-size: 11px;
  transition: opacity .4s ease, transform .4s ease; }
.evaluation-lane.lane-enter { opacity: 0; transform: translateX(-12px); }
.evaluation-lane.lane-exit { opacity: 0; transform: translateX(12px); }
.lane-id { display: grid; min-width: 0; }
.lane-id small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lane-stages { display: flex; gap: 4px; min-width: 0; }
.lane-stage { flex: 1; padding: 2px 0; border-radius: 99px; background: #eef1ef; color: var(--muted); text-align: center; font-size: 10px; font-weight: 750; white-space: nowrap; overflow: hidden; }
.lane-stage.done { background: #dcebd3; color: var(--accent-dark); }
.lane-stage.active { background: #55ae59; color: #fff; animation: lane-pulse 1.1s ease-in-out infinite; }
.lane-detail { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, monospace; }
.lane-time { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
@keyframes lane-pulse { 50% { opacity: .55; } }
@media (max-width: 640px) {
  .evaluation-lane { grid-template-columns: 1fr 44px; }
  .lane-stages { grid-column: 1 / -1; grid-row: 2; }
  .lane-detail { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .evaluation-lane, .lane-stage.active, .evaluation-prep-steps li.active .prep-dot { animation: none; transition: none; }
}

/* T200 — hosted model and cost under an admin's demo chat reply. */
.chat-hosted-usage { margin: 6px 0 0; color: var(--muted); font-size: 11px; font-weight: 700; }

/* T201 — model/outcome eye toggles, spaced result list, single-result page. */
.evaluation-visibility { display: grid; gap: 8px; margin: 0 0 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.evaluation-filter-summary { color: var(--muted); font-size: 12px; font-weight: 700; }
.evaluation-toggle-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.evaluation-toggle-label { min-width: 70px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.evaluation-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 99px; background: #fff; color: var(--ink, #16211f); font-size: 12px; font-weight: 700; cursor: pointer; }
.evaluation-toggle small { color: var(--muted); font-weight: 800; }
.evaluation-toggle:hover { border-color: var(--accent-dark); }
.evaluation-toggle.off { background: transparent; color: var(--muted); border-style: dashed; }
.evaluation-toggle.off > span:not(.evaluation-stage-swatch) { text-decoration: line-through; }
.evaluation-toggle.off .evaluation-stage-swatch { opacity: .35; }
.evaluation-toggle.error-kind:not(.off) { border-color: #d9b48a; }
.evaluation-toggle-reset { border: 0; background: none; color: var(--accent-dark); font-size: 12px; font-weight: 800; text-decoration: underline; cursor: pointer; }
.evaluation-eye { flex: none; }
.outcome-rate_limited { background: repeating-linear-gradient(135deg, #e3a857 0 3px, #f7e2bf 3px 6px); }
.outcome-provider_error { background: repeating-linear-gradient(135deg, #b9c2bd 0 3px, #e8ece9 3px 6px); }
.outcome-run_error { background: repeating-linear-gradient(135deg, #8b6bb0 0 3px, #ddd1ea 3px 6px); }
/* Badges use a solid tint (readable text); the striped fills are for bars and swatches. */
.evaluation-outcome-badge.outcome-rate_limited { background: #f7e2bf; color: #6b4410; }
.evaluation-outcome-badge.outcome-provider_error { background: #e4e9e6; color: #2f3b36; }
.evaluation-outcome-badge.outcome-run_error { background: #e6dcf1; color: #4a2f6b; }
.evaluation-result-nav .back-link { color: var(--accent-dark); font-weight: 800; text-decoration: none; }
.evaluation-result-nav .back-link:hover { text-decoration: underline; }
.evaluation-result-stepper .button { text-decoration: none; min-height: 36px; display: inline-flex; align-items: center; }

.evaluation-result-list { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; max-height: none; }
.evaluation-result-row > details > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 110px auto minmax(0, 1fr) auto 14px; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-left: 4px solid #c9d3cc; border-radius: 10px; background: #fff; color: inherit; text-decoration: none; }
.evaluation-result-row > details > summary:hover, .evaluation-result-row > details > summary:focus-visible { border-color: var(--accent-dark); box-shadow: 0 2px 10px rgba(22, 33, 31, .08); }
.outcome-row-correct > details > summary { border-left-color: #55ae59; }
.outcome-row-correct_after_attempted_violation > details > summary { border-left-color: #9fcf7e; }
.outcome-row-attempted_violation > details > summary { border-left-color: #e3a857; }
.outcome-row-harmful_change > details > summary { border-left-color: #c4512f; }
.outcome-row-timed_out > details > summary, .outcome-row-run_error > details > summary { border-left-color: #8b6bb0; }
.outcome-row-rate_limited > details > summary { border-left-color: #e3a857; border-left-style: dashed; }
.evaluation-result-id { font-weight: 800; font-variant-numeric: tabular-nums; }
.evaluation-result-prompt { overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.evaluation-result-meta { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.evaluation-result-open { color: var(--muted); font-size: 20px; line-height: 1; }

.evaluation-result-shell { display: grid; gap: 16px; margin-top: 18px; }
.evaluation-result-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.evaluation-result-stepper { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; font-weight: 700; }
.evaluation-result-stepper .disabled { opacity: .45; pointer-events: none; }
.evaluation-result-layout { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 20px; align-items: start; }
.evaluation-result-rail { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.evaluation-result-rail ol { display: grid; gap: 2px; margin: 8px 0 0; padding: 0; list-style: none; }
.evaluation-result-rail a { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 6px; color: inherit; font-size: 12px; font-weight: 700; text-decoration: none; }
.evaluation-result-rail a:hover { background: #eef1ef; }
.evaluation-result-rail a.active { background: var(--accent-dark); color: #fff; }
.evaluation-result-page { display: grid; gap: 14px; min-width: 0; }
.evaluation-result-header h2 { margin: 2px 0 8px; font-size: 28px; }
.evaluation-result-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.evaluation-result-tags .evaluation-outcome-badge, .evaluation-result-tags .evaluation-cost-badge { margin-left: 0; font-size: 12px; padding: 3px 10px; }
.evaluation-result-card { padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.evaluation-result-card h3 { margin: 0 0 10px; font-size: 13px; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.evaluation-result-card.error { border-color: #d6b8e6; background: #fbf7fd; }
.evaluation-result-card pre { max-height: 360px; overflow: auto; margin: 6px 0 0; padding: 10px; border-radius: 8px; background: #f4f6f5; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.evaluation-result-prompt-full { margin: 0; padding: 10px 14px; border-left: 3px solid var(--accent-dark); font-size: 16px; }
.evaluation-turns, .evaluation-calls { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.evaluation-turn { display: grid; gap: 6px; }
.evaluation-turn > div { max-width: 85%; padding: 10px 12px; border-radius: 12px; }
.evaluation-turn span { display: block; margin-bottom: 3px; color: var(--muted); font-size: 11px; font-weight: 800; }
.evaluation-turn em { font-style: normal; padding: 1px 6px; border-radius: 99px; background: #eef1ef; }
.evaluation-turn p { margin: 0; }
.evaluation-turn-user { justify-self: end; background: #eef3fb; }
.evaluation-turn-assistant { justify-self: start; background: #eef4e8; }
.evaluation-call details { border: 1px solid var(--line); border-radius: 10px; }
.evaluation-call.failed details { border-color: #e8b8a8; }
.evaluation-call summary { display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; }
.evaluation-call-index { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #eef1ef; font-size: 11px; font-weight: 800; }
.evaluation-call-status { margin-left: auto; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.evaluation-call-body { padding: 0 12px 12px; }
.evaluation-call-body p { margin: 8px 0 0; color: var(--muted); font-size: 11px; font-weight: 800; }
.evaluation-attempts { margin: 4px 0 0; padding-left: 18px; font-size: 13px; }
@media (max-width: 760px) {
  .evaluation-result-layout { grid-template-columns: 1fr; }
  .evaluation-result-rail { position: static; max-height: 180px; }
  .evaluation-result-rail ol { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .evaluation-result-row > details > summary { grid-template-columns: 1fr auto; }
  .evaluation-result-row .evaluation-result-prompt { grid-column: 1 / -1; white-space: normal; }
  .evaluation-result-open { display: none; }
  .evaluation-turn > div { max-width: 100%; }
}

/* T202 — numbered scatter points and their legend (10 distinct colours, white numbers readable). */
.legend-1 { --legend: #1f5f8b; } .legend-2 { --legend: #c4541a; } .legend-3 { --legend: #2e7d4f; }
.legend-4 { --legend: #7b4ea3; } .legend-5 { --legend: #b0304a; } .legend-6 { --legend: #0f7c7c; }
.legend-7 { --legend: #8a6d1f; } .legend-8 { --legend: #4f5a63; } .legend-9 { --legend: #a23d8e; }
.legend-10 { --legend: #3b6e1d; }
.evaluation-graph-point[class*="legend-"] { fill: var(--legend); stroke: #fff; stroke-width: 2; }
.evaluation-graph-point-number { fill: #fff; font-size: 10px; font-weight: 800; pointer-events: none; }
.evaluation-scatter-legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 4px 14px; margin: 8px 0 4px; padding: 0; list-style: none; }
.evaluation-legend-item { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 8px; color: var(--ink, #16211f); font-size: 12px; text-decoration: none; }
.evaluation-legend-item:hover, .evaluation-legend-item:focus-visible { background: #eef1ef; }
.evaluation-legend-dot { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--legend); color: #fff; font-size: 10px; font-weight: 800; }
.evaluation-legend-name { overflow: hidden; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.evaluation-legend-tag { margin-left: 6px; padding: 0 5px; border-radius: 99px; background: #eef3fb; color: #1f3d6b; font-size: 9px; font-weight: 800; vertical-align: 1px; }
.evaluation-legend-values { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Hovering a legend entry or a point fades the others. */
.evaluation-scatter:has(.evaluation-legend-item:hover) .evaluation-graph-point-link,
.evaluation-scatter:has(.evaluation-graph-point-link:hover) .evaluation-graph-point-link { opacity: .22; transition: opacity .15s; }
.evaluation-scatter:has([data-point="1"]:hover) .evaluation-graph-point-link[data-point="1"] { opacity: 1; }
.evaluation-scatter:has(.evaluation-graph-point-link[data-point="1"]:hover) .evaluation-legend-item[data-point="1"] { background: #eef1ef; }
.evaluation-scatter:has([data-point="2"]:hover) .evaluation-graph-point-link[data-point="2"] { opacity: 1; }
.evaluation-scatter:has(.evaluation-graph-point-link[data-point="2"]:hover) .evaluation-legend-item[data-point="2"] { background: #eef1ef; }
.evaluation-scatter:has([data-point="3"]:hover) .evaluation-graph-point-link[data-point="3"] { opacity: 1; }
.evaluation-scatter:has(.evaluation-graph-point-link[data-point="3"]:hover) .evaluation-legend-item[data-point="3"] { background: #eef1ef; }
.evaluation-scatter:has([data-point="4"]:hover) .evaluation-graph-point-link[data-point="4"] { opacity: 1; }
.evaluation-scatter:has(.evaluation-graph-point-link[data-point="4"]:hover) .evaluation-legend-item[data-point="4"] { background: #eef1ef; }
.evaluation-scatter:has([data-point="5"]:hover) .evaluation-graph-point-link[data-point="5"] { opacity: 1; }
.evaluation-scatter:has(.evaluation-graph-point-link[data-point="5"]:hover) .evaluation-legend-item[data-point="5"] { background: #eef1ef; }
.evaluation-scatter:has([data-point="6"]:hover) .evaluation-graph-point-link[data-point="6"] { opacity: 1; }
.evaluation-scatter:has(.evaluation-graph-point-link[data-point="6"]:hover) .evaluation-legend-item[data-point="6"] { background: #eef1ef; }
.evaluation-scatter:has([data-point="7"]:hover) .evaluation-graph-point-link[data-point="7"] { opacity: 1; }
.evaluation-scatter:has(.evaluation-graph-point-link[data-point="7"]:hover) .evaluation-legend-item[data-point="7"] { background: #eef1ef; }
.evaluation-scatter:has([data-point="8"]:hover) .evaluation-graph-point-link[data-point="8"] { opacity: 1; }
.evaluation-scatter:has(.evaluation-graph-point-link[data-point="8"]:hover) .evaluation-legend-item[data-point="8"] { background: #eef1ef; }
.evaluation-scatter:has([data-point="9"]:hover) .evaluation-graph-point-link[data-point="9"] { opacity: 1; }
.evaluation-scatter:has(.evaluation-graph-point-link[data-point="9"]:hover) .evaluation-legend-item[data-point="9"] { background: #eef1ef; }
.evaluation-scatter:has([data-point="10"]:hover) .evaluation-graph-point-link[data-point="10"] { opacity: 1; }
.evaluation-scatter:has(.evaluation-graph-point-link[data-point="10"]:hover) .evaluation-legend-item[data-point="10"] { background: #eef1ef; }
.evaluation-scatter:has([data-point="11"]:hover) .evaluation-graph-point-link[data-point="11"] { opacity: 1; }
.evaluation-scatter:has(.evaluation-graph-point-link[data-point="11"]:hover) .evaluation-legend-item[data-point="11"] { background: #eef1ef; }
.evaluation-scatter:has([data-point="12"]:hover) .evaluation-graph-point-link[data-point="12"] { opacity: 1; }
.evaluation-scatter:has(.evaluation-graph-point-link[data-point="12"]:hover) .evaluation-legend-item[data-point="12"] { background: #eef1ef; }
.evaluation-scatter:has([data-point="13"]:hover) .evaluation-graph-point-link[data-point="13"] { opacity: 1; }
.evaluation-scatter:has(.evaluation-graph-point-link[data-point="13"]:hover) .evaluation-legend-item[data-point="13"] { background: #eef1ef; }
.evaluation-scatter:has([data-point="14"]:hover) .evaluation-graph-point-link[data-point="14"] { opacity: 1; }
.evaluation-scatter:has(.evaluation-graph-point-link[data-point="14"]:hover) .evaluation-legend-item[data-point="14"] { background: #eef1ef; }
.evaluation-scatter:has([data-point="15"]:hover) .evaluation-graph-point-link[data-point="15"] { opacity: 1; }
.evaluation-scatter:has(.evaluation-graph-point-link[data-point="15"]:hover) .evaluation-legend-item[data-point="15"] { background: #eef1ef; }
.evaluation-scatter:has([data-point="16"]:hover) .evaluation-graph-point-link[data-point="16"] { opacity: 1; }
.evaluation-scatter:has(.evaluation-graph-point-link[data-point="16"]:hover) .evaluation-legend-item[data-point="16"] { background: #eef1ef; }
.evaluation-scatter:has([data-point="17"]:hover) .evaluation-graph-point-link[data-point="17"] { opacity: 1; }
.evaluation-scatter:has(.evaluation-graph-point-link[data-point="17"]:hover) .evaluation-legend-item[data-point="17"] { background: #eef1ef; }
.evaluation-scatter:has([data-point="18"]:hover) .evaluation-graph-point-link[data-point="18"] { opacity: 1; }
.evaluation-scatter:has(.evaluation-graph-point-link[data-point="18"]:hover) .evaluation-legend-item[data-point="18"] { background: #eef1ef; }
.evaluation-scatter:has([data-point="19"]:hover) .evaluation-graph-point-link[data-point="19"] { opacity: 1; }
.evaluation-scatter:has(.evaluation-graph-point-link[data-point="19"]:hover) .evaluation-legend-item[data-point="19"] { background: #eef1ef; }
.evaluation-scatter:has([data-point="20"]:hover) .evaluation-graph-point-link[data-point="20"] { opacity: 1; }
.evaluation-scatter:has(.evaluation-graph-point-link[data-point="20"]:hover) .evaluation-legend-item[data-point="20"] { background: #eef1ef; }
.evaluation-scatter:has([data-point="21"]:hover) .evaluation-graph-point-link[data-point="21"] { opacity: 1; }
.evaluation-scatter:has(.evaluation-graph-point-link[data-point="21"]:hover) .evaluation-legend-item[data-point="21"] { background: #eef1ef; }
.evaluation-scatter:has([data-point="22"]:hover) .evaluation-graph-point-link[data-point="22"] { opacity: 1; }
.evaluation-scatter:has(.evaluation-graph-point-link[data-point="22"]:hover) .evaluation-legend-item[data-point="22"] { background: #eef1ef; }
.evaluation-scatter:has([data-point="23"]:hover) .evaluation-graph-point-link[data-point="23"] { opacity: 1; }
.evaluation-scatter:has(.evaluation-graph-point-link[data-point="23"]:hover) .evaluation-legend-item[data-point="23"] { background: #eef1ef; }
.evaluation-scatter:has([data-point="24"]:hover) .evaluation-graph-point-link[data-point="24"] { opacity: 1; }
.evaluation-scatter:has(.evaluation-graph-point-link[data-point="24"]:hover) .evaluation-legend-item[data-point="24"] { background: #eef1ef; }
.evaluation-scatter:has([data-point="25"]:hover) .evaluation-graph-point-link[data-point="25"] { opacity: 1; }
.evaluation-scatter:has(.evaluation-graph-point-link[data-point="25"]:hover) .evaluation-legend-item[data-point="25"] { background: #eef1ef; }
.evaluation-scatter:has([data-point="26"]:hover) .evaluation-graph-point-link[data-point="26"] { opacity: 1; }
.evaluation-scatter:has(.evaluation-graph-point-link[data-point="26"]:hover) .evaluation-legend-item[data-point="26"] { background: #eef1ef; }
.evaluation-scatter:has([data-point="27"]:hover) .evaluation-graph-point-link[data-point="27"] { opacity: 1; }
.evaluation-scatter:has(.evaluation-graph-point-link[data-point="27"]:hover) .evaluation-legend-item[data-point="27"] { background: #eef1ef; }
.evaluation-scatter:has([data-point="28"]:hover) .evaluation-graph-point-link[data-point="28"] { opacity: 1; }
.evaluation-scatter:has(.evaluation-graph-point-link[data-point="28"]:hover) .evaluation-legend-item[data-point="28"] { background: #eef1ef; }
.evaluation-scatter:has([data-point="29"]:hover) .evaluation-graph-point-link[data-point="29"] { opacity: 1; }
.evaluation-scatter:has(.evaluation-graph-point-link[data-point="29"]:hover) .evaluation-legend-item[data-point="29"] { background: #eef1ef; }
.evaluation-scatter:has([data-point="30"]:hover) .evaluation-graph-point-link[data-point="30"] { opacity: 1; }
.evaluation-scatter:has(.evaluation-graph-point-link[data-point="30"]:hover) .evaluation-legend-item[data-point="30"] { background: #eef1ef; }
@media (prefers-reduced-motion: reduce) { .evaluation-graph-point-link { transition: none !important; } }

/* T202 — compact review filters: one row with a Models dropdown and error chips. */
.evaluation-visibility { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.evaluation-model-menu { position: relative; }
.evaluation-model-menu summary { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 99px; background: #fff; font-size: 12px; cursor: pointer; list-style: none; }
.evaluation-model-menu summary::-webkit-details-marker { display: none; }
.evaluation-model-menu summary::after { content: "▾"; color: var(--muted); }
.evaluation-model-menu summary .evaluation-toggle-label { min-width: 0; }
.evaluation-model-menu-list { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; display: grid; gap: 4px; min-width: 260px; max-height: 60vh; overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 10px 30px rgba(22, 33, 31, .16); }
.evaluation-menu-toggle { justify-content: flex-start; width: 100%; border-radius: 8px; border-color: transparent; }
.evaluation-menu-toggle:hover { background: #eef1ef; }
.evaluation-model-menu-actions:empty { display: none; }

/* T202 — focus view for one result: hide the page chrome; keep a compact sticky navigation bar. */
.evaluation-page.evaluation-focus .page-heading,
.evaluation-page.evaluation-focus .evaluation-page-header,
.evaluation-page.evaluation-focus .evaluation-run-intro,
.evaluation-page.evaluation-focus .evaluation-toolbar,
.evaluation-page.evaluation-focus .evaluation-history { display: none; }
.evaluation-page.evaluation-focus .evaluation-result-shell { margin-top: 0; }
.evaluation-page.evaluation-focus .evaluation-result-nav { position: sticky; top: 0; z-index: 20; padding: 10px 0; background: var(--paper); border-bottom: 1px solid var(--line); }
.evaluation-page.evaluation-focus .evaluation-result-rail { top: 70px; max-height: calc(100vh - 86px); }

/* T202 — direct labels take the point's colour (legend removed). */
.evaluation-graph-point-link[class*="legend-"] .evaluation-graph-point-label { fill: var(--legend); }
.evaluation-graph-point-link[class*="legend-"] .evaluation-graph-label-leader { stroke: var(--legend); opacity: .5; }

/* T204 — outcome labels in candidate details filter the result list. */
.evaluation-outcome-filter { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border: 1px solid transparent; border-radius: 99px; background: none; color: inherit; font: inherit; cursor: pointer; }
.evaluation-outcome-filter:hover { border-color: var(--line); background: #fff; }
.evaluation-outcome-filter.active { border-color: var(--accent-dark); background: #eef4e8; }
.evaluation-focus-note { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; color: var(--muted); font-size: 12px; font-weight: 700; }

/* T204 — bordered results panel; rows open in place with an "Open full page" button. */
.evaluation-results-panel { margin-top: 14px; padding: 12px 14px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfb; }
.evaluation-results-panel > summary { font-weight: 800; cursor: pointer; }
.evaluation-result-row > details > summary::-webkit-details-marker { display: none; }
.evaluation-result-row > details[open] > summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.evaluation-result-row > details[open] .evaluation-result-open { transform: rotate(180deg); }
.evaluation-result-open { transition: transform .15s; }
.evaluation-result-inline { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 10px 10px; background: #fff; }
.evaluation-result-inline:empty { display: none; }
.evaluation-result-inline .evaluation-result-card { padding: 12px 14px; border-radius: 10px; }
.evaluation-result-inline-actions { display: flex; justify-content: flex-end; }
.evaluation-result-inline-actions .button { text-decoration: none; min-height: 34px; display: inline-flex; align-items: center; }
@media (prefers-reduced-motion: reduce) { .evaluation-result-open { transition: none; } }

/* T204 — the result list and the record inside an opened row grow with their content (the legacy
   420 px scroll box for prompt lists clipped them). */
.evaluation-model details ol.evaluation-result-list,
.evaluation-model details ol.evaluation-turns,
.evaluation-model details ol.evaluation-calls { max-height: none; overflow: visible; }

/* T205 — candidate type switch and the planner × executor grid. */
.evaluation-type-switch { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 99px; background: #fff; }
.evaluation-type-switch button { min-height: 26px; padding: 0 10px; border: 0; border-radius: 99px; background: none; color: var(--muted); font-size: 12px; font-weight: 750; cursor: pointer; }
.evaluation-type-switch button.active { background: var(--accent-dark); color: #fff; }
.evaluation-type-switch button.active small { color: #dfe8df; }
.evaluation-pair-matrix { margin-top: 16px; }
.evaluation-matrix-scroll { overflow-x: auto; }
.evaluation-matrix { width: 100%; border-collapse: separate; border-spacing: 4px; font-size: 12px; }
.evaluation-matrix th { color: var(--muted); font-weight: 750; text-align: left; white-space: nowrap; }
.evaluation-matrix thead th, .evaluation-matrix tr:first-child th { text-align: center; }
.evaluation-matrix tr:first-child th:first-child { text-align: left; }
.evaluation-matrix td { padding: 0; }
.evaluation-matrix td a { display: grid; gap: 2px; min-width: 88px; padding: 10px 8px; border-radius: 8px; text-align: center; text-decoration: none;
  background: color-mix(in srgb, var(--accent-dark) calc(12% + var(--share) * 70%), #fff); color: #16211f; }
.evaluation-matrix td a strong { font-size: 15px; }
.evaluation-matrix td a small { color: inherit; opacity: .8; }
.evaluation-matrix td a[style*="--share:0.6"], .evaluation-matrix td a[style*="--share:0.7"], .evaluation-matrix td a[style*="--share:0.8"],
.evaluation-matrix td a[style*="--share:0.9"], .evaluation-matrix td a[style*="--share:1"] { color: #fff; }
.evaluation-matrix td a:hover, .evaluation-matrix td a:focus-visible { outline: 2px solid var(--ink, #16211f); outline-offset: 1px; }
.evaluation-matrix-empty { color: var(--muted); text-align: center; }
.evaluation-matrix th { text-transform: none; letter-spacing: 0; font-size: 12px; }

/* T205 — invalid plan (planner pairs): a model failure, shown in slate blue. */
.outcome-invalid_plan { background: #5d7fa3; }
.evaluation-outcome-badge.outcome-invalid_plan { color: #fff; }
.outcome-row-invalid_plan > details > summary { border-left-color: #5d7fa3; }

/* T216: decision view — candidate types by colour and shape with a legend key (filtering stays with the
   page's Type and Models controls), view switch buttons, and the dashed best-trade-off line. */
.evaluation-decision .group-hosted { --group: #1f5f8b; }
.evaluation-decision .group-planner { --group: #c4541a; }
.evaluation-decision .group-local { --group: #2e7d4f; }
.evaluation-decision-point { fill: var(--group); stroke: #fff; stroke-width: 2; cursor: pointer; transition: opacity .15s ease; }
.evaluation-decision-point.frontier { stroke: var(--ink); stroke-width: 2.5; }
.evaluation-decision-point:focus { outline: none; stroke: var(--ink); stroke-width: 3; }
.evaluation-decision-label { fill: var(--group); font-size: 11px; font-weight: 800; paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; }
.evaluation-decision-frontier { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 5 4; opacity: .55; pointer-events: none; }
.evaluation-decision .evaluation-graph-point-link:hover .evaluation-decision-point { opacity: .85; }
.evaluation-decision-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 2px 0 6px; }
.evaluation-decision-group { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 10px 0 7px; border: 1px solid var(--line); border-radius: 99px; background: #fff; color: var(--ink); font-size: 12px; font-weight: 750; cursor: default; }
.evaluation-decision-group small { color: var(--muted); font-weight: 700; }
.evaluation-decision-group:hover, .evaluation-decision-group:focus-visible { border-color: var(--group); outline: none; }
.evaluation-decision-group.empty { color: var(--muted); opacity: .55; }
.evaluation-decision-icon { width: 16px; height: 16px; flex: none; }
.evaluation-decision-icon > * { fill: var(--group); }
.evaluation-decision-frontier-key { display: inline-flex; align-items: center; gap: 6px; margin-left: 4px; color: var(--muted); font-size: 12px; font-weight: 700; }
.evaluation-decision-frontier-key svg { width: 22px; height: 10px; }
.evaluation-decision-frontier-key line { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 5 4; opacity: .55; }
.evaluation-decision-views button:disabled { opacity: .45; cursor: default; }
.evaluation-report-main .evaluation-decision .evaluation-graph-heading-actions { flex-wrap: wrap; }
/* T216: legend icons are small inline marks, not charts — out-rank the general ".evaluation-graph svg"
   sizing rules (full width, phone min-width, enlarged min-height). */
.evaluation-graph .evaluation-decision-legend svg.evaluation-decision-icon { display: inline-block; width: 16px; height: 16px; min-width: 0; min-height: 0; overflow: visible; }
.evaluation-graph .evaluation-decision-legend .evaluation-decision-frontier-key svg { display: inline-block; width: 22px; height: 10px; min-width: 0; min-height: 0; }
/* T216: decision points share the chart-point class; keep their own colours and a steady size on hover
   (squares and diamonds cannot grow like circles). */
.evaluation-decision .evaluation-graph-point.evaluation-decision-point { fill: var(--group); stroke: #fff; stroke-width: 2; }
.evaluation-decision .evaluation-graph-point.evaluation-decision-point.frontier { stroke: var(--ink); stroke-width: 2.5; }
.evaluation-decision .evaluation-graph-point.evaluation-decision-point:hover, .evaluation-decision .evaluation-graph-point.evaluation-decision-point:focus { r: 7; stroke: var(--ink); stroke-width: 3; }

/* T238: chat-first front page. Uses the existing colour tokens. */
body.landing-route #ask-emoola-button { display: none; }
body.landing-signed-in #menu-button { display: inline-block; }
.landing { display: grid; gap: 72px; padding: 8px 0 24px; }
.landing-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; padding: 14px 0 0; font-weight: 700; font-size: 14px; }
.landing-nav > a { color: var(--ink); text-decoration: none; }
.landing-nav > a:hover { text-decoration: underline; }
.landing-nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.landing .button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.landing-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 48px; align-items: center; }
.landing-hero h1 { margin: 0 0 18px; font-size: clamp(40px, 6vw, 72px); line-height: 1.03; letter-spacing: -0.04em; overflow-wrap: anywhere; }
.landing-hero h1 em { position: relative; display: inline-block; z-index: 0; font-style: normal; background: none; color: var(--accent-dark); padding: 0 .12em; }
/* Fit the highlight to the lowercase letters and descender, rather than the font's full inline box. */
.landing-hero h1 em::before { content: ""; position: absolute; z-index: -1; inset: .24em 0 -.08em; background: var(--accent); border-radius: 10px; }
.landing-lead { max-width: 560px; margin: 0 0 16px; font-size: 18px; color: var(--ink); }
.landing-trust { margin: 0 0 18px; color: var(--accent-dark); font-weight: 800; }
.landing-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.landing-facts li { padding: 6px 12px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); color: var(--muted); font-size: 13px; font-weight: 700; }

.landing-chat { display: flex; flex-direction: column; min-height: 520px; max-height: 680px; border: 1px solid var(--line); border-radius: 22px; background: var(--card); box-shadow: 0 18px 50px rgba(25, 49, 43, .10); overflow: hidden; }
.landing-chat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 14px 10px; border-bottom: 1px solid var(--line); background: var(--dark); }
.landing-switch { display: inline-flex; padding: 4px; border-radius: 12px; background: rgba(255, 255, 255, .10); }
.landing-switch button { min-height: 38px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: #d7e3de; font-weight: 800; cursor: pointer; }
.landing-switch button.active { background: var(--accent); color: var(--accent-dark); }
.landing-switch button:focus-visible { outline: 3px solid #d8efa1; outline-offset: 2px; }
.landing-live { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.landing-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.landing-mode-note { margin: 0; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--paper); color: var(--muted); font-size: 13px; }
.landing-mode-note a, .landing-allowance a { color: var(--accent-dark); font-weight: 800; }
.landing-thread { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 16px; overflow-y: auto; min-height: 220px; }
.landing-thread .chat-bubble { max-width: 88%; }
.landing-thread .landing-error { background: #fbeee6; color: #7a3b12; }
.landing-prompts { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 10px; }
.landing-prompts:empty { display: none; }
.landing-prompts button { min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); color: var(--ink); font-size: 13px; font-weight: 700; cursor: pointer; }
.landing-prompts button:hover:not(:disabled) { border-color: var(--accent-dark); }
.landing-form { display: flex; align-items: flex-end; gap: 8px; margin: 0 12px 8px; padding: 6px 6px 6px 14px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.landing-form textarea { flex: 1; min-height: 40px; max-height: 140px; padding: 9px 0; border: 0; resize: none; font: inherit; background: transparent; color: var(--ink); }
.landing-form textarea:focus { outline: none; }
.landing-form:focus-within { border-color: var(--accent-dark); }
.landing-allowance { margin: 0; padding: 0 16px 12px; color: var(--muted); font-size: 12px; }
.landing-allowance:empty { display: none; }
.landing-allowance-out { color: var(--warning); font-weight: 700; }

.landing-section h2 { max-width: 820px; margin: 0 0 24px; font-size: clamp(28px, 4vw, 42px); line-height: 1.12; letter-spacing: -0.03em; }
.landing-section h3 { margin: 0 0 8px; font-size: 17px; }
.landing-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.landing-columns > div { padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.landing-columns ul { margin: 0; padding-left: 18px; color: var(--muted); display: grid; gap: 8px; }
.landing-column-accent { background: var(--dark) !important; border-color: var(--dark) !important; color: #fff; }
.landing-column-accent ul { color: #d7e3de; }
.landing-column-accent h3 { color: var(--accent); }
.landing-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.landing-cards article { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.landing-cards p { margin: 0; color: var(--muted); font-style: italic; }
.landing-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.landing-steps li { padding: 22px; border-top: 3px solid var(--accent); background: var(--card); border-radius: 0 0 16px 16px; }
.landing-steps span { display: block; margin-bottom: 10px; color: var(--accent-dark); font-size: 12px; font-weight: 800; letter-spacing: .14em; }
.landing-steps p { margin: 0; color: var(--muted); }
.landing-audiences { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.landing-audiences article { padding: 30px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); scroll-margin-top: 20px; }
.landing-audiences h2 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 12px; }
.landing-audiences p:not(.eyebrow) { margin: 0 0 20px; color: var(--muted); }
.landing-closing { padding: 44px 32px; border-radius: 24px; background: var(--dark); color: #fff; text-align: center; }
.landing-closing h2 { margin: 0 auto 12px; }
.landing-closing p { margin: 0 0 22px; color: #d7e3de; }
.landing-closing-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.landing-footer { display: flex; flex-wrap: wrap; gap: 6px 14px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.landing-footer strong { color: var(--ink); }
#how-it-works { scroll-margin-top: 20px; }

@media (max-width: 900px) {
  .landing { gap: 52px; }
  .landing-hero { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .landing-chat { min-height: 480px; }
  .landing-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .landing-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .landing-nav > a { display: none; }
  .landing-nav-actions { margin-left: 0; width: 100%; justify-content: flex-end; }
  .landing-lead { font-size: 16px; }
  .landing-columns, .landing-cards, .landing-steps, .landing-audiences { grid-template-columns: minmax(0, 1fr); }
  .landing-chat-head { flex-wrap: wrap; }
  .landing-switch { width: 100%; }
  .landing-switch button { flex: 1; padding: 0 8px; }
  .landing-live { display: none; }
  .landing-chat { min-height: 440px; max-height: 78vh; border-radius: 18px; }
  .landing-closing { padding: 32px 18px; }
}
