/* ==========================================================================
   Content pages: the guides, how-we-sell.html, privacy and the thank-you
   pages. Extends the shared layer in styles.css (pinned header, footer,
   type scale, tiles, appraisal band). Loaded after styles.css. Built by
   scripts/generate_content_pages.py; the hand-written pages share it.
   ========================================================================== */

/* Clearance under the pinned header (styles.css "Header"). */
.content-page { padding-top: var(--header-h); }

/* ---- Masthead ---------------------------------------------------------- */

.content-head { padding: var(--masthead-pad) 0 clamp(56px, 7vw, 96px); }

.content-head h1 {
  font-size: var(--text-display-md);
  line-height: 1.04;
  letter-spacing: -0.022em;
  max-width: 20ch;
  margin: 0 0 28px;
  text-wrap: balance;
}

.content-byline {
  font-size: 13px;
  letter-spacing: 0.3px;
  color: var(--grey);
  max-width: 70ch;
}

.content-lede {
  font-family: var(--serif);
  font-weight: 300;
  font-size: var(--text-lede);
  line-height: 1.35;
  color: var(--grey);
  max-width: 40ch;
}

/* Desktop: the h1 on the left and the lede or byline on the right of the
   12-column grid, as on the area and house prices mastheads (area.css). */
@media (min-width: 901px) {
  /* dense: the lede fills the space beside the title even when the actions
     come first in the markup (they sit under the title on phones). */
  .content-head .container {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-flow: row dense;
    column-gap: var(--col-gap);
    align-items: end;
  }
  .content-head .container > * { grid-column: 1 / -1; }
  .content-head .container > h1 { grid-column: 1 / span 7; margin-bottom: 0; }
  .content-head .container > .content-lede,
  .content-head .container > .content-byline { grid-column: 8 / -1; padding-bottom: 0.4em; }
}

.content-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 32px;
  margin-top: 40px;
}
/* Phones: the next steps come straight after the title, so they are on the
   first screen; the lede follows them. */
@media (max-width: 900px) {
  .content-head h1 + .content-actions { margin: 0 0 32px; }
}

/* The short answer: three numbered lines under a hairline. */
.short-answer {
  margin-top: clamp(40px, 5vw, 64px);
  padding-top: 32px;
  border-top: 1px solid var(--hairline);
  max-width: 880px;
}
.short-answer-label {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 20px;
}
.short-answer ol {
  list-style: none;
  counter-reset: answer;
}
.short-answer li {
  counter-increment: answer;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(20px, 1.9vw, 25px);
  line-height: 1.4;
  padding: 18px 0;
  border-bottom: 1px solid var(--hairline);
}
.short-answer li::before {
  content: counter(answer, decimal-leading-zero);
  font-size: 0.85em;
  color: var(--grey); /* text, so not --steel (decorative only) */
  font-feature-settings: "lnum" 1, "tnum" 1;
}
.short-answer .source-line { margin-top: 20px; max-width: 90ch; }

/* ---- Split sections: heading left, copy right (12-column grid) ---------- */

.content-split {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  align-items: start;
}
.content-split-head { grid-column: 1 / span 4; }
.content-split-head .section-title { font-size: var(--text-title-sm); max-width: 14ch; }
/* Hyphenated compounds ("30-day", "walk-away") never break at the hyphen. */
.nowrap { white-space: nowrap; }
#guarantee .section-title { max-width: 11ch; }
.content-split-body { grid-column: 6 / -1; min-width: 0; }

.prose { font-size: var(--text-prose); line-height: 1.7; max-width: 68ch; }
.prose p + p,
.prose ul + p,
.prose table + h3 { margin-top: 20px; }
.prose h3,
.content-answers h3 {
  font-weight: 400;
  font-size: var(--text-subhead);
  line-height: 1.3;
  margin: 0 0 10px;
}
.prose p + h3,
.prose ul + h3,
.content-answers p + h3 { margin-top: 36px; }
.prose ul { margin: 0 0 0 20px; }
.prose li + li { margin-top: 10px; }
.prose a:not([class]),
.content-answers a:not([class]),
.cite a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.content-answers { font-size: var(--text-prose); line-height: 1.7; max-width: 68ch; }

/* Inline source after a claim: quieter than the claim itself. */
.cite {
  font-size: 13px;
  letter-spacing: 0.2px;
  color: var(--grey);
}

.legal-note {
  padding: 20px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.source-list { font-size: 15px; color: var(--grey); }

/* ---- Rules table: a table on desktop, stacked rows on phones ------------ */

.rules-table {
  width: 100%;
  max-width: 1100px; /* keeps the middle column near 75 characters a line */
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 40px;
}
.rules-table th,
.rules-table td {
  text-align: left;
  vertical-align: top;
  padding: 20px 20px 20px 0;
  border-top: 1px solid var(--hairline);
}
.rules-table thead th {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--grey);
  border-top: 0;
  padding-top: 0;
}
.rules-table tbody th {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 19px;
  line-height: 1.3;
  width: 26%;
}
.rules-table td:last-child { width: 26%; color: var(--grey); padding-right: 0; }
.rules-table .cite { display: block; margin-top: 6px; }

/* ---- How we sell: guarantee band (ink) and agents ------------------------ */

