/* Strata UI. World: security printing. Intaglio indigo ink on tinted security paper; the one signature move is the
   guilloche seal on every verdict (unique per check, microtext ring with the check number). Operate surface: standard
   controls, Golos Text for everything set in words (titles at 600), JetBrains Mono for data and code. No display serif. */

:root {
  --font: "Golos Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --display: var(--font);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --r: 5px; --r-lg: 7px;

  --bg: #eceee6; --surface: #fafbf7; --surface-2: #f1f3ec; --line: #d8dbd0; --line-strong: #b9beb0;
  --ink: #161a31; --ink-2: #3a405c; --muted: #61677b;
  --accent: #2a3889; --accent-ink: #ffffff; --accent-soft: #e2e5f3; --accent-hover: #212d72;
  --rail: #1c2456; --rail-2: #252f69; --rail-ink: #dfe3f7; --rail-muted: #9aa3d4; --rail-on: #f4f5ee; --rail-on-ink: #1c2456;
  --pass: #1d6a47; --pass-bg: #e4efe6; --pass-line: #b3d2bd;
  --weak: #87570a; --weak-bg: #f5edd8; --weak-line: #e0cb98;
  --fail: #a1281e; --fail-bg: #f6e4df; --fail-line: #e4b9b0;
  --info: #2a5397; --info-bg: #e6ecf6; --info-line: #c1cfe6;
  --chart: var(--accent);
  --shadow: 0 1px 2px rgba(22, 26, 49, 0.05), 0 2px 6px -2px rgba(22, 26, 49, 0.06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #10142a; --surface: #161b34; --surface-2: #1b213e; --line: #283052; --line-strong: #3a4369;
    --ink: #e7e9f3; --ink-2: #c2c7de; --muted: #9097b6;
    --accent: #aab4ff; --accent-ink: #10153a; --accent-soft: #252d5c; --accent-hover: #c3caff;
    --rail: #0b0e22; --rail-2: #151a3a; --rail-ink: #d6daf2; --rail-muted: #8189b5; --rail-on: #252d5c; --rail-on-ink: #eef0ff;
    --pass: #74cf9c; --pass-bg: #142a24; --pass-line: #24503d;
    --weak: #e6b75a; --weak-bg: #2a2414; --weak-line: #56461f;
    --fail: #f08a7e; --fail-bg: #2e1720; --fail-line: #5d2a33;
    --info: #9dbcf0; --info-bg: #17223f; --info-line: #2d4170;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #10142a; --surface: #161b34; --surface-2: #1b213e; --line: #283052; --line-strong: #3a4369;
  --ink: #e7e9f3; --ink-2: #c2c7de; --muted: #9097b6;
  --accent: #aab4ff; --accent-ink: #10153a; --accent-soft: #252d5c; --accent-hover: #c3caff;
  --rail: #0b0e22; --rail-2: #151a3a; --rail-ink: #d6daf2; --rail-muted: #8189b5; --rail-on: #252d5c; --rail-on-ink: #eef0ff;
  --pass: #74cf9c; --pass-bg: #142a24; --pass-line: #24503d;
  --weak: #e6b75a; --weak-bg: #2a2414; --weak-line: #56461f;
  --fail: #f08a7e; --fail-bg: #2e1720; --fail-line: #5d2a33;
  --info: #9dbcf0; --info-bg: #17223f; --info-line: #2d4170;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

/* ------------------------------------------------------------------ base */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 14.5px/1.55 var(--font); caret-color: var(--accent);
  -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 0; scrollbar-color: var(--line-strong) transparent;
  display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
::selection { background: color-mix(in srgb, var(--accent) 24%, transparent); color: var(--ink); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }
a:hover { text-decoration-color: currentColor; }
h1, h2, h3 { margin: 0; text-wrap: balance; color: var(--ink); }
h1 { font: 600 28px/1.2 var(--display); letter-spacing: -0.02em; }
h2 { font-size: 17px; line-height: 1.3; font-weight: 600; margin-bottom: 12px; letter-spacing: -0.005em; }
h3 { font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin: 24px 0 10px; display: flex; align-items: center; gap: 8px; }
p { margin: 0; }
code, .code, .num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
code { font-size: 0.86em; background: var(--surface-2); border: 1px solid var(--line); padding: 1px 5px; border-radius: 4px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .hidden { display: none !important; }
.row { display: flex; align-items: center; } .between { justify-content: space-between; } .gap { gap: 8px; } .grow { flex: 1; min-width: 0; }
.ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.lg { width: 22px; height: 22px; stroke-width: 1.5; }
line.hatch { stroke: var(--chart); stroke-width: 1.1; opacity: 0.32; }

/* ------------------------------------------------------------------ shell: indigo rail */
.rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--rail); color: var(--rail-ink);
  padding: 18px 12px 14px; overflow-y: auto; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; padding: 2px 8px 18px; color: var(--rail-ink); }
.brand b { display: block; font: 600 22px/1 var(--display); letter-spacing: -0.01em; color: #fff; }
.brand small { display: block; font-size: 12px; color: var(--rail-muted); line-height: 1.3; margin-top: 3px; }
.mark { width: 38px; height: 38px; flex: none; color: var(--rail-ink); }
.mark svg { width: 100%; height: 100%; display: block; }
nav#tabs { position: relative; display: flex; flex-direction: column; gap: 18px; flex: 1; }
.ng { display: flex; flex-direction: column; gap: 1px; }
.ngl { font-size: 11.5px; font-weight: 500; color: var(--rail-muted); padding: 0 10px 6px; }
nav#tabs button { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border: 0; border-radius: var(--r); background: none;
  color: var(--rail-ink); font: 500 14px var(--font); cursor: pointer; text-align: left; white-space: nowrap;
  transition: background-color 150ms ease, color 150ms ease; }
nav#tabs button .ic { color: var(--rail-muted); transition: color 150ms ease; }
nav#tabs button.on { background: var(--rail-on); color: var(--rail-on-ink); }
nav#tabs button.on .ic { color: var(--rail-on-ink); }
@media (hover: hover) and (pointer: fine) { nav#tabs button:not(.on):hover { background: var(--rail-2); } }
.rail .tools { display: flex; gap: 4px; align-items: center; padding: 14px 4px 0; border-top: 1px solid rgba(255, 255, 255, 0.09); margin-top: 18px; }
.rail .btn.ghost { color: var(--rail-ink); }
@media (hover: hover) and (pointer: fine) { .rail .btn.ghost:hover:not(:disabled) { background: var(--rail-2); color: #fff; } }

/* ------------------------------------------------------------------ layout */
.page { min-width: 0; display: flex; flex-direction: column; }
main { width: 100%; max-width: 1280px; padding: 34px 36px 24px; flex: 1; }
.tab { display: none; } .tab.on { display: block; }
.intro { max-width: 800px; margin-bottom: 26px; }
.intro p { max-width: 68ch; color: var(--ink-2); margin-top: 10px; font-size: 15.5px; }
.split { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; min-width: 0; box-shadow: var(--shadow); margin-bottom: 20px; }
.panel.flush { padding: 0; overflow: hidden; }
.panel > h2:first-child, .panel > div > h2:first-child { margin-top: 0; }
footer { color: var(--muted); font-size: 13px; padding: 18px 36px 36px; max-width: 1280px; border-top: 1px solid var(--line); margin: 0 36px; padding-left: 0; padding-right: 0;
  display: flex; justify-content: space-between; gap: 10px 28px; flex-wrap: wrap; align-items: baseline; }
footer p { max-width: 62ch; }

/* ------------------------------------------------------------------ controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: var(--r);
  font: 500 14px var(--font); border: 1px solid transparent; background: none; color: var(--ink); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 160ms var(--ease-out); }
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 1px 2px rgba(22, 26, 49, 0.2); }
.btn.outline { border-color: var(--line-strong); background: var(--surface); }
.btn.ghost { color: var(--ink-2); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; gap: 6px; }
.btn.icon { width: 36px; padding: 0; }
@media (hover: hover) and (pointer: fine) {
  .btn.primary:hover:not(:disabled) { background: var(--accent-hover); }
  .btn.outline:hover:not(:disabled), .btn.ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--ink); }
}
.actions { display: flex; align-items: center; gap: 10px; margin-top: 22px; flex-wrap: wrap; }

label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink-2); margin-bottom: 12px; min-width: 0; }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; color: var(--ink); cursor: pointer; }
input, select, textarea { font: 400 14px var(--font); color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r);
  height: 36px; padding: 0 10px; width: 100%; min-width: 0; transition: border-color 150ms ease, box-shadow 150ms ease; }
textarea { height: auto; padding: 9px 10px; line-height: 1.5; resize: vertical; }
input[type="number"] { font-family: var(--mono); font-size: 13px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
input.file { height: auto; padding: 6px; font-size: 13px; }
select { appearance: none; padding-right: 30px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a90a6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
select.inline { width: auto; height: 28px; font-size: 13px; font-weight: 500; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); column-gap: 12px; }
.pair { display: flex; gap: 6px; } .pair select { flex: 1.3; } .pair input { flex: 1; }
.help { font-size: 13px; color: var(--muted); line-height: 1.5; font-weight: 400; margin: 8px 0 0; max-width: 72ch; }
label .help { margin: 0; }
.err { color: var(--fail); font-size: 13.5px; white-space: pre-wrap; margin-top: 10px; }
.err:empty { display: none; }
.note { font-size: 13.5px; color: var(--ink-2); margin-top: 10px; }
.code { font-size: 12.5px; line-height: 1.6; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; overflow: auto; max-height: 560px; white-space: pre; width: 100%; color: var(--ink); }
textarea.code { min-height: 200px; margin: 0 0 14px; }
textarea#json { min-height: 560px; margin-top: 12px; }

/* segmented control */
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 18px; }
.seg button { height: 30px; padding: 0 14px; border: 0; border-radius: 5px; background: none; color: var(--muted); font: 500 13.5px var(--font); cursor: pointer; transition: color 150ms ease, background-color 150ms ease; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
@media (hover: hover) and (pointer: fine) { .seg button:not(.on):hover { color: var(--ink); } }

/* builder rows */
.irow, .rrow { display: grid; gap: 6px; margin-bottom: 8px; align-items: start; }
.irow { grid-template-columns: 92px 128px minmax(0, 1fr) 36px; }
.rrow { grid-template-columns: minmax(0, 1fr) 168px minmax(0, 1fr) 36px; }
.irow .params { display: flex; gap: 6px; } .irow .params input { flex: 1; min-width: 0; }
.irow .ccode { grid-column: 1 / -1; min-height: 170px; margin: 2px 0 6px; font-size: 12px; }
.iid { font-family: var(--mono); font-size: 13px; }

/* drop zone */
.drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg); padding: 26px 18px; margin-bottom: 16px; color: var(--ink-2); cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease; }
.drop b { font-weight: 500; color: var(--ink); font-size: 14.5px; }
.drop small { color: var(--muted); font-weight: 400; max-width: 46ch; font-size: 13px; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; height: 100%; }
.drop .ic { color: var(--muted); }
.drop.over, .drop:focus-within { border-color: var(--accent); background: var(--accent-soft); }
.drop.has { border-style: solid; border-color: var(--pass-line); background: var(--pass-bg); }
.drop.has .ic { color: var(--pass); }
@media (hover: hover) and (pointer: fine) { .drop:hover { border-color: var(--accent); } }

/* ------------------------------------------------------------------ pipeline */
.pipeline { list-style: none; margin: 0 0 8px; padding: 0; }
.pipeline li { position: relative; display: grid; grid-template-columns: 26px 1fr; gap: 12px; padding-bottom: 16px; }
.pipeline li:not(:last-child)::before { content: ""; position: absolute; left: 12px; top: 28px; bottom: 2px; width: 1.5px; background: var(--line); }
.pipeline li.done:not(:last-child)::before { background: var(--pass-line); }
.pipeline .dot { position: relative; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 500 12px var(--mono); color: var(--muted);
  border: 1.5px solid var(--line-strong); background: var(--surface); transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease; }
.pipeline li.done .dot { background: var(--pass); border-color: var(--pass); color: var(--surface); }
.pipeline li.done .dot .ic { width: 14px; height: 14px; stroke-width: 2.6; }
.pipeline li.now .dot { border-color: var(--line-strong); color: var(--accent); }
.pipeline li.now .dot::after { content: ""; position: absolute; inset: -1.5px; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--accent); animation: spin 0.7s linear infinite; }
.pipeline b { display: block; font-weight: 600; font-size: 14.5px; margin-top: 2px; }
.pipeline li.wait b { color: var(--ink-2); }
.pipeline span.d { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.5; margin-top: 2px; }
.pipeline .val { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); margin-left: 6px; font-weight: 400; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress { height: 4px; background: var(--surface-2); border-radius: 4px; overflow: hidden; margin: 4px 0 18px; }
.progress div { height: 100%; background: var(--accent); transition: width 600ms linear; }
details.log { margin-top: 6px; } details.log summary { cursor: pointer; color: var(--muted); font-size: 13px; }
details.log pre { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: pre-wrap; max-height: 200px; overflow: auto; margin: 8px 0 0; }

/* ------------------------------------------------------------------ verdict + findings */
.res-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.res-head h2 { margin: 0; }
.res-head .meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.verdict { --st: var(--accent); --st-bg: var(--surface-2); --st-line: var(--line); display: flex; gap: 18px; align-items: center; padding: 14px 20px 14px 14px;
  border-radius: var(--r-lg); border: 1px solid var(--st-line); background: var(--st-bg); margin-bottom: 16px;
  box-shadow: inset 0 0 0 4px var(--st-bg), inset 0 0 0 5px color-mix(in srgb, var(--st-line) 70%, transparent); }
.verdict b { display: block; font: 600 22px/1.2 var(--display); color: var(--st); letter-spacing: -0.015em; }
.verdict p { color: var(--ink-2); font-size: 14px; margin-top: 4px; max-width: 64ch; }
.s-pass { --st: var(--pass); --st-bg: var(--pass-bg); --st-line: var(--pass-line); }
.s-weak { --st: var(--weak); --st-bg: var(--weak-bg); --st-line: var(--weak-line); }
.s-fail { --st: var(--fail); --st-bg: var(--fail-bg); --st-line: var(--fail-line); }

/* the guilloche seal: one per verdict, pattern seeded by the check id */
.seal { width: 96px; height: 96px; flex: none; color: var(--st); }
.seal svg { width: 100%; height: 100%; display: block; overflow: visible; }
.seal .g1 path { stroke: var(--st); }
.seal .g2 path { stroke: var(--accent); opacity: 0.55; }
.seal path { fill: none; stroke-width: 0.42; }
.seal .rim { fill: none; stroke: var(--st); stroke-width: 0.7; }
.seal .rim.thin { stroke-width: 0.35; }
.seal .disc { fill: var(--st-bg); stroke: var(--st); stroke-width: 0.7; }
.seal .micro { fill: var(--st); font: 500 4.3px var(--mono); letter-spacing: 0.02em; }
.seal .glyph { fill: var(--st); font: 600 17px var(--display); }
.seal .gi { stroke: var(--st); stroke-width: 2.4; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.reveal .seal .g1 path, .reveal .seal .g2 path { stroke-dasharray: 1; animation: draw 1400ms var(--ease-out) both; }
.reveal .seal .g2 path { animation-delay: 120ms; }
.reveal .seal .micro { animation: fade 900ms 300ms ease both; }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.reveal { animation: reveal 260ms var(--ease-out) both; }
@keyframes reveal { from { opacity: 0; transform: translateY(6px); } }

.gates { list-style: none; padding: 0; margin: 0 0 20px; border: 1px solid var(--line); border-radius: var(--r-lg); }
.gates li { display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; align-items: center; padding: 9px 14px; font-size: 14px; }
.gates li + li { border-top: 1px solid var(--line); }
.gates .ok { color: var(--pass); } .gates .no { color: var(--fail); }
.gates .v { font-family: var(--mono); font-size: 13px; color: var(--ink-2); }

.section { margin-top: 24px; }
.section > h3 { margin-top: 0; }
.finding { display: grid; grid-template-columns: 18px 1fr; gap: 10px; padding: 11px 14px; border-radius: var(--r); border: 1px solid var(--line); margin-bottom: 8px; background: var(--surface); }
.finding .ic { margin-top: 2px; }
.finding b { display: block; font-weight: 600; font-size: 14px; }
.finding span { color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }
.finding.red { background: var(--fail-bg); border-color: var(--fail-line); } .finding.red .ic { color: var(--fail); }
.finding.yellow { background: var(--weak-bg); border-color: var(--weak-line); } .finding.yellow .ic { color: var(--weak); }
.finding.green .ic { color: var(--pass); }
.finding.info .ic { color: var(--info); }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin: 14px 0 0; }
.stat { padding: 10px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; }
.stat small { display: block; color: var(--muted); font-size: 12.5px; }
.stat b { display: block; font: 500 16px var(--mono); font-variant-numeric: tabular-nums; margin-top: 2px; white-space: nowrap; }
.stat b small { display: inline; font-size: 12px; }
.pos { color: var(--pass); } .neg { color: var(--fail); }

.chart-wrap { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px 10px 4px; }
svg.chart { width: 100%; height: 200px; display: block; }
svg.chart text { fill: var(--muted); font: 10px var(--mono); }
svg.chart .base { stroke: var(--line-strong); stroke-width: 1; }
svg.chart .grid { stroke: var(--line); stroke-width: 1; }
svg.chart .line { fill: none; stroke: var(--chart); stroke-width: 1.7; }
svg.chart .area { fill: url(#hatch); stroke: none; }
svg.chart .cut { stroke: var(--muted); stroke-dasharray: 3 4; }

/* ------------------------------------------------------------------ tables */
.tablewrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--r-lg); }
.panel.flush .tablewrap { border: 0; border-radius: 0; border-top: 1px solid var(--line); }
.tablewrap.tall { max-height: 640px; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
th { position: sticky; top: 0; background: var(--surface-2); color: var(--muted); font-weight: 500; font-size: 12.5px; z-index: 1; box-shadow: inset 0 -1px 0 var(--line-strong); border-bottom: 0; }
th[data-k] { cursor: pointer; user-select: none; }
th.sorted { color: var(--ink); }
th.sorted::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 6px; vertical-align: 1px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) translate(-2px, -2px); }
th.sorted.asc::after { transform: rotate(-135deg) translate(-2px, -2px); vertical-align: -2px; }
td.num, th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
th.num { font-family: var(--font); }
#rtab tbody tr { cursor: pointer; }
#rtab tbody tr.sel { background: var(--accent-soft); }
@media (hover: hover) and (pointer: fine) { #rtab tbody tr:hover { background: var(--surface-2); } }
.sysname { font-weight: 500; } .sysname small { color: var(--muted); font-weight: 400; margin-left: 6px; font-size: 12px; }
.intab td { white-space: normal; vertical-align: top; } .intab input[type=text] { height: 30px; font-family: var(--mono); font-size: 13px; width: 120px; }
.intab small { color: var(--muted); }

.grade { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 4px; font: 600 13.5px/1 var(--display); border: 1px solid;
  box-shadow: inset 0 0 0 2px var(--surface), inset 0 0 0 2.6px currentColor; padding-top: 1px; }
.g-A, .g-B { color: var(--pass); background: var(--pass-bg); border-color: var(--pass-line); }
.g-C { color: var(--weak); background: var(--weak-bg); border-color: var(--weak-line); }
.g-D, .g-F { color: var(--fail); background: var(--fail-bg); border-color: var(--fail-line); }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font: 500 12px var(--font); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.tag.pass { color: var(--pass); background: var(--pass-bg); border-color: var(--pass-line); }
.tag.weak { color: var(--weak); background: var(--weak-bg); border-color: var(--weak-line); }
.tag.fail { color: var(--fail); background: var(--fail-bg); border-color: var(--fail-line); }
.counts { display: inline-flex; gap: 10px; font: 12.5px var(--mono); }
.counts .c { display: inline-flex; align-items: center; gap: 4px; }
.counts .c .ic { width: 13px; height: 13px; }
.counts .r { color: var(--fail); } .counts .y { color: var(--weak); } .counts .g { color: var(--pass); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 16px; }
.toolbar select, .toolbar input:not([type=checkbox]) { width: auto; }
.toolbar label.check { margin: 0; font-size: 13.5px; }
.sub { padding: 0 16px 12px; font-size: 13px; gap: 12px; flex-wrap: wrap; }
.legend { display: flex; gap: 6px 14px; flex-wrap: wrap; justify-content: flex-end; flex: 1 1 420px; min-width: 0; color: var(--muted); font-size: 12.5px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .grade { width: 22px; height: 22px; font-size: 13px; }
.empty-line { color: var(--muted); font-size: 14px; padding: 16px; }

/* definition lists for "what we check" etc. */
.checks { display: grid; grid-template-columns: minmax(140px, 190px) 1fr; gap: 10px 18px; margin: 0; font-size: 14px; }
.checks dt { font-weight: 600; color: var(--ink); }
.checks dd { margin: 0; color: var(--ink-2); }
.checks.files dt { font-weight: 400; }

.joblist { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.joblist li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 14px; cursor: pointer; font-size: 14px; }
.joblist li + li { border-top: 1px solid var(--line); }
.joblist .jn { font-weight: 500; } .joblist .jm { color: var(--muted); font: 12.5px var(--mono); margin-left: 8px; }
@media (hover: hover) and (pointer: fine) { .joblist li:hover { background: var(--surface-2); } }
.empty h2 { margin-bottom: 6px; } .empty > p { color: var(--ink-2); margin-bottom: 18px; }
.gl { display: grid; grid-template-columns: 24px 1fr; gap: 8px 12px; align-items: center; font-size: 13.5px; color: var(--ink-2); }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1040px) {
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  body { display: block; }
  .rail { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 16px 0; overflow: visible; }
  .brand { flex: 1; padding: 2px 0 10px; }
  .brand small { display: none; }
  .mark { width: 30px; height: 30px; }
  .rail .tools { border: 0; margin: 0; padding: 0 0 10px; }
  nav#tabs { order: 3; flex: 1 0 100%; flex-direction: row; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 12px 10px; }
  nav#tabs::-webkit-scrollbar { display: none; }
  .ng { flex-direction: row; gap: 2px; }
  .ng + .ng { border-left: 1px solid rgba(255, 255, 255, 0.12); padding-left: 4px; }
  .ngl { display: none; }
  nav#tabs button { height: 34px; padding: 0 10px; }
  main { padding: 22px 16px; }
  footer { margin: 0 16px; }
}
@media (max-width: 760px) {
  h1 { font-size: 25px; }
  .verdict { gap: 12px; padding: 12px 14px 12px 10px; }
  .seal { width: 72px; height: 72px; }
  .verdict b { font-size: 21px; }
  .intro p { font-size: 14.5px; }
  .panel { padding: 16px; }
  .irow { grid-template-columns: 1fr 1fr 36px; } .irow .params { grid-column: 1 / 3; }
  .rrow { grid-template-columns: 1fr 1fr 36px; } .rrow .rb { grid-column: 1 / 3; }
  .checks { grid-template-columns: 1fr; gap: 2px; } .checks dd { margin-bottom: 10px; }
  .toolbar .grow { flex: 1 0 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
  .reveal { animation: fade 200ms ease both; }
  .reveal .seal .g1 path, .reveal .seal .g2 path, .reveal .seal .micro { animation: none; }
  .pipeline li.now .dot::after { animation-duration: 2s; }
  .btn:active:not(:disabled) { transform: none; }
}
@keyframes fade { from { opacity: 0; } }

/* ---- additions: pipeline settings, heatmap, what-if, picklists */
details.more { margin-top: 10px; } details.more summary { cursor: pointer; color: var(--ink-2); font-size: 13.5px; font-weight: 500; margin-bottom: 10px; }
details.more summary::marker { color: var(--muted); }
.heat { border-collapse: separate; border-spacing: 4px; width: auto; }
.heat th, .heat td { border: 0; padding: 0; background: none; position: static; }
.heat th { font: 500 12px var(--mono); color: var(--muted); padding: 0 6px; text-align: center; }
.heat td .cell { width: 74px; height: 44px; border-radius: 8px; display: grid; place-items: center; font: 500 12.5px var(--mono); border: 1px solid; line-height: 1.15; text-align: center; }
.heat td .cell small { display: block; font-size: 10.5px; opacity: 0.8; }
.cell.ok { background: var(--pass-bg); border-color: var(--pass-line); color: var(--pass); }
.cell.no { background: var(--fail-bg); border-color: var(--fail-line); color: var(--fail); }
.wi { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; margin-top: 10px; }
.wi .days { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 10px; }
.wi .days label { flex-direction: row; align-items: center; gap: 5px; margin: 0; padding: 4px 9px; border: 1px solid var(--line-strong); border-radius: 7px; font-weight: 500; cursor: pointer; }
.wi .days label:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.wi .days input { width: 14px; height: 14px; }
.cmp { display: grid; grid-template-columns: auto 1fr 1fr; gap: 6px 16px; font-size: 13.5px; margin-top: 12px; }
.cmp .h { color: var(--muted); font-size: 12.5px; } .cmp b { font: 500 14px var(--mono); }
.warnline { display: flex; gap: 8px; align-items: flex-start; color: var(--weak); font-size: 13px; margin-top: 10px; }
.picklist { border: 1px solid var(--line); border-radius: var(--r-lg); max-height: 260px; overflow: auto; }
.picklist .pi { display: grid; grid-template-columns: 18px 1fr 70px; gap: 10px; align-items: center; padding: 8px 12px; font-size: 13.5px; }
.picklist .pi + .pi { border-top: 1px solid var(--line); }
.picklist .pi input[type=number] { height: 28px; font-size: 12.5px; padding: 0 6px; }
.picklist .pi small { color: var(--muted); font-family: var(--mono); font-size: 12px; margin-left: 6px; }
.corr td.num { min-width: 56px; }
.c-hi { background: var(--fail-bg); color: var(--fail); } .c-mid { background: var(--weak-bg); color: var(--weak); } .c-lo { color: var(--pass); }
.cand { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 14px; margin-bottom: 10px; display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; align-items: center; }
.cand .blocks { color: var(--muted); font: 12.5px var(--mono); }
.cand .nums { display: flex; gap: 14px; font: 13px var(--mono); flex-wrap: wrap; }
.cand svg.chart { height: 56px; grid-column: 1 / -1; }
.cand .chart-wrap { grid-column: 1 / -1; padding: 4px; }
#btab td .btn.icon { width: 28px; height: 28px; }

.pipeline li.skip { opacity: 0.5; }
.pipeline li.skip b::after { content: ""; }

td small.blk { display: block; white-space: normal; }

@media (max-width: 760px) { .heat { border-spacing: 3px; } .heat td .cell { width: 62px; height: 40px; font-size: 11.5px; } .heat th { padding: 0 2px; font-size: 11px; } }

.band-legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); margin: 6px 0 0; flex-wrap: wrap; }
.band-legend i { display: inline-block; width: 18px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
svg.chart .band { fill: color-mix(in srgb, var(--info) 14%, transparent); stroke: none; }
svg.chart .mid { fill: none; stroke: var(--info); stroke-width: 1.2; stroke-dasharray: 4 3; }
.pend.off { opacity: 0.45; }
.ruin td.num.hi { color: var(--fail); } .ruin td.num.mid { color: var(--weak); }
.peakchosen { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.pc { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 14px; } .pc b { display: block; margin-bottom: 4px; }
.pc.chosen { border-color: var(--pass-line); background: var(--pass-bg); }
.pc .kv { font: 12.5px var(--mono); color: var(--ink-2); line-height: 1.6; word-break: break-word; }

.irow .params .itf { flex: 0 0 auto; width: 104px; font-size: 12.5px; } .irow .params .pp { display: flex; gap: 6px; flex: 1; min-width: 0; } .irow .params .pp input { flex: 1; min-width: 0; }
@media (max-width: 760px) { .irow .params .itf { width: 72px; } }

.toolbar label.inl { flex-direction: row; align-items: center; gap: 6px; margin: 0; font-size: 13px; font-weight: 500; }
.toolbar label.inl input { width: 74px; height: 32px; }

#plLim label, #plTh label { justify-content: flex-end; }

/* documents and bilingual blocks */
html[lang="en"] .l-ru, html:not([lang="en"]) .l-en { display: none; }
.doc { max-width: 860px; }
.doc h1 { margin-bottom: 12px; font-size: 34px; } .doc h2 { margin: 26px 0 8px; } .doc p { color: var(--ink-2); max-width: 75ch; margin-bottom: 10px; }
.doc .lead { font-size: 16px; }
.doc ul.plain { padding-left: 18px; color: var(--ink-2); max-width: 75ch; } .doc ul.plain li { margin-bottom: 8px; }
.rules { margin: 8px 0 16px; } .rules td { white-space: normal; vertical-align: top; } .rules td:first-child { font-weight: 500; width: 26%; } .rules td:last-child { width: 14%; color: var(--muted); }
.doc .rules { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; display: table; }
footer .flinks { display: flex; gap: 6px 16px; flex-wrap: wrap; }
footer .flinks a { color: var(--muted); } footer .flinks a:hover { color: var(--ink); }
.op-empty { color: var(--weak); font-style: italic; }
.dispute { margin-top: 14px; font-size: 13px; color: var(--muted); }

/* audit empty state: a blank specimen of the seal the result will carry */
.ghost-head { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; }
.ghost-head h2 { margin-bottom: 4px; }
.verdict.s-ghost { --st: var(--line-strong); --st-bg: var(--surface); --st-line: transparent; padding: 0; margin: 0; border: 0; box-shadow: none; background: none; }
.verdict.s-ghost .seal { width: 78px; height: 78px; }
.verdict.s-ghost .g2 path { stroke: var(--line-strong); opacity: 1; }

input[type="number"]::placeholder { font-family: var(--font); }
input[type="file"]::file-selector-button { font: 500 13px var(--font); color: var(--ink); background: var(--surface-2); border: 1px solid var(--line-strong);
  border-radius: 4px; height: 26px; padding: 0 10px; margin-right: 10px; cursor: pointer; transition: background-color 150ms ease; }
@media (hover: hover) and (pointer: fine) { input[type="file"]::file-selector-button:hover { background: var(--accent-soft); } }
details > summary { cursor: pointer; }
details > summary::marker { color: var(--muted); }

body.solo { display: block; }
body.solo main { margin: 0 auto; }

/* prop challenge: outcome bar and lot curve */
.prbar { display: flex; height: 12px; border-radius: 3px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.prbar span { display: block; min-width: 2px; }
.pb-pass { background: var(--pass); } .pb-daily { background: var(--weak); } .pb-total { background: var(--fail); } .pb-timeout { background: var(--line-strong); }
.band-legend i.pb-pass, .band-legend i.pb-daily, .band-legend i.pb-total, .band-legend i.pb-timeout { height: 8px; width: 12px; }
svg.chart .zero { fill: none; stroke: var(--muted); stroke-width: 1.3; stroke-dasharray: 4 3; }

/* trades on the chart */
.tc { margin-top: 4px; }
.tc-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.tc-head h2 { margin: 0; }
.tc-head .meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.tc-head .seg { margin: 0; }
.tc-head .seg button { height: 26px; padding: 0 10px; font: 500 12px var(--mono); }
.tc-nav { display: inline-flex; align-items: center; gap: 6px; }
.tc-syms { display: flex; flex-wrap: wrap; gap: 4px; margin: -2px 0 12px; }
.tc-syms .chip small { color: var(--muted); font-size: 10.5px; margin-left: 3px; }
.tc-syms .chip.on small { color: inherit; opacity: 0.7; }
.tc-frame { position: relative; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.tc-chart { height: 440px; }
.tc-layer { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 5; }
.tc-eq { height: 110px; border-top: 1px solid var(--line); background: repeating-linear-gradient(-45deg, transparent 0 4px, color-mix(in srgb, var(--line) 35%, transparent) 4px 5px); }
.tc-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted); margin: 10px 2px 0; }
.tc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tc-legend i { display: inline-block; width: 12px; height: 10px; }
.tc-legend .lg-in { width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 9px solid var(--accent); }
.tc-legend .lg-win { width: 9px; height: 9px; border-radius: 50%; background: var(--pass); }
.tc-legend .lg-loss { width: 9px; height: 9px; border-radius: 50%; background: var(--fail); }
.tc-legend .lg-risk { background: color-mix(in srgb, var(--fail) 22%, transparent); border: 1px dashed var(--fail); }
.tc-legend .lg-tgt { background: color-mix(in srgb, var(--pass) 22%, transparent); border: 1px dashed var(--pass); }
.tc-legend .lg-eq { height: 2px; background: linear-gradient(90deg, var(--pass) 50%, var(--fail) 50%); }
.tc-card { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 12px 0; padding: 10px 14px; border: 1px solid var(--line);
  border-radius: var(--r-lg); background: var(--surface-2); box-shadow: inset 0 0 0 3px var(--surface-2), inset 0 0 0 4px var(--line); font-size: 13px; min-height: 52px; }
.tc-card .tcn { font: 600 16px var(--display); letter-spacing: -0.01em; color: var(--ink); }
.tc-card .kv { display: flex; flex-direction: column; font: 12.5px var(--mono); color: var(--ink); }
.tc-card .kv small { font: 500 10.5px var(--font); color: var(--muted); }
.tc-card .res { font: 500 18px var(--mono); }
.side { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 4px; font: 500 11.5px var(--font); border: 1px solid; }
.side.b { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-soft); }
.side.s { color: var(--ink-2); border-color: var(--line-strong); background: var(--surface); }
.tc-list { max-height: 280px; margin-top: 4px; }
.tc-list tbody tr { cursor: pointer; }
.tc-list tbody tr.sel { background: var(--accent-soft); }
@media (hover: hover) and (pointer: fine) { .tc-list tbody tr:hover { background: var(--surface-2); } }
@media (max-width: 760px) { .tc-chart { height: 340px; } .tc-eq { height: 90px; } }

/* prop challenge: outcome bar and lot curve */
.prbar { display: flex; height: 12px; border-radius: 3px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.prbar span { display: block; min-width: 2px; }
.pb-pass { background: var(--pass); } .pb-daily { background: var(--weak); } .pb-total { background: var(--fail); } .pb-timeout { background: var(--line-strong); }
.band-legend i.pb-pass, .band-legend i.pb-daily, .band-legend i.pb-total, .band-legend i.pb-timeout { height: 8px; width: 12px; }
svg.chart .zero { fill: none; stroke: var(--muted); stroke-width: 1.3; stroke-dasharray: 4 3; }

/* trades on the chart */
.tc { margin-top: 4px; }
.tc-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.tc-head h2 { margin: 0 6px 0 0; }
.tc-head .seg { margin: 0; }
.tc-head .seg button { height: 26px; padding: 0 10px; font-size: 12.5px; }
.tc-chart { height: 460px; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.tc-trade { font-size: 13.5px; color: var(--ink-2); margin: 10px 2px; min-height: 20px; }
.tc-trade b { color: var(--ink); font-weight: 600; }
.tc-list { max-height: 280px; }
.tc-list tbody tr { cursor: pointer; }
.tc-list tbody tr.sel { background: var(--accent-soft); }
@media (hover: hover) and (pointer: fine) { .tc-list tbody tr:hover { background: var(--surface-2); } }
@media (max-width: 760px) { .tc-chart { height: 340px; } }

.cand .nums .tag { height: 20px; font-size: 11.5px; }
.sel-note { margin: 0 0 12px; }

/* ---- plots: one grammar for every chart (balance, drawdown, curves, matrices) */
.chart-wrap { position: relative; padding: 12px 6px 6px 10px; background: var(--surface); }
.chart-wrap.compact { padding: 4px; border-radius: var(--r); }
svg.chart.eq { height: auto; overflow: visible; }
svg.chart .ax { fill: var(--muted); font: 10.5px var(--mono); }
svg.chart .ax.neg { fill: var(--fail); }
svg.chart .lbl { fill: var(--muted); font: 500 10.5px var(--font); letter-spacing: 0.01em; }
svg.chart .grid { stroke: var(--line); stroke-width: 1; }
svg.chart .grid.zero { stroke: var(--line-strong); }
svg.chart .tick { stroke: var(--line); stroke-dasharray: 2 4; }
svg.chart .oos { fill: color-mix(in srgb, var(--accent) 5%, transparent); }
svg.chart .cutl { stroke: var(--accent); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0.6; }
svg.chart.eq .line { stroke-width: 1.7; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
svg.chart .ddarea { fill: url(#hatchFail); }
svg.chart .ddline { fill: none; stroke: var(--fail); stroke-width: 1.1; opacity: 0.8; vector-effect: non-scaling-stroke; }
line.hatch.fail { stroke: var(--fail); opacity: 0.38; }
svg.chart .enddot { fill: var(--chart); stroke: var(--surface); stroke-width: 2; }
svg.chart .endpin rect { fill: var(--chart); }
svg.chart .endpin text { fill: var(--accent-ink); font: 500 10.5px var(--mono); }
svg.chart .hit { fill: transparent; cursor: crosshair; }
svg.chart .hl { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 2 3; }
svg.chart .hd { fill: var(--chart); stroke: var(--surface); stroke-width: 2; }
svg.chart .hdd { fill: var(--fail); stroke: var(--surface); stroke-width: 1.5; }
.ctip { position: absolute; top: 8px; display: flex; flex-direction: column; gap: 1px; padding: 6px 9px; pointer-events: none; z-index: 2;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r); box-shadow: var(--shadow); font: 12px var(--mono); white-space: nowrap; }
.ctip b { font: 500 13px var(--mono); color: var(--ink); }
.ctip[hidden] { display: none; }

/* symbol basket */
.basket { margin: 2px 0 16px; padding: 12px 12px 10px; border: 1px dashed var(--line-strong); border-radius: var(--r-lg); background: var(--surface-2); }
.basket-h { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.basket-h .help { margin: 0; }
.chips { display: flex; flex-direction: column; gap: 6px; }
.chipgroup { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.chipgroup .cg { flex: 0 0 64px; font-size: 12px; color: var(--muted); }
.chip { height: 26px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink-2);
  font: 500 11.5px var(--mono); letter-spacing: 0.02em; cursor: pointer; transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease; }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.chip.main { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); cursor: default; opacity: 1; }
@media (hover: hover) and (pointer: fine) { .chip:not(.main):hover { border-color: var(--accent); color: var(--ink); } }
.basket-n { margin-top: 8px; }

/* per-symbol breakdown */
.symtag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 4px; font: 500 12px var(--mono); }
.bysym td { vertical-align: middle; }
.sharecell { min-width: 140px; }
.share { display: inline-block; width: 90px; height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; vertical-align: middle; margin-right: 8px; }
.share i { display: block; height: 100%; } .share i.p { background: var(--pass); } .share i.n { background: var(--fail); }
.sharecell small { font: 12px var(--mono); color: var(--muted); }
td.minic { width: 160px; min-width: 120px; padding: 4px 8px; }
td.minic .chart-wrap { border: 0; padding: 0; background: none; }
.corrm { width: auto; border-collapse: separate; border-spacing: 3px; }
.corrm th, .corrm td { border: 0; position: static; background: none; padding: 0 6px; font: 500 11.5px var(--mono); text-align: center; }
.corrm th { color: var(--muted); }
.corrm td { height: 34px; min-width: 62px; border-radius: 5px; background: color-mix(in srgb, var(--accent) var(--k, 0%), var(--surface-2)); color: var(--ink); }
.corrm td.hi { background: color-mix(in srgb, var(--fail) var(--k, 0%), var(--surface-2)); }
.corrm td.diag { background: repeating-linear-gradient(-45deg, var(--surface-2) 0 3px, var(--line) 3px 4px); }
svg.chart .band { fill: color-mix(in srgb, var(--info) 12%, transparent); stroke: color-mix(in srgb, var(--info) 40%, transparent); stroke-width: 0.8; vector-effect: non-scaling-stroke; }
svg.chart.prc .line { stroke-width: 2; }

/* results get the room: forms are narrow by nature, charts and tables are not */
.split { grid-template-columns: minmax(340px, 0.78fr) minmax(0, 1.22fr); }
h3 { flex-wrap: wrap; row-gap: 2px; }
h3 .muted.small { font-weight: 400; }
@media (max-width: 1040px) { .split { grid-template-columns: 1fr; } }
.share { width: 64px; }
.sharecell { min-width: 108px; }
td.minic { width: 120px; min-width: 96px; }
.bysym th, .bysym td { padding-left: 9px; padding-right: 9px; }

/* expert-file drops beside other inputs: lower, same grammar */
.drop.small-drop { padding: 14px 16px; min-height: 0; margin-top: 10px; }
.drop.small-drop .ic.lg { width: 20px; height: 20px; }
.fields.eaf { margin-top: 10px; }
.fields.eaf .eaf-note { grid-column: 1 / -1; margin: 0; }

/* ---------------------------------------------------------------- start page, file sheet, next steps, terms */
.start-drop { padding: 34px 18px; margin-bottom: 22px; background: var(--surface); }
.paths { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.path { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 16px 16px 14px; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--shadow); cursor: pointer; color: var(--ink); font: inherit;
  transition: border-color 150ms ease, transform 150ms var(--ease-out), background-color 150ms ease; }
.path:hover { border-color: var(--accent); background: var(--accent-soft); }
.path:active { transform: scale(0.985); }
.path:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.path .ph { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 15px; }
.path .ph .ic { color: var(--accent); }
.path small { color: var(--muted); font-size: 13px; line-height: 1.45; }
.path .to { margin-top: auto; padding-top: 6px; font-size: 12.5px; color: var(--accent); display: flex; align-items: center; gap: 4px; }
.path .to .ic { width: 14px; height: 14px; }
.st-sub { margin: 34px 0 12px; }
.how { list-style: none; counter-reset: how; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.how li { counter-increment: how; padding: 16px; display: flex; flex-direction: column; gap: 4px; border-left: 1px solid var(--line); }
.how li:first-child { border-left: 0; }
.how li b::before { content: counter(how) "  "; font-family: var(--mono); color: var(--accent); }
.how li span { color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }
.drop-veil { position: fixed; inset: 0; z-index: 60; background: color-mix(in srgb, var(--bg) 82%, transparent); display: grid; place-items: center; pointer-events: none; }
.drop-veil > div { border: 2px dashed var(--accent); border-radius: 12px; padding: 40px 48px; background: var(--surface); display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 16px; }
.sheet { position: fixed; inset: 0; z-index: 70; background: rgba(12, 15, 34, 0.45); display: grid; place-items: center; padding: 16px; }
.sheet-box { width: min(760px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--bg); border-radius: 10px; padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: sheetIn 200ms var(--ease-out); }
@keyframes sheetIn { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.sheet-head h2 { margin: 0; }
.next { margin: 4px 0 20px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-2); }
.next h3 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 500; }
.next .row { display: flex; flex-wrap: wrap; gap: 8px; }
.term { text-decoration: underline dotted var(--muted); text-underline-offset: 3px; cursor: help; }
.term-tip { position: fixed; z-index: 80; max-width: 320px; padding: 10px 12px; border-radius: var(--r); background: var(--ink); color: var(--bg); font-size: 13px; line-height: 1.45;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2); pointer-events: none; }
.term-tip b { display: block; margin-bottom: 3px; }
@media (prefers-reduced-motion: reduce) { .sheet-box { animation: none; } .path { transition: none; } }
.drop-veil[hidden], .sheet[hidden], .term-tip[hidden] { display: none; }

/* Strata mark and its loader */
.stm { display: block; width: 100%; height: 100%; }
.stm.load { width: 56px; height: 56px; margin: 0 auto 14px; color: var(--accent); overflow: visible; }
.stm.load .p { opacity: 0; animation: stSeq 2.4s cubic-bezier(.65,0,.35,1) infinite; }
.stm.load .p1, .stm.load .p2 { --x: -40px; --y: 40px; }
.stm.load .p3, .stm.load .p4 { --x: 40px; --y: -40px; }
.stm.load .p2 { animation-delay: .18s; } .stm.load .p3 { animation-delay: .36s; } .stm.load .p4 { animation-delay: .54s; }
@keyframes stSeq { 0% { opacity: 0; transform: translate(var(--x), var(--y)); } 25%, 65% { opacity: 1; transform: none; }
  90%, 100% { opacity: 0; transform: translate(calc(var(--x) * -1), calc(var(--y) * -1)); } }
@media (prefers-reduced-motion: reduce) { .stm.load .p { animation: none; opacity: 1; } }

/* lab form steps: one sliding pill under the chosen step */
.steps { position: relative; display: flex; gap: 2px; padding: 3px; margin: 0 0 18px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; overflow-x: auto; scrollbar-width: none; }
.steps .pill { position: absolute; top: 3px; bottom: 3px; left: 3px; border-radius: 5px; background: var(--surface); box-shadow: var(--shadow); transition: transform 280ms cubic-bezier(.32,.72,0,1), width 280ms cubic-bezier(.32,.72,0,1); }
.steps button { position: relative; flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 32px; padding: 0 10px; border: 0; background: none; color: var(--muted); font: 500 13px var(--font); cursor: pointer; white-space: nowrap; transition: color 150ms ease; }
.steps button i { font: 500 11px var(--mono); font-style: normal; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; border: 1px solid currentColor; }
.steps button.on { color: var(--ink); }
.steps button.on i { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.steps button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 5px; }
.step-page > h3:first-child { margin-top: 0; }
.step-next { margin-top: 18px; float: right; }
.step-page::after { content: ""; display: block; clear: both; }
.basket summary, .depth > summary { cursor: pointer; list-style: none; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.basket summary::-webkit-details-marker, .depth > summary::-webkit-details-marker { display: none; }
.basket summary::before, .depth > summary::before { content: "▸"; display: inline-block; width: 1em; transition: transform 150ms ease; color: var(--muted); }
.basket details[open] > summary::before, .depth[open] > summary::before { transform: rotate(90deg); }
.basket details[open] > summary { margin-bottom: 10px; }
.basket .bn { color: var(--muted); font-weight: 400; }
.basket { padding: 10px 12px; }
.depth { position: relative; margin: 20px 0 8px; padding: 12px 0 0; border-top: 1px solid var(--line); }
.depth > summary { font-size: 14px; }
.depth > .bn { position: absolute; top: 13px; right: 0; font-size: 12.5px; color: var(--muted); pointer-events: none; }
.depth[open] > summary { margin-bottom: 12px; }
@media (prefers-reduced-motion: reduce) { .steps .pill { transition: none; } }

/* grade punches: letter centred in its frame */
.grade { display: inline-flex; justify-content: center; align-items: center; text-align: center; line-height: 1; padding: 1px 0 0; vertical-align: middle; flex: none; }

/* ================================================================ polish pass, Nov 23 */

/* one disclosure mark everywhere: a drawn chevron, not a text glyph or the browser triangle */
summary { list-style: none; display: flex; align-items: center; gap: 6px; cursor: pointer; border-radius: var(--r); }
summary::-webkit-details-marker { display: none; }
summary::marker { content: ""; }
summary::before, .basket summary::before, .depth > summary::before {
  content: ""; flex: none; width: 14px; height: 14px; background: currentColor; opacity: 0.55;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 200ms var(--ease-out), opacity 150ms ease; width: 14px;
}
details[open] > summary::before { transform: rotate(90deg); }
@media (hover: hover) and (pointer: fine) { summary:hover { color: var(--ink); } summary:hover::before { opacity: 0.9; } }
summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.basket summary .bn { margin-left: 2px; }

/* lab steps in a narrow panel: numbers for the others, a name only for the current step */
#lab .split > .panel:first-child { container-type: inline-size; }
@container (max-width: 600px) {
  .steps button { flex: 0 0 auto; padding: 0 9px; }
  .steps button:not(.on) span { display: none; }
  .steps button.on { flex: 1 1 auto; }
}

/* page header: titles break evenly, the lead stays readable */
.intro h1 { text-wrap: balance; }
.intro p { text-wrap: pretty; }

/* switching tabs: the page settles in place instead of blinking */
.tab.on { animation: tabIn 260ms var(--ease-out); }
@keyframes tabIn { from { opacity: 0.4; transform: translateY(3px); } }

/* path cards: the arrow leans toward where the card goes */
.path .to .ic { transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .path:hover .to .ic { transform: translateX(3px); } }

/* long tables keep their header in view */
.tablewrap thead th, #rtab thead th { position: sticky; top: 0; z-index: 1; background: var(--surface); box-shadow: inset 0 -1px 0 var(--line); }
td, th { font-variant-numeric: tabular-nums; }

/* loading rows: an engraved shimmer instead of a line of grey text */
.skel td { padding-top: 12px; padding-bottom: 12px; }
.skel i { display: block; height: 10px; border-radius: 3px; background: linear-gradient(90deg, var(--surface-2) 0%, var(--line) 50%, var(--surface-2) 100%);
  background-size: 200% 100%; animation: skel 1.3s ease-in-out infinite; }
@keyframes skel { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* file picker drawn by us: the browser button speaks the OS language, not the page's */
.pick { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pick input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.pick .nm { font: 400 13px var(--font); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pick .nm.has { color: var(--ink); }

/* date fields: the calendar mark takes the ink colour */
input[type="date"] { font-family: var(--mono); font-size: 13px; }
input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: 0.55; }
input[type="date"]::-webkit-calendar-picker-indicator:hover { opacity: 0.9; }

/* secondary buttons answer the pointer */
@media (hover: hover) and (pointer: fine) {
  .btn.outline:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
  .btn.ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--ink); }
}

@media (prefers-reduced-motion: reduce) {
  .tab.on, .skel i { animation: none; }
  summary::before, .path .to .ic { transition: none; }
}

input[data-ip="date_ph"] { font-family: var(--mono); font-size: 13px; }

.step-page > h3.dup { display: none; }
.steps { margin-top: 12px; }

/* ================================================================ review pass, Nov 23 (sans titles) */
/* a lone field in a grid spans the row: its help reads as one line, the input keeps a sensible width */
.fields > label:only-child { grid-column: 1 / -1; }
.fields > label:only-child > input, .fields > label:only-child > select { max-width: 240px; }
/* segmented controls never wrap a label onto two lines */
.seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg button { white-space: nowrap; flex: none; }
/* grade legend sits beside the count when it fits, otherwise moves under it as one block */
#rating .sub { justify-content: flex-start; gap: 8px 24px; }
#rLegend { flex: 0 1 auto; margin-left: auto; gap: 6px 12px; }
/* portfolio picks: one line per strategy, the meta trims instead of wrapping */
.picklist .pi > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
/* rating: a long system name or symbol list trims, so the table fits without a sideways scroll */
#rtab td.sysc { max-width: 360px; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 700px) { #rLegend { margin-left: 0; justify-content: flex-start; } }
/* own strategy hint under the starting-point picker */
.own-hint { display: flex; align-items: center; gap: 12px; margin: 10px 0 4px; }
.own-hint span { flex: 1; min-width: 0; }
.own-hint .own-go { flex: none; }
@media (max-width: 520px) { .own-hint { flex-direction: column; align-items: flex-start; } }
#addCustom { margin-left: 4px; }
.own-hint { margin: 8px 0 2px; }
/* starting point: the list takes the full width, its two buttons sit under it */
.tplrow { flex-wrap: wrap; }
.tplrow #tpl { flex: 1 1 100%; }
/* indicator rows in the narrow lab panel: id, type and remove on top, timeframe and parameters underneath */
@container (max-width: 600px) {
  .irow { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) 36px; grid-template-areas: "id type x" "p p p"; }
  .irow .iid { grid-area: id; } .irow .itype { grid-area: type; } .irow .params { grid-area: p; } .irow > .x { grid-area: x; }
  .irow .ccode { grid-column: 1 / -1; }
  .irow + .irow { padding-top: 8px; border-top: 1px dashed var(--line); }
}
/* prop by link: where the trades came from */
.res-head .prsrc { margin-top: 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.res-head .prsrc .grade { width: 20px; height: 20px; font-size: 12px; }
.res-head .prnote { margin-top: 6px; }
/* "or a file" between the link field and the drop zone */
.or-line { display: flex; align-items: center; gap: 10px; margin: 2px 0 12px; color: var(--muted); font-size: 12.5px; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--line); }
/* ================================================================ compare */
.cmp-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cmp-opts { max-width: 640px; }
@media (max-width: 900px) { .cmp-links { grid-template-columns: 1fr; } }
table.cmptab { width: 100%; border-collapse: collapse; table-layout: fixed; }
table.cmptab th, table.cmptab td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; white-space: normal; }
table.cmptab thead th { vertical-align: bottom; }
table.cmptab th[scope="row"] { width: 220px; font-weight: 500; color: var(--ink-2); font-size: 13px; }
table.cmptab th[scope="row"] small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
table.cmptab td.num { text-align: left; font-family: var(--mono); font-size: 13px; }
table.cmptab td.top { background: color-mix(in srgb, var(--pass) 9%, transparent); box-shadow: inset 3px 0 0 var(--pass); }
table.cmptab tr.grp th { background: var(--surface-2); font-size: 12px; font-weight: 600; letter-spacing: 0.02em; color: var(--muted); padding: 8px 14px; }
.cmp-col b { display: block; font-size: 14px; color: var(--ink); }
.cmp-col small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; margin-top: 2px; }
.cmp-col a { text-decoration: none; }
.cmp-col .err { font-weight: 400; font-size: 12.5px; margin-top: 6px; }
svg.spark { display: block; width: 100%; height: 36px; margin-top: 8px; }
svg.spark polyline { fill: none; stroke: var(--chart); stroke-width: 1.6; }
svg.spark.flat polyline { stroke: var(--muted); }
@media (max-width: 700px) {
  table.cmptab { table-layout: auto; min-width: 560px; }
  table.cmptab th[scope="row"] { width: 140px; }
}
/* share a result */
.share-bar { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.res-head .share-bar { margin-left: auto; }
.share-top { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.share-link { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -4px 0 14px; }
.share-link input { height: 32px; flex: 0 1 340px; min-width: 0; font: 400 12.5px var(--mono); }
.share-link small { color: var(--pass); font-size: 12.5px; }
.res-head .share-bar { flex: none; }
.cmp-opts { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); max-width: 760px; }
/* risk-adjusted metrics */
.rkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.rk { padding: 11px 13px; box-shadow: 0 0 0 .5px var(--line); background: var(--surface); position: relative; }
.rk small { display: block; color: var(--muted); font-size: 12px; }
.rk b { display: block; font: 500 17px var(--mono); margin: 2px 0 3px; font-variant-numeric: tabular-nums; }
.rk span { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.35; }
.rk.g b { color: var(--pass); } .rk.y b { color: var(--weak); } .rk.r b { color: var(--fail); }
.rk::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px; border-radius: 2px; }
.rk.g::before { background: var(--pass); } .rk.y::before { background: var(--weak); } .rk.r::before { background: var(--fail); }
/* free limits and the access key */
.keybox { margin-top: 20px; max-width: 720px; }
.kb-head { display: flex; align-items: center; gap: 10px; }
.kb-head h2 { margin: 0; }
.keybox .help { margin-top: 8px; }
.keyform { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.keyform input { flex: 1 1 220px; min-width: 0; height: 32px; font: 400 13px var(--mono); }
.limitbar { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 18px; border: 1px solid var(--weak-line); background: var(--weak-bg); border-radius: var(--r-lg); }
.limitbar > div:first-child { flex: 1 1 320px; min-width: 0; }
.limitbar b { color: var(--ink); font-weight: 600; }
.limitbar p { color: var(--ink-2); font-size: 13.5px; margin-top: 4px; }
.limitbar .keyform { margin-top: 0; flex: 1 1 300px; }
/* buying a key */
.paybox { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px; }
.paybox h3 { margin-top: 0; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.plan { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; display: flex; flex-direction: column; gap: 8px; background: var(--surface); }
.plan b { font-size: 14px; }
.plan .price { font: 600 22px var(--mono); color: var(--ink); }
.plan .btn { width: 100%; }
#payOrder { margin-top: 12px; }
.order { border: 1px solid var(--accent); border-radius: var(--r-lg); padding: 14px; background: var(--accent-soft); }
.order .amt { font: 600 18px var(--mono); }
.order .addr { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.order .addr code { font-size: 13px; padding: 6px 8px; word-break: break-all; }
.order .wait { display: flex; align-items: center; gap: 8px; color: var(--ink-2); margin-top: 8px; }
.order .wait .stm { width: 20px; height: 20px; }

/* Strata inside Claude */
.mcpbox { margin-top: 16px; }
.mcpbox .steps { margin: 8px 0 10px; padding-left: 20px; display: grid; gap: 8px; }
.mcpbox code { padding: 3px 6px; word-break: break-all; }

/* strategy stress test */
.stress .lead-s { margin: 0 0 10px; color: var(--ink-2); }
.stress td small { line-height: 1.35; }
.sx { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.sx.g { background: color-mix(in srgb, #1f9d55 16%, transparent); color: #1f9d55; }
.sx.y { background: color-mix(in srgb, #c98a00 18%, transparent); color: #a87300; }
.sx.r { background: color-mix(in srgb, #d64545 16%, transparent); color: #d64545; }
.stress td:first-child { white-space: normal; min-width: 150px; }
.stress td small { display: block; }
@media (max-width: 640px) { .stress td small { display: none; } .stress th, .stress td { padding-left: 6px; padding-right: 6px; } }

/* key recovery and e-mail at payment */
.recover { margin-top: 8px; }
.recover summary { cursor: pointer; color: var(--ink-2); font-size: 13px; }
.recover .keyform { margin-top: 8px; }
.paymail { display: grid; gap: 4px; margin: 0 0 12px; max-width: 420px; }
.paymail span { font-size: 13px; color: var(--ink-2); }

/* ------------------------------------------------------------------ access key: rail card, start block, sheet */
.keycard { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: auto; padding: 10px 12px; border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px; background: rgba(255, 255, 255, 0.06); color: #fff; font: inherit; text-align: left; cursor: pointer; transition: background-color 150ms ease, border-color 150ms ease; }
.keycard .ic { flex: none; width: 18px; height: 18px; color: var(--accent-2, #f2c14e); }
.keycard .kc-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.keycard b { font-weight: 600; font-size: 14px; }
.keycard small { color: rgba(255, 255, 255, 0.66); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.keycard.pro { background: none; }
.keycard.pro .ic { color: rgba(255, 255, 255, 0.7); }
@media (hover: hover) and (pointer: fine) { .keycard:hover { background: rgba(255, 255, 255, 0.11); border-color: rgba(255, 255, 255, 0.28); } }
.keycard:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.keybox .kb-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.keybox h2 { font-size: 17px; margin: 0 0 4px; }
.keybox .kb-left { font-weight: 400; color: var(--ink-2); font-size: 15px; }
.keybox .help { margin: 0; }
.keyperks { margin: 4px 0 14px; padding-left: 18px; color: var(--ink-2); }
.keyperks li + li { margin-top: 4px; }
#keySheetBody h3 { margin: 18px 0 8px; font-size: 15px; }
@media (max-width: 900px) {
  .keycard { order: 2; width: auto; margin: 0 8px 10px 0; padding: 6px 10px; }
  .keycard small { display: none; }
}

.keystrip { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); font-size: 13.5px; color: var(--ink-2); }
.keystrip .ks-k .ic { width: 16px; height: 16px; color: var(--muted); display: block; }
.keystrip .ks-t { flex: 1; min-width: 0; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.keystrip .ks-t b { color: var(--ink); font-weight: 600; }
.keystrip .ks-l { color: var(--muted); font-variant-numeric: tabular-nums; }
.keystrip .ks-a { flex: none; display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 4px 2px; color: var(--accent);
  font: 500 13.5px var(--font); cursor: pointer; }
.keystrip .ks-a .ic { width: 14px; height: 14px; transition: transform 150ms ease; }
@media (hover: hover) and (pointer: fine) { .keystrip .ks-a:hover .ic { transform: translateX(2px); } .keystrip .ks-a:hover { text-decoration: underline; text-underline-offset: 3px; } }
@media (max-width: 760px) { .keystrip { flex-wrap: wrap; } .keystrip .ks-a { margin-left: 28px; } }

#stPaths { grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); }
@media (max-width: 760px) { #stPaths { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ key sheet: tiers */
#keySheet .sheet-box { width: min(820px, 100%); }
.tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: stretch; }
.tier { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.tier-pro { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 10px 28px -18px var(--accent); }
.tier header { display: flex; gap: 12px; align-items: flex-start; }
.tier-ic { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); }
.tier-ic .ic { width: 22px; height: 22px; }
.tier-pro .tier-ic { background: var(--accent); color: var(--accent-ink); }
.tier h3 { margin: 0; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.tier header p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.tier-cur { font: 500 11px var(--font); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }
.tier-badge { position: absolute; top: -11px; right: 14px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px 2px 7px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font: 600 11.5px var(--font); letter-spacing: 0.02em; }
.tier-badge .ic { width: 12px; height: 12px; fill: currentColor; stroke: none; }
.tier-lim { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tier-lim li { display: grid; grid-template-columns: 44px 1fr; align-items: baseline; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.tier-lim b { font: 600 17px var(--mono); color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.terms { margin-top: auto; display: grid; gap: 0; border-top: 1px solid var(--line); }
.tterm { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.tterm:last-child { border-bottom: 0; padding-bottom: 0; }
.term-t { display: flex; flex-direction: column; font-size: 13.5px; color: var(--ink); }
.term-t small { color: var(--pass); font-size: 12px; }
.term-p { font: 600 19px var(--mono); color: var(--ink); font-variant-numeric: tabular-nums; }
.term-b { display: flex; gap: 6px; }
.term-b .btn { min-width: 64px; justify-content: center; }
.tier-all { list-style: none; margin: 16px 0 4px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--ink-2); }
.tier-all li { display: inline-flex; align-items: center; gap: 6px; }
.tier-all .ic { width: 14px; height: 14px; color: var(--pass); }
#keySheet .paybox { margin-top: 14px; border-top: 0; padding-top: 0; }
@media (max-width: 760px) {
  .tiers { grid-template-columns: 1fr; gap: 20px; }
  .tier-pro { order: -1; }
}
