/*
 * Vantage app component styles.
 * Base reset, buttons, and form fields ported verbatim from the approved
 * prototype (docs/mockups/2026-07-04-vantage-journey.html). The login card
 * is new (design spec section 5.1: a dark restyle of the existing magic-link
 * login), styled with the same shared button/field rules.
 * Later tasks (8+) add the brand entry scene, the living ball, the intake
 * form, the workspace, and the chat to this file.
 */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html, body {
  height: 100%;
}
body {
  font-family: var(--ui);
  background: var(--base);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}
.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.micro {
  font-size: var(--fs-micro);
  text-transform: uppercase;
  letter-spacing: var(--tracking-micro);
  color: var(--sub);
  font-weight: 500;
}
button {
  font-family: var(--ui);
  cursor: pointer;
}
a {
  color: inherit;
}

#app {
  min-height: 100vh;
}

/* ---------- buttons ---------- */
.btn-primary {
  background: var(--gold);
  color: #231a06;
  border: 0;
  border-radius: var(--r-btn);
  padding: 13px 26px;
  font-weight: 600;
  font-size: 15px;
  transition: transform 160ms var(--eo), filter 150ms ease;
}
.btn-primary:hover {
  filter: brightness(1.06);
}
.btn-primary:active {
  transform: scale(0.97);
}
.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  filter: none;
}
.btn-primary:focus-visible {
  outline: 2px solid var(--gold-hi);
  outline-offset: 2px;
}

.btn-ghost {
  background: transparent;
  color: var(--sub);
  border: 1px solid var(--line);
  border-radius: var(--r-btn);
  padding: 13px 22px;
  font-weight: 500;
  font-size: 14px;
  transition: color 150ms, border-color 150ms;
}
.btn-ghost:hover {
  color: var(--fg);
  border-color: var(--dim);
}
.btn-ghost:focus-visible {
  outline: 2px solid var(--gold-hi);
  outline-offset: 2px;
}

/* ---------- form fields ---------- */
.field {
  display: block;
  margin-bottom: var(--sp-4);
  text-align: left;
}
.field-label {
  display: block;
  font-size: var(--fs-micro);
  text-transform: uppercase;
  letter-spacing: var(--tracking-micro);
  color: var(--sub);
  margin-bottom: 7px;
  font-weight: 500;
}
.field input,
.field textarea {
  width: 100%;
  background: var(--raise);
  border: 1px solid var(--line);
  border-radius: var(--r-input);
  padding: 12px 14px;
  color: var(--fg);
  font-family: var(--ui);
  font-size: 14px;
  outline: none;
  transition: border-color 150ms;
}
.field input:focus,
.field textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(var(--gold-rgb), 0.22);
}

/* ---------- login (design spec 5.1) ---------- */
.login-scene {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6);
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: var(--sp-6) var(--sp-6) var(--sp-5);
  text-align: center;
}
.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-5);
}
.login-brand .mark {
  width: 40px;
  height: 40px;
}
.login-wordmark {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #fff 30%, var(--gold-hi) 125%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.login-lead {
  color: var(--sub);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: var(--sp-5);
}
.login-form {
  text-align: left;
}
.login-submit {
  width: 100%;
  margin-top: var(--sp-2);
}
.login-confirm {
  margin-top: var(--sp-4);
  color: var(--verified);
  font-size: 14px;
  text-align: left;
}
.login-error {
  margin-top: var(--sp-4);
  color: var(--inferred);
  font-size: 13px;
  text-align: left;
}

/* ---------- signed-in placeholder (replaced by later tasks) ---------- */
.placeholder-scene {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
}
.placeholder-text {
  color: var(--sub);
  font-size: 14px;
}

/*
 * ---------- the living ball (Vantage signature) ----------
 * Ported verbatim from the approved prototype
 * (docs/mockups/2026-07-04-vantage-journey.html). Per-scene position is
 * driven by the `data-scene` attribute (see orb.js); the transform/opacity
 * transition below replaces the prototype's GSAP tween.
 */
