/* ==========================================================================
   Deets — council rates hub (rates/index.html + rates/<slug>.html)

   Reuses tokens.css's variables and landing.css's shared primitives (.lnav,
   .lfoot, .btn, .chip, .eyebrow, .callout, .sr-only, .skip-link) — this file
   adds only the components those two don't already cover: the breadcrumb/
   answer-box guide shell, and the region-grouped "wall" table/card list
   (Direction B, Kyle-ruled 31 Jul 2026, from
   _research/MOCKUP-rates-hub-2026-07-31.html).
   ========================================================================== */

/* ---- page shell ---------------------------------------------------------- */

.r-crumb {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 32px 0;
  font-size: var(--fs-label);
  color: var(--muted);
  font-weight: 600;
}
.r-crumb a { color: var(--muted); }
.r-crumb a:hover { color: var(--primary-d); }
.r-crumb b { color: var(--ink-soft); }

.r-main {
  max-width: 780px;
  margin: 0 auto;
  padding: 20px 32px 70px;
}
.r-main.r-main-wide {
  max-width: 1080px;
}

.r-h1 {
  font-size: clamp(24px, 4vw, 32px);
  color: var(--ink);
  margin: 12px 0 10px;
  max-width: 760px;
}
.r-standfirst {
  font-size: var(--fs-title);
  color: var(--ink-soft);
  max-width: 640px;
  margin-bottom: 6px;
}
.r-checked {
  font-size: var(--fs-micro);
  color: var(--muted);
  margin-bottom: 24px;
}
.r-checked a { color: var(--muted); text-decoration: underline; }

/* ---- answer box (the d: colon pattern) ------------------------------------ */

.r-answerbox {
  background: var(--primary-l);
  border: 1px solid #d9d4fb;
  border-radius: var(--r);
  padding: 18px 22px;
  margin: 0 0 28px;
  max-width: 640px;
}
.r-answerbox.r-thin {
  background: var(--soft2);
  border: 1px dashed #cfc9ec;
}
.r-aline {
  display: flex;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
  padding: 8px 0;
  border-top: 1px solid rgba(91, 79, 240, 0.12);
  font-size: var(--fs-body);
}
.r-answerbox.r-thin .r-aline { border-top-color: var(--line); }
.r-aline:first-child { border-top: none; padding-top: 0; }
.r-aline .r-lbl { font-weight: 800; color: var(--ink); flex: none; }
.r-aline .r-colon { color: var(--primary-d); font-weight: 800; flex: none; }
.r-answerbox.r-thin .r-aline .r-colon { color: var(--muted); }
.r-aline .r-val { font-weight: 700; color: var(--ink-soft); }
.r-aline .r-val.r-dim { color: var(--muted); font-weight: 600; font-style: italic; }

/* ---- body sections --------------------------------------------------------- */

.r-section { margin-bottom: 30px; max-width: 720px; }
.r-section h2 { font-size: var(--fs-d1); color: var(--ink); margin-bottom: 10px; }
.r-section p { font-size: var(--fs-body); color: var(--ink-soft); margin-bottom: 8px; line-height: 1.65; }
.r-section blockquote {
  border-left: 3px solid var(--primary-l);
  padding: 4px 0 4px 16px;
  margin: 10px 0;
  font-size: var(--fs-body);
  color: var(--ink-soft);
  font-style: italic;
}

.r-fact-table { width: 100%; border-collapse: collapse; font-size: var(--fs-body); margin: 6px 0 18px; }
.r-fact-table th {
  text-align: left;
  font-size: var(--fs-micro);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 6px 10px 6px 0;
  border-bottom: 1px solid var(--line);
}
.r-fact-table td { padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); color: var(--ink-soft); }
.r-fact-table td:first-child { color: var(--ink); font-weight: 700; }

.r-check-list { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 0; }
.r-check-list li { display: flex; gap: 8px; font-size: var(--fs-body); color: var(--ink-soft); }
.r-check-list li span { flex: none; color: var(--green); font-weight: 800; }

/* ---- product card CTA ------------------------------------------------------ */

