/* distilry — app styles. Mobile-first: most use is one-handed on a phone. */
:root {
  --green: #164636;
  --green-soft: #2f5f4d;
  --cream: #f5f0e6;
  --paper: #fcfaf5;
  --sand: #e5d6b8;
  --terracotta: #b9592f;
  --ink: #1c2923;
  --muted: #58665e;
  --line: #dacfba;
  --danger: #a3301d;
  /* the cactus (same as the weekly site) */
  --cactus: #4f9566;
  --cactus-hi: #8cc596;
  --seed: #8a6a3f;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace; /* system font: nothing to download */
  --rule: rgba(22, 70, 54, .22);   /* hairlines, like a drawing sheet */
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
/* a faint paper grain, drawn in-line (no image file) */
body { background-color: var(--cream);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .09 0 0 0 0 .27 0 0 0 0 .21 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
a { color: var(--green); }
:focus-visible { outline: 3px solid var(--terracotta); outline-offset: 2px; border-radius: 6px; }
h1:focus { outline: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: 680px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 600px) { .wrap { padding: 0 24px; } }

header.top { max-width: 680px; margin: 0 auto; padding: calc(14px + env(safe-area-inset-top)) 16px 6px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; }
@media (min-width: 600px) { header.top { padding-left: 24px; padding-right: 24px; } }
.home-link { display: inline-block; }
.logo { height: 34px; width: auto; display: block; }

main { padding: 30px 0 110px; }
.eyebrow, .mono-label { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--terracotta); font-weight: 500; margin: 0 0 10px; }
.mono-label { display: inline-block; color: var(--muted); }
h1 { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 7vw, 44px); line-height: 1.1; color: var(--green);
  margin: 0 0 10px; text-wrap: balance; overflow-wrap: anywhere; }
.lede { color: var(--muted); margin: 0 0 22px; }
.flash { background: #e7efe9; border: 1px solid #b9d2c1; color: var(--green); border-radius: 12px; padding: 12px 14px; margin: 0 0 22px; font-weight: 500; }

/* forms */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 20px 16px; }
@media (min-width: 600px) { .panel { padding: 26px; } }
fieldset { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
legend { font-weight: 600; font-size: 15px; padding: 0; margin-bottom: 6px; }
fieldset.group { border-top: 1px solid var(--line); padding-top: 14px; }
fieldset.group:first-child { border-top: 0; padding-top: 0; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
label { font-weight: 600; font-size: 15px; }
.hint { margin: -2px 0 2px; font-size: 14px; color: var(--muted); }
input[type=text], textarea { font: inherit; font-size: 16px; color: var(--ink); background: var(--cream); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; width: 100%; min-height: 48px; }
textarea { resize: vertical; font-family: var(--display); font-size: 18px; line-height: 1.4; }
input[type=text]:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(22,70,54,.15); }
[aria-invalid=true] { border-color: var(--danger) !important; }
.field-error { margin: 0; font-size: 14px; color: var(--danger); font-weight: 500; }
.field-error:empty { display: none; }
.counter { align-self: flex-end; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.counter.over { color: var(--danger); font-weight: 600; }
.arms-field input { margin-bottom: 8px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; font-weight: 500; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--cream); color: var(--green); }
.chip input:checked + span { background: var(--green); border-color: var(--green); color: var(--cream); }
.chip input:focus-visible + span { outline: 3px solid var(--terracotta); outline-offset: 2px; }

/* buttons */
button { font: inherit; cursor: pointer; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; background: var(--green); color: var(--cream);
  border: 0; border-radius: 999px; padding: 12px 24px; font-weight: 600; font-size: 16px; text-decoration: none; }
.btn:hover { background: var(--green-soft); }
.btn-ghost { display: inline-flex; align-items: center; min-height: 44px; background: transparent; color: var(--green); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: 15px; text-decoration: none; }
.btn-ghost:hover { border-color: var(--green); }
.btn-danger { min-height: 44px; background: transparent; border: 0; color: var(--danger); font-weight: 600; padding: 8px 4px; margin-left: auto; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
form .btn { flex: 1 1 auto; }
@media (min-width: 600px) { form .btn { flex: 0 0 auto; } }

/* goal page */
.arm { margin: 0 0 30px; }
.arm-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line);
  padding-bottom: 8px; margin-bottom: 12px; }
