/* =========================================================
   Resources — shared by every page under /pages/resources/.
   Built to public/reference/brand-guidelines.md. Loaded after /index.css,
   before the page's own page.css.

   WHY THIS FILE EXISTS. The solution pages were each derived from their
   sibling by renaming the prefix, which left ~2,800 near-identical lines
   across eight stylesheets and, at least once, a bug that had been copied
   four generations deep. The Resources pages start the other way round:
   everything two of them would both need lives here under rs-, and each
   page.css holds only what is genuinely its own.

   Every class here is prefixed rs- ; the reset weighs nothing (§14).
   ========================================================= */

.rs {
  --pad: calc(67 * var(--u));
  --text: #2a2a2a;
  --faint: #9a9a9a;
  --soft: #f5f8f1;
  --grey: #f7f7f7;
  --lime-tint: #effcb5;
  --lime-ink: #3f5a00;
  --amber: #fff1d2;
  --amber-ink: #8a5600;
  --r-card: calc(18 * var(--u));
  --r: calc(12 * var(--u));
  --r-sm: calc(9 * var(--u));
  --shadow: 0 1px 2px rgba(17, 19, 24, .03), 0 calc(18 * var(--u)) calc(40 * var(--u)) calc(-28 * var(--u)) rgba(17, 19, 24, .16);
  --ease: cubic-bezier(.2, .8, .2, 1);
  display: block;
  color: var(--ink);
}
.rs *, .rs *::before, .rs *::after { box-sizing: border-box; }
:where(.rs) :where(h1, h2, h3, h4, p, ul, ol, dl, dd, dt, figure, blockquote) { margin: 0; }
:where(.rs) :where(ul, ol) { padding: 0; list-style: none; }
.rs img { display: block; max-width: 100%; }
.rs .i { flex: none; width: calc(16 * var(--u)); height: calc(16 * var(--u)); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rs .sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- type (§3.3) ---------- */
.rs-h1, .rs-h2, .rs-h3 { font-family: var(--font-head); font-weight: 500; letter-spacing: -.03em; color: var(--ink); text-wrap: balance; }
.rs-h1 { font-size: calc(64 * var(--u)); line-height: calc(77 * var(--u)); }
.rs-h2 { font-size: calc(48 * var(--u)); line-height: calc(57 * var(--u)); }
.rs-h3 { font-size: calc(24 * var(--u)); line-height: calc(30 * var(--u)); }
.rs .dim { color: var(--muted); }
.rs-lede { margin-top: calc(18 * var(--u)); max-width: calc(660 * var(--u)); font-size: calc(25 * var(--u)); line-height: calc(33 * var(--u)); letter-spacing: -.01em; color: var(--muted); text-wrap: pretty; }
.rs-sub { margin-top: calc(18 * var(--u)); max-width: calc(600 * var(--u)); font-size: calc(19 * var(--u)); line-height: calc(29 * var(--u)); letter-spacing: -.01em; color: var(--muted); text-wrap: pretty; }
.rs-sub b { font-weight: 600; color: var(--ink); }
.rs-sub a { color: var(--ink); font-weight: 600; border-bottom: 1px solid var(--lime-ico); }
.rs-sub a:hover { background: var(--lime-soft); }
.rs-k { font-size: calc(12 * var(--u)); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }

.rs-pill { display: inline-flex; align-items: center; gap: calc(7 * var(--u)); padding: calc(5 * var(--u)) calc(13 * var(--u)); border-radius: 999px; background: var(--soft); color: var(--text); font-size: calc(13 * var(--u)); font-weight: 600; line-height: 1.3; }
.rs-pill::before { content: ""; width: calc(6 * var(--u)); height: calc(6 * var(--u)); border-radius: 50%; background: var(--lime-ico); }
.rs-pill.ink { background: var(--ink); color: var(--lime); }
.rs-pill.ink::before { background: var(--lime); }
.rs-pill + .rs-h1, .rs-pill + .rs-h2 { margin-top: calc(22 * var(--u)); }
.rs-k + .rs-h2 { margin-top: calc(14 * var(--u)); }

.rs-tag { display: inline-flex; align-items: center; gap: calc(6 * var(--u)); padding: calc(4 * var(--u)) calc(10 * var(--u)); border-radius: 999px; background: var(--grey); color: var(--text); font-size: calc(12 * var(--u)); font-weight: 600; white-space: nowrap; }
.rs-tag.ok { background: var(--lime-tint); color: var(--lime-ink); }
.rs-tag.wait { background: var(--amber); color: var(--amber-ink); }
.rs-tag .i { width: calc(12 * var(--u)); height: calc(12 * var(--u)); }

.rs-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: calc(14 * var(--u)); margin-top: calc(40 * var(--u)); }
.rs .btn .i { width: calc(22 * var(--u)); height: calc(22 * var(--u)); transition: transform .2s var(--ease); }
.rs .btn:hover .i { transform: translateX(calc(3 * var(--u))); }

