/* Rooti, design system v1 (design/system/): forest and cream, parchment cards, one lime accent per screen. */
:root {
  --forest: #153E32; --forest-2: #1F5442; --night: #111B17; --cream: #F3F0E5; --paper: #FBFAF4;
  --parchment: #E9E5D5; --parchment-2: #DCD6C0; --lime: #C8FF9E; --lime-2: #DDFFC3; --moss: #AEC9AE; --lichen: #56634F; --ink: #14201A;
  --maize: #E6AE2E; --soybean: #78B957; --rice: #2E9E92; --straw: #CDBF8C; --rain: #4A7FC1; --bare: #B8643A;
  --good: #2F7D4F; --care: #C7860F; --danger: #D2452E;
  --line: rgba(21, 62, 50, .1); --line-2: rgba(21, 62, 50, .18);
  --f-display: "Geist", system-ui, sans-serif; --f-body: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif; --f-mono: "Geist Mono", ui-monospace, monospace; --f-brand: "Space Grotesk", system-ui, sans-serif;
  --r-button: 16px; --r-card: 24px; --r-card-l: 32px; --r-section: 48px;
  --ease: cubic-bezier(.16, 1, .3, 1); --ease-io: cubic-bezier(.65, 0, .35, 1); --ease-drawer: cubic-bezier(.32, .72, 0, 1);
  --t-fast: 150ms; --t-base: 250ms; --t-slow: 400ms;
  --side: 16px;
  /* Names the bootcamp stylesheet still uses */
  --surface: var(--paper); --ground: var(--cream); --border: var(--line-2); --ink2: var(--lichen); --muted: var(--lichen); --field: var(--forest); --leaf: var(--lime); --r: 16px; --seg: var(--parchment);
}
@media (min-width: 721px) { :root { --side: 32px; } }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--cream); color: var(--ink); font: 400 16px/1.45 var(--f-body); -webkit-font-smoothing: antialiased; }
html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }
::selection { background: var(--lime); color: var(--forest); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button, a, [role="button"], summary, .pc-grid { touch-action: manipulation; }
/* Controls are not content: a long press must not select their label. */
button, .chip, .opt, .seg button, .bottom-nav a, .pc-grid { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
/* iOS zooms into any field under 16px and never zooms back out. */
@media (pointer: coarse) { input, select, textarea { font-size: 16px !important; } }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; border-radius: 6px; }
.hero :focus-visible, .on-dark :focus-visible { outline-color: var(--lime); }
.icon { width: 1em; height: 1em; display: inline-block; vertical-align: -0.15em; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon.f { stroke: none; fill: currentColor; }
.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--lichen); }
.small { font-size: 14px; color: var(--lichen); line-height: 1.45; }
.err { color: var(--danger); font-weight: 500; }
.mono, .eyebrow { font: 500 12px/1.2 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; }
.display, .h2, .h3 { font-family: var(--f-display); font-weight: 450; letter-spacing: -.045em; line-height: 1; }
.h2 { font-size: 36px; line-height: 1.04; } .h3 { font-size: 26px; line-height: 1.12; letter-spacing: -.025em; }
@media (min-width: 721px) { .h2 { font-size: 52px; } .h3 { font-size: 30px; } }

/* Logo: the Mosaico mark (four plots) and the wordmark */
.lockup { display: inline-flex; align-items: center; gap: .26em; line-height: 1; text-decoration: none; color: var(--forest); font-size: 26px; }
.lockup .mk { display: inline-block; width: .78em; height: .78em; flex: none; }
.lockup .mk svg { display: block; width: 100%; height: 100%; fill: currentColor; overflow: visible; }
.lockup .mk path { transition: transform var(--t-slow) var(--ease); }
.lockup .wordmark { font: 500 1em/1 var(--f-brand); letter-spacing: -.065em; padding-right: .05em; }
.lockup.light { color: var(--cream); }
@media (hover: hover) and (pointer: fine) {
  .lockup:hover .m1 { transform: translate(-4px, -4px); } .lockup:hover .m2 { transform: translate(4px, -4px); }
  .lockup:hover .m3 { transform: translate(4px, 4px); } .lockup:hover .m4 { transform: translate(-4px, 4px); }
}

