/* ─────────────────────────────────────────────────────────────────────
   The "Research" pages: about.html, quality.html, research-use-only.html.
   Loaded after css/light.css. Every class is prefixed .rs- and uses only
   the site's existing design tokens (white appears only in the call-to-action
   panels, the same way it does on points.html).
   ───────────────────────────────────────────────────────────────────── */

/* ── HERO (shared) ───────────────────────────────────────────────── */
.rs-hero { text-align: center; padding: clamp(54px, 8vw, 92px) 0 clamp(38px, 5vw, 56px); }
.rs-eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 12.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--accent-bright);
}
.rs-eyebrow::before { content: ""; width: 28px; height: 4px; border-radius: 4px; background: var(--accent); flex-shrink: 0; }
.rs-h1 {
  font-family: var(--display); font-weight: 800; font-size: clamp(34px, 5.8vw, 58px);
  letter-spacing: -0.03em; line-height: 1.06; max-width: 22ch; margin: 20px auto 0; color: var(--text); text-wrap: balance;
}
.rs-lede { max-width: 60ch; margin: 22px auto 0; font-size: clamp(16px, 2vw, 18.5px); line-height: 1.65; color: var(--text-dim); }

.rs-body { background: var(--bg); position: relative; }
.rs-wrap { max-width: 1080px; margin: 0 auto; padding: clamp(44px, 6vw, 72px) 0 clamp(64px, 9vw, 110px); }

/* section headings (shared) */
.rs-h2 {
  font-family: var(--display); font-weight: 800; font-size: clamp(26px, 3.6vw, 36px);
  letter-spacing: -0.025em; line-height: 1.12; margin: 0; color: var(--text); text-wrap: balance;
}
.rs-p { font-size: 16.5px; line-height: 1.72; color: var(--text-dim); margin: 14px 0 0; max-width: 64ch; }
.rs-p a, .rs-note a { color: var(--accent-bright); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.rs-p strong { color: var(--text); }
.rs-icon {
  display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  background: color-mix(in srgb, var(--accent) 11%, transparent); color: var(--accent-bright);
}
.rs-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ── ABOUT: "On this page" menu + sections ───────────────────────── */
.rs-layout {
  display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(40px, 6vw, 80px);
  max-width: 1080px; margin: 0 auto; padding: clamp(40px, 5vw, 64px) 0 clamp(64px, 9vw, 110px); align-items: start;
}
/* (the site header scrolls away rather than staying pinned, so these offsets are measured from the top of the screen) */
.rs-toc { position: sticky; top: 28px; }
.rs-toc > summary {
  list-style: none; cursor: default; pointer-events: none;
  font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--text);
}
.rs-toc > summary::-webkit-details-marker { display: none; }
.rs-toc-now, .rs-toc-chev { display: none; }
.rs-toc ol { list-style: none; margin: 16px 0 0; padding: 0; border-left: 1px solid var(--line-strong); }
.rs-toc a {
  display: block; padding: 8px 0 8px 18px; margin-left: -1px; border-left: 2px solid transparent;
  font-size: 14.5px; font-weight: 600; line-height: 1.35; color: var(--text-dim);
}
.rs-toc a:hover { color: var(--text); border-left-color: var(--line-strong); }
.rs-toc a[aria-current="true"] { color: var(--accent-bright); border-left-color: var(--accent-bright); }

.rs-sec { scroll-margin-top: 28px; padding: 0 0 clamp(36px, 5vw, 52px); margin: 0 0 clamp(36px, 5vw, 52px); border-bottom: 1px solid var(--line); }
.rs-sec:last-of-type { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.rs-sec-head { display: flex; align-items: center; gap: 16px; }
.rs-sec-n { font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .14em; color: var(--accent-bright); margin-bottom: 6px; display: block; }
.rs-quote {
  margin: 22px 0 0; padding: 6px 0 6px 22px; border-left: 3px solid var(--accent);
  font-family: var(--display); font-size: clamp(19px, 2.4vw, 24px); font-weight: 700; line-height: 1.38; color: var(--text); max-width: 34ch;
}
.rs-linkrow { margin-top: 18px; }
.rs-more {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12.5px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--accent-bright);
}
.rs-more::after { content: "\2192"; }
.rs-more:hover { text-decoration: underline; text-underline-offset: 4px; }
.rs-contact-card {
  margin-top: clamp(32px, 4vw, 48px); background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px; padding: 22px 26px;
  font-size: 15.5px; line-height: 1.65; color: var(--text-dim);
}
.rs-contact-card a { color: var(--accent-bright); font-weight: 600; }

