/* COMPARE. Same look as TRACE: black ground, one amber accent. Tokens match the BioPharma Foundry front page. */
:root {
  --bg: #000000;
  --surface: #0a0a0b;
  --raised: #111113;
  --line: #232326;
  --line-strong: #3a3a3f;
  --ink: #f4f4f1;
  --soft: #b9b9bd;
  --muted: #8e8e93;
  --amber: #f2a93b;
  --amber-hi: #ffd08a;
  --amber-soft: rgba(242, 169, 59, 0.12);
  --danger: #ff8a65;
  --danger-soft: rgba(255, 138, 101, 0.1);
  --proj: rgba(255, 255, 255, 0.045);
  --font-display: lft-etica, sans-serif;
  --font-body: myriad-variable, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --on-amber: #000000;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-stretch: 95%;
  font-variation-settings: "wdth" 95;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--amber); text-decoration: none; }
a:hover { color: var(--amber-hi); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
p { margin: 0; }
code, .mono { font-family: var(--font-mono); }

.wrap {
  max-width: 1296px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px), 4vw);
  padding-right: max(16px, env(safe-area-inset-right, 0px), 4vw);
}
@media (min-width: 1400px) { .wrap { padding-left: 48px; padding-right: 48px; } }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 32px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); min-width: 0; }
.brand:hover { color: var(--ink); }
.brand svg { flex: none; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -0.02em; }
.brand-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.brand-name { line-height: 1.1; }
.brand-full { font-family: var(--font-mono); font-size: 11px; line-height: 1.25; color: var(--muted); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--soft); font-size: 15px; font-weight: 500; padding: 10px 14px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 4px; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--amber); }

/* Page head */
.eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); }
.page-head h1 { font-size: 34px; line-height: 1.1; }
.lede { color: var(--soft); font-size: 17px; max-width: 62ch; }

/* App layout */
.layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; align-items: start; padding-bottom: 56px; }
@media (max-width: 920px) { .layout { grid-template-columns: minmax(0, 1fr); } }
.rail { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (max-width: 920px) { .rail { position: static; } }
.main { display: flex; flex-direction: column; gap: 20px; min-width: 0; transition: opacity 0.15s; }
.main.stale { opacity: 0.35; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 18px; min-width: 0; }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 14px; }
.panel-title { font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0; }
.panel-head .panel-title { margin: 0; }
.panel > .panel-title { margin-bottom: 14px; }
.panel > .panel-title + .field { margin-top: 0; }

label, .label { display: block; font-size: 13px; color: var(--soft); margin-bottom: 6px; }
textarea, input[type="number"], select {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 10px 12px;
  min-height: 44px;
}
textarea { height: 176px; resize: vertical; line-height: 1.5; white-space: pre; overflow: auto; }
select { font-family: var(--font-body); font-size: 14px; }
.field { margin-top: 14px; min-width: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 10px; }
.drop.over textarea { border-color: var(--amber); background: var(--amber-soft); }

.btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.btn {
  font-family: var(--font-body); font-size: 14px; font-weight: 500; color: var(--ink);
  background: transparent; border: 1px solid var(--line-strong); border-radius: 4px;
  padding: 0 14px; min-height: 44px; display: inline-flex; align-items: center; cursor: pointer; margin: 0;
}
.btn:hover { border-color: var(--amber); color: var(--amber); }
.btn.primary { background: var(--amber); border-color: var(--amber); color: var(--on-amber); font-weight: 600; }
.btn.primary:hover { background: var(--amber-hi); border-color: var(--amber-hi); color: var(--on-amber); }
.btn input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.btn:focus-within { outline: 2px solid var(--amber); outline-offset: 3px; }

.msg { font-size: 14px; border-radius: 4px; padding: 10px 12px; margin-top: 12px; border: 1px solid var(--line-strong); color: var(--soft); background: var(--raised); }
.msg.err { color: var(--danger); background: var(--danger-soft); border-color: var(--danger); }
.msg.warn { color: var(--amber-hi); background: var(--amber-soft); border-color: var(--amber); }

