/* Theme base (same :root as shared app-style.css; this app ships its own style.css so build.mjs does not copy the shared one). */
: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;
  --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: #7bbaff;
  --accent-ink: #101820;
}
main h2 { font-size: 1.25rem; font-weight: 600; letter-spacing: -.02em; margin: 0 0 4px; }
.panel > p { margin: 0; }
.panel h3 { font-size: 1rem; font-weight: 600; margin: 16px 0 8px; }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.compare-card { border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.compare-card.intuition { background: var(--recessed); }
.compare-card.actual { border-color: var(--accent); }
.compare-tag { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.compare-card p { margin: 0; color: var(--ink); font-size: 15px; line-height: 1.6; }
.compare-card strong { font-size: 2rem; font-weight: 600; letter-spacing: -.02em; }
.headline { font-size: 1.1rem; font-weight: 600; color: var(--ink); }

.answer { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.answer > div { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.answer strong { font-size: 1.9rem; font-weight: 600; letter-spacing: -.02em; }
.answer span { font-size: 13px; color: var(--muted); }
.answer .muted { font-size: 13px; }

.fields { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; margin: 12px 0; }
.fields label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.fields label > span { color: var(--muted); font-size: 13px; }
input[type="range"] { width: min(300px, 62vw); accent-color: var(--accent); }
.slider-read { display: flex; align-items: baseline; gap: 8px; }
.slider-read strong { font-size: 1.6rem; font-weight: 600; letter-spacing: -.02em; }

.presets button { flex-direction: column; align-items: flex-start; gap: 2px; min-height: 52px; }
.presets small { font-size: 12px; opacity: .75; font-weight: 400; }

.fourfold { width: 100%; border-collapse: collapse; font-size: 15px; }
.fourfold th, .fourfold td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.fourfold td strong { font-size: 1.25rem; font-weight: 600; margin-right: 8px; }
.fourfold td .muted { font-size: 13px; color: var(--muted); }
.fourfold thead th { color: var(--muted); font-weight: 500; font-size: 13px; }

#matrix, #curve { width: 100%; height: auto; display: block; margin-top: 8px; }
#share-status { margin: 10px 0 0; min-height: 1.4em; }

.legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.dot.tp { background: #0071e3; }
.dot.fp { background: #ff9500; }
.dot.fn { background: #af52de; }
.dot.tn { background: #d8d8de; }

@media (max-width: 640px) {
  .compare { grid-template-columns: 1fr; }
  .answer { grid-template-columns: 1fr; }
}
