/* Red Protocol compact – public homepage candidate, mobile first. */

.red-protocol {
  --rp-black: #070707;
  --rp-dark: #10100f;
  --rp-paper: #f2f0e9;
  --rp-paper-2: #e7e4da;
  --rp-ink: #f4f2eb;
  --rp-muted: #aaa8a1;
  --rp-muted-dark: #66645f;
  --rp-line: #393938;
  --rp-line-dark: #bcb9b0;
  --rp-red: #ff4b43;
  --rp-red-dark: #c9231c;
  --rp-display: "Space Grotesk", "Inter", sans-serif;
  --rp-mono: "JetBrains Mono", "IBM Plex Mono", monospace;
  background: var(--rp-black);
  color: var(--rp-ink);
  font-family: var(--rp-mono);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

.red-protocol * { box-sizing: border-box; }
.red-protocol ::selection { background: var(--rp-red); color: var(--rp-black); }
.red-protocol a { color: inherit; }
.red-protocol button, .red-protocol input { font: inherit; }

.rp-plate {
  position: relative;
  isolation: isolate;
  min-width: 0;
  padding: 76px 20px;
  scroll-margin-top: 132px;
  border-bottom: 1px solid var(--rp-line);
  overflow: clip;
}

.rp-plate::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(242, 240, 233, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242, 240, 233, .045) 1px, transparent 1px);
  background-size: 44px 44px;
}

.rp-paper { background: var(--rp-paper); color: var(--rp-dark); border-color: var(--rp-line-dark); }
.rp-paper::before {
  background-image:
    linear-gradient(rgba(10, 10, 10, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10, 10, 10, .045) 1px, transparent 1px);
}

.rp-inner { width: min(100%, 1480px); margin: 0 auto; position: relative; }
.rp-plate-label {
  display: block;
  margin-bottom: 34px;
  color: var(--rp-muted);
  font: 600 12px/1.2 var(--rp-mono);
  letter-spacing: .12em;
}
.rp-paper .rp-plate-label { color: var(--rp-muted-dark); }

.rp-register { position: absolute; inset: 14px; pointer-events: none; opacity: .45; }
.rp-register span, .rp-register i { position: absolute; width: 28px; height: 28px; }
.rp-register span { left: 0; top: 0; border-left: 1px solid currentColor; border-top: 1px solid currentColor; }
.rp-register i { right: 0; bottom: 0; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; }

.rp-kicker {
  margin: 0 0 17px;
  color: var(--rp-red);
  font: 600 12px/1.35 var(--rp-mono);
  letter-spacing: .14em;
}
.rp-paper .rp-kicker { color: var(--rp-red-dark); }
.red-protocol h1, .red-protocol h2, .red-protocol h3, .red-protocol p { margin-top: 0; }
.red-protocol h1 {
  max-width: 12ch;
  margin-bottom: 22px;
  font: 700 clamp(46px, 11.4vw, 86px)/.9 var(--rp-display);
  letter-spacing: -.055em;
}
.red-protocol h2 {
  max-width: 15ch;
  margin-bottom: 22px;
  font: 700 clamp(38px, 9.7vw, 72px)/.94 var(--rp-display);
  letter-spacing: -.045em;
}
.rp-lead {
  max-width: 41ch;
  margin-bottom: 0;
  color: var(--rp-muted);
  font: 500 clamp(18px, 4.7vw, 25px)/1.45 var(--rp-display);
}
.rp-paper .rp-lead { color: var(--rp-muted-dark); }
.rp-section-head { display: grid; gap: 22px; margin-bottom: 38px; }

