:root {
  --ink: #1d2220; --sub: #5b6460; --line: #e2e0d8; --bg: #f6f5f1;
  --surface: #ffffff; --green: #4f7c5f; --green-deep: #3c6249;
  --amber: #ecdcbf; --amber-wash: #fbf5e9; --red: #a03a2a; --red-wash: #fbeeeb;
  --radius: 12px; --radius-sm: 8px; --fs-sm: 14px; --fs-xs: 12px;
  --shadow: 0 1px 2px rgba(29,34,32,.05), 0 4px 14px rgba(29,34,32,.04);
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px; line-height: 1.65;
}
.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 20px; }
.wrap.wide { max-width: 1040px; }
header.top { border-bottom: 1px solid var(--line); background: var(--surface); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; max-width: 1040px; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 700; text-decoration: none; color: var(--ink); letter-spacing: -.01em; }
.logo .mark { display: block; flex: none; }
.logo:hover .mark rect:first-child { fill: var(--green-deep); }
header.top nav { display: flex; gap: 18px; font-size: 14px; }
header.top nav a { color: var(--sub); text-decoration: none; }
header.top nav a:hover, header.top nav a[aria-current] { color: var(--ink); }

h1 { font-size: clamp(27px, 3.6vw, 36px); line-height: 1.2; margin: 40px 0 10px; letter-spacing: -.015em; }
h2 { font-size: 21px; margin: 34px 0 12px; }
h3 { font-size: 17px; margin: 24px 0 8px; }
p { margin: 0 0 16px; }
.lead { color: var(--sub); font-size: 18px; margin: 0 0 18px; }
.meta { color: var(--sub); font-size: 13px; margin: 0 0 26px; }
a { color: var(--green-deep); }
ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin: 0 0 7px; }
strong { font-weight: 650; }
code { background: #efeee8; padding: 1px 5px; border-radius: 4px; font-size: .92em; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.formula { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--green); border-radius: var(--radius-sm); padding: 14px 18px; margin: 0 0 18px; font-size: 16px; }
.formula code { background: none; font-size: 15px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 0 0 18px; }
th, td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
th:first-child, td:first-child { text-align: left; }
thead th { color: var(--sub); font-weight: 600; }
tfoot td { font-weight: 650; border-bottom: none; }

.cta { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin: 30px 0; box-shadow: var(--shadow); }
.cta p { margin: 0 0 14px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--green); color: #fff; font-size: 15px; font-weight: 600; text-decoration: none;
}
.btn:hover { background: var(--green-deep); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.note { color: var(--sub); font-size: var(--fs-sm); }
.callout { border: 1px solid var(--amber); background: var(--amber-wash); border-radius: var(--radius-sm); padding: 14px 16px; font-size: 15px; color: #5a4a2e; margin: 0 0 18px; }
.callout.danger { border-color: #e6c3bb; background: var(--red-wash); color: #6d2a20; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill.ok { background: #eaf1ec; color: var(--green-deep); }
.pill.warn { background: var(--amber-wash); color: #7a5a20; }
.pill.bad { background: var(--red-wash); color: var(--red); }

footer { border-top: 1px solid var(--line); margin-top: 48px; padding: 26px 0 40px; color: var(--sub); font-size: 14px; }
footer .wrap { max-width: 1040px; display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: space-between; }
footer a { color: var(--sub); }

.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-sm); color: var(--sub); }
label.field > span { font-weight: 600; color: var(--ink); }
input, select { min-height: 42px; padding: 0 11px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); color: var(--ink); font-size: var(--fs-sm); width: 100%; }
input:focus, select:focus { outline: 2px solid var(--green); outline-offset: 1px; }
.macro-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.macro { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.macro-k { font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--sub); }
.macro-v { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; margin: 4px 0 0; }
.macro-u { font-size: 12px; color: var(--sub); }
.heatmap td { text-align: center; }
[hidden] { display: none !important; }

.hero { padding: 8px 0 0; }
.hero h1 { margin-top: 36px; max-width: 20ch; }
.hero .lead { max-width: 56ch; }
.hero-points { margin: 22px 0 0; padding: 0; list-style: none; max-width: 62ch; }
.hero-points li { position: relative; padding-left: 22px; margin: 0 0 10px; font-size: 15px; color: var(--sub); }
.hero-points li::before {
  content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 8px;
  border-radius: 2px; background: var(--green); opacity: .75;
}
.hero-points strong { color: var(--ink); }
