:root {
  --cream: #f7f7ef;
  --paper: #fffefa;
  --green: #183e30;
  --text: #223d30;
  --muted: #46553f;
  --line: #d4dbcb;
  --border: #68785d;
  --lime: #dce8b4;
  --radius: 18px;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  font-synthesis: none;
  scroll-padding-top: 24px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--cream); font-size: 1.125rem; line-height: 1.6; }
button, input, select { font: inherit; color: inherit; }
button, summary { cursor: pointer; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: .08em; }
a:hover { text-decoration-thickness: .14em; }
button { border-radius: 8px; }
button, input, select, summary { min-height: 48px; }
button:disabled { cursor: not-allowed; opacity: .65; }
:focus-visible { outline: 3px solid #173f85; outline-offset: 4px; box-shadow: 0 0 0 3px var(--paper); }
.results-panel :focus-visible { outline-color: #fff; box-shadow: 0 0 0 3px var(--green); }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.25; text-wrap: balance; }
p, h1, h2, h3, label, dd { overflow-wrap: anywhere; }
button svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wrap { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.site-header { min-height: 64px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 20px; padding-block: 8px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; text-decoration: none; font-weight: 700; font-size: 1.375rem; line-height: 1.3; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px; background: var(--green); border-radius: 50%; }
.brand-mark svg { width: 24px; height: 24px; fill: none; stroke: var(--lime); stroke-width: 1.7; stroke-linecap: round; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; font-size: 1rem; font-weight: 600; }
.site-header nav a { display: inline-flex; align-items: center; min-height: 48px; padding: 6px 2px; }
.free-label { display: flex; align-items: center; gap: 8px; font-size: 1rem; color: var(--muted); }
.free-label span, .live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #4e6c37; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 120px; align-items: center; padding-block: 16px 20px; gap: 20px; }
.hero h1 { font-size: 2.25rem; font-weight: 700; }
.hero-description { margin-top: 6px; color: var(--muted); max-width: 48rem; }
.garden-art { width: 120px; max-width: 100%; justify-self: end; }
.garden-art svg { display: block; width: 100%; }
.eyebrow { font-size: 1rem; font-weight: 700; letter-spacing: .015em; line-height: 1.5; }
.calculator-section { scroll-margin-top: 24px; }
.calculator-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(350px, 1fr); gap: 24px; align-items: start; }
.form-panel { min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.panel-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.panel-heading h2 { font-size: 1.5rem; }
.unit-switch { display: flex; flex-wrap: wrap; gap: 6px; background: #eef1e7; border: 1px solid var(--border); border-radius: 10px; padding: 5px; max-width: 100%; }
.unit-switch button { flex: 1 1 auto; font-size: 1rem; padding: 8px 12px; border: 2px solid transparent; background: transparent; color: var(--text); font-weight: 600; }
.unit-switch button[aria-pressed=true] { background: var(--green); border-color: var(--green); color: #fff; }
.section-label { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.section-label > span:first-child { font-size: 1rem; font-weight: 700; width: 32px; min-height: 32px; display: grid; place-items: center; border-radius: 50%; background: #e8efdc; }
.section-label h3 { font-size: 1.125rem; }
.bed { min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: #f4f6ee; padding: 16px; margin-top: 12px; }
.bed-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 8px 16px; }
.bed-name { font-size: 1.125rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.bed-icon { width: 14px; height: 11px; border: 2px solid var(--muted); border-radius: 2px; }
.bed-icon.circle { border-radius: 50%; height: 14px; }
.bed-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: 100%; }
.shape-select { width: auto; min-width: 150px; font-size: 1rem; }
.remove-bed { min-width: 48px; padding: 0 10px; border: 1px solid var(--border); background: var(--paper); font-size: 1.5rem; font-weight: 700; }
.dimension-grid { display: grid; grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr); gap: 10px; align-items: start; }
.dimension-grid.circle { grid-template-columns: minmax(0, 1fr); max-width: 100%; }
.multiply { padding-top: 43px; text-align: center; color: var(--muted); }
label, .small-label { display: block; font-size: 1.125rem; font-weight: 600; color: var(--text); margin-bottom: 8px; }
label > span { color: var(--muted); font-weight: 400; margin-left: 4px; }
.number-wrap { position: relative; }
.number-wrap input { width: 100%; padding-right: 48px; }
.number-wrap > span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 1rem; pointer-events: none; }
input, select { min-width: 0; max-width: 100%; min-height: 52px; border: 2px solid var(--border); border-radius: 8px; background: var(--paper); padding: 8px 12px; font-size: 1.125rem; line-height: 1.5; }
input { width: 100%; }
input::placeholder { color: #536049; opacity: 1; }
select { padding-right: 28px; }
input:hover, select:hover { border-color: var(--green); }
input[aria-invalid=true] { border-color: #9d241b; background: #fff4ee; }
.field-error { color: #9d241b; font-size: 1rem; line-height: 1.5; margin-top: 8px; font-weight: 600; }
.add-bed { margin-top: 12px; width: 100%; padding: 10px 14px; border: 2px dashed var(--border); background: transparent; font-size: 1.125rem; font-weight: 600; }
.add-bed:hover { background: #eaf0e0; }
.add-bed > span { font-size: 1.5rem; margin-right: 5px; }
.form-divider { height: 1px; background: var(--line); margin: 24px 0; }
.depth-row { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 18px; align-items: start; }
.depth-presets > div { display: flex; flex-wrap: wrap; gap: 8px; }
.depth-presets button { flex: 1 1 auto; min-width: 56px; min-height: 52px; border: 2px solid var(--border); background: var(--paper); padding: 8px; font-size: 1rem; font-weight: 600; }
.depth-presets button[aria-pressed=true] { background: var(--green); border-color: var(--green); color: white; }
.field-help { font-size: 1rem; color: var(--muted); line-height: 1.6; margin-top: 10px; }
.options-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin-top: 22px; }
.options-row select { width: 100%; }
.cost-options { border-top: 1px solid var(--line); margin-top: 24px; }
.cost-options summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; padding-block: 16px; font-weight: 700; }
.cost-options summary::-webkit-details-marker, .faq-list summary::-webkit-details-marker { display: none; }
.optional { font-size: 1rem; font-weight: 400; color: var(--muted); }
.plus { font-size: 1.5rem; flex-shrink: 0; }
.cost-options[open] .plus, .faq-list details[open] summary > span { transform: rotate(45deg); }
.cost-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.cost-fields > div:first-child { grid-column: 1 / -1; }
.cost-fields input, .cost-fields select { width: 100%; }
.cost-fields > div:first-child select { max-width: 200px; }
.cost-options[open] { padding-bottom: 18px; }
.form-footer { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; font-size: 1rem; color: var(--muted); }
.form-footer .live-dot { margin-right: 7px; }
.form-footer button { border: 0; background: transparent; font-size: 1rem; font-weight: 600; text-decoration: underline; text-underline-offset: .2em; padding: 8px 4px; }
.results-panel { min-width: 0; padding: 24px; background: var(--green); color: #f8faef; border-radius: var(--radius); }
.result-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.result-header h2 { font-size: 1.375rem; font-weight: 700; }
.main-result { display: flex; flex-direction: column; margin-top: 16px; }
.main-result > span:first-child { font-size: 4rem; letter-spacing: -.04em; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.main-result > span:last-child { font-size: 1.5rem; color: var(--lime); }
.volume-conversion { font-size: 1rem; color: #d3dec7; margin-top: 12px; }
.result-divider { display: flex; align-items: center; gap: 12px; margin-block: 22px; color: #d3dec7; font-size: 1rem; font-weight: 600; }
.result-divider::before, .result-divider::after { content: ''; height: 1px; flex: 1; background: #91a17d; }
.bag-result { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.bag-result > svg { width: 38px; height: 46px; fill: none; stroke: var(--lime); stroke-width: 1.8; }
.bag-result > div { min-width: 0; display: flex; flex-direction: column; }
.bag-result strong { font-size: 2.5rem; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.bag-result > div > span { font-size: 1.125rem; color: #f8faef; }
.bag-pill { font-size: 1rem; color: #f8faef; border: 1px solid #91a17d; border-radius: 8px; padding: 6px 10px; }
.rounding-note, .result-footnote { font-size: 1rem; color: #d3dec7; margin-top: 16px; }
.result-facts { margin: 22px 0 0; border-top: 1px solid #91a17d; padding-top: 12px; font-size: 1rem; }
.result-facts > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding-block: 8px; }
.result-facts dt { color: #d3dec7; }
.result-facts dd { margin: 0; color: #f8faef; font-weight: 700; }
.cost-results { border-top: 1px solid #91a17d; margin-top: 16px; padding-top: 12px; }
.cost-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; font-size: 1.125rem; padding-block: 8px; }
.cost-line strong { color: var(--lime); font-size: 1.375rem; }
.cost-results > p { color: #d3dec7; font-size: 1rem; margin-top: 10px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.result-actions button { display: flex; flex: 1 1 auto; align-items: center; justify-content: center; gap: 10px; padding: 10px 14px; min-height: 52px; border: 2px solid var(--lime); background: var(--lime); color: var(--green); font-size: 1.125rem; font-weight: 700; }
.result-actions button:last-child { background: transparent; color: var(--lime); }
.result-actions button:hover:not(:disabled) { background: #eff6d7; color: var(--green); }
.invalid-result { padding-block: 24px; }
.invalid-result h3 { font-size: 1.5rem; }
.invalid-result p { color: #d3dec7; margin-top: 16px; }
.garden-tip { display: flex; align-items: flex-start; gap: 16px; margin-top: 20px; background: #eef1e4; border: 1px solid var(--line); border-radius: 12px; padding: 20px; color: var(--muted); }
.garden-tip svg { width: 28px; height: 28px; flex-shrink: 0; fill: none; stroke: var(--green); stroke-width: 1.8; }
.garden-tip strong { color: var(--green); }
.garden-tip a { display: inline; color: var(--green); font-weight: 600; }
.how-section { padding-block: 56px; }
.section-intro .eyebrow, .guide-copy .eyebrow { color: var(--muted); margin-bottom: 10px; }
.section-intro h2, .guide-copy h2 { font-size: 2rem; }
.section-intro > p:last-child { margin-top: 12px; color: var(--muted); }
.step-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 28px; }
.step-grid article { border-top: 1px solid var(--line); padding-top: 18px; }
.step-number { font-size: 1rem; font-weight: 700; color: var(--muted); }
.step-grid h3 { font-size: 1.25rem; margin-top: 10px; }
.step-grid p { color: var(--muted); margin-top: 12px; }
.guide-section { background: #eaf0e1; border: 1px solid var(--line); border-radius: var(--radius); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; gap: 32px; padding: 32px; }
.guide-copy > p:not(.eyebrow) { color: var(--muted); margin-top: 18px; }
.guide-copy > p strong { color: var(--green); }
.guide-copy .source-note { font-size: 1rem; }
.depth-guide-card { background: #f7f9f0; border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.depth-diagram { position: relative; padding-top: 78px; }
.plant { position: absolute; left: 50%; width: 110px; transform: translateX(-50%); top: 7px; }
.plant svg { display: block; }
.mulch-layer { height: 42px; background: #ba895c; background-image: repeating-linear-gradient(156deg, transparent 0, transparent 13px, #c89c6f 14px, #c89c6f 16px, transparent 18px); position: relative; border-radius: 6px 6px 0 0; }
.mulch-layer > span { position: absolute; right: 8px; top: 6px; background: #f7e4c9; border-radius: 4px; padding: 0 6px; font-size: 1rem; font-weight: 700; color: #49301d; }
.earth-layer { height: 24px; border-radius: 0 0 5px 5px; background: #786149; }
.depth-card-caption { font-weight: 700; margin-top: 20px; }
.depth-card-caption .live-dot { margin-right: 8px; }
.depth-guide-card > p { color: var(--muted); margin-top: 12px; }
.faq-section { padding-block: 56px; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.5fr); gap: 36px; }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 18px; font-size: 1.125rem; font-weight: 700; padding-block: 20px; }
.faq-list summary > span { flex-shrink: 0; font-size: 1.5rem; }
.faq-list details p { color: var(--muted); padding-bottom: 20px; }
.faq-list details strong { color: var(--green); }
.formula-strip { border-block: 1px solid var(--line); padding-block: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.formula-strip > span { font-size: 2rem; }
.formula-strip p { flex: 1 1 300px; color: var(--muted); }
.formula-strip strong { color: var(--green); }
.formula-strip > a { display: inline-flex; align-items: center; min-height: 48px; padding-block: 8px; font-size: 1.125rem; font-weight: 700; }
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; padding-block: 24px; color: var(--muted); font-size: 1rem; }
.footer-brand { color: var(--green); }
.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; }
.skip-link { position: absolute; top: 8px; left: 12px; z-index: 20; padding: 12px; background: var(--paper); border: 2px solid var(--green); transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.noscript { padding: 20px; text-align: center; background: #ffefc5; }
@media (max-width: 1000px) {
  .calculator-layout { grid-template-columns: minmax(0, 1.25fr) minmax(310px, 1fr); gap: 20px; }
  .form-panel, .results-panel { padding: 20px; }
  .depth-row, .options-row { grid-template-columns: minmax(0, 1fr); }
  .free-label { display: none; }
}
@media (max-width: 800px) {
  .calculator-layout { grid-template-columns: minmax(0, 1fr); }
  .hero { display: block; }
  .garden-art { display: none; }
  .depth-row, .options-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .step-grid, .guide-section, .faq-section { grid-template-columns: minmax(0, 1fr); }
  .guide-section { padding: 24px; }
  .depth-guide-card { max-width: 520px; width: 100%; }
}
@media (max-width: 540px) {
  .wrap { width: calc(100% - 24px); }
  .site-header { gap: 2px 12px; }
  .brand { font-size: 1.125rem; gap: 8px; }
  .site-header nav { gap: 12px; }
  .hero { padding-block: 14px 18px; }
  .hero h1 { font-size: 2rem; }
  .form-panel, .results-panel { padding: 18px; }
  .panel-heading h2 { font-size: 1.375rem; }
  .unit-switch { width: 100%; }
  .unit-switch button { padding-inline: 8px; }
  .bed { padding: 14px; }
  .bed-header { align-items: flex-start; }
  .bed-tools { width: 100%; }
  .shape-select { flex: 1; min-width: 0; }
  .dimension-grid, .depth-row, .options-row, .cost-fields { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .multiply { display: none; }
  .cost-fields > div:first-child { grid-column: auto; }
  .cost-fields > div:first-child select { max-width: none; }
  .main-result > span:first-child { font-size: 3.5rem; }
  .garden-tip { padding: 16px; }
  .garden-tip svg { display: none; }
  .section-intro h2, .guide-copy h2 { font-size: 1.75rem; }
  .how-section, .faq-section { padding-block: 40px; }
  .guide-section, .depth-guide-card { padding: 20px; }
  .formula-strip > span { display: none; }
  .footer-brand { font-size: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media (forced-colors: active) {
  button, input, select, .unit-switch, .results-panel { border: 2px solid ButtonText; }
  button[aria-pressed=true] { border: 3px solid Highlight; text-decoration: underline; }
  :focus-visible, .results-panel :focus-visible { outline: 3px solid Highlight; box-shadow: none; }
  input[aria-invalid=true] { border-style: dashed; }
}
@media print {
  body { background: white; }
  .wrap { width: 100%; }
  .site-header { padding-bottom: 12px; }
  .site-header nav, .garden-art, .hero-description, .form-panel, .garden-tip, .how-section, .guide-section, .faq-section, .formula-strip, .result-actions, .result-footnote, .site-footer, .skip-link { display: none !important; }
  .hero { padding: 16px 0; display: block; }
  .calculator-layout { display: block; }
  .results-panel { background: white; border: 2px solid var(--green); max-width: 100%; }
  .results-panel * { color: var(--green) !important; }
  .result-divider::before, .result-divider::after { background: var(--green); }
  .bag-pill, .result-facts, .cost-results { border-color: var(--green); }
}
