/* Public workspace demo. Self-contained: it does not inherit the marketing cascade. */

/*
 * Palette mirrored from the site's own dark theme so the demo reads as the same
 * product, not a separate app. Source of truth is dark-theme.css (body.dark-site)
 * and maroon.css; if those change, change these to match.
 *
 *   --night #160a10  --night-raised #231018  --night-soft #2e1720
 *   --night-text #fcf6f2  --night-muted #c1aeb5  --night-line #533340
 *   --night-accent #ee9aaf  --night-teal #94cece  --forest #800020
 */
:root {
  --bg: #160a10;
  --panel: #1d0d14;
  --raised: #231018;
  --raised-2: #2e1720;
  --line: #533340;
  --line-soft: #3a2029;
  --text: #fcf6f2;
  --muted: #c1aeb5;
  --faint: #9a838d;
  --acid: #ee9aaf;
  --acid-bright: #f5b3c3;
  --acid-ink: #160a10;
  --edge: #7a4657;
  --edge-strong: #96566b;
  --teal: #94cece;
  --wine: #800020;
  --warn: #e8b06a;
  --bad: #e8826b;
  --mono: "DM Mono", ui-monospace, monospace;
  --sans: "Manrope", system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
}

* { box-sizing: border-box; }

body.demo-body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, dl { margin: 0; }
ul, ol { list-style: none; padding: 0; }
button { font: inherit; color: inherit; cursor: pointer; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 50;
  background: var(--acid); color: var(--acid-ink); padding: 10px 16px; text-decoration: none;
}
.skip:focus { left: 12px; top: 12px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

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

.eyebrow {
  display: flex; align-items: center; gap: 9px;
  font: 500 0.64rem var(--mono); letter-spacing: 0.09em; text-transform: uppercase; color: var(--faint);
}
.eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--acid); display: block; }

.button {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 30px;
  border: 0; padding: 14px 16px; text-decoration: none;
  font: 500 0.72rem var(--mono); letter-spacing: 0.05em; text-transform: uppercase;
}
/* The site's primary call to action is a burgundy fill with white text; pink is
   reserved for accents and highlights, as on the marketing pages. */
.button.primary { background: var(--wine); color: #fff; }
.button.primary:hover { background: #9b3351; }
.button span { font-size: 1.05rem; line-height: 0.7; }

.link-button {
  background: none; border: 0; padding: 0; margin-top: 18px;
  color: var(--muted); font-size: 0.82rem; text-decoration: underline; text-underline-offset: 3px;
}
.link-button:hover { color: var(--text); }

/* ------------------------------------------------------------------ sign-in */

.signin {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 20px 28px; gap: 26px;
}
.signin[hidden] { display: none; }

.signin-card {
  width: min(560px, 100%);
  background: var(--panel); border: 1px solid var(--line);
  padding: 34px 34px 38px;
}
.signin-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; gap: 16px; flex-wrap: wrap; }
.signin-wordmark { color: var(--text); text-decoration: none; font-size: 1rem; font-weight: 500; letter-spacing: -0.05em; }
.signin-wordmark strong { font-weight: 800; }
.signin-wordmark span { color: var(--acid); }

.signin h1 { font-size: 2rem; letter-spacing: -0.055em; line-height: 1.06; margin-bottom: 14px; font-weight: 700; }
.signin-lede { color: var(--muted); line-height: 1.68; margin-bottom: 26px; font-size: 0.95rem; }

.signin form { display: grid; gap: 7px; }
.signin label, .sidebar-label, .field-label {
  font: 500 0.62rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint);
}
.signin input {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line);
  padding: 10px 0 11px; color: var(--text); font: 400 1.02rem var(--sans); outline: none; border-radius: 0;
}
.signin input:focus { border-color: var(--acid); }
#code { font-family: var(--mono); letter-spacing: 0.34em; }

.field-error { min-height: 1.1em; font-size: 0.78rem; color: var(--bad); }
.signin .button { margin-top: 10px; justify-self: start; }
.signin-note { font-size: 0.78rem; color: var(--faint); line-height: 1.6; margin-top: 12px; }
.signin-foot { width: min(560px, 100%); font-size: 0.75rem; color: var(--faint); line-height: 1.6; }