.orb-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.orb {
  position: absolute;
  left: 50%;
  top: 44%;
  width: 440px;
  height: 440px;
  will-change: transform, opacity;
  transition: transform 1100ms var(--eo), opacity 1100ms var(--eo);
}
/* the moving logo mark (the signature) sits centred in the positioned .orb */
.mark-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 300px;
  height: 300px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(var(--gold-rgb), .22), rgba(var(--gold-rgb), 0) 70%);
  filter: blur(22px);
  animation: markGlow 6.5s ease-in-out infinite;
}
.mark-svg {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 176px;
  height: 176px;
  transform: translate(-50%, -50%);
  animation: markBreath 6.5s ease-in-out infinite;
}
.mark-svg circle {
  transform-box: view-box;
  transform-origin: 50px 50px;
}
/* rings are unfilled (inherit fill:none from the svg); the dot is solid gold */
.mark-ring-outer, .mark-ring-mid, .mark-ring-in { fill: none; }
.mark-ring-outer {
  stroke: rgba(var(--gold-rgb), .55);
  stroke-width: 1.1;
  animation: markSpin 26s linear infinite;
}
.mark-ring-mid { stroke: rgba(var(--gold-rgb), .82); stroke-width: 1.4; }
.mark-ring-in { stroke: rgba(var(--gold-hi-rgb), .5); stroke-width: 1.1; }
.mark-dot {
  fill: var(--gold-hi);
  filter: drop-shadow(0 0 6px rgba(var(--gold-hi-rgb), .95));
  animation: markPulse 3.6s ease-in-out infinite;
}
/* research scene: the outer ring sweeps faster, like an intelligence scanning */
.orb[data-scene="running"] .mark-ring-outer { animation-duration: 7s; }

@keyframes markSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes markBreath {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.03); }
}
@keyframes markPulse { 0%, 100% { opacity: .82; } 50% { opacity: 1; } }
@keyframes markGlow {
  0%, 100% { opacity: .68; transform: translate(-50%, -50%) scale(.96); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); }
}

/* per-scene logo position: the mark travels page to page and stays a visible
 * brand presence, centred (-50%,-50%) plus a per-scene offset and scale. */
.orb[data-scene="brand"] {
  transform: translate(-50%, calc(-50% - 28vh)) scale(1);
  opacity: 1;
}
.orb[data-scene="intake"] {
  transform: translate(-50%, calc(-50% - 34vh)) scale(.5);
  opacity: .85;
}
.orb[data-scene="running"] {
  transform: translate(-50%, calc(-50% - 30vh)) scale(.72);
  opacity: 1;
}
.orb[data-scene="work"] {
  transform: translate(calc(-50% - 33vw), calc(-50% - 40vh)) scale(.34);
  opacity: .8;
}

