:root {
  --bg: #f4f5f7; --panel: #ffffff; --ink: #14181f; --ink2: #4a5262; --line: #d9dde3; --grid: #e6e8ec;
  --accent: #c2410c; --good: #1e7b34; --bad: #b42318; --mixed: #9a6700; --bar: #a5b4c8; --button: #14181f;
  --good-bg: #e8f5ec; --bad-bg: #fdecea; --mixed-bg: #fdf4dc; --strategy: #1f6feb;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f1318; --panel: #1a2029; --ink: #eef1f5; --ink2: #b3bccb; --line: #2c3441; --grid: #262d39;
    --accent: #ff8a4c; --good: #5fd47a; --bad: #ff7b72; --mixed: #f2c94c; --bar: #556479; --button: #eef1f5;
    --good-bg: #16301f; --bad-bg: #3a1a1a; --mixed-bg: #352b10; --strategy: #58a6ff; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 18px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
header, main, footer { max-width: 980px; margin: 0 auto; padding: 0 16px; }
header { padding-top: 28px; }
h1 { margin: 0; font-size: 32px; letter-spacing: -0.5px; }
h2 { font-size: 21px; margin: 0 0 10px; }
.tagline { margin: 6px 0; font-size: 20px; color: var(--ink2); }
.privacy { display: inline-block; margin: 10px 0 20px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 15px; color: var(--ink2); background: var(--panel); }
.inputs, .card, .verdict, .warnings, .error, .about, .main-chart, details.more { background: var(--panel);
  border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-bottom: 20px; }

/* the form: three numbered steps */
.steps { margin: 0; padding-left: 26px; }
.step { margin-bottom: 22px; }
.step:last-child { margin-bottom: 0; }
.step::marker { font-weight: 700; }
.step > label, .step > .label { display: block; font-weight: 700; font-size: 19px; }
.hint { display: block; font-size: 15px; color: var(--ink2); margin: 2px 0 8px; }
.optional { font-weight: 400; font-size: 15px; color: var(--ink2); }
input[type=file], input[type=number], input[type=text] { font: inherit; font-size: 16px; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px; width: 100%; max-width: 100%; }
.howto { margin-top: 8px; font-size: 16px; }
.howto summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.howto ol { margin: 8px 0 0; padding-left: 22px; color: var(--ink2); }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.options { margin-top: 8px; }
.field { display: flex; flex-direction: column; flex: 1 1 180px; min-width: 0; }
.field label { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.buttons { margin-top: 16px; }
button { font: inherit; font-weight: 700; padding: 12px 20px; border-radius: 10px; border: 2px solid var(--button);
  background: transparent; color: var(--ink); cursor: pointer; }
button.primary { background: var(--button); color: var(--panel); }

/* Simple | Pro switch */
.mode { display: inline-flex; margin: 0 0 20px 12px; border: 2px solid var(--button); border-radius: 10px; overflow: hidden;
  vertical-align: top; }
.mode button { flex: 0 0 auto; border: 0; border-radius: 0; padding: 6px 16px; font-size: 16px; }
.mode button[aria-pressed=true] { background: var(--button); color: var(--panel); }
.tech { font-size: 14px; color: var(--ink2); font-variant-numeric: tabular-nums; margin-top: 2px; }
section.more.pro > h2 { margin-bottom: 14px; }

/* the verdict: one traffic light and three yes/no answers */
.verdict { border-width: 2px; }
.verdict.light-green { border-color: var(--good); background: var(--good-bg); }
.verdict.light-red { border-color: var(--bad); background: var(--bad-bg); }
.verdict.light-yellow { border-color: var(--mixed); background: var(--mixed-bg); }
.light { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; font-size: 30px; font-weight: 800; line-height: 1.2; }
.lamp { font-size: 40px; line-height: 1; }
.checks { list-style: none; margin: 0; padding: 0; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.mark { flex: 0 0 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 20px; color: #fff; }
.check.pass .mark { background: var(--good); }
.check.fail .mark { background: var(--bad); }
.check.unknown .mark { background: var(--ink2); }
.check-body { display: flex; flex-direction: column; }
.question { font-weight: 700; font-size: 19px; }
.answer { font-size: 18px; color: var(--ink); }
.verdict .note { margin-top: 10px; }
.light-note { margin: -6px 0 12px; font-size: 18px; }
/* the profit line: information, separate from the three checks */
.profit { display: inline-block; margin: 0 0 12px; padding: 6px 14px; border-radius: 999px; font-weight: 800;
  font-size: 18px; color: #fff; }
.profit.gain { background: var(--good); }
.profit.loss, .profit.none { background: var(--bad); }
@media (prefers-color-scheme: dark) { .profit { color: #0f1318; } }

.main-chart .legend { font-size: 16px; }
.chart { width: 100%; height: 200px; display: block; margin-top: 10px; }
.chart.big { height: 320px; }
.legend { color: var(--ink2); margin: 8px 0 0; }
.swatch { display: inline-block; width: 18px; height: 5px; margin: 0 8px 4px 14px; vertical-align: middle; border-radius: 2px; }
.swatch:first-child { margin-left: 0; }
.swatch.strat { background: var(--strategy); }
.swatch.bh { background: #8a94a6; }

/* details, hidden until asked for */
details.more > summary { cursor: pointer; font-weight: 700; font-size: 19px; color: var(--accent); }
details.more[open] > summary { margin-bottom: 14px; }
.verdict-text { font-weight: 700; margin: 0 0 4px; }
.verdict-detail { margin: 0 0 16px; color: var(--ink2); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.card { margin: 0; }
.card h3 { margin: 0 0 6px; font-size: 18px; }
.meaning { margin: 0 0 10px; font-size: 17px; }
.term { margin: 6px 0 0; font-size: 14px; color: var(--ink2); }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 16px; }
th, td { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: right; }
th { text-align: left; font-weight: 500; color: var(--ink2); }
tr:first-child td, tr:first-child th { font-weight: 700; }
.warnings p { margin: 4px 0; color: var(--mixed); }
.error { border-left: 6px solid var(--bad); font-weight: 700; }
.note { font-size: 15px; color: var(--ink2); margin: 8px 0 0; }
.about li { margin-bottom: 8px; }
.about p { margin: 8px 0; }
.links { margin: 0 0 20px; font-size: 16px; }
a { color: var(--accent); }
.sample-note strong { color: var(--ink); }
.inputs .step > .note { margin-top: 12px; }
footer { color: var(--ink2); font-size: 14px; padding-bottom: 32px; }

@media (max-width: 720px) {
  .mode { margin: 0 0 16px; }
  .mode button { flex: 0 0 auto; }
  body { font-size: 17px; }
  h1 { font-size: 26px; }
  .tagline { font-size: 18px; }
  .inputs, .card, .verdict, .warnings, .about, .main-chart, details.more { padding: 16px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .light { font-size: 24px; gap: 10px; }
  .lamp { font-size: 32px; }
  .question { font-size: 17px; }
  .answer { font-size: 16px; }
  .chart.big { height: 240px; }
  button { flex: 1 1 100%; }
}