.company-card { border: 1px solid var(--line); background: var(--raised); padding: 18px 20px; margin-bottom: 26px; }
.company-card h2 { font-size: 1.22rem; letter-spacing: -0.04em; margin-bottom: 3px; }
.company-card .domain { font: 400 0.76rem var(--mono); color: var(--acid); margin-bottom: 14px; }
.company-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 18px; }
.company-card dt { font: 500 0.6rem var(--mono); letter-spacing: 0.07em; text-transform: uppercase; color: var(--faint); }
.company-card dd { margin: 0; font-size: 0.86rem; }
.company-card .fallback {
  margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line-soft);
  font-size: 0.78rem; color: var(--muted); line-height: 1.6;
}

.provision { display: grid; gap: 2px; }
.provision li {
  display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start;
  padding: 13px 0; border-bottom: 1px solid var(--line-soft); opacity: 0.32;
  transition: opacity 0.25s ease;
}
.provision li.active, .provision li.done { opacity: 1; }
.provision .mark { font: 500 0.8rem var(--mono); color: var(--faint); line-height: 1.5; }
.provision li.active .mark { color: var(--acid); }
.provision li.done .mark { color: var(--acid); }
.provision strong { font-weight: 600; font-size: 0.92rem; display: block; }
.provision small { color: var(--muted); font-size: 0.79rem; line-height: 1.55; }

/* ---------------------------------------------------------------- workspace */

.workspace {
  display: grid; grid-template-columns: 258px minmax(0, 1fr) 372px;
  height: 100vh; height: 100dvh;
}
.workspace[hidden] { display: none; }

.sidebar {
  background: var(--panel); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 20px; padding: 20px 14px 14px; overflow-y: auto;
}
.sidebar-head { padding: 0 8px; }
.tenant { font-size: 1rem; font-weight: 700; letter-spacing: -0.035em; }
.tenant-sub { font: 400 0.68rem var(--mono); color: var(--faint); margin-top: 2px; }

.new-chat {
  display: flex; align-items: center; gap: 9px; width: 100%;
  background: var(--raised); border: 1px solid var(--line); padding: 10px 12px;
  font-size: 0.86rem; text-align: left;
}
.new-chat:hover { background: var(--raised-2); }
.new-chat span { color: var(--acid); font-size: 1rem; line-height: 1; }

.sidebar-group { display: grid; gap: 8px; }
.sidebar-label { padding: 0 8px; }
.sidebar-empty, .sidebar-hint { padding: 0 8px; font-size: 0.74rem; color: var(--faint); line-height: 1.55; }

.thread-list, .workspace-list { display: grid; gap: 2px; }
.thread-list button, .workspace-list button {
  width: 100%; text-align: left; background: none; border: 0; padding: 8px 8px;
  font-size: 0.84rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.thread-list button:hover, .workspace-list button:hover { background: var(--raised); color: var(--text); }
.thread-list button[aria-current="true"] { background: var(--raised-2); color: var(--text); }

.workspace-list li { position: relative; }
.workspace-list button { display: flex; align-items: center; gap: 8px; white-space: normal; }
.workspace-list .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--acid); flex: none; }
.workspace-list .dot.locked { background: var(--faint); }
.workspace-list .meta { display: block; font: 400 0.66rem var(--mono); color: var(--faint); }

.profile-button {
  margin-top: auto; display: grid; grid-template-columns: 30px 1fr 14px; gap: 10px; align-items: center;
  background: var(--raised); border: 1px solid var(--line); padding: 9px 10px; text-align: left; width: 100%;
}
.profile-button:hover { background: var(--raised-2); }
.avatar {
  width: 30px; height: 30px; display: grid; place-items: center;
  background: var(--acid); color: var(--acid-ink); font: 600 0.72rem var(--mono); border-radius: 50%;
}
.profile-id { overflow: hidden; }
.profile-id strong { display: block; font-size: 0.84rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-id small { display: block; font-size: 0.72rem; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-caret { color: var(--faint); font-size: 0.7rem; }

/* --------------------------------------------------------------------- main */

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.main-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 26px; border-bottom: 1px solid var(--line); flex: none;
}
.main-title { font-size: 0.94rem; font-weight: 600; }
.main-sub { font: 400 0.7rem var(--mono); color: var(--faint); margin-top: 1px; }
.panel-toggle {
  background: var(--raised); border: 1px solid var(--line); padding: 7px 12px;
  font: 500 0.64rem var(--mono); letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted);
}
.panel-toggle[aria-expanded="true"] { color: var(--acid); border-color: var(--edge); }