/* ---------- brand entry scene (design spec 2.1 step 1) ---------- */
.scene-brand {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 var(--sp-6);
}
.brand-id {
  margin-bottom: var(--sp-5);
}
.mark {
  width: 54px;
  height: 54px;
}
.mark-core {
  filter: drop-shadow(0 0 7px rgba(var(--gold-hi-rgb), .85));
}
.wordmark-xl {
  font-size: 90px;
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: .95;
  background: linear-gradient(180deg, #fff 30%, var(--gold-hi) 125%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-kicker {
  margin-top: var(--sp-4);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .22em;
  color: var(--gold);
  font-weight: 500;
}
.tagline {
  margin-top: 18px;
  font-size: 21px;
  font-weight: 400;
  color: var(--fg);
  max-width: 620px;
  line-height: 1.4;
  text-wrap: balance;
}
.tagline .q {
  color: var(--sub);
}
.subline {
  margin-top: var(--sp-4);
  font-size: 14px;
  color: var(--sub);
  max-width: 520px;
}
.cta-row {
  margin-top: 44px;
  display: flex;
  gap: 14px;
  align-items: center;
}

/*
 * ---------- intake, clarify, and run commit (design spec 5.2 to 5.4) ----------
 * Ported from the approved prototype's #scene-intake block
 * (docs/mockups/2026-07-04-vantage-journey.html). The prototype's
 * `.field.two > .col` two-column pattern is replaced here by `.field-row`
 * wrapping ordinary `.field` divs directly, since this app's `.field` /
 * `.field-label` classes (defined above, for the login form) already carry
 * per-field meaning that a `.col` wrapper would collide with.
 */
.scene-intake {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6) 24px;
}
.intake-wrap {
  width: 100%;
  max-width: 560px;
}
.intake-wrap h2 {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -.02em;
  margin-bottom: var(--sp-2);
}
.intake-wrap .lead {
  color: var(--sub);
  font-size: 15px;
  margin-bottom: var(--sp-6);
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.field .req {
  color: var(--gold);
}
.field-help {
  margin-top: 6px;
  font-size: 12px;
  color: var(--dim);
}
.field-error {
  margin-top: 6px;
  font-size: 12px;
  color: var(--inferred);
}
.run-row {
  margin-top: var(--sp-6);
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.spend {
  color: var(--sub);
  font-size: 13px;
}
.spend .num {
  color: var(--fg);
}
.clarify-lead {
  margin-top: var(--sp-5);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
  color: var(--sub);
  font-size: 14px;
  margin-bottom: var(--sp-4);
}
.clarify-ready {
  margin-top: var(--sp-5);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
  color: var(--verified);
  font-size: 14px;
}
.clarify-question {
  margin-top: var(--sp-4);
}

/*
 * ---------- alive research state (design spec 5.5) ----------
 * Ported from the approved prototype's #scene-running block
 * (docs/mockups/2026-07-04-vantage-journey.html): the cycling fidget word,
 * the run head/sub copy, and the streaming log. `.running-timeout` is new
 * (not in the prototype, which had no backend to time out against).
 */
/* Top-anchored so the logo (positioned at the top on this scene) sits above
 * the content: logo, then the head, the cycling word, and the checks. */
.scene-running {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 23vh 24px var(--sp-6);
}
.running-wrap {
  width: 100%;
  max-width: 560px;
}
.run-head {
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -.02em;
  margin-bottom: var(--sp-2);
}
.run-sub {
  color: var(--sub);
  font-size: 14px;
  margin-bottom: var(--sp-4);
}
.fidget {
  font-size: 14px;
  letter-spacing: .02em;
  color: var(--gold);
  font-family: var(--mono);
  height: 22px;
  margin-bottom: var(--sp-5);
}
.fidget .dots {
  color: var(--dim);
}
.log {
  text-align: left;
  max-width: 520px;
  margin: 0 auto;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--dim);
  min-height: 180px;
}
.log .line {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 7px 0;
  opacity: 0;
  transform: translateY(4px);
}
.log .line.show {
  opacity: 1;
  transform: none;
  transition: all .4s var(--eo);
}
.log .line-text { flex: 1; }
.log .line-bar {
  flex: 0 0 64px;
  height: 3px;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
}
.log .line-bar::after {
  content: "";
  display: block;
  height: 100%;
  width: 0;
  border-radius: 2px;
  background: var(--gold);
}
.log .line.show .line-bar::after {
  animation: fillBar .7s var(--eo) forwards;
}
@keyframes fillBar { to { width: 100%; } }
.log .line .ok {
  color: var(--verified);
}
.log .line .n {
  color: var(--gold);
}
.running-timeout {
  margin-top: var(--sp-6);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
}
.running-timeout-text {
  color: var(--sub);
  font-size: 14px;
  margin-bottom: var(--sp-3);
}

/*
 * ---------- workspace assembly (design spec section 4) ----------
 * Ported from the approved prototype's #scene-work block
 * (docs/mockups/2026-07-04-vantage-journey.html). The prototype's column
 * marker class was a bare `.col`, which is already used elsewhere in this app
 * for the intake form's field columns (see `.field-row > .field` above, and
 * the comment on task 9's fix for the same collision in the prototype
 * itself); the three workspace columns use the distinct class `.wkcol` here
 * instead, so this bug is not repeated.
 *
 * Only the grid shell, the answer document, and the claim badge / threat
 * block styling belong to this task. The rail (task 14) and chat (task 13)
 * columns are mounted as plain placeholders here; their component-level CSS
 * (`.rail`'s session list, `.chat-col`'s thread and composer, and so on) is
 * those tasks' own scope, not ported yet.
 */
.scene-work {
  position: relative;
  z-index: 2;
}
.work {
  display: grid;
  grid-template-columns: 248px 1.3fr 1fr;
  width: 100%;
  height: 100vh;
  min-width: 1200px;
}
/* The rail plus a single main panel (no chat column): the error, resume-run, and empty-home surfaces (main.js), none of which have a live answer or chat to show yet. */
.work.two-col {
  grid-template-columns: 248px 1fr;
}
.err-page {
  padding: 40px 44px;
}
.resume-pad {
  padding: 40px 44px;
}
.wkcol {
  opacity: 0;
  transform: translateY(10px);
}
.wkcol.wkcol-in {
  opacity: 1;
  transform: none;
  transition: opacity 700ms var(--eo), transform 700ms var(--eo);
}
.wk-placeholder {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  color: var(--dim);
  font-size: 13px;
  text-align: center;
}

/*
 * ---------- the opportunity answer (design spec 5.6, 5.7) ----------
 * One document surface, not a stack of nested cards (section 3.5): no
 * side-stripe borders, sections separated by whitespace and a single 1px
 * divider. Claim badges and the threat block are re-scoped to this task
 * (task 7 deferred them to whichever surface renders claims first); the
 * traffic-light semantics (`--verified` green, `--inferred` amber, `--threat`
 * red) come from the fixed tokens in tokens.css and never change per brand
 * theme.
 */
.answer-col {
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #0c0f16, #0a0c11);
}
.doc {
  max-width: 680px;
  padding: 40px 44px 80px;
  position: relative;
}
.mode-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  margin-bottom: 22px;
  color: var(--gold);
  background: rgba(var(--gold-rgb), 0.1);
  border: 1px solid rgba(var(--gold-rgb), 0.28);
}
/* ranked-options is honest that we are not committing to one move; a quieter, slate chip. */
.mode-chip.ranked {
  color: var(--sub);
  background: var(--raise);
  border-color: var(--line);
}
.verdict-wrap {
  position: relative;
  margin-bottom: 34px;
}
.vglow {
  position: absolute;
  left: -60px;
  top: -50px;
  width: 460px;
  height: 300px;
  background: radial-gradient(closest-side, rgba(var(--gold-rgb), 0.2), rgba(var(--gold-rgb), 0) 72%);
  filter: blur(10px);
  animation: breathe 7s ease-in-out infinite;
  pointer-events: none;
}
@keyframes breathe {
  0%, 100% { opacity: 0.65; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.06); }
}
.verdict {
  position: relative;
  font-size: var(--fs-verdict);
  line-height: var(--lh-verdict);
  font-weight: 600;
  letter-spacing: -0.015em;
  max-width: 600px;
  text-wrap: balance;
}
.sec {
  padding: 26px 0;
}
.sec + .sec {
  border-top: 1px solid var(--line);
}
.sec:first-child {
  padding-top: 0;
}
.st {
  font-size: var(--fs-title);
  font-weight: 600;
  margin-bottom: 12px;
}
.move {
  padding: 18px 20px;
  background: var(--raise);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}
