:root {
  color-scheme: light;
  --paper: #f6f0e5;
  --paper-deep: #eee3d1;
  --ink: #292b27;
  --muted: #68695f;
  --green: #315d4c;
  --green-dark: #234638;
  --rust: #a34e32;
  --line: #cfc3af;
  --white: #fffdf8;
  --shadow: 0 18px 55px rgba(65, 54, 38, .12);
}
* { box-sizing: border-box; }
html { font-size: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.55;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: .28;
  background-image: repeating-linear-gradient(0deg, transparent 0 31px, rgba(49, 93, 76, .08) 32px);
  pointer-events: none;
}
a { color: var(--green-dark); text-underline-offset: .18em; }
a:hover { color: var(--rust); }
button, input { font: inherit; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 5; background: var(--white); padding: .6rem .8rem; }
.shell { width: min(100% - 2rem, 68rem); margin-inline: auto; }
.site-header { display: flex; align-items: end; justify-content: space-between; gap: 2rem; padding: 2.1rem 0 1.25rem; border-bottom: 1px solid var(--line); }
.wordmark { color: var(--ink); text-decoration: none; }
.wordmark strong { display: block; font-size: clamp(1.4rem, 3vw, 2.15rem); font-weight: 500; letter-spacing: -.035em; }
.wordmark span { display: block; color: var(--muted); font: .78rem/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; margin-top: .2rem; }
.site-nav { display: flex; gap: 1rem; font: 600 .85rem/1.2 ui-sans-serif, system-ui, sans-serif; }
.site-nav a { text-decoration: none; }
.hero { display: grid; grid-template-columns: minmax(0, .82fr) minmax(30rem, 1.18fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; padding: clamp(3rem, 7vw, 6rem) 0 4rem; }
.intro { padding-top: 1.2rem; }
.eyebrow { margin: 0 0 1rem; color: var(--rust); font: 700 .72rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3 { line-height: 1.08; font-weight: 500; letter-spacing: -.035em; }
h1 { margin: 0; font-size: clamp(2.8rem, 7vw, 5.8rem); max-width: 8ch; }
.lede { max-width: 30rem; margin: 1.6rem 0; color: var(--muted); font-size: 1.15rem; }
.hand-note { display: inline-block; margin: 1.2rem 0 0 1rem; color: var(--green); font: italic 1rem/1.4 "Bradley Hand", "Segoe Print", cursive; transform: rotate(-1.5deg); }
.calculator { background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow); padding: clamp(1.3rem, 4vw, 2.4rem); transform: rotate(.2deg); }
.calculator h2 { margin: 0 0 .5rem; font-size: 1.7rem; }
.privacy-note { margin: 0 0 1.8rem; color: var(--muted); font: .84rem/1.5 ui-sans-serif, system-ui, sans-serif; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.15rem; }
.field { display: grid; gap: .42rem; }
.field-wide { grid-column: 1 / -1; }
label, legend { font: 700 .82rem/1.3 ui-sans-serif, system-ui, sans-serif; }
.hint { color: var(--muted); font: .76rem/1.4 ui-sans-serif, system-ui, sans-serif; }
input[type="date"], input[type="number"] { width: 100%; min-height: 3rem; border: 1px solid #a99e8c; border-radius: 0; background: #fff; color: var(--ink); padding: .65rem .75rem; }
textarea { width: 100%; resize: vertical; border: 1px solid #a99e8c; border-radius: 0; background: #fff; color: var(--ink); padding: .65rem .75rem; }
.check-row { display: flex; gap: .7rem; align-items: flex-start; }
.check-row input { width: 1.1rem; height: 1.1rem; margin-top: .14rem; accent-color: var(--green); }
:focus-visible { outline: 3px solid #d5904d; outline-offset: 3px; }
.actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.4rem; }
.button { border: 1px solid var(--green-dark); border-radius: 0; background: var(--green); color: white; cursor: pointer; padding: .72rem 1rem; font: 700 .82rem/1.2 ui-sans-serif, system-ui, sans-serif; }
.button:hover { background: var(--green-dark); }
.button-secondary { background: transparent; color: var(--green-dark); }
.button-secondary:hover { color: white; }
.error { margin: 1rem 0 0; color: #8a241c; font: 700 .86rem/1.4 ui-sans-serif, system-ui, sans-serif; }
.results { margin-top: 2rem; border-top: 2px solid var(--ink); padding-top: 1.2rem; outline: none; }
.results h3 { margin: 0 0 1rem; font-size: 1.2rem; }
.result-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.result-grid-four { grid-template-columns: repeat(4, 1fr); }
.result { border-left: 1px solid var(--line); padding-left: .8rem; }
.result:first-child { border-left: 0; padding-left: 0; }
.result dt { color: var(--muted); font: 700 .68rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; text-transform: uppercase; }
.result dd { margin: .35rem 0 0; font-size: 1.05rem; line-height: 1.3; }
.quantity-note { margin: .75rem 0 0; color: var(--muted); font-size: .8rem; line-height: 1.45; }
.status { margin: 1.2rem 0; padding: .75rem; background: var(--paper); font-weight: 700; }
.status[data-tone="attention"] { border-left: 4px solid var(--rust); }
.fine-print { margin: 1rem 0 0; color: var(--muted); font: .75rem/1.5 ui-sans-serif, system-ui, sans-serif; }
.feedback { margin-top: 1.5rem; padding-top: 1.3rem; border-top: 1px solid var(--line); }
.feedback h3 { margin-bottom: .8rem; }
.feedback-choices { display: flex; flex-wrap: wrap; gap: .65rem; }
.feedback-choice { border: 1px solid var(--green); background: transparent; color: var(--green-dark); cursor: pointer; padding: .55rem .8rem; font: 700 .78rem/1.2 ui-sans-serif, system-ui, sans-serif; }
.feedback-choice:hover, .feedback-choice[aria-pressed="true"] { background: var(--green); color: white; }
.feedback form { display: grid; gap: .65rem; margin-top: 1rem; }
.feedback form[hidden] { display: none; }
.feedback-trap { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; }
.feedback-status { margin: .8rem 0 0; color: var(--green-dark); font-weight: 700; }
.content-page { width: min(100% - 2rem, 48rem); margin: 4rem auto 6rem; }
.content-page h1 { max-width: none; font-size: clamp(2.5rem, 6vw, 4rem); }
.content-page h2 { margin-top: 2.5rem; font-size: 1.5rem; }
.content-page li + li { margin-top: .55rem; }
.callout { margin: 2rem 0; border-left: 4px solid var(--rust); padding: .5rem 0 .5rem 1.2rem; }
.site-footer { display: flex; justify-content: space-between; gap: 2rem; padding: 1.6rem 0 2.5rem; border-top: 1px solid var(--line); color: var(--muted); font: .76rem/1.5 ui-sans-serif, system-ui, sans-serif; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .85rem; }
@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; }
  .intro { padding-top: 0; }
  h1 { max-width: 11ch; }
}
@media (max-width: 560px) {
  .site-header { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .form-grid, .result-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .result { border-left: 0; border-top: 1px solid var(--line); padding: .8rem 0 0; }
  .result:first-child { border-top: 0; padding-top: 0; }
  .site-footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }
@media print { .site-nav, .actions, .site-footer { display: none; } body::before { display: none; } .calculator { box-shadow: none; } }
