/* Fractional Head of Data, "the firm" direction (DESIGN.md, color.firm). Loads after /home.css and reads its tokens and shell classes
   (top bar, type, buttons, bands, the case file panel, the ruled list, footer). The facts of the retainer sit on ink:
   the terms in the first screen, the comparison table and what the retainer includes. The argument stays on paper and cream. */

/* ---------- First screen: the claim and the terms of the retainer ---------- */
/* The headline is a full sentence, so it takes the heading size and not the homepage display size. */
.r-claim .f-h1, .r-terms__fig { font-size: clamp(32px, 3.6vw, 48px); line-height: 1.1; letter-spacing: -0.03em; }
.r-claim .f-h1 { max-width: 16em; }
.r-claim .f-lead { max-width: 34em; }
.r-alt { font-size: 14px; color: var(--text-dim); }

.r-terms__fig { display: block; margin-top: 20px; font-weight: 600; color: var(--gold-light); font-variant-numeric: tabular-nums; }
.r-terms__say { margin: 8px 0 20px; font-size: 14px; line-height: 1.5; color: var(--text-muted); }
.r-terms__list { border-top: 1px solid var(--border-hover); }
.r-terms__list div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border-hover); font-size: 14px; line-height: 1.5; }
.r-terms__list div:last-child { border-bottom: 0; padding-bottom: 0; }
.r-terms__list dt { color: var(--text-muted); }

/* ---------- Bands ---------- */
section.r-first { padding-top: 48px; }
.r-ruled { border-top: 1px solid var(--bg); }
.r-ruled > .f-split { padding-top: 48px; }
.r-list { margin: 0 0 32px; }
.f-prose .r-list li { font-size: 18px; }

/* The comparison on ink. Our column carries the light text; the two alternatives stay quiet. */
.r-compare { margin-top: 48px; padding-top: 16px; padding-bottom: 16px; }
.r-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.5; }
.r-table th, .r-table td { padding: 16px 24px 16px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border-hover); color: var(--text-muted); font-weight: 400; }
.r-table th:last-child, .r-table td:last-child { padding-right: 0; }
.r-table tbody tr:last-child th, .r-table tbody tr:last-child td { border-bottom: 0; }
.r-table thead th { font-weight: 600; color: var(--text); width: 27%; }
.r-table thead .r-table__us { color: var(--teal); }
.r-table tbody .r-table__us { font-size: 16px; color: var(--text); }

/* What the retainer includes: five ruled rows on the ink band. */
.r-incl { border-top: 1px solid var(--border-hover); }
.r-incl div { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--border-hover); }
.r-incl dt { font-weight: 600; color: var(--gold-light); }
.r-incl dd { color: var(--text-muted); max-width: 40em; }

/* Two short arguments side by side. */
.r-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; align-items: start; }
.r-pair .f-h3 { margin-bottom: 16px; }

/* FAQ: bare h3 and p, so the visible text stays comparable to the JSON-LD (a test reads them). */
.r-faq { border-top: 1px solid var(--bg); }
.r-faq h3 { font-size: 18px; font-weight: 600; line-height: 1.4; letter-spacing: -0.01em; padding-top: 24px; margin-bottom: 8px; max-width: 36em; }
.r-faq p { color: var(--text-dim); max-width: 40em; padding-bottom: 24px; border-bottom: 1px solid var(--text-muted); }
.r-faq p:last-child { border-bottom: 0; padding-bottom: 0; }

/* ---------- Closing band on ink ---------- */
.r-close { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; align-items: end; }
.r-close .f-sub { max-width: 36em; }
.r-close__go { text-align: right; }
.r-close__go p { margin-top: 16px; font-size: 14px; color: var(--text-muted); }

/* ---------- Tablet and phone ---------- */
@media (max-width: 960px) {
    section.r-first { padding-top: 16px; }
    .r-ruled > .f-split { padding-top: 40px; }
    .r-compare { margin-top: 32px; }
    .r-pair { grid-template-columns: 1fr; gap: 40px; }
    .r-close { grid-template-columns: 1fr; gap: 32px; }
    .r-close__go { text-align: left; }
}

@media (max-width: 768px) {
    /* The comparison becomes one block per question, each answer under the name of its column. Every part of the table is set
       to display block here, which makes some browsers drop the table semantics; the roles in the markup restate them. */
    .r-compare { padding-top: 8px; padding-bottom: 8px; }
    .r-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .r-table, .r-table tbody, .r-table tr, .r-table th, .r-table td { display: block; }
    .r-table tbody tr { padding: 20px 0; border-bottom: 1px solid var(--border-hover); }
    .r-table tbody tr:last-child { border-bottom: 0; }
    .r-table tbody th { padding: 0 0 4px; border-bottom: 0; font-size: 18px; font-weight: 600; color: var(--gold-light); }
    .r-table tbody td { padding: 8px 0; border-bottom: 0; color: var(--text); }
    .r-table tbody td::before { content: attr(data-label); display: block; font-size: 14px; color: var(--text-muted); }
    .r-table tbody .r-table__us::before { color: var(--teal); }
    .r-incl div { grid-template-columns: 1fr; gap: 4px; }
}

@media (max-width: 560px) {
    .r-terms .f-case__head { flex-direction: column; gap: 0; }
    .r-close__go .f-btn { width: 100%; text-align: center; }
}
