/* The $27 one-time checkout pages (ad/replies/, ad/reactivation/).
   One column in Maria Wendt's checkout order (Dan D7): headline, promise,
   picture, a button to the form, what the job does, one proof line, the
   order form with the bump, the pay button. Dan's 2026-11-04 visual pass:
   no logo bar, 18-20 px body at full contrast, a typed Google reply in the
   fold, a filled bump block with a larger price, 20 px pay text.
   Device-adaptive light and dark, no toggle (ad/README.md). */

/* Figtree, self-hosted and preloaded like the website (BaseLayout.astro):
   a Google Fonts swap re-wrapped the 320 px headline from 3 to 4 lines on a
   cold load and pushed the page down 35 px. Same file as
   website/src/assets/fonts (OFL, Figtree-LICENSE beside it). */
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url("/assets/fonts/figtree-latin-wght-normal.woff2") format("woff2");
}

:root {
  --rw-ink: #0A0E1C;          /* words on light (brand v2.1: navy is a surface) */
  --rw-navy: #09112F;
  --rw-yellow: #FFC907;
  --rw-yellow-hover: #F4B400;
  --paper: #FFFFFF;
  --mist: #F4F5F7;
  --line: #DADCE0;
  --soft: #3C4150;         /* fine print: still 10:1 on white */
  --check: #188038;
  --error: #C5221F;
  --bump-fill: #FFF4CC;
  --card: #FFFFFF;
  --g-ink: #202124;        /* Google's review UI */
  --g-meta: #5F6368;
  --g-star: #FBBC04;
  --g-reply: #F1F3F4;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --rw-ink: #F3F4F6;
    --paper: #15181E;      /* the product app's dark scale (rw-funnel rule) */
    --mist: #1E222A;
    --line: #333946;
    --soft: #C9CDD6;
    --check: #34C26B;
    --error: #FF8A80;
    --bump-fill: color-mix(in srgb, var(--rw-yellow) 13%, transparent);
    --card: #1E222A;
    --g-ink: #E8EAED;
    --g-meta: #BDC1C6;
    --g-reply: #2A2F38;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  font-family: Figtree, system-ui, -apple-system, sans-serif;
  font-size: 19px;
  line-height: 1.5;
  color: var(--rw-ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }

.oto { max-width: 600px; margin: 0 auto; padding: 28px 20px 40px; }
@media (min-width: 700px) { .oto { padding-top: 56px; } }

/* Desktop, 1024 px and up: two columns, as on Maria Wendt's checkout (Dan
   2026-11-04). The left column scrolls; the order card on the right is
   pinned. A card taller than the window gets a negative top (--pin-top, set
   by one-time-checkout.js), so it scrolls until its bottom is in view and
   then pins there: Pay is never out of reach. The fold button points at a
   form that is already beside it, so it hides. */
@media (min-width: 1024px) {
  .oto {
    max-width: 1180px;
    padding: 48px 32px 56px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(400px, 460px);
    column-gap: 64px;
    align-items: start;
  }
  .oto-left { width: 100%; max-width: 620px; justify-self: center; }
  .oto-right { position: sticky; top: var(--pin-top, 24px); }
  .oto-right .order { margin-top: 0; }
  /* The card is in the first screen here, so Stripe's form must not push
     the bump and Pay down as it loads: hold its live-mode height (491 px at
     this card width, measured 2026-11-04; test mode adds a 16 px tab) until
     Stripe says ready. Then let go: a buyer signed in to Link sees a short
     saved-card form, and a held height left a large gap above the bump. */
  .oto-right .payment:not(.is-ready) { min-height: 490px; }
  /* .oto .oto-jump outranks .btn { display: flex }, which comes later. */
  .oto .oto-jump { display: none; }
  .foot { grid-column: 1 / -1; }
}

.oto-h1 {
  font-size: clamp(32px, 8.4vw, 46px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
  text-wrap: balance;
}
.oto-promise { margin-top: 14px; font-size: 19px; text-align: center; text-wrap: pretty; }
.oto-promise b { font-weight: 800; }
/* "Just $27!" in brand yellow, all bold, as Maria sets her own price line
   (Dan 2026-11-04: "then let's adopt her style"). Brand colour over
   contrast math, by Dan's standing rule, so the yellow is not darkened. */
.oto-promise .oto-just { color: var(--rw-yellow); font-weight: 800; white-space: nowrap; }

/* Price slots: a skeleton until the server's quote paints them. */
.oto-price:empty {
  display: inline-block; width: 2.4em; height: 0.9em; vertical-align: -0.05em;
  border-radius: 6px; background: var(--mist);
}

/* ---------- the hero: Google's review UI ---------- */
.g-card {
  margin-top: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 14px 16px;
  font-family: Roboto, Arial, system-ui, sans-serif;
  color: var(--g-ink);
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.15), 0 2px 8px rgba(60, 64, 67, 0.12);
}
.g-head { display: flex; align-items: center; gap: 12px; }
.g-av {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #7E57C2; color: #FFFFFF; font-size: 18px; font-weight: 500;
}
.g-name { font-size: 16px; font-weight: 500; line-height: 1.3; }
.g-meta { margin-top: 8px; display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--g-meta); }
.g-stars { color: var(--g-star); font-size: 17px; letter-spacing: 1px; line-height: 1; }
.g-text { margin-top: 8px; font-size: 18px; line-height: 1.45; }
.g-reply { margin-top: 10px; background: var(--g-reply); border-radius: 8px; padding: 10px 12px 12px; }
.g-reply-head { font-size: 15px; color: var(--g-ink); }
.g-reply-head b { font-weight: 500; }
.g-reply-head span { color: var(--g-meta); margin-left: 6px; }