/* Parameters */
.params { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.param { padding: 16px 18px; border-right: 1px solid var(--line); min-width: 0; }
.param:last-child { border-right: 0; }
.param .sym { font-family: var(--font-display); font-size: 16px; color: var(--muted); }
.param .val { font-family: var(--font-mono); font-size: 30px; font-weight: 500; color: var(--amber); letter-spacing: -0.02em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.param .cap { font-size: 13px; color: var(--muted); }
@media (max-width: 600px) {
  .params { grid-template-columns: minmax(0, 1fr); }
  .param { border-right: 0; border-bottom: 1px solid var(--line); }
  .param:last-child { border-bottom: 0; }
}

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 16px 20px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.stat b { display: block; font-family: var(--font-mono); font-weight: 500; font-size: 18px; font-variant-numeric: tabular-nums; }
.stat span { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.reading { margin-top: 14px; color: var(--soft); max-width: 72ch; }

/* Charts */
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--muted); }
.legend i { display: inline-block; width: 18px; height: 0; border-top: 2px solid var(--amber); vertical-align: middle; margin-right: 7px; }
.legend i.dot { width: 8px; height: 8px; border: 0; border-radius: 50%; background: var(--ink); }
.legend i.dash { border-top-style: dashed; }
.chart { width: 100%; touch-action: pan-y; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--font-mono); font-size: 11.5px; fill: var(--muted); }
.chart text.lab { font-family: var(--font-body); font-size: 12px; }
.chart text.hot { fill: var(--amber); }
.chart .gl { stroke: var(--line); stroke-width: 1; }
.chart .ax { stroke: var(--line-strong); stroke-width: 1; }
.chart .cur { stroke: var(--ink); stroke-width: 1; opacity: 0; }
.chart .cdot { fill: var(--amber); stroke: var(--bg); stroke-width: 2; opacity: 0; }
.chart .area { fill: var(--amber-soft); }
.chart .fitline { fill: none; stroke: var(--amber); stroke-width: 2.4; stroke-linejoin: round; }
.chart .fitline.dash { stroke-dasharray: 6 5; }
.chart .actual { fill: var(--ink); }
.chart .region { fill: var(--proj); }
.chart .guide { stroke: var(--amber); stroke-width: 1; stroke-dasharray: 3 4; }
.chart .guidedot { fill: var(--amber); }
.readout { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink); min-height: 22px; margin-top: 8px; font-variant-numeric: tabular-nums; }
.readout em { font-style: normal; color: var(--muted); }