.r-product-card {
  background: var(--ink);
  color: #fff;
  border-radius: var(--r);
  padding: 22px 24px;
  margin: 10px 0 30px;
  max-width: 720px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.r-product-card h3 { font-size: var(--fs-title); margin-bottom: 4px; }
.r-product-card p { font-size: var(--fs-label); color: rgba(255, 255, 255, 0.72); max-width: 380px; }
.r-product-card .btn { flex: none; }

/* ---- honesty callout ------------------------------------------------------- */

.r-honesty {
  background: #fff;
  border: 1px dashed #cfc9ec;
  border-radius: var(--r-md);
  padding: 14px 18px;
  font-size: var(--fs-body);
  color: var(--ink-soft);
  max-width: 720px;
  margin: 0 0 22px;
  line-height: 1.6;
}
.r-honesty a { font-weight: 700; }

.r-source { font-size: var(--fs-micro); color: var(--muted); margin: -6px 0 26px; }

/* ---- related councils ------------------------------------------------------- */

.r-related-title {
  font-size: var(--fs-label);
  font-weight: 800;
  color: var(--ink-soft);
  margin: 4px 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.r-pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.r-pill {
  font-size: var(--fs-label);
  font-weight: 700;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 6px 14px;
}
.r-pill:hover { border-color: var(--primary); color: var(--primary-d); }

/* ---- chip variant not in landing.css --------------------------------------- */

.chip-x { background: var(--soft2); color: var(--muted); border: 1px dashed #cfc9ec; }

/* ---- visible FAQ accordion (Opus audit P1, 12 Aug 2026) --------------------
   Matches guides/*.html's house .g-faq pattern (css/guide.css) exactly —
   same tokens, same <details>/<summary> shape — so the rates hub's "Common
   questions" section reads as the same component, not a one-off. Kept as
   its own rule set (not a shared import) since rates.css already owns its
   "r-" component prefix independently of guide.css. */

.r-faq-list details {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.r-faq-list summary {
  font-size: var(--fs-title);
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.r-faq-list summary::-webkit-details-marker { display: none; }
.r-faq-list summary::before { content: "+ "; color: var(--primary-d); font-weight: 800; }
.r-faq-list details[open] summary::before { content: "\2212 "; }
.r-faq-list p { font-size: var(--fs-body); color: var(--ink-soft); margin: 8px 0 0; line-height: 1.65; }

/* ---- HUB: filter + region wall ---------------------------------------------- */

/* R32 (Wave E, 21 Aug 2026, UXP-3) — sticky, ≤900px only (see finding 7 fix
   below for why): .lnav (css/landing.css) is itself position:sticky, top:0,
   height 68px (same value at every viewport, no mobile override), so
   `top: 68px` sits it directly under the nav rather than fighting it for
   the same 0px slot. z-index below .lnav's own 20 so the nav still layers
   over it if either is mid-scroll-transition. background matches
   .r-wall-table thead th's own sticky-header fix just below, for the same
   reason: something opaque has to sit behind it once real content is
   scrolling underneath.
   Audit fix (finding 7, Wave E audit): R32 originally shipped this sticky
   at EVERY width, including the ≥901px desktop layout where the filter box
   sits directly above the full wide .r-wall-table (below, hidden ≤900px in
   favour of .r-cardlist) — pinned there while scrolling, it masked part of
   that table's rows, the one place its full row width actually matters.
   Scoped into the same ≤900px breakpoint the 2-col card-list layout itself
   switches on at (below): sticky where it's genuinely useful (a long
   scrolling card list on a phone), static — normal document flow, scrolls
   away with the page — above it, where the wide table needs the room. */
.r-filter-wrap {
  margin: 10px 0 22px;
  max-width: 420px;
  position: static;
  background: #fff;
  padding-top: 10px;
}
.r-filter-wrap input {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  font-size: var(--fs-body);
  font-family: inherit;
  background: #fff;
  box-shadow: var(--shadow-xs);
}
.r-filter-hint { margin-top: 6px; font-size: var(--fs-micro); color: var(--muted); }
.r-filter-empty { padding: 20px 0; font-size: var(--fs-body); color: var(--muted); display: none; }

.r-wall-table { width: 100%; border-collapse: collapse; font-size: var(--fs-body); margin-bottom: 10px; }
.r-wall-table thead th {
  text-align: left;
  font-size: var(--fs-micro);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  padding: 8px 12px;
  border-bottom: 2px solid var(--line);
  position: sticky;
  top: 0;
  background: #fff;
}
.r-wall-region td {
  background: var(--soft2);
  font-weight: 800;
  font-size: var(--fs-micro);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary-d);
  padding: 8px 12px;
}
.r-wall-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.r-wall-table tr.r-thin td { color: var(--muted); }
.r-wall-table tr.r-thin td.r-wc-name { color: var(--ink-soft); }
/* R32 fix (Wave E, 21 Aug 2026, UXP-2): plain --ink with no underline read
   as static text, not a link — 78 rows of it. Same recipe landing.css's
   .hero-note a already uses for a real inline text link. */
.r-wc-name a { color: var(--primary-d); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.r-wc-name a:hover { color: var(--primary); }
.r-wc-name span { display: block; font-size: var(--fs-micro); color: var(--muted); margin-top: 2px; }
.r-wall-table tbody tr:not(.r-wall-region):hover td { background: var(--soft); }

.r-cardlist { display: none; }
.r-card-group { margin-bottom: 16px; }
.r-card-region {
  font-size: var(--fs-micro);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary-d);
  margin-bottom: 8px;
}
.r-wallcard {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  margin-bottom: 7px;
  overflow: hidden;
}
.r-wallcard.r-thin { border-style: dashed; background: var(--soft2); }
.r-wallcard a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  width: 100%;
  color: inherit;
}
.r-wallcard-name { font-size: var(--fs-body); font-weight: 700; color: var(--ink); }
.r-wallcard-meta { font-size: var(--fs-micro); color: var(--muted); }
.r-wallcard-right { text-align: right; flex: none; }
.r-wallcard-date { font-size: var(--fs-body); font-weight: 800; color: var(--ink); }
.r-wallcard-pen { font-size: var(--fs-micro); color: var(--muted); }

@media (max-width: 900px) {
  .r-crumb, .r-main { padding-left: 18px; padding-right: 18px; }
  .r-h1 { font-size: 22px; }
  .r-wall-table { display: none; }
  .r-cardlist { display: block; }
  .r-product-card { flex-direction: column; align-items: flex-start; }
  /* Finding 7: sticky only in this 2-col mobile-safe layout — see
     .r-filter-wrap's own header comment above for why it's static above
     this width. */
  .r-filter-wrap {
    position: sticky;
    top: 68px;
    z-index: 15;
  }
}
