/* Arbitration Desk — house design system.
   Dark, glass, gradient-accent. Hand-written, no framework, no build step. */

:root {
  --bg: #05060a;
  --text: #f4f6fb;
  --muted: #8b93a7;
  --line: rgba(255, 255, 255, .08);
  --card: rgba(255, 255, 255, .028);
  --glass: rgba(10, 13, 20, .55);
  --g1: #7c6cff;
  --g2: #4dd6c1;
  --g3: #f0739b;
  --cyan: #00dcff;
  --warn: #fbbf24;
  --danger: #ff6b7d;
  --radius: 20px;
  --ui: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--mono); }

/* Language toggle: show only the active language's spans */
html[data-lang="en"] .lang-es { display: none; }
html[data-lang="es"] .lang-en { display: none; }
html:not([data-lang]) .lang-es { display: none; }

/* ---------------------------------------------------------------- background */

/* One large, quiet colour wash behind the page. Deliberately restrained: nothing
   here animates on its own -- decoration should not compete with the workflow. */

.bgfx { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(130px);
  width: 900px; height: 900px;
  top: -420px; left: 50%; margin-left: -450px;
  background: radial-gradient(circle, #7c6cff33 0%, #4dd6c114 45%, transparent 68%);
  opacity: .75;
}

/* ------------------------------------------------------------- floating nav */

.site-header {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 50;
  width: min(1120px, calc(100% - 32px));
  border-radius: 99px;
  background: rgba(10, 12, 20, .55);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.header-row {
  display: flex; align-items: center; gap: 16px;
  padding: 10px 12px 10px 20px;
  max-width: none;
}

.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; letter-spacing: -.01em; font-size: 15px;
  margin-right: auto; color: var(--text);
}
.brand .dot {
  width: 26px; height: 26px; border-radius: 8px; flex: 0 0 auto;
  background: conic-gradient(from 210deg, var(--g1), var(--g2), var(--g3), var(--g1));
  box-shadow: 0 0 18px #7c6cff66;
}

.nav-link { font-size: 14px; color: var(--muted); transition: color .25s; }
.nav-link:hover { color: var(--text); }

.lang-toggle {
  display: flex; gap: 4px; padding: 3px;
  border: 1px solid var(--line); border-radius: 99px;
  background: rgba(255, 255, 255, .03);
}
.lang-btn {
  border: 0; background: transparent; color: var(--muted);
  font-family: var(--mono); font-size: 11.5px; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 13px; border-radius: 99px; cursor: pointer; transition: .25s;
}
.lang-btn:hover { color: var(--text); }
.lang-btn.active {
  background: linear-gradient(135deg, var(--g1), var(--g2));
  color: #fff;
  box-shadow: 0 2px 14px #7c6cff4d;
}

/* ----------------------------------------------------------------- buttons */

.cta-small, .cta-primary, .cta-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--ui); font-weight: 600; border-radius: 99px;
  border: 1px solid transparent; cursor: pointer; transition: .25s;
  text-decoration: none; white-space: nowrap;
}

.cta-small {
  font-size: 14px; padding: 9px 18px;
  border-color: var(--line); background: rgba(255, 255, 255, .03); color: var(--text);
}
.cta-small:hover { background: rgba(255, 255, 255, .07); }

.cta-primary {
  font-size: 15px; padding: 13px 28px;
  background: linear-gradient(135deg, var(--g1), var(--g2));
  /* Confine the gradient to inside the (transparent) border. Without this, the
     gradient paints all the way to the border-box edge under the rounded
     corner clip, and antialiasing leaves a thin stray-colored seam along one
     edge of the pill (most visible as a blue fringe on the left) in both
     light and dark theme. background-origin must match so the gradient's own
     coordinate box doesn't shift when its paint area does. */
  background-clip: padding-box;
  background-origin: padding-box;
  color: #fff; box-shadow: 0 4px 24px #7c6cff59;
}
.cta-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 32px #7c6cff80; }
.cta-primary:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

.cta-secondary {
  font-size: 14px; padding: 11px 22px;
  border-color: var(--line); background: rgba(255, 255, 255, .04); color: var(--text);
}
.cta-secondary:hover:not(:disabled) { background: rgba(255, 255, 255, .08); border-color: rgba(0, 220, 255, .35); }
.cta-secondary:disabled { opacity: .4; cursor: not-allowed; }

.cta-danger {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--ui); font-weight: 600; border-radius: 99px;
  cursor: pointer; transition: .25s; white-space: nowrap;
  font-size: 14px; padding: 11px 18px;
  border: 1px solid rgba(255, 107, 125, .35);
  background: rgba(255, 107, 125, .06); color: var(--danger);
}
.cta-danger:hover:not(:disabled) { background: rgba(255, 107, 125, .14); border-color: rgba(255, 107, 125, .55); }
.cta-danger:disabled { opacity: .4; cursor: not-allowed; }

.link-btn {
  background: none; border: 0; color: var(--g2); cursor: pointer;
  font-family: var(--ui); font-size: 14px; font-weight: 600; padding: 0;
}
.link-btn:hover { color: var(--cyan); }

/* --------------------------------------------------------------- typography */

.eyebrow {
  display: inline-block;
  font-size: 12.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  background: linear-gradient(92deg, var(--g1), var(--g2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 14px;
}

h1 {
  font-size: clamp(40px, 6.5vw, 72px); line-height: 1.05;
  font-weight: 800; letter-spacing: -.035em;
  max-width: 900px; margin: 0 auto 22px;
}
/* Previously a gradient-clip treatment (transparent fill + background-clip:
   text + a neon drop-shadow). At this line's font size that rendered as
   low-contrast grey-on-glow text that was hard to read against the dark
   background. Kept as a plain heading-color span (still a visual break
   from the line above it via layout/line-break) rather than reintroducing
   the legibility problem. */
h1 .grad {
  color: inherit;
}

h2 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; letter-spacing: -.03em; line-height: 1.15; margin-bottom: 14px; }
h3 { font-size: 19px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 10px; }
h4, h5 { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }

.muted { color: var(--muted); }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; color: var(--muted);
  border: 1px solid var(--line); background: rgba(255, 255, 255, .03);
  padding: 6px 16px; border-radius: 99px; margin-bottom: 28px;
}
.pill .pulse {
  width: 7px; height: 7px; border-radius: 50%; background: var(--g2);
  box-shadow: 0 0 10px 2px #4dd6c166;
}

