/* =============================================================
   The single pages, rebuilt (fourth redesign wave, 11/22/26), on the 'frame' key:
     /app                 templates/site/app_landing_rd.html
     any unknown URL      templates/site/404_rd.html
     /privacy/            templates/privacy_rd.html   (body: site/_legal_rd.html)
     /terms/              templates/terms_rd.html     (body: site/_legal_rd.html)
     /o/<token>           templates/site/owner_letter_landing_rd.html
     /continue/<segment>/ templates/site/continue_visit_rd.html
   Loaded after rd.css, and needs nothing else. Every class is rdpg- prefixed or
   scoped under .rdpg, so nothing here reaches another page.

   Each of these pages has ONE thing to do (install the app, find another way on,
   read the policy, send the three boxes, go back to the search), so each opens
   with a dark band that says what the page is and holds that one action, on the
   first phone screen.

   Anything that sticks clears whatever is pinned at the top through --rd-stick
   (0px on phones); a jump target carries air only. Never a hard-coded header height.
   ============================================================= */

.rdpg { overflow-x: clip; --rdpg-read: 760px; }
/* rd.css zeroes every paragraph's margin with `.rd p` (0,1,1): a margin on a <p> here is
   written with two classes, or it would not apply. */
.rdpg [id] { scroll-margin-top: 16px; }
.rdpg b, .rdpg strong { color: var(--brand-primary); }
.rdpg-hero b, .rdpg-hero strong, .rdpg .rd-section--dark b { color: var(--brand-base); }
.rdpg .rd-h2 { margin: 0; }
.rdpg .rdpg-sub { font-size: 17px; line-height: 1.6; color: var(--rd-muted); max-width: var(--rdpg-read); margin-top: 10px; }
.rdpg-btns { display: flex; flex-wrap: wrap; gap: 12px; }
.rdpg .rd-btn { white-space: normal; text-align: center; }
.rdpg .rdpg-btn--ghost { color: var(--brand-base); border-color: rgba(255, 255, 255, .5); background: transparent; }
.rdpg .rdpg-btn--ghost:hover { color: var(--brand-base); border-color: var(--brand-base); background: rgba(255, 255, 255, .06); }
.rdpg .rdpg-ico { width: 18px; height: 18px; flex: 0 0 auto; }

/* ---------- 1. hero: what the page is, and its one action ---------- */
.rdpg-hero { background: var(--brand-primary); color: var(--brand-base); }
.rdpg-hero__inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding-top: clamp(20px, 4vw, 48px); padding-bottom: clamp(32px, 5vw, 64px); }
.rdpg-hero__head { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.rdpg-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--rd-on-dark-muted); }
.rdpg .rdpg-crumbs a { color: var(--rd-on-dark); padding: 13px 0; margin: -13px 0; }
.rdpg .rdpg-crumbs a:hover { color: var(--brand-base); }
.rdpg .rdpg-hero__eyebrow { color: var(--brand-warm); }
.rdpg .rdpg-hero__h1 { color: var(--brand-base); font-size: clamp(32px, 4.4vw, 56px); line-height: 1.06; max-width: 24ch; }
.rdpg-hero__lead { font-size: 18px; line-height: 1.6; color: var(--rd-on-dark); max-width: 660px; }
.rdpg .rdpg-hero__lead a, .rdpg .rdpg-hero__brand a { color: var(--brand-warm); font-weight: 600; padding: 13px 0; margin: -13px 0; display: inline-block; }
.rdpg .rdpg-hero__lead a:hover, .rdpg .rdpg-hero__brand a:hover { color: var(--brand-base); }
.rdpg .rdpg-hero__note { font-size: 14px; color: var(--rd-on-dark-muted); margin-top: 12px; }
.rdpg-hero__act { min-width: 0; }

/* Two columns from 900px. --split: the words on the left, a panel (the QR code) on the right.
   --form: the words on the left, the form on the right. */
