/* Completion Estimator — Apple-minimal, self-contained.
   Tokens duplicated from the site sheet (tools with their own style.css
   do not get the shared sheet). */
:root {
  color-scheme: light;
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
  --canvas: #f5f5f7;
  --surface: #fff;
  --recessed: #f5f5f7;
  --ink: #1d1d1f;
  --muted: #65656b;
  --line: rgb(0 0 0 / .06);
  --control-line: rgb(0 0 0 / .14);
  --selected: rgb(0 0 0 / .075);
  --accent: #0071e3;
  --accent-hover: #0065cc;
  --accent-ink: #fff;
  --good: #1eaa50;
  --warn: #b26a00;
  --bad: #e02028;
  --motion: .2s cubic-bezier(.16, 1, .3, 1);
  color: var(--ink);
  background: var(--canvas);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #161618;
  --surface: #1e1e20;
  --recessed: #242426;
  --ink: #f5f5f7;
  --muted: #ababaf;
  --line: rgb(255 255 255 / .08);
  --control-line: rgb(255 255 255 / .19);
  --selected: rgb(255 255 255 / .10);
  --accent: #5aaaf9;
  --accent-hover: #7db9fb;
  --accent-ink: #fff;
  --good: #4cc38a;
  --warn: #e0a13e;
  --bad: #ff6b6b;
}
* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 860px; margin: 0 auto; padding: 28px 20px 64px; }
a { color: var(--accent); }
#back { display: inline-block; margin-bottom: 10px; text-decoration: none; font-size: 15px; }
#back::before { content: "‹ "; }
h1 { font-size: 34px; line-height: 1.2; letter-spacing: -.02em; margin: 0 0 6px; }
h2 { font-size: 20px; margin: 0 0 14px; letter-spacing: -.01em; }
h3 { font-size: 17px; margin: 26px 0 10px; }
.subtitle { color: var(--muted); font-size: 17px; margin: 0 0 10px; }
.lede { font-size: 17px; margin: 0 0 14px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 22px; color: var(--muted); font-size: 14px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px 22px 24px; margin-bottom: 18px; }
.tx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.tx-field { min-width: 0; }
.tx-field.wide { grid-column: 1 / -1; }
.dt-label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.hint { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
input[type="range"], select, input[type="number"], textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--control-line); border-radius: 12px; padding: 10px 12px;
}
textarea { resize: vertical; min-height: 64px; }
.li-slider-row { display: flex; align-items: center; gap: 12px; }
.li-slider-row input[type="range"] { flex: 1; padding: 0; border: none; }
.li-slider-row output { min-width: 52px; text-align: right; font-weight: 600; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn-row.actions { margin-top: 22px; }
.btn {
  font: inherit; font-weight: 600; border-radius: 999px; padding: 11px 22px;
  border: 1px solid var(--control-line); background: var(--surface); color: var(--ink);
  cursor: pointer; transition: background var(--motion), transform var(--motion);
}
.btn:hover { background: var(--selected); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.secondary { background: transparent; }
.btn.small { padding: 7px 16px; font-size: 14px; margin-top: 10px; }
.btn:disabled { opacity: .55; cursor: default; }
.est-hero { text-align: center; padding: 10px 0 4px; }
.est-band { font-size: 52px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.est-sub { margin-top: 8px; font-size: 17px; color: var(--muted); }
.risk { display: inline-block; font-weight: 700; border-radius: 999px; padding: 2px 12px; font-size: 15px; }
.risk-low { color: var(--good); background: rgb(30 170 80 / .12); }
.risk-watch { color: var(--warn); background: rgb(178 106 0 / .12); }
.risk-high { color: var(--bad); background: rgb(224 32 40 / .12); }
.est-median { color: var(--muted); font-size: 14px; margin: 8px 0 0; }
.honest { background: var(--recessed); border-radius: 12px; padding: 12px 14px; font-size: 14px; color: var(--muted); margin: 18px 0 0; }
.hook-total { font-size: 20px; font-weight: 700; margin: 0 0 10px; }
.bar-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; font-size: 14px; }
.bar-label { width: 64px; flex: none; color: var(--muted); }
.bar { flex: 1; height: 8px; border-radius: 99px; background: var(--recessed); overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.bar-val { width: 44px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.curve-wrap { background: var(--recessed); border-radius: 14px; padding: 8px; }
#ce-curve { width: 100%; height: auto; display: block; }
#ce-curve .grid { stroke: var(--line); stroke-width: 1; }
#ce-curve .axis { fill: var(--muted); font-size: 11px; }
#ce-curve .band { fill: rgb(0 113 227 / .14); }
#ce-curve .midline { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.fix-list { list-style: none; margin: 0; padding: 0; }
.fix { border-top: 1px solid var(--line); padding: 14px 0 4px; }
.fix:first-child { border-top: none; padding-top: 0; }
.fix-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.fix-head strong { font-size: 16px; }
.fix-tags { color: var(--muted); font-size: 13px; white-space: nowrap; }
.fix p { margin: 6px 0 0; }
.fix-test { color: var(--muted); font-size: 14px; }
.fix-none { color: var(--muted); }
table.compare { width: 100%; border-collapse: collapse; font-size: 14px; }
table.compare th, table.compare td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.compare th { color: var(--muted); font-weight: 600; }
.dir-up { color: var(--good); font-weight: 600; }
.dir-down { color: var(--bad); font-weight: 600; }
.dir-flat, .dir-flag, .dir-unknown { color: var(--muted); }
.status { color: var(--muted); font-size: 14px; margin: 12px 0 0; min-height: 20px; }
.notes ul { margin: 0; padding-left: 20px; font-size: 14px; color: var(--muted); }
.notes li { margin-bottom: 8px; }
.fineprint { color: var(--muted); font-size: 13px; margin: 16px 0 0; }
footer.brand-line { text-align: center; color: var(--muted); font-size: 13px; padding: 0 0 32px; }
@media (max-width: 640px) {
  .tx-grid { grid-template-columns: 1fr; }
  .est-band { font-size: 42px; }
  main { padding: 20px 16px 48px; }
  h1 { font-size: 28px; }
}
