/* WellChosen site. Paper, ink and a gold highlighter: handmade, not messy. Hand-drawn strokes sit on a
   clean structure. Ink #1e1b2e and gold #f2b84b come from the app icon; the warm red-orange is for the
   moment of finding a gift and appears once per screen at most. Headings in Newsreader, body in Inter,
   a few handwritten labels in Shantell Sans. All three are self-hosted (latin subsets, OFL). */

@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/assets/fonts/newsreader-latin.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/assets/fonts/inter-latin.woff2") format("woff2"); }
@font-face { font-family: "Shantell Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/shantell-sans-latin.woff2") format("woff2"); }

:root {
  --ink: #1e1b2e;
  --text: #2a2733;
  --muted: #6a6474;
  --line: #e6e0d4;
  --panel: #f3eee4;
  --bg: #faf7f1;
  --card: #fffdf9;
  --art-page: #fffdf9;
  --art-muted: #e9e3d6;
  --gold: #f2b84b;
  --gold-soft: rgba(242, 184, 75, 0.55);
  --warm: #d9532b;
  --accent: #1e1b2e;
  --accent-ink: #fff;
  --shadow: 0 1px 0 rgba(30, 27, 46, 0.06), 0 18px 50px rgba(30, 27, 46, 0.12);
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --hand: "Shantell Sans", "Segoe Print", "Bradley Hand", cursive;
  --wrap: 1080px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f1ede4;
    --text: #e6e1d7;
    --muted: #a39d93;
    --line: #2e2a35;
    --panel: #1d1a24;
    --bg: #15121b;
    --card: #1a1721;
    --art-page: #1a1721;
    --art-muted: #2b2733;
    --gold-soft: rgba(242, 184, 75, 0.4);
    --warm: #f0693f;
    --accent: #f2b84b;
    --accent-ink: #1e1b2e;
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 18px 50px rgba(0, 0, 0, 0.45);
  }
}