/* ---------------------------------------------------------- product sections */

main { padding: 0 0 40px; }
section.wrap { padding: 130px 0; position: relative; max-width: 1000px; }
section.wrap + section.wrap { border-top: 1px solid var(--line); }

.hero { padding: 210px 0 130px; text-align: center; border-top: 0; }
.hero-sub { font-size: 18px; color: var(--muted); max-width: 620px; margin: 0 auto 40px; }
.hero .cta-under {
  display: block; margin-top: 20px;
  font-size: 13.5px; color: var(--muted); text-decoration: underline;
  text-underline-offset: 4px; text-decoration-color: rgba(255, 255, 255, .18);
}
.hero .cta-under:hover { color: var(--text); }

.price-card, .guarantee-card, .speed-note, .result-card, .calc-field, .panel,
.argument-card, .counterargument-card, .counterarguments-panel, .rebuttal-text,
.deadline-top, .gate-block, .checker-form, .checker-finding, .checker-strongest,
.checker-counter, .checker-verdict {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.pricing-hero { padding-bottom: 40px; }
.pricing-hero .eyebrow { display: block; }
.pricing { padding-top: 0 !important; border-top: 0 !important; }
.pricing .price-card, .pricing .guarantee-card { max-width: 620px; margin-left: auto; margin-right: auto; }

.price-card, .guarantee-card { padding: 30px; margin-bottom: 18px; transition: border-color .3s, transform .3s; }
.price-card:hover, .guarantee-card:hover { border-color: rgba(0, 220, 255, .35); transform: translateY(-2px); }

.price-amount {
  font-family: var(--mono); font-size: 46px; font-weight: 800; letter-spacing: -.03em;
  background: linear-gradient(92deg, var(--g2), var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.price-unit {
  font-family: var(--ui); font-size: 15px; font-weight: 500; color: var(--muted);
  margin-left: 8px; -webkit-text-fill-color: var(--muted);
}
.price-note, .price-differentiator { color: var(--muted); font-size: 14.5px; margin-top: 12px; }
.guarantee-card h3 { color: var(--g2); }
.guarantee-card p { color: var(--muted); font-size: 14.5px; }

/* The differentiation list: what this does that reading the policy in a chat
   window does not. Plain rows, no cards -- it is meant to be read, not scanned. */
.diff-list { list-style: none; display: grid; gap: 20px; max-width: 820px; margin-bottom: 46px; }
.diff-list li { border-left: 2px solid rgba(255, 255, 255, .12); padding-left: 18px; }
.diff-list li strong { display: block; font-size: 16.5px; margin-bottom: 6px; letter-spacing: -.01em; }
.diff-list li span { display: block; color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.how-h3 { font-size: 19px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 18px; }

.how-steps { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; counter-reset: step; }
.how-steps li {
  counter-increment: step;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); padding: 26px;
  transition: border-color .3s, transform .3s;
}
.how-steps li:hover { border-color: rgba(255, 255, 255, .16); transform: translateY(-3px); }
.how-steps li::before {
  content: "STEP 0" counter(step);
  font-family: var(--mono); font-size: 12.5px; color: var(--g2);
  display: block; margin-bottom: 12px; letter-spacing: .08em;
}
.how-steps li strong { display: block; font-size: 17px; margin-bottom: 8px; letter-spacing: -.01em; }
.how-steps li span { display: block; color: var(--muted); font-size: 14.5px; }

.speed-note { padding: 22px 24px; margin-top: 24px; color: var(--muted); font-size: 14.5px; }
.speed-note strong { color: var(--text); }

/* ------------------------------------------------------------------ results */

.results-headline {
  font-size: 20px; font-weight: 600; line-height: 1.5;
  max-width: 820px; margin-bottom: 8px;
}
.results-subhead {
  font-size: 12.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  background: linear-gradient(92deg, var(--g1), var(--g2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin: 40px 0 14px;
}
.results-cases { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 8px; }
.results-accepted { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.result-card { padding: 22px; transition: border-color .3s, transform .3s; }
.result-card:hover { border-color: rgba(0, 220, 255, .35); transform: translateY(-2px); }
.result-card-challenged { border-color: rgba(77, 214, 193, .3); }
.result-card-unwound { border-color: rgba(124, 108, 255, .3); }

.result-vehicle { font-weight: 700; font-size: 15.5px; margin-bottom: 10px; letter-spacing: -.01em; }
.result-counterparty { display: block; font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: .04em; margin-top: 2px; }
.result-amounts { font-family: var(--mono); font-size: 14px; color: var(--muted); }
.result-before { text-decoration: line-through; color: var(--muted); }
.result-after {
  font-weight: 800;
  background: linear-gradient(92deg, var(--g2), var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.result-reimbursement { font-family: var(--mono); color: var(--g2); font-size: 12.5px; margin-top: 6px; }
.result-note { color: var(--muted); font-size: 13.5px; margin-top: 12px; }

/* Hero figure: the single headline amount reads better as a number than as a
   chart, so it gets the mono treatment rather than a mark. */
.results-hero { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 8px 0 18px; }
.results-hero-figure {
  font-size: clamp(34px, 7vw, 56px); font-weight: 500; letter-spacing: -.02em;
  line-height: 1.05; color: var(--text);
}
.results-hero-label { color: var(--muted); font-size: 15px; }

.results-volume { color: var(--muted); font-size: 15px; max-width: 820px; margin: 18px 0; }

/* Outcome mix: plain labelled counts, not a chart. Five small exact integers
   read faster as numbers than as bars. */
.results-mix { margin: 34px 0 8px; max-width: 860px; }
.results-mix-title { font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; }
.results-mix-sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.results-mix-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px; margin-top: 16px;
}
.results-mix-item {
  border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px; padding: 16px 18px;
}
.results-mix-item dt { font-size: 30px; font-weight: 500; line-height: 1.1; }
.results-mix-item dd { color: var(--muted); font-size: 13.5px; margin-top: 6px; }

/* ------------------------------------------------------------------- charts
   Hand-written inline SVG (see index.html). Marks are thin, grid and axes are
   recessive, and every value/label wears a TEXT colour -- never the colour of
   its own series, which is reserved for the marks themselves. */

.chart { margin: 26px 0 34px; max-width: 860px; }
.chart[hidden] { display: none; }
.chart-title { font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; color: var(--text); }
.chart-sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; max-width: 700px; }
.chart-note { color: var(--muted); font-size: 13px; margin-top: 10px; max-width: 700px; }
.chart-link { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

.chart-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 14px 0 4px; }
.chart-legend-item { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.chart-key { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.chart-key-ring { background: transparent; border: 2.5px solid currentColor; }

.chart-plot { margin-top: 10px; overflow: visible; }
.chart-plot svg { width: 100%; height: auto; display: block; overflow: visible; }

.c-rowlabel { fill: var(--text); font-family: var(--ui); font-size: 13.5px; font-weight: 600; }
.c-value { fill: var(--text); font-family: var(--mono); font-size: 13px; }
.c-tick { fill: var(--muted); font-family: var(--mono); font-size: 11.5px; }
.c-axis { stroke: rgba(255, 255, 255, .12); stroke-width: 1; }
.c-connector { stroke: rgba(255, 255, 255, .16); stroke-width: 3; stroke-linecap: round; }
.c-ring { fill: var(--bg); stroke-width: 2.5; }
/* Before/after paired bars: the amount sits at the end of each bar, and the
   gain sits large in the right gutter -- both in text colours, never the
   series colour, which belongs to the marks. */
.c-barlabel { fill: var(--muted); font-family: var(--mono); font-size: 12.5px; }
.c-gain { fill: var(--text); font-family: var(--mono); font-size: 17px; font-weight: 500; }
.c-gain-inline { font-size: 14px; }
.c-barlabel-in { fill: var(--bg); font-weight: 500; }
.chart-mark { cursor: default; transition: opacity .15s; }
.chart-mark:hover, .chart-mark:focus { opacity: .8; outline: none; }
.chart-mark:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.chart-tip {
  position: fixed; z-index: 90; pointer-events: none;
  max-width: 300px; padding: 8px 11px; border-radius: 10px;
  background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  color: var(--text); font-size: 12.5px; line-height: 1.45;
}
.chart-tip[hidden] { display: none; }

/* Same data, as a table -- identity is never carried by colour alone. */
.chart-table { margin-top: 14px; }
.chart-table summary { color: var(--muted); font-size: 13px; cursor: pointer; }
.chart-table table { border-collapse: collapse; margin-top: 12px; width: 100%; font-size: 13px; }
.chart-table caption { text-align: left; color: var(--muted); font-size: 12.5px; padding-bottom: 8px; }
.chart-table th, .chart-table td { text-align: left; padding: 7px 12px 7px 0; border-bottom: 1px solid var(--line); }
.chart-table thead th { color: var(--muted); font-weight: 600; }
.chart-table tbody th { font-weight: 600; color: var(--text); }
.chart-table td { color: var(--muted); font-family: var(--mono); }
.results-cost-compare, .results-caveat { color: var(--muted); font-size: 13.5px; max-width: 820px; margin-top: 14px; }
.results-caveat { border-left: 2px solid rgba(124, 108, 255, .4); padding-left: 16px; }

/* --------------------------------------------------------------- calculator */

.calc-intro { color: var(--muted); font-size: 15px; max-width: 720px; margin-bottom: 8px; }
.calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 28px 0; }

.calc-field {
  display: flex; flex-direction: column; gap: 8px;
  padding: 20px; font-size: 13px; color: var(--muted);
}
.calc-field input {
  font-family: var(--mono); font-size: 18px; font-weight: 500;
  padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(0, 0, 0, .3); color: var(--text);
}
.calc-field input:focus { outline: 0; border-color: rgba(0, 220, 255, .45); }
.calc-unit, .calc-unit-prefix { font-family: var(--mono); font-size: 12px; color: var(--g2); }

.calc-input-tag {
  display: inline-block; font-family: var(--mono); font-size: 10.5px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--g3);
  border: 1px solid rgba(240, 115, 155, .35); background: rgba(240, 115, 155, .08);
  padding: 2px 9px; border-radius: 99px; margin-bottom: 4px;
}

.calc-result {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  font-size: 16px; color: var(--muted); margin-bottom: 12px;
}
.calc-result strong {
  font-family: var(--mono); font-size: 42px; font-weight: 800; letter-spacing: -.03em;
  background: linear-gradient(92deg, var(--g2), var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.calc-disclaimer { color: var(--muted); font-size: 13px; max-width: 760px; }

/* ----------------------------------------------------------------- CTA band */

.final-cta { text-align: center; }
.final-cta .band {
  border: 1px solid var(--line); border-radius: 28px;
  padding: 72px 32px; position: relative; overflow: hidden;
  background: linear-gradient(180deg, rgba(124, 108, 255, .10), rgba(77, 214, 193, .05) 60%, transparent);
}
.final-cta .band::before {
  content: ""; position: absolute; top: -1px; left: 15%; right: 15%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--g1), var(--g2), transparent);
}
.final-cta .band p { color: var(--muted); margin-bottom: 30px; }

/* ------------------------------------------------------------------- footer */

.site-footer { border-top: 1px solid var(--line); padding: 48px 0 64px; }
.disclaimer { color: var(--muted); font-size: 13px; max-width: 820px; margin: 0 auto; text-align: center; }
.site-footer .flinks { margin: 14px auto 0; max-width: 820px; text-align: center; display: flex; gap: 20px; justify-content: center; }
.site-footer .flinks a { color: var(--muted); font-size: 13px; text-decoration: none; }
.site-footer .flinks a:hover { color: var(--text); }

/* ==========================================================================
   App page
   ========================================================================== */

.app-main { padding-top: 110px; }
.who { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }

.dev-mode-banner {
  position: sticky; top: 78px; z-index: 40;
  border-radius: 16px; padding: 16px 22px; margin-bottom: 24px;
  background: linear-gradient(135deg, rgba(240, 115, 155, .22), rgba(251, 191, 36, .14));
  border: 1px solid rgba(240, 115, 155, .5);
  box-shadow: 0 0 0 1px rgba(240, 115, 155, .12), 0 12px 40px rgba(240, 115, 155, .18);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  color: var(--text); font-size: 14px; text-align: center;
}
.dev-mode-banner strong {
  display: block; font-size: 16px; font-weight: 800; letter-spacing: -.01em;
  margin-bottom: 4px; color: #ffc9d6;
}

.panel { padding: 30px; margin-bottom: 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.panel h2 { font-size: 24px; margin-bottom: 6px; }
.panel > .muted { font-size: 14.5px; margin-bottom: 16px; }

/* -------------------------------------------------------- dealer dashboard
   The screen a signed-in dealer lands on, above the case wizard (panel-cases
   in app.html, built by buildCaseCard()/loadCases() in app.js). Cards use the
   same auto-fit grid the results/how-steps sections already use elsewhere on
   the site, so a single card never has to fight fixed columns at narrow
   widths -- minmax(280px, 1fr) collapses to one column well before 375px
   (a 375px viewport leaves ~327px of content width inside .wrap's padding,
   which is under one 280px-minimum card, so it never has to squeeze two). */

.dashboard-panel .panel-head > div:first-child { min-width: 220px; }
.dash-sub { margin-bottom: 0; }

.dashboard-empty {
  text-align: center; padding: 46px 24px; margin-bottom: 8px;
  border: 1px dashed var(--line); border-radius: var(--radius);
}
.dashboard-empty h3 { margin-bottom: 10px; }
.dashboard-empty p { max-width: 520px; margin: 0 auto 22px; color: var(--muted); font-size: 14.5px; }

/* minmax's floor is deliberately narrower than the site's other auto-fit
   grids (results-cases/how-steps use 280px/minmax(280px,1fr)) because this
   grid sits inside .panel's own 30px side padding on top of .wrap's 24px --
   at a 375px viewport that leaves only ~267px of content width here, and a
   280px floor would overflow it by ~13px (measured against this exact
   nesting, not assumed). 220px keeps a wide safety margin under that. */
.dashboard-cases {
  list-style: none;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.dashboard-cases[hidden] { display: none; }

.case-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); overflow: hidden;
  transition: border-color .3s, transform .3s;
}
.case-card:hover { border-color: rgba(0, 220, 255, .35); transform: translateY(-2px); }

.case-card-btn {
  display: block; width: 100%; text-align: left;
  background: none; border: 0; color: inherit; font-family: var(--ui);
  cursor: pointer; padding: 20px;
}

/* The attention reason is the most prominent thing on the card by design --
   full-bleed red banner sitting above everything else, same red palette as
   .error-text elsewhere in the app. */
.case-card-alert {
  display: block; color: #ffd2d8; background: rgba(255, 107, 125, .14);
  border-bottom: 1px solid rgba(255, 107, 125, .4);
  padding: 10px 20px; margin: -20px -20px 16px;
  font-size: 13.5px; font-weight: 700; line-height: 1.4;
}

.case-card-head {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 6px 14px; margin-bottom: 10px;
}
.case-card-vehicle { font-weight: 700; font-size: 16px; letter-spacing: -.01em; word-break: break-word; }
.case-card-stage { font-size: 13px; font-weight: 600; color: var(--g2); word-break: break-word; }

.case-card-meta {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 6px 16px; color: var(--muted); font-size: 13.5px;
}
.case-card-amount { font-family: var(--mono); }

.case-round-badge {
  display: inline-block; font-size: 11.5px; font-weight: 600; letter-spacing: .03em;
  color: var(--g1); background: rgba(124, 108, 255, .14);
  border: 1px solid rgba(124, 108, 255, .35); border-radius: 99px;
  padding: 3px 11px; white-space: nowrap;
}

.dash-new-case-btn { white-space: nowrap; }

.stack-form { display: flex; flex-direction: column; gap: 16px; max-width: 480px; }
.stack-form label, .extraction-field {
  display: flex; flex-direction: column; gap: 7px;
  font-size: 12.5px; font-weight: 500; letter-spacing: .04em; color: var(--muted);
}
.stack-form input, .stack-form select, .extraction-field input {
  font-family: var(--ui); font-size: 15px; color: var(--text);
  padding: 11px 13px; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(0, 0, 0, .3);
}
.stack-form select option { background: #0b0e17; color: var(--text); }
.stack-form input:focus, .stack-form select:focus, .extraction-field input:focus {
  outline: 0; border-color: rgba(0, 220, 255, .45);
}
.stack-form input[type="file"] { padding: 9px; font-size: 13px; color: var(--muted); }

/* --------------------------------------------------------------- sign-in */

/* Centered, modal-styled card (page-level, not a popup) -- mirrors the layout
   of a provider-picker "Welcome back" dialog: title, big full-width provider
   rows, an "or" divider, then a compact fallback. */
.signin-card {
  max-width: 440px; margin: 0 auto; text-align: center;
}
.signin-card > .muted { max-width: 380px; margin-left: auto; margin-right: auto; }
.signin-card .stack-form,
.signin-card .signin-providers,
.signin-card .signin-row-email,
.signin-card .signin-divider,
.signin-card .signin-fallback {
  max-width: 380px; margin-left: auto; margin-right: auto;
}
.signin-card .stack-form { text-align: left; }
.signin-card .error-text,
.signin-card #magic-link-sent { max-width: 380px; margin-left: auto; margin-right: auto; text-align: left; }

.signin-providers { display: flex; flex-direction: column; gap: 10px; }

/* Shared shape for every big full-width "Continue with ..." row -- the OAuth
   provider rows (rendered from AUTH_PROVIDERS) and the email-link row both
   use this class so they read as one family of buttons, like the reference. */
.cta-signin-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 48px; padding: 12px 18px; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .04);
  color: var(--text); font-family: var(--ui); font-size: 15px; font-weight: 600;
  cursor: pointer; transition: .2s;
}
.cta-signin-row:hover { background: rgba(255, 255, 255, .08); border-color: rgba(0, 220, 255, .35); }
.signin-row-icon { flex: 0 0 auto; display: flex; align-items: center; }
.signin-row-label { flex: 1; text-align: center; margin-right: 20px; }

.signin-row-email { display: flex; flex-direction: column; gap: 10px; }
.inline-email-form {
  display: flex; align-items: center; gap: 8px; min-height: 48px;
}
.inline-email-form input {
  flex: 1; min-width: 0; font-family: var(--ui); font-size: 15px; color: var(--text);
  padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(0, 0, 0, .3);
}
.inline-email-form input:focus { outline: 0; border-color: rgba(0, 220, 255, .45); }
.inline-email-form .cta-signin-row-compact {
  width: auto; flex: 0 0 auto; min-height: 48px; justify-content: center;
}

.signin-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 18px auto; color: var(--muted); font-size: 13px; text-transform: uppercase;
  letter-spacing: .08em;
}
.signin-divider::before, .signin-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

.signin-fallback { margin-top: 4px; text-align: center; }
.signin-fallback summary {
  color: var(--muted); font-size: 13px; cursor: pointer; list-style: none; display: inline-block;
}
.signin-fallback summary::-webkit-details-marker { display: none; }
.signin-fallback summary:hover { color: var(--cyan); }
.signin-fallback .stack-form { margin-top: 14px; text-align: left; }

.error-text {
  color: #ffd2d8; background: rgba(255, 107, 125, .1);
  border: 1px solid rgba(255, 107, 125, .4); border-radius: 12px;
  padding: 12px 14px; margin-top: 12px; font-size: 14px;
}

/* Guidance shown while "Pay & unlock rebuttal" is disabled -- informational,
   not an error, so it gets its own quieter (amber, not red) treatment. Empty
   when the prerequisites are met; setError() hides it via [hidden]. */
.checkout-hint {
  color: var(--warn, #fbbf24); background: rgba(251, 191, 36, .08);
  border: 1px solid rgba(251, 191, 36, .35); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 14px; font-size: 14px;
}

.case-list, .document-list { list-style: none; }
.case-list-item, .document-list-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 4px; border-bottom: 1px solid var(--line);
  transition: background .25s;
  /* Fixes the 375px overflow on step 3's confirm screen (measured real
     scrollWidth of 459px/510px vs a 375px client width): three children
     (label, .doc-status badge, .doc-actions with its buttons) never fit on
     one line at mobile width, and without flex-wrap this row forced the
     whole page wider instead of dropping the badge/actions onto their own
     line. Every row this rule is used for (case list, document list, step 3's
     confirm document list, the follow-up-rounds pushback list) gets the
     same wrapping behavior. */
  flex-wrap: wrap;
}
.case-list-item:hover, .document-list-item:hover { background: rgba(255, 255, 255, .025); }

/* The label/name span in a document-list-item must be able to shrink and
   wrap its own text instead of forcing the row (and therefore the whole
   page) wider -- min-width: 0 overrides the flex-item default of
   min-width: auto, which otherwise refuses to shrink below the text's
   unwrapped width. */
.document-list-item > span:first-child { flex: 1 1 160px; min-width: 0; word-break: break-word; }

.doc-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.doc-status {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 11px; border-radius: 99px; border: 1px solid transparent; white-space: nowrap;
}
.doc-status.confirmed { background: rgba(77, 214, 193, .1); border-color: rgba(77, 214, 193, .4); color: var(--g2); }
.doc-status.pending { background: rgba(251, 191, 36, .1); border-color: rgba(251, 191, 36, .4); color: var(--warn); }

.case-block { border-top: 1px solid var(--line); padding-top: 26px; margin-top: 26px; }
.case-block:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.case-block h3 {
  font-size: 12.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  background: linear-gradient(92deg, var(--g1), var(--g2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 12px;
}
.case-block .muted { font-size: 14px; margin-bottom: 16px; }

#form-extraction { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; max-width: none; }

.extraction-warning {
  grid-column: 1 / -1;
  color: var(--danger); background: rgba(255, 107, 125, .08);
  border: 1px solid rgba(255, 107, 125, .35); border-radius: 12px;
  padding: 12px 14px; font-size: 14px;
}

.array-field { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 10px; }
.array-field-header {
  font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--muted);
  text-transform: uppercase;
}
.array-rows { display: flex; flex-direction: column; gap: 12px; }
.array-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) auto;
  align-items: end; gap: 10px;
  padding: 10px; border: 1px solid var(--line); border-radius: 12px;
  background: rgba(255, 255, 255, .02);
}
.array-row .btn-remove-row { align-self: center; }
.btn-add-row { align-self: flex-start; }
.btn-row { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }

/* ------------------------------------------------------------ pre-filing gate */

.gate-block { padding: 22px 24px; }
.gate-block.gate-ok { border-color: rgba(77, 214, 193, .4); background: rgba(77, 214, 193, .07); }
.gate-block.gate-caution { border-color: rgba(251, 191, 36, .55); background: rgba(251, 191, 36, .08); }
.gate-block.gate-advise_against { border-color: rgba(255, 107, 125, .6); background: rgba(255, 107, 125, .09); }
.gate-heading { font-size: 17px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 8px; }
.gate-reasons { margin: 12px 0; padding-left: 20px; color: var(--muted); font-size: 14px; }
.gate-reasons li { margin-bottom: 6px; }
.gate-ack { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14.5px; margin-top: 12px; }
.gate-ack input { accent-color: var(--g2); width: 16px; height: 16px; }

/* -------------------------------------------------------------- analysis UI */

.argument-cards { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.argument-card { padding: 16px 18px; border-radius: 14px; }
.argument-card h5 { font-size: 15px; margin-bottom: 6px; color: var(--text); }
.argument-card p { color: var(--muted); font-size: 14px; }
.argument-refs { margin-top: 10px; padding-left: 18px; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }

/* --------------------------------------------------------------- rebuttal UI */

.rebuttal-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
@media (max-width: 720px) { .rebuttal-tabs { grid-template-columns: 1fr; } }

.rebuttal-col-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.rebuttal-col-head h4 { font-family: var(--mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--g2); }

.rebuttal-text {
  white-space: pre-wrap;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.7; color: var(--text);
  padding: 18px; border-radius: 14px; max-height: 440px; overflow-y: auto;
  background: rgba(0, 0, 0, .35);
}

.counterarguments-panel { margin-top: 24px; padding: 20px 22px; border-color: rgba(124, 108, 255, .3); }
.counterarguments-panel h4 { margin-bottom: 10px; }
.counterarguments-panel li, .counterarguments-panel p { color: var(--muted); font-size: 14px; }
.counterarguments-panel ul { padding-left: 20px; }

/* -------------------------------------------------------------- deadlines UI */

.deadline-banner { margin-bottom: 18px; }
.deadline-top {
  padding: 16px 18px; border-radius: 16px;
  border-color: rgba(251, 191, 36, .5); background: rgba(251, 191, 36, .09);
  font-size: 15px;
}
.deadline-top.deadline-critical {
  border-color: rgba(255, 107, 125, .65); background: rgba(255, 107, 125, .12);
  font-size: 17px; font-weight: 700; letter-spacing: -.01em;
  box-shadow: 0 10px 34px rgba(255, 107, 125, .16);
}
.deadline-rest { margin-top: 10px; font-size: 13px; color: var(--muted); }
.deadline-rest ul { padding-left: 20px; }

/* --------------------------------------------------------------- reveal / a11y */

/* A single quiet fade as a section enters -- no travel, no stagger theatre. */
.rv { opacity: 0; transition: opacity .5s ease; }
.rv.in { opacity: 1; }

/* Hero entrance: the headline, then the primary action, each rising once and
   settling. One pass, no loop, nothing that moves again afterwards -- and it is
   purely decorative, so the page is readable and clickable regardless of whether
   it runs. Disabled wholesale by the reduced-motion block below. */
@keyframes heroRise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.hero h1.rv.in { animation: heroRise 480ms cubic-bezier(.2, .7, .3, 1) both; }
.hero .hero-cta.rv.in { animation: heroRise 520ms cubic-bezier(.2, .7, .3, 1) 140ms both; }

/* ------------------------------------------------- typographic emphasis
   Two steps only, both solid-colour so they stay legible on the dark surface
   (the gradient-clip treatment on body-size text was removed for exactly that
   reason and is not coming back).
   .key-word  -- one word the reader must not miss ("Free"/"Gratis").
   .accent-word -- the sharpest phrase in a sentence, one per block. */
.key-word {
  color: var(--text);
  font-weight: 800;
  font-size: 1.12em;
  letter-spacing: -.01em;
}
.accent-word {
  color: var(--g2);
  font-style: normal;
  font-weight: 700;
}

@media (max-width: 720px) {
  .hero { padding-top: 150px; }
  .lang-btn { padding: 5px 9px; font-size: 10.5px; }
  .header-row { padding-left: 14px; gap: 10px; }
  .brand span:not(.dot) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .rv { opacity: 1; }
  html { scroll-behavior: auto; }
}

/* --- Free case checker (homepage) ----------------------------------------
   Same surfaces, spacing, and type scale as the rest of the page. Deliberately
   calm: no animation, no colour beyond the status accents that carry meaning. */

.checker-intro { color: var(--muted); font-size: 15px; max-width: 720px; margin-bottom: 24px; }

.checker-form { padding: 24px; display: grid; gap: 12px; }
.checker-field { display: block; font-size: 13.5px; color: var(--muted); }
.checker-form textarea,
.checker-form select,
.checker-form input[type="file"] {
  width: 100%; background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); font: inherit; font-size: 14.5px; padding: 12px 14px;
}
.checker-form textarea { resize: vertical; min-height: 120px; }
.checker-form textarea:focus, .checker-form select:focus {
  outline: 0; border-color: rgba(0, 220, 255, .45);
}
.checker-upload { margin-top: 6px; display: grid; gap: 8px; }
.checker-upload-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.upload-help { color: var(--muted); font-size: 13px; margin: 2px 0 0; }
.checker-form .cta-primary { justify-self: start; margin-top: 6px; }

.checker-error {
  margin-top: 16px; color: var(--g2); font-size: 14.5px;
  border-left: 2px solid rgba(124, 108, 255, .4); padding-left: 16px;
}

.checker-readout { margin-top: 28px; display: grid; gap: 16px; }

.checker-verdict { padding: 22px 24px; }
.checker-verdict-label {
  display: block; font-family: var(--mono); font-size: 12px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px;
}
.checker-headline { font-size: 17px; letter-spacing: -.01em; margin: 0; }
/* The three tones carry the answer, so they are the one place colour is load-bearing.
   None of them implies a likelihood -- they mark what the policy says, nothing more. */
.checker-tone-supports { border-color: rgba(77, 214, 193, .35); }
.checker-tone-declines { border-color: rgba(255, 255, 255, .16); }
.checker-tone-unknown { border-color: rgba(124, 108, 255, .3); }

.checker-findings { display: grid; gap: 12px; }
.checker-finding { padding: 20px 22px; }
.checker-finding-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; justify-content: space-between; }
.checker-finding h4 { font-size: 15.5px; margin: 0; letter-spacing: -.01em; }
.checker-finding p { color: var(--muted); font-size: 14.5px; margin: 8px 0 0; }
.checker-status {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
}
.checker-supported .checker-status { color: var(--g2); }

.checker-clause {
  margin: 14px 0 0; padding: 12px 16px; border-left: 2px solid rgba(124, 108, 255, .4);
}
.checker-clause p { font-size: 13.5px; color: var(--muted); margin: 0; }
.checker-clause cite {
  display: block; margin-top: 8px; font-family: var(--mono);
  font-size: 11.5px; font-style: normal; color: var(--muted); letter-spacing: .04em;
}

.checker-strongest, .checker-counter { padding: 20px 22px; }
.checker-strongest h4, .checker-counter h4 { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.checker-strongest h5, .checker-counter-card h5 { font-size: 15.5px; margin: 0 0 6px; letter-spacing: -.01em; }
.checker-strongest p, .checker-counter-card p, .checker-note { color: var(--muted); font-size: 14.5px; margin: 0; }
.checker-note { margin-bottom: 14px; }
.checker-counter-card + .checker-counter-card { margin-top: 16px; }

/* Stated, not whispered: the dealer attached files we could not read, and the
   readout below is the typed description alone. */
.checker-doc-notice {
  font-size: 14.5px; color: var(--text);
  border: 1px solid var(--line); border-left: 3px solid var(--warn);
  background: rgba(251, 191, 36, .07);
  border-radius: 10px; padding: 12px 14px; margin: 0 0 16px;
}

.checker-next { font-size: 15px; margin: 4px 0 0; }
.checker-onward { margin: 0; }
.checker-onward a {
  font-size: 14.5px; color: var(--g2); text-decoration: underline;
  text-underline-offset: 4px; text-decoration-color: rgba(77, 214, 193, .35);
}
.checker-disclaimer {
  color: var(--muted); font-size: 13px; max-width: 820px;
  border-left: 2px solid rgba(124, 108, 255, .4); padding-left: 16px; margin-top: 6px;
}

/* Counterargument cards in the paid app -- readable cards, matching the argument
   cards beside them, never a raw object. */
.counterargument-cards { display: grid; gap: 12px; margin-top: 12px; }
.counterargument-card { padding: 18px 20px; }
.counterargument-card h5 { font-size: 15px; margin: 0 0 6px; letter-spacing: -.01em; }
.counterargument-card p { color: var(--muted); font-size: 14.5px; margin: 0; }

/* ==========================================================================
   Case wizard (Concept 1): step rail + four screens
   ========================================================================== */

/* ------------------------------------------------------------- step rail */

.wiz-rail { display: flex; align-items: center; gap: 6px; margin: 20px 0 26px; flex-wrap: wrap; }
.wiz-rail .wiz-step {
  display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted);
  padding: 6px 12px 6px 6px; border-radius: 99px; border: 1px solid transparent;
}
.wiz-rail .wiz-step .wiz-n {
  width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; border: 1px solid var(--line); color: var(--muted); flex: none;
}
.wiz-rail .wiz-step.done .wiz-n { background: var(--g2); border-color: var(--g2); color: #05060a; }
.wiz-rail .wiz-step.active { color: var(--text); border-color: var(--g1); background: rgba(124, 108, 255, .1); }
.wiz-rail .wiz-step.active .wiz-n { background: var(--g1); border-color: var(--g1); color: #fff; }
.wiz-rail .wiz-connector { width: 22px; height: 1px; background: var(--line); flex: none; }

/* Mobile collapse: numbers + connectors only, active step keeps its label. No
   horizontal overflow at 375px -- this is the fix for the concepts-page-flagged
   mobile-collapse bar. */
@media (max-width: 640px) {
  .wiz-rail { gap: 4px; }
  .wiz-rail .wiz-step { padding: 5px 8px 5px 4px; }
  .wiz-rail .wiz-step span.wiz-lbl { display: none; }
  .wiz-rail .wiz-step.active span.wiz-lbl { display: inline; }
  .wiz-rail .wiz-connector { width: 10px; }
}

/* ------------------------------------------------------------ step screens */

.wiz-screen { display: none; }
.wiz-screen.active { display: block; }
.wiz-panel { padding: 26px; margin-bottom: 20px; }
.wiz-panel h3 { margin-bottom: 6px; }
.wiz-panel .wsub { color: var(--muted); font-size: 14px; margin-bottom: 20px; max-width: 640px; }
.wiz-overlay { margin-top: 20px; }

/* ------------------------------------------------------------- story box */

.story-box label.storylabel { display: block; font-size: 14.5px; font-weight: 600; margin-bottom: 8px; }
textarea.storytext {
  width: 100%; min-height: 130px; resize: vertical;
  background: rgba(0, 0, 0, .3); border: 1px solid var(--line); border-radius: 14px;
  color: var(--text); font-family: var(--ui); font-size: 15px; padding: 14px 16px;
}
textarea.storytext:focus { outline: 0; border-color: rgba(0, 220, 255, .45); }

/* --------------------------------------------------- drop zone + file chips */

.dropzone {
  margin-top: 6px; border: 1.5px dashed var(--line); border-radius: 14px;
  padding: 28px 18px; text-align: center; color: var(--muted); cursor: pointer;
  transition: border-color .2s, background .2s; font-size: 14px;
}
.dropzone:hover, .dropzone.over { border-color: rgba(0, 220, 255, .45); background: rgba(0, 220, 255, .05); color: var(--text); }
.dropzone .browse-btn {
  margin-left: 6px; display: inline-block; border: 1px solid var(--line); border-radius: 99px;
  padding: 8px 18px; font-size: 13.5px; font-weight: 600; color: var(--text);
  background: rgba(255, 255, 255, .04); cursor: pointer;
}
.dropzone .browse-btn:hover { border-color: rgba(0, 220, 255, .45); }

.filelist { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; list-style: none; }
.filechip {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
}
.filechip .fname { flex: 1 1 160px; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.filechip .fguess { font-size: 12px; color: var(--muted); flex: 0 0 100%; order: 5; }
.filechip select.ftype {
  background: #0b0e17; color: var(--text); border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 9px; font-family: var(--ui); font-size: 12.5px; min-width: 0;
}
.fstatus {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  border-radius: 99px; padding: 5px 11px; white-space: nowrap; flex: none;
}
.fstatus.uploading { color: var(--cyan); background: rgba(0, 220, 255, .1); border: 1px solid rgba(0, 220, 255, .35); }
.fstatus.reading { color: var(--g1); background: rgba(124, 108, 255, .1); border: 1px solid rgba(124, 108, 255, .35); }
.fstatus.review { color: var(--warn); background: rgba(251, 191, 36, .1); border: 1px solid rgba(251, 191, 36, .35); }
.fstatus.confirmed { color: var(--g2); background: rgba(77, 214, 193, .1); border: 1px solid rgba(77, 214, 193, .4); }
.fstatus.error { color: var(--danger); background: rgba(255, 107, 125, .1); border: 1px solid rgba(255, 107, 125, .4); }

/* Fixed mobile tap-target bug (concepts-page review): the file-remove control
   used to be a ~24x19px "x" with 4px of padding, too small to comfortably tap.
   This is a real ~36x36px button, centred icon, on every file chip. */
.filechip-remove {
  width: 36px; height: 36px; min-width: 36px; min-height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 1px solid transparent; border-radius: 10px;
  color: var(--muted); cursor: pointer; font-size: 18px; line-height: 1; flex: none;
  transition: .2s;
}
.filechip-remove:hover { color: var(--danger); background: rgba(255, 107, 125, .08); border-color: rgba(255, 107, 125, .3); }

.missing-evidence-panel {
  margin-top: 18px; padding: 16px 18px; border: 1px solid rgba(251, 191, 36, .35);
  border-radius: 14px; background: rgba(251, 191, 36, .06);
}
.missing-evidence-panel h4 { font-size: 13.5px; letter-spacing: .04em; margin-bottom: 8px; }
.missing-evidence-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.missing-evidence-list li { font-size: 13.5px; color: var(--muted); padding-left: 14px; border-left: 2px solid rgba(251, 191, 36, .5); }

/* --------------------------------------------------- conversation (task-1) */
/* The message thread that replaces the old step-1/2/3 form screens: one
   scrollable log of assistant/dealer bubbles, with the current question's
   real input (textarea, dropzone, or buttons) pinned below it as the
   composer -- never removed from view while the thread above scrolls, so the
   dealer always has a live answer box in front of them. */

.convo-thread {
  display: flex; flex-direction: column; gap: 14px;
  max-height: 60vh; overflow-y: auto; padding-right: 4px; margin-bottom: 16px;
}
.convo-msg { display: flex; }
.convo-msg.assistant { justify-content: flex-start; }
.convo-msg.dealer { justify-content: flex-end; }
.convo-bubble {
  max-width: min(80%, 560px); padding: 12px 16px; border-radius: 14px;
  font-size: 14.5px; line-height: 1.55;
}
.convo-msg.assistant .convo-bubble { background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.convo-msg.dealer .convo-bubble { background: rgba(124, 108, 255, .18); border: 1px solid rgba(124, 108, 255, .4); border-bottom-right-radius: 4px; }
.convo-ack { margin-top: 6px; font-size: 12px; color: var(--g2); }
.convo-recap-list { list-style: none; display: flex; flex-direction: column; gap: 6px; margin: 8px 0 0; padding: 0; }
.convo-recap-list li { font-size: 13.5px; padding-left: 14px; border-left: 2px solid rgba(124, 108, 255, .4); }
.convo-composer { display: flex; flex-direction: column; gap: 10px; }
.convo-composer .storytext { min-height: 100px; }
.convo-doc-kindrow { display: flex; }
.convo-doc-kindrow select.ftype { width: auto; min-width: 220px; padding: 9px 11px; font-size: 13.5px; }

@media (max-width: 640px) {
  .convo-bubble { max-width: 90%; }
  .convo-thread { max-height: 50vh; }
  /* The documents-stage "continue" button was overflowing its 213px-wide
     composer column at narrow phone widths (measured 45px in EN, 6px in ES)
     because .cta-primary's shared white-space: nowrap kept the full label on
     one line. Let it use the full row width and wrap if it still needs to. */
  #wiz-step2-continue { width: 100%; white-space: normal; text-align: center; }
}

/* ------------------------------ backend-intelligence prompts (task-3) */
.convo-choice-btn { display: block; width: 100%; text-align: left; margin-bottom: 6px; }
.convo-fact-list { list-style: none; display: flex; flex-direction: column; gap: 10px; margin: 8px 0 0; padding: 0; }
.convo-fact-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 13.5px; padding-left: 14px; border-left: 2px solid rgba(124, 108, 255, .4);
}
.convo-fact-value { flex: 1 1 auto; }
.convo-fact-source { font-size: 12px; color: var(--muted); }
.convo-fact-confirm-btn { font-size: 12px; padding: 0; }

/* ------------------------------------------- persistent summary rail (task-2) */
/* Two columns on a wide screen (thread + composer on the left, the rail on the
   right); one stacked column under 860px, with the rail placed right after the
   composer -- still always visible on the page, never nested inside the
   thread's own internal scroll, so a narrow phone never has to scroll back
   through the conversation to reach it. */
.convo-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 22px; }
.convo-main { min-width: 0; }
.convo-rail {
  border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .02);
  padding: 16px; display: flex; flex-direction: column; gap: 14px;
  max-height: 74vh; overflow-y: auto;
}
@media (max-width: 860px) {
  .convo-layout { grid-template-columns: 1fr; }
  .convo-rail { order: 2; max-height: none; }
}
.convo-rail-heading { font-size: 13.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 0; }
.convo-rail-item { border-top: 1px solid var(--line); padding-top: 12px; }
.convo-rail-item:first-of-type { border-top: 0; padding-top: 0; }
.convo-rail-item-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.convo-rail-label { font-size: 13.5px; font-weight: 600; }
.convo-rail-jump { font-size: 12px; padding: 0; }
.convo-rail-value { font-size: 13px; color: var(--muted); margin: 0 0 8px; word-break: break-word; }
.convo-rail-edit-btn { font-size: 12.5px; padding: 6px 12px; }
.convo-rail-editor { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.convo-rail-editor textarea { min-height: 90px; }
.convo-rail-doc-list { list-style: none; display: flex; flex-direction: column; gap: 8px; margin: 0 0 8px; padding: 0; }
.convo-rail-doc { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.convo-rail-doc .doc-status { font-size: 10.5px; }
.convo-rail-doc button { font-size: 12px; padding: 5px 10px; margin-left: auto; }
.convo-rail-empty { font-size: 13px; color: var(--muted); }
.convo-rail-confirm-all { width: 100%; font-size: 13px; }
.convo-rail-skip { text-align: center; }
.convo-rail-skip p { font-size: 13px; color: var(--muted); margin: 0 0 8px; }

/* ------------------------------------------------------------- confirm grid */

.confirm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 560px) { .confirm-grid { grid-template-columns: 1fr; } }
.confirm-field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.confirm-field input {
  width: 100%; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); border-radius: 12px;
  color: var(--text); font-family: var(--ui); font-size: 14.5px; padding: 11px 13px;
}
.confirm-field input:focus { outline: 0; border-color: rgba(0, 220, 255, .45); }

/* --------------------------------------------------- confirm-screen facts (task-3) */

.confirm-fact-list { list-style: none; display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.confirm-fact-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
}
.confirm-fact-label { flex: 0 0 160px; font-size: 13.5px; font-weight: 600; color: var(--text); }
.confirm-fact-input {
  flex: 1 1 160px; min-width: 0; background: rgba(0, 0, 0, .3); border: 1px solid var(--line);
  border-radius: 10px; color: var(--text); font-family: var(--ui); font-size: 14px; padding: 9px 11px;
}
.confirm-fact-input:focus { outline: 0; border-color: rgba(0, 220, 255, .45); }
.confirm-fact-input:disabled { opacity: .6; }
.confirm-fact-source { flex: 0 0 100%; font-size: 12px; color: var(--muted); }
.confirm-fact-action { flex: none; }

.confirm-mismatches {
  margin-bottom: 16px; padding: 16px 18px; border: 1px solid rgba(255, 107, 125, .45);
  border-radius: 14px; background: rgba(255, 107, 125, .07);
}
.confirm-mismatches h4 { font-size: 13.5px; letter-spacing: .04em; margin-bottom: 8px; }
.confirm-mismatch-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.confirm-mismatch p { font-size: 13.5px; margin-bottom: 8px; }
.confirm-mismatch-actions { display: flex; flex-wrap: wrap; gap: 8px; }