.move + .move {
  margin-top: 12px;
}
.move .mt {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 8px;
}
.move .mn {
  color: var(--gold);
  font-family: var(--mono);
  margin-right: 8px;
}
.move .mr {
  color: var(--sub);
  font-size: 14px;
}
.ranked-note {
  color: var(--sub);
  font-size: 13px;
  margin-bottom: 14px;
}
.prose {
  max-width: 60ch;
  color: var(--fg);
}
.prose .hl {
  color: var(--gold-hi);
  font-weight: 500;
}
/* ---------- claim rows (proof, design spec 5.6 step 4) ---------- */
.claim {
  display: flex;
  gap: 12px;
  padding: 13px 0;
  align-items: flex-start;
}
.claim + .claim {
  border-top: 1px solid var(--line);
}
.claim .ct {
  font-size: 14px;
}
.claim .cs {
  margin-top: 4px;
}
.claim .cs a {
  color: var(--dim);
  font-size: 12px;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.claim .cs a:hover {
  color: var(--gold);
}
/*
 * ---------- claim badges (design spec 5.7, correctness requirement) ----------
 * Two visibly different treatments for two different guarantees:
 * `.badge.verified` / `.badge.inferred` are SOLID, used for the answer's
 * `proof` claims, which are code-derived from real `sourceUrls` (engine fact).
 * `.badge.model.verified` / `.badge.model.inferred` are OUTLINED, used for
 * chat claims (task 13), which are the model's own self-label with no
 * per-turn grounding recheck. Presenting one as the other would break the
 * product's honesty promise, so these must never be visually merged.
 */
.badge {
  flex-shrink: 0;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 5px;
  margin-top: 2px;
}
.badge.verified {
  color: var(--verified);
  background: rgba(var(--verified-rgb), 0.14);
}
.badge.inferred {
  color: var(--inferred);
  background: rgba(var(--inferred-rgb), 0.15);
}
.badge.model {
  background: transparent;
  border: 1px solid;
  font-weight: 500;
}
.badge.model.verified {
  color: var(--verified);
  border-color: rgba(var(--verified-rgb), 0.5);
}
.badge.model.inferred {
  color: var(--inferred);
  border-color: rgba(var(--inferred-rgb), 0.5);
}
/* ---------- the threat block (design spec 5.6 step 5) ---------- */
.threat-b {
  background: rgba(var(--threat-rgb), 0.08);
  border: 1px solid rgba(var(--threat-rgb), 0.24);
  border-radius: var(--r-card);
  padding: 16px 20px;
}
.threat-h {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.threat-h .st {
  margin: 0;
  color: var(--threat);
}
.lv {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 5px;
  color: var(--threat);
  background: rgba(var(--threat-rgb), 0.16);
}
/* ---------- confidence and sources (design spec 5.6 step 6) ---------- */
.conf {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.conf-c {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 999px;
}
.conf-c.high {
  color: var(--verified);
  background: rgba(var(--verified-rgb), 0.13);
}
.conf-c.medium {
  color: var(--sub);
  background: var(--raise);
}
.conf-c.low {
  color: var(--inferred);
  background: rgba(var(--inferred-rgb), 0.13);
}
.sources {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.source-row {
  font-size: 13px;
  color: var(--sub);
}
.source-row a {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.source-row a:hover {
  color: var(--gold);
}
.source-row .sdate {
  color: var(--dim);
  font-size: 12px;
  margin-left: 6px;
}

/*
 * ---------- the evidence drawer (design spec 5.9) ----------
 * Ported from the approved prototype's evidence drawer
 * (docs/mockups/2026-07-04-vantage-answer-chat.html: `.drawer-trigger`,
 * `.drawer-body`, `.dim`, `.cost-line`). That prototype file, not the journey
 * one, is the visual source: the journey prototype has no drawer at all.
 * Task 7 deferred drawer styling to whichever task built it first; this task
 * owns it now. Nine `.dim` groups separated by a `border-t` divider, never
 * nested `.move`-style cards (section 3.5).
 */
.drawer-trigger {
  margin-top: var(--sp-6);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  color: var(--fg);
  font-family: var(--ui);
  font-size: 14px;
  font-weight: 500;
  transition: background 150ms ease;
}
.drawer-trigger:hover {
  background: var(--raise);
}
.drawer-trigger:focus-visible {
  outline: 2px solid var(--gold-hi);
  outline-offset: 2px;
}
.drawer-trigger .chev {
  transition: transform 220ms var(--eo);
  color: var(--sub);
}
.drawer-trigger[aria-expanded="true"] .chev {
  transform: rotate(90deg);
}
.drawer-body {
  overflow: hidden;
  height: 0;
  opacity: 0;
  padding: var(--sp-5) 4px 4px;
  transition: height 220ms var(--eo), opacity 220ms var(--eo);
}
.dim {
  padding: var(--sp-4) 0;
}
.dim + .dim {
  border-top: 1px solid var(--line);
}
.dim .micro {
  display: block;
  margin-bottom: var(--sp-2);
}
.dim .claim:first-of-type {
  padding-top: 0;
}
.ev-synthesis .lv {
  margin-bottom: var(--sp-2);
  display: inline-block;
}
.ev-synthesis .ct {
  font-size: 14px;
}
.ev-synthesis .prose {
  margin-top: var(--sp-3);
}
.ev-basis {
  margin-top: var(--sp-3);
  padding-left: 18px;
  color: var(--sub);
  font-size: 13px;
}
.ev-basis li {
  margin-bottom: var(--sp-1);
}
.ev-note {
  color: var(--sub);
  font-size: 13px;
  padding: 8px 0;
}
.ev-note + .ev-note {
  border-top: 1px solid var(--line);
}
.divider {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: var(--sp-2) 0;
}
.cost-line {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
  padding: var(--sp-3) 0 0;
  color: var(--sub);
  font-size: 12px;
  font-family: var(--mono);
}
.cost-line .total {
  color: var(--fg);
  font-weight: 600;
  margin-left: auto;
}

/*
 * ---------- the chat column (design spec 5.7, 5.10) ----------
 * Ported from the approved prototype's chat panel
 * (docs/mockups/2026-07-04-vantage-journey.html): `.ch`, `.thread`,
 * `.m.user` / `.m.asst`, `.composer`, `.cbox`, `.chips`, `.cursor`. This task
 * (13) owns the chat CSS per the re-scope; `.chat-col` was only a bare grid
 * marker (task 11) until now. `.aclaims` / `.ac` reuse the badge classes
 * defined above (`.badge.model.*`, the outlined treatment); `.ne` / `.ne-tag`
 * and `.chat-error` / `.chat-retry` are new, this task's own.
 */
.chat-col {
  display: flex;
  flex-direction: column;
  background: var(--panel);
}
.ch {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.ch .ci {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: radial-gradient(closest-side, var(--gold-hi), var(--gold-deep));
  flex-shrink: 0;
}
.ch .ct {
  font-weight: 600;
  font-size: 14px;
}
.ch .cs {
  color: var(--dim);
  font-size: 11px;
}
.thread {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}
.m.user {
  align-self: flex-end;
}
.m.user .b {
  background: var(--raise);
  border: 1px solid var(--line);
  border-radius: 13px 13px 4px 13px;
  padding: 10px 14px;
  font-size: var(--fs-body);
}
.m.asst {
  align-self: flex-start;
  width: 100%;
  display: flex;
  gap: 11px;
}
.m.asst .av {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: radial-gradient(closest-side, var(--gold-hi), var(--gold-deep));
  flex-shrink: 0;
  margin-top: 2px;
}
.m.asst .body {
  flex: 1;
  min-width: 0;
}
.m.asst .t {
  font-size: var(--fs-chat);
  line-height: 1.55;
}
/* The "not established" sentence: a calm amber read, never an error treatment. */
.m.asst .t .ne {
  color: var(--inferred);
}
.ne-tag {
  display: inline-block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--inferred);
  background: rgba(var(--inferred-rgb), 0.13);
  border-radius: 5px;
  padding: 2px 6px;
  margin-right: 6px;
  vertical-align: 1px;
}
.model-note {
  margin-top: var(--sp-3);
  color: var(--dim);
  font-size: 11.5px;
  font-style: italic;
}
.aclaims {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.ac {
  display: flex;
  gap: 9px;
  align-items: flex-start;
}
.ac .t {
  font-size: 12.5px;
  color: var(--sub);
}
.cursor {
  display: inline-block;
  width: 7px;
  height: 15px;
  background: var(--gold);
  vertical-align: -2px;
  margin-left: 2px;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}
.thread-empty {
  margin: auto 0;
  text-align: center;
  padding: 0 var(--sp-4);
}
.thread-empty-lead {
  color: var(--sub);
  font-size: 13px;
  margin-bottom: var(--sp-4);
}
/* ---------- the composer (design spec 5.10) ---------- */
.composer {
  border-top: 1px solid var(--line);
  padding: 14px 16px;
  flex-shrink: 0;
}
.composer.disabled .cbox {
  opacity: 0.5;
}
.cbox {
  background: var(--raise);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  transition: border-color 150ms;
}
.cbox:focus-within {
  border-color: var(--gold);
}
.cbox textarea {
  background: transparent;
  border: 0;
  resize: none;
  color: var(--fg);
  font-family: var(--ui);
  font-size: 14px;
  outline: none;
  min-height: 20px;
}
.cbox textarea::placeholder {
  color: var(--dim);
}
.cbox textarea:disabled {
  cursor: not-allowed;
}
.ca {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}
.ca .hint {
  color: var(--dim);
  font-size: 11px;
}
.ca .sbtn {
  padding: 8px 18px;
  font-size: 13px;
}
.chips {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 9px;
  justify-content: center;
}
.chip {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--sub);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 12.5px;
  font-family: var(--ui);
  transition: color 150ms, border-color 150ms;
}
.chip:hover {
  color: var(--fg);
  border-color: var(--gold);
}
.chat-error {
  margin-top: var(--sp-3);
  color: var(--inferred);
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.chat-retry {
  background: transparent;
  border: 1px solid rgba(var(--inferred-rgb), 0.5);
  color: var(--inferred);
  border-radius: var(--r-btn);
  padding: 4px 11px;
  font-size: 12px;
  font-family: var(--ui);
}
.chat-retry:hover {
  border-color: var(--inferred);
}

/*
 * ---------- session rail (design spec section 4, 8.5) ----------
 * Ported from the approved prototype's `#col-rail` block
 * (docs/mockups/2026-07-04-vantage-journey.html): the `.wm` wordmark, `.np`
 * primary button, `.rg` day groups, `.sess` rows and `.sd` status dots. The
 * prototype only had static "ready"/"error" dots; `.sd.researching` (a gold
 * pulse) and `.sd.pending` (a session created but not yet run) are new here.
 * The active row is the `--raise` fill plus the gold `.sl` label only, no
 * side-stripe border anywhere (design spec 3.5).
 */
.rail {
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 18px 14px;
  overflow-y: auto;
}
.wm {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
  color: var(--fg);
}
.wm-sub {
  color: var(--dim);
  font-size: 10px;
  margin-left: 29px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 18px;
}
.np {
  width: 100%;
  text-align: left;
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
  padding: 11px 12px;
  font-size: 14px;
}
.rg {
  margin-bottom: 14px;
}
.rg .micro {
  display: block;
  padding: 0 8px 8px;
}
.sess {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  transition: background 150ms;
  cursor: pointer;
}
.sess:hover {
  background: var(--raise);
}
.sess.active {
  background: var(--raise);
}
.sess:focus-visible {
  outline: 2px solid var(--gold-hi);
  outline-offset: 2px;
}
.sess .sn {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--sub);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sess.active .sn {
  color: var(--fg);
  font-weight: 600;
}
.sd {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sd.ready {
  background: var(--verified);
}
.sd.err {
  background: var(--threat);
}
.sd.pending {
  background: var(--dim);
}
.sd.researching {
  background: var(--gold);
  animation: railPulse 1.6s ease-in-out infinite;
}
@keyframes railPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}
.sess.active .sl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold);
  font-weight: 600;
}

/*
 * ---------- empty and first-run state (design spec 5.11) ----------
 * A calm teaching panel in the answer area when the account has no sessions
 * yet, not a bare "nothing here." New, not in the prototype (which always
 * showed a populated workspace).
 */
.empty-state {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--sp-6);
  max-width: 440px;
  margin: 0 auto;
}
.empty-mark {
  width: 64px;
  height: 64px;
  margin-bottom: var(--sp-5);
}
.empty-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: var(--sp-3);
}
.empty-lead {
  color: var(--sub);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: var(--sp-6);
}

/*
 * ---------- inline error card (design spec 5.8) ----------
 * A `--panel` card with a full amber-tinted border and a low amber wash, no
 * side-stripe (section 3.5): a leading warning icon, an honest one-line
 * title, the backend message when present, and a "Try again" action.
 */
.err-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: rgba(var(--threat-rgb), 0.08);
  border: 1px solid rgba(var(--threat-rgb), 0.28);
  border-radius: var(--r-card);
  padding: 20px 22px;
  max-width: 560px;
}
.err-icon {
  width: 22px;
  height: 22px;
  color: var(--threat);
  flex-shrink: 0;
  margin-top: 2px;
}
.err-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 6px;
}
.err-detail {
  color: var(--sub);
  font-size: 13px;
  margin-bottom: var(--sp-3);
}
.err-retry {
  border-color: rgba(var(--threat-rgb), 0.5);
  color: var(--threat);
}
.err-retry:hover {
  color: var(--fg);
  border-color: var(--threat);
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
  .orb {
    transition: none !important;
  }
  .log .line {
    opacity: 1;
    transform: none;
  }
  /* animation is off, so show the progress bars complete rather than empty */
  .log .line-bar::after {
    width: 100%;
  }
}
