/* RSIS (research-rsis.html, owner 2026-10-27: "make a page for RSIS ... Same kind of page [as the research notes] with a
   little bit visuals"; then "give the full form of RSIS", "remake that thesis with the real RSIS", the tag above the title
   and the switch photo removed). On top of css/pages/research.css (the note page, rd-detail): the full-form title, the
   abstract, the picture, then five numbered sections, each with a small brand diagram beside it (under it below 1024px).
   Every class here is rs- prefixed. Type: every font-size is a site.css --t-* token. Colours: site.css tokens only, gold
   for what is checked or held, ink for what is adopted, never blue. The diagrams are decorative (aria-hidden) and use
   only their own section's words. */

/* the title: the full form, "Self-Improvement" kept whole on one line */
.rs .rd-detail__title { margin-top: 0; font-size: var(--t-h1); text-wrap: balance; }
.rs-nobr { white-space: nowrap; }
/* the abstract: the opening line, larger than the body, behind a gold rule */
.rs-abstract {
  margin-top: clamp(16px, 1.8vw, 26px); max-width: 46ch; padding-left: clamp(14px, 1.4vw, 20px);
  border-left: 2px solid var(--gold); font-size: var(--t-h5); line-height: 1.4; letter-spacing: -0.01em; color: var(--ink);
}

/* ---------- the sections: number, heading and text, diagram ---------- */
.rs-ideas { margin-top: clamp(32px, 4vw, 56px); border-bottom: 1px solid var(--line); }
.rs-idea {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) 300px; grid-template-areas: "n text fig";
  column-gap: clamp(20px, 2.4vw, 32px); align-items: start;
  padding-block: clamp(28px, 3.4vw, 44px); border-top: 1px solid var(--line);
}
.rs-idea__n {
  grid-area: n; padding-top: 0.12em; font-family: var(--font-head); font-weight: 700; font-size: var(--t-h5); line-height: 1.2;
  color: var(--gold-ink); font-variant-numeric: tabular-nums;
}
.rs-idea__text { grid-area: text; }
.rs-idea__title { font-size: var(--t-h4); }   /* site.css: the inner pages' headings in Space Grotesk 700 */
.rs-idea__text p { margin-top: 12px; max-width: 54ch; color: var(--ink-2); font-size: var(--t-body); line-height: 1.6; }

/* ---------- a diagram: a soft grey card, small labels ---------- */
.rs-fig {
  grid-area: fig; padding: 18px; border-radius: 14px; background: var(--panel);
  color: var(--ink-2); font-size: var(--t-cap); line-height: 1.3;
}
.rs-fig__label { display: block; font-size: var(--t-cap); font-weight: 600; letter-spacing: 0.04em; color: var(--ink-2); }
.rs-fig__row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: var(--t-cap); color: var(--ink-num); }
.rs-fig__row--axis { margin-top: 10px; }
.rs-fig__row--axis > span:last-child { text-align: right; }
.rs-fig__arrow { flex: 1; min-width: 24px; position: relative; height: 1px; background: var(--line-3); }
.rs-fig__arrow::after {
  content: ""; position: absolute; right: 0; top: -3px; width: 6px; height: 6px;
  border-top: 1px solid var(--line-3); border-right: 1px solid var(--line-3); transform: rotate(45deg);
}

