:root {
  --ink: #18352a;
  --pine: #174f35;
  --pine-2: #226a49;
  --leaf: #69a35b;
  --cream: #f5f2e8;
  --paper: #fffdf7;
  --line: #d8d5c6;
  --muted: #647268;
  --clay: #c96945;
  --sun: #e9bc4a;
  --shadow: 0 18px 50px rgba(32, 64, 46, .1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body { margin: 0; color: var(--ink); background: var(--cream); font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; font-size: 16px; line-height: 1.6; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
main, footer, .header-inner { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }

.site-header { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid rgba(24, 53, 42, .12); background: rgba(245, 242, 232, .92); backdrop-filter: blur(14px); }
.header-inner { min-height: 74px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px 11px 11px 3px; color: #fff; background: var(--pine); font-family: Georgia, serif; font-size: 25px; font-weight: 700; transform: rotate(-2deg); }
.brand > span:last-child { display: flex; flex-direction: column; line-height: 1.05; }
.brand b { font-family: Georgia, "Times New Roman", serif; font-size: 23px; letter-spacing: -.02em; }
.brand small { margin-top: 4px; color: var(--muted); font-size: 10px; letter-spacing: .13em; text-transform: uppercase; }
.site-header nav { display: flex; align-items: center; gap: 23px; }
.site-header nav a { color: #42564b; font-size: 14px; font-weight: 650; }
.site-header nav a:hover { color: var(--pine); }
.header-action { padding: 10px 15px; color: #fff; background: var(--pine); border-radius: 10px; font-size: 14px; font-weight: 750; }

.page-intro { min-height: 350px; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, .6fr); align-items: center; gap: 50px; padding: 62px 6px 44px; }
.eyebrow { margin: 0 0 8px; color: var(--clay); font-size: 12px; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
h1, h2, h3 { margin-top: 0; font-family: Georgia, "Times New Roman", serif; line-height: 1.08; letter-spacing: -.025em; }
h1 { max-width: 780px; margin-bottom: 20px; font-size: clamp(42px, 6vw, 76px); }
h2 { font-size: clamp(30px, 4vw, 44px); }
h3 { font-size: 26px; }
.lead { max-width: 780px; margin: 0; color: #4e6055; font-size: clamp(18px, 2vw, 22px); line-height: 1.55; }
.intro-points { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 26px; }
.intro-points span { padding: 7px 11px; border: 1px solid #d0d1c4; border-radius: 999px; background: rgba(255,255,255,.42); color: #506157; font-size: 13px; font-weight: 700; }
.intro-points span::before { content: "✓"; margin-right: 6px; color: var(--pine-2); }
.intro-badge { justify-self: center; width: 236px; aspect-ratio: 1 / 1.55; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 7px solid var(--pine); border-radius: 110px 110px 26px 26px; background: linear-gradient(180deg, #dfedcf, #f7edca); box-shadow: inset 0 0 0 8px rgba(255,255,255,.55), 18px 20px 0 rgba(105,163,91,.16); transform: rotate(3deg); }
.intro-badge span { max-width: 90%; font-family: Georgia, serif; color: var(--pine); font-size: clamp(30px, 4vw, 45px); line-height: 1.05; text-align: center; font-weight: 700; }
.intro-badge i { width: 90px; height: 2px; margin: 14px 0; background: var(--clay); }
.intro-badge small { color: #5a665d; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }

.ad-slot { display: none; place-items: center; color: #8a8e84; border: 1px dashed #c9c7ba; background: rgba(255,255,255,.28); font-size: 11px; line-height: 1.45; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
body.ads-enabled .ad-slot { display: grid; }
.ad-wide { min-height: 92px; margin: 10px 0 34px; border-radius: 12px; }
.after-tool { margin-top: 26px; }
.ad-rectangle { min-height: 250px; margin-top: 22px; border-radius: 14px; }

.planner-shell { overflow: hidden; border: 1px solid #ccd0c3; border-radius: 24px; background: var(--paper); box-shadow: var(--shadow); }
.planner-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 28px 30px 24px; border-bottom: 1px solid var(--line); background: linear-gradient(120deg, #fefcf4 55%, #ecf3dd); }
.planner-heading h2 { margin-bottom: 7px; font-size: 38px; }
.planner-heading p:last-child { margin: 0; color: var(--muted); }
.preset-buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.preset-buttons button, .result-actions button { padding: 8px 11px; border: 1px solid #c9cdc1; border-radius: 8px; color: var(--pine); background: #fffef9; font-size: 12px; font-weight: 800; }
.preset-buttons button:hover, .result-actions button:hover { border-color: var(--pine); }
.planner-grid { display: grid; grid-template-columns: minmax(340px, .83fr) minmax(0, 1.17fr); min-height: 650px; }
.planner-controls { padding: 26px 28px 30px; border-right: 1px solid var(--line); background: #fbfaf4; }
fieldset { margin: 0 0 28px; padding: 0; border: 0; }
legend { width: 100%; display: flex; align-items: center; gap: 9px; margin-bottom: 15px; color: var(--ink); font-family: Georgia, serif; font-size: 21px; font-weight: 700; }
legend span { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--clay); font-family: Inter, sans-serif; font-size: 13px; }
.field-grid { display: grid; gap: 10px; margin-bottom: 11px; }
.field-grid.three { grid-template-columns: 1.2fr .8fr .8fr; }
.field-grid.two { grid-template-columns: 1fr 1fr; }
label { display: flex; flex-direction: column; gap: 6px; color: #59695f; font-size: 12px; font-weight: 750; }
input, select { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid #c9cdc2; border-radius: 9px; outline: none; color: var(--ink); background: #fff; font-size: 15px; font-weight: 650; }
input:focus, select:focus { border-color: var(--pine-2); box-shadow: 0 0 0 3px rgba(34,106,73,.12); }
.check-label { flex-direction: row; align-items: center; gap: 9px; margin-top: 12px; color: #485b50; font-size: 13px; }
.check-label input { width: 18px; min-height: 18px; accent-color: var(--pine); }
.add-crop { display: grid; grid-template-columns: 1fr 90px auto; align-items: end; gap: 9px; }
.button { min-height: 43px; display: inline-flex; align-items: center; justify-content: center; padding: 9px 15px; border: 0; border-radius: 9px; font-size: 14px; font-weight: 800; }
.button.primary { color: #fff; background: var(--pine); box-shadow: 0 5px 15px rgba(23,79,53,.18); }
.button.primary:hover { background: var(--pine-2); }
.button.secondary { border: 1px solid var(--pine); color: var(--pine); background: #fff; }
.button.ghost { border: 1px solid #d2d2c7; color: #667269; background: transparent; }
.crop-list { display: grid; gap: 9px; margin-top: 13px; }
.crop-card { position: relative; display: grid; grid-template-columns: minmax(110px, 1.35fr) repeat(3, minmax(58px, .65fr)) 30px; align-items: end; gap: 7px; padding: 10px; border: 1px solid #d9d9cd; border-left: 5px solid var(--crop-color); border-radius: 10px; background: #fff; }
.crop-name { align-self: center; display: flex; gap: 7px; color: var(--ink); font-size: 12px; font-weight: 800; }
.crop-card label { font-size: 9px; text-transform: uppercase; }
.crop-card input { min-height: 36px; padding: 5px 7px; font-size: 13px; }
.crop-remove { width: 30px; height: 36px; border: 0; border-radius: 8px; color: #985e4c; background: #fbede8; font-size: 19px; }
.empty-crops { padding: 18px; border: 1px dashed #d1d2c6; border-radius: 10px; color: #7b847d; font-size: 13px; text-align: center; }
.control-actions { display: flex; gap: 9px; }
.control-actions .primary { flex: 1; }
.form-note { margin: 12px 0 0; color: #7a837d; font-size: 11px; }

.planner-result { min-width: 0; padding: 26px 28px 30px; background: #fffef9; }
.result-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.result-toolbar h3 { margin-bottom: 0; }
.result-actions { display: flex; gap: 6px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 18px 0; }
.stat { padding: 11px 12px; border: 1px solid #dedfd5; border-radius: 10px; background: #f8f7ef; }
.stat b { display: block; font-family: Georgia, serif; color: var(--pine); font-size: 21px; line-height: 1.2; }
.stat span { color: #748077; font-size: 10px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.diagram-wrap { min-height: 410px; display: grid; place-items: center; overflow: auto; padding: 18px; border: 1px solid #dcded3; border-radius: 15px; background-color: #f5f3e8; background-image: linear-gradient(rgba(69,96,76,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(69,96,76,.06) 1px, transparent 1px); background-size: 20px 20px; }
#garden-diagram { display: block; max-width: 100%; max-height: 680px; filter: drop-shadow(0 8px 9px rgba(40,67,48,.09)); }
.legend { display: flex; flex-wrap: wrap; gap: 7px 14px; margin-top: 15px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; color: #53645a; font-size: 12px; }
.legend-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--crop-color); box-shadow: inset 0 0 0 2px rgba(255,255,255,.5); }
.warnings { display: grid; gap: 7px; margin-top: 13px; }
.warning { padding: 10px 12px; border-radius: 9px; color: #714f31; background: #fff0cf; font-size: 12px; }
.warning.error { color: #7a3d2b; background: #fbe4dc; }
.warning.ok { color: #315f43; background: #e6f2e3; }

.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 66px; margin: 76px 0 42px; }
.content-layout article { max-width: 790px; }
.content-section { padding: 0 0 38px; margin-bottom: 38px; border-bottom: 1px solid #d8d6ca; }
.content-section h2 { margin-bottom: 18px; font-size: 38px; }
.content-section p { color: #4c5f54; font-size: 17px; line-height: 1.78; }
.content-section ul { display: grid; gap: 9px; padding: 0; margin: 20px 0 0; list-style: none; }
.content-section li { position: relative; padding-left: 28px; color: #45584d; }
.content-section li::before { content: ""; position: absolute; left: 3px; top: .65em; width: 10px; height: 7px; border-left: 2px solid var(--clay); border-bottom: 2px solid var(--clay); transform: rotate(-45deg); }
.source-links { display: grid; gap: 8px; margin-top: 18px; }
.source-links a { padding: 10px 13px; border-radius: 8px; color: var(--pine); background: #e9efdf; font-size: 13px; font-weight: 750; }
.aside-card { position: sticky; top: 98px; padding: 22px; border-radius: 14px; color: #fff; background: var(--pine); box-shadow: var(--shadow); }
.aside-card b { font-family: Georgia, serif; font-size: 23px; }
.aside-card p { color: #d8e8dc; font-size: 14px; }
.aside-card a { display: inline-block; margin-top: 5px; color: #fff3bd; font-size: 13px; font-weight: 800; }
.faq { max-width: 800px; margin: 42px 0 80px; }
.faq h2 { margin-bottom: 25px; }
.faq details { border-top: 1px solid #d2d2c6; }
.faq details:last-child { border-bottom: 1px solid #d2d2c6; }
.faq summary { padding: 18px 4px; cursor: pointer; font-family: Georgia, serif; font-size: 19px; font-weight: 700; }
.faq details p { margin: 0; padding: 0 34px 20px 4px; color: #526258; }
.related { margin: 45px 0 80px; padding: 35px; border-radius: 22px; background: #e5edda; }
.related h2 { margin-bottom: 23px; }
.related > div { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.related a { min-height: 105px; display: flex; flex-direction: column; justify-content: flex-end; padding: 16px; border: 1px solid rgba(23,79,53,.14); border-radius: 13px; background: rgba(255,255,255,.64); transition: transform .18s ease, background .18s ease; }
.related a:hover { background: #fff; transform: translateY(-3px); }
.related b { font-family: Georgia, serif; font-size: 20px; }
.related span { color: #65746b; font-size: 12px; }

footer { display: grid; grid-template-columns: 1fr auto; gap: 28px; padding: 38px 6px; border-top: 1px solid #cfcec2; }
.footer-brand { width: fit-content; }
footer p { color: #637169; font-size: 13px; }
footer nav { display: flex; gap: 18px; align-items: center; }
footer nav a { color: #43594d; font-size: 13px; font-weight: 700; }
footer > small { grid-column: 1 / -1; color: #889087; font-size: 11px; }
.not-found { max-width: 680px; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.not-found h1 { font-size: 58px; }

@media (max-width: 980px) {
  .site-header nav { display: none; }
  .page-intro { grid-template-columns: 1fr 230px; }
  .planner-grid { grid-template-columns: 1fr; }
  .planner-controls { border-right: 0; border-bottom: 1px solid var(--line); }
  .content-layout { grid-template-columns: 1fr; gap: 0; }
  .content-layout aside { display: grid; grid-template-columns: 1fr 300px; gap: 18px; align-items: start; }
  .aside-card { position: static; }
  .related > div { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  main, footer, .header-inner { width: min(100% - 20px, 1180px); }
  .header-inner { min-height: 64px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand b { font-size: 20px; }
  .header-action { padding: 9px 11px; font-size: 12px; }
  .page-intro { min-height: 0; grid-template-columns: 1fr; gap: 25px; padding: 42px 4px 32px; }
  h1 { font-size: 44px; }
  .lead { font-size: 17px; }
  .intro-badge { display: none; }
  .ad-wide { min-height: 70px; margin-bottom: 22px; }
  .planner-shell { border-radius: 16px; }
  .planner-heading { align-items: flex-start; flex-direction: column; padding: 22px 17px 18px; }
  .planner-heading h2 { font-size: 32px; }
  .preset-buttons { justify-content: flex-start; }
  .planner-controls, .planner-result { padding: 21px 15px 24px; }
  .field-grid.three { grid-template-columns: 1fr 1fr; }
  .field-grid.three label:first-child { grid-column: 1 / -1; }
  .add-crop { grid-template-columns: 1fr 88px; }
  .add-crop .button { grid-column: 1 / -1; }
  .crop-card { grid-template-columns: minmax(0, 1fr) repeat(2, 63px) 30px; }
  .crop-card label:nth-of-type(4) { grid-column: 2 / 3; }
  .crop-name { grid-row: span 2; }
  .result-toolbar { align-items: stretch; flex-direction: column; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .diagram-wrap { min-height: 360px; padding: 10px; }
  .content-layout { margin-top: 54px; }
  .content-section h2 { font-size: 32px; }
  .content-section p { font-size: 16px; }
  .content-layout aside { grid-template-columns: 1fr; }
  .ad-rectangle { min-height: 100px; }
  .related { padding: 24px 16px; }
  .related > div { grid-template-columns: 1fr; }
  footer { grid-template-columns: 1fr; }
  footer nav { flex-wrap: wrap; }
  footer > small { grid-column: 1; }
}

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

@media print {
  body { background: #fff; }
  .site-header, .page-intro, .ad-slot, .planner-heading, .planner-controls, .result-actions, .content-layout, .faq, .related, footer { display: none !important; }
  main { width: 100%; }
  .planner-shell { border: 0; box-shadow: none; }
  .planner-grid { display: block; min-height: 0; }
  .planner-result { padding: 0; }
  .diagram-wrap { min-height: 0; border: 0; background: #fff; }
  #garden-diagram { max-height: 75vh; }
}

.seo-extra a { color: var(--pine-2); font-weight: 750; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.seo-extra ol { padding-left: 22px; }
