/* RaisedBed.org — large type, high contrast, big targets. Built for people of any age. */
:root {
  --bg: #f6f4ee;
  --panel: #ffffff;
  --ink: #1e2620;
  --muted: #545e56;
  --line: #ddd7ca;
  --green: #2c5a3a;
  --green-dark: #1d3f28;
  --green-soft: #ecf1e8;
  --soil: #6b4a32;
  --accent: #9c4f2a;
  --warn-bg: #fff3d6;
  --warn: #7a4e00;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 2px 10px rgba(30,40,25,.06);
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 19px/1.55 var(--font); }
img { max-width: 100%; height: auto; }
a { color: var(--green-dark); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(30px, 4.4vw, 46px); color: var(--green-dark); }
h2 { font-size: clamp(24px, 3vw, 31px); }
h3 { font-size: 22px; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.wrap { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 16px; }
.small { font-size: 16px; color: var(--muted); }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 12px; z-index: 50; }
.skip:focus { left: 8px; }
.p-img { display: block; object-fit: contain; flex: none; }
[hidden] { display: none !important; }

/* header */
.top { background: var(--panel); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 600; font-size: 27px; color: var(--green-dark); text-decoration: none; }
.logo .dot { color: var(--soil); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { padding: 10px 14px; border-radius: 10px; text-decoration: none; font-weight: 700; color: var(--ink); }
.nav a[aria-current="page"], .nav a:hover { background: none; color: var(--green-dark); box-shadow: inset 0 -3px 0 var(--green); border-radius: 0; }

/* buttons */
button { font: inherit; color: inherit; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; padding: 10px 22px; border-radius: 8px; border: 2px solid var(--green); background: var(--green); color: #fff; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.btn-soft { background: #fff; color: var(--green-dark); }
.btn-soft:hover { background: var(--green-soft); color: var(--green-dark); }
.btn-next { width: 100%; margin-top: 20px; font-size: 20px; }
.link-btn { background: none; border: 0; padding: 8px 0; color: var(--green-dark); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 44px; }

/* intro */
.intro { padding-top: 28px; padding-bottom: 8px; }
.lede { font-size: 21px; max-width: 60ch; }

/* workspace: steps on the left, 3D on the right */
.workspace { display: grid; gap: 24px; grid-template-columns: 1fr; padding-bottom: 32px; }
.viewer-col { min-width: 0; }
.steps { min-width: 0; }
@media (min-width: 1000px) {
  .workspace { grid-template-columns: minmax(400px, 480px) minmax(0, 1fr); align-items: start; }
  .steps { order: 1; }
  .viewer-col { order: 2; position: sticky; top: 12px; align-self: start; }
}
.viewer { position: relative; height: 380px; background: #c9d6c2; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); touch-action: none; }
@media (min-width: 1000px) { .viewer { height: min(70vh, 700px); } }
.viewer canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.viewer-msg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; background: rgba(255,255,255,.85); }
.toast { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; background: rgba(20,28,22,.88); color: #fff; padding: 6px 16px 6px 6px; border-radius: 8px; font-weight: 700; pointer-events: none; white-space: nowrap; max-width: 90%; overflow: hidden; text-overflow: ellipsis; }
.view-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
@media (min-width: 600px) { .view-buttons { grid-template-columns: repeat(6, 1fr); } }
.view-buttons button { min-height: 50px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); font-weight: 700; cursor: pointer; font-size: 17px; padding: 6px; }
.view-buttons button:hover { border-color: var(--green); background: var(--green-soft); }
.hint { font-size: 16px; color: var(--muted); margin: 10px 0 8px; }
.legend { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.legend li { display: flex; align-items: center; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 2px 12px 2px 2px; font-size: 16px; }
.legend .p-img { width: 34px; height: 34px; }
.toast .p-img { width: 36px; height: 36px; background: #fff; border-radius: 6px; }

/* steps */
.step { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px; }
.step h2 { margin: 0; font-size: inherit; }
.step-head { width: 100%; display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 14px; text-align: left; background: none; border: 0; padding: 18px 20px; cursor: pointer; border-radius: var(--radius); }
.step-head:hover { background: var(--green-soft); }
.num { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--green); color: var(--green-dark); font-family: var(--serif); font-weight: 600; font-size: 22px; flex: none; grid-row: span 2; }
.step-title { font-family: var(--serif); font-size: 25px; font-weight: 600; }
.step-sum { font-size: 16px; color: var(--muted); grid-column: 2; }
.step-sum:empty { display: none; }
.step-body { padding: 4px 20px 22px; }
fieldset { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
legend, .field-label { font-weight: 700; font-size: 20px; margin-bottom: 10px; padding: 0; display: block; }
.detect { background: var(--green-soft); border-radius: 12px; padding: 14px 16px; }
.detect .row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.zip-row { display: flex; gap: 10px; }
.zip-row input { flex: 1; min-width: 0; font: inherit; font-size: 26px; letter-spacing: 2px; padding: 8px 14px; min-height: 58px; border: 2px solid var(--line); border-radius: 12px; }
.zip-row input:focus { border-color: var(--green); }
.error { color: #9b1c1c; font-weight: 700; margin-top: 10px; }
.zone-card { margin-top: 18px; border: 2px solid var(--green-soft); border-radius: 12px; padding: 16px; background: #fcfdfb; }
.zone-big { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.zone-big strong { font-size: 40px; color: var(--green-dark); line-height: 1; }
.frost { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 4px; }
.frost div { background: var(--green-soft); border-radius: 10px; padding: 10px 12px; }
.frost dt { font-size: 15px; color: var(--muted); }
.frost dd { margin: 0; font-weight: 700; font-size: 21px; }
.frost-edit { display: grid; gap: 12px; margin: 8px 0; }
.frost-edit label { display: grid; gap: 4px; font-weight: 700; }
.frost-edit input { font: inherit; min-height: 50px; padding: 6px 10px; border: 2px solid var(--line); border-radius: 10px; }

/* choice cards */
.cards { display: grid; gap: 10px; }
.card-choice { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: center; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); cursor: pointer; }
.card-choice:hover { border-color: var(--green); }
.card-choice[aria-pressed="true"] { border-color: var(--green); background: var(--green-soft); box-shadow: inset 0 0 0 1px var(--green); }
.swatch { width: 56px; height: 56px; border-radius: 6px; border: 1px solid rgba(0,0,0,.15); background-size: 220%; background-position: center; }
.card-choice b { display: block; font-size: 20px; }
.card-choice span.desc { display: block; font-size: 16px; color: var(--muted); }
.card-choice span.meta { display: block; font-size: 15px; color: var(--green-dark); font-weight: 700; margin-top: 2px; }
.choice-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 10px; }
.choice { min-height: 64px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); cursor: pointer; text-align: center; }
.choice b { display: block; font-size: 20px; }
.choice span { display: block; font-size: 14px; color: var(--muted); }
.choice:hover { border-color: var(--green); }
.choice[aria-pressed="true"] { border-color: var(--green); background: var(--green-soft); box-shadow: inset 0 0 0 1px var(--green); }
.stepper { display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel); }
.stepper button { width: 54px; min-height: 54px; border: 0; background: var(--green-soft); font-size: 28px; font-weight: 700; cursor: pointer; color: var(--green-dark); }
.stepper button:hover { background: #d4e6cf; }
.stepper button:disabled { opacity: .35; cursor: default; }
.stepper output { min-width: 64px; text-align: center; font-size: 26px; font-weight: 700; }
.stepper.small button { width: 44px; min-height: 44px; font-size: 22px; }
.stepper.small output { min-width: 44px; font-size: 19px; }

/* my plants */
.my-plants { background: #f7f4ec; border-radius: 12px; padding: 14px; margin-bottom: 18px; }
.my-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.my-head h3 { margin: 0; }
.capacity { font-size: 16px; font-weight: 700; color: var(--green-dark); }
.bar { height: 12px; background: #e5dfd1; border-radius: 99px; overflow: hidden; margin: 8px 0 12px; }
.bar span { display: block; height: 100%; background: var(--green); width: 0; transition: width .3s; }
.empty-note { color: var(--muted); margin: 0 0 8px; }
.chosen { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.chosen li { display: grid; grid-template-columns: 52px 1fr auto auto; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px 6px 10px; }
.chosen .p-img { width: 52px; height: 52px; }
.chosen .nm { font-weight: 700; line-height: 1.2; }
.chosen .nm span { display: block; font-weight: 400; font-size: 15px; color: var(--muted); }
.chosen .rm { width: 44px; height: 44px; border: 0; border-radius: 8px; background: none; font-size: 24px; cursor: pointer; color: var(--muted); }
.chosen .rm:hover { background: #f3e1dc; color: #9b1c1c; }
.chosen .warn { grid-column: 2 / -1; font-size: 15px; color: var(--warn); background: var(--warn-bg); border-radius: 8px; padding: 4px 8px; }
.my-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 12px; }

.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
.tabs button { min-height: 52px; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; font-weight: 700; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--green); border-color: var(--green); color: #fff; }
.check { display: flex; gap: 10px; align-items: center; margin: 4px 0 12px; cursor: pointer; min-height: 44px; }
.check input { width: 24px; height: 24px; accent-color: var(--green); }
.plant-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; }
.plant-card { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px; padding: 6px 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); cursor: pointer; text-align: center; }
.plant-card:hover { border-color: var(--green); }
.plant-card .p-img { width: 100%; height: auto; aspect-ratio: 1; }
.plant-card b { font-size: 17px; line-height: 1.2; }
.plant-card .badge { font-size: 14px; font-weight: 700; color: var(--green-dark); }
.plant-card .badge::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #3f8f4f; margin-right: 5px; vertical-align: 1px; }
.plant-card .badge.no { color: #6b5a3a; }
.plant-card .badge.no::before { background: #b9a27a; }
.plant-card[aria-pressed="true"] { border-color: var(--green); background: var(--green-soft); box-shadow: inset 0 0 0 1px var(--green); }
.plant-card[aria-pressed="true"]::after { content: '✓'; position: absolute; top: 6px; right: 8px; width: 26px; height: 26px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 16px; }
.no-plants { color: var(--muted); grid-column: 1 / -1; }

/* plan */
.plan { padding-top: 12px; padding-bottom: 40px; }
.plan-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border-top: 3px solid var(--green); padding-top: 22px; }
.plan-head h2 { display: flex; align-items: center; gap: 14px; margin: 0; }
.plan-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.plan-grid { display: grid; gap: 18px; grid-template-columns: 1fr; margin-top: 16px; }
@media (min-width: 900px) { .plan-grid { grid-template-columns: 1fr 1fr; } .plan-grid .full { grid-column: 1 / -1; } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); min-width: 0; }
.card h3 { color: var(--green-dark); }
.glance { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .glance { grid-template-columns: 1.3fr 1fr; align-items: center; } }
.glance img { border-radius: 10px; border: 1px solid var(--line); width: 100%; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; }
.layout-svg { width: 100%; height: auto; display: block; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 17px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 15px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
td.qty { font-weight: 700; white-space: nowrap; }
td .note { display: block; font-size: 15px; color: var(--muted); }
.cost { font-size: 26px; font-weight: 700; color: var(--green-dark); margin: 0; }
.month { margin-bottom: 14px; }
.month h4 { margin: 0 0 6px; font-size: 19px; color: var(--soil); border-bottom: 2px solid #efe7d6; padding-bottom: 4px; }
.month ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.month li { display: grid; grid-template-columns: 70px 40px 1fr; align-items: center; gap: 6px; }
.month .d { font-weight: 700; }
.month .p-img { width: 40px; height: 40px; }
.tag { display: inline-block; font-size: 13px; font-weight: 700; padding: 1px 8px; border-radius: 99px; margin-left: 6px; vertical-align: 2px; }
.tag.indoor { background: #e8eefc; color: #2b4a8a; }
.tag.plant { background: var(--green-soft); color: var(--green-dark); }
.tag.harvest { background: #fdebd9; color: #8a4513; }
.tag.fall { background: #f3e8d4; color: #6b4a1a; }
.buy-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.buy-list li { display: grid; grid-template-columns: 48px 1fr; gap: 10px; align-items: center; }
.buy-list .p-img { width: 48px; height: 48px; }
td .p-img { display: inline-block; width: 40px; height: 40px; vertical-align: middle; margin-right: 6px; }
.buy-list .links { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 16px; }
.empty-plan { color: var(--muted); }

/* how it works + footer */
.how { padding-top: 20px; padding-bottom: 40px; }
.how-list { display: grid; gap: 14px; padding-left: 1.4em; max-width: 70ch; }
.foot { background: #eef3ea; border-top: 1px solid var(--line); padding: 26px 0 34px; margin-top: 20px; }
.foot p { max-width: 90ch; }

/* info pages */
.article { max-width: 860px; padding-top: 26px; padding-bottom: 40px; }
.article .crumbs { font-size: 16px; color: var(--muted); margin-bottom: 12px; }
.article table { margin: 10px 0 24px; }
.article .cta { background: var(--green-soft); border-radius: var(--radius); padding: 20px; margin: 26px 0; }
.article .cta p { margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 24px; }
.chips a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 6px; background: var(--panel); border: 1px solid var(--line); text-decoration: none; font-weight: 700; }
.chips a:hover { border-color: var(--green); }
.keyfacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 16px 0 24px; }
.keyfacts div { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.keyfacts span { display: block; font-size: 15px; color: var(--muted); }
.keyfacts b { font-size: 21px; }

/* print: just the plan */
@media print {
  @page { margin: 12mm; }
  body { background: #fff; font-size: 12pt; }
  .top, .intro, .workspace, .how, .foot, .plan-actions, #copy-msg, .skip, noscript { display: none !important; }
  .plan { display: block !important; padding: 0; }
  .plan-head { border: 0; padding: 0; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; padding: 12px; }
  .plan-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .plan-grid .full { grid-column: 1 / -1; }
  .buy-list .links a::after { content: ''; }
  a { color: #000; text-decoration: none; }
}

/* info pages: plant pictures */
.chips .p-img { width: 36px; height: 36px; }
.plant-hero { display: grid; gap: 20px; grid-template-columns: 1fr; align-items: center; margin-bottom: 10px; }
@media (min-width: 700px) { .plant-hero { grid-template-columns: 220px 1fr; } }
.plant-hero .p-img { width: 220px; height: 220px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.article li .p-img { display: inline-block; width: 30px; height: 30px; vertical-align: middle; margin-right: 4px; }
