:root {
  --bg: #fbfaf7; --fg: #1d2129; --muted: #5b6270; --line: #e4e1da; --card: #ffffff;
  --accent: #0f6e5a; --accent-soft: #e3f2ed; --hl: #f4f1e8;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #14171c; --fg: #e8eaee; --muted: #a2a9b6; --line: #2b313a; --card: #1b1f26; --accent: #4cc3a2; --accent-soft: #173a31; --hl: #20252d; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
a { color: var(--accent); }
.top { border-bottom: 1px solid var(--line); background: var(--card); }
.top .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between; padding-top: 12px; padding-bottom: 12px; }
.brand { font-weight: 700; font-size: 18px; color: var(--fg); text-decoration: none; letter-spacing: -0.01em; }
.brand span { color: var(--accent); }
nav { display: flex; gap: 16px; font-size: 14px; }
nav a { color: var(--muted); text-decoration: none; }
nav a:hover { color: var(--accent); }
h1 { font-size: clamp(26px, 5vw, 34px); line-height: 1.2; margin: 28px 0 12px; letter-spacing: -0.02em; }
h2 { font-size: 20px; margin: 32px 0 8px; }
.answer { font-size: 18px; background: var(--accent-soft); border-radius: 10px; padding: 14px 16px; }
.lede { color: var(--muted); font-size: 17px; }
.calc { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 20px 0; }
.calc .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.calc label { display: flex; flex-direction: column; font-size: 13px; color: var(--muted); gap: 4px; }
.calc input { font: inherit; font-size: 18px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); width: 100%; }
.calc input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.out { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-top: 14px; }
.out div { background: var(--hl); border-radius: 8px; padding: 8px 10px; }
.out small { display: block; color: var(--muted); font-size: 12px; }
.out b { font-size: 18px; font-variant-numeric: tabular-nums; }
.tabs { display: flex; gap: 8px; margin-top: 16px; }
.tabs button { font: inherit; font-size: 14px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--fg); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.t { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 15px; display: block; overflow-x: auto; }
.t thead, .t tbody { display: table; width: 100%; border-collapse: collapse; }
.t th, .t td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.t th { color: var(--muted); font-weight: 600; font-size: 13px; }
.t td:not(:first-child), .t th:not(:first-child) { text-align: right; }
.t tr.hl td { background: var(--hl); font-weight: 600; }
details { border-bottom: 1px solid var(--line); padding: 10px 0; }
summary { cursor: pointer; font-weight: 600; }
details p { margin: 8px 0 0; color: var(--muted); }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 24px; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 4px 0; font-variant-numeric: tabular-nums; }
footer { margin-top: 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; padding: 16px 0 32px; }