/* Typing. Every line and its hidden full copy share one grid cell, so the
   longest line sets the height before the first letter: 0 px shift. */
.ty-stack { display: grid; }
.ty-line { grid-area: 1 / 1; display: grid; visibility: hidden; }
.ty-line.is-on { visibility: visible; }
.ty-ghost, .ty-live { grid-area: 1 / 1; }
.ty-ghost { visibility: hidden; }
.ty-stack .ty-line { margin-top: 4px; font-size: 18px; line-height: 1.45; }
.is-typing .ty-line.is-on .ty-live::after {
  content: ""; display: inline-block; width: 2px; height: 1.05em; margin-left: 1px;
  vertical-align: -0.15em; background: currentColor; animation: ty-blink 1s steps(1) infinite;
}
@keyframes ty-blink { 50% { opacity: 0; } }

/* Two equal columns, two rows (Dan, 2026-11-04): every chip the same size,
   one line, at every width. */
.voices { margin-top: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.voice {
  font-size: 16px; font-weight: 700; text-align: center; line-height: 1.2; white-space: nowrap;
  padding: 9px 4px; border-radius: 999px; border: 1px solid var(--line); color: var(--rw-ink);
}
.voice.is-on { background: var(--rw-navy); border-color: var(--rw-navy); color: #FFFFFF; }
@media (prefers-color-scheme: dark) { .voice.is-on { background: #F3F4F6; border-color: #F3F4F6; color: var(--rw-navy); } }

/* ---------- the reactivation hero: Appliance EMT's Google profile ----------
   Layout from the website's mock profile card (ProblemSection.astro,
   .rw-mock-profile), at a readable size. The photo box and tabular numbers
   hold every size, so the count-up and the pulse move nothing; the pulse is
   a transform. */
.gbp {
  margin-top: 22px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px;
  background: var(--card); color: var(--g-ink); font-family: Roboto, Arial, system-ui, sans-serif;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.15), 0 2px 8px rgba(60, 64, 67, 0.12);
}
/* height: auto, or the img's height attribute wins over aspect-ratio. */
.gbp-photo { display: block; width: 100%; height: auto; aspect-ratio: 16 / 7; object-fit: cover; object-position: center 35%; }
.gbp-body { padding: 14px 16px 16px; }
.gbp-name { font-size: 24px; font-weight: 500; line-height: 1.25; }
.gbp-meta { margin-top: 4px; display: flex; align-items: center; gap: 6px; font-size: 18px; }
.gbp-num { font-variant-numeric: tabular-nums; }
.gbp-meta b { font-weight: 500; }
.gbp-stars { color: var(--g-star); font-size: 18px; letter-spacing: 1px; line-height: 1; }
.gbp-meta > .gbp-num:last-child { color: var(--g-meta); }
.gbp-cat { margin-top: 2px; font-size: 16px; color: var(--g-meta); }
.gbp-actions {
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line);
  display: flex; gap: 22px; font-size: 13px; font-weight: 500; color: #1A73E8;
}
@media (prefers-color-scheme: dark) { .gbp-actions { color: #8AB4F8; } }
.gbp-actions span { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; }
.gbp-actions svg { width: 20px; height: 20px; }
.gbp.is-done { animation: gbp-pulse 700ms cubic-bezier(0.22, 0.61, 0.36, 1); }
.gbp.is-done .gbp-meta { animation: gbp-glow 1200ms ease-out; }
@keyframes gbp-pulse { 0% { transform: scale(1); } 35% { transform: scale(1.035); } 100% { transform: scale(1); } }
@keyframes gbp-glow { 0% { background: color-mix(in srgb, var(--rw-yellow) 45%, transparent); } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .gbp.is-done, .gbp.is-done .gbp-meta { animation: none; } }

/* ---------- buttons ---------- */
.btn {
  display: flex; width: 100%; align-items: center; justify-content: center;
  min-height: 60px; padding: 14px 20px; border: none; border-radius: 8px;
  background: var(--rw-yellow); color: var(--rw-navy);
  font: 800 20px/1.2 Figtree, system-ui, sans-serif; text-decoration: none; cursor: pointer;
  box-shadow: 0 8px 20px -10px color-mix(in srgb, var(--rw-yellow) 90%, transparent);
}
.btn:hover { background: var(--rw-yellow-hover); }
.btn:active { background: color-mix(in srgb, var(--rw-yellow-hover) 85%, transparent); }
.btn:focus-visible { outline: 3px solid var(--rw-ink); outline-offset: 3px; }
.oto-jump { margin-top: 20px; }
/* Short screens (a 320 x 568 phone): the hero would push the button below
   the fold, so the button moves up under the promise (Dan 1 d: a button in
   the fold). Taller screens keep the hero first. */
@media (max-width: 1023px) and (max-height: 700px) {
  .oto-left { display: flex; flex-direction: column; }
  .oto-left > * { order: 4; }
  .oto-left > .oto-h1 { order: 1; }
  .oto-left > .oto-promise { order: 2; }
  .oto-left > .oto-jump { order: 3; }
}

/* ---------- what the job does ---------- */
.points { list-style: none; margin-top: 32px; display: grid; gap: 14px; }
.points li { display: flex; gap: 12px; font-size: 20px; line-height: 1.45; }
.points svg { flex: none; width: 24px; height: 24px; margin-top: 2px; color: var(--check); }
.points b { font-weight: 700; }
/* Bold bullet, plain line under it (Dan 2026-11-04: "more scannable"). */
.points li > span > b { display: block; font-size: 20px; line-height: 1.35; }
.points .sub { display: block; margin-top: 2px; font-size: 18px; line-height: 1.45; color: var(--soft); }

.story { margin-top: 32px; }
.story .proof { margin-top: 18px; }
.proof {
  margin-top: 28px; padding: 14px 16px; border-radius: 8px; background: var(--mist);
  font-size: 20px; line-height: 1.45; text-align: center;
}

/* Testimonial video: copied from ad/more-jobs (.rw-tv, the static port of
   website/src/components/TestimonialVideo.astro), tokens mapped to this page.
   The frame has a fixed 9:16 box and the video loads only near the screen
   (preload="none"), so it costs no fold and moves nothing. */
.rw-tv { position: relative; display: flex; align-items: center; justify-content: center; }
.rw-tv-frame {
  position: relative; z-index: 1; aspect-ratio: 9 / 16; width: min(100%, 330px); max-height: 70vh;
  border-radius: 20px; overflow: hidden; background: #000;
  border: 1px solid color-mix(in srgb, var(--rw-yellow) 28%, transparent);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.rw-tv-el { width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; }
.rw-tv-sound {
  position: absolute; top: 12px; right: 12px; z-index: 3; display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 13px; border-radius: 999px; background: rgba(9, 17, 47, 0.66); color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.28); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font: 600 12px/1 Figtree, system-ui, sans-serif; cursor: pointer;
}
.rw-tv-sound:focus-visible { outline: 3px solid var(--rw-yellow); outline-offset: 2px; }
.rw-tv-ico { display: block; flex: none; }
.rw-tv-ico-on { display: none; color: var(--rw-yellow); }
.rw-tv-frame.is-unmuted .rw-tv-ico-off { display: none; }
.rw-tv-frame.is-unmuted .rw-tv-ico-on { display: block; }
.rw-tv-play {
  position: absolute; inset: 0; z-index: 2; display: none; align-items: center; justify-content: center;
  background: linear-gradient(180deg, rgba(9, 17, 47, 0.1) 0%, rgba(9, 17, 47, 0.45) 100%);
  border: none; cursor: pointer; padding: 0;
}
.rw-tv-frame.is-poster .rw-tv-play { display: flex; }
.rw-tv-frame.is-poster .rw-tv-sound { display: none; }
.rw-tv-play-icon {
  width: 64px; height: 64px; border-radius: 50%; background: var(--rw-yellow); color: var(--rw-navy);
  display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
.rw-tv-play-icon svg { width: 37px; height: 37px; }
.rw-tv-play:focus-visible { outline: 3px solid var(--rw-yellow); outline-offset: -3px; }

/* ---------- the order form ---------- */
.order {
  margin-top: 28px; padding: 20px 16px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); display: grid; gap: 18px; scroll-margin-top: 16px;
}
@media (min-width: 700px) { .order { padding: 26px 24px; } }
.field label { display: block; font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.field input {
  width: 100%; min-height: 54px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--paper); color: var(--rw-ink); font: 400 18px/1.3 Figtree, system-ui, sans-serif;
}
.field input:focus { outline: 2px solid var(--rw-navy); outline-offset: 1px; border-color: var(--rw-navy); }
@media (prefers-color-scheme: dark) { .field input:focus { outline-color: var(--rw-yellow); border-color: var(--rw-yellow); } }
.field small { display: block; margin-top: 6px; font-size: 16px; color: var(--soft); }

/* The business search (the app's OfferBusinessField, on this page's tokens).
   The suggestions float over the form, so the list moves nothing. The typed
   fallback adds the Town field: the one step that grows the card, on the
   buyer's own tap. */
.biz-box { position: relative; }
.biz-list {
  position: absolute; z-index: 5; top: calc(100% + 4px); left: 0; right: 0;
  overflow: hidden; border: 1px solid var(--line); border-radius: 8px;
  background: var(--card); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}
/* Only the suggestions scroll: the attribution under them stays in view. */
.biz-list ul { list-style: none; max-height: 320px; overflow: auto; }
.biz-option {
  display: block; width: 100%; min-height: 48px; padding: 9px 14px; border: none; background: none;
  text-align: left; font: inherit; color: var(--rw-ink); cursor: pointer;
}
.biz-option:hover, .biz-option[aria-selected="true"] { background: color-mix(in srgb, var(--rw-ink) 9%, transparent); }
.biz-option-name { display: block; font-size: 17px; font-weight: 700; line-height: 1.3; }
.biz-option-detail { display: block; font-size: 15px; line-height: 1.3; color: var(--soft); }
/* Google's attribution with its suggestions (places-exit spec R4). */
.biz-list-foot { display: flex; justify-content: flex-end; padding: 8px 14px; border-top: 1px solid var(--line); }
.biz-list-foot img { display: block; }
/* And beside a picked name: the box then holds Google's name, and the list is
   closed. The note and its mark stay on one line. */
[data-oto-business-picked] { white-space: nowrap; }
.biz-mark img { display: inline-block; vertical-align: -3px; margin: 0 6px 0 4px; }
/* A text link inside a help line. The padding makes the tap area taller and
   the negative margin gives the line its height back. */
.oto-link {
  display: inline-block; padding: 8px 0; margin: -8px 0; border: none; background: none;
  font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.oto-link:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; border-radius: 2px; }

/* Stripe's form: hold its height while it loads. */
.payment { min-height: 200px; }
.payment.is-ready { min-height: 0; }

.bump {
  display: grid; gap: 14px; padding: 16px; border-radius: 10px;
  background: var(--bump-fill); border: 2px solid var(--rw-yellow);
}
.bump-row { display: flex; gap: 14px; cursor: pointer; }
.bump-row input { flex: none; width: 26px; height: 26px; margin-top: 2px; accent-color: var(--rw-navy); cursor: pointer; }
@media (prefers-color-scheme: dark) { .bump-row input { accent-color: var(--rw-yellow); } }
.bump-label { display: block; font-size: 20px; font-weight: 800; line-height: 1.3; }
.bump-label .oto-price { font-size: 24px; white-space: nowrap; }
.bump-body { display: block; margin-top: 6px; font-size: 18px; line-height: 1.45; }

/* What the add-on changes, shown inside its box (Dan 2026-11-04). The visual
   is always there, ticked or not, so a tap moves nothing (0 px rule). */
.bump-visual { min-width: 0; }
/* Replies: one reply with the keyword marked. */
.kw-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  font-family: Roboto, Arial, system-ui, sans-serif; color: var(--g-ink);
}
.kw-head { font-size: 15px; }
.kw-head b { font-weight: 500; }
.kw-head span { color: var(--g-meta); margin-left: 6px; }
.kw-text { margin-top: 4px; font-size: 17px; line-height: 1.45; }
.kw-text mark {
  background: color-mix(in srgb, var(--rw-yellow) 45%, transparent); color: inherit;
  border-radius: 3px; padding: 0 2px; font-weight: 500;
}
/* Reactivation: the shared Them vs You stage (/assets/review-compare.css),
   which reads these page tokens. */
.bump-visual .rw-hh-media {
  --ink: var(--rw-ink); --muted: var(--soft); --rw-3: 8px;
  --rw-body: Figtree, system-ui, sans-serif; --rw-gold: var(--rw-yellow);
  max-width: 360px; margin: 0 auto;
}
/* Here the phone is 169 px wide on desktop (166 inside the border). The
   design width is 165, a hair under, so desktop keeps that render exactly
   and phones scale it as one picture (review-compare.css). */
.bump-visual .rw-hh-stage { --rw-phone-design: 165; }
.bump-note { margin-top: 10px; font-size: 17px; font-weight: 700; line-height: 1.35; text-align: center; }

.summary { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 8px; font-size: 17px; }
.summary div { display: flex; justify-content: space-between; gap: 16px; }
.summary dd { font-variant-numeric: tabular-nums; white-space: nowrap; }
.summary .is-off { visibility: hidden; }
.summary .total { border-top: 1px solid var(--line); padding-top: 10px; font-size: 20px; font-weight: 800; }

/* Two reserved lines for errors: a message never moves the button. */
.err { min-height: 2.9em; font-size: 17px; line-height: 1.45; font-weight: 600; color: var(--error); }
.order.is-fatal > :not(.fatal) { display: none; }
.fatal { font-size: 18px; font-weight: 600; color: var(--error); }
.fine { font-size: 16px; line-height: 1.45; color: var(--soft); text-align: center; }

.foot { margin-top: 36px; text-align: center; font-size: 15px; color: var(--soft); }
.foot a { color: inherit; }

/* ---------- the done state ---------- */
.done { max-width: 520px; margin: 0 auto; padding: 56px 20px; text-align: center; }
.done svg { width: 56px; height: 56px; }
.done h1 { margin-top: 16px; font-size: 32px; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }
.done p { margin-top: 14px; font-size: 19px; }
.done strong { display: block; margin-top: 4px; font-weight: 700; overflow-wrap: anywhere; }
.done .btn { margin-top: 26px; }