.section-ink .section-title { color: #fff; }
.guarantee-text {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(24px, 2.6vw, 36px);
  line-height: 1.3;
  max-width: 30ch;
}
/* Xavier's card: portrait, name, role, a line, the call button and the
   email, as the homepage section shows them. It sits in the right of the
   grid on wide screens, under the section head. */
.content-agents {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 48px);
}
@media (min-width: 1101px) {
  .content-agents { max-width: 980px; margin-left: auto; }
}
/* The photo above the details; the call button sits at the foot. */
.content-agent { display: grid; grid-template-rows: auto 1fr; gap: 26px; }
/* One agent: the portrait and the details side by side, the details set to
   the foot of the photo, so the single card reads as one feature rather than
   half of a pair. Phones stack them (below). */
.content-agents.content-agents-solo { grid-template-columns: minmax(0, 1fr); }
.content-agents-solo .content-agent {
  grid-template-rows: none;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  align-items: end;
  column-gap: clamp(28px, 4vw, 64px);
}
.content-agent-media {
  margin: 0;
  aspect-ratio: 4 / 4.4;
  border-radius: var(--radius-lg);
  background: #E6E4E0;
  overflow: hidden;
}
.content-agent-media picture { display: block; width: 100%; height: 100%; }
.content-agent-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
}
.content-agent-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border-top: 1px solid var(--hairline);
  padding-top: 24px;
}
.content-agent h3 {
  font-weight: 400;
  font-size: clamp(28px, 2.6vw, 40px);
  line-height: 1.15;
  margin-bottom: 8px;
}
.content-agent-role {
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 16px;
}
.content-agent p:not(.content-agent-role) { color: var(--grey); max-width: 44ch; margin-bottom: 24px; }
.content-agent-call { margin-top: auto; padding: 16px 24px; }
.content-agent-email {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-top: 4px;
  padding: 10px 0; /* a 44px tap target, text where it was */
  color: var(--grey);
  font-size: 14px;
  overflow-wrap: anywhere;
}

/* ---- Tablet and phone ---------------------------------------------------- */

@media (max-width: 900px) {
  .content-split-head,
  .content-split-body { grid-column: 1 / -1; }
  .content-split-head .section-title { max-width: 18ch; margin-bottom: 36px; }
}

@media (max-width: 640px) {
  .content-agents { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .content-agents-solo .content-agent { grid-template-columns: minmax(0, 1fr); }
  .content-agent-media { aspect-ratio: 1 / 1; }
}

@media (max-width: 700px) {
  .rules-table thead { display: none; }
  .rules-table,
  .rules-table tbody,
  .rules-table tr,
  .rules-table th,
  .rules-table td { display: block; width: auto; }
  .rules-table tr { border-top: 1px solid var(--hairline); padding: 20px 0; }
  .rules-table th,
  .rules-table td { border-top: 0; padding: 0; }
  .rules-table td { margin-top: 10px; }
  .rules-table tbody th,
  .rules-table td:last-child { width: auto; }
  .rules-table td::before {
    content: attr(data-label);
    display: block;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--grey);
    margin-bottom: 4px;
  }
}

@media (max-width: 520px) {
  .short-answer li { grid-template-columns: 36px minmax(0, 1fr); gap: 8px; font-size: 18px; line-height: 1.45; padding: 14px 0; }
  .content-agent-call { display: block; align-self: stretch; text-align: center; padding-left: 16px; padding-right: 16px; }
  .content-actions .btn { width: 100%; text-align: center; padding-left: 16px; padding-right: 16px; }
}

/* A wide split: the heading sits above and the body (the rules table) uses
   the full measure, so the three columns never get cramped. */
.content-split-wide .content-split-head { grid-column: 1 / span 7; }
.content-split-wide .content-split-head .section-title { max-width: 18ch; margin-bottom: clamp(36px, 4vw, 56px); }
.content-split-wide .content-split-body { grid-column: 1 / -1; max-width: none; }
.content-split-wide .content-split-body > :not(table) { max-width: 68ch; }
@media (max-width: 900px) {
  .content-split-wide .content-split-head { grid-column: 1 / -1; }
}

/* ---- Legal pages (privacy) ------------------------------------------------ */

/* A plain reading column: ink copy at the prose size, serif subheads. */
.legal-section { padding-top: clamp(40px, 5vw, 72px); }
.legal { max-width: 68ch; font-size: var(--text-prose); line-height: 1.7; }
.legal h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--text-subhead);
  line-height: 1.3;
  margin: 44px 0 12px;
}
.legal > h2:first-child { margin-top: 0; }
.legal p,
.legal li { color: #333; }
.legal p + p { margin-top: 12px; }
.legal ul { margin: 0 0 0 20px; }
.legal li { margin-bottom: 8px; }
.legal a { color: var(--ink); overflow-wrap: anywhere; }

/* ---- Thank-you and holding pages ------------------------------------------ */

/* One short message, centred in the screen under the pinned header. */
.thanks-wrap {
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.thanks-wrap .section-title { margin-bottom: 28px; }
.thanks-wrap .appraisal-support { margin-bottom: 32px; }

/* What happens next, each line led by a short star-yellow bar (thanks-sell). */
.thanks-next {
  list-style: none;
  display: grid;
  gap: 14px;
  max-width: 56ch;
  margin: 0 0 40px;
}
.thanks-next li {
  position: relative;
  padding-left: 30px;
  color: var(--grey);
  line-height: 1.6;
}
.thanks-next li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 18px;
  height: 3px;
  border-radius: var(--pill);
  background: var(--star);
}

/* A call button per agent, equal weight; then the quieter links. */
.thanks-calls { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 32px; }
.thanks-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
@media (max-width: 520px) {
  .thanks-calls .btn { flex: 1 1 100%; text-align: center; }
}
