:root {
  --bg: #f7f7f5; --panel: #ffffff; --text: #1d2125; --muted: #5b636b; --line: #dfe2e5;
  --accent: #1f5f99; --accent-soft: #e8f0f8; --stripe: #f3f5f7;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #15181b; --panel: #1d2125; --text: #e7e9eb; --muted: #9aa3ab; --line: #2e343a; --accent: #7fb3e6; --accent-soft: #1f2b37; --stripe: #22272c; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.top, main, footer { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.top { padding-top: 28px; }
h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0 0 8px; line-height: 1.2; }
h2 { font-size: 1.3rem; margin: 32px 0 12px; }
h3 { font-size: 1rem; margin: 0 0 10px; }
.lede { color: var(--muted); max-width: 60ch; margin: 0; }
a { color: var(--accent); }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
label { display: block; font-size: .9rem; color: var(--muted); margin-bottom: 10px; }
select, input { display: block; width: 100%; margin-top: 4px; padding: 8px 10px; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; }
.row { display: flex; gap: 8px; }
.row input { flex: 1; } .row select { width: auto; }
.answer { display: block; margin-top: 6px; padding: 10px 12px; background: var(--accent-soft); border-radius: 6px; min-height: 1.5em; }
.answer:empty { display: none; }
.answer ul { margin: 0; padding-left: 18px; }

.jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0; }
.jump a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); text-decoration: none; font-size: .9rem; }

.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 7px 14px; text-align: right; border-bottom: 1px solid var(--line); }
th[scope="row"], thead th:first-child { text-align: left; }
thead th { position: sticky; top: 0; background: var(--panel); font-size: .85rem; color: var(--muted); }
tbody tr:nth-child(even) { background: var(--stripe); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }

.notes ul { padding-left: 20px; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin-bottom: 8px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: 8px 0 0; }
footer { color: var(--muted); font-size: .9rem; padding-top: 24px; padding-bottom: 40px; }

@media print {
  .tool, .jump, .faq, footer a { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .table-wrap { border: 0; }
  .material { break-inside: avoid; }
}
