/* The site's plain pages (thanks, activate, download, recover, gift, legal, 404): the same sky,
   type and pot-colored buttons as the home page (garden.css), with a cream panel for the things
   you act on, and the soil at the bottom. Their scripts find elements by id; the classes below
   are the ones they and the markup use. */

body.plain { min-height: 100vh; display: flex; flex-direction: column; background: var(--sky); }
.plain main { flex: 1; }
.plain-main { padding-block: 128px 96px; }
.narrow { max-width: 760px; }
.plain h1 { font-size: clamp(40px, 5.4vw, 68px); line-height: 0.98; margin-bottom: 18px; }
.plain h1:focus { outline: none; }
.plain h2 { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.1; margin: 44px 0 12px; }
.plain .lead { margin-bottom: 8px; }
.plain .lead + .lead { margin-top: 10px; }
.plain p a, .plain li a { color: var(--pot-deep); font-weight: 600; }
.hint { font-size: 15px; color: var(--ink-soft); margin-top: 12px; }
.label { font: 500 12px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 10px; }

/* The thing you act on: a cream panel with a hard step under it, like the price sign. */
.panel { margin-top: 28px; padding: 28px clamp(20px, 4vw, 32px); background: #FBF6EE; border: 2px solid #E6D9C8; border-radius: 16px; box-shadow: 0 5px 0 rgba(92, 65, 40, 0.14); }
.panel > p + p { margin-top: 12px; }
.panel .hint:first-child { margin-top: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Buttons: the home page's, under the names the scripts set. */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; text-decoration: none;
  font: 600 17px/1 var(--body); padding: 16px 22px; border-radius: 10px; background: var(--pot); color: var(--pot-ink);
  box-shadow: 0 4px 0 var(--pot-deep); transition: transform 0.12s ease, box-shadow 0.12s ease; }
.button:hover { transform: translateY(1px); box-shadow: 0 3px 0 var(--pot-deep); }
.button:active { transform: translateY(4px); box-shadow: 0 0 0 var(--pot-deep); }
.button.secondary { background: #FFFFFF; color: var(--ink); box-shadow: 0 3px 0 rgba(38, 33, 29, 0.22); border: 2px solid rgba(38, 33, 29, 0.14); }
.button.secondary:hover { box-shadow: 0 2px 0 rgba(38, 33, 29, 0.22); }
.button.small { padding: 10px 14px; font-size: 15px; }
.button[disabled], .button[aria-disabled="true"] { opacity: 0.5; cursor: default; transform: none; }

/* The license key: monospace on paper, with Copy beside it. */
.key-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.key { font: 500 clamp(15px, 2vw, 18px)/1.3 var(--mono); letter-spacing: 0.03em; padding: 12px 14px; background: #FFFFFF; border: 2px dashed var(--sign); border-radius: 10px; color: var(--ink); overflow-wrap: anywhere; }

/* Getting started, numbered with the home page's green numerals. */
.howto { list-style: none; counter-reset: howto; margin: 0; padding: 0; display: grid; gap: 14px; }
.howto li { counter-increment: howto; display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: baseline; color: var(--ink-soft); }
.howto li::before { content: counter(howto); font: 600 15px/1 var(--mono); color: var(--grass-edge); }

/* Forms. */
.plain form { margin-top: 28px; }
.plain label { display: block; font-weight: 600; margin-bottom: 8px; }
.form-row { display: flex; flex-wrap: wrap; gap: 10px; }
.form-row input { flex: 1 1 260px; min-width: 0; font: 500 17px/1.2 var(--body); padding: 14px 16px; border: 2px solid #D8C6B1; border-radius: 10px; background: #FFFFFF; color: var(--ink); }
.form-row input:focus { outline: none; border-color: var(--pot); box-shadow: 0 0 0 3px rgba(210, 122, 85, 0.25); }
#key[type="text"] { font-family: var(--mono); letter-spacing: 0.03em; }
.message { margin-top: 16px; padding: 12px 14px; border-radius: 10px; background: rgba(141, 178, 98, 0.22); color: var(--ink); font-weight: 500; }
.message.error { background: rgba(224, 96, 63, 0.14); color: #8A2E17; }

/* Waiting for the license: three seeds coming up. */
.waiting { display: flex; align-items: center; gap: 14px; margin-top: 18px; font-weight: 600; color: var(--ink-soft); }
.seeds { display: inline-flex; gap: 6px; align-items: flex-end; height: 22px; }
.seeds i { width: 6px; border-radius: 3px 3px 1px 1px; background: var(--grass-edge); animation: sprout 1.2s ease-in-out infinite; }
.seeds i:nth-child(2) { animation-delay: 0.2s; }
.seeds i:nth-child(3) { animation-delay: 0.4s; }
@keyframes sprout { 0%, 100% { height: 5px; } 50% { height: 20px; } }

/* A tree to go with the moment (thanks: it grows; 404: a stump). */
.moment-tree { width: 270px; height: 270px; float: right; margin: -70px -20px 0 24px; shape-outside: circle(46%); }
@media (max-width: 680px) { .moment-tree { float: none; margin: -10px 0 0 -20px; width: 180px; height: 180px; } }

/* Gifts on the thanks page. */
.gift-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.gift-list li { display: grid; gap: 6px; padding: 14px 16px; background: #FFFFFF; border: 1px solid #E6D9C8; border-radius: 12px; }
.gift-name { font-weight: 600; }
.gift-status { font-size: 14px; color: var(--ink-soft); }
.gift-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

/* Legal pages. */
.legal .updated { font: 500 13px/1 var(--mono); color: var(--ink-soft); margin-bottom: 26px; letter-spacing: 0.02em; }
.legal p, .legal li { color: var(--ink-soft); }
.legal p + p { margin-top: 14px; }
.legal ul { padding-left: 22px; display: grid; gap: 10px; }
.legal strong { color: var(--ink); }

/* The ground above the footer: grass on soil, flat, like the home page's bands. */
.ground-edge { height: 26px; background: linear-gradient(var(--grass) 0 9px, var(--grass-edge) 9px 13px, var(--soil) 13px 100%); }
.plain .foot { padding-block: 56px 44px; }
.plain .foot .fine { color: var(--cream-soft); }

@media (prefers-reduced-motion: reduce) {
  .seeds i { animation: none; height: 14px; }
  .button { transition: none; }
}

/* A gift's page (/gift, gift.js): the card switches between loading, ready and problem. */
.gift-card > .gift-loading, .gift-card > .gift-ready, .gift-card > .gift-problem { display: none; }
.gift-card[data-state="loading"] > .gift-loading,
.gift-card[data-state="ready"] > .gift-ready,
.gift-card[data-state="problem"] > .gift-problem { display: block; }
.gift-card .kicker { margin-bottom: 14px; color: var(--pot-deep); }
.gift-for { font-weight: 600; font-size: 19px; color: var(--ink-soft); margin: -4px 0 8px; }
.gift-note { margin: 22px 0; padding: 20px 22px; background: #FFFFFF; border: 2px solid #E6D9C8; border-left: 6px solid var(--pot); border-radius: 12px; }
.gift-note[hidden] { display: none; }
.gift-note blockquote { margin: 0; font-size: 20px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; color: var(--ink); }
.gift-note figcaption { margin-top: 10px; font-weight: 600; color: var(--ink-soft); }
.gift-note figcaption[hidden] { display: none; }
.gift-more { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.gift-more[hidden] { display: none; }
.print-only { display: none; }

/* Printed as a card: just the card on white paper, with a dashed edge to cut along. */
@media print {
  @page { margin: 16mm; }
  body.plain { background: #FFFFFF; }
  .top, .foot, .ground-edge, .no-print, .moment-tree { display: none !important; }
  .plain-main { padding: 0; }
  .gift-card { border: 2px dashed var(--sign-edge); border-radius: 16px; padding: 28px; }
  .panel { box-shadow: none; }
  .print-only { display: block; }
}
