:root {
  color-scheme: light;
  --paper: #f6f7ed;
  --white: #fffef7;
  --wash: #e6eddd;
  --ink: #1a3025;
  --muted: #485c50;
  --leaf: #285a43;
  --deep: #193c2b;
  --rust: #874626;
  --line: #cbd4c4;
  --serif: "Iowan Old Style", Georgia, serif;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.6; }
h1, h2, h3, p, dl { margin: 0; }
h1, h2, h3 { line-height: 1.09; }
h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -.035em; }
h1 { font-size: clamp(2.5rem, 5vw, 4.85rem); text-wrap: balance; }
h2 { font-size: clamp(2rem, 3.7vw, 3.3rem); }
h3 { font-size: 1.28rem; }
p { max-width: 65ch; }
a { color: var(--deep); text-underline-offset: .2em; }
a:hover { color: var(--rust); }
:focus-visible { outline: 3px solid #a35527; outline-offset: 4px; }
[id] { scroll-margin-block-start: 1.25rem; }

.wrap { width: min(100% - 3rem, 73rem); margin-inline: auto; }
.site-header, .site-footer { border-bottom: 1px solid var(--line); }
.site-footer { border-top: 1px solid var(--line); border-bottom: 0; }
.header-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .1rem 1.2rem; padding-block: .85rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--ink); font-family: var(--serif); font-size: 1.43rem; font-weight: 700; text-decoration: none; }
nav { display: flex; flex-wrap: wrap; gap: .15rem 1.3rem; }
nav a { display: inline-flex; min-height: 2.65rem; align-items: center; font-size: .91rem; font-weight: 650; text-decoration: none; }
nav a:hover { text-decoration: underline; }
.skip { position: absolute; top: -5rem; left: .6rem; z-index: 2; background: var(--white); padding: .5rem; }
.skip:focus { top: .6rem; }

.hero { display: grid; grid-template-columns: 1.02fr 1fr; gap: clamp(1.75rem, 5vw, 4.5rem); align-items: center; padding-block: clamp(2.65rem, 6.5vw, 5rem); }
.hero h1 { margin: .65rem 0 1rem; }
.hero-photo { display: block; width: 100%; height: auto; aspect-ratio: 1.17; object-fit: cover; object-position: 52% center; background: var(--wash); border-radius: .85rem; }
.eyebrow { color: var(--rust); font-size: .86rem; font-weight: 700; letter-spacing: .035em; }
.lead { font-size: 1.095rem; color: var(--muted); }
a.action, button { display: inline-flex; justify-content: center; align-items: center; min-height: 3rem; border: 1px solid transparent; border-radius: .45rem; padding: .62rem .98rem; background: var(--leaf); color: white; font: inherit; font-weight: 680; text-decoration: none; cursor: pointer; }
a.action { margin-top: 1.25rem; }
a.action:hover, button:hover { background: var(--deep); color: white; }
button.secondary { border-color: #789582; background: transparent; color: var(--deep); }
button.secondary:hover { background: var(--wash); }
button:disabled { opacity: .55; cursor: default; }

.calculator-band { background: var(--wash); border-block: 1px solid var(--line); }
.calculator { display: grid; grid-template-columns: minmax(0, .83fr) minmax(0, 1.17fr); align-items: start; gap: 1.25rem clamp(1.6rem, 4.5vw, 4.45rem); padding-block: clamp(2.25rem, 6vw, 4.75rem); }
.calc-intro p { margin-top: .85rem; color: var(--muted); }
form, .result { min-width: 0; border: 1px solid #a9bba4; border-radius: .7rem; padding: clamp(1rem, 2.8vw, 1.7rem); background: var(--white); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem .75rem; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; margin-bottom: .25rem; font-size: .96rem; font-weight: 650; }
input { display: block; width: 100%; min-width: 0; min-height: 2.9rem; padding: .5rem .7rem; border: 1px solid #879c88; border-radius: .35rem; background: #fff; color: var(--ink); font: inherit; }
input::placeholder { color: #52685a; }
.adjustments { margin-top: .85rem; }
summary { color: var(--deep); font-weight: 650; cursor: pointer; padding-block: .35rem; }
.adjustments .form-grid { padding-top: .8rem; }
.hint { margin-top: .34rem; color: var(--muted); font-size: .91rem; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.error:not(:empty) { color: #942c1e; font-weight: 650; margin-top: .65rem; }
.result { grid-column: 2; }
.result h2 { margin: .3rem 0 .9rem; }
.result h2 span { color: var(--leaf); }
.breakdown { font-variant-numeric: tabular-nums; margin-bottom: .8rem; }
.breakdown > div { display: flex; justify-content: space-between; gap: 1rem; padding-block: .35rem; border-top: 1px solid var(--line); }
.breakdown dd { margin: 0; font-weight: 700; white-space: nowrap; }
.result > a { display: inline-block; margin-top: .7rem; }

.systems, .guides, .article { padding-block: clamp(2.35rem, 5vw, 4.5rem); }
.systems > p { margin-top: .55rem; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.4rem; }
.cards article { display: grid; align-content: start; gap: .55rem; padding: clamp(1rem, 2.3vw, 1.5rem); border: 1px solid var(--line); border-radius: .65rem; background: var(--white); }
.cards article p:not(.eyebrow) { color: var(--muted); }
.cards article > a { justify-self: start; font-weight: 650; }
.amazon-products { border-top: 1px solid var(--line); margin-top: 1.5rem; padding-top: 1.25rem; }
.amazon-products h2 { font-size: clamp(1.65rem, 2.8vw, 2.35rem); }
.amazon-products ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem 1.4rem; padding: 0; list-style: none; }
.amazon-products li > a { font-weight: 650; }
.amazon-products li p { font-size: .91rem; color: var(--muted); }
.guide-band { background: var(--wash); border-top: 1px solid var(--line); }
.article { max-width: 48rem; }
.article h1 { font-size: clamp(2.35rem, 5vw, 4rem); margin-top: .4rem; text-wrap: inherit; }
.article h2 { font-size: clamp(1.65rem, 3.5vw, 2.5rem); margin-top: 1.75rem; }
.article > h2:first-child { margin-top: 0; }
.article p, .article ol, .article ul { margin-top: .7rem; }
.article li + li { margin-top: .45rem; }
.article address { font-style: normal; margin-top: .75rem; }
.article .example { margin-top: 1rem; padding: 1rem; background: var(--wash); border-radius: .45rem; }
.article .example p:first-child { margin: 0; }

@media (max-width: 740px) {
  .wrap { width: calc(100% - 2rem); }
  .hero, .calculator { grid-template-columns: 1fr; }
  .hero h1 { max-width: 20ch; }
  .hero-photo { max-height: 21rem; }
  .result { grid-column: 1; }
}
@media (max-width: 480px) {
  .header-inner { padding-block: .55rem; }
  .site-header nav { width: 100%; }
  .hero { padding-top: 1.9rem; gap: 1.25rem; }
  .hero-photo { height: 12rem; }
  .hero h1 { font-size: clamp(2.14rem, 8.5vw, 3.25rem); }
  .cards, .amazon-products ul { grid-template-columns: 1fr; }
  .actions button, .hero .action { width: 100%; }
}