@media (min-width: 900px) {
  .rdpg-hero--split .rdpg-hero__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "head side" "lead side" "act side";
    grid-template-rows: auto auto 1fr;
    column-gap: 72px; row-gap: 22px; align-items: start;
  }
  .rdpg-hero--split .rdpg-hero__head { grid-area: head; }
  .rdpg-hero--split .rdpg-hero__lead { grid-area: lead; }
  .rdpg-hero--split .rdpg-hero__act { grid-area: act; }
  .rdpg-hero--split .rdpg-hero__side { grid-area: side; align-self: center; }
  .rdpg-hero--form .rdpg-hero__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    grid-template-areas: "head side" "lead side";
    grid-template-rows: auto 1fr;
    column-gap: 64px; row-gap: 20px; align-items: start;
  }
  .rdpg-hero--form .rdpg-hero__head { grid-area: head; }
  .rdpg-hero--form .rdpg-hero__lead { grid-area: lead; }
  .rdpg-hero--form .rdpg-hero__side { grid-area: side; }
}

/* ---------- 2. not found: more ways on, on gold rules ---------- */
.rdpg-404 .rdpg-hero__inner { padding-top: clamp(28px, 5vw, 64px); }
.rdpg-ways { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 32px; }
.rdpg-ways a, .rd .rdpg-ways a { display: flex; flex-direction: column; gap: 6px; height: 100%; min-height: var(--rd-tap); border-top: 1px solid var(--brand-warm); padding: 16px 0 20px; color: var(--brand-body); text-decoration: none; }
.rdpg-ways__t { font-family: var(--rd-serif); font-weight: 400; font-size: 23px; line-height: 1.25; color: var(--brand-primary); }
.rdpg-ways__t::after { content: ' \2192'; color: var(--brand-accent); }
.rdpg-ways__s { font-size: 15px; line-height: 1.6; color: var(--rd-muted); }
.rd .rdpg-ways a:hover .rdpg-ways__t { text-decoration: underline; }

/* ---------- 3. the app page ---------- */
.rdpg-app .rdpg-hero__h1.rd-display { font-size: clamp(30px, 3.5vw, 48px); max-width: none; }
.rdpg-store { display: flex; flex-wrap: wrap; gap: 12px; }
.rdpg-qr { margin: 0; background: var(--brand-base); color: var(--brand-body); border-radius: var(--rd-radius-panel); padding: 18px 18px 14px; display: flex; flex-direction: column; align-items: center; gap: 10px; box-shadow: 0 18px 40px rgba(0, 0, 0, .28); width: fit-content; }
.rd .rdpg-qr img { width: 220px; height: 220px; display: block; }
.rdpg-qr figcaption p { font-size: 14px; color: var(--rd-muted); text-align: center; }
.rdpg-read { font-size: 17px; line-height: 1.75; max-width: var(--rdpg-read); }
.rdpg .rdpg-read--lead { font-size: 19px; line-height: 1.65; color: var(--brand-primary); }
.rdpg-points { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; max-width: 1000px; }
.rdpg-points li { border-top: 1px solid var(--brand-warm); padding: 14px 0; font-size: 16px; line-height: 1.6; }
.rdpg-video figure.rt-explainer { margin: 0 auto; }
.rdpg-faq { max-width: 860px; margin-top: 24px; display: flex; flex-direction: column; }
.rdpg-faq__item { border-top: 1px solid var(--rd-line-strong); padding: 22px 0; display: flex; flex-direction: column; gap: 10px; }
.rdpg-faq__item:last-child { padding-bottom: 0; }
.rdpg-faq__item p { font-size: 16px; line-height: 1.75; max-width: var(--rdpg-read); }