/* Tables */
.tablewrap { overflow: auto; max-height: 320px; border: 1px solid var(--line); border-radius: 4px; }
table { border-collapse: collapse; width: 100%; font-family: var(--font-mono); font-size: 12.5px; font-variant-numeric: tabular-nums; }
th, td { text-align: right; padding: 6px 10px; white-space: nowrap; border-bottom: 1px solid var(--line); }
th:first-child, td:first-child { padding-left: 12px; }
th { position: sticky; top: 0; background: var(--surface); color: var(--muted); font-family: var(--font-body); font-weight: 500; font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; }
td:first-child, th:first-child { text-align: left; }
tr.proj td { color: var(--muted); background: var(--proj); }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 1100px) { .two { grid-template-columns: minmax(0, 1fr); } }
.export { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; justify-content: space-between; }
.export p { color: var(--muted); font-size: 14px; max-width: 56ch; }
.export .btns { margin-top: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap { padding-top: 28px; padding-bottom: 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 40px; color: var(--muted); font-size: 13px; }
.site-footer p { max-width: 70ch; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.site-footer nav a { color: var(--soft); }

/* Help page */
.help { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; padding-bottom: 72px; align-items: start; }
@media (max-width: 860px) { .help { grid-template-columns: minmax(0, 1fr); gap: 24px; } }
.toc { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 2px; }
@media (max-width: 860px) { .toc { position: static; flex-direction: row; flex-wrap: wrap; gap: 4px 6px; } }
.toc a { color: var(--soft); font-size: 14px; padding: 8px 10px; border-radius: 4px; min-height: 40px; display: inline-flex; align-items: center; }
.toc a:hover { color: var(--amber); background: var(--raised); }
.doc { font-family: myriad-variable, sans-serif; display: flex; flex-direction: column; gap: 44px; min-width: 0; max-width: 78ch; }
.doc section { scroll-margin-top: 16px; display: flex; flex-direction: column; gap: 14px; }
.doc h2 { font-size: 28px; line-height: 1.1; }
.doc h3 { font-size: 18px; margin-top: 8px; }
.doc p, .doc li { color: var(--soft); font-size: 17px; line-height: 1.6; }
.doc ul, .doc ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.doc strong { color: var(--ink); font-weight: 600; }
.doc code { font-size: 13px; background: var(--raised); border: 1px solid var(--line); border-radius: 3px; padding: 1px 6px; color: var(--ink); }
.eq { font-family: var(--font-mono); font-size: 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px; overflow-x: auto; white-space: pre; line-height: 1.7; }
.codeblock { font-family: var(--font-mono); font-size: 13px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px; overflow-x: auto; white-space: pre; line-height: 1.6; }
.doc table { font-size: 13px; }
.doc td, .doc th { text-align: left; white-space: normal; vertical-align: top; }
.doc .tablewrap { max-height: none; }
details { border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
details summary { cursor: pointer; padding: 14px 16px; min-height: 48px; color: var(--ink); font-weight: 500; }
details[open] summary { border-bottom: 1px solid var(--line); }
details p { padding: 14px 16px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---- IMPACT additions ---- */
.layout { grid-template-columns: minmax(0, 440px) minmax(0, 1fr); }
@media (max-width: 1000px) { .layout { grid-template-columns: minmax(0, 1fr); } }
.rail { position: static; }
input[type="text"] { width: 100%; font-family: var(--font-body); font-size: 14px; color: var(--ink); background: var(--bg); border: 1px solid var(--line-strong); border-radius: 4px; padding: 10px 12px; min-height: 44px; }
input.mono { font-family: var(--font-mono); font-size: 13px; }
input.changed, textarea.changed { border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber); }
textarea.small { height: 72px; white-space: pre-wrap; font-family: var(--font-body); font-size: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 12px; }
@media (max-width: 480px) { .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sub { font-size: 13px; color: var(--muted); }
.scen { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-bottom: 20px; }
.scen .lbl { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.chip { font: 500 14px var(--font-body); color: var(--soft); background: transparent; border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 16px; min-height: 44px; cursor: pointer; }
.chip:hover { border-color: var(--amber); color: var(--amber); }
.chip[aria-pressed="true"] { background: var(--amber); border-color: var(--amber); color: var(--on-amber); font-weight: 600; }
.chip.ghost { border-style: dashed; color: var(--muted); }
.scen .spacer { flex: 1 1 24px; }
.scen .sname { max-width: 260px; }
.drug { border: 1px solid var(--line); border-radius: 6px; padding: 14px; margin-top: 14px; background: var(--bg); }
.drug-head { display: flex; align-items: center; gap: 8px; }
.drug-head input { flex: 1 1 auto; font-weight: 600; }
.tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-amber); background: var(--amber); border-radius: 3px; padding: 3px 7px; white-space: nowrap; }
.netline { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.netline b { color: var(--ink); font-family: var(--font-mono); font-weight: 500; }
.shares { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 0 8px; margin-top: 12px; }
.shares label { font-size: 12px; margin-bottom: 4px; }
.sumrow { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 14px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.sumrow span { padding: 3px 8px; border: 1px solid var(--line); border-radius: 3px; }
.sumrow span.bad { color: var(--amber-hi); border-color: var(--amber); background: var(--amber-soft); }
.iconbtn { font: 500 14px var(--font-body); color: var(--muted); background: transparent; border: 1px solid var(--line-strong); border-radius: 4px; min-width: 44px; min-height: 44px; cursor: pointer; }
.iconbtn:hover { color: var(--danger); border-color: var(--danger); }
.row-item { border: 1px solid var(--line); border-radius: 6px; padding: 12px; margin-top: 12px; background: var(--bg); }
.row-item .top { display: flex; gap: 8px; align-items: flex-end; }
.row-item .top > div { flex: 1 1 auto; min-width: 0; }
.row-item .top .grow { flex: 2 1 auto; }
.row-item code { color: var(--amber); }
.preview { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.preview b { color: var(--ink); font-weight: 500; }
.names { margin-top: 12px; font-size: 13px; color: var(--soft); }
.names code { font-size: 12px; background: var(--raised); border: 1px solid var(--line); border-radius: 3px; padding: 1px 5px; margin-right: 2px; color: var(--ink); }
.names dt { color: var(--muted); margin-top: 8px; }
.names dd { margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 4px; }
.big { font-family: var(--font-mono); font-size: 28px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.big.hot { color: var(--amber); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 16px 18px; min-width: 0; }
.tile.hot { border-color: var(--amber); }
.tile .cap { font-size: 13px; color: var(--muted); }
.work td.mine, .work tr.mine td { color: var(--amber); }
.work tr.sep td { border-top: 1px solid var(--line-strong); }
.work tr.sec td { color: var(--muted); font-family: var(--font-body); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; background: var(--raised); }
.work td.above { color: var(--amber-hi); }
.chart .bar { fill: var(--soft); }
.chart .bar.hot { fill: var(--amber); }
.chart .thr { stroke: var(--amber); stroke-width: 1.4; stroke-dasharray: 5 4; }
.chart .tor-lo { fill: var(--soft); }
.chart .tor-hi { fill: var(--amber); }
.chart .zero { stroke: var(--ink); stroke-width: 1; }
.chart text.val { fill: var(--ink); font-size: 12px; }
.chart text.num { fill: var(--soft); font-size: 11.5px; }
.notice { font-size: 13px; color: var(--muted); max-width: 80ch; }
.inline-select { width: auto; min-width: 96px; display: inline-block; }
.warnlist { margin: 0; padding-left: 18px; }

.basis { color: var(--muted); font-size: 14px; }
.math { font-family: "STIX Two Text", "Cambria Math", "Times New Roman", Georgia, serif; font-size: 18px; line-height: 1.5; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 16px 20px; color: var(--ink); overflow-x: auto; }
.math .eqrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: baseline; padding: 8px 0; }
.math .eqrow + .eqrow { border-top: 1px solid var(--line); }
.math .eqno { color: var(--muted); font-family: var(--font-mono); font-size: 13px; }
.math var { font-style: italic; }
.math sub, .math sup { font-size: 0.7em; line-height: 0; }
.doc .words { color: var(--soft); font-size: 14.5px; margin-top: -6px; }
.doc .ref { font-size: 14px; }
.doc sup.cite { font-size: 0.72em; line-height: 0; margin-left: 1px; color: var(--muted); }
.doc ol.refs { padding-left: 28px; }
.doc .note { border-left: 2px solid var(--amber); padding: 4px 0 4px 14px; color: var(--soft); }

/* Report: set out like a printed document */
.report { background: #fff; color: #111; border-radius: 6px; margin: 0 0 56px; padding: 40px 44px; font-family: myriad-variable, sans-serif; font-size: 14px; line-height: 1.55; }
.report h1 { font-family: var(--font-display); font-size: 30px; color: #000; margin: 6px 0; letter-spacing: -0.02em; }
.report h2 { font-family: var(--font-display); font-size: 18px; color: #000; margin: 28px 0 10px; padding-bottom: 6px; border-bottom: 1px solid #ccc; }
.report h3 { font-size: 15px; margin: 18px 0 8px; color: #000; }
.report .rbrand { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: #8a5a00; }
.report .rmeta { color: #444; }
.report p { margin: 8px 0; max-width: 90ch; }
.report table { width: 100%; font-size: 12.5px; margin: 10px 0; }
.report th, .report td { border-bottom: 1px solid #ddd; padding: 6px 8px; color: #111; background: transparent; position: static; white-space: normal; text-align: right; vertical-align: top; }
.report th { color: #444; font-family: var(--font-body); font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; text-align: right; }
.report th:first-child, .report td:first-child { text-align: left; }
.report table.kv td:last-child { text-align: left; }
.report .math { background: #f6f6f4; border-color: #ddd; color: #111; font-size: 16px; }
.report .math p { margin: 4px 0; }
.report code { font-family: var(--font-mono); font-size: 12px; background: #f1f1ee; padding: 1px 5px; border-radius: 3px; color: #111; }
.report .none, .report .src { color: #555; }
.report ul { padding-left: 20px; }
@media (max-width: 700px) { .report { padding: 22px 16px; overflow-x: auto; } }
.report table { font-family: var(--font-body); }
.report table.kv th:last-child, .report table.kv td:last-child { text-align: left; }
.report table.kv td:first-child { width: 28%; color: #444; }
.report td, .report th { font-variant-numeric: tabular-nums; }

/* Light background. Chosen with the toggle in the header; Method and Help open light the first time. */
html[data-theme="light"] {
  --bg: #fafaf8;
  --surface: #ffffff;
  --raised: #f1f1ee;
  --line: #e3e3de;
  --line-strong: #c8c8c1;
  --ink: #111113;
  --soft: #46464c;
  --muted: #6a6a72;
  --amber: #a85f00;
  --amber-hi: #7a4400;
  --amber-soft: rgba(168, 95, 0, 0.1);
  --danger: #b3401a;
  --danger-soft: rgba(179, 64, 26, 0.08);
  --proj: rgba(0, 0, 0, 0.04);
  --on-amber: #ffffff;
  color-scheme: light;
}
html[data-theme="light"] .report { border: 1px solid var(--line); }
.themebtn { font: inherit; color: var(--soft); background: transparent; border: 1px solid var(--line-strong); border-radius: 4px; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; margin-left: 8px; }
.themebtn:hover { color: var(--amber); border-color: var(--amber); }

[hidden] { display: none !important; }


/* ---- PRICE ------------------------------------------------------------------------------------------------ */
body { font-weight: 450; }
.hero { min-height: 56vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; text-align: center; padding: 48px 0 80px; }
.hero h1 { font-size: 40px; line-height: 1.1; }
.hero .lede { max-width: 58ch; margin: 0; }
@media (max-width: 760px) { .hero h1 { font-size: 32px; } }
.pmain { padding-bottom: 64px; }

/* search */
.psearch { position: relative; width: 100%; max-width: 880px; margin: 14px auto 0; text-align: left; }
.psearch.compact { margin: 20px 0 0; max-width: 560px; }
.psearch input[type="search"] {
  width: 100%; height: 68px; padding: 0 22px 0 58px; font: inherit; font-size: 21px; color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 8px; outline: none;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E") no-repeat 20px 50%;
}
.psearch.compact input[type="search"], .psearch.slot input[type="search"] { height: 48px; font-size: 16px; padding-left: 46px; background-position: 15px 50%; background-size: 20px; }
.psearch input[type="search"]:focus { border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.sugg2 { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; margin: 6px 0 0; padding: 6px; list-style: none; text-align: left; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16); max-height: 440px; overflow-y: auto; }
.sugg2 .grp { padding: 8px 12px 4px; font: 500 11px/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.sugg2 li.opt { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 5px; cursor: pointer; }
.sugg2 li.opt:hover, .sugg2 li.opt.on { background: var(--raised); }
.sugg2 .nm { font-weight: 650; font-size: 17px; }
.sugg2 .nm i { font-style: normal; font-weight: 400; color: var(--soft); margin-left: 8px; font-size: 15px; }
.sugg2 .sb { font-size: 13.5px; color: var(--muted); }
.sugg2 mark { background: var(--amber-soft); color: inherit; border-radius: 2px; }
.hint { margin: 18px 0 0; color: var(--muted); font-size: 14.5px; }
.hint a { border-bottom: 1px dotted currentColor; }

/* product page */
.ptitle { margin: 26px 0 0; font-size: clamp(30px, 5vw, 44px); }
.psub { margin: 6px 0 0; color: var(--soft); font-size: 17px; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 0; }
.ptag { font: 500 12px var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; padding: 5px 9px; border: 1px solid var(--line-strong); border-radius: 3px; color: var(--soft); }
.ptag.cls { border-color: var(--amber); color: var(--amber); }
.packbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 24px 0 0; }
.packbar label { margin: 0; }
.packbar select { flex: 1 1 320px; max-width: 640px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 20px 0 0; }
.tiles.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tile { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 16px 18px; min-width: 0; }
.tile .k { font-size: 13px; color: var(--muted); }
.tile .v { margin-top: 6px; font: 600 28px var(--font-display); letter-spacing: -0.01em; }
.tile .s { margin-top: 4px; font-size: 13px; color: var(--soft); }
.up { color: var(--danger); }
.down { color: #2e8b57; }
html:not([data-theme="light"]) .down { color: #5cc08a; }
.card { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 18px 20px; margin-top: 14px; min-width: 0; }
.card h2 { margin: 0 0 4px; font-size: 18px; }
.card .sub { margin: 0 0 10px; color: var(--muted); font-size: 13.5px; }
.two { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; align-items: start; }
.two .card { margin-top: 14px; }
dl.d { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px 14px; margin: 0; font-size: 14.5px; }
dl.d dt { color: var(--muted); }
dl.d dd { margin: 0; overflow-wrap: anywhere; }
.note { margin-top: 22px; font-size: 13px; color: var(--muted); max-width: 70ch; }
.status { margin-top: 28px; color: var(--soft); }

/* chart */
svg.chart { width: 100%; height: auto; display: block; }
svg.chart text { font: 12px var(--font-body); fill: var(--muted); }
svg.chart .val { fill: var(--ink); font-weight: 650; font-size: 13px; }
svg.chart .gr { stroke: var(--line); stroke-width: 1; }
svg.chart .ln { fill: none; stroke-width: 2.5; }
svg.chart .pt { fill: var(--surface); stroke-width: 2.5; }
svg.chart .s0 { stroke: var(--amber); }
svg.chart .s1 { stroke: var(--ink); }
svg.chart .s2 { stroke: #3b82f6; }
svg.chart .ln.s1 { stroke-dasharray: 7 5; }
svg.chart .ln.s2 { stroke-dasharray: 2 5; stroke-linecap: round; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0 0 8px; font-size: 13.5px; color: var(--soft); }
.legend .lg::before { content: ""; display: inline-block; width: 22px; border-top: 3px solid; vertical-align: middle; margin-right: 8px; }
.legend .s0::before { border-color: var(--amber); }
.legend .s1::before { border-color: var(--ink); border-top-style: dashed; }
.legend .s2::before { border-color: #3b82f6; border-top-style: dotted; }
.legend em { font-style: normal; color: var(--muted); }

/* tables */
.tablewrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: right; font: 500 11px var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; background: var(--surface); }
table.t th:first-child, table.t td:first-child { text-align: left; }
table.t td { text-align: right; padding: 9px 10px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
table.t tr.sel td { background: var(--amber-soft); }
table.t .nd { font-family: var(--font-mono); font-size: 12.5px; color: var(--soft); }
table.t .empty { text-align: left; color: var(--muted); }
table.t .yr { font-size: 12px; color: var(--muted); margin-left: 4px; }
table.cmp th, table.cmp td { text-align: left; vertical-align: top; white-space: normal; }
table.cmp thead th { text-transform: none; letter-spacing: 0; font: 600 15px var(--font-body); color: var(--ink); }
table.cmp thead th .co { display: block; font-weight: 400; font-size: 13px; color: var(--muted); }
table.cmp tbody th { font: 500 11px var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); padding: 9px 10px; width: 170px; white-space: nowrap; }
table.cmp select { width: 100%; max-width: 100%; }

/* compare */
.slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 18px 0 0; }
.slots label { margin-bottom: 6px; }
.slots .psearch { margin: 0; max-width: none; }
.slots .sugg2 { min-width: 280px; }
@media (max-width: 800px) { .tiles, .tiles.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } .two, .slots { grid-template-columns: minmax(0, 1fr); } dl.d { grid-template-columns: 100px minmax(0, 1fr); } }
@media (max-width: 480px) { .tiles, .tiles.three { grid-template-columns: minmax(0, 1fr); } }
table.t, table.t th, table.t td { font-family: var(--font-body); font-size: 14.5px; }
table.t th { font-family: var(--font-mono); font-size: 11px; }
table.t td.nd { font-family: var(--font-mono); font-size: 12.5px; }
table.cmp tbody th { font-family: var(--font-mono); font-size: 11px; }
table.cmp thead th { font-family: var(--font-body); font-size: 15px; }
table.t th button { font-family: var(--font-mono); font-size: 11px; }