/* a claim the page makes in its own voice, not inside a box (§7.1) */
.rs-statement { margin-top: calc(34 * var(--u)); max-width: calc(680 * var(--u)); font-family: var(--font-head); font-size: calc(26 * var(--u)); line-height: calc(34 * var(--u)); font-weight: 500; letter-spacing: -.025em; color: var(--muted); }
.rs-statement b { font-weight: 500; color: var(--ink); }

/* ---------- sections (§5.1) ---------- */
.rs-sec { position: relative; padding: calc(120 * var(--u)) var(--pad); }
.rs-sec + .rs-sec { border-top: 1px solid var(--rule); }
.rs-head { max-width: calc(940 * var(--u)); }
.rs-stage { margin-top: calc(64 * var(--u)); }

/* a full-bleed soft band that still shows the frame rules (§7.3) */
.rs-sec.soft { isolation: isolate; }
.rs-sec.soft::before { content: ""; position: absolute; inset: 0 auto 0 50%; width: 100vw; transform: translateX(-50%); background: #fafaf8; z-index: -1; }
.rs-sec.soft::after { content: ""; position: absolute; top: 0; bottom: 0; left: -1px; right: -1px; border-left: 1px solid var(--rule); border-right: 1px solid var(--rule); pointer-events: none; }

/* ---------- hero: the 11 x 6 hairline grid (§5.2) ---------- */
.rs-hero { position: relative; padding: calc(120 * var(--u)) var(--pad) calc(96 * var(--u)); }
.rs-hero__grid {
  position: absolute; top: 0; left: 0; right: 0; height: calc(560 * var(--u)); pointer-events: none;
  background-image: linear-gradient(to right, var(--grid-line) 1px, transparent 1px), linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: calc(100% / 11) calc(560 * var(--u) / 5); background-position: -1px -1px;
  -webkit-mask-image: linear-gradient(#000 52%, transparent); mask-image: linear-gradient(#000 52%, transparent);
}
.rs-hero > :not(.rs-hero__grid) { position: relative; }
.rs-hero .rs-h1 { max-width: calc(940 * var(--u)); }
.rs-note { display: flex; align-items: flex-start; gap: calc(10 * var(--u)); margin-top: calc(40 * var(--u)); padding-top: calc(24 * var(--u)); border-top: 1px solid var(--rule); max-width: calc(660 * var(--u)); font-size: calc(15 * var(--u)); line-height: calc(24 * var(--u)); color: var(--muted); }
.rs-note .i { margin-top: calc(4 * var(--u)); color: var(--lime-ink); }
.rs-note b { font-weight: 600; color: var(--ink); }

/* ---------- filter chips, matching the blog's ---------- */
.rs-chips { display: flex; flex-wrap: wrap; gap: calc(8 * var(--u)); margin-top: calc(40 * var(--u)); }
.rs-chip { display: inline-flex; align-items: center; gap: calc(8 * var(--u)); padding: calc(10 * var(--u)) calc(16 * var(--u)); border: 1px solid var(--rule); border-radius: 999px; background: #fff; font: inherit; font-size: calc(15 * var(--u)); font-weight: 600; color: var(--text); cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.rs-chip span { font-size: calc(12.5 * var(--u)); color: var(--faint); font-variant-numeric: tabular-nums; }
.rs-chip:hover { border-color: var(--divider); }
.rs-chip[aria-pressed="true"] { border-color: var(--lime-ico); background: var(--lime); color: var(--ink); }
.rs-chip[aria-pressed="true"] span { color: var(--lime-ink); }
.rs-count { margin-top: calc(22 * var(--u)); font-size: calc(15 * var(--u)); color: var(--muted); }
.rs-count:empty { display: none; }

/* ---------- three small columns explaining a shape ---------- */
.rs-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: calc(24 * var(--u)); }
.rs-trio > li { display: grid; gap: calc(10 * var(--u)); align-content: start; padding: calc(26 * var(--u)); border: 1px solid var(--rule); border-radius: var(--r); background: #fff; }
.rs-trio .n { display: grid; place-items: center; width: calc(30 * var(--u)); height: calc(30 * var(--u)); border-radius: 50%; background: var(--lime); font-size: calc(13 * var(--u)); font-weight: 700; }
.rs-trio h3 { font-family: var(--font-head); font-size: calc(21 * var(--u)); line-height: calc(27 * var(--u)); font-weight: 500; letter-spacing: -.03em; }
.rs-trio p { font-size: calc(15.5 * var(--u)); line-height: calc(24 * var(--u)); color: var(--muted); }

/* ---------- closing CTA (§5.1: centred is reserved for this) ---------- */
.rs-cta { padding: calc(120 * var(--u)) var(--pad); border-top: 1px solid var(--rule); text-align: center; }
.rs-cta .rs-h2 { max-width: calc(820 * var(--u)); margin-inline: auto; }
.rs-cta .rs-lede { margin-inline: auto; }
.rs-cta .rs-ctas { justify-content: center; }

/* ---------- motion (§9) ---------- */
.rs-js .rs-rev { opacity: 0; transform: translateY(calc(12 * var(--u))); }
.rs-js .rs-rev.is-in { opacity: 1; transform: none; transition: opacity .75s ease var(--d, 0ms), transform .75s var(--ease) var(--d, 0ms); }
@media (prefers-reduced-motion: reduce) {
  .rs *, .rs *::before, .rs *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; transition-delay: 0ms !important; }
}

/* =========================================================
   Below 1180 --u is 1px. Stack, don't shrink (§10).
   ========================================================= */
@media (max-width: 1179px) {
  .rs { --pad: 22px; }
  .rs .i { width: 16px; height: 16px; }
  .rs-h1 { font-size: clamp(32px, 7.2vw, 48px); line-height: 1.08; }
  .rs-h2 { font-size: clamp(26px, 5.4vw, 36px); line-height: 1.16; }
  .rs-h3 { font-size: 20px; line-height: 27px; }
  .rs-lede { font-size: 17px; line-height: 26px; max-width: none; }
  .rs-sub { font-size: 16px; line-height: 25px; max-width: none; }
  .rs-statement { font-size: 20px; line-height: 28px; max-width: none; margin-top: 26px; }
  .rs-ctas { margin-top: 28px; flex-direction: column; align-items: stretch; }

  .rs-hero { padding: 44px 22px 48px; }
  .rs-hero__grid { display: none; }
  .rs-note { max-width: none; margin-top: 28px; }
  .rs-sec { padding: 56px 22px; }
  .rs-stage { margin-top: 32px; }
  .rs-chips { flex-wrap: nowrap; overflow-x: auto; margin: 28px -22px 0; padding: 0 22px 4px; scrollbar-width: none; }
  .rs-chips::-webkit-scrollbar { display: none; }
  .rs-chip { flex: none; font-size: 14px; padding: 9px 14px; }
  .rs-trio { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .rs-trio > li { padding: 20px; }
  .rs-cta { padding: 64px 22px; text-align: left; }
  .rs-cta .rs-h2, .rs-cta .rs-lede { margin-inline: 0; }
  .rs-cta .rs-ctas { justify-content: flex-start; }
}