.messages { flex: 1 1 auto; overflow-y: auto; padding: 26px 26px 8px; display: grid; gap: 26px; align-content: start; }
.messages:empty { display: none; }

.greeting { padding: 30px 26px; display: grid; gap: 14px; align-content: center; flex: 1 1 auto; }
.greeting[hidden] { display: none; }
.greeting h2 { font-size: 1.9rem; letter-spacing: -0.05em; font-weight: 700; }
.greeting > p { color: var(--muted); max-width: 580px; line-height: 1.68; }
.suggestions { display: grid; gap: 8px; margin-top: 10px; max-width: 680px; }
.suggestions button {
  width: 100%; text-align: left; background: var(--panel); border: 1px solid var(--line);
  padding: 13px 15px; display: grid; gap: 4px;
}
.suggestions button:hover { border-color: var(--edge); background: var(--raised); }
.suggestions .q { font-size: 0.89rem; line-height: 1.5; }
.suggestions .why { font: 400 0.68rem var(--mono); color: var(--faint); }

.message { display: grid; gap: 8px; }
.message-label {
  display: flex; align-items: center; gap: 8px;
  font: 500 0.62rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint);
}
.message-label .mark { color: var(--acid); }
.message-user .message-body {
  background: var(--raised); border: 1px solid var(--line); padding: 12px 15px;
  justify-self: start; max-width: 85%; font-size: 0.95rem;
}
.message-body > * + * { margin-top: 12px; }

.answer-headline { font-size: 1.22rem; letter-spacing: -0.04em; line-height: 1.3; font-weight: 700; }
.answer-lede { color: var(--muted); line-height: 1.7; }
.answer-because { border-left: 2px solid var(--acid); padding-left: 13px; font-size: 0.92rem; line-height: 1.65; }

.thinking { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.88rem; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--acid); animation: pulse 1.1s ease-in-out infinite; flex: none; }
@keyframes pulse { 0%, 100% { opacity: 0.25; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.15); } }

.ranked { display: grid; gap: 8px; }
.ranked-item { border: 1px solid var(--line); background: var(--panel); padding: 14px 16px; display: grid; gap: 7px; }
.ranked-item.chosen { border-color: var(--edge-strong); background: var(--raised); }
.ranked-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.ranked-head h3 { font-size: 0.95rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.4; }
.ranked-kicker { font: 500 0.6rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); flex: none; }
.ranked-item.chosen .ranked-kicker { color: var(--acid); }
.ranked-detail { font-size: 0.86rem; color: var(--muted); line-height: 1.6; }
.ranked-meta { display: grid; gap: 4px; font: 400 0.74rem var(--mono); color: var(--faint); }
.ranked-score { display: flex; align-items: center; gap: 9px; font: 400 0.7rem var(--mono); color: var(--faint); }
.score-track { flex: 1 1 auto; height: 3px; background: var(--line); position: relative; }
.score-fill { position: absolute; inset: 0 auto 0 0; background: var(--faint); }
.ranked-item.chosen .score-fill { background: var(--acid); }

.flag {
  border: 1px solid #5c4030; background: #241419; padding: 11px 14px;
  font-size: 0.84rem; line-height: 1.6; color: #e8cdb4;
}
.flag strong { color: var(--warn); }

.disclosure { border-top: 1px solid var(--line-soft); padding-top: 12px; }
.disclosure summary {
  font: 500 0.64rem var(--mono); letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--muted); cursor: pointer; list-style: none;
}
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary:before { content: "+ "; color: var(--acid); }
.disclosure[open] summary:before { content: "− "; }
.disclosure-body { padding-top: 12px; display: grid; gap: 10px; font-size: 0.86rem; color: var(--muted); line-height: 1.65; }

.role-note {
  display: grid; gap: 8px; border: 1px solid var(--line); background: var(--panel); padding: 13px 15px;
  font-size: 0.85rem; line-height: 1.6; color: var(--muted);
}
.role-note strong { color: var(--text); }
.role-note .switches { display: flex; flex-wrap: wrap; gap: 6px; }
.role-note .switches button {
  background: var(--raised); border: 1px solid var(--line); padding: 6px 10px;
  font: 400 0.72rem var(--mono); color: var(--muted);
}
.role-note .switches button:hover { border-color: var(--edge); color: var(--text); }