/* Base */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 1rem; line-height: 1.55; }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; color: var(--ink); letter-spacing: -0.012em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); line-height: 1.02; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.08; }
h3 { font-size: 1.3rem; line-height: 1.2; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.hand { font-family: var(--hand); font-weight: 500; letter-spacing: 0; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--gold); color: #1e1b2e; padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; z-index: 10; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* The gold highlighter: a rough stroke behind a word or two, at most one per heading. */
.hl { position: relative; white-space: nowrap; }
.hl::before {
  content: ""; position: absolute; z-index: -1; left: -0.12em; right: -0.1em; bottom: 0.04em; height: 0.46em;
  background: var(--gold-soft);
  border-radius: 0.3em 0.5em 0.35em 0.6em / 0.6em 0.3em 0.55em 0.3em;
  transform: rotate(-0.6deg) skewX(-6deg);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: 0.95rem;
  padding: 13px 20px; border-radius: 12px; border: 0;
  background: var(--panel); color: var(--ink); text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary:hover { background: var(--line); }
.btn-small { padding: 9px 15px; font-size: 0.85rem; }
.btn-block { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 10px; }

/* Header */
.site-header .wrap { display: flex; align-items: center; gap: 18px; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.mark { width: 34px; height: 34px; flex: none; }
.wordmark { font-family: var(--serif); font-size: 1.45rem; font-weight: 500; color: var(--ink); }
.site-nav { display: flex; gap: 18px; margin-left: auto; }
.site-nav a { text-decoration: none; color: var(--muted); font-size: 0.95rem; font-weight: 500; white-space: nowrap; }
.site-nav a:hover { color: var(--ink); }
@media (max-width: 860px) {
  .site-header .wrap { flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
  .site-nav { order: 3; width: 100%; margin-left: 0; gap: 14px; }
  .site-header .btn { margin-left: auto; }
}

/* Hero: the product is the composition. Headline and pain line, then the request box, an arrow, the results. */
.hero { padding: 88px 0 24px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; text-align: center; justify-items: center; }
.hero .wrap > * { max-width: 100%; }
.hero h1 { max-width: 14ch; margin: 0 auto 18px; }
.hero .lead { font-size: 1.25rem; color: var(--muted); max-width: 46ch; margin: 0 auto 10px; }
.hero .lead q { font-style: italic; quotes: "\201C" "\201D"; }
.hero .actions { justify-content: center; margin: 14px 0 0; }
.hero .fineprint { color: var(--muted); font-size: 0.9rem; margin: 0 0 26px; }
.request {
  width: min(680px, 100%); display: flex; align-items: center; gap: 8px;
  background: var(--card); border-radius: 16px; padding: 8px 8px 8px 20px; box-shadow: var(--shadow);
  font-size: 1.2rem; color: var(--ink); text-align: left;
}
.request span { flex: 1; }
.request span::after { content: ""; display: inline-block; width: 2px; height: 1.1em; background: var(--ink); vertical-align: -0.2em; margin-left: 2px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .request span::after { animation: none; } }
.request b { background: var(--warm); color: #fff; font-weight: 600; font-size: 1rem; padding: 12px 18px; border-radius: 12px; white-space: nowrap; }
.arrow { width: 84px; height: 84px; margin: 2px 0 -6px; color: var(--ink); opacity: 0.85; }
.results { width: min(1040px, 100%); position: relative; margin: 0; }
.results img { width: 100%; border-radius: 12px; }
.results .tag { position: absolute; right: 2%; top: -14px; transform: rotate(3deg); font-family: var(--hand); color: #1e1b2e; background: var(--gold); padding: 4px 12px; border-radius: 999px; font-size: 0.95rem; }
.results figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 10px; }
@media (max-width: 720px) { .hero { padding-top: 48px; } }

/* Facts: one line, no boxes */
.factline { text-align: center; color: var(--muted); font-size: 0.95rem; padding: 36px 20px 0; margin: 0; }
.factline span + span::before { content: "\00b7"; margin: 0 10px; color: var(--gold); font-weight: 700; }

/* Sections */
.section { padding: 112px 0; }
.section h2 { max-width: 28ch; }
.section .sub { color: var(--muted); font-size: 1.1rem; max-width: 60ch; margin-bottom: 40px; }
.note { color: var(--muted); font-size: 0.95rem; max-width: 70ch; }
@media (max-width: 720px) { .section { padding: 72px 0; } }

/* Steps: numbered in the serif */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: block; color: var(--warm); font-family: var(--serif); font-size: 2.6rem; line-height: 1; margin-bottom: 6px; }
.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--muted); margin: 0; font-size: 1rem; }
.steps figure { margin: 14px 0 0; }
.steps figure img { border-radius: 12px; box-shadow: var(--shadow); }
/* Install page: one step per row, screenshot beside the text. */
.steps-rows { grid-template-columns: 1fr; gap: 64px; }
.steps-rows li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 28px; align-items: start; }
.steps-rows li::before { grid-column: 1 / -1; margin-bottom: 0; }
.steps-rows figure { margin: 0; }
.steps-rows figure img { width: 100%; }
.steps-rows figcaption { font-family: var(--hand); color: var(--muted); font-size: 0.95rem; margin-top: 10px; transform: rotate(-1.5deg); display: inline-block; }
@media (max-width: 760px) { .steps-rows li { grid-template-columns: 1fr; } }

/* Three ways: alternating rows, large drawings, handwritten pointer labels in a gutter above or below */
.ways { list-style: none; margin: 0; padding: 0; }
.ways li { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; margin-bottom: 64px; }
.ways li:nth-child(even) { grid-template-columns: 1fr 1.15fr; }
.ways li:nth-child(even) .drawing { order: 2; }
.ways .drawing { position: relative; padding: 52px 0; }
.ways .art { width: 100%; border-radius: 14px; box-shadow: 0 14px 40px rgba(30, 27, 46, 0.1); }
.ways .label { position: absolute; font-family: var(--hand); color: var(--ink); font-size: 1rem; line-height: 1.2; transform: rotate(-2deg); }
.ways .label svg { position: absolute; width: 60px; height: 44px; color: var(--ink); }
.ways .label-top { top: 0; }
.ways .label-bottom { bottom: 0; text-align: right; }
.ways h3 { font-size: 1.6rem; margin-bottom: 8px; }
.ways p { font-size: 1.05rem; color: var(--text); margin: 0; }
@media (max-width: 760px) {
  .ways li, .ways li:nth-child(even) { grid-template-columns: 1fr; gap: 16px; margin-bottom: 44px; }
  .ways li:nth-child(even) .drawing { order: 0; }
}

/* Pricing on paper */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin: 0 0 24px; }
.plan { background: var(--panel); border-radius: 18px; padding: 24px 22px; display: flex; flex-direction: column; }
.plan-free { background: var(--card); box-shadow: var(--shadow); }
.plan-flag { font-family: var(--hand); color: var(--warm); font-size: 1rem; margin: 0 0 8px; min-height: 1.2em; }
.plan h3 { font-size: 1.45rem; margin: 0 0 4px; }
.plan-price { margin: 0 0 12px; }
.plan-price strong { font-family: var(--serif); font-size: 2.4rem; font-weight: 500; color: var(--ink); letter-spacing: -0.02em; }
.plan-price span { color: var(--muted); }
.plan ul { list-style: none; margin: 0 0 16px; padding: 0; font-size: 0.92rem; color: var(--text); flex: 1; }
.plan li { padding: 7px 0; border-top: 1px solid var(--line); }
.plan li strong { color: var(--ink); }
.pricing-notes { max-width: 70ch; }
.pricing-notes p { margin-bottom: 0.6em; }

