/* Client test console — the candidate journey's "Calm Trust" palette (ADR-258). */
:root {
  --ink: #101828; --ink2: #344054; --body: #475467; --muted: #667085; --faint: #98A2B3;
  --line: #E4E7EC; --line2: #D0D5DD; --hair: #F2F4F7; --ground: #F4F6FA; --surface: #FFFFFF; --tint: #F9FAFB;
  --primary: #2350E6; --primary-ink: #1B3BB0; --primary-soft: #EEF2FF; --primary-tint: #F5F8FF; --primary-line: #C7D7FE;
  --navy: #0B1B3F; --code-ink: #D6DEF5;
  --ok: #067647; --ok-deep: #054F31; --ok-bright: #12B76A; --ok-soft: #ECFDF3; --ok-line: #ABEFC6; --ok-tint: #F6FEF9;
  --warn: #B54708; --warn-ink: #7A2E0E; --warn-deep: #93370D; --warn-soft: #FFFAEB; --warn-line: #FEC84B; --warn-hair: #FEF0C7; --warn-bar: #F79009;
  --danger: #B42318; --danger-soft: #FEF3F2; --danger-line: #FDA29B;
  --stage: #E9EDF3;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--ground); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.45; min-height: 100vh; }
button, input { font: inherit; }
code, .mono { font-family: var(--mono); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

/* ---- header ---------------------------------------------------------- */
.top { background: var(--surface); border-bottom: 1px solid var(--line); padding: 12px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 36px; height: 36px; border-radius: 9px; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; letter-spacing: .5px; }
.brand-text { display: flex; flex-direction: column; gap: 2px; }
.brand-name { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; }
.brand-rule { width: 1px; height: 14px; background: var(--line2); }
.brand-sub { font-weight: 600; color: var(--ink2); }
.brand-tool { font-size: 12px; color: var(--muted); font-weight: 600; }
.steps { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.step { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; border: 0; background: transparent; cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 600; }
.step:disabled { cursor: default; }
.step .n { width: 24px; height: 24px; border-radius: 999px; border: 1px solid var(--line2); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.step.done { color: var(--ink2); font-weight: 700; }
.step.done .n { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.step.current { background: var(--primary-soft); color: var(--primary-ink); font-weight: 800; }
.step.current .n { background: var(--primary); color: #fff; border-color: transparent; font-weight: 800; }
.step-join { width: 18px; height: 1px; background: var(--line2); }
.step-join.done { background: #75E0A7; }
.top-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.env-pill { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--warn-soft); border: 1px solid var(--warn-line); color: var(--warn-ink); font-size: 12.5px; font-weight: 800; }
.env-pill .dot { width: 8px; height: 8px; border-radius: 999px; background: var(--warn); }
.env-pill.local { background: var(--primary-soft); border-color: var(--primary-line); color: var(--primary-ink); }
.env-pill.local .dot { background: var(--primary); }
.client-chip { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 6px 0 12px; border-radius: 999px; background: var(--hair); color: var(--muted); font-size: 12.5px; font-weight: 600; max-width: 320px; }
.client-chip.on { background: var(--surface); border: 1px solid var(--line); color: var(--ink2); font-weight: 700; }
.client-chip .dot { width: 8px; height: 8px; border-radius: 999px; background: var(--ok-bright); flex: none; }
.client-chip .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-chip button { width: 24px; height: 24px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.client-chip button:hover { background: var(--hair); color: var(--ink); }
.client-chip:not(.on) { padding-right: 12px; }
.progress-compact { display: none; }

/* ---- shell ----------------------------------------------------------- */
.shell { width: 100%; max-width: 1440px; margin: 0 auto; padding: 28px 24px; display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
main { flex: 999 1 640px; min-width: 0; display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.pad { padding: 28px; }
.pad-s { padding: 22px 24px; }
.w-3 { flex: 3 1 460px; }
.w-2 { flex: 2 1 330px; }
.w-5 { flex: 5 1 480px; }
.w-4 { flex: 4 1 380px; }
.w-full { flex: 1 1 100%; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.stack-s { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; flex-wrap: wrap; gap: 14px; }
.row > * { flex: 1 1 220px; }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: 1.2px; color: var(--primary); }
h1 { margin: 0; font-size: 26px; line-height: 1.2; font-weight: 800; }
h2 { margin: 0; font-size: 16px; font-weight: 800; }
.lead { margin: 0; font-size: 15px; line-height: 1.55; color: var(--body); }
.fine { font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.head { display: flex; flex-direction: column; gap: 6px; }
.split { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.divider { height: 1px; background: var(--hair); }

/* ---- form ------------------------------------------------------------ */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ink2); }
.input { height: 44px; padding: 0 14px; border: 1px solid var(--line2); border-radius: 10px; font-size: 15px; font-weight: 500; color: var(--ink); background: var(--surface); width: 100%; min-width: 0; }
.input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(35, 80, 230, .16); }
.input.mono { font-family: var(--mono); font-size: 14px; }
.input[readonly] { background: var(--tint); color: var(--body); border-color: var(--line); }
.input-wrap { position: relative; display: flex; gap: 8px; }
.input-wrap .input { flex: 1; }
.legend { font-size: 13px; font-weight: 800; color: var(--ink2); letter-spacing: .3px; }
fieldset { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.scopes { display: flex; flex-wrap: wrap; gap: 8px; }
.scope { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line2); background: var(--surface); font-family: var(--mono); font-size: 13px; color: var(--ink2); cursor: pointer; }
.scope:has(input:checked) { border-color: #A4BCFD; background: var(--primary-tint); color: var(--primary-ink); }
.scope input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); }
.check-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 12px; border: 1.5px solid var(--primary); background: var(--primary-tint); }
.check-card input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); }
.check-icon { flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--surface); border: 1px solid var(--primary-line); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--hair); border-radius: 12px; align-self: flex-start; flex-wrap: wrap; }
.tab { height: 38px; padding: 0 16px; border: 0; border-radius: 9px; background: transparent; font-size: 14px; font-weight: 600; color: var(--body); cursor: pointer; }
.tab[aria-selected="true"] { background: var(--surface); box-shadow: 0 1px 3px rgba(16, 24, 40, .12); font-weight: 800; color: var(--ink); }

/* ---- buttons --------------------------------------------------------- */
.btn { height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line2); background: var(--surface); color: var(--ink2); font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--tint); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { height: 48px; padding: 0 22px; border: 0; border-radius: 12px; background: var(--primary); color: #fff; font-size: 15px; font-weight: 800; }
.btn-primary:hover { background: var(--primary-ink); }
.btn-dark { height: 48px; border: 0; border-radius: 12px; background: var(--ink); color: #fff; font-size: 15px; font-weight: 800; width: 100%; }
.btn-dark:hover { background: #1D2939; }
.btn-s { height: 34px; padding: 0 12px; border-radius: 9px; font-size: 13px; }
.btn-xs { height: 30px; padding: 0 10px; border-radius: 8px; font-size: 12.5px; border-color: var(--line); }
.icon-btn { width: 32px; height: 32px; padding: 0; border-radius: 8px; border-color: var(--line); color: var(--body); flex: none; }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.btn-row.grow > .btn { flex: 1 1 140px; }
.spin { width: 18px; height: 18px; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 999px; animation: spin .8s linear infinite; }
.spin.dark { border-color: var(--primary-line); border-top-color: var(--primary); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- status bits ----------------------------------------------------- */
.pill { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 800; white-space: nowrap; }
.pill.blue { background: var(--primary-soft); color: var(--primary-ink); }
.pill.green { background: var(--ok-soft); color: var(--ok); }
.pill.red { background: var(--danger-soft); color: var(--danger); }
.pill.grey { background: var(--hair); color: var(--ink2); }
.pill .dot { width: 8px; height: 8px; border-radius: 999px; background: currentColor; }
.pulse { animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(35, 80, 230, .45); } 70% { box-shadow: 0 0 0 12px rgba(35, 80, 230, 0); } 100% { box-shadow: 0 0 0 0 rgba(35, 80, 230, 0); } }
@media (prefers-reduced-motion: reduce) { .pulse, .spin { animation: none; } }
.alert { display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px; font-size: 13.5px; line-height: 1.5; }
.alert svg { flex: none; margin-top: 2px; }
.alert.err { background: var(--danger-soft); border: 1px solid var(--danger-line); color: var(--danger); }
.alert.warn { background: var(--warn-soft); border: 1px solid var(--warn-hair); color: var(--warn-ink); }
.alert.info { background: var(--tint); border: 1px solid var(--hair); color: var(--body); }
.code { margin: 0; padding: 14px; border-radius: 10px; background: var(--navy); color: var(--code-ink); font-family: var(--mono); font-size: 12px; line-height: 1.6; overflow-x: auto; white-space: pre; max-height: 360px; }
.linkbox { padding: 12px 14px; border-radius: 10px; background: var(--tint); border: 1px solid var(--line); font-family: var(--mono); font-size: 12.5px; line-height: 1.55; color: var(--ink2); word-break: break-all; }

/* ---- connection list ------------------------------------------------- */
.conn-item { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--hair); }
.conn-ico { flex: none; width: 26px; height: 26px; border-radius: 999px; display: flex; align-items: center; justify-content: center; border: 2px solid var(--line2); color: var(--muted); font-size: 11px; font-weight: 800; }
.conn-ico.done { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.conn-ico.fail { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.conn-ico.busy { border-color: var(--primary-line); }
.conn-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.conn-title { font-size: 14px; font-weight: 700; }
.conn-detail { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; min-width: 0; }
.conn-detail code { font-size: 12.5px; color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- case result / meta ---------------------------------------------- */
.opened-head { padding: 20px 24px; background: var(--ok-soft); border-bottom: 1px solid var(--ok-line); display: flex; align-items: center; gap: 14px; border-radius: var(--radius) var(--radius) 0 0; }
.big-tick { flex: none; width: 40px; height: 40px; border-radius: 999px; background: var(--ok-bright); color: #fff; display: flex; align-items: center; justify-content: center; }
.meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-top: 14px; border-top: 1px solid var(--hair); }
.meta-grid .k { font-size: 12px; font-weight: 700; color: var(--muted); }
.meta-grid .v { font-size: 14px; font-weight: 700; }
.recent { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--hair); }
.recent .who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.recent .who b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- case header ----------------------------------------------------- */
.case-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; }
.who-block { display: flex; align-items: center; gap: 16px; min-width: 0; }
.avatar { flex: none; width: 52px; height: 52px; border-radius: 999px; background: var(--navy); color: #fff; font-size: 17px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.case-name { margin: 0; font-size: 22px; line-height: 1.2; font-weight: 800; overflow-wrap: anywhere; }
.case-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13.5px; color: var(--body); }
.case-sub code { font-size: 12.5px; }
.seal { padding: 16px 24px; background: var(--ok-tint); border-top: 1px solid #D1FADF; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; border-radius: 0 0 var(--radius) var(--radius); }
.seal.bad { background: var(--danger-soft); border-top-color: var(--danger-line); }
.seal-title { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 800; color: var(--ok-deep); }
.seal.bad .seal-title { color: var(--danger); }
.seal-facts { font-size: 13px; color: var(--ink2); display: inline-flex; flex-wrap: wrap; gap: 6px 14px; }
.seal-facts .sep { color: var(--faint); }

/* ---- timeline -------------------------------------------------------- */
.tl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tl li { display: flex; gap: 16px; }
.tl .rail { flex: none; width: 30px; display: flex; flex-direction: column; align-items: center; }
.tl .mark { width: 30px; height: 30px; border-radius: 999px; display: flex; align-items: center; justify-content: center; flex: none; }
.tl .mark.done { background: var(--ok-bright); color: #fff; }
.tl .mark.now { background: var(--primary); }
.tl .mark.now::after { content: ""; width: 10px; height: 10px; border-radius: 999px; background: #fff; }
.tl .mark.todo { border: 2px solid var(--line2); background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 800; }
.tl .mark.fail { background: var(--danger); color: #fff; }
.tl .line { flex: 1; width: 2px; min-height: 22px; background: var(--line); }
.tl .line.done { background: #75E0A7; }
.tl .body { flex: 1; min-width: 0; padding: 4px 0 22px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tl li:last-child .body { padding-bottom: 0; }
.tl .t { font-size: 15px; font-weight: 800; }
.tl .d { font-size: 13.5px; color: var(--body); }
.tl .when { font-size: 13px; font-weight: 600; color: var(--muted); }
.tl .todo-t { color: var(--body); font-weight: 700; }
.tl .now-box { flex: 1; min-width: 0; padding: 14px 16px; border-radius: 12px; background: var(--primary-tint); border: 1px solid var(--primary-line); display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.tl .now-box .t { color: var(--primary-ink); }
.chip-code { padding: 2px 8px; border-radius: 6px; background: var(--surface); border: 1px solid var(--primary-line); font-size: 12px; color: var(--primary-ink); }

/* ---- screenshot ------------------------------------------------------ */
.shot-head { padding: 16px 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.zoom { display: flex; gap: 2px; padding: 3px; background: var(--hair); border-radius: 10px; }
.zoom button { height: 32px; padding: 0 11px; border: 0; border-radius: 8px; background: transparent; font-size: 12.5px; font-weight: 700; color: var(--body); cursor: pointer; }
.zoom button[aria-pressed="true"] { background: var(--surface); box-shadow: 0 1px 2px rgba(16, 24, 40, .12); font-weight: 800; color: var(--ink); }
.stage { background: var(--stage); padding: 20px; height: 640px; overflow: auto; }
.stage.fit { height: auto; max-height: 640px; }
.stage img { display: block; margin: 0 auto; background: #fff; box-shadow: 0 4px 18px rgba(16, 24, 40, .12); border-radius: 4px; max-width: none; }
.stage.fit img { max-width: 100%; height: auto; }
.stage-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; color: var(--body); font-size: 14px; padding: 24px; }
.shot-foot { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 12.5px; color: var(--body); }
.shot-foot code { font-size: 12px; color: var(--ink2); }
.ok-text { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-weight: 700; }
.bad-text { display: inline-flex; align-items: center; gap: 6px; color: var(--danger); font-weight: 700; }

/* ---- record ---------------------------------------------------------- */
.rec-head { padding: 16px 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--hair); }
.fields { margin: 0; }
.fields { overflow-y: auto; }
.f { padding: 9px 20px; border-bottom: 1px solid var(--hair); display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) auto; grid-template-areas: "k v c" "w w w"; align-items: center; column-gap: 14px; row-gap: 4px; }
.f dt { grid-area: k; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--muted); overflow-wrap: anywhere; }
.f dd { grid-area: v; margin: 0; font-size: 14.5px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.f dd.absent { color: var(--muted); font-style: italic; font-weight: 600; }
.f .tag { padding: 1px 7px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-ink); font-size: 11px; font-weight: 800; }
.f .conf { grid-area: c; display: flex; align-items: center; gap: 8px; }
.f .bar { width: 56px; height: 6px; border-radius: 999px; background: var(--hair); overflow: hidden; display: flex; }
.f .bar span { background: var(--ok-bright); }
.f .pct { width: 38px; text-align: right; font-family: var(--mono); font-size: 12px; color: var(--ink2); }
.f.flag { background: var(--warn-soft); border-bottom-color: var(--warn-hair); }
.f.flag dt, .f.flag .pct, .f.flag .why { color: var(--warn-deep); }
.f.flag .bar { background: var(--warn-hair); }
.f.flag .bar span { background: var(--warn-bar); }
.f .why { grid-area: w; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; }
.namecheck { margin: 12px 20px 4px; padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.5; display: flex; gap: 8px; align-items: flex-start; }
.namecheck svg { flex: none; margin-top: 2px; }
.namecheck.same { background: var(--ok-tint); border: 1px solid #D1FADF; color: var(--ok-deep); }
.namecheck.differs { background: var(--warn-soft); border: 1px solid var(--warn-hair); color: var(--warn-ink); }
.rec-foot { margin-top: auto; padding: 16px 20px; border-top: 1px solid var(--line); background: var(--tint); border-radius: 0 0 var(--radius) var(--radius); display: flex; flex-direction: column; gap: 6px; }
.hash-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hash-line code { flex: 1; min-width: 0; font-size: 12px; color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col { display: flex; flex-direction: column; }

/* ---- API log --------------------------------------------------------- */
.log { flex: 1 1 300px; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; max-height: calc(100vh - 120px); position: sticky; top: 16px; }
.log-list { overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
.log-count { height: 22px; min-width: 22px; padding: 0 7px; border-radius: 999px; background: var(--hair); color: var(--ink2); font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.call { border-top: 1px solid var(--hair); }
.call-row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 0; border: 0; background: transparent; text-align: left; cursor: pointer; color: inherit; }
.method { flex: none; width: 44px; text-align: center; padding: 3px 0; border-radius: 6px; font-family: var(--mono); font-size: 11px; font-weight: 600; background: var(--hair); color: var(--ink2); }
.method.POST { background: var(--primary-soft); color: var(--primary-ink); }
.call-path { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.call-path code { font-size: 12.5px; color: var(--ink); overflow-wrap: break-word; }
.call-path span { font-size: 11.5px; color: var(--muted); }
.status { flex: none; padding: 2px 8px; border-radius: 999px; font-family: var(--mono); font-size: 11.5px; font-weight: 600; background: var(--ok-soft); color: var(--ok); }
.status.s4 { background: var(--warn-soft); color: var(--warn); }
.status.s5, .status.s0 { background: var(--danger-soft); color: var(--danger); }
.call-detail { display: flex; flex-direction: column; gap: 8px; padding-bottom: 12px; }
.call-detail .label { font-size: 11.5px; font-weight: 800; color: var(--muted); letter-spacing: .4px; text-transform: uppercase; }
.log-bar { display: none; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; font-weight: 700; box-shadow: 0 8px 24px rgba(16, 24, 40, .24); z-index: 50; }

@media (min-width: 901px) {
  .fields { max-height: 620px; }
}

/* ---- narrow ---------------------------------------------------------- */
@media (max-width: 1100px) {
  .steps { display: none; }
  .progress-compact { display: flex; flex-direction: column; gap: 8px; padding: 14px 24px 0; max-width: 1440px; margin: 0 auto; }
  .progress-compact .lab { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
  .progress-compact .lab b { font-size: 12px; font-weight: 800; letter-spacing: 1px; color: var(--primary); }
  .progress-compact .bars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .progress-compact .bars span { height: 5px; border-radius: 999px; background: var(--line2); }
  .progress-compact .bars span.done { background: var(--ok-bright); }
  .progress-compact .bars span.current { background: var(--primary); }
}
@media (max-width: 900px) {
  .shell { padding-bottom: 100px; }
  .log { display: none; position: fixed; inset: auto 0 78px 0; max-height: 70vh; border-radius: var(--radius) var(--radius) 0 0; z-index: 40; box-shadow: 0 -8px 32px rgba(16, 24, 40, .18); }
  body.log-open .log { display: flex; }
  .log-bar { display: block; position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px 16px; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(16, 24, 40, .06); z-index: 45; }
  .log-toggle { width: 100%; height: 46px; border: 1px solid var(--line); border-radius: 12px; background: var(--tint); color: var(--ink2); font-size: 14px; font-weight: 800; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; gap: 12px; cursor: pointer; }
  .log-toggle .last { font-family: var(--mono); font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (max-width: 640px) {
  .top { padding: 12px 16px; }
  .brand-name .brand-rule, .brand-name .brand-sub { display: none; }
  .client-chip { display: none; }
  .progress-compact { padding: 14px 16px 0; }
  .shell { padding: 14px 16px 100px; gap: 16px; }
  main { gap: 16px; }
  .pad { padding: 20px 18px; }
  .pad-s { padding: 16px 18px; }
  h1 { font-size: 22px; }
  .input { font-size: 16px; height: 46px; }
  .btn-primary { width: 100%; }
  .stage { height: 420px; padding: 14px; }
  .f { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "k c" "v v" "w w"; padding: 10px 16px; }
  .namecheck { margin: 12px 16px 4px; }
  .seal, .opened-head { padding: 14px 18px; }
  .avatar { width: 44px; height: 44px; font-size: 15px; }
  .case-name { font-size: 18px; }
}
