:root {
  color-scheme: light;
  --paper: #f8f5ed;
  --surface: #fffcf6;
  --ink: #192e26;
  --muted: #4f5a50;
  --green: #244d3a;
  --green-dark: #173a2a;
  --line: #dcd6c9;
  --rust: #874129;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--paper); color: var(--ink); font: 1rem/1.55 var(--sans); }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.13; }
h2 { font-size: clamp(1.7rem, 2.8vw, 2.3rem); letter-spacing: -.035em; }
h3 { font-size: 1.48rem; letter-spacing: -.023em; }
main { flex: 1; }
a { color: inherit; }
button, input, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #95652e; outline-offset: 3px; }
[tabindex='-1']:focus:not(:focus-visible) { outline: none; }
.wrap { width: min(1240px, calc(100% - 96px)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 3; top: 12px; left: 14px; transform: translateY(-160%); background: var(--green); color: white; padding: 10px 16px; }
.skip-link:focus { transform: translateY(0); }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.header-inner { min-height: 80px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: bold 1.36rem/1 var(--serif); white-space: nowrap; letter-spacing: -.02em; }
.brand-icon, .tile-icon { display: inline-grid; place-items: center; flex: 0 0 auto; }
.brand-icon { background: var(--green); color: #fff9e8; width: 38px; height: 38px; border-radius: 11px; }
[data-icon] svg { display: block; width: 22px; height: 22px; }
.brand-icon svg { width: 24px; height: 24px; }
.site-header nav { display: flex; align-items: center; gap: clamp(.2rem, 1.25vw, 1.2rem); }
.site-header nav a { padding: 8px 10px; border-radius: 7px; text-decoration: none; font-size: .94rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.site-header nav a:hover, .site-header nav a[aria-current] { background: #e9ede0; color: var(--green-dark); }
.button { min-height: 45px; display: inline-flex; align-items: center; justify-content: center; gap: .55rem; padding: .65rem 1rem; border: 1px solid transparent; border-radius: 9px; text-decoration: none; font-weight: 650; font-size: .945rem; line-height: 1.3; text-align: center; }
.button-primary { background: var(--green); color: #fffdf3; }
.button-primary:hover { background: var(--green-dark); }
.button-outline { border-color: #bdbdaf; background: transparent; color: var(--green-dark); }
.button-outline:hover { background: #e9ede0; border-color: #a9ad9e; }
.header-action { min-height: 39px; }

.hero { display: grid; grid-template-columns: 1.04fr 1fr; gap: 2.2rem; align-items: center; padding-block: 45px 39px; }
.hero-copy { padding: 12px 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--green); font-size: .86rem; font-weight: 700; letter-spacing: .035em; margin-bottom: 14px; }
.eyebrow [data-icon] { display: inline-block; }
.eyebrow svg { width: 18px; height: 18px; }
.hero h1 { font-size: clamp(2.85rem, 4.65vw, 4.85rem); line-height: 1.03; letter-spacing: -.068em; }
.hero h1 em { font-weight: inherit; color: var(--rust); }
.hero-copy > p { max-width: 45ch; margin-top: 19px; font-size: clamp(1rem, 1.5vw, 1.16rem); color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 25px; }
.hero-photo { min-width: 0; overflow: hidden; border-radius: 21px; aspect-ratio: 1.5; background: #543622; box-shadow: 0 12px 25px #39251b13; }
.hero-photo img { width: 100%; height: 100%; display: block; object-fit: cover; }
.section-block { margin-top: 6px; }
.section-heading { margin-bottom: 17px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature-card, .panel, .choice { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.feature-card { min-width: 0; min-height: 190px; padding: 21px; display: flex; flex-direction: column; align-items: flex-start; text-decoration: none; transition: border-color .15s, background-color .15s; }
.feature-card:hover { border-color: #8e9e89; background: #fffefb; }
.feature-card h3 { margin-top: 13px; }
.feature-card p { margin-top: 7px; color: var(--muted); }
.tile-icon { width: 43px; height: 43px; border-radius: 10px; }
.tile-sage { background: #e5ecde; color: #31513e; }
.tile-ochre { background: #f3e9cd; color: #705012; }
.tile-rose { background: #f5e6dc; color: var(--rust); }
.card-action { display: inline-block; margin-top: auto; padding-top: 14px; color: var(--green); font-size: .9rem; font-weight: 700; }
.safety-strip { display: flex; align-items: center; gap: 15px; padding: 16px 20px; margin-block: 24px 0; background: #f0eadf; border: 1px solid #e7ddcf; border-radius: 13px; }
.safety-strip p { font-size: .92rem; color: var(--muted); }
.safety-strip .button { margin-left: auto; }
.site-footer { margin-top: 48px; padding: 18px 0; border-top: 1px solid var(--line); }
.site-footer .brand { font-size: 1.15rem; }
.site-footer .brand-icon { width: 30px; height: 30px; border-radius: 8px; }
.site-footer .brand-icon svg { width: 19px; height: 19px; }

.page-heading { padding: 42px 0 24px; }
.page-heading h1, .wiki-article h1 { font-size: clamp(2.4rem, 5vw, 4.15rem); letter-spacing: -.06em; }
.page-heading p { margin-top: 10px; color: var(--muted); font-size: 1.1rem; max-width: 67ch; }
.work-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.panel { padding: clamp(15px, 2.3vw, 28px); min-width: 0; }
.panel > h2 { margin-bottom: 15px; }
.result-panel { background: #edf0e5; border-color: #d5dcce; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 15px; row-gap: 13px; }
.form-grid label { display: block; font-weight: 650; font-size: .92rem; }
.form-grid input, .form-grid select, .search input { width: 100%; min-width: 0; border: 1px solid #bfbfb1; border-radius: 8px; padding: .6rem .65rem; line-height: 1.4; color: var(--ink); background: #fffdf8; }
.form-grid input, .form-grid select { margin-top: 4px; font-size: 1rem; font-weight: 400; min-height: 44px; }
.form-grid select { appearance: none; padding-right: 28px; background-image: linear-gradient(45deg, transparent 50%, var(--green) 50%), linear-gradient(135deg, var(--green) 50%, transparent 50%); background-position: right 13px center, right 8px center; background-size: 5px 5px; background-repeat: no-repeat; }
.full { grid-column: 1 / -1; }
.unit, .muted, .small { color: var(--muted); }
.unit { font-weight: 400; white-space: nowrap; }
.small { font-size: .89rem; }
.panel > p { margin-block: 10px; }
.panel > .button { margin-top: 10px; }
.form-grid + .text-link, details + .text-link { display: inline-block; margin-top: 14px; }
.text-link, .wiki-article a { color: var(--green-dark); text-decoration: underline; text-underline-offset: .19em; text-decoration-thickness: 1px; }
.text-link:hover, .wiki-article a:hover { color: var(--rust); }
.segmented { display: inline-flex; flex-wrap: wrap; gap: 5px; padding: 4px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 10px; background: #ede9df; }
.segmented button { border: 0; border-radius: 7px; background: transparent; padding: 7px 12px; min-height: 38px; color: var(--green-dark); }
.segmented button[aria-pressed='true'] { background: var(--surface); box-shadow: 0 1px 3px #302c2619; font-weight: 650; }
details { margin-top: 15px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; }
summary { cursor: pointer; font-size: .93rem; font-weight: 650; }
details .form-grid { margin-top: 10px; }
.total { display: block; font: 500 clamp(2rem, 5vw, 3.35rem)/1.1 var(--serif); letter-spacing: -.05em; margin-bottom: 4px; }
.values { margin: 13px 0 0; }
.values div { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; border-top: 1px solid #d6d8cd; padding: 8px 0; }
.values dd { margin: 0; font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; }
.error { border-radius: 8px; padding: 10px 12px; color: #782f23; background: #fae7df; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 17px; }
.choice { text-align: left; color: var(--ink); padding: 13px 17px; }
.choice[aria-pressed='true'] { background: #e8edde; border-color: #8c9d86; }
.choice:hover { border-color: var(--green); }
.choice strong, .choice small { display: block; }
.choice small { font-size: .89rem; color: var(--muted); margin-top: 3px; }
.steps { margin: 0; padding-left: 1.45rem; }
.steps li { padding: 0 0 12px 5px; }
.steps li + li { margin-top: 10px; }
.steps li:last-child { padding-bottom: 0; }
.steps li::marker { color: var(--green); font-weight: 700; }
.steps p { margin-top: 4px; color: var(--muted); }
.timeline { padding-left: 0; list-style: none; }
.timeline li { border-top: 1px solid #d3dbce; padding: 8px 0; }
.timeline li + li { margin-top: 0; }
.timeline time { display: block; color: var(--green-dark); font-size: .91rem; font-variant-numeric: tabular-nums; }
.timeline p { font-size: .93rem; }

.search { display: flex; align-items: center; gap: .6rem; max-width: 610px; border: 1px solid #bfbfb1; background: var(--surface); border-radius: 10px; padding-left: .7rem; }
.search input { border: 0; background: transparent; }
.search:focus-within { outline: 3px solid #95652e; outline-offset: 3px; }
.search input:focus { outline: none; }
.search-status { margin-block: 10px; min-height: 1.5em; color: var(--muted); }
.wiki-article { margin-top: 32px; max-width: 820px; }
.wiki-article > .text-link { display: inline-block; margin-bottom: 16px; }
.wiki-article h2 { margin-block: 25px 9px; }
.wiki-article p { margin-block: 12px; }
.wiki-article :is(ul, ol) { padding-left: 1.5rem; margin-block: 10px; }
.wiki-article li { margin-block: 7px; }

@media (max-width: 1050px) {
  .wrap { width: calc(100% - 58px); }
  .wide-only { display: none; }
  .header-action { display: none; }
}
@media (max-width: 760px) {
  .wrap { width: calc(100% - 36px); }
  .header-inner { flex-direction: column; align-items: start; gap: 7px; padding-block: 11px 8px; }
  .site-header nav { max-width: 100%; flex-wrap: wrap; }
  .site-header nav a { padding: 6px 8px; }
  .hero { grid-template-columns: 1fr; gap: 16px; padding-block: 22px 26px; }
  .hero-copy { padding-block: 5px; }
  .hero h1 { max-width: 13ch; font-size: clamp(2.5rem, 8vw, 4.5rem); }
  .hero-photo { max-height: 340px; }
  .work-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .feature-card { padding: 14px; }
  .page-heading { padding-top: 24px; }
}
@media (max-width: 480px) {
  .brand-icon { width: 33px; height: 33px; }
  .site-header nav { gap: 0; }
  .site-header nav a { font-size: .9rem; padding-inline: 7px; }
  .feature-grid, .choice-grid { grid-template-columns: 1fr; }
  .feature-card { min-height: 0; }
  .safety-strip { flex-wrap: wrap; gap: 9px; }
  .safety-strip > div { flex: 1 1 175px; }
  .safety-strip .button { margin-left: 0; }
  .form-grid { column-gap: 9px; }
}
@media (max-width: 360px) {
  .form-grid { grid-template-columns: 1fr; }
}
