:root {
  color-scheme: light;
  --ink: #17352b;
  --muted: #52645a;
  --green: #1c6045;
  --green-dark: #174c38;
  --mint: #dcefe4;
  --cream: #f7f7f2;
  --paper: #fffefa;
  --line: #e3e8df;
  --orange: #f3a851;
  --red: #a63232;
  --shadow: 0 22px 60px rgba(23, 53, 43, .08);
  font-family: 'Segoe UI', Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--cream); font-size: 16px; line-height: 1.6; }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
.shell { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.skip-link { position: absolute; z-index: 10; top: -60px; left: 16px; padding: 10px 16px; color: white; background: var(--green-dark); border-radius: 8px; }
.skip-link:focus { top: 12px; }

.site-header { height: 78px; border-bottom: 1px solid rgba(23, 53, 43, .08); background: rgba(247, 247, 242, .92); }
.header-inner, .brand, .main-nav { display: flex; align-items: center; }
.header-inner { height: 100%; justify-content: space-between; }
.brand { gap: 10px; text-decoration: none; font-family: 'Segoe UI', Arial, sans-serif; font-size: 19px; font-weight: 800; letter-spacing: -.8px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; color: #fff; background: var(--green); border-radius: 11px 11px 11px 4px; font-family: 'Segoe UI', Arial, sans-serif; font-size: 21px; line-height: 1; }
.brand-mark svg { display: block; width: 23px; height: 23px; }
.main-nav { gap: 32px; color: #52655c; font-size: 14px; font-weight: 600; }
.main-nav a, .site-footer nav a { text-decoration: none; }
.main-nav a:hover, .site-footer nav a:hover { color: var(--green); }

.hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(270px, .6fr); align-items: center; gap: 74px; padding-block: 76px 62px; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 13px; color: var(--green); font-size: 12px; font-weight: 700; letter-spacing: 1.05px; text-transform: uppercase; }
.eyebrow-dot { width: 8px; height: 8px; background: var(--orange); border-radius: 50%; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: 'Segoe UI', Arial, sans-serif; }
h1 { max-width: 700px; margin-bottom: 16px; font-size: clamp(44px, 6.2vw, 74px); font-weight: 800; letter-spacing: -4.3px; line-height: 1.04; }
h1 span { color: var(--green); }
.hero-lede { max-width: 600px; margin-bottom: 23px; color: #5b6e64; font-size: 18px; line-height: 1.65; }
.trust-row { display: flex; flex-wrap: wrap; gap: 10px 20px; color: #52655c; font-size: 13px; font-weight: 600; }
.trust-row i { margin-right: 5px; color: var(--green); font-style: normal; }
.hero-note { position: relative; padding: 29px 27px 25px; background: #e8f1e9; border-radius: 4px 20px 20px 20px; transform: rotate(1.4deg); }
.hero-note::after { position: absolute; right: -10px; bottom: -10px; z-index: -1; width: 100%; height: 100%; border: 1px solid #a5c6ad; border-radius: 4px 20px 20px 20px; content: ''; }
.note-icon { display: grid; place-items: center; width: 37px; height: 37px; margin-bottom: 18px; color: var(--green-dark); background: #cce5d4; border-radius: 12px; font-size: 21px; }
.note-label { margin-bottom: 7px; color: var(--green); font-size: 12px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; }
.hero-note p:last-child { margin-bottom: 0; color: #53675c; font-size: 14px; line-height: 1.65; }

.calculator-section { padding-block: 32px 88px; scroll-margin-top: 28px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 25px; margin-bottom: 19px; }
.section-heading .eyebrow { margin-bottom: 7px; }
h2 { margin-bottom: 0; font-size: clamp(28px, 3vw, 38px); font-weight: 800; letter-spacing: -1.6px; line-height: 1.2; }
.scale-control { display: flex; align-items: center; gap: 10px; color: #5c6d64; font-size: 13px; font-weight: 600; }
.scale-control input { width: 74px; padding: 8px 10px; text-align: center; }
.scale-hint { margin: -10px 0 17px auto; text-align: right; }
input { width: 100%; min-width: 0; border: 1px solid #d9e1d9; border-radius: 9px; outline: none; color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s; }
input:focus { border-color: #4c8b66; box-shadow: 0 0 0 3px rgba(62, 132, 88, .13); }
input::placeholder { color: #9aa89e; }
.field-hint { color: #5d6d63; font-size: 12px; }
.calculator-card { padding: 27px 34px 20px; background: var(--paper); border: 1px solid #e7e9df; border-radius: 20px; box-shadow: var(--shadow); }
.mode-switch { display: inline-flex; gap: 5px; margin-bottom: 25px; padding: 5px; background: #f0f3ec; border-radius: 11px; }
.mode-tab { padding: 10px 15px; border: 0; border-radius: 8px; color: #617068; background: transparent; font-size: 13px; font-weight: 700; transition: background .15s, color .15s, box-shadow .15s; }
.mode-tab.is-active { color: var(--green-dark); background: #fff; box-shadow: 0 2px 8px rgba(23, 53, 43, .09); }
.mode-tab:focus-visible, .button:focus-visible, .text-button:focus-visible, .remove-row:focus-visible { outline: 3px solid #f3a851; outline-offset: 2px; }
.calc-panel[hidden] { display: none; }
.panel-intro { max-width: 760px; margin-bottom: 22px; }
.panel-intro h3 { margin-bottom: 5px; font-size: 21px; letter-spacing: -.5px; }
.panel-intro p { margin-bottom: 0; color: var(--muted); font-size: 14px; }
.grade-list { display: grid; gap: 10px; }
.grade-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(130px, .32fr) 32px; align-items: end; gap: 13px; }
.grade-row label, .target-fields label { display: grid; gap: 6px; color: #586b61; font-size: 12px; font-weight: 600; }
.grade-row input, .target-fields input { height: 43px; padding: 9px 12px; font-size: 14px; }
.remove-row { width: 32px; height: 40px; border: 0; color: #829087; background: transparent; font-size: 22px; }
.remove-row:hover:not(:disabled) { color: var(--red); }
.remove-row:disabled { cursor: default; opacity: .25; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; }
.text-button { padding: 8px 0; border: 0; color: var(--green); background: transparent; font-size: 13px; font-weight: 700; }
.text-button span { margin-right: 4px; font-size: 18px; vertical-align: -1px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 10px; min-height: 46px; padding: 0 19px; border: 0; border-radius: 9px; font-size: 13px; font-weight: 700; transition: transform .15s, background .15s; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--green); }
.button-primary:hover { background: var(--green-dark); }
.target-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 17px; }
.result-box { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; margin-top: 18px; padding: 17px 19px; color: var(--green-dark); background: #eaf4ec; border: 1px solid #d4e8d7; border-radius: 11px; }
.result-box[hidden] { display: none; }
.result-box .result-label { font-size: 12px; font-weight: 700; }
.result-box strong { font-family: 'Segoe UI', Arial, sans-serif; font-size: 30px; letter-spacing: -.7px; line-height: 1.3; }
.result-box strong small { color: #55675c; font-family: 'Segoe UI', Arial, sans-serif; font-size: 14px; font-weight: 500; letter-spacing: 0; }
.result-detail { margin-top: 5px; color: #52675a; font-size: 12px; }
.result-box.is-error { color: #8a302a; background: #fff0ed; border-color: #f1d2cc; }
.result-box.is-error .result-detail { color: #8a302a; }
.calculator-footnote { display: flex; gap: 8px; margin: 19px 0 0; color: #59685f; font-size: 11px; line-height: 1.5; }

.how-section, .guides-section { padding-block: 12px 82px; }
.compact-heading { margin-bottom: 25px; }
.heading-aside { max-width: 320px; margin: 0 0 3px; color: var(--muted); font-size: 13px; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step-card { min-height: 188px; padding: 22px 22px 20px; background: #eef2e9; border-radius: 4px 15px 15px 15px; }
.step-number { display: inline-block; margin-bottom: 14px; color: #1c6045; font-family: 'Segoe UI', Arial, sans-serif; font-size: 13px; font-weight: 800; }
.step-card h3 { margin-bottom: 7px; font-size: 17px; letter-spacing: -.4px; }
.step-card p { margin: 0; color: #56665c; font-size: 13px; line-height: 1.6; }
.guides-section { padding-top: 0; }
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.guide-card { display: flex; flex-direction: column; min-height: 230px; padding: 22px; background: var(--paper); border: 1px solid var(--line); border-radius: 15px; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.guide-card:hover { transform: translateY(-3px); box-shadow: 0 15px 35px rgba(23, 53, 43, .08); }
.guide-card-accent { background: #e8f1e9; border-color: #d9e8d9; }
.guide-tag { margin-bottom: 15px; color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .9px; text-transform: uppercase; }
.guide-card h3 { margin-bottom: 8px; font-size: 19px; letter-spacing: -.5px; line-height: 1.3; }
.guide-card p { margin-bottom: 22px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.guide-link { display: flex; justify-content: space-between; align-items: center; margin-top: auto; color: var(--green); font-size: 12px; font-weight: 700; }

.faq-section { display: grid; grid-template-columns: .72fr 1.28fr; gap: 75px; padding-block: 0 55px; }
.feedback-section { padding-block: 0 78px; }
.feedback-card { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 27px 30px; background: #e8f1e9; border: 1px solid #d9e8d9; border-radius: 4px 20px 20px 20px; }
.feedback-card h2 { margin: 0 0 7px; font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -1px; line-height: 1.2; }
.feedback-card p { margin: 0; color: #53665c; font-size: 14px; line-height: 1.6; }
.feedback-card .button { flex: none; }
.faq-intro h2 { margin-bottom: 15px; }
.faq-intro > p:last-child { color: var(--muted); font-size: 14px; }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { position: relative; padding: 17px 35px 17px 0; cursor: pointer; font-size: 14px; font-weight: 700; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { position: absolute; right: 3px; color: var(--green); content: '+'; font-size: 20px; font-weight: 400; }
.faq-list details[open] summary::after { content: '−'; }
.faq-list details p { margin: -2px 28px 17px 0; color: var(--muted); font-size: 13px; }

.site-footer { border-top: 1px solid var(--line); background: #eff1e9; }
.footer-inner { display: grid; grid-template-columns: 1.5fr 1fr auto; align-items: center; gap: 28px; padding-block: 27px; }
.footer-brand { font-size: 17px; }
.footer-brand .brand-mark { width: 30px; height: 30px; font-size: 18px; }
.footer-inner > div > p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 16px; color: #5b6d63; font-size: 12px; }
.copyright { margin: 0; color: #58675e; font-size: 11px; text-align: right; }

/* Editorial and policy pages */
.page-main { min-height: 65vh; padding-block: 52px 90px; }
.breadcrumbs { margin-bottom: 20px; color: #728078; font-size: 12px; }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { color: var(--green); }
.article-layout { display: grid; grid-template-columns: minmax(0, 760px) minmax(210px, 270px); align-items: start; gap: 55px; }
.article-content { padding: 38px 44px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; }
.article-content .eyebrow { margin-bottom: 10px; }
.article-content h1 { max-width: none; margin-bottom: 14px; font-size: clamp(34px, 4.2vw, 52px); letter-spacing: -2.3px; }
.article-content .article-lede { margin-bottom: 27px; color: #607168; font-size: 18px; }
.article-content h2 { margin: 34px 0 12px; font-size: 25px; letter-spacing: -.8px; }
.article-content h3 { margin: 24px 0 8px; font-size: 18px; }
.article-content p, .article-content li { color: #53665c; font-size: 15px; line-height: 1.8; }
.article-content li { margin-bottom: 7px; }
.article-content strong { color: var(--ink); }
.formula-box { margin: 20px 0; padding: 19px 20px; color: var(--green-dark); background: #eaf4ec; border-left: 3px solid var(--green); border-radius: 3px 9px 9px 3px; font-family: 'Segoe UI', Arial, sans-serif; font-size: 17px; font-weight: 700; overflow-wrap: anywhere; }
.example-box { margin: 20px 0; padding: 18px 20px; background: #f4f3eb; border-radius: 10px; }
.example-box p:last-child { margin-bottom: 0; }
.article-aside { position: sticky; top: 25px; padding: 22px; background: #e8f1e9; border-radius: 4px 14px 14px 14px; }
.article-aside h2 { margin-bottom: 10px; font-size: 17px; letter-spacing: -.3px; }
.article-aside p, .article-aside li { color: #5c7063; font-size: 13px; }
.article-aside ul { padding-left: 18px; }
.article-aside a { color: var(--green); font-weight: 700; }
.prose-narrow { max-width: 790px; margin-inline: auto; }
.contact-notice { padding: 18px 20px; background: #f4f3eb; border-radius: 10px; }
.back-link { display: inline-flex; margin-top: 12px; color: var(--green); font-size: 13px; font-weight: 700; text-decoration: none; }

@media (max-width: 820px) {
  .hero { grid-template-columns: minmax(0, 1.1fr) minmax(220px, .9fr); gap: 35px; padding-block: 58px 50px; }
  .faq-section { grid-template-columns: 1fr; gap: 26px; }
  .article-layout { grid-template-columns: 1fr; gap: 22px; }
  .article-aside { position: static; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .copyright { grid-column: 1 / -1; text-align: left; }
}
@media (max-width: 600px) {
  body { font-size: 15px; }
  .shell { width: min(100% - 32px, 480px); }
  .site-header { height: 66px; }
  .brand { gap: 8px; font-size: 17px; }
  .brand-mark { width: 31px; height: 31px; font-size: 19px; }
  .main-nav { gap: 16px; font-size: 12px; }
  .main-nav a:last-child { display: none; }
  .hero { grid-template-columns: 1fr; gap: 27px; padding-block: 43px 45px; }
  .hero-note { max-width: 420px; padding: 21px; }
  h1 { font-size: 49px; letter-spacing: -3px; }
  .hero-lede { font-size: 16px; }
  .trust-row { gap: 8px 14px; font-size: 11px; }
  .section-heading { align-items: start; flex-direction: column; gap: 12px; }
  .scale-control { align-self: flex-start; }
  .scale-hint { margin: -5px 0 14px; text-align: left; }
  .calculator-section { padding-block: 18px 62px; }
  .calculator-card { padding: 17px 15px 16px; border-radius: 15px; }
  .mode-switch { display: flex; width: 100%; margin-bottom: 20px; }
  .mode-tab { flex: 1; padding: 10px 7px; font-size: 11px; }
  .panel-intro h3 { font-size: 19px; }
  .panel-intro p { font-size: 12px; }
  .grade-row { grid-template-columns: minmax(0, 1fr) minmax(84px, .55fr) 26px; gap: 7px; }
  .grade-row label { font-size: 10px; }
  .grade-row input { height: 41px; padding: 8px; font-size: 13px; }
  .remove-row { width: 26px; }
  .form-actions { align-items: stretch; flex-direction: column; gap: 8px; }
  .text-button { align-self: flex-start; }
  .button { width: 100%; }
  .target-fields { grid-template-columns: 1fr; gap: 10px; }
  .calculator-footnote { font-size: 10px; }
  .how-section, .guides-section { padding-bottom: 62px; }
  .heading-aside { margin-top: 0; }
  .steps-grid, .guide-grid { grid-template-columns: 1fr; gap: 11px; }
  .step-card { min-height: 0; padding: 18px; }
  .step-number { margin-bottom: 8px; }
  .guide-card { min-height: 0; padding: 19px; }
  .guide-card p { margin-bottom: 16px; }
  .faq-section { padding-bottom: 65px; }
  .footer-inner { grid-template-columns: 1fr; gap: 15px; padding-block: 22px; }
  .copyright { grid-column: auto; }
  .article-layout { gap: 15px; }
  .page-main { padding-block: 31px 62px; }
  .article-content { padding: 25px 19px; }
  .article-content h1 { font-size: 37px; letter-spacing: -1.8px; }
  .article-content .article-lede { font-size: 16px; }
  .article-content p, .article-content li { font-size: 14px; }
}

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