.composer {
  flex: none; margin: 10px 26px 0; display: grid; grid-template-columns: minmax(0, 1fr) 44px;
  border: 1px solid var(--line); background: var(--panel);
}
.composer textarea {
  border: 0; background: transparent; color: var(--text); resize: none;
  font: 400 0.95rem var(--sans); padding: 14px 16px; outline: none; max-height: 160px; line-height: 1.5;
}
.composer textarea::placeholder { color: var(--faint); }
.composer .send { background: none; border: 0; border-left: 1px solid var(--line); color: var(--acid); font-size: 1.1rem; }
.composer .send:hover:not(:disabled) { background: var(--raised); }
.composer .send:disabled { color: var(--faint); cursor: not-allowed; }
.composer-note { flex: none; padding: 8px 26px 16px; font-size: 0.71rem; color: var(--faint); line-height: 1.55; }

/* ----------------------------------------------------------------- pipeline */

.pipeline { background: var(--panel); border-left: 1px solid var(--line); overflow-y: auto; display: flex; flex-direction: column; }
.pipeline[hidden] { display: none; }
.pipeline-head {
  padding: 17px 20px; border-bottom: 1px solid var(--line); flex: none;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.pipeline-close { display: none; background: none; border: 0; font-size: 1.5rem; line-height: 1; color: var(--muted); padding: 0 2px; }
.pipeline-close:hover { color: var(--text); }
.pipeline-sub { font-size: 0.78rem; color: var(--faint); line-height: 1.55; margin-top: 4px; }
.pipeline-body { padding: 18px 20px 28px; display: grid; gap: 22px; align-content: start; }

.stage-list { display: grid; }
.stage {
  display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 11px;
  padding: 10px 0; opacity: 0.3; transition: opacity 0.22s ease; position: relative;
}
.stage.active, .stage.done { opacity: 1; }
.stage .rail { display: grid; place-items: start center; position: relative; }
.stage .bullet { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); margin-top: 6px; }
.stage.active .bullet { background: var(--acid); animation: pulse 1.1s ease-in-out infinite; }
.stage.done .bullet { background: var(--acid); }
.stage:not(:last-child) .rail:after {
  content: ""; position: absolute; top: 18px; bottom: -10px; left: 50%;
  width: 1px; background: var(--line); transform: translateX(-50%);
}
.stage-owner { font: 500 0.63rem var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--acid); }
.stage.pending .stage-owner { color: var(--faint); }
.stage-label { font-size: 0.85rem; line-height: 1.45; }
.stage-detail { font-size: 0.74rem; color: var(--faint); line-height: 1.5; }

.pipeline-block { display: grid; gap: 10px; }
.pipeline-block > h3 {
  font: 500 0.63rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint);
}
.pipeline-block > p { font-size: 0.78rem; color: var(--muted); line-height: 1.6; }

.weights { display: grid; gap: 9px; }
.weight { display: grid; grid-template-columns: minmax(0, 1fr) 46px; gap: 10px; align-items: center; }
.weight-name { font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.weight-name small { display: block; font: 400 0.66rem var(--mono); color: var(--faint); }
.weight-value { font: 500 0.75rem var(--mono); color: var(--text); text-align: right; }
.weight-bar { grid-column: 1 / -1; height: 4px; background: var(--line); position: relative; }
/*
 * Source kinds carry the colour: the tools a company already pays for read teal,
 * the layer we post-train reads in the brand accent. The class is the source's
 * own `kind` from the industry pack — data | assistant | tuned.
 */
.weight-fill { position: absolute; inset: 0 auto 0 0; background: var(--acid); transition: width 0.5s ease; }
.weight-fill.data, .weight-fill.assistant { background: var(--teal); }
.weight-fill.tuned { background: var(--acid); }

.tag {
  display: inline-block; font: 500 0.58rem var(--mono); letter-spacing: 0.07em; text-transform: uppercase;
  padding: 2px 6px; border: 1px solid var(--line); color: var(--faint);
}
.tag.tuned { border-color: var(--edge-strong); color: var(--acid); }

.exchange { display: grid; gap: 8px; }
.exchange-item { border-left: 2px solid var(--line); padding: 2px 0 2px 11px; }
.exchange-from { font: 500 0.62rem var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.exchange-text { font-size: 0.79rem; color: var(--muted); line-height: 1.6; }

.facts { display: grid; gap: 5px; }
.facts div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; font-size: 0.78rem; }
.facts dt { color: var(--faint); overflow: hidden; text-overflow: ellipsis; }
.facts dd { margin: 0; font-family: var(--mono); font-size: 0.74rem; text-align: right; }

.query {
  font: 400 0.7rem var(--mono); color: var(--muted); background: var(--bg);
  border: 1px solid var(--line-soft); padding: 9px 10px; overflow-x: auto; white-space: pre; line-height: 1.6;
}

.checks { display: grid; gap: 6px; }
.checks li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 9px; font-size: 0.78rem; line-height: 1.5; }
.checks .ok { color: var(--acid); }
.checks .no { color: var(--warn); }
.checks small { display: block; color: var(--faint); font-size: 0.72rem; }