/* Closing band (app: the store links again; continue: the visitor's broker). */
.rdpg-close__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; }
.rdpg-close__copy { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rdpg-close__copy p { font-size: 16px; line-height: 1.6; color: var(--rd-on-dark); }
.rdpg-close__who { display: flex; gap: 18px; align-items: center; flex: 1 1 380px; min-width: 0; }
.rd .rdpg-close__photo { width: 76px; height: 76px; object-fit: cover; object-position: top; border-radius: 50%; flex: 0 0 auto; background: var(--brand-tint); }

/* ---------- 4. legal pages: the section list beside the text ---------- */
.rdpg-hero__brand { font-size: 15px; }
.rdpg-hero__lead--ask { font-size: 16px; }
.rdpg-legal-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.rdpg-toc { min-width: 0; }
.rdpg .rdpg-toc__head { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--brand-accent); }
.rdpg-toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.rdpg-toc a, .rd .rdpg-toc a { min-height: var(--rd-tap); display: inline-flex; align-items: center; padding: 0 14px; border: 1px solid var(--rd-line-strong); border-radius: 999px; background: var(--brand-base); color: var(--brand-primary); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.rd .rdpg-toc a:hover { border-color: var(--brand-primary); background: var(--brand-tint); }
.rdpg-legal { min-width: 0; max-width: var(--rdpg-read); overflow-wrap: anywhere; }
.rdpg-legal p, .rdpg-legal li { font-size: 16.5px; line-height: 1.75; }
.rdpg-legal p { margin: 0 0 14px; }
.rdpg-legal ul { margin: 0 0 14px; padding-left: 22px; }
.rdpg-legal li { margin-bottom: 8px; }
.rdpg-legal h2 { font-family: var(--rd-serif); font-weight: 400; font-size: clamp(23px, 2.4vw, 28px); line-height: 1.2; margin: 32px 0 12px; padding-top: 28px; border-top: 1px solid var(--rd-line); }
.rdpg .rdpg-legal .updated { font-size: 14px; color: var(--rd-muted); padding-bottom: 16px; margin-bottom: 20px; border-bottom: 1px solid var(--brand-warm); }
.rdpg-legal .highlight-box { background: var(--brand-tint); border-top: 1px solid var(--brand-warm); border-radius: 0 0 var(--rd-radius-card) var(--rd-radius-card); padding: 20px 22px 8px; margin: 24px 0; }
.rdpg-legal .highlight-box h3 { font-family: var(--rd-serif); font-weight: 400; font-size: 21px; line-height: 1.25; margin: 0 0 10px; }
.rd .rdpg-legal a { font-weight: 600; }
.rdpg-legal .btn { min-height: var(--rd-tap); padding: 0 18px; border: 1px solid var(--brand-primary); border-radius: var(--rd-radius-btn); background: var(--brand-base); color: var(--brand-primary); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; margin-right: 10px; }
.rdpg-legal .btn:hover { background: var(--brand-primary); color: var(--brand-base); }
.rdpg-legal-links { font-size: 15px; padding-bottom: clamp(40px, 5vw, 64px); color: var(--rd-muted); }
.rd .rdpg-legal-links a { display: inline-block; padding: 13px 0; margin: 0 6px; font-weight: 600; }
.rd .rdpg-legal-links a:first-child { margin-left: 0; }
@media (min-width: 1000px) {
  .rdpg-legal-grid { grid-template-columns: 250px minmax(0, var(--rdpg-read)); gap: 72px; align-items: start; }
  .rdpg-toc { position: sticky; top: calc(var(--rd-stick, 0px) + 16px); max-height: calc(100vh - var(--rd-stick, 0px) - 32px); overflow-y: auto; }
  .rdpg-toc ol { flex-direction: column; flex-wrap: nowrap; gap: 0; }
  .rdpg-toc a, .rd .rdpg-toc a { display: flex; border: 0; border-top: 1px solid var(--rd-line); border-radius: 0; padding: 8px 0; background: none; white-space: normal; font-size: 14.5px; line-height: 1.4; }
  .rd .rdpg-toc a:hover { background: none; text-decoration: underline; }
  .rdpg-legal > .updated:first-child, .rdpg-legal > p:first-child { margin-top: 0; }
  .rdpg-legal-links { padding-left: calc(var(--rd-gutter) + 322px); }
}

/* ---------- 5. the letter page (/o/<token>) ---------- */
.rdpg-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rdpg-who__photos { display: flex; flex: 0 0 auto; }
.rd .rdpg-who__photos img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--brand-tint); display: block; }
.rd .rdpg-who__photos img + img { margin-left: -16px; border: 2px solid var(--brand-primary); }
.rdpg-who__n { font-weight: 700; color: var(--brand-base); line-height: 1.3; }
.rdpg-who__r { font-size: 14px; color: var(--rd-on-dark); line-height: 1.4; }
.rdpg-letter .rdpg-hero__inner { padding-top: clamp(16px, 3vw, 40px); }
.rdpg-letter .rdpg-hero__h1.rd-display { font-size: clamp(30px, 3.8vw, 48px); }