/* phones & tablets: the menu becomes a sticky bar that drops a list down */
@media (max-width: 980px) {
  .rs-layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 18px; }
  .rs-toc { top: 10px; z-index: 40; margin: 0 0 28px; }
  .rs-toc > summary {
    pointer-events: auto; cursor: pointer; display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 0 14px; white-space: nowrap; letter-spacing: .1em; font-size: 11px;
    background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px); border: 1px solid var(--line-strong); border-radius: 12px;
  }
  .rs-toc-now { display: block; flex: 1; min-width: 0; text-align: right; font-family: var(--body, inherit); font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--accent-bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rs-toc-chev { display: block; width: 16px; height: 16px; flex-shrink: 0; color: var(--text-dim); }
  .rs-toc[open] .rs-toc-chev { transform: rotate(180deg); }
  .rs-toc ol {
    position: absolute; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; border: 1px solid var(--line-strong); border-radius: 12px;
    background: var(--bg-card); box-shadow: 0 18px 40px -14px rgba(22, 32, 47, .30); max-height: 66vh; overflow: auto;
  }
  .rs-toc a { padding: 12px 14px; margin: 0; border-left: 0; border-radius: 8px; }
  .rs-toc a:hover { background: var(--bg-elevated); }
  .rs-toc a[aria-current="true"] { background: color-mix(in srgb, var(--accent) 8%, transparent); }
  .rs-sec { scroll-margin-top: 84px; }
}
@media (prefers-reduced-motion: no-preference) {
  .rs-toc-chev { transition: transform .2s ease; }
  .rs-toc a { transition: color .15s ease, border-color .15s ease, background-color .15s ease; }
}

/* ── QUALITY: the process, as a timeline ─────────────────────────── */
.rs-steps { list-style: none; margin: 36px 0 0; padding: 0; position: relative; }
.rs-step { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 0 26px; position: relative; padding-bottom: clamp(28px, 4vw, 40px); }
.rs-step:last-child { padding-bottom: 0; }
.rs-step::before { content: ""; position: absolute; left: 31px; top: 64px; bottom: 0; width: 2px; background: color-mix(in srgb, var(--accent) 22%, transparent); }
.rs-step:last-child::before { display: none; }
.rs-step-n {
  width: 64px; height: 64px; border-radius: 18px; display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 18px; font-weight: 700; letter-spacing: .04em; color: var(--accent-bright);
  background: var(--bg-card); border: 1px solid var(--line-strong);
}
.rs-step-body { padding-top: 6px; }
.rs-step-title { font-family: var(--display); font-size: clamp(21px, 2.6vw, 26px); font-weight: 800; letter-spacing: -0.02em; margin: 0; color: var(--text); }
.rs-step-body .rs-p { margin-top: 8px; }

.rs-block { margin-top: clamp(56px, 8vw, 88px); }
.rs-block-intro { max-width: 60ch; }
.rs-grid { list-style: none; margin: 30px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.rs-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.rs-card .rs-icon { margin-bottom: 16px; }
.rs-card-title { font-family: var(--display); font-size: 18.5px; font-weight: 700; line-height: 1.25; margin: 0 0 8px; color: var(--text); }
.rs-card-text { font-size: 15px; line-height: 1.62; color: var(--text-dim); margin: 0; }
.rs-card-warm .rs-icon { background: color-mix(in srgb, var(--accent-secondary) 13%, transparent); color: var(--accent-secondary); }

.rs-commit { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 28px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-card); overflow: hidden; }
.rs-commit > div { padding: 24px 26px; }
.rs-commit > div + div { border-left: 1px solid var(--line); }
.rs-commit h3 { font-family: var(--display); font-size: 17.5px; font-weight: 700; margin: 0 0 6px; color: var(--text); }
.rs-commit p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text-dim); }

