:root {
  color-scheme: light;
  --ink: #182a2d;
  --muted: #53666a;
  --paper: #f6f4ed;
  --white: #fffefa;
  --line: #d8ded8;
  --green: #246b56;
  --green-dark: #174b3d;
  --orange: #dc7948;
  --blue: #c7dce0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); line-height: 1.65; }
a { color: var(--green-dark); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: #963e21; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #dc7948; outline-offset: 3px; }
.skip-link { position: absolute; top: .5rem; left: .5rem; z-index: 10; padding: .6rem 1rem; transform: translateY(-160%); background: var(--white); border: 2px solid var(--green); border-radius: .25rem; }
.skip-link:focus { transform: translateY(0); }
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.header-inner, .footer-main, .footer-bottom { width: min(1160px, calc(100% - 3rem)); margin: 0 auto; }
.header-inner { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--ink); text-decoration: none; font-size: 1.13rem; font-weight: 760; letter-spacing: -.04em; white-space: nowrap; }
.brand-light { color: var(--green); font-weight: 500; }
.brand-mark { width: 28px; height: 28px; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 3px; transform: rotate(-5deg); }
.brand-mark span { border-radius: 2px; background: var(--green); }
.brand-mark span:nth-child(2) { background: var(--orange); }
.brand-mark span:nth-child(3) { background: var(--blue); }
.brand-mark span:nth-child(4) { background: #d7ad65; }
.primary-nav { display: flex; align-items: center; gap: clamp(.8rem, 2.4vw, 2rem); }
.primary-nav a { color: var(--ink); font-size: .88rem; font-weight: 650; text-decoration: none; }
.primary-nav a[aria-current="page"] { color: var(--green); text-decoration: underline; text-underline-offset: .35rem; }
.page-hero { position: relative; overflow: hidden; min-height: 300px; padding: clamp(3rem, 6vw, 5.5rem) max(1.5rem, calc((100vw - 1160px) / 2)); display: flex; align-items: center; background: #e8eee8; }
.page-hero::before { content: ""; position: absolute; width: 43vw; height: 43vw; min-width: 360px; min-height: 360px; right: -9vw; top: -15vw; border: 1px solid #cbd8ce; border-radius: 50%; box-shadow: 0 0 0 34px #e8eee8, 0 0 0 35px #d4dfd5, 0 0 0 72px #e8eee8, 0 0 0 73px #d4dfd5; }
.hero-copy { position: relative; z-index: 1; max-width: 720px; }
.eyebrow { margin: 0 0 .55rem; color: var(--green); font-size: .74rem; font-weight: 800; letter-spacing: .13em; line-height: 1.4; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 820px; margin-bottom: 1rem; font-size: clamp(2.4rem, 5.5vw, 4.7rem); font-weight: 680; letter-spacing: -.065em; line-height: 1.04; }
.hero-intro { max-width: 650px; margin-bottom: 0; color: #3c5556; font-size: clamp(1.05rem, 1.8vw, 1.28rem); }
.home-hero { min-height: 400px; }
.home-hero .hero-copy { max-width: 760px; }
.hero-tiles { position: absolute; right: max(7vw, calc((100vw - 1100px) / 2)); bottom: -70px; width: 240px; height: 240px; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); gap: 8px; transform: rotate(11deg); }
.hero-tiles span { border: 1px solid #b7c8bc; border-radius: 7px; background: #d7e5d8; }
.hero-tiles span:nth-child(2n) { background: #d5e1df; }
.hero-tiles span:nth-child(3n) { background: #eed6c4; }
.home-content, .page-content { width: min(1160px, calc(100% - 3rem)); margin: 0 auto; }
.home-content { padding: 3rem 0 5rem; }
.page-content { padding: 2.5rem 0 5rem; }
.section-block { margin: 0 0 4.5rem; }
.section-heading { margin-bottom: 1.6rem; }
.section-heading h2, .split-section h2, .example-grid h2, .source-band h2 { margin-bottom: .6rem; font-size: clamp(1.7rem, 3vw, 2.45rem); letter-spacing: -.045em; line-height: 1.15; }
.tool-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.tool-card { min-height: 260px; padding: 1.5rem; display: flex; flex-direction: column; align-items: flex-start; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); text-decoration: none; transition: transform .18s ease, border-color .18s ease; }
.tool-card:hover { color: var(--ink); border-color: #9db5a5; transform: translateY(-3px); }
.card-number { color: var(--orange); font-size: .8rem; font-weight: 800; letter-spacing: .08em; }
.tool-card h2, .tool-card h3 { margin: 1.2rem 0 .45rem; font-size: 1.35rem; line-height: 1.25; }
.tool-card p { color: var(--muted); }
.text-link { margin-top: auto; color: var(--green-dark); font-size: .9rem; font-weight: 750; }
.split-section { display: grid; grid-template-columns: .8fr 1.2fr; gap: 3rem; padding: 2.4rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.prose { max-width: 790px; }
.prose p { color: #43585b; }
.prose h2 { margin-top: 2rem; margin-bottom: .65rem; font-size: 1.45rem; letter-spacing: -.025em; line-height: 1.3; }
.prose h2:first-of-type { margin-top: 0; }
.prose a { font-weight: 650; }
.source-band { padding: 2rem; display: flex; align-items: center; justify-content: space-between; gap: 2rem; border-radius: 8px; background: var(--green-dark); color: white; }
.source-band .eyebrow { color: #b7dbc8; }
.source-band h2 { max-width: 640px; }
.source-band p { margin-bottom: 0; color: #d7e8df; }
.button { min-height: 46px; padding: .7rem 1.15rem; border: 1px solid var(--green); border-radius: 4px; background: var(--green); color: white; font-size: .91rem; font-weight: 730; line-height: 1.2; }
.button:hover { border-color: var(--green-dark); background: var(--green-dark); }
.button-quiet { background: transparent; color: var(--green-dark); }
.button-quiet:hover { background: #e7eee8; }
.button-light { border-color: var(--white); background: var(--white); color: var(--green-dark); white-space: nowrap; }
.button-light:hover { border-color: #d5e8db; background: #d5e8db; }
.button-outline-light { border-color: #b8d3c5; background: transparent; color: white; }
.button-outline-light:hover { background: #2c6855; }
.calculator-panel { margin-bottom: 3rem; padding: clamp(1.2rem, 3vw, 2.2rem); border: 1px solid var(--line); border-radius: 8px; background: var(--white); box-shadow: 0 10px 34px rgb(24 42 45 / 5%); }
.calculator-heading { margin-bottom: 1.6rem; }
.calculator-heading h2 { margin-bottom: .4rem; font-size: 1.65rem; letter-spacing: -.04em; }
.calculator-heading p:last-child { margin-bottom: 0; color: var(--muted); }
fieldset { margin: 0 0 1.2rem; padding: 1.15rem; border: 1px solid var(--line); border-radius: 5px; }
legend { padding: 0 .45rem; font-size: .91rem; font-weight: 760; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.2rem; }
.form-field { min-width: 0; display: flex; flex-direction: column; gap: .35rem; }
.form-field label { font-size: .88rem; font-weight: 700; }
.optional-label { margin-left: .25rem; color: var(--muted); font-size: .76rem; font-weight: 500; }
.form-field input { width: 100%; min-height: 45px; padding: .55rem .7rem; border: 1px solid #aebcb5; border-radius: 4px; background: #fff; color: var(--ink); }
.form-field input:focus { border-color: var(--green); }
.form-field small, .fieldset-note, .form-note { color: var(--muted); font-size: .79rem; line-height: 1.45; }
.fieldset-note { max-width: 760px; margin-bottom: 1rem; }
.source-note { margin: 1rem 0 0; font-size: .85rem; }
.form-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.4rem; }
.form-note { margin: .8rem 0 0; }
.form-error { margin: 1rem 0 0; padding: .75rem 1rem; border-left: 4px solid #a8402d; background: #fff0ec; color: #732a1e; }
.result-panel { margin-top: 1.4rem; padding: 1.2rem; border: 1px solid #a8c8b4; border-radius: 5px; background: #edf5ef; }
.result-panel h3 { margin: 0 0 .7rem; font-size: 1.12rem; }
.result-grid { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem 1.3rem; }
.result-grid div { padding-bottom: .55rem; border-bottom: 1px solid #d3e2d7; }
.result-grid dt { color: var(--muted); font-size: .78rem; }
.result-grid dd { margin: .12rem 0 0; font-size: 1.05rem; font-weight: 750; }
.result-caveat { margin: .8rem 0 0; color: var(--muted); font-size: .8rem; }
.formula-box { margin: 1.2rem 0; padding: 1.1rem 1.2rem; display: grid; gap: .45rem; border-left: 4px solid var(--orange); background: #f3f0e8; overflow-wrap: anywhere; }
.formula-label { color: var(--green); font-size: .73rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.formula-box code { color: #28444a; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .87rem; }
.example-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 2.5rem; padding: 2rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.example-grid h2 { font-size: 1.8rem; }
.related-tools { padding: 1.4rem 1.5rem; display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.3rem; border-radius: 6px; background: #e9eee8; }
.related-tools h2 { width: 100%; margin: 0; font-size: 1.15rem; }
.related-tools a { font-size: .9rem; font-weight: 680; }
.guide-content, .legal-content { max-width: 780px; }
.guide-content h2 { counter-increment: guide-step; }
.guide-content { counter-reset: guide-step; }
.guide-content h2::before { content: ""; }
.guide-cards .tool-card { min-height: 235px; }
.contact-panel { padding: 1.5rem; border: 1px solid var(--line); border-radius: 6px; background: var(--white); }
.site-footer { padding: 3rem 0 1.2rem; border-top: 1px solid var(--line); background: #e8eee8; }
.footer-main { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 3rem; padding-bottom: 2.3rem; }
.brand-footer { margin-bottom: .65rem; }
.footer-about p { max-width: 280px; color: var(--muted); font-size: .88rem; }
.footer-links { display: grid; align-content: start; gap: .42rem; }
.footer-links h2 { margin-bottom: .35rem; font-size: .93rem; }
.footer-links a { width: fit-content; color: #465c5b; font-size: .85rem; }
.footer-bottom { padding-top: 1rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; border-top: 1px solid #cbd6cc; color: var(--muted); font-size: .78rem; }
.privacy-button { border: 0; padding: 0; background: none; color: var(--green-dark); text-decoration: underline; text-underline-offset: .15em; }
.analytics-choice { position: fixed; z-index: 5; right: 1rem; bottom: 1rem; left: 1rem; max-width: 980px; margin: 0 auto; padding: 1rem 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; border: 1px solid #c4d0c8; border-radius: 6px; background: var(--ink); color: white; box-shadow: 0 12px 45px rgb(0 0 0 / 20%); }
.analytics-choice[hidden] { display: none; }
.analytics-choice p { margin: 0; }
.analytics-choice .eyebrow { color: #b7dbc8; }
.analytics-actions { display: flex; gap: .5rem; flex-shrink: 0; }
[hidden] { display: none !important; }

@media (max-width: 760px) {
  .header-inner { min-height: auto; padding: 1rem 0; align-items: flex-start; flex-direction: column; gap: .8rem; }
  .primary-nav { width: 100%; flex-wrap: wrap; gap: .45rem 1.1rem; padding: .15rem 0; }
  .primary-nav a { flex: 0 0 auto; font-size: .83rem; }
  .home-hero { min-height: 360px; }
  .hero-tiles { right: -35px; bottom: -90px; width: 185px; height: 185px; opacity: .65; }
  .tool-cards { grid-template-columns: 1fr; }
  .tool-card, .guide-cards .tool-card { min-height: 210px; }
  .split-section, .example-grid { grid-template-columns: 1fr; gap: 1.2rem; }
  .source-band { align-items: flex-start; flex-direction: column; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 2rem 1.4rem; }
  .footer-about { grid-column: 1 / -1; }
  .analytics-choice { align-items: stretch; flex-direction: column; gap: .8rem; }
  .analytics-actions .button { flex: 1; }
}

@media (max-width: 480px) {
  .header-inner, .home-content, .page-content, .footer-main, .footer-bottom { width: min(100% - 2rem, 1160px); }
  .page-hero { min-height: 255px; padding: 2.6rem 1rem; }
  .home-hero { min-height: 340px; }
  .hero-copy { max-width: 100%; }
  h1 { font-size: clamp(2.25rem, 11vw, 3rem); }
  .home-content, .page-content { padding-top: 2rem; }
  .form-grid, .result-grid { grid-template-columns: 1fr; }
  fieldset { padding: .9rem; }
  .form-actions { align-items: stretch; flex-direction: column; }
  .form-actions .button { width: 100%; }
  .analytics-actions { flex-direction: column; }
  .footer-main { grid-template-columns: 1fr; }
  .footer-about { grid-column: auto; }
  .footer-bottom { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