.rp-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 27px; }
.rp-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 17px;
  border: 1px solid currentColor;
  text-decoration: none;
  font: 600 12px/1 var(--rp-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.rp-actions a.primary { background: var(--rp-red); border-color: var(--rp-red); color: var(--rp-black); }
.rp-paper .rp-actions a.primary { background: var(--rp-red-dark); border-color: var(--rp-red-dark); color: white; }
.rp-actions a:hover, .rp-actions a:focus-visible { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 rgba(255, 75, 67, .22); }
.rp-actions a:focus-visible { outline: 3px solid var(--rp-paper); outline-offset: 4px; }
.rp-paper .rp-actions a:focus-visible { outline-color: var(--rp-black); }

/* Hero */
.rp-section-hero { min-height: min(760px, calc(100svh - var(--shell-h) - var(--status-h))); display: grid; align-items: center; padding-top: 48px; }
.rp-section-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 78% 28%, rgba(255, 75, 67, .13), transparent 34%);
}
.rp-ascii { position: absolute; inset: -76px -20px; width: calc(100% + 40px); height: calc(100% + 152px); z-index: -1; pointer-events: none; }
.rp-hero-grid { display: grid; gap: 40px; align-items: center; }
.rp-hero-copy { position: relative; z-index: 2; }
.rp-protocol-visual { position: relative; min-width: 0; border: 1px solid var(--rp-line); background: rgba(7, 7, 7, .72); }
.rp-protocol-visual svg { display: block; width: 100%; height: auto; color: var(--rp-ink); overflow: visible; }
.rp-trace { fill: none; }
.rp-trace.ghost { stroke: rgba(242, 240, 233, .23); stroke-width: 1.5; stroke-dasharray: 5 10; }
.rp-trace.live { stroke: var(--rp-red); stroke-width: 3; stroke-dasharray: 4 24; filter: url(#rp-glow); animation: rp-trace 7s linear infinite; }
@keyframes rp-trace { to { stroke-dashoffset: -112; } }
.rp-node circle, .rp-node rect { fill: var(--rp-red); stroke: var(--rp-red); filter: url(#rp-glow); animation: rp-node 2.8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.rp-node.n2 rect { animation-delay: .7s; }
.rp-node.n3 circle { animation-delay: 1.4s; }
@keyframes rp-node { 50% { opacity: .45; transform: scale(.72); } }
.rp-node text { fill: var(--rp-ink); font: 600 14px var(--rp-mono); letter-spacing: .14em; }
.rp-node.n3 text { text-anchor: end; }
.rp-protocol-caption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 18px; padding: 14px; border-top: 1px solid var(--rp-line); }
.rp-protocol-caption span { color: var(--rp-red); font: 600 11px var(--rp-mono); letter-spacing: .12em; }
.rp-protocol-caption b { font: 600 13px var(--rp-display); }

/* Eternal draft / product context */
.rp-product-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 82vw); gap: 0; overflow-x: auto; border: 1px solid var(--rp-line); scroll-snap-type: x mandatory; scrollbar-width: thin; }
.rp-product-card {
  position: relative;
  min-height: 230px;
  padding: 19px;
  border-right: 1px solid var(--rp-line);
  background: var(--rp-dark);
  color: var(--rp-ink);
  text-decoration: none;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  transition: background .18s ease, color .18s ease;
}
.rp-product-card:last-child { border-right: 0; }
.rp-product-card:hover, .rp-product-card:focus-visible { background: var(--rp-paper); color: var(--rp-dark); outline: 0; }
.rp-product-card.current { background: var(--rp-red); color: var(--rp-black); }
.rp-product-index { position: absolute; right: 14px; top: 12px; color: currentColor; opacity: .38; font: 700 38px/1 var(--rp-display); }
.rp-product-card small { color: var(--rp-red); font-size: 12px; letter-spacing: .12em; }
.rp-product-card.current small { color: var(--rp-black); }
.rp-product-card:hover small, .rp-product-card:focus-visible small { color: var(--rp-red); }
.rp-product-card h3 { margin: 34px 0 12px; font: 700 26px/1 var(--rp-display); }
.rp-product-card p { margin: 0; font: 500 16px/1.48 var(--rp-display); color: inherit; opacity: .72; }
.rp-product-card footer { margin-top: auto; padding-top: 20px; font: 500 12px/1.35 var(--rp-mono); opacity: .65; }
.rp-context-note { margin: 18px 0 0; color: var(--rp-muted); font: 500 13px/1.55 var(--rp-mono); }

/* Case explorer */
.rp-case-browser { border: 1px solid var(--rp-line); background: rgba(10, 10, 10, .74); }
.rp-case-toolbar { display: grid; border-bottom: 1px solid var(--rp-line); }
.rp-case-search { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 15px; min-width: 0; min-height: 58px; padding: 9px 13px; border-bottom: 1px solid var(--rp-line); }
.rp-case-search span { color: var(--rp-red); font-size: 12px; letter-spacing: .12em; }
.rp-case-search input { min-width: 0; width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid var(--rp-line); border-radius: 0; background: transparent; color: var(--rp-ink); font: 500 16px var(--rp-display); }
.rp-case-search input::placeholder { color: #73716d; }
.rp-case-search input:focus { border-color: var(--rp-red); outline: 2px solid rgba(255, 75, 67, .25); }
.rp-case-filters { display: flex; gap: 7px; overflow-x: auto; padding: 10px 13px; border-bottom: 1px solid var(--rp-line); scrollbar-width: none; }
.rp-case-filters button {
  flex: none;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid #555;
  background: transparent;
  color: var(--rp-ink);
  font-size: 12px;
  letter-spacing: .05em;
  text-transform: uppercase;
  cursor: pointer;
}
.rp-case-filters button.on { background: var(--rp-red); border-color: var(--rp-red); color: var(--rp-black); }
.rp-case-filters button:focus-visible { outline: 2px solid var(--rp-red); outline-offset: 2px; }
.rp-case-toolbar output { padding: 12px 13px; color: var(--rp-muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.rp-case-browser-grid { display: grid; min-width: 0; }
.rp-case-index { display: flex; gap: 10px; padding: 12px; overflow-x: auto; border-bottom: 1px solid var(--rp-line); scroll-snap-type: x mandatory; scrollbar-width: thin; }
.rp-case-index-item {
  flex: 0 0 min(290px, 82vw);
  min-width: 0;
  padding: 0;
  border: 1px solid var(--rp-line);
  background: #0a0a0a;
  color: var(--rp-ink);
  text-align: left;
  cursor: pointer;
  scroll-snap-align: start;
  overflow: hidden;
}
.rp-case-index-item.on { border-color: var(--rp-red); box-shadow: inset 0 0 0 1px var(--rp-red); }
.rp-case-index-item:focus-visible { outline: 2px solid var(--rp-red); outline-offset: 3px; }
.rp-case-index-copy { display: grid; gap: 5px; padding: 12px; }
.rp-case-index-copy small { color: var(--rp-red); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.rp-case-index-copy b { font: 700 17px/1.13 var(--rp-display); }
.rp-case-index-copy i { color: var(--rp-muted); font: normal 13px/1.35 var(--rp-display); }

.rp-case-media { position: relative; display: block; overflow: hidden; background: #111; }
.rp-case-media.artifact { margin: 0; aspect-ratio: 16 / 9; border-bottom: 1px solid var(--rp-line); }
.rp-case-media.artifact img { display: block; width: 100%; height: 100%; object-fit: cover; filter: saturate(.78) contrast(1.04); transition: transform .5s ease, filter .3s ease; }
.rp-case-media.artifact:hover img { transform: scale(1.018); filter: saturate(1) contrast(1.02); }
.rp-case-media.symbol { min-height: 230px; display: grid; align-content: center; padding: 26px; border-bottom: 1px solid var(--rp-line); background-image: radial-gradient(circle at 78% 18%, rgba(255,75,67,.2), transparent 30%), linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: auto, 32px 32px, 32px 32px; }
.rp-case-media.symbol img { width: 76px; height: 76px; object-fit: contain; filter: brightness(1.3) saturate(.7); }
.rp-case-media.symbol > span:not(.rp-cover-mark) { margin-top: 22px; color: var(--rp-red); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.rp-case-media.symbol b { max-width: 13ch; margin-top: 7px; font: 700 clamp(25px, 6vw, 44px)/.94 var(--rp-display); letter-spacing: -.035em; }
.rp-case-media.symbol i { position: absolute; right: 24px; top: 24px; width: 46px; height: 46px; border: 1px solid var(--rp-red); transform: rotate(45deg); }
.rp-cover-mark { color: var(--rp-red); font: 700 56px/1 var(--rp-display); }
.rp-case-media.compact { min-height: 116px; aspect-ratio: auto; }
.rp-case-media.artifact.compact { height: 116px; }
.rp-case-media.symbol.compact { padding: 13px; }
.rp-case-media.symbol.compact img { width: 42px; height: 42px; }
.rp-case-media.symbol.compact > span:not(.rp-cover-mark) { display: none; }
.rp-case-media.symbol.compact b { margin-top: 8px; font-size: 17px; }
.rp-case-media.symbol.compact i { width: 22px; height: 22px; right: 12px; top: 12px; }
.rp-case-media.compact .rp-cover-mark { font-size: 34px; }

.rp-case-viewer { min-width: 0; }
.rp-case-viewer-grid { display: grid; min-width: 0; }
.rp-case-copy { min-width: 0; padding: 20px; display: flex; flex-direction: column; }
.rp-case-copy > header { display: flex; justify-content: space-between; gap: 16px; color: var(--rp-muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.rp-case-copy > header i { color: var(--rp-red); font-style: normal; text-align: right; }
.rp-case-person { margin: 32px 0 8px; color: var(--rp-muted); font: 500 15px/1.45 var(--rp-display); }
.rp-case-copy h3 { max-width: 14ch; margin: 0 0 18px; font: 700 clamp(34px, 9vw, 62px)/.94 var(--rp-display); letter-spacing: -.04em; }
.rp-case-summary { max-width: 56ch; margin: 0 0 22px; color: var(--rp-muted); font: 500 18px/1.55 var(--rp-display); }
.rp-case-claim { display: grid; gap: 7px; padding: 15px 17px; border-left: 6px solid var(--rp-red); background: rgba(255, 75, 67, .08); }
.rp-case-claim small { color: var(--rp-red); font-size: 11px; letter-spacing: .1em; }
.rp-case-claim b { font: 700 20px/1.3 var(--rp-display); }
.rp-case-claim span { color: var(--rp-muted); font: 500 12px/1.45 var(--rp-mono); }
.rp-tool-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.rp-tool-row span { padding: 7px 9px; border: 1px solid #4d4d4d; color: var(--rp-muted); font-size: 12px; }
.rp-case-details { margin-top: 18px; border-top: 1px solid var(--rp-line); border-bottom: 1px solid var(--rp-line); }
.rp-case-details summary { min-height: 48px; display: flex; align-items: center; color: var(--rp-red); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.rp-case-details p { margin: 0; padding: 0 0 18px; color: var(--rp-muted); font: 500 16px/1.62 var(--rp-display); }
.rp-case-copy > footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 9px; margin-top: 22px; }
.rp-case-copy > footer a, .rp-case-copy > footer button { min-height: 44px; padding: 0 12px; border: 1px solid #555; background: transparent; color: var(--rp-ink); text-decoration: none; display: inline-flex; align-items: center; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.rp-case-copy > footer a:hover, .rp-case-copy > footer a:focus-visible, .rp-case-copy > footer button:hover, .rp-case-copy > footer button:focus-visible { border-color: var(--rp-red); color: var(--rp-red); outline: 0; }
.rp-case-empty { min-height: 310px; display: grid; place-content: center; gap: 9px; text-align: center; color: var(--rp-muted); }
.rp-case-empty b { color: var(--rp-ink); font: 700 26px var(--rp-display); }
.rp-case-footnote { margin: 16px 0 0; color: var(--rp-muted); font: 500 12px/1.55 var(--rp-mono); }

/* Summer Lab */
.rp-lab-grid { display: grid; gap: 40px; }
.rp-lab-copy > p:not(.rp-kicker):not(.rp-lead):not(.rp-contract) { max-width: 56ch; margin: 20px 0 0; color: var(--rp-muted); font: 500 17px/1.58 var(--rp-display); }
.rp-contract { margin: 18px 0 0; color: var(--rp-red-dark); font: 500 12px/1.45 var(--rp-mono); }
.rp-lab-arc { border: 1px solid var(--rp-line); display: grid; grid-template-columns: 1fr; }
.rp-lab-arc > div { min-height: 150px; padding: 18px; border-right: 0; border-bottom: 1px solid var(--rp-line); display: flex; flex-direction: column; }
.rp-lab-arc > div span { color: var(--rp-red); font-size: 11px; letter-spacing: .08em; }
.rp-lab-arc > div b { margin-top: 26px; font: 700 23px/1 var(--rp-display); }
.rp-lab-arc > div p { margin: auto 0 0; color: var(--rp-muted); font: 500 14px/1.45 var(--rp-display); }
.rp-lab-arc > div i { align-self: flex-end; margin-top: -22px; color: var(--rp-red); font-style: normal; }
.rp-lab-arc footer { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 13px; background: var(--rp-red); color: var(--rp-black); font-size: 11px; letter-spacing: .07em; }
.rp-lab-arc footer b { color: var(--rp-black); }

/* People + closing */
.rp-people-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 72vw); overflow-x: auto; border: 1px solid var(--rp-line); scroll-snap-type: x mandatory; scrollbar-width: thin; }
.rp-person-card { min-width: 0; border-right: 1px solid var(--rp-line); background: #0b0b0b; scroll-snap-align: start; }
.rp-person-card:last-child { border-right: 0; }
.rp-person-card img, .rp-person-placeholder { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-bottom: 1px solid var(--rp-line); filter: grayscale(.42) contrast(1.04); transition: filter .25s ease; }
.rp-person-card:hover img { filter: grayscale(0) contrast(1); }
.rp-person-placeholder { display: grid; place-items: center; color: var(--rp-red); font: 700 48px var(--rp-display); }
.rp-person-card > div { padding: 13px; }
.rp-person-card b { display: block; font: 700 18px/1.15 var(--rp-display); }
.rp-person-card span { display: block; min-height: 42px; margin-top: 6px; color: var(--rp-muted); font: 500 14px/1.45 var(--rp-display); }
.rp-person-card small { display: block; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--rp-line); color: var(--rp-red); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; }
.rp-person-card[data-status='preliminary'] small { color: var(--rp-paper); }
.rp-person-card[data-status='open'] { opacity: .72; }
.rp-person-card[data-status='open'] small { color: var(--rp-muted); }
.rp-people-note { margin: 15px 0 0; color: var(--rp-muted); font: 500 12px/1.55 var(--rp-mono); }
.rp-closing { display: grid; gap: 28px; margin-top: 72px; padding: 26px; background: var(--rp-red); color: var(--rp-black); }
.rp-closing span { font-size: 11px; letter-spacing: .12em; }
.rp-closing h2 { max-width: 12ch; margin: 20px 0 12px; font-size: clamp(44px, 12vw, 84px); }
.rp-closing p { margin: 0; font: 600 17px/1.45 var(--rp-display); }
.rp-closing .rp-actions { margin: 0; align-self: end; }
.rp-closing .rp-actions a { border-color: var(--rp-black); }
.rp-closing .rp-actions a.primary { background: var(--rp-black); color: var(--rp-paper); }
.rp-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 9px; margin-top: 28px; color: var(--rp-muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.rp-footer b { color: var(--rp-ink); }

/* Red branch shell integration */
html[data-branch='red-protocol'] .section-rail a { color: #ff4b43; }
html[data-branch='red-protocol'] .section-rail a[aria-current='true'] { transform: scale(1.45); }
html[data-branch='red-protocol'] .renderer-feedback { display: none !important; }

.rp-reveal { opacity: 1; transform: none; }
.rp-reveal.is-in { opacity: 1; transform: none; }

@media (min-width: 700px) {
  .rp-plate { padding: 96px clamp(34px, 5.4vw, 84px); }
  .rp-register { inset: 20px; }
  .rp-plate-label { margin-bottom: 44px; }
  .rp-section-head { grid-template-columns: minmax(0, 1.08fr) minmax(300px, .92fr); align-items: end; gap: 7vw; margin-bottom: 52px; }
  .rp-section-head .rp-lead { justify-self: end; }
  .rp-section-head.compact { align-items: start; }
  .rp-ascii { inset: -96px max(-84px, -5.4vw); width: calc(100% + min(168px, 10.8vw)); height: calc(100% + 192px); }
  .rp-case-toolbar { grid-template-columns: minmax(270px, 1fr) auto auto; align-items: stretch; }
  .rp-case-search { border-right: 1px solid var(--rp-line); border-bottom: 0; }
  .rp-case-filters { border-right: 1px solid var(--rp-line); border-bottom: 0; align-items: center; }
  .rp-case-toolbar output { display: grid; place-items: center; min-width: 144px; }
  .rp-case-browser-grid { grid-template-columns: minmax(300px, .76fr) minmax(0, 1.24fr); min-height: 680px; }
  .rp-case-index { display: block; padding: 0; overflow-x: hidden; overflow-y: auto; max-height: 720px; border-right: 1px solid var(--rp-line); border-bottom: 0; }
  .rp-case-index-item { display: grid; grid-template-columns: 104px 1fr; width: 100%; min-height: 96px; border: 0; border-bottom: 1px solid var(--rp-line); }
  .rp-case-media.compact { min-height: 95px; height: 95px; border-right: 1px solid var(--rp-line); border-bottom: 0; }
  .rp-case-index-copy { align-content: center; }
  .rp-case-viewer-grid > .rp-case-media { margin: 10px 10px 0; border: 1px solid var(--rp-line); }
  .rp-case-copy { padding: 26px; }
  .rp-lab-arc { grid-template-columns: repeat(3, 1fr); }
  .rp-lab-arc > div { border-right: 1px solid var(--rp-line); }
  .rp-lab-arc > div:nth-child(3n) { border-right: 0; }
  .rp-people-strip { grid-auto-columns: minmax(190px, 1fr); }
  .rp-closing { grid-template-columns: 1fr auto; align-items: end; padding: clamp(32px, 4vw, 58px); }
}

@media (max-width: 920px) {
  html[data-branch='red-protocol'] { --shell-h: 88px; }
  html[data-branch='red-protocol'][data-admin='true'] { --status-h: 22px; }
  html[data-branch='red-protocol'][data-admin='false'] { --status-h: 0px; }
  html[data-branch='red-protocol'] .lab-shell {
    grid-template-columns: 1fr auto;
    grid-template-rows: 44px 44px;
    height: var(--shell-h);
  }
  html[data-branch='red-protocol'] .lab-wordmark {
    min-width: 0;
    padding: 5px 10px;
    border-right: 0;
    border-bottom: 1px solid var(--lab-line);
  }
  html[data-branch='red-protocol'] .lab-mark { width: 26px; height: 26px; }
  html[data-branch='red-protocol'] .lab-actions {
    grid-column: 2;
    grid-row: 1;
    border-bottom: 1px solid var(--lab-line);
  }
  html[data-branch='red-protocol'] .lab-actions button { display: none; }
  html[data-branch='red-protocol'] .lab-actions button[data-action='memory'],
  html[data-branch='red-protocol'] .lab-actions .lab-primary { display: block; min-width: 58px; padding: 0 8px; }
  html[data-branch='red-protocol'] .branch-switcher {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }
  html[data-branch='red-protocol'] .branch-switcher a { flex: 1; min-width: 68px; justify-content: center; padding: 0 8px; }
  html[data-branch='red-protocol'] .lab-statusline { grid-template-columns: auto 1fr; }
  html[data-branch='red-protocol'] .lab-statusline > * { padding: 0 9px; }
  html[data-branch='red-protocol'] #statusRevision,
  html[data-branch='red-protocol'] .lab-statusline a { display: none; }
  html[data-branch='red-protocol'] .section-rail { display: none !important; }
  html[data-branch='red-protocol'] .lab-drawer { padding-top: var(--shell-h); }
}

@media (max-width: 520px) {
  html[data-branch='red-protocol'] .lab-statusline { grid-template-columns: 1fr; }
  html[data-branch='red-protocol'] #statusHypothesis { display: none; }
  .red-protocol h1 { font-size: clamp(44px, 13vw, 56px); max-width: 100%; overflow-wrap: anywhere; }
}

@media (min-width: 1080px) {
  .rp-section-hero { min-height: min(740px, calc(100svh - 86px)); }
  .rp-hero-grid { grid-template-columns: minmax(0, .94fr) minmax(460px, 1.06fr); gap: clamp(46px, 7vw, 110px); }
  .rp-protocol-visual { align-self: center; }
  .rp-product-strip { grid-auto-flow: initial; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; }
  .rp-case-viewer-grid { grid-template-rows: auto 1fr; }
  .rp-case-copy { padding: 30px; }
  .rp-lab-grid { grid-template-columns: minmax(0, .88fr) minmax(520px, 1.12fr); align-items: center; gap: clamp(58px, 8vw, 128px); }
  .rp-people-strip { grid-auto-flow: initial; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: visible; }
}

@media (max-width: 420px) {
  .rp-hero-stats { grid-template-columns: 1fr; }
  .rp-hero-stats div { display: grid; grid-template-columns: 60px 1fr; align-items: center; gap: 10px; }
  .rp-hero-stats dd { margin: 0; }
  .rp-case-search { grid-template-columns: 1fr; gap: 7px; }
  .rp-case-filters button { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .rp-trace.live, .rp-node circle, .rp-node rect { animation: none; }
  .rp-reveal { opacity: 1; transform: none; transition: none; }
  .rp-actions a, .rp-case-media.artifact img { transition: none; }
}
