:root {
  --bg: #fbfbf9;
  --card: #ffffff;
  --ink: #14181f;
  --muted: #5b6472;
  --line: #e3e6ea;
  --accent: #0f5f45;
  --accent-ink: #ffffff;
  --gain: #0f5f45;
  --loss: #a3321f;
  --wrap: 960px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.num, table, .stat b { font-variant-numeric: tabular-nums; }
a { color: var(--accent); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 16px; }
h2 { font-size: 26px; line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 12px; }
h3 { font-size: 18px; margin: 0 0 6px; }
p { margin: 0 0 14px; }
.lede { font-size: 20px; color: var(--muted); max-width: 640px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* header / footer */
header.site { border-bottom: 1px solid var(--line); background: var(--card); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.brand { font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
nav { display: flex; align-items: center; gap: 18px; font-size: 15px; }
nav a { color: var(--ink); text-decoration: none; }
nav a:hover { text-decoration: underline; }
@media (max-width: 600px) { nav .hide-sm { display: none; } }
footer.site { border-top: 1px solid var(--line); margin-top: 80px; padding: 28px 0; font-size: 14px; color: var(--muted); }

section { padding: 56px 0; }
section + section { border-top: 1px solid var(--line); }

.btn {
  display: inline-block; background: var(--accent); color: var(--accent-ink);
  padding: 12px 20px; border-radius: 6px; text-decoration: none; font-weight: 600;
  border: 0; font-size: 16px; cursor: pointer;
}
.btn:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn.sm { padding: 7px 14px; font-size: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 22px; }
.step-n { font-weight: 700; color: var(--accent); font-size: 14px; letter-spacing: 0.04em; }
.figure { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; margin: 4px 0 6px; }

/* forms */
label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
input, select {
  width: 100%; font: inherit; color: var(--ink); background: var(--card);
  border: 1px solid #c9ced5; border-radius: 6px; padding: 10px 12px;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.field { margin-bottom: 18px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .row { grid-template-columns: 1fr; } }
fieldset { border: 0; padding: 0; margin: 0 0 18px; }
legend { font-weight: 600; font-size: 15px; margin-bottom: 6px; padding: 0; }
.radio { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; margin-right: 18px; }
.radio input { width: auto; }

/* tables */
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: right; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th:first-child, td:first-child { text-align: left; }
th { font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
tfoot td { font-weight: 700; border-bottom: 0; }
.table-scroll { overflow-x: auto; }
.gain { color: var(--gain); }
.loss { color: var(--loss); }

/* blog */
.post { max-width: 720px; }
.post h2 { margin-top: 40px; }
.post h3 { margin-top: 24px; }
.post ul, .post ol { padding-left: 22px; }
.post li { margin-bottom: 8px; }
.post table { margin: 16px 0; }
.crumb { margin-bottom: 8px; }
.answer { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 6px; padding: 16px 20px; margin: 24px 0 32px; }
.answer span { display: block; font-size: 13px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.answer p { margin: 0; font-size: 18px; }
.formula { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 14px 18px; margin: 16px 0; font-variant-numeric: tabular-nums; overflow-x: auto; }
.formula div { white-space: nowrap; }
.cta { margin-top: 40px; }
.cta p { margin: 0; }
.post-list { list-style: none; padding: 0 !important; margin-top: 32px; }
.post-list li { border-top: 1px solid var(--line); padding: 20px 0; margin: 0; }
.post-list a { text-decoration: none; }
.post-list h2 { font-size: 21px; margin: 0 0 6px; color: var(--ink); }
.post-list a:hover h2 { color: var(--accent); }
.post-list p { margin: 0; }