.pipeline-foot { font-size: 0.72rem; color: var(--faint); line-height: 1.6; border-top: 1px solid var(--line-soft); padding-top: 13px; }

/* ------------------------------------------------------------------- dialog */

.dialog {
  position: fixed; inset: 0; z-index: 40; background: #160a10cc;
  display: grid; place-items: center; padding: 24px;
}
.dialog[hidden] { display: none; }
.dialog-card {
  width: min(640px, 100%); max-height: min(86vh, 860px); overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line);
}
.dialog-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel);
}
.dialog-head h2 { font-size: 1.05rem; letter-spacing: -0.03em; }
.dialog-close { background: none; border: 0; font-size: 1.4rem; line-height: 1; color: var(--muted); padding: 0 4px; }
.dialog-close:hover { color: var(--text); }
.dialog-body { padding: 22px; display: grid; gap: 22px; }

.profile-head { display: grid; grid-template-columns: 46px 1fr; gap: 14px; align-items: center; }
.profile-head .avatar { width: 46px; height: 46px; font-size: 0.95rem; }
.profile-head h3 { font-size: 1.08rem; letter-spacing: -0.03em; }
.profile-head p { font: 400 0.76rem var(--mono); color: var(--faint); }

.profile-section { display: grid; gap: 10px; }
.profile-section > h4 {
  font: 500 0.63rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint);
}
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px 20px; }
.profile-grid > div { display: grid; gap: 2px; }
.profile-grid dt, .field-label { font: 500 0.6rem var(--mono); letter-spacing: 0.07em; text-transform: uppercase; color: var(--faint); }
.profile-grid dd { margin: 0; font-size: 0.86rem; }