/* The form's panel. The 3-box form partial brings its own base styles
   (public/_home_value_cta.html); these restyle it to the redesign: 48px inputs, 16px text,
   gold button. Nothing about what it sends changes. */
.rdpg-formcard { background: var(--brand-base); color: var(--brand-body); border-radius: var(--rd-radius-panel); padding: clamp(16px, 2.6vw, 28px); box-shadow: 0 18px 40px rgba(0, 0, 0, .28); display: flex; flex-direction: column; min-width: 0; }
.rdpg-formcard--flat { box-shadow: var(--rd-shadow); border: 1px solid var(--rd-line); max-width: 760px; gap: 0; }
.rdpg .rdpg-formcard__sub { font-size: 16px; line-height: 1.6; color: var(--rd-muted); margin: 8px 0 16px; }
.rdpg-formcard .iv-form, .rdpg-formcard .iv-result { max-width: none; margin: 0; }
.rdpg-formcard .iv-fields { grid-template-columns: 1fr 1fr; gap: 12px; }
.rdpg-formcard .iv-field { font-size: 14px; color: var(--brand-primary); gap: 6px; }
.rdpg-formcard .iv-field input, .rdpg-formcard .iv-field select { height: var(--rd-input-h); padding: 0 14px; font-size: 16px; border: 1px solid var(--rd-input-line); border-radius: var(--rd-radius-btn); color: #0f172a; }
.rdpg-formcard .iv-field input:focus, .rdpg-formcard .iv-field select:focus { outline: 3px solid rgba(212, 168, 67, .55); outline-offset: 0; border-color: var(--brand-primary); }
.rdpg-formcard .iv-hint { font-size: 12.5px; line-height: 1.4; color: var(--rd-muted); }
.rdpg-formcard .iv-submit { margin-top: 14px; min-height: 52px; padding: 0 20px; background: var(--brand-warm); color: var(--brand-primary); border-radius: var(--rd-radius-btn); box-shadow: none; font-size: 16px; font-weight: 700; }
.rdpg-formcard .iv-submit:hover { background: #C69833; }
.rdpg-formcard .iv-consent { font-size: 13px; line-height: 1.5; color: var(--rd-muted); gap: 10px; margin-top: 12px; min-height: var(--rd-tap); }
.rdpg-formcard .iv-consent input { width: 20px; height: 20px; margin: 1px 0 0; }
.rdpg-formcard .iv-fine { font-size: 13px; color: var(--rd-muted); text-align: left; margin: 10px 0 0; }
.rdpg-formcard .iv-error { margin: 10px 0 0; }
.rdpg-formcard .iv-resume { margin: 0 0 10px; }
.rdpg-formcard .iv-result .iv-meta { margin: 0 0 14px; }
.rdpg-formcard .iv-result .iv-note { margin-top: 10px; }
.rdpg-formcard .iv-result { color: var(--brand-body); }
.rdpg .rdpg-call { font-size: 15px; line-height: 1.6; color: var(--brand-body); margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--rd-line); }
.rd .rdpg-call a { font-weight: 700; display: inline-block; padding: 13px 0; margin: -13px 0; }
.rdpg-stop { margin-top: 6px; }
.rdpg .rdpg-call--only { margin-top: 0; padding-top: 0; border-top: 0; }
.rdpg-stop button { min-height: var(--rd-tap); padding: 0; background: none; border: 0; color: var(--rd-muted); text-decoration: underline; font: inherit; font-size: 14px; cursor: pointer; }
.rdpg-stop button:hover { color: var(--brand-primary); }
.rdpg-hero__lead--done { border-top: 1px solid var(--brand-warm); padding-top: 16px; }

/* Expired letter: the sales it quoted. The table scrolls inside its own box, never the page. */
.rdpg-sales__box { max-width: 900px; display: flex; flex-direction: column; gap: 16px; }
.rdpg-sales__note { font-size: 17px; line-height: 1.65; }
.rdpg-tablebox { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--rd-line); border-radius: var(--rd-radius-card); }
.rdpg-table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 15px; }
.rdpg-table th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--brand-accent); padding: 12px 14px; border-bottom: 1px solid var(--brand-warm); white-space: nowrap; }
.rdpg-table td { padding: 12px 14px; border-bottom: 1px solid var(--rd-line); color: var(--brand-body); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rdpg-table td:first-child { color: var(--brand-primary); font-weight: 600; }
.rdpg-table tr:last-child td { border-bottom: 0; }
.rdpg-sales + .rdpg-why, .rdpg-ask + .rdpg-why { padding-top: clamp(40px, 5vw, 64px); }

/* Why us: four lines on gold rules. */
.rdpg-facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 32px; }
.rdpg-facts li { border-top: 1px solid var(--brand-warm); padding-top: 14px; font-size: 15px; line-height: 1.65; min-width: 0; }
.rdpg .rdpg-facts b { display: block; font-family: var(--rd-serif); font-weight: 400; font-size: 21px; line-height: 1.25; color: var(--brand-primary); margin-bottom: 6px; }
.rdpg .rdpg-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 28px; color: var(--rd-muted); }

