/* Garden Check-in v2: a walk through a living garden. Loaded only on /check-in/. */

.quiz-page { background: var(--field); }
.quiz-page .ci-top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); }
#ci-label { transition: opacity .3s; }

/* ---------- layout ---------- */
.ci-shell { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); min-height: calc(100vh - 58px); }
.ci-scene { position: sticky; top: 58px; height: calc(100vh - 58px); overflow: hidden; display: flex; align-items: flex-end;
  background: linear-gradient(to bottom, color-mix(in oklab, #eebd94 calc((1 - var(--t, 0)) * 100%), #d3e2d8), color-mix(in oklab, #f1c9a4 calc((1 - var(--t, 0)) * 100%), #dfe8df)); }
.scene { width: 100%; height: 100%; display: block; }
.ci-scene-fade { position: absolute; inset: auto 0 0 0; height: 18%; background: linear-gradient(to bottom, transparent, rgba(36, 29, 22, .08)); pointer-events: none; }
.ci-panel { padding: clamp(28px, 4vw, 64px) clamp(20px, 4vw, 72px) 64px; display: grid; gap: 22px; align-content: start; max-width: 680px; }
.ci-panel.enter > * { animation: rise .55s cubic-bezier(.2, .7, .2, 1) both; }
.ci-panel.enter > *:nth-child(2) { animation-delay: .05s; } .ci-panel.enter > *:nth-child(3) { animation-delay: .1s; }
.ci-panel.enter > *:nth-child(4) { animation-delay: .15s; } .ci-panel.enter > *:nth-child(n+5) { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* intro: the garden takes the stage */
[data-mode="intro"] .ci-shell { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
[data-mode="intro"] .ci-panel { align-content: center; }

/* map: garden full width on top, the reading and the doors below */
[data-mode="map"] .ci-shell { grid-template-columns: 1fr; }
[data-mode="map"] .ci-scene { position: relative; top: 0; height: min(52vh, 520px); }
[data-mode="map"] .ci-panel { max-width: 1120px; width: 100%; margin-inline: auto; grid-template-columns: 1fr; padding-top: 40px; }

/* ---------- scene ---------- */
.sky-a { stop-color: color-mix(in oklab, #f1c9a4 calc((1 - var(--t, 0)) * 100%), #dfe8df); }
.sky-b { stop-color: color-mix(in oklab, #f7e4c6 calc((1 - var(--t, 0)) * 100%), #f6efdc); }
.sun { transition: transform 1.1s cubic-bezier(.3, .7, .2, 1); }
.cloud { animation: drift 60s linear infinite alternate; }
.cloud:nth-of-type(2) { animation-duration: 80s; }
@keyframes drift { to { transform: translateX(40px); } }
.bed-in { transition: transform .5s cubic-bezier(.3, .7, .2, 1); transform-box: fill-box; transform-origin: 50% 100%; }
.bed-halo { fill: #ffe7a8; opacity: 0; transition: opacity .5s; }
.bed.is-on .bed-halo { opacity: .85; animation: halo 2.4s ease-in-out infinite; }
.bed.is-on .bed-in { transform: translateY(-5px); }
@keyframes halo { 50% { opacity: .45; } }
.plant.sprout { transform-box: fill-box; transform-origin: 50% 100%; animation: sprout .7s cubic-bezier(.34, 1.56, .64, 1) both; animation-delay: var(--d, 0ms); }
@keyframes sprout { from { transform: scale(.05); opacity: 0; } 60% { opacity: 1; } to { transform: scale(1); opacity: 1; } }

/* ---------- guide ---------- */
.guide { display: flex; gap: 14px; align-items: flex-start; }
.guide-av { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--sun); background: #c9b48f; }
.bubble { position: relative; background: var(--paper); border: 1.5px solid rgba(36, 29, 22, .14); border-radius: 4px 16px 16px 16px; padding: 12px 16px; box-shadow: 0 6px 20px rgba(36, 29, 22, .06); }
.bubble p { font: 400 19px/1.4 var(--serif); color: var(--soil); }
.bubble-note { display: block; margin-top: 6px; font-size: 13px; color: var(--mute); }

/* ---------- headings ---------- */
.ci-h { font: 350 clamp(30px, 2.8vw, 42px)/1.08 var(--serif); letter-spacing: -.018em; text-wrap: balance; color: var(--soil); }
.ci-h--xl { font-size: clamp(40px, 4.4vw, 64px); }
.ci-lede { font-size: 19px; line-height: 1.55; color: var(--mute); max-width: 52ch; }
.ci-help { font-size: 16px; color: var(--mute); margin-top: -10px; }
.q-meta { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--mute); font-variant-numeric: tabular-nums; }
.btn--lg { font-size: 18px; padding: 19px 30px; justify-self: start; }
.btn .arr { width: 18px; height: 18px; }
.lock { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--mute); }
.lock svg { width: 15px; height: 15px; flex: none; }

/* ---------- answer cards ---------- */
.cards { display: grid; gap: 10px; }
.card { position: relative; display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 18px 10px 12px; border-radius: 14px; background: #fffdf8; border: 1.5px solid rgba(36, 29, 22, .16); cursor: pointer; font: 500 17px/1.3 var(--sans); color: var(--soil);
  transition: border-color .18s, box-shadow .18s, background .18s; box-shadow: 0 1px 0 rgba(36, 29, 22, .05); }
@media (hover: hover) { .card:hover { border-color: rgba(36, 29, 22, .5); box-shadow: 0 10px 26px rgba(36, 29, 22, .1); } }
.card-in { position: absolute; opacity: 0; width: 1px; height: 1px; }
.card:has(.card-in:checked) { border-color: var(--soil); background: var(--sun-soft); box-shadow: inset 0 0 0 1px var(--soil), 0 8px 22px rgba(229, 138, 43, .18); }
.card:has(.card-in:focus-visible) { outline: 3px solid var(--sun); outline-offset: 3px; }
.card::after { content: ""; margin-left: auto; width: 22px; height: 22px; flex: none; border-radius: 50%; border: 1.5px solid rgba(36, 29, 22, .35); background: #fff; transition: all .18s; }
.card:has(.card-in:checked)::after { background: var(--soil) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; border-color: var(--soil); }
.card .pi { width: 64px; height: 56px; flex: none; border-radius: 10px; background: linear-gradient(#f6ecd9, #efe2c7); }
.card .ic { width: 44px; height: 38px; flex: none; color: var(--kale); }
.cards--icons { grid-template-columns: 1fr 1fr; }
.cards--icons .card { flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px; min-height: 132px; }
.cards--icons .card::after { position: absolute; top: 14px; right: 14px; }
.cards--icons .card-t { font-size: 17px; }
.cards--compact .card { min-height: 52px; padding: 10px 16px; }
.q-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 4px; }
.q-actions .q-back:only-child { margin-right: auto; }
.btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.linkbtn { background: none; border: 0; padding: 6px 0; font: inherit; font-size: 15px; color: var(--mute); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }

/* plot chips */
.chip { display: inline-flex; align-items: center; font: 700 12px/1 var(--label); font-stretch: 85%; letter-spacing: .13em; text-transform: uppercase; padding: 7px 10px; border-radius: 6px; color: #fff; }
.chip--soil { background: var(--p-soil); } .chip--roots { background: var(--p-roots); } .chip--rhythm { background: #9a6a08; }
.chip--ground { background: var(--p-ground); } .chip--circle { background: var(--p-circle); }

/* ---------- the map ---------- */
.res-title { margin-top: -6px; }
.plots { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.plots li { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--paper); border: 1.5px solid rgba(36, 29, 22, .12); font-size: 15px; }
.plots li.is-begin { border-color: var(--sun); box-shadow: 0 0 0 3px rgba(229, 138, 43, .2); }
.plot-state { color: var(--soil); font-weight: 600; }
.werness-note { display: flex; gap: 18px; align-items: flex-start; padding: 24px; border-radius: 16px; background: var(--paper); border: 1.5px solid rgba(36, 29, 22, .12); max-width: 760px; }
.werness-note .guide-av { width: 64px; height: 64px; }
.werness-note h3 { font: 400 28px/1.15 var(--serif); margin: 6px 0; }
.werness-note p { color: var(--mute); font-size: 17px; }
.fine { font-size: 14px; color: var(--mute); }

/* ---------- doors ---------- */
.doors-v2 { display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; align-items: start; margin-top: 8px; }
.door-v2 { position: relative; border-radius: 18px; padding: 26px; display: grid; gap: 16px; background: var(--paper); border: 1.5px solid rgba(36, 29, 22, .14); }
.door-v2.is-primary { background: var(--soil); color: var(--field); border-color: var(--soil); box-shadow: 0 24px 60px rgba(36, 29, 22, .22); }
.door-v2.door-email.is-primary { background: var(--kale); border-color: var(--kale); }
.door-head h3 { font: italic 400 clamp(28px, 2.4vw, 36px)/1.05 var(--serif); }
.door-sub { margin-top: 8px; font-size: 15px; opacity: .85; }
.door-v2 .tag { position: absolute; top: -12px; right: 18px; background: var(--sun); color: var(--soil); font: 700 11px/1 var(--label); font-stretch: 85%; letter-spacing: .13em; text-transform: uppercase; padding: 7px 10px; border-radius: 6px; }
.door-body { display: grid; gap: 14px; }
.door-q { font: 400 22px/1.25 var(--serif); }
.door-hint { font-size: 14px; opacity: .8; }
.is-primary .btn--line { color: var(--field); box-shadow: inset 0 0 0 1.5px rgba(238, 236, 227, .55); }
.stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; font: 600 11px/1.2 var(--label); font-stretch: 85%; letter-spacing: .1em; text-transform: uppercase; }
.stepper li { padding-top: 8px; border-top: 3px solid rgba(127, 127, 127, .35); opacity: .65; }
.stepper li.is-done { border-color: var(--sun); opacity: .9; }
.stepper li.is-on { border-color: var(--sun); opacity: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-in { position: relative; cursor: pointer; }
.chip-in input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip-in span { display: grid; gap: 2px; padding: 10px 14px; border-radius: 12px; border: 1.5px solid currentColor; font-size: 15px; font-weight: 600; text-align: center; opacity: .9; transition: background .15s, color .15s; }
.chip-in small { font-weight: 400; font-size: 12px; opacity: .8; }
.chip-in input:checked + span { background: var(--sun); color: var(--soil); border-color: var(--sun); opacity: 1; }
.chip-in input:focus-visible + span { outline: 3px solid var(--sun); outline-offset: 2px; }
.door-v2:not(.is-primary) .chip-in input:checked + span { background: var(--soil); color: var(--field); border-color: var(--soil); }
.chipset { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; }
.chipset legend { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.check-row { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; font-size: 16px; line-height: 1.45; cursor: pointer; }
.check-row input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--sun); }
.more summary { cursor: pointer; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; opacity: .85; margin-top: 4px; }
.more p { font-size: 14px; margin-top: 6px; opacity: .85; }
.door-form { display: grid; gap: 14px; }
.fld { display: grid; gap: 6px; }
.fld label { font-weight: 600; font-size: 15px; }
.fld input { font: inherit; font-size: 17px; padding: 13px 14px; border-radius: 10px; border: 1.5px solid rgba(36, 29, 22, .35); background: #fff; color: var(--soil); }
.fld input:focus-visible { outline: 3px solid var(--sun); outline-offset: 1px; }
.is-primary a { color: inherit; }
.err { background: #fbe3dc; color: #7a1f0c; border-radius: 8px; padding: 10px 12px; font-size: 15px; }
.hp { position: absolute; left: -9999px; }
.help, .sent { display: grid; gap: 12px; }
.help-num { font: 800 64px/1 var(--label); font-stretch: 112%; }
.help h3, .sent h3 { font: 350 30px/1.1 var(--serif); }
.expect { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.door-v2.is-help { background: var(--paper); color: var(--soil); border-color: var(--soil); }

/* ---------- phone ---------- */
@media (max-width: 860px) {
  .ci-shell, [data-mode="intro"] .ci-shell { grid-template-columns: 1fr; min-height: 0; }
  .ci-scene { position: relative; top: 0; height: 34vh; min-height: 220px; }
  [data-mode="intro"] .ci-scene { height: 42vh; }
  [data-mode="map"] .ci-scene { height: 40vh; }
  .ci-panel { padding: 22px 20px 48px; gap: 18px; }
  .cards--icons { grid-template-columns: 1fr 1fr; }
  .cards--icons .card { min-height: 116px; padding: 12px; }
  .cards--icons .card-t { font-size: 15px; }
  .doors-v2 { grid-template-columns: 1fr; }
  .door-v2 { padding: 20px; }
  .bubble p { font-size: 17px; }
  .guide-av { width: 46px; height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  .ci-panel.enter > *, .plant.sprout, .cloud, .bed.is-on .bed-halo { animation: none !important; }
  .sun, .bed-in, .card { transition: none !important; }
}

@media print {
  .ci-top, .doors-v2, .q-actions, .linkbtn { display: none !important; }
  .ci-scene { height: 320px !important; }
}

.is-primary .linkbtn { color: rgba(238, 236, 227, .82); }
.door-v2 { scroll-margin-top: 72px; }

/* QA round 10 Oct 2026: one-tap help on phones, taller safety rows and back links. */
.help-num a { color: inherit; text-decoration: none; }
.help-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 4px; }
@media (pointer: coarse) {
  .check-row { min-height: 44px; align-items: center; padding-block: 6px; }
  .door-body .back, .q-actions .q-back { min-height: 44px; min-width: 44px; }
}
.help-actions .btn--sun { color: var(--soil); }
.help-actions .btn--ink { color: var(--field); }