/* Buttons: mono labels, an icon tile at the end */
.btn {
  --bg: var(--forest); --fg: var(--cream); --dot: var(--lime); --dot-fg: var(--forest);
  display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; padding: 0 20px;
  border: 0; border-radius: var(--r-button); background: var(--bg); color: var(--fg); text-decoration: none; white-space: nowrap;
  font: 500 14px/1 var(--f-mono); letter-spacing: .05em; text-transform: uppercase;
}
.btn .icon { width: 18px; height: 18px; }
.btn:has(> .dot:last-child) { padding-right: 6px; justify-content: space-between; }
.btn .dot { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--dot); color: var(--dot-fg); flex: none; }
.btn.dark { --bg: var(--forest); }
.btn.lime { --bg: var(--lime); --fg: var(--forest); --dot: var(--forest); --dot-fg: var(--lime); }
.btn:not(.dark):not(.lime):not(.glass), .btn.light, .btn.soft { --bg: var(--parchment); --fg: var(--forest); --dot: var(--forest); --dot-fg: var(--cream); }
.btn.glass { --bg: rgba(243, 240, 229, .14); --fg: var(--cream); --dot: rgba(243, 240, 229, .18); --dot-fg: var(--cream); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn.big { min-height: 56px; font-size: 15px; }
.btn.block { width: 100%; }
.btn:disabled { --bg: var(--parchment); --fg: var(--lichen); cursor: default; opacity: .8; }
.link { background: none; border: 0; padding: 6px 0; display: inline-flex; align-items: center; gap: 6px; font: 500 13px/1.2 var(--f-mono); letter-spacing: .05em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; color: var(--forest); cursor: pointer; }
.round { width: 44px; height: 44px; border-radius: 14px; border: 0; background: var(--parchment); color: var(--forest); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.round .icon { width: 20px; height: 20px; }
.pill { border: 0; background: rgba(21, 62, 50, .06); color: var(--forest); border-radius: 12px; padding: 10px 12px; white-space: nowrap; font: 500 12px/1 var(--f-mono); letter-spacing: .06em; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card-h { font-size: 20px; font-weight: 500; letter-spacing: -.01em; }
.seg { display: inline-flex; gap: 2px; padding: 4px; border-radius: 16px; background: var(--parchment); }
.seg button { border: 0; background: transparent; border-radius: 12px; padding: 9px 12px; font-size: 14px; font-weight: 500; color: var(--lichen); white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--forest); color: var(--cream); }
.opt { border: 1px solid var(--line-2); background: var(--paper); border-radius: 14px; padding: 12px 10px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 500; min-height: 48px; min-width: 0; }
.opt[aria-pressed="true"] { background: var(--forest); border-color: var(--forest); color: var(--cream); }
.opt .icon { width: 16px; height: 16px; }
.chip { border: 1px solid var(--line-2); background: var(--paper); border-radius: 12px; padding: 9px 12px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 500; font-size: 15px; }
.chip[aria-pressed="true"] { background: var(--forest); border-color: var(--forest); color: var(--cream); }
.chip .icon { width: 16px; height: 16px; }
.sw { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.sw.good { background: var(--good); } .sw.care { background: var(--care); } .sw.danger { background: var(--danger); } .sw.none { background: var(--parchment-2); }
.sw.bare { background: repeating-linear-gradient(135deg, var(--bare) 0 2px, transparent 2px 4px); box-shadow: inset 0 0 0 1px var(--bare); border-radius: 3px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--lichen); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
/* Verdict and badge: a soft pill with a dot */
.verdict, .badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 10px; border-radius: 999px; font-weight: 500; font-size: 15px; align-self: flex-start; white-space: nowrap; }
.verdict .sw { display: none; }
.verdict::before, .badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.verdict.v-good, .badge.good { background: #E1EEDF; color: var(--good); }
.verdict.v-care, .badge.care { background: #F6E7C7; color: #8E5F06; }
.verdict.v-danger, .badge.danger { background: #F7DCD4; color: #A93220; }
.v-good { color: var(--good); } .v-care { color: #8E5F06; } .v-danger { color: #A93220; }
.pill-eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; background: var(--parchment); color: var(--forest); align-self: flex-start; }
.pill-eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: currentColor; }
.pill-eyebrow.glass { background: rgba(243, 240, 229, .12); color: var(--cream); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.pill-eyebrow.glass::before { background: var(--lime); }
.tile-i { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.tile-i .icon { width: 20px; height: 20px; }
.tile-i.dark { background: var(--forest); color: var(--lime); }
.skeleton { background: linear-gradient(90deg, var(--parchment) 25%, var(--paper) 50%, var(--parchment) 75%); background-size: 400% 100%; animation: sk 1.4s ease infinite; border-radius: var(--r-card); }
@keyframes sk { 0% { background-position: 100% 0 } 100% { background-position: 0 0 } }
.loading { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 24px var(--side); }
.errorcard { margin: 24px var(--side); display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 20px; background: #F7DCD4; color: #7A2416; }
.sheet { border: 0; border-radius: 28px 28px 0 0; padding: 0; width: 100%; max-width: 560px; margin: auto auto 0; overscroll-behavior: contain; background: var(--cream); color: var(--ink); max-height: 88dvh; }
.sheet::backdrop { background: rgba(17, 27, 23, .5); }
.sheet-body { padding: 24px 20px calc(20px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 12px; }
.sheet h2 { font-size: 28px; }
.sheet .cal { margin: 4px 0; }
.choice-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; font-size: 17px; text-align: left; }
ul.bul { display: flex; flex-direction: column; gap: 6px; font-size: 16px; }
ul.bul li { position: relative; padding-left: 18px; }
ul.bul li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 7px; height: 7px; border-radius: 2px; background: var(--lichen); }
ul.bul.good li::before { background: var(--good); } ul.bul.bad li::before { background: var(--danger); }
ul.tips { display: flex; flex-direction: column; gap: 10px; }
ul.tips li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.4; }
ul.tips .ic { width: 30px; height: 30px; border-radius: 9px; background: var(--parchment); display: inline-flex; align-items: center; justify-content: center; flex: none; color: var(--forest); }
ul.tips .ic .icon { width: 17px; height: 17px; }
.read { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: 18px; background: var(--parchment); font-size: 15px; }
.read .icon { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.nino-note { background: #E4ECF6; color: #1F3F66; align-items: center; }
.nino-note .icon { color: var(--rain); }
.nino-note .link { white-space: nowrap; color: inherit; }
@media (max-width: 760px) { .nino-note { flex-wrap: wrap; } .nino-note .grow { flex: 1 1 240px; } .nino-note .link { margin-left: 28px; } }

/* Press feedback lands on touch-down; hover only exists for a real mouse */
.btn, .chip, .opt, .round, .strat, .seg button, .crop, .demo-card, .unk-chip, .pc-now button, .idea .btn { transition: transform var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.btn:active, .chip:active, .opt:active, .round:active, .strat:active, .crop:active, .demo-card:active, .unk-chip:active, .pc-now button:active { transform: scale(.98); }
.seg button:active { transform: scale(.96); }
@media (hover: hover) and (pointer: fine) {
  .btn.dark:hover { --bg: var(--forest-2); }
  .btn:not(.dark):not(.lime):not(.glass):hover { --bg: var(--parchment-2); }
  .btn.lime:hover { --bg: var(--lime-2); }
  .btn:hover .dot .icon { transform: translateX(3px); }
  .btn .dot .icon { transition: transform var(--t-fast) var(--ease); }
  .chip:hover, .opt:hover, .crop:hover { border-color: var(--forest); }
  .strat:hover { border-color: rgba(21, 62, 50, .3); }
  .round:hover { background: var(--parchment-2); }
}

/* ---------- shell ---------- */
#topbar { display: none; }
.app { display: flex; min-height: 100dvh; }
.map-pane { display: none; position: relative; background: #2C3A31; }
#cesium { position: absolute; inset: 0; }
#view { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bottom-nav { display: none; }
body.results .bottom-nav { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: fixed; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); z-index: 5; padding: 6px; gap: 2px; border-radius: 22px; background: rgba(17, 27, 23, .9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .5); }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0 7px; border-radius: 16px; text-decoration: none; color: rgba(243, 240, 229, .65); font: 500 10px/1 var(--f-mono); letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; }
.bottom-nav a .icon { width: 22px; height: 22px; }
.bottom-nav a[aria-current="page"] { background: rgba(243, 240, 229, .1); color: var(--lime); }
.tabs, .seg { position: relative; }
.tabs a, .bottom-nav a, .seg button { position: relative; z-index: 1; }
.tab-ghost { position: absolute; z-index: 0; border-radius: 16px; background: rgba(243, 240, 229, .1); pointer-events: none; }
.tabs .tab-ghost, .seg .tab-ghost { border-radius: 12px; background: var(--forest); }
.tabs a.sliding[aria-current="page"], .bottom-nav a.sliding[aria-current="page"], .seg button.sliding[aria-pressed="true"] { background: transparent; }
.tabs a.dim[aria-current="page"], .seg button.dim[aria-pressed="true"] { color: var(--lichen); }
.bottom-nav a.dim[aria-current="page"] { color: rgba(243, 240, 229, .65); }

/* ---------- landing ---------- */
.landing { display: flex; flex-direction: column; background: var(--cream); }
.hero { position: relative; min-height: 640px; height: 100svh; max-height: 900px; overflow: hidden; background: var(--night); color: var(--cream); display: flex; flex-direction: column; }
.hero-img { position: absolute; inset: 0; background: center 40% / cover no-repeat; }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 50% at 50% 48%, rgba(17, 27, 23, .55), transparent 70%), linear-gradient(180deg, rgba(17, 27, 23, .45), rgba(17, 27, 23, .15) 40%, rgba(17, 27, 23, .75)); }
.hero-art { position: absolute; z-index: 1; left: 50%; top: 0; width: 1440px; height: 100%; margin-left: -720px; pointer-events: none; display: none; }
.hero-art > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-art path { fill: none; stroke: rgba(243, 240, 229, .8); stroke-width: 1.2; }
.hero-art circle { fill: var(--cream); }
.l-nav { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: calc(12px + env(safe-area-inset-top, 0px)) var(--side) 0; padding: 8px 8px 8px 16px; border-radius: 20px; background: rgba(17, 27, 23, .35); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.l-nav .lockup { font-size: 24px; }
.l-links { display: flex; align-items: center; gap: 8px; }
.l-links .pill { background: rgba(243, 240, 229, .12); color: var(--cream); }
.l-links .btn { min-height: 44px; font-size: 12px; }
.hero-copy { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px var(--side) 72px; }
.hero-copy .display { font-size: 52px; margin: 22px 0 18px; max-width: 820px; }
.hero-copy .lead { font-size: 17px; line-height: 1.45; max-width: 560px; color: rgba(243, 240, 229, .86); margin-bottom: 28px; }
.hero-copy .pill-eyebrow { align-self: center; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.hero-source { position: absolute; z-index: 2; left: 0; right: 0; bottom: 64px; text-align: center; color: rgba(243, 240, 229, .6); font-size: 10px; padding: 0 var(--side); }
.motion .hero-copy .display { animation: lead 700ms var(--ease) both; }
.motion .hero-copy .lead, .motion .hero-copy .hero-actions { animation: support 550ms var(--ease) 120ms both; }
.motion .hero-copy .pill-eyebrow { animation: fade 500ms var(--ease) both; }
@keyframes lead { from { opacity: 0; transform: translateY(18px); } }
@keyframes support { from { opacity: 0; transform: translateY(8px); } }
@keyframes fade { from { opacity: 0; } }
/* The landing answers the scroll: the hero falls behind the rising sheet, photos open out of a smaller window and headings darken
   as they arrive. Nothing turns see-through mid-way; individual translate/scale leave `transform` free for press feedback. */
@supports (animation-timeline: view()) {
  .motion .hero-img { animation: hero-drift linear both; animation-timeline: scroll(root); animation-range: 0 100svh; }
  .motion .hero-copy, .motion .hero-art { animation: hero-behind linear both; animation-timeline: scroll(root); animation-range: 0 90svh; }
  .motion .l-sheet { animation: sheet-flat linear both; animation-timeline: scroll(root); animation-range: 0 70svh; }
  .motion .l-sheet .h2 { animation: ink linear both; animation-timeline: view(); animation-range: entry 20% cover 40%; }
  .motion .how { animation: lift linear both; animation-timeline: view(); animation-range: entry 0% entry 100%; }
  .motion .how:nth-child(2) { animation-name: lift-2; }
  .motion .how:nth-child(3) { animation-name: lift-3; }
  .motion .demo-card { animation: open-out linear both; animation-timeline: view(); animation-range: entry 0% entry 100%; }
  .motion .demo-card img { animation: img-settle linear both; animation-timeline: view(); animation-range: entry 0% cover 50%; }
  .motion .l-foot .lockup { animation: from-below linear both; animation-timeline: view(); animation-range: entry 0% entry 100%; }
}
@keyframes hero-drift { to { translate: 0 22%; } }
@keyframes hero-behind { 60% { opacity: 1; } to { opacity: .35; translate: 0 18vh; scale: .96; } }
@keyframes sheet-flat { from { border-radius: 140px 140px 0 0; } }
@keyframes ink { from { color: var(--parchment-2); } }
@keyframes lift { from { translate: 0 48px; } }
@keyframes lift-2 { from { translate: 0 80px; } }
@keyframes lift-3 { from { translate: 0 112px; } }
@keyframes open-out { from { clip-path: inset(14% 10% 0 10% round 96px); } to { clip-path: inset(0 round var(--r-card-l)); } }
@keyframes img-settle { from { scale: 1.2; } }
@keyframes from-below { from { translate: 0 70%; } }
.l-sheet { position: relative; z-index: 3; margin-top: -48px; background: var(--cream); border-radius: 48px 48px 0 0; padding: 48px 0 0; }
.l-wrap { max-width: 1280px; margin: 0 auto; padding: 0 var(--side); display: flex; flex-direction: column; gap: 28px; }
.l-how { display: grid; grid-template-columns: 1fr; gap: 10px; }
.how { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; row-gap: 4px; padding: 18px; border-radius: var(--r-card); background: var(--paper); border: 1px solid var(--line); }
.how .tile-i { grid-row: span 2; width: 44px; height: 44px; border-radius: 13px; }
.how .tile-i .icon { width: 24px; height: 24px; }
.how b { font-weight: 500; font-size: 18px; letter-spacing: -.01em; }
.how p { color: var(--lichen); font-size: 15px; }
.l-demos { display: grid; grid-template-columns: 1fr; gap: 10px; }
.demo-card { position: relative; display: block; border: 0; padding: 0; border-radius: var(--r-card-l); overflow: hidden; color: var(--cream); aspect-ratio: 4 / 4.4; text-align: left; background: var(--forest); }
.demo-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.demo-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(17, 27, 23, 0) 35%, rgba(17, 27, 23, .85)); }
.demo-card .txt { position: absolute; z-index: 1; left: 22px; right: 22px; bottom: 20px; display: flex; flex-direction: column; gap: 12px; }
.demo-card .h3 { font-size: 30px; }
.demo-card .go { display: inline-flex; align-items: center; gap: 10px; font: 500 12px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--lime); }
.l-boot { display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: var(--r-card); background: var(--forest); color: var(--cream); text-decoration: none; }
.l-boot .tile-i { background: var(--lime); color: var(--forest); width: 48px; height: 48px; border-radius: 14px; }
.l-boot b { display: block; font-weight: 500; font-size: 18px; }
.l-boot p { color: rgba(243, 240, 229, .7); font-size: 15px; }
.l-boot > .icon { margin-left: auto; width: 22px; height: 22px; color: var(--lime); }
.l-foot { margin-top: 56px; background: var(--forest); color: var(--cream); padding: 48px 0 calc(24px + env(safe-area-inset-bottom, 0px)); overflow: hidden; }
.l-foot .lockup { font-size: 92px; color: var(--cream); }
.l-foot .credits { margin-top: 32px; padding-top: 18px; border-top: 1px solid rgba(243, 240, 229, .15); font: 400 12px/1.6 var(--f-mono); color: rgba(243, 240, 229, .6); }
.l-foot .credits p + p { margin-top: 6px; }
.l-examples { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media (min-width: 721px) {
  .hero-art { display: block; }
  .hero-copy .display { font-size: 96px; line-height: .98; }
  .hero-copy .lead { font-size: 20px; }
  .l-nav { margin-top: 16px; max-width: 1360px; width: calc(100% - 2 * var(--side)); align-self: center; padding-left: 22px; background: rgba(233, 229, 213, .14); }
  .l-links .btn { font-size: 13px; }
  .l-sheet { margin-top: -96px; border-radius: 96px 96px 0 0; padding-top: 88px; }
  .l-how { grid-template-columns: repeat(3, 1fr); }
  .how { grid-template-columns: 1fr; padding: 24px; row-gap: 10px; }
  .how .tile-i { grid-row: auto; margin-bottom: 18px; }
  .l-demos { grid-template-columns: repeat(3, 1fr); }
  .l-foot .lockup { font-size: 200px; }
}
@media (max-width: 720px) { .l-links .desk-only { display: none; } }

/* ---------- planner, phone: one step per screen ---------- */
.step { flex: 1; display: flex; flex-direction: column; gap: 18px; padding: calc(16px + env(safe-area-inset-top, 0px)) var(--side) calc(20px + env(safe-area-inset-bottom, 0px)); min-height: 100dvh; }
.step-head { display: flex; flex-direction: column; gap: 14px; }
.step-head .small { font: 500 12px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; }
.progress { display: flex; gap: 6px; }
.progress i { flex: 1; height: 4px; border-radius: 2px; background: var(--parchment-2); transition: background var(--t-base) var(--ease); }
.progress i.on { background: var(--forest); }
.step h1 { font-size: 40px; }
.step .help { font-size: 16px; color: var(--lichen); margin-top: 10px; }
.step .spacer { flex: 1; }
.search { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 0 18px; background: var(--paper); border: 1px solid var(--line-2); border-radius: 18px; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 17px; }
.search .icon { width: 20px; height: 20px; color: var(--lichen); }
.geo { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.geo:empty { display: none; }
.geo button { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 0; background: none; text-align: left; min-height: 56px; }
.geo button + button { border-top: 1px solid var(--line); }
.geo small { display: block; color: var(--lichen); font-size: 14px; }
.mapbox { position: relative; height: 280px; border-radius: var(--r-card); overflow: hidden; background: #2C3A31; flex: none; }
.place { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--forest); color: var(--cream); border-radius: 18px; }
.place .icon { width: 22px; height: 22px; color: var(--lime); }
.place b { display: block; font-size: 18px; font-weight: 500; } .place small { color: rgba(243, 240, 229, .7); font-size: 14px; }
.place .link { color: var(--lime); }
.dates { display: flex; gap: 8px; }
.date { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; background: var(--paper); border: 1px solid var(--line-2); border-radius: 18px; min-width: 0; }
.date small { font: 500 11px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--lichen); }
.date input { border: 0; outline: 0; background: transparent; font-weight: 500; font-size: 17px; padding: 0; min-height: 28px; width: 100%; }
.period { display: flex; gap: 3px; }
.period i { flex: 1; height: 10px; border-radius: 3px; }
.period i.w { background: var(--rain); opacity: .55; } .period i.s { background: var(--maize); opacity: .55; }
.crops { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.crop { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 10px; min-height: 60px; background: var(--paper); border: 1px solid var(--line-2); border-radius: 18px; text-align: left; }
.crop > span:not(.tile-i) { display: flex; flex-direction: column; min-width: 0; }
.crop b { font-size: 16px; font-weight: 500; } .crop small { font-size: 12px; color: var(--lichen); }
.crop[aria-pressed="true"] { background: var(--forest); border-color: var(--forest); color: var(--cream); }
.crop[aria-pressed="true"] small { color: rgba(243, 240, 229, .7); }
.crop .tick { position: absolute; top: 8px; right: 8px; width: 20px; height: 20px; border-radius: 50%; background: var(--lime); color: var(--forest); padding: 3px; }
.area { display: flex; flex-direction: column; gap: 12px; padding: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-card); }
.area-num { display: flex; align-items: center; justify-content: space-between; }
.area-num input { font-variant-numeric: tabular-nums; width: 150px; text-align: center; border: 0; outline: 0; background: transparent; font-family: var(--f-display); font-weight: 450; letter-spacing: -.045em; font-size: 52px; }
.area-num .round { width: 52px; height: 52px; }
.area .seg { display: flex; } .area .seg button { flex: 1; }
.q { display: flex; flex-direction: column; gap: 8px; }
.q > b { font-size: 17px; font-weight: 500; }
.opts { display: flex; gap: 8px; } .opts .opt { flex: 1; }

/* ---------- planner, computer: full map and one floating panel ---------- */
.map-hint { position: absolute; left: 24px; bottom: 24px; display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px; background: rgba(17, 27, 23, .85); color: var(--cream); font-size: 14px; z-index: 2; backdrop-filter: blur(10px); }

/* ---------- results, shared ---------- */
.res { flex: 1; display: flex; flex-direction: column; gap: 14px; padding: calc(14px + env(safe-area-inset-top, 0px)) var(--side) 104px; }
.res-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.res-head b { font-size: 20px; font-weight: 500; display: block; }
.res-head small { font: 500 11px/1.3 var(--f-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--lichen); display: block; margin-top: 2px; }
.res-head .btn { min-height: 40px; font-size: 12px; padding: 0 14px; }
.res-title h1 { font-size: 40px; } .res-title p { font-size: 16px; color: var(--lichen); margin-top: 10px; max-width: 640px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpis > div { padding: 14px; border-radius: 18px; background: var(--cream); }
.kpis b { font-family: var(--f-display); font-weight: 450; letter-spacing: -.03em; font-size: 26px; line-height: 1.05; display: block; font-variant-numeric: tabular-nums; }
.kpis small { font-size: 13px; color: var(--lichen); }
.hint { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 20px; background: var(--forest); color: var(--cream); text-decoration: none; font-weight: 500; font-size: 15px; }
.hint .icon { width: 20px; height: 20px; } .hint .icon:first-child { color: var(--lime); }

/* farm calendar, compact version (sheets and compare): one lane per plot, crops by colour */
.cal { display: flex; flex-direction: column; gap: 6px; }
.cal-block { display: flex; flex-direction: column; gap: 6px; }
.cal-row { display: grid; grid-template-columns: var(--lab, 64px) 1fr; gap: 8px; align-items: center; }
.cal-name { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.cal-name b { font-size: 14px; font-weight: 500; } .cal-name small { font-size: 12px; color: var(--lichen); }
.cal-grid { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); position: relative; }
.cal-head span { font: 500 10px/1 var(--f-mono); letter-spacing: .02em; color: var(--lichen); text-align: center; white-space: nowrap; overflow: hidden; }
.cal-head span.yr { color: var(--ink); }
.cal-grid.track { background: rgba(21, 62, 50, .05); border-radius: 9px; }
.bar { position: relative; margin: 0 1px; height: 32px; border-radius: 9px; border: 0; display: flex; flex-direction: column; justify-content: center; padding: 0 8px; background: var(--c, var(--moss)); color: var(--ink); text-align: left; overflow: hidden; min-width: 0; }
.bar.light { color: #fff; }
.bar b { font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar small { display: none; }
.bar.straw { background: repeating-linear-gradient(115deg, #D8CCA0 0 3px, #CDBF8C 3px 7px); color: #5E5530; }
.bar.care::after, .bar.danger::after { content: ""; position: absolute; top: 5px; right: 5px; width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 0 2px var(--paper); }
.bar.care::after { background: var(--care); } .bar.danger::after { background: var(--danger); }
.bar.grow { transform-origin: left center; animation: grow-x .6s var(--ease) both; }
@keyframes grow-x { from { transform: scaleX(0); } }
.rain-row .cal-grid { align-items: end; height: 70px; }
.rain-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; height: 100%; padding: 0 3px; }
.rain-col i { display: block; width: 100%; border-radius: 4px; background: var(--rain); min-height: 3px; flex: none; }
.rain-col span { font: 500 10px/1 var(--f-mono); color: var(--lichen); }
.cal.plots .rain-row { margin-top: 16px; }

/* ---------- plan screen ---------- */
.pv { display: flex; flex-direction: column; gap: 14px; }
.pv-panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-card-l); overflow: hidden; }
.pv-body { display: flex; flex-direction: column; }
.pv-left { padding: 22px 18px; display: flex; flex-direction: column; gap: 26px; border-bottom: 1px solid var(--line); min-width: 0; }
.pv-right { padding: 22px 18px; display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.pv-a, .pv-b { display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.pv-block { display: flex; flex-direction: column; gap: 12px; }
.pv-block > b, .pv-block > .pv-lab { font-weight: 500; font-size: 17px; }
#pvHead { scroll-margin-top: 96px; }
#pvHead .h3 { font-size: 32px; }
.pv-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pv-cards { padding: 22px 18px; border-top: 1px solid var(--line); }
.pv-foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; padding: 18px; border-top: 1px solid var(--line); }
.swap { animation: swap var(--t-base) var(--ease); }
@keyframes swap { from { opacity: .2; transform: translateY(6px); } }
.motion .badge.flash { animation: flash 250ms var(--ease) 400ms; }
@keyframes flash { 0% { box-shadow: 0 0 0 0 rgba(200, 255, 158, .9); } 100% { box-shadow: 0 0 0 10px rgba(200, 255, 158, 0); } }

/* Route: crop tile, crop name, months spelled out */
.route { display: flex; flex-direction: column; gap: 14px; }
.rt-plot + .rt-plot { padding-top: 14px; border-top: 1px solid var(--line); }
.rt-lab { display: block; font: 500 10px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--lichen); margin-bottom: 8px; }
/* The route as stacked blocks (like Scratch): each block's tab fits into the next one, so the order reads top to bottom */
.rt-steps { display: flex; flex-direction: column; align-items: stretch; width: fit-content; min-width: min(100%, 230px); max-width: 100%; }
.rt-steps li { --fill: color-mix(in srgb, var(--c) 24%, var(--cream)); position: relative; display: flex; align-items: center; gap: 10px; padding: 9px 16px 9px 7px; background: var(--fill); border-radius: 6px; }
.rt-steps li:first-child { border-top-left-radius: 14px; border-top-right-radius: 14px; }
.rt-steps li:last-child { border-bottom-left-radius: 14px; border-bottom-right-radius: 14px; }
.rt-steps li { --edge: color-mix(in srgb, var(--c) 60%, var(--cream)); box-shadow: inset 0 -2px 0 var(--edge); }
.rt-steps li + li { margin-top: 2px; }
/* the tab: a darker outline (::before) with the block's fill on top (::after) */
.rt-steps li:not(:last-child)::before, .rt-steps li:not(:last-child)::after { content: ""; position: absolute; left: 16px; width: 32px; clip-path: polygon(0 0, 100% 0, 76% 100%, 24% 100%); }
.rt-steps li:not(:last-child)::before { z-index: 2; bottom: -10px; height: 10px; background: var(--edge); }
.rt-steps li:not(:last-child)::after { z-index: 3; left: 18px; width: 28px; bottom: -7px; height: 9px; background: var(--fill); }
.rt-steps li.bare b { color: #8A4626; }
.rt-steps p { line-height: 1.2; }
.rt-steps b { display: block; font-weight: 500; font-size: 15px; }
.rt-steps p span { font-size: 13px; color: color-mix(in srgb, var(--forest) 70%, transparent); }

/* Stat: the number, then a plain sentence */
.statbox { display: flex; align-items: flex-end; gap: 14px; }
.stat { font-family: var(--f-display); font-weight: 450; font-size: 88px; line-height: .86; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.statbox p { margin: 0 0 8px; max-width: 230px; font-size: 17px; line-height: 1.3; color: var(--lichen); }
.statbox p b { color: var(--ink); font-weight: 500; }

/* Year dots: one per real year */
.dots { position: relative; display: grid; grid-template-columns: repeat(var(--cols, 22), 1fr); gap: 6px; max-width: 520px; }
.dots i { aspect-ratio: 1; border-radius: 50%; background: var(--good); transition: transform var(--t-base) var(--ease), background-color 200ms var(--ease); cursor: pointer; }
.dots i.c { background: var(--care); } .dots i.x { background: var(--danger); }
.dots i.n { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--rain); }
.dots i.on { transform: scale(1.45); }
@media (hover: hover) and (pointer: fine) { .dots i:hover { transform: scale(1.45); } }
.dots-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 2px; font-size: 13px; color: var(--lichen); }
.dots-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dots-legend i { width: 10px; height: 10px; border-radius: 50%; }
.dots-legend i.n { background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--rain); }
.dot-tip { position: absolute; z-index: 5; pointer-events: none; transform: translate(-50%, calc(-100% - 12px)); background: var(--night); color: var(--cream); padding: 9px 12px; border-radius: 10px; font-size: 13px; line-height: 1.3; white-space: nowrap; opacity: 0; transition: opacity var(--t-fast); }
.dot-tip.on { opacity: 1; }
.dot-tip b { font: 500 11px/1 var(--f-mono); letter-spacing: .05em; display: block; margin-bottom: 4px; color: var(--lime); }

/* Soil cover squares */
.squares { display: grid; grid-template-columns: repeat(var(--n, 12), minmax(0, 1fr)); gap: 5px; max-width: 520px; }
.squares div { display: flex; flex-direction: column; align-items: center; gap: 6px; font: 500 10px/1 var(--f-mono); color: var(--lichen); }
.squares i { width: 100%; aspect-ratio: 1; border-radius: 7px; background: var(--good); transition: background var(--t-base) var(--ease); }
.squares i.bare { background: repeating-linear-gradient(135deg, rgba(184, 100, 58, .35) 0 4px, rgba(184, 100, 58, .12) 4px 8px); box-shadow: inset 0 0 0 1.5px var(--bare); }

/* Calendar: rain curve, one lane per plot, a playhead that follows tap, drag or arrow keys */
.pcal { --gap: 2px; position: relative; }
.pc-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 16px; }
.pc-when .mono { display: block; color: var(--lichen); margin-bottom: 10px; }
.pc-big { font-family: var(--f-display); font-weight: 450; letter-spacing: -.045em; font-size: 34px; line-height: 1; }
.pc-big small { font-size: .5em; color: var(--lichen); letter-spacing: -.01em; margin-left: 6px; }
.pc-rain { text-align: right; }
.pc-rain .pc-big { color: var(--rain); }
.pc-rain .mono { display: block; margin-top: 8px; color: var(--lichen); }
.pc-now { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 22px; }
.pc-now button { display: flex; align-items: center; gap: 10px; padding: 7px; border: 0; border-radius: 14px; background: var(--cream); min-width: 0; text-align: left; }
.pc-now p { min-width: 0; font-size: 15px; line-height: 1.2; }
.pc-now p span { display: block; font: 500 10px/1.2 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--lichen); margin-bottom: 3px; }
.pc-grid { position: relative; display: grid; grid-template-columns: repeat(var(--n, 12), minmax(0, 1fr)); column-gap: var(--gap); touch-action: pan-y; cursor: ew-resize; }
.pc-area { grid-row: 1; grid-column: 1 / -1; width: 100%; height: 84px; display: block; z-index: 1; overflow: visible; }
.pc-area .fill { fill: url(#pcRain); }
.pc-area .line { fill: none; stroke: var(--rain); stroke-width: 2.5; stroke-linejoin: round; }
.pc-lab { grid-column: 1 / -1; z-index: 1; font: 500 10px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--lichen); padding: 14px 0 7px; display: flex; gap: 8px; }
.pc-lab b { font-weight: 500; color: var(--ink); }
.pc-track { grid-column: 1 / -1; height: 30px; border-radius: 9px; background: rgba(21, 62, 50, .05); z-index: 1; }
.pc-run { position: relative; z-index: 2; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0; min-width: 0; overflow: hidden; color: var(--ink); font-size: 13px; font-weight: 500; }
.pc-run.light { color: #fff; }
.pc-run span { display: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-run.straw { background: repeating-linear-gradient(115deg, #D8CCA0 0 3px, #CDBF8C 3px 7px) !important; color: #5E5530; }
.pc-run.bare { background: repeating-linear-gradient(135deg, rgba(184, 100, 58, .2) 0 5px, rgba(184, 100, 58, .06) 5px 10px) !important; box-shadow: inset 0 0 0 1.5px rgba(184, 100, 58, .7); color: #8A4626; }
.pc-run.care::after, .pc-run.danger::after { content: ""; position: absolute; top: 4px; right: 4px; width: 7px; height: 7px; border-radius: 50%; box-shadow: 0 0 0 1.5px var(--paper); }
.pc-run.care::after { background: var(--care); } .pc-run.danger::after { background: var(--danger); }
.pc-month { z-index: 1; text-align: center; font: 500 10px/1 var(--f-mono); color: var(--lichen); padding: 14px 0 0; transition: color var(--t-base); white-space: nowrap; overflow: visible; }
.pc-month.on { color: var(--ink); }
.pc-season { z-index: 1; font: 500 10px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--lichen); padding-top: 12px; display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; }
.pc-season::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: .35; }
.pc-season.w { color: #3E6EA8; }
.pc-season.short, .pc-season.tiny, .pc-season.nofit { font-size: 0; }
.pc-hit { z-index: 4; border: 0; background: none; padding: 0; border-radius: 10px; }
.pc-dot { position: absolute; z-index: 3; top: 0; left: 0; width: 0; pointer-events: none; transition: transform var(--t-base) var(--ease); }
.pc-dot .pc-pt { position: absolute; left: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--rain); box-shadow: 0 0 0 3px var(--paper); transition: top var(--t-base) var(--ease); }
/* While the finger is down the playhead is the finger: no easing behind it */
.pc-grid.dragging .pc-dot, .pc-grid.dragging .pc-pt { transition: none; }
.pc-dot::before { content: ""; position: absolute; left: -1px; top: 0; bottom: 0; width: 2px; background: var(--forest); border-radius: 2px; }
.pc-dot b { position: absolute; left: 0; top: -26px; transform: translateX(-50%); background: var(--forest); color: var(--cream); font: 500 11px/1 var(--f-mono); padding: 6px 8px; border-radius: 8px; white-space: nowrap; }
.pc-note { margin-top: 12px; }

/* Strategy cards */
.strats { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; margin: 0 -18px; padding: 4px 18px 12px; scrollbar-width: none; }
.strat { position: relative; flex: 0 0 80%; scroll-snap-align: start; text-align: left; border-radius: var(--r-card); padding: 18px; background: var(--paper); border: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 14px; }
.strat .spec { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.strat .radio { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px currentColor; display: grid; place-items: center; flex: none; }
.strat[aria-checked="true"] { background: var(--forest); color: var(--cream); border-color: var(--forest); }
.strat[aria-checked="true"] .spec { color: var(--lime); }
.strat[aria-checked="true"] .radio::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); }
.strat .pname { display: flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 450; letter-spacing: -.035em; font-size: 24px; line-height: 1.05; min-height: 2.1em; }
.strat .pname .icon { width: 26px; height: 26px; }
.cropline { display: flex; flex-wrap: wrap; gap: 6px; }
.cl-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 10px; background: rgba(21, 62, 50, .06); font-size: 14px; font-weight: 500; }
.cl-chip i { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; color: var(--ink); }
.cl-chip i .icon { width: 16px; height: 16px; }
.cl-chip.bare { color: #8A4626; }
.cl-note { font: 500 10px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; opacity: .6; margin-top: -6px; }
.strat[aria-checked="true"] .cl-chip { background: rgba(243, 240, 229, .1); }
.strat[aria-checked="true"] .cl-chip.bare { color: #F2B38F; }
.mini { display: grid; gap: 3px; }
.mini div { display: grid; grid-template-columns: repeat(var(--n, 12), minmax(0, 1fr)); gap: 2px; }
.mini i { height: 9px; border-radius: 2px; }
.mini i.bare { background: repeating-linear-gradient(135deg, var(--bare) 0 2px, transparent 2px 4px) !important; opacity: .7; }
.facts { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.facts span { display: flex; align-items: center; gap: 8px; }
.facts .icon { width: 18px; height: 18px; opacity: .8; }
.strat .badge { font-size: 14px; }
.strat[aria-checked="true"] .badge.good { background: rgba(200, 255, 158, .16); color: var(--lime); }
.strat[aria-checked="true"] .badge.care { background: rgba(246, 231, 199, .16); color: #F2C66B; }
.strat[aria-checked="true"] .badge.danger { background: rgba(247, 220, 212, .16); color: #F4A595; }

/* What we don't know: short chips, one sentence on tap */
.unk { display: flex; flex-wrap: wrap; gap: 8px; }
.unk-chip { border: 1px solid rgba(21, 62, 50, .16); background: transparent; border-radius: 16px; padding: 0; text-align: left; overflow: hidden; max-width: 100%; }
.unk-chip .top { display: flex; align-items: center; gap: 8px; padding: 9px 12px 9px 10px; font-weight: 500; font-size: 15px; }
.unk-chip .top .icon { width: 20px; height: 20px; color: var(--lichen); }
.unk-chip .plus { width: 18px; height: 18px; margin-left: 4px; position: relative; flex: none; }
.unk-chip .plus::before, .unk-chip .plus::after { content: ""; position: absolute; left: 4px; right: 4px; top: 8.25px; height: 1.5px; background: currentColor; transition: transform var(--t-base) var(--ease); }
.unk-chip .plus::after { transform: rotate(90deg); }
.unk-chip[aria-expanded="true"] { background: var(--parchment); border-color: transparent; }
.unk-chip[aria-expanded="true"] .plus::after { transform: rotate(0); }
.unk-chip .more { contain: inline-size; display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--t-base) var(--ease); }
.unk-chip .more > div { overflow: hidden; }
.unk-chip .more p { padding: 0 14px 12px 38px; font-size: 14px; color: var(--lichen); max-width: 320px; }
.unk-chip[aria-expanded="true"] .more { grid-template-rows: 1fr; }
.source { position: relative; display: inline-flex; align-items: center; gap: 8px; font: 400 12px/1.3 var(--f-mono); color: var(--lichen); border: 0; background: none; padding: 4px 0; text-align: left; }
.source .icon { width: 16px; height: 16px; }
.source .pop { position: absolute; left: 0; bottom: calc(100% + 8px); width: 280px; background: var(--night); color: var(--cream); font: 400 13px/1.45 var(--f-body); padding: 12px 14px; border-radius: 12px; opacity: 0; transform: translateY(4px); pointer-events: none; transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease); z-index: 6; }
.source[aria-expanded="true"] .pop { opacity: 1; transform: none; }
@media (hover: hover) and (pointer: fine) { .source:hover .pop { opacity: 1; transform: none; } }

/* ideas */
.ideas { display: flex; flex-direction: column; gap: 10px; }
.idea { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-card); }
.idea .ic { width: 44px; height: 44px; border-radius: 13px; background: var(--forest); display: inline-flex; align-items: center; justify-content: center; flex: none; color: var(--lime); }
.idea .ic .icon { width: 22px; height: 22px; }
.idea b { display: block; font-size: 16px; font-weight: 500; } .idea p { font-size: 14px; color: var(--lichen); line-height: 1.35; margin-top: 2px; }
.idea em { display: inline-block; margin-top: 6px; font-style: normal; font: 500 12px/1.3 var(--f-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--good); }
.idea .btn { min-height: 42px; padding: 0 16px; font-size: 12px; }
.idea.on { border-color: var(--forest); box-shadow: inset 0 0 0 1px var(--forest); }
.sow { display: flex; flex-direction: column; gap: 6px; }
.sow-row { display: grid; grid-template-columns: var(--lab, 64px) 1fr; gap: 8px; align-items: center; }
.sow-row b { font-weight: 500; }
.sow-cells { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 2px; }
.sow-cells i { height: 24px; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-style: normal; }
.sow-cells i.good { background: var(--good); } .sow-cells i.care { background: var(--care); } .sow-cells i.danger { background: var(--danger); } .sow-cells i.none { background: var(--parchment); }
.sow-group { font: 500 11px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--lichen); margin-top: 8px; }

/* the plot from the satellite, with the plan's plots drawn as an example split */
.plot-map { position: relative; height: 300px; border-radius: var(--r-card-l); overflow: hidden; background: #2C3A31; color: var(--cream); flex: none; }
.plot-map > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.plot-map::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(17, 27, 23, .1), rgba(17, 27, 23, .65)); pointer-events: none; }
.pm-lot { position: absolute; z-index: 1; left: 50%; top: 42%; transform: translate(-50%, -50%); width: min(70%, 440px); height: 42%; display: flex; gap: 3px; padding: 3px; border-radius: 16px; box-shadow: 0 0 0 2px var(--lime); }
.pm-plot { flex-basis: 0; min-width: 0; border-radius: 12px; background: color-mix(in srgb, var(--c) 30%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 80%, transparent); display: flex; align-items: flex-end; padding: 8px; }
.pm-plot span { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 12px; line-height: 1.2; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.pm-plot span .tile-i { width: 28px; height: 28px; border-radius: 8px; margin-bottom: 4px; text-shadow: none; }
.pm-plot b { font: 500 10px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; }
.pm-cap { position: absolute; z-index: 1; left: 20px; right: 20px; bottom: 16px; display: flex; flex-direction: column; gap: 2px; }
.pm-cap b { font-weight: 500; font-size: 17px; } .pm-cap span { font-size: 13px; color: rgba(243, 240, 229, .75); }
.cl-chip.more { padding: 4px 10px; }
.row-ideas { display: grid; grid-template-columns: 1fr; gap: 10px; }

/* compare */
.cmp-seg { align-self: flex-start; }
.cmp-bars { gap: 16px; }
.cmp-key { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--lichen); }
.cmp-key span { display: inline-flex; align-items: center; gap: 6px; }
.cmp-key i { width: 10px; height: 10px; border-radius: 3px; }
.cmp-key i.a, .cb-line.a .cb-track i { background: var(--forest); } .cmp-key i.b, .cb-line.b .cb-track i { background: var(--moss); }
.cb-row { display: flex; flex-direction: column; gap: 5px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.cb-row:last-child { border-bottom: 0; padding-bottom: 0; }
.cb-label { font-size: 15px; font-weight: 500; }
.cb-line { display: grid; grid-template-columns: 1fr 96px 18px; align-items: center; gap: 10px; }
.cb-track { height: 12px; border-radius: 6px; background: var(--cream); overflow: hidden; }
.cb-track.empty { background: transparent; }
.cb-track i { display: block; height: 100%; border-radius: 6px; transition: width var(--t-base) var(--ease); }
.cb-line b { text-align: right; font-weight: 400; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 15px; }
.cb-line.win b { font-weight: 600; color: var(--good); }
.cb-line .icon { width: 18px; height: 18px; color: var(--good); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.plot { display: flex; flex-direction: column; gap: 10px; }
.plot-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.plot-head > b { font-weight: 500; font-size: 17px; }
.plot-area { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--lichen); }
.plot-area input { width: 96px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 10px; font-weight: 500; color: var(--ink); background: var(--cream); }
.pl-step { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pl-step select { padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--cream); font-weight: 500; font-size: 14px; min-height: 40px; }
.pl-step .res-txt { font-size: 13px; font-weight: 500; }
.pl-step .x { border: 0; background: none; color: var(--lichen); padding: 6px; }
.cmp { width: 100%; border-collapse: collapse; font-size: 15px; }
.cmp th, .cmp td { padding: 12px 4px; text-align: left; font-weight: 400; border-bottom: 1px solid var(--line); }
.cmp tr:last-child th, .cmp tr:last-child td { border-bottom: 0; }
.cmp thead th { font: 500 11px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--lichen); }
.cmp td { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cmp td.win { color: var(--good); font-weight: 500; }
.conclusion { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 20px; font-weight: 500; }
.conclusion.good { background: var(--forest); color: var(--cream); } .conclusion.good .icon { color: var(--lime); }
.conclusion.even { background: var(--parchment); }
.conclusion .icon { width: 20px; height: 20px; margin-top: 1px; }
.cals2 { display: flex; flex-direction: column; gap: 12px; }
.cals2 .card > .row > b { font-weight: 500; }

/* what if */
.years { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.years button { min-height: 44px; border: 0; border-radius: 12px; font: 500 13px/1 var(--f-mono); }
.years button.good { background: #E1EEDF; color: var(--good); } .years button.care { background: #F6E7C7; color: #8E5F06; } .years button.danger { background: #F7DCD4; color: #A93220; }
.years button[aria-pressed="true"] { background: var(--forest); color: var(--cream); }
.years button.good[aria-pressed="true"] { box-shadow: inset 0 -4px 0 var(--good); } .years button.care[aria-pressed="true"] { box-shadow: inset 0 -4px 0 var(--care); } .years button.danger[aria-pressed="true"] { box-shadow: inset 0 -4px 0 var(--danger); }
.pp-answer { border-radius: var(--r-card); padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.pp-answer.good { background: #E1EEDF; } .pp-answer.danger { background: #F7DCD4; }
.pp-answer b { font-size: 22px; font-weight: 500; }
.pp-years li { display: flex; justify-content: space-between; padding: 12px 2px; font-size: 16px; border-bottom: 1px solid var(--line); }

/* plot and climate */
.trow { display: grid; grid-template-columns: 130px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.trow > span { color: var(--lichen); } .trow b { display: block; font-size: 16px; font-weight: 500; } .trow small { color: var(--lichen); font-size: 13px; }
.clim-bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; height: 150px; align-items: end; }
.cb { display: flex; flex-direction: column; align-items: center; gap: 3px; height: 100%; justify-content: flex-end; font: 500 10px/1 var(--f-mono); color: var(--lichen); }
.cb .bars { flex: 1; width: 100%; display: flex; align-items: flex-end; gap: 2px; }
.cb .bars i { flex: 1; border-radius: 4px 4px 0 0; } .cb .bars i.r { background: var(--rain); } .cb .bars i.e { background: var(--parchment-2); }

@media (max-width: 1023px) { .desk-only { display: none !important; } }
@media (min-width: 1024px) { .phone-only { display: none !important; } }

/* ---------- tablet: plan and its evidence side by side ---------- */
@media (min-width: 721px) {
  .pv-left, .pv-right { padding: 28px 26px; }
  .pv-foot { padding: 18px 24px; }
  .pv-cards { padding: 26px; }
  .pv-left { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
  .pcal { --gap: 4px; }
  .pc-big { font-size: 44px; }
  .pc-area { height: 104px; }
  .pc-now { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
  .pc-run { justify-content: flex-start; padding: 0 10px; }
  .pc-run span { display: block; }
  .pc-month { font-size: 11px; letter-spacing: .04em; }
  .strats { display: grid; grid-template-columns: 1fr 1fr; overflow: visible; margin: 0; padding: 0; }
  .stat { font-size: 96px; }
  .res-title h1 { font-size: 52px; }
  .crops { grid-template-columns: repeat(3, 1fr); }
  .years { grid-template-columns: repeat(10, 1fr); }
  .sow-cells i { height: 40px; }
}

/* ---------- computer ---------- */
@media (min-width: 1024px) {
  body.app-route #topbar { display: flex; }
  #topbar { position: sticky; top: 0; z-index: 6; height: 72px; padding: 0 24px; align-items: center; justify-content: space-between; gap: 16px; background: rgba(243, 240, 229, .88); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
  #topbar .lockup { font-size: 26px; }
  #topbar .crumb { font: 500 12px/1 var(--f-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--lichen); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #topbar > .row:first-child { flex: 1; }
  #topbar > .row:last-child { flex: none; }
  .tabs { flex: none; display: flex; gap: 2px; padding: 4px; border-radius: 16px; background: var(--parchment); }
  .tabs a { white-space: nowrap; padding: 9px 14px; border-radius: 12px; text-decoration: none; color: var(--lichen); font-weight: 500; font-size: 15px; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
  .tabs a[aria-current="page"] { background: var(--forest); color: var(--cream); }
  .app { min-height: 0; }
  body.app-route .app { min-height: calc(100dvh - 72px); }
  body.results .bottom-nav { display: none; }
  body.results #view { padding-bottom: 0; }
  /* planner: full map, one floating panel */
  body.r-planear .app { position: relative; height: calc(100dvh - 72px); }
  body.r-planear .map-pane { position: absolute; inset: 0; display: block; }
  body.r-planear #view { position: absolute; z-index: 3; left: 24px; top: 24px; width: 480px; max-height: calc(100% - 48px); flex: none; overflow: visible; background: transparent; }
  body.r-planear .map-hint { left: auto; right: 24px; }
  .plan-float { height: auto; max-height: calc(100dvh - 72px - 48px); display: flex; flex-direction: column; background: var(--cream); border-radius: var(--r-card-l); box-shadow: 0 40px 80px -40px rgba(17, 27, 23, .6); overflow: hidden; }
  .pf-head { padding: 26px 28px 14px; }
  .pf-head h1 { font-size: 40px; }
  .pf-head p { margin-top: 8px; }
  .pf-secs { flex: 1; overflow: auto; padding: 4px 14px; display: flex; flex-direction: column; gap: 6px; }
  .pf-sec { border-radius: 22px; transition: background var(--t-base) var(--ease); }
  .pf-sec.open { background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
  .pf-sec-h { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px; border: 0; background: none; text-align: left; border-radius: 22px; }
  .pf-sec-h b { display: block; font-size: 17px; font-weight: 500; } .pf-sec-h small { display: block; font-size: 14px; color: var(--lichen); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 340px; }
  .pf-sec-h > .icon { width: 18px; height: 18px; color: var(--lichen); }
  .pf-num { width: 32px; height: 32px; border-radius: 10px; flex: none; display: inline-flex; align-items: center; justify-content: center; font: 500 13px/1 var(--f-mono); background: var(--parchment); color: var(--forest); }
  .pf-sec.open .pf-num { background: var(--forest); color: var(--cream); }
  .pf-sec.done:not(.open) .pf-num { background: var(--lime); color: var(--forest); }
  .pf-num .icon { width: 16px; height: 16px; }
  .pf-sec-b { padding: 0 14px 16px 56px; display: flex; flex-direction: column; gap: 12px; }
  .pf-sec-b .crops { grid-template-columns: 1fr 1fr; gap: 6px; }
  .pf-sec-b .crop { min-height: 0; padding: 7px 10px 7px 7px; }
  .pf-sec-b .crop .tile-i { width: 30px; height: 30px; border-radius: 9px; }
  .pf-sec-b .crop b { font-size: 15px; }
  .pf-sec-b .opts .opt { font-size: 14px; min-height: 42px; padding: 8px 6px; }
  .pf-sec-b .row-fields { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
  .pf-sec-b .num { width: 90px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--cream); font-weight: 500; font-size: 17px; }
  .pf-sec-b .chip { font-size: 13px; padding: 7px 10px; }
  .pf-sec-b .date { padding: 8px 14px; }
  .pf-next { align-self: flex-start; min-height: 42px; font-size: 12px; }
  .pf-foot { padding: 16px 28px 24px; border-top: 1px solid var(--line); }
  /* results */
  .res { padding: 32px; gap: 24px; flex-direction: row; align-items: flex-start; max-width: 1440px; width: 100%; margin: 0 auto; }
  .res-head { display: none; }
  .col-left { width: 420px; flex: none; display: flex; flex-direction: column; gap: 16px; }
  .col-left.wide { width: 500px; }
  .col-right { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
  .terreno .col-left { width: 460px; }
  .res.pv, .res.stack { flex-direction: column; align-items: stretch; }
  .res.terreno { flex-wrap: wrap; }
  .res.terreno .plot-map { flex: 1 1 100%; height: 340px; }
  .row-ideas { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
  .pv-body { display: grid; grid-template-columns: 420px 1fr; }
  .pv-left { display: flex; border-bottom: 0; border-right: 1px solid var(--line); }
  .strats { grid-template-columns: repeat(2, 1fr); }
  .sheet { border-radius: 28px; margin: auto; max-width: 680px; }
  .cals2 { flex-direction: row; } .cals2 > .card { flex: 1; }
  .sow-row { --lab: 146px; } .sow-row b { font-size: 16px; } .sow-cells i { height: 52px; border-radius: 8px; font-size: 15px; }
  .rain-row .cal-grid { height: 100px; }
}
@media (min-width: 1024px) {
  .pv-cards .strats { grid-template-columns: repeat(var(--k, 4), 1fr); }
  /* The route column is taller than the calendar: the year dots and soil squares fill the space under the calendar. */
  .pv-body { grid-template-rows: auto 1fr; }
  .pv-left { display: contents; }
  .pv-a { grid-column: 1; grid-row: 1 / span 2; padding: 22px 18px; border-right: 1px solid var(--line); }
  .pv-right { grid-column: 2; grid-row: 1; }
  .pv-b { grid-column: 2; grid-row: 2; padding: 0 18px 22px; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-content: start; gap: 22px 40px; }
  /* Compare: the plot editor stays in view while the results column scrolls. */
  .res.cmp > .col-left { position: sticky; top: 96px; max-height: calc(100dvh - 120px); overflow-y: auto; }
}

/* Bottom sheet slides up from the edge on phones; centred dialog fades in on a computer */
.sheet[open] { transform: none; opacity: 1; transition: transform 420ms var(--ease-drawer), opacity 200ms ease; }
.sheet[open]::backdrop { opacity: 1; transition: opacity 300ms ease; }
@starting-style { .sheet[open] { transform: translateY(100%); } .sheet[open]::backdrop { opacity: 0; } }
@media (min-width: 1024px) { @starting-style { .sheet[open] { transform: scale(.96); opacity: 0; } } .sheet[open] { transition-duration: 220ms; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  @starting-style { .sheet[open] { transform: none; opacity: 0; } }
}

/* ---------- Vecinos: what farmers nearby saw (demo: example posts + this phone's own) ---------- */
.vec-grid { display: flex; flex-direction: column; gap: 16px; }
.vec-side { display: flex; flex-direction: column; gap: 14px; }
.vec-side > .btn.big { align-self: flex-start; }
.vec-filters { display: flex; flex-direction: column; gap: 10px; }
.vec-filters .seg { align-self: flex-start; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.vec-filters .chip .tile-i, .vec-form .chip .tile-i { width: 24px; height: 24px; border-radius: 7px; }
.vec-filters .chip .tile-i .icon, .vec-form .chip .tile-i .icon { width: 15px; height: 15px; }
.vec-note { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--lichen); line-height: 1.45; }
.vec-note .icon { width: 18px; height: 18px; color: var(--forest); margin-top: 1px; }
.vec-saved:empty { display: none; }
.vec-saved { padding: 12px 14px; border-radius: 14px; background: #E1EEDF; color: var(--good); font-weight: 500; }
.vec-feed { display: flex; flex-direction: column; gap: 12px; }
.vec-empty p { color: var(--lichen); }
.vp { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.vp.hidden { background: transparent; border-style: dashed; padding: 12px 16px; flex-direction: row; align-items: center; justify-content: space-between; }
.vp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.vp-type { color: var(--forest); display: inline-flex; align-items: center; gap: 8px; }
.vp-type::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--moss); }
.t-aviso .vp-type::before { background: var(--care); }
.t-pregunta .vp-type::before { background: var(--rain); }
.vp-tag { font-size: 12px; font-weight: 500; color: var(--lichen); background: var(--parchment); padding: 4px 8px; border-radius: 8px; white-space: nowrap; }
.vp-tag.mine { background: var(--lime-2); color: var(--forest); }
.vp-crop { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vp-crop b { font-size: 16px; }
.vp-text { font-size: 16px; line-height: 1.5; }
.vp-by { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 14px; color: var(--lichen); }
.vp-by b { color: var(--ink); font-weight: 500; }
.vp-tech { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px 3px 6px; border-radius: 8px; background: var(--forest); color: var(--lime); font-size: 12px; font-weight: 500; }
.vp-tech .icon { width: 13px; height: 13px; }
.vp-replies { display: flex; flex-direction: column; gap: 10px; padding: 12px 0 0 14px; border-left: 2px solid var(--parchment); }
.vp-replies li { display: flex; flex-direction: column; gap: 4px; }
.vp-replies li p:last-child { font-size: 15px; line-height: 1.45; }
.vp-replies li.tech { background: var(--cream); border-radius: 14px; padding: 10px 12px; margin-left: -6px; }
.vp-acts { display: flex; gap: 18px; align-items: center; }
.vp-acts .link .icon { width: 15px; height: 15px; }
.link.quiet { color: var(--lichen); text-decoration-color: var(--line-2); }
.vp-reply:empty { display: none; }
.vp-reply { display: flex; flex-direction: column; gap: 8px; }
.vp-reply textarea, .vec-form textarea, .vec-form input, .vec-form select { width: 100%; border: 1px solid var(--line-2); border-radius: 14px; background: var(--paper); padding: 12px 14px; font: inherit; resize: vertical; }
.vec-form select { width: auto; min-height: 44px; }
.vec-form textarea:focus, .vec-form input:focus, .vp-reply textarea:focus { outline: 2px solid var(--forest); outline-offset: 1px; }
.vec-field { display: flex; flex-direction: column; gap: 8px; }
.vec-seg { align-self: flex-start; max-width: 100%; overflow-x: auto; }
.vec-form .opts .opt { font-size: 14px; }
/* Mi plan: the neighbours' chip under each plot's route */
.vec-chips { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.vec-chip { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--cream); color: var(--forest); text-decoration: none; font-size: 14px; line-height: 1.35; transition: transform var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease); }
.vec-chip > .icon:first-child { width: 20px; height: 20px; flex: none; }
.vec-chip > .icon:last-child { width: 16px; height: 16px; margin-left: auto; flex: none; color: var(--lichen); }
.vec-chip b { font-weight: 500; }
.vec-chip em { display: block; font-style: normal; font-weight: 500; color: #8E5F06; margin-top: 2px; }
.vec-chip.check { background: #F6E7C7; }
.vec-chip:active { transform: scale(.98); }
@media (hover: hover) and (pointer: fine) {
  .vec-chip:hover { background: var(--parchment); }
  .vec-chip.check:hover { background: #F1DDB0; }
}
@media (min-width: 1024px) {
  .vec-grid { display: grid; grid-template-columns: minmax(320px, 400px) minmax(0, 1fr); gap: 32px; align-items: start; }
  .vec-side { position: sticky; top: 88px; }
  .vp-text, .vp-replies li p:last-child { max-width: 75ch; }
}
/* Accessibility: the green badge text reaches 4.5:1 on its pale pill; bottom-nav labels never below 11px. */
.verdict.v-good, .badge.good { color: #23633E; }
.bottom-nav a { font-size: 11px; letter-spacing: .02em; }

/* ---------- the plot drawn on the map ---------- */
.lot-tools { display: flex; flex-direction: column; gap: 10px; }
.lot-tools .btn.block { justify-content: center; }
.lot-hint { display: flex; align-items: center; gap: 10px; margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--lime); color: var(--forest); font-weight: 500; font-size: 15px; }
.lot-hint .icon { width: 18px; height: 18px; flex: none; }
.lot-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lot-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 18px; background: var(--parchment); border: 1px solid var(--line-2); }
.lot-row > .icon { width: 22px; height: 22px; color: var(--forest); flex: none; }
.lot-row b { display: block; font-weight: 500; } .lot-row small { color: var(--lichen); font-size: 14px; }
.pm-shape { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.pm-keys { position: absolute; z-index: 2; left: 16px; top: 16px; right: 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.pm-key { padding: 8px 10px; border-radius: 12px; background: rgba(17, 27, 23, .72); box-shadow: inset 3px 0 0 var(--c); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.pm-key span { display: flex; align-items: center; gap: 8px; font-size: 12px; line-height: 1.2; }
.pm-key span .tile-i { width: 24px; height: 24px; border-radius: 7px; }
.pm-key b { font: 500 10px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; }
body.drawing .search, body.drawing .geo, body.drawing .gps, body.drawing .pf-next, body.drawing .map-hint, body.drawing .place .link { display: none; }

/* ---------- the plot in 3D: the first thing on "Su terreno" ---------- */
.p3 { position: relative; display: flex; flex-direction: column; width: 100%; min-width: 0; border-radius: var(--r-card-l); overflow: hidden; background: var(--paper); border: 1px solid var(--line); flex: none; }
.res.terreno .p3 { flex: 1 1 100%; }
.p3-stage { position: relative; height: clamp(440px, 64vh, 720px); background: #2C3A31; color: var(--cream); overflow: hidden; }
.p3-map { position: absolute; inset: 0; min-width: 0; }
.p3-map .cesium-viewer, .p3-map .cesium-widget, .p3-map canvas { width: 100% !important; max-width: 100%; }
.p3-map .cesium-viewer-bottom { display: none; }
.p3-stage::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(17, 27, 23, .25), transparent 22%, transparent 70%, rgba(17, 27, 23, .65)); pointer-events: none; }
.p3-stage .pm-cap, .p3-stage .pm-keys { pointer-events: none; z-index: 3; }
.p3-stage .pm-keys { right: auto; max-width: 52%; flex-direction: column; align-items: flex-start; }
.p3-stage .pm-cap { right: auto; max-width: 46%; }
.p3-hud { position: absolute; z-index: 3; top: 16px; right: 16px; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; pointer-events: none; }
.p3-wx { position: absolute; z-index: 3; right: 16px; bottom: 16px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 60%; pointer-events: none; }
.p3-chip { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 14px; background: rgba(17, 27, 23, .72); color: var(--cream); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.p3-chip .icon { width: 18px; height: 18px; color: var(--lime); flex: none; }
.p3-chip span { display: flex; flex-direction: column; line-height: 1.15; }
.p3-chip small { font: 500 10px/1.2 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: rgba(243, 240, 229, .7); }
.p3-chip b { font-weight: 500; font-size: 15px; }
.p3-chip.wet { background: rgba(46, 111, 208, .88); } .p3-chip.wet .icon { color: #fff; }
.pm-key em { font-style: normal; margin-left: 4px; padding: 2px 6px; border-radius: 6px; background: #D2452E; color: #fff; font-size: 11px; font-weight: 600; }
.pm-key.drown { box-shadow: inset 3px 0 0 #D2452E; }
.p3-ctl { display: flex; flex-direction: column; gap: 10px; padding: 14px 18px 16px; }
.p3-month { display: inline-flex; align-items: center; gap: 8px; font-size: 20px; }
.p3-month .icon { width: 18px; height: 18px; color: var(--lichen); }
.p3-month b { font-weight: 500; }
.p3-yrs button { font-size: 13px; padding: 7px 12px; }
.p3-chart { position: relative; cursor: ew-resize; touch-action: none; outline: none; border-radius: 12px; }
.p3-chart:focus-visible { box-shadow: 0 0 0 2px var(--forest); }
.p3-chart svg { display: block; width: 100%; height: 110px; }
.p3-chart .cur { fill: var(--forest); fill-opacity: .08; }
.p3-chart .rain-a { fill: var(--rain, #4F86C6); fill-opacity: .18; }
.p3-chart .rain-l { fill: none; stroke: var(--rain, #4F86C6); stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.p3-chart .drain-l { fill: none; stroke: var(--forest); stroke-width: 1.5; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
.p3-chart .water-a { fill: #2E6FD0; fill-opacity: .75; }
.p3-months { display: grid; margin-top: 4px; }
.p3-months span { text-align: center; font: 500 10px/1 var(--f-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--lichen); }
.p3-months span.on { color: var(--forest); font-weight: 700; }
.p3-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--lichen); }
.p3-legend span { display: inline-flex; align-items: center; gap: 6px; }
.p3-legend .sw { width: 16px; height: 10px; border-radius: 3px; display: inline-block; }
.p3-legend .sw.rain { background: color-mix(in srgb, var(--rain, #4F86C6) 30%, transparent); box-shadow: inset 0 -2.5px 0 var(--rain, #4F86C6); }
.p3-legend .sw.drain { height: 0; border-top: 2px dashed var(--forest); border-radius: 0; }
.p3-legend .sw.water { background: #2E6FD0; }
.p3-unk summary { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--cream); border: 1px solid var(--line-2); font-size: 13px; cursor: pointer; list-style: none; }
.p3-unk summary::-webkit-details-marker { display: none; }
.p3-unk summary .icon { width: 14px; height: 14px; }
.p3-unk p { margin: 8px 0 0; font-size: 14px; max-width: 60ch; }
@media (max-width: 760px) {
  .p3-stage { height: 58vh; min-height: 400px; }
  .p3-hud { position: static; flex-direction: row; align-items: stretch; gap: 6px; padding: 10px 12px 0; overflow-x: auto; scrollbar-width: none; pointer-events: auto; }
  .p3-hud::-webkit-scrollbar { display: none; }
  .p3-hud .p3-chip { flex: none; background: var(--forest); padding: 7px 10px; }
  .p3-hud .p3-chip b { font-size: 13px; white-space: nowrap; }
  .p3-wx { left: 12px; right: 12px; top: 12px; bottom: auto; max-width: none; justify-content: flex-start; }
  .p3-wx .p3-chip { padding: 6px 9px; } .p3-wx .p3-chip b { font-size: 13px; }
  .p3-stage .pm-keys { top: auto; left: 12px; bottom: 76px; max-width: 80%; }
  .p3-stage .pm-cap { max-width: none; left: 12px; bottom: 12px; }
}

/* ---------- Su terreno: the scene fills the screen, everything else floats on it ---------- */
body.r-terreno { overflow: hidden; }
body.r-terreno .res.terreno.full { position: fixed; inset: 0; z-index: 1; padding: 0; gap: 0; display: block; max-width: none; width: auto; margin: 0; }
.res.terreno.full .p3 { position: absolute; inset: 0; border: 0; border-radius: 0; background: #2C3A31; }
.res.terreno.full .p3-stage { position: absolute; inset: 0; height: auto; min-height: 0; }
.res.terreno.full .p3-stage::after { background: linear-gradient(180deg, rgba(17, 27, 23, .35), transparent 18%, transparent 75%, rgba(17, 27, 23, .45)); }
.res.terreno.full .p3-ctl { position: absolute; z-index: 4; left: 24px; bottom: 24px; width: min(640px, calc(100% - 48px)); gap: 8px; padding: 14px 16px; border-radius: 22px; background: rgba(251, 250, 244, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .55); }
.res.terreno.full .p3-chart svg { height: 84px; }
.res.terreno.full .p3-month { font-size: 18px; }
.res.terreno.full .p3-wx { right: 24px; bottom: 24px; max-width: calc(100% - 700px); }
.res.terreno.full .p3-hud { top: 20px; right: 24px; }
.res.terreno.full .pm-keys { top: 20px; left: 24px; }
.p3-note { position: absolute; z-index: 3; left: 24px; top: 72px; display: flex; align-items: center; gap: 8px; max-width: 420px; padding: 8px 12px; border-radius: 12px; background: rgba(17, 27, 23, .72); color: var(--cream); font-size: 13px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); pointer-events: none; }
.p3-note .icon { width: 16px; height: 16px; color: var(--lime); flex: none; }
.p3-more { display: flex; flex-wrap: wrap; gap: 6px; }
.p3-more .chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 7px 11px; }
.p3-more .chip .icon { width: 15px; height: 15px; }
.sheet-card { box-shadow: none; border: 0; padding: 0; background: transparent; }
@media (min-width: 1024px) { body.r-terreno .res.terreno.full { top: 72px; } body.r-terreno .res.terreno.full .res-head { display: none; } }
@media (max-width: 1023px) {
  .res.terreno.full .res-head { position: absolute; z-index: 5; left: 8px; right: 8px; top: calc(8px + env(safe-area-inset-top, 0px)); margin: 0; padding: 8px 8px 8px 14px; border-radius: 18px; background: rgba(243, 240, 229, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
  .res.terreno.full .p3-hud { position: absolute; top: calc(76px + env(safe-area-inset-top, 0px)); left: 0; right: 0; padding: 0 8px; flex-direction: row; overflow-x: auto; pointer-events: auto; }
  .res.terreno.full .p3-hud .p3-chip { background: rgba(17, 27, 23, .78); }
  .res.terreno.full .pm-keys { top: calc(134px + env(safe-area-inset-top, 0px)); left: 8px; right: 8px; bottom: auto; max-width: none; flex-direction: row; flex-wrap: wrap; }
  .res.terreno.full .p3-note { left: 8px; right: 8px; top: calc(178px + env(safe-area-inset-top, 0px)); bottom: auto; max-width: none; font-size: 12px; }
  .res.terreno.full .p3-wx { left: 8px; right: 8px; top: auto; bottom: calc(350px + env(safe-area-inset-bottom, 0px)); max-width: none; flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; pointer-events: auto; }
  .res.terreno.full .p3-wx .p3-chip { flex: none; }
  .res.terreno.full .p3-ctl { left: 8px; right: 8px; width: auto; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); padding: 10px 12px; gap: 6px; }
  .res.terreno.full .p3-chart svg { height: 56px; }
  .res.terreno.full .p3-ctl .small, .res.terreno.full .p3-legend { font-size: 11px; }
  .res.terreno.full .p3-legend { gap: 2px 10px; }
  .res.terreno.full .p3-more, .res.terreno.full .p3-legend, .res.terreno.full .p3-ctl > .row.wrap:has(.p3-unk) { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
  .res.terreno.full .p3-more .chip { flex: none; padding: 6px 10px; }
  .res.terreno.full .p3-unk summary { padding: 3px 8px; font-size: 11px; }
  .res.terreno.full .p3-unk[open] p { position: absolute; left: 12px; right: 12px; bottom: calc(100% + 8px); margin: 0; padding: 12px; border-radius: 14px; background: var(--paper); box-shadow: 0 10px 30px -10px rgba(0,0,0,.4); white-space: normal; }
  .res.terreno.full .p3-yrs button { padding: 6px 10px; font-size: 12px; }
  .res.terreno.full .p3-month { font-size: 16px; }
}
.p3-wx, .p3-hud { scrollbar-width: none; } .p3-wx::-webkit-scrollbar, .p3-hud::-webkit-scrollbar { display: none; }
/* phone: the map's centre sits in the free band between the chips on top and the panel below */
@media (max-width: 1023px) { .res.terreno.full .p3-map { bottom: 250px; } }

/* Opened from WhatsApp (link.js): the lot reaching Rooti, the plan picked, the alert page */
.wa-sync { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 16px; background: var(--parchment); color: var(--forest); font-size: 15px; font-weight: 500; }
.wa-sync .icon { width: 20px; height: 20px; flex: none; }
.wa-sync.saved { background: var(--forest); color: var(--cream); }
.wa-sync.saved .icon { color: var(--lime); }
.wa-sync.error { background: #F7DCD4; color: #7A2416; }
.wa-sync .link { color: inherit; font-weight: 600; min-height: 44px; }
.wa-bar { display: flex; flex-direction: column; gap: 8px; }
.wa-done { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 16px; background: var(--forest); color: var(--cream); font-size: 16px; font-weight: 500; }
.wa-done .icon { width: 20px; height: 20px; color: var(--lime); flex: none; }
.wa-go .btn { align-self: flex-start; }
.av-hero { background: var(--forest); color: var(--cream); border-radius: var(--r-card-l); padding: 24px 20px 26px; display: flex; flex-direction: column; gap: 14px; }
.av-hero .h2 { font-size: 34px; }
.av-hero p { font-size: 17px; line-height: 1.45; color: rgba(243, 240, 229, .82); }
.av-acts { display: flex; flex-direction: column; gap: 10px; }
.rain-chart { display: block; width: 100%; height: auto; overflow: visible; }
.rain-chart .ra { fill: var(--rain); opacity: .22; }
.rain-chart .rl { fill: none; stroke: var(--rain); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.rain-chart .rh { stroke: var(--danger); stroke-width: 1.5; stroke-dasharray: 5 4; }
.rain-chart .rht { font: 500 10px var(--f-mono); letter-spacing: .04em; text-transform: uppercase; fill: var(--danger); }
.rain-chart .rp { fill: var(--rain); stroke: var(--paper); stroke-width: 2; }
.rain-chart .rp.heavy { fill: var(--danger); }
.rain-chart .rv { font: 500 13px var(--f-body); fill: var(--forest); }
.rain-chart .rv.heavy { fill: var(--danger); font-weight: 600; }
.rain-chart .rd { font: 500 11px var(--f-mono); text-transform: uppercase; letter-spacing: .04em; fill: var(--lichen); }
.rain-chart .rdn { font: 500 12px var(--f-body); fill: var(--forest); }
@media (min-width: 721px) { .aviso { max-width: 720px; margin: 0 auto; width: 100%; } .av-acts { flex-direction: row; } .av-acts .btn { flex: 1; } }