/* the pills: white = a step or a record, gold = the check, ink = what comes out of it */
.rs-pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
  background: var(--bg); border: 1px solid var(--line-3); color: var(--ink); font-size: var(--t-cap); line-height: 1.3; white-space: nowrap;
}
.rs-pill--gold { background: var(--gold); border-color: var(--gold-deep); }
.rs-pill--ink { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.rs-tick { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* a short arrow down between two pills */
.rs-down { position: relative; display: block; width: 1px; height: 26px; margin: 6px auto; background: var(--line-3); }
.rs-down::after {
  content: ""; position: absolute; left: -3px; bottom: 0; width: 6px; height: 6px;
  border-right: 1px solid var(--line-3); border-bottom: 1px solid var(--line-3); transform: rotate(45deg);
}

/* the tiles of diagrams 4 and 5: an icon over a word, joined by a short line */
.rs-tile {
  display: grid; justify-items: center; gap: 6px; min-width: 80px; padding: 12px 14px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--line-2); color: var(--ink); font-size: var(--t-cap); font-weight: 600;
}
.rs-tile svg { width: 30px; height: 30px; fill: none; stroke: var(--gold-ink); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.rs-tile--gold { background: var(--gold); border-color: var(--gold-deep); }
.rs-tile--gold svg { stroke: var(--ink); stroke-width: 1.8; }
.rs-link { width: 26px; height: 1px; background: var(--line-3); }
.rs-link--gold { width: 32px; height: 2px; background: var(--gold-deep); }

/* 1: each validated improvement stands on the last, so the bars climb faster and faster */
.rs-climb {
  display: flex; align-items: flex-end; gap: 8px; height: 150px; margin-top: 6px;
  border-bottom: 1.5px solid var(--line-3);
}
.rs-climb > span { flex: 1; border-radius: 4px 4px 0 0; background: var(--line-2); }
.rs-climb > span:nth-child(1) { height: 6%; }
.rs-climb > span:nth-child(2) { height: 11%; }
.rs-climb > span:nth-child(3) { height: 19%; background: color-mix(in srgb, var(--gold) 35%, var(--panel)); }
.rs-climb > span:nth-child(4) { height: 33%; background: color-mix(in srgb, var(--gold) 60%, var(--panel)); }
.rs-climb > span:nth-child(5) { height: 58%; background: var(--gold); }
.rs-climb > span:nth-child(6) { height: 92%; background: var(--gold-deep); }

/* 2: evaluate, refine, improve, then the way back to evaluate, named "repeat" */
.rs-flow { display: grid; justify-items: center; }
.rs-flow--loop { position: relative; width: fit-content; margin-inline: auto; padding-right: 44px; }
.rs-flow--loop > .rs-pill { width: 124px; }
/* the way back: from the right of the last pill up to the right of the first, its arrow pointing into it */
.rs-flow--loop::before {
  content: ""; position: absolute; left: 124px; right: 6px; top: 13px; bottom: 13px;
  border: 1px solid var(--line-3); border-left: 0; border-radius: 0 12px 12px 0;
}
.rs-flow--loop::after {
  content: ""; position: absolute; left: 125px; top: 10px; width: 6px; height: 6px;
  border-left: 1px solid var(--line-3); border-bottom: 1px solid var(--line-3); transform: rotate(45deg);
}
.rs-flow__back {
  position: absolute; right: 6px; top: 50%; transform: translate(50%, -50%); padding: 3px 0;
  background: var(--panel); color: var(--ink-num); font-size: var(--t-cap); line-height: 1.2;
}

/* 3: improvements come in; two stop at the checks; the rest are adopted */
.rs-merge { display: block; width: 100%; height: auto; fill: none; stroke-linecap: round; }
.rs-merge__kept { stroke: var(--gold-deep); stroke-width: 1.6; }
.rs-merge__gone { stroke: var(--line-2); stroke-width: 1.6; stroke-dasharray: 4 5; }
.rs-merge__x { stroke: var(--ink-3); stroke-width: 1.6; }
.rs-merge__start { fill: var(--panel); stroke: var(--ink-3); stroke-width: 1.5; }
.rs-merge__end { fill: var(--gold); stroke: var(--gold-deep); stroke-width: 1.5; }

/* 4: the owner holds the off switch; under them, what happens to every change */
.rs-ctrl { display: flex; align-items: center; justify-content: center; margin-top: 4px; }
.rs-ctrl__log {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-2);
}
.rs-ctrl__log .rs-tick { color: var(--gold-ink); }

/* 5: the AI and the data inside the hardware the customer controls */
.rs-own {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 0;
  margin-top: 8px; padding: 28px 14px 18px; border: 1.5px solid var(--gold-deep); border-radius: 14px;
}
.rs-own__label { position: absolute; left: 12px; top: 0; transform: translateY(-50%); padding: 0 6px; background: var(--panel); }

/* ---------- responsive ---------- */
@media (max-width: 1023px) {
  /* the diagram under the text, as wide as a phone at most */
  .rs-idea { grid-template-columns: 48px minmax(0, 1fr); grid-template-areas: "n text" ". fig"; row-gap: 22px; }
  .rs-fig { width: min(100%, 420px); }
}
@media (max-width: 767px) {
  .rs-idea { grid-template-columns: minmax(0, 1fr); grid-template-areas: "n" "text" "fig"; row-gap: 8px; }
  .rs-idea__n { padding-top: 0; font-size: var(--t-h6); }
  .rs-fig { width: 100%; margin-top: 12px; }
}