.arm h2 { font-family: var(--display); font-weight: 600; font-size: 22px; color: var(--green); margin: 0; overflow-wrap: anywhere; }
.arm-count { font-size: 14px; color: var(--muted); white-space: nowrap; }
.cards { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 10px; }
.card { display: flex; flex-direction: column; gap: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; text-decoration: none; color: var(--ink); }
.card:hover { border-color: var(--green); }
.card-meta { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.card-takeaway { font-family: var(--display); font-size: 18px; line-height: 1.35; white-space: pre-line; overflow-wrap: anywhere; }
.empty { color: var(--muted); margin: 0 0 12px; }

/* one-handed: the main action sits at the bottom of the screen on phones */
.sticky-add { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--cream) 70%, rgba(245,240,230,0)); display: flex; justify-content: center; }
.sticky-add .btn { width: 100%; max-width: 420px; box-shadow: 0 6px 18px rgba(22,70,54,.18); }
@media (min-width: 900px) { .sticky-add { position: static; background: none; padding: 0; justify-content: flex-start; }
  .sticky-add .btn { width: auto; box-shadow: none; } main { padding-bottom: 40px; } }

.foot { border-top: 1px solid var(--line); padding-top: 18px; padding-bottom: calc(96px + env(safe-area-inset-bottom)); font-size: 14px; color: var(--muted); }
.foot p { margin: 0 0 6px; }
.version { font-size: 12px; }
@media (min-width: 900px) { .foot { padding-bottom: 40px; } }

/* header nav */
.top-nav { display: flex; gap: 4px; }
.top-nav a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 12px; border-radius: 999px;
  text-decoration: none; font-weight: 600; font-size: 15px; color: var(--green); }
.top-nav a[aria-current=page] { background: var(--paper); border: 1px solid var(--line); }
.badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--terracotta); color: #fff;
  font-size: 13px; display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }

/* goal page: due banner and the cactus */
.due-banner { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--green);
  color: var(--cream); text-decoration: none; border-radius: 14px; padding: 14px 16px; margin: 0 0 18px; min-height: 52px; }
.due-banner span { font-weight: 600; }
.cactus-figure { margin: 0 0 30px; display: flex; flex-direction: column; align-items: center; }
.cactus { width: 100%; max-width: 440px; height: auto; display: block; overflow: visible; }
.cactus-figure figcaption { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; margin-top: 6px; }
.cactus-figure figcaption strong { font-family: var(--display); font-weight: 600; font-size: 18px; color: var(--green); }
.cactus-figure figcaption span { font-size: 14px; color: var(--muted); }
.arm-label { font-family: var(--body); font-size: 13px; font-weight: 600; fill: var(--muted); }
.spine { cursor: pointer; }
.spine line { stroke: var(--green); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 30; stroke-dashoffset: 0;
  animation: grow .5s ease-out both; animation-delay: var(--d, 0s); }
.spine .tip { fill: var(--green); }
.spine .hit { fill: transparent; }
.spine:hover line, .spine:focus-visible line { stroke: var(--terracotta); stroke-width: 4; }
.spine:hover .tip, .spine:focus-visible .tip { fill: var(--terracotta); }
.spine:hover, .spine:focus-visible { opacity: 1 !important; }
.spine:focus { outline: none; }
@keyframes grow { from { stroke-dashoffset: 30; } }
@media (prefers-reduced-motion: reduce) { .spine line { animation: none; } }