.role-picker { display: grid; gap: 7px; }
.role-option {
  display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 11px; align-items: start;
  border: 1px solid var(--line); background: var(--raised); padding: 12px 14px; text-align: left; width: 100%;
}
.role-option:hover { border-color: var(--edge); }
.role-option[aria-pressed="true"] { border-color: var(--edge-strong); background: var(--raised-2); }
.role-option .radio { width: 11px; height: 11px; border-radius: 50%; border: 1px solid var(--faint); margin-top: 5px; }
.role-option[aria-pressed="true"] .radio { border-color: var(--acid); background: var(--acid); box-shadow: inset 0 0 0 2px var(--raised-2); }
.role-option strong { font-size: 0.89rem; font-weight: 600; display: block; }
.role-option small { font-size: 0.78rem; color: var(--muted); line-height: 1.55; display: block; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span {
  font: 400 0.72rem var(--mono); color: var(--muted);
  border: 1px solid var(--line); padding: 4px 9px;
}

.profile-note { font-size: 0.78rem; color: var(--faint); line-height: 1.6; border-top: 1px solid var(--line-soft); padding-top: 14px; }

/* --------------------------------------------------------------- responsive */

@media (max-width: 1180px) {
  .workspace { grid-template-columns: 234px minmax(0, 1fr); }
  .pipeline {
    position: fixed; inset: 0 0 0 auto; width: min(380px, 100%); z-index: 30;
    border-left: 1px solid var(--line); box-shadow: -24px 0 60px #160a1099;
  }
  .pipeline-close { display: block; }
}

@media (max-width: 860px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    flex-direction: row; align-items: center; gap: 10px; overflow-x: auto; overflow-y: hidden;
    border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 12px;
  }
  .sidebar-head { flex: none; padding: 0; }
  .sidebar-group { display: none; }
  .new-chat { width: auto; flex: none; }
  .profile-button { margin: 0 0 0 auto; width: auto; grid-template-columns: 30px auto; flex: none; }
  .profile-caret, .profile-id small { display: none; }
  .main-head, .messages, .composer, .composer-note, .greeting { padding-left: 16px; padding-right: 16px; }
  .composer { margin-left: 16px; margin-right: 16px; }
  .greeting h2 { font-size: 1.55rem; }
  .signin-card { padding: 26px 20px 30px; }
  .signin h1 { font-size: 1.6rem; }
  .company-card dl { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

.flag .checks { margin-top: 9px; }
.flag .checks small { color: #c9a98c; }

/* ------------------------------------------------------- industry picker */

.industry-picker { display: grid; gap: 7px; margin: 9px 0 22px; }
.industry-option {
  display: grid; gap: 2px; text-align: left; width: 100%;
  border: 1px solid var(--line); background: var(--raised); padding: 11px 14px;
}
.industry-option:hover { border-color: var(--edge); }
.industry-option[aria-pressed="true"] { border-color: var(--edge-strong); background: var(--raised-2); }
.industry-option strong { font-size: 0.89rem; font-weight: 600; }
.industry-option small { font-size: 0.78rem; color: var(--muted); line-height: 1.5; }
.industry-option[aria-pressed="true"] strong:before { content: "● "; color: var(--acid); font-size: 0.7rem; }

.card-label {
  font: 500 0.6rem var(--mono); letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--faint); margin: 16px 0 8px;
}

/* --------------------------------------------------- pipeline refinements */

.weight-name .shift {
  display: inline-block; margin-left: 7px; font: 500 0.64rem var(--mono); letter-spacing: 0.02em;
}
.weight-name .shift.up { color: var(--acid); }
.weight-name .shift.down { color: var(--warn); }
.weight-note { font-size: 0.74rem !important; color: var(--faint) !important; line-height: 1.6; }

.exchange-effect {
  font: 500 0.62rem var(--mono); letter-spacing: 0.05em; text-transform: uppercase; margin-top: 4px;
}
.exchange-effect.up { color: var(--acid); }
.exchange-effect.down { color: var(--warn); }

.evidence-head {
  font: 500 0.66rem var(--mono) !important; letter-spacing: 0.04em;
  color: var(--text) !important; margin-top: 4px;
}
.pipeline-block .evidence-head:not(:first-of-type) { border-top: 1px solid var(--line-soft); padding-top: 12px; }

.workspace-list .dot.current { box-shadow: 0 0 0 3px #ee9aaf33; }

/* ---------------------------------------------------- profile refinements */

.history-list { display: grid; gap: 5px; }
.history-list li {
  font-size: 0.82rem; color: var(--muted); line-height: 1.5;
  border-left: 2px solid var(--line); padding-left: 11px;
}
.chips span.tuned { border-color: var(--edge-strong); color: var(--acid); }

/* ------------------------------------------------------------- tool stack */

.stack-row { display: grid; gap: 7px; margin-bottom: 14px; }
.stack-role {
  font: 500 0.78rem var(--sans); color: var(--text);
}
.stack-role small { display: block; font: 400 0.72rem var(--mono); color: var(--faint); margin-top: 2px; }
.vendor-chip {
  font: 400 0.72rem var(--mono); color: var(--muted);
  border: 1px solid var(--line); background: var(--raised); padding: 5px 9px;
}
.vendor-chip:hover { border-color: var(--edge); color: var(--text); }
.vendor-chip[aria-pressed="true"] { border-color: var(--edge-strong); color: var(--acid); background: var(--raised-2); }

/* ---------------------------------------------------------- evidence graph */

.basis {
  width: 7px; height: 7px; border-radius: 50%; display: inline-block;
  margin-right: 7px; flex: none; vertical-align: middle;
}
.basis.stated { background: var(--teal); }
.basis.derived { background: var(--acid); }
.basis.uncertain { background: var(--warn); }

.basis-bar { display: flex; height: 5px; background: var(--line); overflow: hidden; }
.basis-part.stated { background: var(--teal); }
.basis-part.derived { background: var(--acid); }
.basis-part.uncertain { background: var(--warn); }

.basis-key { display: flex; flex-wrap: wrap; gap: 12px; }
.basis-key span { display: flex; align-items: center; font: 400 0.7rem var(--mono); color: var(--faint); }

.graph-group { border-left: 1px solid var(--line); padding: 2px 0 2px 11px; margin-top: 10px; }
.graph-group.chosen { border-left-color: var(--acid); }
.graph-option { font-size: 0.8rem; line-height: 1.45; color: var(--text); }
.graph-pick {
  display: block; font: 500 0.58rem var(--mono); letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--acid);
}
.graph-edge { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 6px; margin-top: 7px; }
.graph-arrow { font: 400 0.74rem var(--mono); color: var(--faint); line-height: 1.5; }
.graph-edge.contradicts .graph-arrow { color: var(--warn); }
.graph-claim { font-size: 0.78rem; line-height: 1.5; color: var(--muted); }
.graph-claim small { display: block; font: 400 0.66rem var(--mono); color: var(--faint); margin-top: 1px; }

.graph-review {
  margin-top: 12px; border: 1px solid #5c4030; background: #241419;
  padding: 10px 12px; font-size: 0.76rem !important; line-height: 1.6; color: #e8cdb4 !important;
}
.graph-review strong { color: var(--warn); }

.facts dt { display: flex; align-items: center; }

/* ----------------------------------------------------------- learning loop */

.loop-rubric {
  font-size: 0.78rem !important; line-height: 1.6; color: var(--muted) !important;
  border-left: 2px solid var(--teal); padding-left: 11px;
}

.loop-block {
  border: 1px solid var(--line); background: var(--panel); padding: 14px 16px; display: grid; gap: 11px;
}
.loop-block > strong { font-size: 0.9rem; }
.loop-intro { font-size: 0.84rem; line-height: 1.6; color: var(--muted); }
.loop-step { display: grid; gap: 7px; }
.loop-step .switches { display: flex; flex-wrap: wrap; gap: 6px; }
.loop-step .switches button {
  background: var(--raised); border: 1px solid var(--line); padding: 7px 11px;
  font: 400 0.76rem var(--sans); color: var(--muted); text-align: left;
}
.loop-step .switches button:hover { border-color: var(--edge); color: var(--text); }
.loop-step .switches button[aria-pressed="true"] { border-color: var(--edge-strong); background: var(--raised-2); color: var(--text); }
.loop-step .switches button.was-recommended:before { content: "◆ "; color: var(--acid); }

.loop-record { border-top: 1px solid var(--line-soft); padding-top: 12px; display: grid; gap: 9px; }
.loop-signal {
  font: 500 0.66rem var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--acid);
}
.loop-record .facts div { grid-template-columns: 150px minmax(0, 1fr); }
.loop-record .facts dd { text-align: left; }
.loop-note { font-size: 0.78rem; line-height: 1.6; color: var(--muted); }
.loop-disclaimer { font-size: 0.72rem; line-height: 1.55; color: var(--faint); }

/* --------------------------------------------------------- model lineage */

.lineage { display: grid; gap: 2px; }
.lineage li {
  border-left: 2px solid var(--line); padding: 9px 0 9px 13px; display: grid; gap: 3px;
}
.lineage li.trained { border-left-color: var(--acid); }
.lineage li.config { border-left-color: var(--teal); }
.lineage-head { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.lineage-tier {
  font: 500 0.62rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint);
}
.lineage-kind { font: 500 0.58rem var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.lineage-kind.trained { color: var(--acid); }
.lineage-kind.config { color: var(--teal); }
.lineage-label { font-size: 0.88rem; font-weight: 600; }
.lineage-detail { font-size: 0.79rem; line-height: 1.55; color: var(--muted); }
.lineage-corpus { display: grid; gap: 3px; margin-top: 4px; }
.lineage-corpus li {
  border-left: 0; padding: 0 0 0 11px; font-size: 0.75rem; color: var(--faint); line-height: 1.5;
}
.lineage-corpus li:before { content: "— "; }
.lineage-scale { font: 400 0.72rem var(--mono); color: var(--faint); }

.tag.ours { margin-left: 7px; }

.answer-override {
  border-left: 2px solid var(--teal); padding-left: 13px; font-size: 0.9rem; line-height: 1.65;
  color: var(--muted);
}
.answer-override strong { color: var(--text); }
.score-split { font: 400 0.68rem var(--mono); color: var(--faint); }

/* ------------------------------------------------------------ pane sections */

.pane-section { display: grid; gap: 14px; }
.pane-section + .pane-section { border-top: 1px solid var(--line); padding-top: 20px; }
.pane-title {
  font: 500 0.68rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--acid);
}
.pane-intro { font-size: 0.78rem; line-height: 1.6; color: var(--faint); }
.pane-collapsed { border-top: 0; padding-top: 0; }
.pane-collapsed > summary { color: var(--muted); }
.pane-section .pipeline-block > h3 {
  font: 500 0.63rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint);
}