/* ---------- 6. the welcome-back page (/continue/<segment>/) ---------- */
.rdpg-homes .rd-cards { margin-top: 22px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.rdpg-cuts { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; color: var(--rd-caution); font-weight: 600; font-size: 15px; line-height: 1.5; }
.rdpg-cuts li { padding: 8px 0; }
.rd .rdpg-cuts a { color: inherit; }

/* ---------- narrower screens ---------- */
@media (max-width: 999px) {
  .rdpg-ways { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rdpg-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* The section list is one row that swipes sideways; the page never does. */
  .rdpg-toc ol { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; margin: 0 calc(-1 * var(--rd-gutter)); padding: 2px var(--rd-gutter) 8px; scrollbar-width: none; }
  .rdpg-toc ol::-webkit-scrollbar { display: none; }
  .rdpg-toc li { flex: 0 0 auto; }
}
@media (max-width: 899px) {
  /* First screen on a phone (390 x 664): the H1 and the page's one action. Order only: every
     word stays in the HTML. */
  .rdpg-hero__inner { gap: 14px; padding-top: 14px; }
  .rdpg-hero__head { gap: 8px; }
  .rdpg .rdpg-hero__h1 { font-size: 30px; line-height: 1.1; }
  .rdpg-hero__lead { font-size: 16px; line-height: 1.55; }
  .rdpg-crumbs { font-size: 12px; }
  .rdpg-hero--split .rdpg-hero__act { order: 2; }
  .rdpg-hero--split .rdpg-hero__lead { order: 3; }
  .rdpg-hero--split .rdpg-hero__side { order: 4; }
  .rdpg-qr { flex-direction: row; align-items: center; gap: 14px; padding: 12px 16px 12px 12px; box-shadow: none; }
  .rd .rdpg-qr img { width: 96px; height: 96px; }
  .rdpg-qr figcaption p { text-align: left; }
  .rdpg-letter .rdpg-hero__inner { gap: 12px; padding-top: 12px; }
  .rdpg-letter .rdpg-hero__h1.rd-display { font-size: 28px; }
  .rd .rdpg-who__photos img { width: 44px; height: 44px; }
  .rdpg-letter .rdpg-hero__lead { font-size: 15.5px; line-height: 1.5; }
}
@media (max-width: 640px) {
  .rdpg-btns .rd-btn, .rdpg-store .rd-btn { width: 100%; }
  .rdpg-store { flex-direction: column; }
  .rdpg-points { grid-template-columns: minmax(0, 1fr); }
  .rdpg-points li, .rdpg-legal p, .rdpg-legal li, .rdpg-faq__item p { font-size: 16px; line-height: 1.7; }
  .rdpg-read--lead { font-size: 17px; }
  .rdpg-ways { grid-template-columns: minmax(0, 1fr); }
  .rdpg-facts { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .rdpg-legal .highlight-box { padding: 16px 16px 4px; }
  .rdpg-close__inner > .rdpg-btns, .rdpg-close__inner > .rdpg-store { width: 100%; }
}
@media (max-width: 479px) {
  /* "First and last name" at 16px does not fit half of a phone's width. */
  .rdpg-formcard .iv-fields { grid-template-columns: 1fr; gap: 10px; }
  .rdpg-letter .rdpg-hero__h1.rd-display { font-size: 26px; }
}