/* cards: status tag */
.card-meta { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.tag { flex: none; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.tag-spine { color: var(--green); border-color: #b9d2c1; background: #e7efe9; }
.tag-rooted { color: var(--cream); background: var(--green); border-color: var(--green); }

.icon-btn { width: 44px; height: 44px; flex: none; border: 0; background: transparent; color: var(--muted); font-size: 22px; border-radius: 50%; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; }
.inline-form input { flex: 1 1 200px; }
.inline-form .field-error { flex-basis: 100%; }

/* one learning */
.note-q { font-size: clamp(26px, 6vw, 36px); }
.note-takeaway { font-family: var(--display); font-size: 21px; line-height: 1.4; margin: 0 0 10px; white-space: pre-line; overflow-wrap: anywhere; }
.note-helps { margin: 14px 0 0; overflow-wrap: anywhere; }
.note-status { margin: 14px 0 18px; color: var(--muted); font-size: 15px; }

/* today */
.progress { font-family: var(--body); font-size: 16px; color: var(--muted); font-weight: 500; vertical-align: middle; }
.review-card h2 { font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1.2; color: var(--green); margin: 0 0 18px; overflow-wrap: anywhere; }
.review-card .eyebrow { margin-bottom: 4px; }
.answer { border-top: 1px solid var(--line); padding-top: 16px; margin-bottom: 18px; }
.grade .btn, .grade .btn-ghost { flex: 1 1 0; justify-content: center; min-height: 52px; }
.review-card > .btn { width: 100%; }
@media (min-width: 600px) { .review-card > .btn { width: auto; } }

/* podcast and episode suggestions */
.combo { position: relative; }
.combo-list { list-style: none; margin: 4px 0 0; padding: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  max-height: 320px; overflow-y: auto; box-shadow: 0 10px 24px rgba(22,70,54,.12); }
.combo-opt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; min-height: 48px; }
.combo-opt:hover, .combo-opt[aria-selected=true] { background: #e7efe9; }
.combo-text { display: flex; flex-direction: column; min-width: 0; }
.combo-label { font-weight: 500; overflow-wrap: anywhere; }
.combo-sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo-status { margin: 0; font-size: 13px; color: var(--muted); }
.combo-status:empty { display: none; }
.art { border-radius: 8px; object-fit: cover; flex: none; background: var(--sand); }
.input-wrap { position: relative; }
.picked-art { position: absolute; right: 4px; top: 4px; width: 40px; height: 40px; pointer-events: none; }
.input-wrap:has(.picked-art:not([hidden])) input { padding-right: 52px; }

/* where a learning came from */
.source { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 4px; }
.source p { margin: 0; overflow-wrap: anywhere; }
.source-show { font-weight: 600; font-size: 15px; }
.source-ep { font-size: 14px; color: var(--muted); }
.listen { display: inline-flex; align-items: center; min-height: 36px; font-size: 14px; font-weight: 600; }
.card-meta .art { border-radius: 6px; }
.card-source { flex: 1; min-width: 0; }

/* settings */
.nav-icon { padding: 6px 10px !important; }
.settings-section { border-top: 1px solid var(--line); padding: 22px 0 6px; }
.settings-section:first-of-type { border-top: 0; padding-top: 4px; }
.settings-section h2 { font-family: var(--display); font-weight: 600; font-size: 22px; color: var(--green); margin: 0 0 8px; }
.settings-section h3 { font-size: 16px; margin: 16px 0 4px; }
.settings-section p { margin: 0 0 12px; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-label { cursor: pointer; margin-bottom: 12px; }
label.file-label:has(+ .file-input:focus-visible) { outline: 3px solid var(--terracotta); outline-offset: 2px; }
.restore-summary { margin-top: 8px; }
.restore-summary .btn { margin-bottom: 4px; }
.btn-danger-solid { min-height: 48px; border: 0; border-radius: 999px; padding: 12px 20px; font-weight: 600; background: var(--danger); color: #fff; }
input[type=time] { font: inherit; font-size: 16px; color: var(--ink); background: var(--cream); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-height: 48px; }
.inline-form label:not(.visually-hidden) { align-self: center; }
.ios-steps { margin: 0 0 12px; padding-left: 22px; }
.ios-steps li { margin-bottom: 4px; }
.privacy { padding-left: 18px; margin: 0 0 12px; }
.privacy li { margin-bottom: 10px; }
.version-line { color: var(--muted); font-size: 13px; margin-top: 20px; }
.nudge { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 15px; }
.install-banner { display: flex; gap: 8px; align-items: flex-start; background: var(--paper); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 6px 12px 14px; margin: 0 0 18px; font-size: 15px; }
.install-banner p { margin: 0; flex: 1; }

/* share */
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; font-weight: 400; margin: 4px 0 6px; cursor: pointer; }
.consent input { margin-top: 3px; width: 20px; height: 20px; accent-color: var(--green); flex: none; }
.send-preview { margin: 0 0 12px; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; font-size: 15px; }
.send-preview dt { color: var(--muted); }
.send-preview dd { margin: 0; overflow-wrap: anywhere; }
.send-preview .url { font-size: 13px; color: var(--muted); }
.send-preview .takeaway { font-family: var(--display); font-size: 17px; white-space: pre-line; }
@media (max-width: 420px) { .send-preview { grid-template-columns: minmax(0, 1fr); gap: 2px; } .send-preview dd { margin-bottom: 8px; } }
.receipt { font-family: var(--display); font-size: 24px; letter-spacing: .06em; color: var(--terracotta); font-variant-numeric: tabular-nums; }

/* the public library */
.show-index ul { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.show-index a { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--paper); text-decoration: none; font-weight: 600; font-size: 14px; }
.show { border-top: 1px solid var(--line); padding: 26px 0 8px; scroll-margin-top: 12px; }
.show-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.show-head h2 { font-family: var(--display); font-weight: 600; font-size: 24px; line-height: 1.2; color: var(--green); margin: 0 0 4px; overflow-wrap: anywhere; }
.episode { margin: 0 0 22px; }
.episode h3 { font-size: 16px; margin: 0 0 10px; overflow-wrap: anywhere; }
.learnings { list-style: none; padding: 0; margin: 0 0 6px; display: flex; flex-direction: column; gap: 10px; }
.learnings li { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.learnings blockquote { margin: 0; font-family: var(--display); font-size: 19px; line-height: 1.4; white-space: pre-line; overflow-wrap: anywhere; }
.learnings .by { margin: 8px 0 0; font-weight: 600; color: var(--green); }
.empty-library { color: var(--muted); background: var(--paper); border: 1px dashed var(--line); border-radius: 14px; padding: 18px; }
.cta { margin: 30px 0 10px; }
.cta h2 { font-family: var(--display); font-weight: 600; font-size: 24px; color: var(--green); margin: 0 0 8px; }
.cta p { margin: 0 0 14px; }
#library { padding-bottom: 30px; }

/* ===================== the welcome screen ===================== */
body.welcome header.top, body.welcome main.wrap, body.welcome .foot { max-width: 1180px; }
header.top { border-bottom: 1px solid var(--rule); margin-bottom: 4px; }

/* drawing-sheet frames: hairline box, crop marks at the corners */
.frame { position: relative; border: 1px solid var(--rule); padding: 26px 18px; margin: 0 0 34px; }
@media (min-width: 700px) { .frame { padding: 40px; } }
.cm { position: absolute; width: 15px; height: 15px; pointer-events: none; }
.cm::before, .cm::after { content: ""; position: absolute; background: var(--green); }
.cm::before { left: 7px; top: 0; width: 1px; height: 15px; }
.cm::after { top: 7px; left: 0; height: 1px; width: 15px; }
.cm-tl { top: -8px; left: -8px; } .cm-tr { top: -8px; right: -8px; } .cm-bl { bottom: -8px; left: -8px; } .cm-br { bottom: -8px; right: -8px; }

/* hero: words on one side, the live scene on the other */
.w-hero { display: grid; gap: 28px; align-items: center; margin-top: 18px; }
.w-hero::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 9px; pointer-events: none;
  background: repeating-linear-gradient(90deg, var(--rule) 0 1px, transparent 1px 60px), repeating-linear-gradient(90deg, var(--rule) 0 1px, transparent 1px 12px);
  background-size: 100% 9px, 100% 5px; background-repeat: no-repeat; }
@media (min-width: 900px) { .w-hero { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); grid-template-areas: "copy stage" "spec stage"; gap: 28px 44px; align-items: end; }
  .w-copy { grid-area: copy; } .w-stage { grid-area: stage; align-self: center; } .w-hero .spec { grid-area: spec; align-self: start; } }
.w-hero h1 { font-size: clamp(50px, 10.5vw, 108px); line-height: .94; letter-spacing: -.035em; margin: 0 0 20px; text-wrap: balance; }
.w-hero h1 em { font-style: italic; color: var(--terracotta); }
.btn-big { min-height: 56px; padding: 15px 28px; font-size: 17px; }
.spec { display: grid; grid-template-columns: max-content minmax(0, 1fr); margin: 0; font-family: var(--mono); font-size: 12.5px;
  letter-spacing: .06em; text-transform: uppercase; border-top: 1px dashed var(--rule); border-bottom: 1px dashed var(--rule); padding: 12px 0; gap: 6px 0; }
.spec dt { color: var(--muted); padding-right: 14px; }
.spec dd { margin: 0; color: var(--ink); display: flex; }
.spec dd::before { content: ":"; flex: none; width: 2.2em; color: var(--muted); } /* colons line up in one column */

/* the stage: a train window, with the phone, pot and earbuds on the ledge */
.w-stage { margin: 0; }
.w-stage figcaption { margin-top: 10px; }
.stage { position: relative; aspect-ratio: 4 / 5; overflow: hidden; container-type: size; border: 1px solid var(--rule); background: var(--cream); }
@media (min-width: 900px) { .stage { aspect-ratio: 1 / 1; } }
.scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene .wall { fill: transparent; }
.scene .sky { fill: var(--paper); }
.scene .sun { fill: var(--terracotta); }
.scene .layer path, .scene .trees circle { stroke: var(--green); stroke-width: 1.6; stroke-linejoin: round; }
.scene .far path { fill: var(--paper); opacity: .55; }
.scene .mid path { fill: var(--paper); }
.scene .near path { fill: var(--sand); stroke-width: 2; }
.scene .trees line { stroke: var(--green); stroke-width: 1.6; }
.scene .trees circle { fill: var(--paper); }
.scene .near .trees circle { fill: var(--cactus-hi); }
.scene .poles line { stroke: var(--green); stroke-width: 1.4; opacity: .7; }
.scene .poles .wire { fill: none; stroke: var(--green); stroke-width: 1; opacity: .45; }
.scene .glint { stroke: #fff; stroke-width: 5; stroke-linecap: round; opacity: .75; }
.scene .frame-outer { fill: none; stroke: var(--green); stroke-width: 3; }
.scene .frame-inner { fill: none; stroke: var(--green); stroke-width: 1.5; }
.scene .ledge { fill: var(--sand); }
.scene .ledge-edge { stroke: var(--green); stroke-width: 2.5; }
.scene .ledge-line { stroke: var(--green); stroke-width: 1; opacity: .4; }
.scene .layer { animation: slide linear infinite; }
.scene .far { animation-duration: 90s; } .scene .mid { animation-duration: 40s; } .scene .near { animation-duration: 20s; }
@keyframes slide { to { transform: translateX(-800px); } }

.pot { position: absolute; left: 4%; bottom: 6%; height: 38%; width: auto; overflow: visible; z-index: 1; }
.pot-outline { fill: var(--green); stroke: var(--green); }
.pot-body { fill: var(--cactus); stroke: var(--cactus); }
.pot-helix path { fill: none; stroke: var(--paper); stroke-width: 2; opacity: .85; }
.pot-clay { fill: var(--terracotta); stroke: var(--green); stroke-width: 3; stroke-linejoin: round; }
.pot-band { stroke: var(--green); stroke-width: 2; opacity: .35; }
.ps line { stroke: var(--green); stroke-width: 4.5; stroke-linecap: round; }
.ps circle { fill: var(--green); }
.ps { opacity: 0; transform-box: fill-box; transform-origin: center; transition: opacity .3s; }
.ps.on { opacity: 1; animation: pop .6s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pop { from { transform: scale(.2); opacity: 0; } }
.buds { position: absolute; right: 5%; bottom: 7%; width: 17%; z-index: 1; }
.bud rect, .bud circle { fill: var(--paper); stroke: var(--green); stroke-width: 3; }
.bud .bud-dot { fill: var(--green); stroke: none; }

/* the phone: sizes itself to the stage, and its screen scales with the phone */
.phone { position: absolute; z-index: 2; bottom: 6%; left: 54%; height: 80%; aspect-ratio: 9 / 18; transform: translateX(-50%) rotate(-3deg);
  background: var(--green); border-radius: 13% / 6.2%; padding: 2.6%; box-shadow: 0 2cqh 5cqh rgba(22, 70, 54, .28), inset 0 0 0 1px rgba(255,255,255,.12); }
.phone-screen { position: relative; height: 100%; background: var(--cream); border-radius: 11% / 5.2%; overflow: hidden;
  container-type: inline-size; font-size: 5.4cqw; line-height: 1.3; color: var(--ink); }
.ph-status { display: flex; justify-content: space-between; align-items: center; padding: 4cqw 7cqw 0; font-size: 4cqw; font-weight: 600; }
.ph-island { width: 26cqw; height: 7cqw; border-radius: 99px; background: var(--ink); }
.ph-bar { display: flex; justify-content: space-between; align-items: center; padding: 3.5cqw 7cqw 0; }
.ph-brand { font-family: var(--display); font-weight: 600; font-size: 6.4cqw; color: var(--green); letter-spacing: -.02em; }
.ph-chip { font-family: var(--mono); font-size: 3.2cqw; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--rule); border-radius: 99px; padding: .3em .8em; }
.ph-scene { position: absolute; inset: 31cqw 7cqw 8cqw; display: flex; flex-direction: column; gap: 2.6cqw; opacity: 0;
  transform: translateY(3cqw); transition: opacity .45s ease, transform .45s ease; pointer-events: none; }
.stage[data-step=play] .ph-play, .stage[data-step=save] .ph-save, .stage[data-step=seed] .ph-seed,
.stage[data-step=review] .ph-review, .stage[data-step=grow] .ph-grow { opacity: 1; transform: none; }
.ph-art { align-self: center; width: 54cqw; aspect-ratio: 1; border-radius: 4cqw; background: var(--sand); border: 1px solid var(--rule);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3cqw; margin-bottom: 2cqw; }
.ph-art-title { font-family: var(--display); font-style: italic; font-size: 7.5cqw; color: var(--green); }
.ph-wave { width: 70%; } .ph-wave path { fill: none; stroke: var(--terracotta); stroke-width: 2.5; stroke-linecap: round; }
.ph-label { font-family: var(--mono); font-size: 3.4cqw; letter-spacing: .12em; text-transform: uppercase; color: var(--terracotta); }
.ph-title { font-family: var(--display); font-size: 6.4cqw; line-height: 1.15; color: var(--green); }
.ph-sub { font-size: 3.9cqw; color: var(--muted); }
.ph-progress { height: 1.4cqw; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 1cqw; }
.ph-progress-fill { display: block; height: 100%; width: 30%; background: var(--green); }
.stage[data-step=play] .ph-progress-fill { animation: progress 3s linear forwards; }
@keyframes progress { from { width: 30%; } to { width: 52%; } }
.ph-controls { display: flex; justify-content: center; gap: 10cqw; margin: 1cqw 0; }
.ph-icon { width: 8cqw; height: 8cqw; } .ph-icon path { fill: none; stroke: var(--green); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ph-btn { display: block; text-align: center; border: 1.5px solid var(--green); border-radius: 99px; padding: 2.8cqw; font-weight: 600; font-size: 4.4cqw;
  color: var(--green); transition: transform .15s, box-shadow .2s; }
.ph-btn-solid { background: var(--green); color: var(--cream); }
.ph-btn.tapped { transform: scale(.94); box-shadow: 0 0 0 3cqw rgba(185, 89, 47, .28); }
.ph-play .ph-btn { margin-top: auto; }
.ph-field-label { font-size: 3.7cqw; font-weight: 600; margin-top: 1.5cqw; }
.ph-field { background: var(--paper); border: 1px solid var(--rule); border-radius: 2.6cqw; padding: 2.6cqw 3cqw; min-height: 11cqw;
  font-family: var(--display); font-size: 4.7cqw; line-height: 1.3; color: var(--ink); }
.ph-caret { display: inline-block; width: .5cqw; height: 4.5cqw; background: var(--green); vertical-align: -.5cqw; margin-left: .3cqw; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.ph-save .ph-btn { margin-top: auto; }
.ph-seed, .ph-grow { align-items: center; justify-content: center; text-align: center; gap: 3cqw; }
.ph-seed-icon { width: 13cqw; height: 9cqw; border-radius: 50%; background: var(--seed); transform: rotate(-20deg); }
.ph-big { font-family: var(--display); font-size: 7.6cqw; line-height: 1.15; color: var(--green); }
.ph-day { font-family: var(--mono); font-size: 3.4cqw; letter-spacing: .12em; text-transform: uppercase; color: var(--cream); background: var(--terracotta);
  border-radius: 99px; padding: .5em 1.1em; margin-top: 4cqw; opacity: 0; }
.stage[data-step=seed] .ph-day { animation: fade-in .4s ease 1.1s forwards; }
@keyframes fade-in { to { opacity: 1; } }
.ph-hint { font-size: 3.7cqw; color: var(--muted); }
.ph-q { font-family: var(--display); font-size: 7.4cqw; line-height: 1.15; color: var(--green); margin: 1cqw 0 2cqw; }
.ph-answer { font-family: var(--display); font-size: 5cqw; background: var(--paper); border: 1px solid var(--rule); border-radius: 2.6cqw;
  padding: 3cqw; opacity: 0; transform: translateY(2cqw); transition: opacity .35s, transform .35s; }
.ph-review .js-tap-show { margin-top: auto; }
.ph-grade { display: none; gap: 3cqw; margin-top: auto; } .ph-grade .ph-btn { flex: 1; }
.stage[data-sub=shown] .ph-answer { opacity: 1; transform: none; }
.stage[data-sub=shown] .js-tap-show { display: none; }
.stage[data-sub=shown] .ph-grade { display: flex; }
.ph-grow .ph-big { color: var(--terracotta); }
@media (prefers-reduced-motion: reduce) { .scene .layer, .ph-caret, .ps.on, .stage[data-step=play] .ph-progress-fill { animation: none; } .ph-day { opacity: 1; } }

/* the arms, folded away under the goal box */
.arms-more { margin: 4px 0 0; }
.arms-more summary { cursor: pointer; font-weight: 600; color: var(--green); min-height: 44px; display: flex; align-items: center; gap: 6px; }
.arms-more[open] summary { margin-bottom: 6px; }
.arms-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.arms-grid input { margin: 0; }
/* phones: a taller scene and a bigger phone, so the demo is readable */
@media (max-width: 899px) {
  .stage { aspect-ratio: 3 / 4; }
  .phone { height: 88%; left: 58%; bottom: 4%; }
  .phone-screen { font-size: 6cqw; }
  .pot { height: 30%; left: 2%; bottom: 5%; }
  .buds { width: 15%; right: 2%; bottom: 4%; }
}
.arms-more summary { list-style: none; }
.arms-more summary::-webkit-details-marker { display: none; }
.arms-more summary::before { content: "+"; font-family: var(--mono); font-size: 18px; width: 24px; height: 24px; border: 1px solid var(--rule); border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; color: var(--terracotta); margin-right: 4px; }
.arms-more[open] summary::before { content: "−"; }

/* the first step, in the hero */
.start-form { margin: 6px 0 0; max-width: 520px; }
.start-label { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; color: var(--green); margin-bottom: 10px; }
.start-n { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--terracotta); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 14px; font-weight: 600; }
.start-row { display: flex; gap: 8px; flex-wrap: wrap; }
.start-row input { flex: 1 1 220px; min-height: 56px; font-size: 18px; background: var(--paper); border-color: var(--green); }
.start-row .btn { flex: 0 0 auto; }
@media (max-width: 480px) { .start-row .btn { flex: 1 1 100%; } }
.start-form .field-error { margin-top: 6px; }
.w-hero h1 { margin-bottom: 14px; }
.w-sub { font-size: 17px; line-height: 1.45; color: var(--muted); max-width: 40ch; margin: 0 0 24px; }

.ph-field-tall { min-height: 24cqw; }

/* in-page confirmation (instead of the browser's confirm pop-up) */
.confirm-bar { margin-top: 14px; border: 1px solid #e3b7aa; background: #fbefe9; border-radius: 12px; padding: 14px; }
.confirm-bar p { margin: 0 0 10px; font-weight: 600; color: var(--danger); }