/* ── RESEARCH USE ONLY: glance strip + numbered segments ─────────── */
.rs-glance { list-style: none; margin: 0 0 clamp(36px, 5vw, 56px); padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.rs-chip {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 999px; background: var(--bg-card); border: 1px solid var(--line-strong);
  font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text);
}
.rs-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.rs-seg { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 0 28px; padding: clamp(30px, 4vw, 44px) 0; border-top: 1px solid var(--line); scroll-margin-top: 28px; }
.rs-seg:first-of-type { border-top: 0; padding-top: 0; }
.rs-seg-n { font-family: var(--display); font-weight: 800; font-size: clamp(44px, 6vw, 64px); line-height: 1; letter-spacing: -0.04em; color: color-mix(in srgb, var(--accent) 28%, transparent); }
.rs-seg-body .rs-h2 { font-size: clamp(24px, 3.2vw, 32px); }
.rs-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; max-width: 66ch; }
.rs-list li { position: relative; padding-left: 30px; font-size: 16px; line-height: 1.65; color: var(--text-dim); }
.rs-list li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.rs-list li::after {
  content: ""; position: absolute; left: 6px; top: 8px; width: 5px; height: 9px; border: solid var(--accent-bright); border-width: 0 2px 2px 0; transform: rotate(45deg) scale(.9);
}
.rs-list strong { color: var(--text); }
.rs-callout {
  margin-top: 22px; max-width: 66ch; padding: 18px 22px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--bg-card);
  border-left: 4px solid var(--accent-secondary); font-size: 15.5px; line-height: 1.6; color: var(--text);
}
.rs-minis { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.rs-minis li { background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.rs-minis h3 { font-family: var(--display); font-size: 16.5px; font-weight: 700; margin: 0 0 6px; color: var(--text); }
.rs-minis p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--text-dim); }

/* ── CALL TO ACTION (quality + research use only) ────────────────── */
.rs-cta {
  margin-top: clamp(56px, 8vw, 88px); text-align: center; color: #fff; border-radius: 20px; padding: clamp(34px, 5.5vw, 58px) clamp(20px, 5vw, 48px);
  background: linear-gradient(135deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 62%, #000) 100%);
}
.rs-cta h2 { font-family: var(--display); font-weight: 800; font-size: clamp(24px, 3.6vw, 36px); letter-spacing: -0.03em; line-height: 1.12; margin: 0; color: #fff; }
.rs-cta p { max-width: 54ch; margin: 14px auto 0; font-size: clamp(15px, 1.8vw, 17px); line-height: 1.6; color: #fff; opacity: .92; }
.rs-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 28px; }
.rs-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 28px; border-radius: 999px; border: 2px solid #fff;
  font-family: var(--mono); font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; cursor: pointer;
}
.rs-cta .rs-btn-solid { background: #fff; color: var(--accent); }
.rs-cta .rs-btn-ghost { background: transparent; color: #fff; }
.rs-cta .rs-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.rs-cta .rs-btn-solid:hover { background: transparent; color: #fff; }
.rs-cta .rs-btn-ghost:hover { background: #fff; color: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  .rs-btn { transition: background-color 200ms ease, color 200ms ease, transform 200ms ease; }
  .rs-btn:hover { transform: translateY(-2px); }
}
.rs-note { text-align: center; max-width: 62ch; margin: 22px auto 0; font-size: 13.5px; line-height: 1.6; color: var(--text-dim); }

/* ── responsive ──────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .rs-grid, .rs-minis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rs-grid > li:last-child:nth-child(odd), .rs-minis > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .rs-commit { grid-template-columns: 1fr; }
  .rs-commit > div + div { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 600px) {
  .rs-step { grid-template-columns: 48px minmax(0, 1fr); gap: 0 16px; }
  .rs-step-n { width: 48px; height: 48px; border-radius: 14px; font-size: 15px; }
  .rs-step::before { left: 23px; top: 48px; }
  .rs-card { padding: 18px 16px; }
  .rs-card .rs-icon { width: 40px; height: 40px; margin-bottom: 12px; }
  .rs-card-title { font-size: 16.5px; }
  .rs-card-text { font-size: 14px; }
  .rs-grid { gap: 12px; }
  .rs-seg { grid-template-columns: minmax(0, 1fr); }
  .rs-seg-n { font-size: 38px; margin-bottom: 8px; }
  .rs-btn { width: 100%; }
}
@media (max-width: 480px) { .rs-minis { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 339px) { .rs-grid { grid-template-columns: minmax(0, 1fr); } }