/* FAQ: a list is a list, so it keeps its rules */
.faq details { border-top: 1px solid var(--line); padding: 4px 0; }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; color: var(--ink); padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; font-size: 1.05rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: "\2013"; }
.faq details p, .faq details ul { color: var(--muted); margin: 0 0 14px; font-size: 0.98rem; max-width: 70ch; }

/* Maker and proof of life */
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 48px; }
.founder p { max-width: 60ch; font-size: 1.05rem; }
.founder .sig { font-family: var(--hand); font-size: 1.6rem; color: var(--ink); margin: 8px 0 28px; transform: rotate(-2deg); display: inline-block; }
.changelog { list-style: none; margin: 0; padding: 0; }
.changelog li { display: grid; grid-template-columns: 12ch 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 0.98rem; }
.changelog li:last-child { border-bottom: 1px solid var(--line); }
.changelog time { color: var(--muted); font-variant-numeric: tabular-nums; }
.changelog-page .changelog li { grid-template-columns: 16ch 1fr; }

/* Email capture (before approval) */
.notify { background: var(--panel); border-radius: 18px; padding: 22px; max-width: 560px; }
.notify h3 { margin-bottom: 4px; }
.notify p { color: var(--muted); font-size: 0.95rem; }
.notify form { display: flex; flex-wrap: wrap; gap: 8px; }
.notify input[type="email"] { flex: 1 1 220px; font: inherit; padding: 12px 14px; border-radius: 12px; border: 0; background: var(--card); color: var(--text); }
.notify .btn-primary { background: var(--warm); color: #fff; }
.hp { position: absolute; left: -9999px; }

/* Closing */
.closing { padding: 104px 0; text-align: center; }
.closing .actions { justify-content: center; }
.closing p { color: var(--muted); }
.badge { display: inline-block; margin-top: 14px; }

/* Footer */
.site-footer { padding: 0 0 48px; font-size: 0.88rem; color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 14px; }
.site-footer nav a { color: var(--ink); text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; }
.site-footer p { margin: 0 0 6px; max-width: 80ch; }

/* Documents (privacy, terms, support): a reading column on paper */
.doc { padding: 72px 0 24px; }
.doc .wrap { max-width: 720px; }
.doc h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
.doc h2 { font-size: 1.5rem; margin-top: 2em; }
.doc h3 { font-size: 1.15rem; margin-top: 1.5em; }
.doc p, .doc li { font-size: 1.02rem; }
.doc .meta, .doc .eyebrow { color: var(--muted); font-size: 0.95rem; }
.doc .eyebrow { font-family: var(--hand); }
.doc .lead { font-size: 1.15rem; }
.doc code { font-size: 0.9em; background: var(--panel); padding: 1px 6px; border-radius: 6px; }
.doc table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.doc th, .doc td { text-align: left; padding: 10px 10px; border-top: 1px solid var(--line); vertical-align: top; }
.table-scroll { overflow-x: auto; }
.doc .faq { margin-top: 32px; }

/* The live hero: a real form, chips, and results rendered in place by live.js */
.request input { flex: 1; min-width: 0; font: inherit; font-size: 1.2rem; color: var(--ink); background: transparent; border: 0; padding: 10px 0; }
.request input:focus { outline: none; }
.request input::-webkit-search-cancel-button { -webkit-appearance: none; }
.request:focus-within { outline: 3px solid var(--gold); outline-offset: 2px; }
.request button { font: inherit; background: var(--warm); color: #fff; font-weight: 600; font-size: 1rem; padding: 12px 18px; border-radius: 12px; border: 0; white-space: nowrap; cursor: pointer; }
.request[aria-busy="true"] button { opacity: 0.7; cursor: progress; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 4px 0 0; max-width: 760px; }
.chip { font: inherit; font-size: 0.85rem; color: var(--muted); background: var(--panel); border: 0; border-radius: 999px; padding: 7px 12px; cursor: pointer; }
.chip:hover { color: var(--ink); background: var(--line); }
.results.is-loading { opacity: 0.5; transition: opacity 0.2s; }
.results-empty { color: var(--muted); padding: 40px 20px; text-align: center; margin: 0; background: var(--panel); border-radius: 12px; }
.live-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 16px; text-align: left; background: var(--card); border-radius: 12px; padding: 18px; box-shadow: var(--shadow); }
@media (max-width: 720px) { .live-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; padding: 12px; } }
.live-image { aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--panel); }
.live-image img { width: 100%; height: 100%; object-fit: cover; }
.live-brand { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin: 10px 0 0; }
.live-title { font-size: 0.9rem; line-height: 1.3; color: var(--ink); margin: 8px 0 2px; }
.live-brand + .live-title { margin-top: 2px; }
.live-price { font-weight: 600; font-size: 0.92rem; margin: 0; font-variant-numeric: tabular-nums; }
