:root {
  --bg: #f4f1ea;
  --paper: #fffdf8;
  --ink: #1f2420;
  --muted: #5d655f;
  --line: #d9d3c4;
  --copper: #b4551f;
  --copper-dark: #8a3f14;
  --steel: #2f4a45;
  --tint: #efe7d6;
}

* { box-sizing: border-box; }

html { font-size: 17px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}

a { color: var(--copper-dark); }
a:hover { color: var(--copper); }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

header.site {
  background: var(--steel);
  color: #f3efe4;
  border-bottom: 4px solid var(--copper);
}
header.site .wrap {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 8px 24px; padding-top: 14px; padding-bottom: 14px;
}
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand svg { width: 38px; height: 38px; flex: none; }
.brand b { font-size: 1.15rem; letter-spacing: .02em; }
.brand span { display: block; font-size: .78rem; opacity: .75; }

nav.main { display: flex; flex-wrap: wrap; gap: 4px 6px; }
nav.main a {
  color: #f3efe4; text-decoration: none; font-size: .92rem;
  padding: 6px 11px; border-radius: 4px;
}
nav.main a:hover { background: rgba(255,255,255,.12); }
nav.main a[aria-current="page"] { background: var(--copper); }

.hero { background: var(--tint); border-bottom: 1px solid var(--line); }
.hero .wrap { padding-top: 44px; padding-bottom: 40px; }
.hero h1 { font-size: 2.1rem; line-height: 1.2; margin: 0 0 14px; max-width: 22ch; }
.hero p { max-width: 62ch; margin: 0; color: var(--muted); font-size: 1.05rem; }

main { padding: 34px 0 56px; }
main h1 { font-size: 1.8rem; line-height: 1.25; margin: 0 0 8px; }
main h2 { font-size: 1.3rem; margin: 36px 0 10px; padding-top: 6px; border-top: 2px solid var(--line); }
main h3 { font-size: 1.05rem; margin: 22px 0 6px; }
.lead { color: var(--muted); max-width: 70ch; margin: 0 0 8px; }
p, ul, ol { max-width: 74ch; }
li { margin: 4px 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin: 26px 0; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--copper);
  border-radius: 6px; padding: 16px 18px; text-decoration: none; color: var(--ink);
}
.card:hover { border-left-color: var(--steel); color: var(--ink); }
.card b { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.card span { color: var(--muted); font-size: .93rem; }

.note {
  background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--steel);
  border-radius: 6px; padding: 12px 16px; margin: 18px 0; max-width: 74ch;
}
.warn { border-left-color: #b3261e; }

.table-scroll { overflow-x: auto; margin: 14px 0; }
table { border-collapse: collapse; width: 100%; background: var(--paper); font-size: .94rem; }
th, td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; vertical-align: top; }
th { background: var(--tint); font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

ol.steps { counter-reset: s; list-style: none; padding: 0; }
ol.steps > li {
  counter-increment: s; position: relative; background: var(--paper);
  border: 1px solid var(--line); border-radius: 6px; padding: 14px 16px 14px 62px; margin: 12px 0;
}
ol.steps > li::before {
  content: counter(s); position: absolute; left: 14px; top: 14px;
  width: 34px; height: 34px; border-radius: 50%; background: var(--steel); color: #fff;
  display: grid; place-items: center; font-weight: 700;
}
ol.steps b { display: block; margin-bottom: 2px; }

.calc { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 18px; margin-top: 20px; }
.calc form {
  background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 18px;
}
.calc h2 { border: 0; margin: 0 0 10px; padding: 0; font-size: 1.1rem; }
.calc label { display: block; font-size: .9rem; color: var(--muted); margin: 10px 0 3px; }
.calc input, .calc select {
  width: 100%; padding: 8px 10px; font: inherit; border: 1px solid #b9b2a0; border-radius: 4px; background: #fff;
}
.calc input:focus, .calc select:focus { outline: 2px solid var(--copper); outline-offset: 1px; }
.calc output {
  display: block; margin-top: 14px; padding: 10px 12px; background: var(--tint);
  border-radius: 4px; min-height: 2.6em; font-variant-numeric: tabular-nums;
}

footer.site { border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
footer.site .wrap { padding-top: 18px; padding-bottom: 28px; }

@media (max-width: 600px) {
  html { font-size: 16px; }
  .hero h1 { font-size: 1.6rem; }
}
