:root {
  --ink: #15231b;
  --muted: #5e6b63;
  --paper: #fbfcf8;
  --surface: #ffffff;
  --surface-soft: #f0f6ef;
  --line: #dbe6da;
  --leaf: #1f6b45;
  --leaf-dark: #174f35;
  --lime: #cfe96b;
  --sun: #f6c95f;
  --berry: #9d4067;
  --blue: #376e83;
  --shadow: 0 20px 55px rgba(29, 63, 41, 0.10);
  --shadow-sm: 0 8px 24px rgba(29, 63, 41, 0.08);
  --radius: 24px;
  --radius-sm: 14px;
  --content: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 6% 0%, rgba(207, 233, 107, .19), transparent 24rem),
    radial-gradient(circle at 100% 18%, rgba(55, 110, 131, .10), transparent 30rem),
    var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--leaf); text-underline-offset: 3px; }
a:hover { color: var(--leaf-dark); }
img { max-width: 100%; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
:focus-visible { outline: 3px solid rgba(55, 110, 131, .35); outline-offset: 3px; }
.skip-link { position: fixed; top: -100px; left: 1rem; z-index: 999; background: var(--ink); color: #fff; padding: .7rem 1rem; border-radius: 10px; }
.skip-link:focus { top: 1rem; }
.container { width: min(calc(100% - 2rem), var(--content)); margin-inline: auto; }
.narrow { width: min(calc(100% - 2rem), 820px); margin-inline: auto; }
.eyebrow { color: var(--leaf); font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(219, 230, 218, .85);
  background: rgba(251, 252, 248, .92);
  backdrop-filter: blur(16px);
}
.header-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .72rem; color: var(--ink); font-weight: 850; text-decoration: none; letter-spacing: -.02em; }
.brand-mark { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; background: var(--leaf); color: #fff; box-shadow: var(--shadow-sm); }
.brand small { display: block; color: var(--muted); font-size: .68rem; font-weight: 650; letter-spacing: .02em; }
.nav-toggle { display: none; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.site-nav { display: flex; align-items: center; gap: .25rem; }
.site-nav a { padding: .58rem .78rem; color: var(--muted); border-radius: 10px; font-size: .92rem; font-weight: 700; text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--surface-soft); color: var(--leaf); }

.hero { padding: 4.8rem 0 3.6rem; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr); align-items: center; gap: 3.5rem; }
.hero h1, .page-hero h1 { margin: .45rem 0 1rem; font-size: clamp(2.55rem, 6vw, 5.3rem); line-height: .98; letter-spacing: -.065em; }
.hero h1 span { color: var(--leaf); }
.hero-copy { max-width: 680px; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.25rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.65rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 46px; padding: .72rem 1.05rem; border: 1px solid transparent; border-radius: 12px; background: var(--leaf); color: #fff; font-weight: 800; text-decoration: none; box-shadow: var(--shadow-sm); }
.button:hover { background: var(--leaf-dark); color: #fff; }
.button.secondary { border-color: var(--line); background: #fff; color: var(--ink); box-shadow: none; }
.button.secondary:hover { background: var(--surface-soft); }
.hero-note { display: flex; gap: .6rem; align-items: center; margin-top: 1.25rem; color: var(--muted); font-size: .84rem; }
.hero-visual { position: relative; min-height: 390px; display: grid; place-items: center; }
.orbit { position: absolute; width: 350px; aspect-ratio: 1; border: 1px dashed rgba(31, 107, 69, .25); border-radius: 50%; }
.orbit::before, .orbit::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(31, 107, 69, .12); inset: 14%; }
.orbit::after { inset: 29%; }
.value-card { position: relative; z-index: 2; width: min(100%, 340px); padding: 1.4rem; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.94); box-shadow: var(--shadow); transform: rotate(-2deg); }
.value-card .crop-icon { font-size: 3rem; }
.value-card strong { display: block; font-size: 1.15rem; }
.value-card .value { margin: .65rem 0; color: var(--leaf); font-size: 2.35rem; font-weight: 900; letter-spacing: -.045em; }
.value-card .formula-mini { padding: .7rem; border-radius: 10px; background: var(--surface-soft); color: var(--muted); font-size: .78rem; }
.floating-chip { position: absolute; z-index: 3; padding: .58rem .82rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; box-shadow: var(--shadow-sm); font-size: .82rem; font-weight: 800; }
.chip-a { top: 13%; right: 1%; transform: rotate(5deg); }
.chip-b { bottom: 15%; left: 0; transform: rotate(-6deg); }
.chip-c { bottom: 3%; right: 12%; transform: rotate(3deg); }

.trust-strip { border-block: 1px solid var(--line); background: rgba(255,255,255,.72); }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.trust-item { padding: 1.15rem; text-align: center; }
.trust-item + .trust-item { border-left: 1px solid var(--line); }
.trust-item strong { display: block; font-size: 1.12rem; }
.trust-item span { color: var(--muted); font-size: .8rem; }

.section { padding: 4.3rem 0; }
.section.alt { background: rgba(240, 246, 239, .66); border-block: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin-bottom: 1.65rem; }
.section-head h2, .prose h2 { margin: .2rem 0; font-size: clamp(1.7rem, 3vw, 2.55rem); line-height: 1.12; letter-spacing: -.04em; }
.section-head p { max-width: 630px; margin: 0; color: var(--muted); }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.card { padding: 1.3rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow-sm); }
.card h3 { margin: .5rem 0 .3rem; font-size: 1.14rem; }
.card p { margin: .25rem 0 .8rem; color: var(--muted); }
.card-link { display: inline-flex; gap: .3rem; font-weight: 800; text-decoration: none; }
.stat { font-size: 1.8rem; font-weight: 900; letter-spacing: -.04em; }

.calculator-shell { padding: clamp(1rem, 3vw, 2rem); border: 1px solid rgba(31,107,69,.2); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.calculator-head { display: flex; justify-content: space-between; align-items: start; gap: 1rem; margin-bottom: 1.2rem; }
.calculator-head h2, .calculator-head h3 { margin: 0; letter-spacing: -.03em; }
.formula-badge { padding: .45rem .65rem; border-radius: 999px; background: var(--surface-soft); color: var(--leaf); font-size: .74rem; font-weight: 800; }
.calculator-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1rem; }
.field { grid-column: span 4; }
.field.wide { grid-column: span 6; }
.field.full { grid-column: 1 / -1; }
.field label { display: block; margin-bottom: .35rem; color: var(--muted); font-size: .78rem; font-weight: 800; }
.field input, .field select { width: 100%; min-height: 46px; padding: .65rem .75rem; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink); }
.mutation-add { display: grid; grid-template-columns: 1fr auto; gap: .5rem; }
.mutation-add button { min-width: 48px; border: 0; border-radius: 11px; background: var(--leaf); color: #fff; font-weight: 900; }
.selected-mutations { display: flex; flex-wrap: wrap; gap: .5rem; min-height: 34px; }
.selected-mutations .empty { color: var(--muted); font-size: .83rem; }
.mutation-chip { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .55rem; border: 1px solid #cfe0cf; border-radius: 999px; background: var(--surface-soft); color: var(--ink); font-size: .78rem; font-weight: 750; }
.mutation-chip button { width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: #fff; color: var(--muted); line-height: 1; }
.result-panel { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: .4rem; }
.result-box { padding: 1rem 1.1rem; border-radius: var(--radius-sm); background: var(--ink); color: #fff; }
.result-box.secondary-result { background: var(--surface-soft); color: var(--ink); }
.result-label { display: block; color: rgba(255,255,255,.68); font-size: .76rem; font-weight: 700; }
.secondary-result .result-label { color: var(--muted); }
.result-value { display: block; margin: .2rem 0; font-size: clamp(1.45rem, 3vw, 2.25rem); font-weight: 900; letter-spacing: -.04em; }
.result-detail { display: block; font-size: .76rem; opacity: .75; }
.calculator-note { margin: .9rem 0 0; color: var(--muted); font-size: .78rem; }

.page-hero { padding: 3.4rem 0 2.2rem; }
.page-hero h1 { max-width: 900px; font-size: clamp(2.25rem, 5vw, 4.4rem); }
.page-lead { max-width: 800px; color: var(--muted); font-size: 1.12rem; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1.1rem; color: var(--muted); font-size: .8rem; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs span::before { content: "/"; margin-right: .35rem; color: #a6b0a8; }
.answer-box { max-width: 920px; padding: 1.2rem 1.35rem; border-left: 5px solid var(--lime); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: #fff; box-shadow: var(--shadow-sm); }
.answer-box strong { color: var(--leaf-dark); }
.meta-row { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1rem; }
.meta-pill { padding: .38rem .62rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font-size: .75rem; font-weight: 750; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 2rem; align-items: start; }
.sidebar { position: sticky; top: 96px; }
.sidebar .card + .card { margin-top: 1rem; }
.sidebar ul { margin: .5rem 0 0; padding-left: 1.15rem; }
.sidebar li { margin: .38rem 0; }
.prose > *:first-child { margin-top: 0; }
.prose h2 { margin-top: 2.2rem; }
.prose h3 { margin-top: 1.5rem; }
.prose p, .prose li { color: #37443c; }
.notice { padding: 1rem 1.1rem; border: 1px solid #e8d7a5; border-radius: var(--radius-sm); background: #fff9e7; color: #685421; }
.review-note { padding: .85rem 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-soft); color: var(--muted); font-size: .84rem; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .78rem .9rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--surface-soft); color: var(--muted); font-size: .73rem; letter-spacing: .04em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfdf9; }
.number { text-align: right; font-variant-numeric: tabular-nums; }
.entity-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.entity-link { display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding: .82rem .9rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); text-decoration: none; }
.entity-link:hover { border-color: #b8d1b9; background: var(--surface-soft); }
.entity-link strong { display: flex; align-items: center; gap: .5rem; }
.entity-link small { color: var(--muted); }
.link-cloud { display: flex; flex-wrap: wrap; gap: .55rem; }
.link-cloud a { padding: .48rem .68rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: .82rem; font-weight: 750; text-decoration: none; }
.source-list { padding-left: 1.15rem; }
.source-list li { margin: .55rem 0; }

.formula-display { padding: 1rem; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--ink); color: #eff8ed; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88rem; }
.step-list { display: grid; gap: .8rem; counter-reset: steps; }
.step { position: relative; padding: 1rem 1rem 1rem 3.8rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.step::before { counter-increment: steps; content: counter(steps); position: absolute; top: 1rem; left: 1rem; display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: 50%; background: var(--leaf); color: #fff; font-weight: 900; }
.step strong { display: block; }

.faq-list { display: grid; gap: .75rem; }
details { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
summary { padding: 1rem 1.1rem; cursor: pointer; font-weight: 800; }
details p { margin: 0; padding: 0 1.1rem 1rem; color: var(--muted); }

.site-footer { margin-top: 3rem; border-top: 1px solid var(--line); background: #12251a; color: rgba(255,255,255,.78); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; padding: 3rem 0; }
.footer-grid h2, .footer-grid h3 { color: #fff; }
.footer-grid h2 { margin: 0 0 .5rem; font-size: 1.25rem; }
.footer-grid h3 { margin: 0 0 .6rem; font-size: .85rem; }
.footer-grid p { max-width: 430px; font-size: .86rem; }
.footer-links { display: grid; gap: .42rem; }
.footer-links a { color: rgba(255,255,255,.72); font-size: .82rem; text-decoration: none; }
.footer-links a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 0 1.6rem; border-top: 1px solid rgba(255,255,255,.12); font-size: .76rem; }
.preview-banner { padding: .48rem 1rem; background: #fff0b7; color: #5a491c; text-align: center; font-size: .76rem; font-weight: 750; }
.ad-slot { margin: 2rem 0; padding: 1rem; border: 1px dashed #b9c5ba; background: #f8faf7; text-align: center; }
.ad-label { display: block; margin-bottom: .5rem; color: var(--muted); font-size: .65rem; letter-spacing: .08em; text-transform: uppercase; }

@media (max-width: 900px) {
  .hero-grid, .content-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 3rem; }
  .hero-visual { min-height: 330px; }
  .sidebar { position: static; }
  .card-grid, .entity-list { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .field { grid-column: span 6; }
}

@media (max-width: 720px) {
  .header-inner { min-height: 64px; }
  .nav-toggle { display: inline-flex; }
  .site-nav { position: absolute; top: calc(100% + 1px); left: 0; right: 0; display: none; padding: .7rem 1rem 1rem; border-bottom: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow-sm); }
  .site-nav.open { display: grid; }
  .site-nav a { padding: .75rem; }
  .hero h1 { font-size: clamp(2.55rem, 15vw, 4.2rem); }
  .trust-grid { grid-template-columns: 1fr 1fr; }
  .trust-item:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .trust-item:nth-child(4) { border-top: 1px solid var(--line); }
  .card-grid, .entity-list, .footer-grid { grid-template-columns: 1fr; }
  .section-head { display: block; }
  .section-head p { margin-top: .6rem; }
  .calculator-head { display: block; }
  .formula-badge { display: inline-block; margin-top: .5rem; }
  .field, .field.wide { grid-column: 1 / -1; }
  .result-panel { grid-template-columns: 1fr; }
  .footer-bottom { display: block; }
  .footer-bottom span { display: block; margin-top: .4rem; }
}

@media (max-width: 430px) {
  .container, .narrow { width: min(calc(100% - 1.2rem), var(--content)); }
  .brand small { display: none; }
  .hero { padding-top: 2.2rem; }
  .hero-actions .button { width: 100%; }
  .hero-visual { min-height: 300px; overflow: hidden; }
  .orbit { width: 285px; }
  .value-card { width: 275px; }
  .chip-a { right: -8%; }
  .chip-b { left: -6%; }
  .calculator-shell { border-radius: 17px; }
  th, td { padding: .66rem .7rem; }
}

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