/* Homepaper: warm reassurance. Direction in design/visual-brief.md.
   Cream room, white paper surfaces, one garden-green anchor, rounded everything. */
:root {
  /* surfaces */
  --cream: #fff6ec;
  --surface: #fff;
  --field: #fffaf5;
  /* text */
  --ink: #3d2b1f;
  --muted: #7c6153;   /* 5:1 on cream */
  --hint: #87695a;    /* 4.7:1 on cream; small print and placeholders */
  /* lines */
  --line: #f3e2d4;
  --line-strong: #ead3c0;
  --control-line: #a2826d;  /* edges of fields and tick boxes: 3.3:1 or more on every surface */
  /* the one anchor colour; change it here (illustrations follow) */
  --accent: #2f7d52;        /* white text on it: 5:1 */
  --accent-hover: #286e48;
  --accent-ledge: #1f5639;
  --accent-soft: #e6f3eb;
  --accent-ring: rgba(47, 125, 82, .3);
  --on-accent: #fff;
  /* problems and the rare success */
  --coral: #d4553b;
  --coral-line: #ea8a72;
  --coral-soft: #ffeee8;
  --coral-ink: #95402c;
  --green: #3b8657;
  --green-soft: #e3f5e9;
  /* pastel tints, for small things only */
  --peach: #ffe1c7;
  --butter: #fff0b3;
  --lilac: #eadcff;
  --sky: #d8ecff;
  --mint: #d4f2df;
  --aqua: #cdeeee;
  --blush: #ffdde6;
  --peri: #e2e3ff;
  --sage: #e3efd9;
  --sand: #f6ead8;
  /* shape */
  --r-card: 24px;
  --r-field: 14px;
  --blob: 58% 42% 55% 45% / 48% 55% 45% 52%;
  --shadow: 0 1px 2px rgba(61, 43, 31, .04), 0 6px 20px rgba(150, 90, 40, .06);
  --shadow-lift: 0 2px 4px rgba(61, 43, 31, .05), 0 14px 30px rgba(150, 90, 40, .11);
  --font: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ── base ──────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 600 16.5px/1.6 var(--font); min-height: 100vh;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
a { color: inherit; }
h1, h2, h3 { font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin: 0 0 .4em; text-wrap: balance; }
h1 { font-size: clamp(28px, 5.6vw, 36px); }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
p { margin: 0 0 1em; }
b, strong { font-weight: 800; }
.lede { font-size: 17px; color: var(--muted); text-wrap: pretty; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
::selection { background: var(--peach); }
:focus-visible { outline: 3px solid var(--accent-ledge); outline-offset: 3px; }
:focus:not(:focus-visible) { outline: none; }
[tabindex="-1"]:focus { outline: none; }
.note[tabindex="-1"]:focus { outline: none; }
.note[tabindex="-1"]:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.nowrap { white-space: nowrap; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

/* a calm problem: coral tint, plain words */
.note { background: var(--coral-soft); color: var(--coral-ink); font-weight: 700; border-radius: 18px; padding: 14px 18px; font-size: 15.5px; line-height: 1.5;
  margin: 0 auto 22px; text-align: center; text-wrap: balance; animation: rise .2s ease-out; }
/* a gentle return ("no problem"): warm, not alarming */
.note.calm { background: var(--peach); color: var(--ink); }

/* ── page shell ────────────────────────────────────────────────── */
.top { display: flex; justify-content: space-between; align-items: center; min-height: 88px; padding: 22px clamp(16px, 4vw, 40px); }
.mark { display: inline-flex; align-items: center; min-height: 44px; gap: 9px; font-weight: 800; font-size: 21px; letter-spacing: -.02em; color: var(--accent); text-decoration: none; }
.mark svg { width: 28px; height: 28px; flex: none; }
.top form { margin: 0; }
main { max-width: 620px; margin: 0 auto; padding: 2vh 16px 96px; }
body.wide main { max-width: 1040px; }

/* ── buttons and links ─────────────────────────────────────────── */
/* Primary: a green pill on a darker ledge; it presses down onto it. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 800 16px/1 var(--font); color: var(--on-accent); background: var(--accent);
  border: 0; border-radius: 999px; padding: 15px 28px; margin-bottom: 4px; cursor: pointer; text-decoration: none; white-space: nowrap;
  box-shadow: 0 4px 0 var(--accent-ledge); transition: background .15s, transform .08s, box-shadow .08s; }
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--accent-ledge); }
.btn.big { padding: 18px 38px; font-size: 18px; }
.btn .ext { width: 16px; height: 16px; margin-right: -4px; }
/* Secondary: a white pill with a warm border. */
.btn.ghost { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 2px var(--control-line), 0 3px 0 var(--line-strong); }
.btn.ghost:hover { background: var(--field); box-shadow: inset 0 0 0 2px var(--control-line), 0 3px 0 #e3c3aa; }
.btn.ghost:active { box-shadow: inset 0 0 0 2px var(--control-line), 0 0 0 #e3c3aa; }
.btn[disabled], [aria-disabled="true"] { opacity: .65; cursor: progress; }
/* Quiet: muted text, underlined on hover. */
.quiet { display: inline-flex; align-items: center; min-height: 44px; background: none; border: 0; padding: 0 10px; border-radius: 10px; font: inherit; font-size: 15px; font-weight: 700;
  color: var(--muted); cursor: pointer; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; transition: color .15s, text-decoration-color .15s; }
.quiet:hover { color: var(--ink); text-decoration-color: currentColor; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }
.row.center { justify-content: center; }

/* ── fields ────────────────────────────────────────────────────── */
input:not([type=checkbox]):not([type=radio]), textarea { font: 600 16px/1.5 var(--font); color: var(--ink); background: var(--field);
  border: 2px solid var(--control-line); border-radius: var(--r-field); padding: 11px 16px; width: 100%; transition: border-color .15s, background .15s; }
input::placeholder, textarea::placeholder { color: var(--hint); opacity: 1; }
input:not([type=checkbox]):not([type=radio]):focus, textarea:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px var(--accent-ring); }
input:not([type=checkbox]):not([type=radio])[aria-invalid="true"] { border-color: var(--coral); background: #fffaf8; }
input:not([type=checkbox]):not([type=radio])[aria-invalid="true"]:focus { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(212, 85, 59, .25); outline: 2px solid var(--ink); outline-offset: 3px; }
textarea { display: block; resize: vertical; border-radius: 16px; }
input:not([type=checkbox]):not([type=radio]):focus-visible, textarea:focus-visible { outline: 2px solid var(--accent-ledge); outline-offset: 2px; }
.field-label { display: block; font-size: 14.5px; font-weight: 800; color: var(--ink); margin: 0 0 6px; }
.field-label em { font-style: normal; font-weight: 700; color: var(--muted); }

/* ── organic icon holder ───────────────────────────────────────── */
.blob { width: 48px; height: 48px; flex: none; display: grid; place-items: center; background: var(--tint, var(--accent-soft)); border-radius: var(--blob); }
.blob svg, .ic svg { display: block; }
.art { display: block; width: 196px; height: auto; aspect-ratio: 180 / 112; margin: 0 auto 12px; }
/* brief motion only (under five seconds), then still */
/* the pencil draws only when asked (on arrival, and when the wait's status moves on) */
/* still: the pencil is set down beside the page */
.art.still .pencil { animation: none; transform: translate(28px, 6px) rotate(52deg); transform-box: view-box; transform-origin: 88px 94px; }
@keyframes write { from { transform: translateX(-5px); } to { transform: translateX(3px); } }

/* ── landing ───────────────────────────────────────────────────── */
.hero { text-align: center; padding-top: 1vh; }
.art-hero { width: 250px; aspect-ratio: 240 / 150; margin-bottom: 18px; }
.hero h1 { font-size: clamp(32px, 6.4vw, 46px); max-width: 12em; margin-inline: auto; letter-spacing: -.025em; }
.hero .lede { font-size: 18px; max-width: 30em; margin: 0 auto 30px; text-wrap: balance; }
/* kept together when they fit, free to wrap when text is enlarged */
.hero h1 .nowrap { display: inline-block; max-inline-size: 100%; white-space: normal; }
.hero .btn.big { max-inline-size: 100%; white-space: normal; line-height: 1.2; }
.signin { margin: 14px 0 0; font-size: 14.5px; color: var(--muted); }
.signin .quiet { padding: 0 4px; color: var(--ink); font-size: 14.5px; font-weight: 800; text-decoration-color: var(--hint); }
.signin .quiet:hover { text-decoration-color: currentColor; }
.how-title { margin: 36px 0 14px; font-size: 20px; }
.how { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; text-align: left; }
.how li { display: grid; grid-template-columns: auto 1fr; column-gap: 16px; align-items: start; background: var(--surface); border-radius: var(--r-card); padding: 18px 20px; box-shadow: var(--shadow); }
.how h3 { color: var(--ink); font-size: 17px; line-height: 1.3; margin: 2px 0 2px; }
.how p { margin: 0; font-size: 15.5px; line-height: 1.5; color: var(--muted); text-wrap: pretty; }
.how-n { grid-row: span 2; width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--blob); background: var(--peach); color: var(--ink); font-weight: 800; font-size: 16px; }
.how li:nth-child(2) .how-n { background: var(--lilac); }
.how li:nth-child(3) .how-n { background: var(--mint); }

/* ── steps: a centred head ─────────────────────────────────────── */
.step-head { text-align: center; margin-bottom: 28px; }
.step-head h1 { max-width: 15em; margin-inline: auto; }
.step-head .lede, .paper-card .lede { max-width: 31em; margin: 0 auto; text-wrap: balance; }
.stepper { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 14px;
  font-size: 12.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--hint); }
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 999px; background: var(--line-strong); }
.dots i.on { background: var(--accent); }
.dots i.now { width: 28px; }

/* the closing row on a step: one button, a reassurance, a way back */
.actions { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 30px; text-align: center; }
.actions .reassure { margin: 0; font-size: 14.5px; color: var(--hint); }

/* ── steps 1 and 2: connect cards ──────────────────────────────── */
.providers { display: grid; gap: 12px; margin: 0 0 20px; padding: 0; list-style: none; }
.providers > li { display: block; }
.provider { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 78px; padding: 14px 18px 14px 14px; border: 0; border-radius: var(--r-card);
  background: var(--surface); box-shadow: var(--shadow); font: inherit; color: inherit; text-align: left; text-decoration: none; cursor: pointer;
  transition: transform .2s, box-shadow .2s; }
.provider:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.provider:active { transform: none; }
.provider:focus-visible { box-shadow: var(--shadow), 0 0 0 2.5px var(--accent); }
.provider.htmx-request { cursor: progress; }
.provider.htmx-request .p-cta, .provider.htmx-request .p-chev { opacity: .55; }
.logo { width: 26px; height: 26px; flex: none; }
.logo.tile { display: grid; place-items: center; border-radius: 8px; color: #fff; font: 800 14px/1 var(--font); letter-spacing: -.02em; }
.tile.yahoo { background: #6001d2; }
.tile.proton { background: #6d4aff; }
.tile.cozi { background: #1d9bd7; }
.tile.other { background: none; color: var(--accent); font-size: 22px; line-height: .6; }
.p-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.p-text b { font-size: 17px; line-height: 1.3; }
.p-text small { color: var(--muted); font-size: 14px; line-height: 1.4; }
.p-cta { flex: none; font-weight: 800; font-size: 14px; color: var(--accent-ledge); background: var(--accent-soft); border-radius: 999px; padding: 9px 16px;
  transition: background .15s, color .15s; }
.provider:hover .p-cta { background: var(--accent); color: var(--on-accent); }
.p-chev { width: 20px; height: 20px; flex: none; color: var(--hint); margin-right: 8px; transition: transform .15s, color .15s; }
.provider:hover .p-chev { color: var(--accent); transform: translateX(2px); }

/* a card after it's clicked: "not yet" */
.provider.open { display: block; cursor: default; padding: 16px 18px 20px 14px; box-shadow: var(--shadow-lift); animation: rise .2s ease-out; }
.provider.open:hover { transform: none; }
.p-head { display: flex; align-items: center; gap: 16px; }
.p-head .p-text small { color: var(--muted); font-weight: 700; }
.p-close { width: 44px; height: 44px; margin: -4px -12px -4px 0; flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--muted);
  cursor: pointer; transition: background .15s, color .15s; }
.p-close svg { width: 16px; height: 16px; }
.p-close:hover { background: var(--cream); color: var(--ink); }
/* the body lines up with the provider name, not the icon */
.p-body { padding: 10px 0 0 64px; }
.p-body > p { margin: 0 0 14px; font-size: 16px; line-height: 1.55; }
.p-body > p:last-child { margin-bottom: 0; }
.p-body .addr { overflow-wrap: anywhere; }
.p-body .p-next { color: var(--muted); }
/* an opened card takes focus so its introduction is read first; the ring shows for keyboard users */
.provider.open[tabindex="-1"]:focus { outline: none; }
.provider.open[tabindex="-1"]:focus-visible { outline: 3px solid var(--accent-ledge); outline-offset: 3px; }
.provider.done .p-body > p[tabindex="-1"]:focus { outline: 2px solid var(--accent-ledge); outline-offset: 4px; border-radius: 6px; }
.provider.done .p-text b { overflow-wrap: anywhere; }
.p-body form:not(.ask-form) { margin: 0; }
/* name of the service (only for "something else"), email, then the button; an error sits right under the fields */
.ask-form { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "email btn" "err ."; column-gap: 10px; margin: 0; }
/* "something else": either field is enough, so they sit together as one group, with the button below */
.ask-form.with-name { display: block; }
.ask-group { display: grid; gap: 12px; }
.ask-group > label, .ask-group > .field-error { grid-area: auto; }
.ask-form.with-name .ask-btn { margin-top: 14px; }
.ask-detail { display: block; }
.ask-email { grid-area: email; display: block; min-width: 0; }
.ask-form input:not([type=checkbox]) { height: 50px; padding: 0 16px; }
/* the face lines up with the field; the ledge sits below it */
.ask-btn { grid-area: btn; align-self: end; height: 46px; padding: 0 24px; margin-bottom: 4px; }
/* "either one" forms: the rule is said up front, and a miss is said right under it, above both fields */
.ask-legend { padding: 0; margin: 0 0 10px; font-size: 14px; font-weight: 600; color: var(--muted); }
/* a miss on the pair: a coral rule beside the group, not two red fields */
.ask-group.invalid { border-left: 3px solid var(--coral); padding-left: 14px; margin-left: -17px; }
.field-error.group-error { margin: 0 0 2px; }
.field-error { grid-area: err; max-width: 34em; text-wrap: pretty; margin: 8px 0 0; font-size: 14.5px; font-weight: 700; color: var(--coral-ink); }
.p-ok { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 800; color: var(--accent-ledge); }
.p-ok svg { width: 16px; height: 16px; }
.promise { margin: 14px auto 0; max-width: 40em; font-size: 14.5px; color: var(--muted); text-align: center; text-wrap: balance; }
.promise svg { display: inline-block; width: 16px; height: 16px; margin-right: 6px; vertical-align: -2px; color: var(--muted); }
.skip-row + .promise.foot { margin-top: 6px; }
.promise.foot { margin-top: 22px; font-size: 13.5px; color: var(--hint); }
.promise.foot svg { width: 14px; height: 14px; margin-right: 5px; color: var(--hint); }
.step .actions form { margin: 0; }
/* calendar: the quiet skip follows the cards; while a thank-you offers "skip", it steps aside */
.skip-row { display: flex; justify-content: center; margin: 14px 0 0; }
.skip-row .quiet { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
.skip-row .quiet:hover { text-decoration-color: currentColor; }
.step:has(.provider.done) > .skip-row { display: none; }
/* coming back from Google: the message and the cards lead, the picture steps aside */
.step.has-note .step-head .art { display: none; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

/* ── steps 3 and 4: pick, or describe your own ─────────────────── */
/* While "describe your own" is in use, the cards step back but stay fully readable. */
.looks.dim .look, .lib.dim .sec-card, .details.dim { background: var(--field); box-shadow: none; }
.looks.dim .thumb { filter: saturate(.55) opacity(.7); }
/* Shared by the look cards and section cards: white, lifted, a green ring when picked. */
.look, .sec-card { position: relative; background: var(--surface); border: 2.5px solid transparent; border-radius: var(--r-card); box-shadow: var(--shadow);
  cursor: pointer; transition: transform .2s, box-shadow .2s, border-color .15s; }
.look:hover, .sec-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.look:has(input:checked), .sec-card:has(.sec-main input:checked) { border-color: var(--accent); }
.look:has(input:focus-visible), .sec-card:has(.sec-main input:focus-visible) { outline: 3px solid var(--accent-ledge); outline-offset: 3px; }

/* step 3: looks */
.looks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.look { display: flex; flex-direction: column; padding: 10px; }
.look input { position: absolute; opacity: 0; pointer-events: none; }
.look-text { display: grid; grid-template-columns: 1fr auto; column-gap: 10px; align-items: center; padding: 12px 6px 6px 8px; }
.look-text small { grid-column: 1 / -1; }
.look .radio { position: relative; grid-column: 2; grid-row: 1; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2.5px var(--control-line); }
/* a pick set aside while your own description is in use says so, on both steps */
.kept { display: none; margin-top: 6px; font-style: normal; font-size: 13.5px; font-weight: 800; color: var(--muted); }
.look .kept { grid-column: 1 / -1; }
.looks.dim .look:has(input:checked) .kept, .lib.dim .sec-card:has(.sec-main input:checked) .kept { display: block; }
.look:has(input:checked) .radio { background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
  box-shadow: 0 2px 0 var(--accent-ledge); animation: pop .2s ease-out; }
/* kept for switching back: a quiet dot, not an active tick */
.looks.dim .look:has(input:checked) { border-color: var(--line-strong); }
.looks.dim .look:has(input:checked) .radio { background: radial-gradient(circle, var(--muted) 0 5px, #fff 5.5px); box-shadow: inset 0 0 0 2.5px var(--control-line); animation: none; }
.look-text b { font-size: 17px; line-height: 1.3; }
.look-text small { color: var(--muted); font-size: 14.5px; line-height: 1.45; text-wrap: balance; }
@keyframes pop { from { opacity: 0; transform: scale(.7); } }

/* The look thumbnails depict the paper styles themselves, so they keep their own look. */
.thumb { position: relative; display: block; aspect-ratio: 2 / 1; container-type: inline-size; border-radius: 16px; overflow: hidden; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.thumb i, .thumb span { display: block; }
.t-newspaper { padding: 9% 9% 0; background: #fbfaf6; }
.tn-mast { font: 700 clamp(10px, 7.2cqw, 18px)/1 "Old English Text MT", "UnifrakturMaguntia", Georgia, serif; text-align: center; letter-spacing: .01em; color: #111; white-space: nowrap; }
.tn-dateline { border-top: 1px solid #111; border-bottom: 3px double #111; height: min(7px, 2.6cqw); margin: min(6px, 2.4cqw) 0 min(7px, 2.6cqw); }
.tn-head { height: min(7px, 2.6cqw); width: 70%; background: #222; border-radius: 1px; margin-bottom: min(7px, 2.6cqw); }
.tn-cols { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.tn-cols i { height: 20cqw; max-height: 40px; background: repeating-linear-gradient(#bdb7ab 0 2px, transparent 2px 6px); }
.t-noticeboard { background: #b98a55 radial-gradient(#a3733f 1px, transparent 1.5px) 0 0 / 7px 7px; }
.pi { position: absolute; width: 34%; aspect-ratio: 1; box-shadow: 0 3px 6px rgba(0,0,0,.25); }
.pi::before { content: ""; position: absolute; top: 6px; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: #d62828; box-shadow: 0 1px 2px rgba(0,0,0,.4); }
.pi.a { background: #fde047; top: 10%; left: 8%; transform: rotate(-6deg); }
.pi.b { background: #f9a8d4; top: 14%; left: 52%; transform: rotate(5deg); }
.pi.c { background: #86efac; top: 55%; left: 22%; transform: rotate(3deg); width: 28%; }
.pi.d { background: #fff; top: 58%; left: 60%; transform: rotate(-4deg); width: 30%; aspect-ratio: 4/3; }
.t-jotter { background: #fdfdf8 repeating-linear-gradient(transparent 0 13px, #b9cbe8 13px 14px); background-position: 0 10px; }
.t-jotter::before { content: ""; position: absolute; top: 0; bottom: 0; left: 15%; border-left: 1.5px solid #e88b8b; }
.tn-hand { position: absolute; top: 9%; left: 20%; font: 600 clamp(12px, 8cqw, 21px)/1 "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive; color: #1e3a8a; transform: rotate(-2deg); }
.tn-doodle { position: absolute; top: 40%; left: 22%; font-size: clamp(16px, 11cqw, 28px); color: #1e3a8a; transform: rotate(-12deg); }
.tn-box { position: absolute; right: 10%; top: 38%; width: 38%; height: 46%; border: 1.5px dashed #1e3a8a; border-radius: 6px; transform: rotate(2deg); }
.t-planner { padding: 6% 8%; background: #fff; }
.tn-bar { height: 4.5cqw; width: 45%; background: #2f6f6a; border-radius: 3px; margin-bottom: 3.5cqw; }
.tn-grid { display: grid !important; grid-template-columns: repeat(4, 1fr); gap: 2cqw; }
.tn-grid i { aspect-ratio: 1.4; border: 1.5px solid #cfd8d6; border-radius: 4px; }
.tn-grid i:first-child { border-color: #2f6f6a; background: #e6f0ef; }

/* step 4: section library */
.lib { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sec-card { display: flex; flex-direction: column; padding: 0; }
.sec-main { flex: 1; display: flex; gap: 13px; align-items: flex-start; padding: 15px 14px 15px 13px; cursor: pointer; }
.sec-main > input[type=checkbox] { position: absolute; opacity: 0; pointer-events: none; }
.sec-card .ic { width: 46px; height: 46px; flex: none; display: grid; place-items: center; background: var(--tint, var(--peach)); border-radius: var(--blob); }
.sec-card .ic svg { width: 28px; height: 28px; }
.sec-card .txt { flex: 1; min-width: 0; }
.sec-card .txt b { display: block; font-size: 16.5px; line-height: 1.3; margin-top: 1px; padding-right: 26px; }
.sec-card .txt small { display: block; color: var(--muted); font-size: 14.5px; line-height: 1.45; margin-top: 3px; text-wrap: pretty; }
/* A checkbox until picked, then a green tile with the pick order. */
.sec-card .n { position: absolute; top: 14px; right: 14px; width: 26px; height: 26px; border-radius: 8px; background: var(--accent); color: var(--on-accent);
  font: 800 13px/26px var(--font); text-align: center; box-shadow: 0 2px 0 var(--accent-ledge); animation: pop .2s ease-out; }
.sec-main input:not(:checked) ~ .n { color: transparent; background: #fff; box-shadow: inset 0 0 0 2.5px var(--control-line); animation: none; }
.sec-main input:checked ~ .n:empty { background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.lib.dim .sec-card:has(.sec-main input:checked) { border-color: var(--line-strong); }
.lib.dim .sec-main input:checked ~ .n { background-color: var(--muted); box-shadow: none; }
.sec-card[data-key=week] { --tint: var(--peach); }
.sec-card[data-key=today] { --tint: var(--butter); }
.sec-card[data-key=devotional] { --tint: var(--lilac); }
.sec-card[data-key=thought] { --tint: var(--sky); }
.sec-card[data-key=kids] { --tint: var(--mint); }
.sec-card[data-key=puzzles] { --tint: var(--aqua); }
.sec-card[data-key=news] { --tint: var(--blush); }
.sec-card[data-key=events] { --tint: var(--peri); }
.sec-card[data-key=weather] { --tint: var(--sage); }
.sec-card[data-key=doodle] { --tint: var(--sand); }
/* a few details: only for picked sections that need one */
.details { display: none; margin: 16px 0 0; background: var(--surface); border: 2.5px solid transparent; border-radius: var(--r-card); padding: 16px 18px 18px; box-shadow: var(--shadow); }
.details-note { display: none; margin: -6px 0 12px; font-size: 14.5px; color: var(--muted); }
.details.dim .details-note { display: block; }
.details-title { font-size: 16px; margin: 0 0 12px; }
.details-title em { font-style: normal; font-weight: 700; color: var(--muted); }
.detail { display: none; }
.detail + .detail { margin-top: 14px; }
.detail input { height: 48px; padding: 0 14px; }
.pick-form:has(.sec-card[data-key=kids] input:checked, .sec-card[data-key=events] input:checked, .sec-card[data-key=weather] input:checked) .details { display: block; }
.pick-form:has(.sec-card[data-key=kids] input:checked) .detail[data-key=kids],
.pick-form:has(.sec-card[data-key=events] input:checked) .detail[data-key=events],
.pick-form:has(.sec-card[data-key=weather] input:checked) .detail[data-key=weather] { display: block; }

/* describe your own: a card of its own; it gets the ring while it's the one in use */
.own { display: block; margin: 16px 0 0; background: var(--surface); border: 2.5px solid transparent; border-radius: var(--r-card); padding: 16px 18px 18px;
  box-shadow: var(--shadow); transition: border-color .15s, background .15s; }
.own .field-label { font-size: 16px; margin-bottom: 10px; }
.own.active { border-color: var(--accent); }
.own.dim { background: var(--field); box-shadow: none; }
.mode-note { margin: 10px 0 0; font-size: 14.5px; font-weight: 700; color: var(--accent-ledge); }
.mode-note:empty { margin: 0; }
.own.dim .mode-note { color: var(--muted); }
/* step 4's button: in its place on wide screens; docked at the bottom of a phone while the list scrolls by */
/* docked at the bottom of the window while the list scrolls by, then settles in place */
.dock { position: sticky; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 5; display: flex; justify-content: center; margin-top: 30px; }
.dock .btn { box-shadow: 0 4px 0 var(--accent-ledge), 0 10px 26px rgba(61, 43, 31, .22); }
html:has(.dock) { scroll-padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
.actions.after-dock { margin-top: 12px; }

/* ── home ──────────────────────────────────────────────────────── */
.paper-card { text-align: center; }
.paper-card h1 { max-width: 15em; margin-inline: auto; }
.paper-card .lede { max-width: 31em; margin: 8px auto 22px; text-wrap: balance; }
.paper-card .note { max-width: 32em; }
.paper-card h1 + .note { margin-top: 20px; }
.paper-card .reassure { margin: 18px auto 0; max-width: 36em; font-size: 14.5px; color: var(--hint); text-wrap: balance; }
.paper-card .quiet.rewrite { margin-top: 18px; text-decoration: underline; text-decoration-color: var(--hint); text-underline-offset: 4px; }
.paper-card .quiet.rewrite:hover { text-decoration-color: currentColor; }
.paper-card .note + .btn { margin-top: 4px; }
.paper-card .addr { overflow-wrap: anywhere; }
/* The picture of the paper is inert; the one link stretches over it, so picture and button are a single way in.
   The spread scales to the column (set by a small script, with breakpoints as a fallback). */
.paper-view { position: relative; display: flex; flex-direction: column; align-items: center; gap: 22px; }
/* one link holds the pill and the picture; the caption and the gaps around them aren't part of it */
.paper-link { align-self: stretch; display: flex; flex-direction: column; align-items: center; gap: 22px; color: inherit; text-decoration: none; border-radius: var(--r-card); pointer-events: none; }
.paper-link .paper-open, .paper-link .preview { pointer-events: auto; cursor: pointer; }
.paper-link:focus-visible { outline: none; }
.paper-link:focus-visible .paper-open { outline: 3px solid var(--accent-ledge); outline-offset: 3px; }
/* the whole picture opens the paper, but the focus ring stays on the button itself; long labels wrap when text is enlarged */
.paper-open { max-inline-size: 100%; white-space: normal; line-height: 1.2; text-wrap: balance; }
/* one label, so the button's gap doesn't split it; the new-tab icon stays with the last word */
.paper-open .nowrap { white-space: nowrap; }
.paper-open .ext { display: inline-block; vertical-align: -2px; margin: 0 0 0 8px; }
.paper-link:focus-visible .preview { outline: 3px solid var(--accent-ledge); outline-offset: 6px; }
/* on wide screens the spread steps out of the column so the pages are big enough to look at */
@media (min-width: 900px) { .paper-view { --w: min(860px, calc(100vw - 64px)); width: var(--w); margin-inline: calc((100% - var(--w)) / 2); } }
.preview { --s: .33; display: block; position: relative; width: 100%; height: calc(1160px * var(--s) + 36px); overflow: hidden; border-radius: var(--r-card);
  background: var(--surface); box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.paper-link:hover .preview { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.paper-link:hover .paper-open { background: var(--accent-hover); }
.preview iframe { position: absolute; top: 18px; left: 50%; width: 1720px; height: 1160px; border: 0; transform: translateX(-50%) scale(var(--s)); transform-origin: top center; pointer-events: none; }
/* phones: page one at a readable size */
.preview.one { height: calc(1160px * var(--s) + 28px); }
.preview.one iframe { top: 14px; left: 14px; transform-origin: top left; transform: translateX(calc(-47px * var(--s))) scale(var(--s)); }
/* on phones only page one is shown, and a caption says so */
/* a caption on the picture: on wide screens that it opens the full paper, on phones that it's page one */
.page-tag { display: block; margin-bottom: -12px; font-size: 13.5px; font-weight: 700; color: var(--hint); }
.page-tag .tag-one { display: none; }
.paper-view:has(.preview.one) .page-tag .tag-one { display: inline; }
.paper-view:has(.preview.one) .page-tag .tag-all { display: none; }
/* the writing page: one calm composition, pinned a fixed way down (not centred), so a failure,
   whose words are shorter, changes only the words and the action, never the picture or heading */
.paper-card.writing { padding-top: 0; }
.paper-card.writing .lede { margin-bottom: 0; }
.paper-card.writing .paper-action { margin-top: 18px; }

/* while waiting, the status and the way out share the row the retry button uses */
/* the wait's status: quiet text with a green dot, in the action row where the retry button goes if it fails */
.wait-chip { display: inline-flex; align-items: center; gap: 10px; margin: 0; font-size: 15px; font-weight: 600; color: var(--muted); }
.wait-chip .dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--accent); }
/* the way out: the same block, in the same place, under the wait's chip and under the retry */
.leave-block { margin-top: 14px; }
.leave-block .leave { margin: 0; font-size: 15.5px; font-weight: 800; color: var(--ink); }
.paper-card .leave-block .reassure { margin: 4px auto 0; }
/* after a failure, the same "you can close this page" line sits under the retry */
/* a button that's working stays fully legible: its label says "Starting…" */
.paper-card [data-busy][aria-disabled="true"] { opacity: 1; }
.paper-card .btn[data-busy][aria-disabled="true"] { background: var(--accent-hover); }
/* the ready page: the date, then when it's emailed */
.paper-card.is-ready .lede { margin-bottom: 4px; }
.paper-card .reassure.delivery { margin: 0 auto 22px; }
.art .pencil.again { animation: write 1.8s ease-in-out 2 alternate; }
.paper-card.writing.failed .paper-action .btn { min-width: 220px; }
.paper-card .req-error:empty { margin: 0; }
/* a request that didn't go through */
.paper-card .req-error { margin: 8px auto 0; max-width: 30em; font-size: 14.5px; font-weight: 700; color: var(--coral-ink); }
/* the heading carries across from the wait to the paper */
/* both pages put a same-sized picture above the heading, so the heading barely moves and the change is a short cross-fade */
.paper-card h1 { view-transition-name: paper-heading; }
::view-transition-group(paper-heading), ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .25s; }
.paper-card.is-ready .art-hero { width: 196px; margin-bottom: 12px; }
/* the action slot: one height whether it holds a button or a line of text */
.paper-action { align-self: stretch; display: flex; align-items: center; justify-content: center; min-height: 62px; margin: 0; font-size: 15.5px; font-weight: 700; color: var(--muted); }
.paper-action .btn { margin-bottom: 0; }
.paper-action p { margin: 0; }
/* focus placed on the heading on arrival is for screen readers; no ring around a heading nobody tabbed to */
.paper-card h1.arrived:focus { outline: none; }
.paper-card h1:focus-visible { outline: 3px solid var(--accent-ledge); outline-offset: 6px; border-radius: 8px; }
@media (max-width: 640px) { .preview { --s: .28; } }
@media (max-width: 560px) { .preview { --s: .24; } }
@media (max-width: 480px) { .preview { --s: .2; } }
@media (max-width: 410px) { .preview { --s: .185; } }
.exchange { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; animation: rise .2s ease-out; }
.exchange p { margin: 0; padding: 11px 16px; border-radius: 20px; max-width: 86%; font-size: 15.5px; line-height: 1.5; }
.exchange .me { align-self: flex-end; background: var(--peach); border-bottom-right-radius: 6px; }
.exchange .them { align-self: flex-start; background: var(--cream); border-bottom-left-radius: 6px; }

/* ── phone ─────────────────────────────────────────────────────── */
@media (max-width: 560px) {
  body { font-size: 16px; }
  .top { padding: 16px; min-height: 76px; }
  .mark { font-size: 19px; }
  .mark svg { width: 25px; height: 25px; }
  .step-head { margin-bottom: 22px; }
  .art { width: 120px; }
  .lede, .hero .lede { font-size: 16px; }
  .art-hero { width: 190px; margin-bottom: 12px; }
  .paper-card.is-ready .art-hero { width: 120px; }
  .hero .lede { margin-bottom: 24px; }
  .how-title { margin-top: 28px; font-size: 19px; }
  .how li { column-gap: 14px; padding: 16px; }
  .how h3 { font-size: 16px; }
  .how p { font-size: 15px; }
  .provider { gap: 12px; min-height: 72px; padding: 12px 14px 12px 10px; }
  .blob { width: 44px; height: 44px; }
  .p-text b { font-size: 16px; }
  .p-text small { font-size: 13.5px; }
  .p-cta { padding: 8px 13px; font-size: 13.5px; }
  .provider.open { padding: 14px 14px 18px 10px; }
  .p-head { gap: 12px; }
  .p-body { padding: 12px 0 0 0; }
  .ask-form, .ask-form.with-name { grid-template-columns: 1fr; grid-template-areas: "detail" "email" "err" "btn"; }
  .ask-btn { width: 100%; height: 50px; margin-top: 14px; }
  .p-body .btn { width: 100%; white-space: normal; line-height: 1.25; }
  .step-head .art { width: 100px; }
  .ask-group.invalid { margin-left: 0; padding-left: 12px; }
  .looks { gap: 10px; }
  .look { padding: 7px; border-radius: 20px; }
  .look-text b { font-size: 15.5px; }
  .look-text small { font-size: 14px; }
  .look-text { padding: 10px 4px 4px 6px; column-gap: 6px; }
  .look .radio { width: 22px; height: 22px; }
  .lib { grid-template-columns: 1fr; gap: 10px; }
  .sec-main { padding: 12px 12px 12px 11px; gap: 12px; }
  .sec-card .ic { width: 38px; height: 38px; }
  .sec-card .ic svg { width: 24px; height: 24px; }
  .dock { bottom: max(12px, env(safe-area-inset-bottom)); }
  .step-style .own { padding: 14px 14px 16px; }
  /* on phones the ready page's pill lines up with the full-width paper; elsewhere buttons keep their natural width */
  .paper-card.is-ready .btn.big { width: 100%; }
  .dock .btn { width: 100%; }

    }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ── forced colours (Windows high contrast): keep choices and selection visible ── */
@media (forced-colors: active) {
  .look:has(input:checked), .sec-card:has(.sec-main input:checked), .own.active { border-color: Highlight; }
  .look .radio, .sec-card .n, .sec-main input:not(:checked) ~ .n { forced-color-adjust: none; border: 2px solid CanvasText; background: Canvas; color: CanvasText; box-shadow: none; }
  /* picked look: a tick drawn in HighlightText on Highlight */
  .look:has(input:checked) .radio { background: Highlight; border-color: Highlight; }
  .look:has(input:checked) .radio::after { content: ""; position: absolute; left: 50%; top: 45%; width: 5px; height: 10px; border: solid HighlightText; border-width: 0 2.5px 2.5px 0; transform: translate(-50%, -50%) rotate(45deg); }
  /* kept look: a dot */
  .looks.dim .look:has(input:checked) .radio { background: Canvas; border-color: CanvasText; }
  .looks.dim .look:has(input:checked) .radio::after { top: 50%; width: 10px; height: 10px; border: 0; border-radius: 50%; background: CanvasText; transform: translate(-50%, -50%); }
  .sec-card:has(.sec-main input:checked) .n { background: Highlight; color: HighlightText; border-color: Highlight; }
  /* kept section: its number on Canvas */
  .sec-main input:not(:checked) ~ .n { color: Canvas; }
  .lib.dim .sec-main input:checked ~ .n { background: Canvas; color: CanvasText; border-color: CanvasText; }
  .btn { border: 2px solid ButtonText; }
  .provider, .look, .sec-card, .own, .details { border: 2px solid CanvasText; }
  .p-cta { border: 1px solid ButtonText; }
}

/* ── fake Google: stands in for Google's own page, so it looks like Google ── */
body.fake { display: grid; place-items: center; background: #f1f3f4; color: #202124; font: 400 14px/1.5 Roboto, Arial, sans-serif; }
.fake-card { background: #fff; border: 1px solid #dadce0; border-radius: 8px; padding: 36px 40px; width: min(450px, 92vw); }
.fake-card .logo { width: 28px; height: 28px; }
.fake-card h1 { font: 400 22px/1.3 Arial, sans-serif; letter-spacing: 0; margin: 16px 0 20px; }
.fake-card label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: #5f6368; margin-bottom: 14px; }
.fake-card input:not([type=checkbox]):not([type=radio]) { font: 400 16px Roboto, Arial, sans-serif; color: #202124; background: #fff; border: 1px solid #dadce0; border-radius: 4px; padding: 12px 14px; }
.fake-card input:not([type=checkbox]):not([type=radio]):focus { border-color: #1a73e8; box-shadow: inset 0 0 0 1px #1a73e8; }
.fake-card ul { padding-left: 20px; color: #3c4043; }
.fake-card .btn { font: 500 14px/1 Roboto, Arial, sans-serif; letter-spacing: .01em; border-radius: 20px; padding: 11px 24px; margin: 0; box-shadow: none; transform: none; background: #1a73e8; color: #fff; }
.fake-card .btn:hover { background: #1b66c9; }
.fake-card .btn.ghost { background: transparent; color: #1a73e8; }
.fake-card .btn.ghost:hover { background: #f1f6fe; }
.fake-banner { background: #fff4d6; color: #7a5a12; font-size: 12px; padding: 6px 10px; border-radius: 6px; margin: -12px 0 18px; }

/* ── admin (internal) ──────────────────────────────────────────── */
.admin h2 { margin-top: 36px; font-size: 20px; }
.bars { width: 100%; border-collapse: collapse; font-size: 14px; }
.bars th { text-align: left; font-weight: 600; padding: 6px 12px 6px 0; width: 42%; text-transform: none; }
.bars td { padding: 6px 4px; }
.bar { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; min-width: 120px; }
.bar span { display: block; height: 100%; background: var(--ink); border-radius: 999px; }
.bars tr.bad .bar span { background: var(--accent); }
.lost { color: var(--coral); font-size: 12px; }
.scroll { overflow-x: auto; }
.demand { margin-top: 14px; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
@media (max-width: 800px) { .two { grid-template-columns: 1fr; } }
.grid { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); border-radius: 12px; overflow: hidden; }
.grid th, .grid td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.grid th { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
