/* REQ-211.1: a release train's document, the What tab (releaseSpecView.js),
   in Nora's template's layout (REQ-211 d1): read top to bottom, the promise
   first, then the dates, the capability cards, the first week, per area,
   what waits, how it's tested and the trace. Tokens only. REQ-211.4.2: the
   document wears its product's tokens and fonts (data-brand; a Court app's
   come from css/release-brands.css, generated from its tokens release), so
   it paints its own background inside the app. */
.rs-view { padding: 24px 16px 64px; }
.rs { max-width: 980px; margin: 0 auto; display: grid; gap: 44px; color: var(--ink); background: var(--bg); font-family: var(--font-body); border-radius: 20px; padding: clamp(16px, 4vw, 44px); box-sizing: border-box; }
.rs-brand { display: flex; align-items: center; gap: 10px; font: 700 16px/1.2 var(--font-display); color: var(--ink); }
.rs-brand img { width: 36px; height: 36px; border-radius: 9px; flex: none; }
.rs h1, .rs h2, .rs h3 { font-family: var(--font-display); margin: 0; line-height: 1.08; text-wrap: balance; }
.rs h1 { font-size: clamp(32px, 6vw, 56px); font-weight: 800; }
.rs h2 { font-size: clamp(22px, 3.4vw, 30px); font-weight: 800; }
.rs h3 { font-size: 19px; font-weight: 700; }
.rs p { margin: 0; }
.rs-lab { font: 500 11.5px/1.2 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.rs-head { display: grid; gap: 14px; }
.rs-lead { font-size: 18px; color: var(--mute); max-width: 60ch; }
.rs-pills { display: flex; flex-wrap: wrap; gap: 8px; }
/* REQ-218.4: the release's token cost range, under the pills */
.rs-cost { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font: 600 14px/1.4 var(--font-mono); color: var(--ink); }
.rs-cost .rs-lab { margin: 0; }
.rs-pill { font-size: 13px; padding: 6px 11px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); }
.rs-note { background: var(--needs-soft); color: var(--ink); border-radius: 10px; padding: 10px 14px; font-size: 14px; }
.rs-change { background: var(--accent-soft); border-radius: 10px; padding: 10px 14px; font-size: 14px; font-weight: 600; }
.rs-updated { margin: 0; font: 500 12.5px/1.4 var(--font-mono); color: var(--mute); }
.rs-updated.missed { background: var(--needs-soft); color: var(--ink); border-radius: 10px; padding: 8px 12px; font-family: inherit; font-weight: 600; }
.rs-tabs { display: flex; gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 4px; width: max-content; max-width: 100%; flex-wrap: wrap; }
.rs-tabs a { font-weight: 600; font-size: 15px; color: var(--mute); text-decoration: none; padding: 10px 18px; border-radius: 9px; min-height: 44px; box-sizing: border-box; display: inline-flex; align-items: center; }
.rs-tabs a[aria-current="page"] { background: var(--ink); color: var(--panel); }
.rs-tabs a:focus-visible, .rs a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rs-sec { display: grid; gap: 16px; }
.rs-sec-head { display: grid; gap: 6px; }
.rs-sec-head p { color: var(--mute); max-width: 68ch; }
/* the four dates, today marked (211.1.4) */
.rs-track { list-style: none; margin: 0; padding: 26px 0 0; position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.rs-track::before { content: ""; position: absolute; left: 6px; right: 6px; top: 9px; height: 3px; background: var(--line); border-radius: 2px; }
.rs-stop { position: relative; display: grid; gap: 2px; }
.rs-stop::before { content: ""; position: absolute; top: -23px; left: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--panel); border: 3px solid var(--accent); }
.rs-stop.passed::before { background: var(--accent); }
.rs-stop.end::before { border-color: var(--ink); }
.rs-stop b { font: 700 19px var(--font-display); font-variant-numeric: tabular-nums; }
.rs-stop span { font-size: 13.5px; color: var(--mute); }
.rs-today { font-weight: 600; }
@media (max-width: 560px) { .rs-track { grid-template-columns: 1fr 1fr; row-gap: 30px; } }
/* one card per capability (211.1.2, 211.1.3) */
.rs-caps { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.rs-cap { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: grid; grid-template-rows: auto 1fr; min-width: 0; }
.rs-art { background: var(--accent-soft); min-height: 120px; display: grid; place-items: center; color: var(--mute); font-size: 13px; }
.rs-txt { padding: 16px 18px 18px; display: grid; gap: 8px; align-content: start; }
.rs-txt p { font-size: 15px; color: var(--mute); }
.rs-txt ul { margin: 0; padding-left: 18px; font-size: 14.5px; display: grid; gap: 4px; }
.rs-ref { font: 400 12px var(--font-mono); color: var(--mute); overflow-wrap: anywhere; }
.rs-state { justify-self: start; font-weight: 600; font-size: 12px; padding: 5px 9px; border-radius: 999px; background: var(--sunken); color: var(--ink); }
/* the first week, per area, what waits */
.rs-journey { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.rs-step { padding: 16px; border-left: 1px solid var(--line); display: grid; gap: 6px; align-content: start; min-width: 0; }
.rs-step:first-child { border-left: 0; }
.rs-day { font: 500 12px var(--font-mono); color: var(--rs-accent-text, var(--accent)); }
.rs-step p { font-size: 14px; color: var(--mute); }
@media (max-width: 820px) { .rs-step { border-left: 0; border-top: 1px solid var(--line); } .rs-step:first-child { border-top: 0; } }
.rs-areas { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.rs-area { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 8px; }
.rs-later { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.rs-later > div { border: 1.5px dashed var(--line-strong); border-radius: 12px; padding: 14px; display: grid; gap: 4px; }
.rs-later span { font-size: 14px; color: var(--mute); }
.rs-gate { color: var(--mute); max-width: 68ch; }
.rs-empty { color: var(--mute); }
/* the trace */
.rs-tbl { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.rs-tbl table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 14px; }
.rs-tbl th, .rs-tbl td { text-align: left; padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.rs-tbl thead th { border-top: 0; font: 500 11px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.rs-tbl td.id { font-family: var(--font-mono); white-space: nowrap; }
.rs-foot { font-size: 13px; color: var(--mute); border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 6px; }
.rs-link { font-weight: 600; color: var(--rs-accent-text, var(--accent)); }
/* REQ-211.3: the Status tab: counts per state, a row per capability, risks
   and Needs Steven. Each state has its board colour, and its name in words. */
.rs-counts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.rs-count { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 2px; border-top: 4px solid var(--rs-c, var(--line-strong)); }
.rs-count b { font: 800 28px var(--font-display); font-variant-numeric: tabular-nums; }
.rs-count span { font-size: 13.5px; color: var(--mute); }
.rs-count.zero b { color: var(--faint); }
.rs-chip { display: inline-block; font-weight: 600; font-size: 12px; padding: 4px 9px; border-radius: 999px; background: var(--rs-s, var(--sunken)); color: var(--ink); white-space: nowrap; }
[data-group="in-development"] { --rs-c: var(--working); --rs-s: var(--working-soft); }
[data-group="in-qa"] { --rs-c: var(--qa); --rs-s: var(--qa-soft); }
[data-group="waiting-for-build"] { --rs-c: var(--staging); --rs-s: var(--staging-soft); }
[data-group="ready-for-release"] { --rs-c: var(--release); --rs-s: var(--release-soft); }
[data-group="shipped"] { --rs-c: var(--done); --rs-s: var(--done-soft); }
.rs-rows td.rs-blocker { color: var(--ink); font-weight: 600; }
.rs-risks, .rs-needs ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 15px; }
.rs-risks a, .rs-needs a { color: var(--ink); text-underline-offset: 3px; }
.rs-needs { background: var(--needs-soft); border-radius: 14px; padding: 16px 18px; }
/* 211.1.5: it prints as one document */
/* 211.1.5: print or save as PDF */
.rs-print { min-height: 44px; padding: 0 16px; justify-self: start; }

@media print {
  /* only the document, not the app around it (Nico on #204; as releases.css does for a release page) */
  body.rs-showing > *:not(#releaseSpecView) { display: none !important; }
  .rs-view { padding: 0; }
  .rs-tabs, .rs-note, .rs-print { display: none !important; }
  .rs-cap, .rs-step, .rs-area, .rs-tbl { break-inside: avoid; }
}
