/* ------------------------------------------------------------------
   IR Stepwise, in the guidewIRe style: pure black, charcoal card
   surfaces, white active states, a muted teal accent and SF Pro type,
   matching the guidewIRe app and website. The angiogram still sits on a
   dark surround, which a fluoroscopic image needs to read correctly, so
   there is no light variant.
   ------------------------------------------------------------------ */

:root {
  --bg:        #000000;
  --bg-raised: #1c1c1c;
  --bg-sunk:   #0b0b0b;
  --bg-chip:   #1c1c1c;
  --bg-chip-hi:#2c2c2c;

  --line:      #2c2c2c;
  --line-hi:   #3a3a3a;

  --fg:        #ffffff;
  --fg-dim:    #9e9e9e;
  --fg-faint:  #6f6f6f;

  --accent:    #ffffff;   /* active chip, current step, selected vessel */
  --accent-ink:#000000;
  --danger:    #c9786e;
  --danger-dim:#5e2f2a;

  --teal:      #4f9a96;

  --sans: -apple-system, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  --display: -apple-system, "SF Pro Display", system-ui, "Segoe UI", Roboto, sans-serif;
  --mono: var(--sans);    /* control rails: SF with tabular figures */
  --serif: var(--sans);   /* reading text */

  --r: 10px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---------- shared atoms ---------- */

.eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.chip {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg-chip);
  color: var(--fg-dim);
  white-space: nowrap;
  transition: background .12s, color .12s, border-color .12s;
}
.chip:hover { background: var(--bg-chip-hi); color: var(--fg); border-color: var(--line-hi); }
.chip[aria-pressed="true"],
.chip.on {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}
.chip.danger[aria-pressed="true"] { background: var(--danger); border-color: var(--danger); color: #150606; }

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-block: 11px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: baseline; gap: 12px; min-width: 0; flex: 1 1 auto; }
.brand .mark {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--accent);
  border: 1px solid var(--line-hi);
  border-radius: var(--r);
  padding: 3px 7px;
  flex: none;
}
.brand h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modes { display: flex; gap: 6px; flex: none; }

/* procedure switch, left of the section tabs */
.procs { display: flex; gap: 6px; flex: none; }
.procs .chip { min-width: 46px; text-align: center; }

/* the five de Assis origins */
.grid5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.grid5.wide { grid-template-columns: repeat(3, 1fr); }
.grid5 .chip { text-align: center; padding: 7px 2px; }
.originnote {
  margin: 10px 0 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--fg-dim);
  text-wrap: pretty;
}
.originnote b {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-faint);
  font-weight: 600;
  margin-bottom: 3px;
}

/* ---------- mode panels ---------- */

.mode { display: block; }
.mode[hidden] { display: none !important; }

/* ================= PROCEDURE ================= */

.proc {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr) 320px;
  gap: 34px;
  max-width: 1420px;
  margin: 0 auto;
  padding-block: 26px 72px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* step rail */
.rail { align-self: start; position: sticky; top: 76px; }
.rail-phase { margin-bottom: 18px; }
.rail-phase > .eyebrow {
  display: block;
  padding-bottom: 6px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.rail-item {
  display: flex;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 6px 8px;
  border-radius: var(--r);
  border-left: 2px solid transparent;
  color: var(--fg-dim);
  font-size: 14px;
  line-height: 1.35;
  transition: background .12s, color .12s;
}
.rail-item:hover { background: var(--bg-raised); color: var(--fg); }
.rail-item .num {
  font-family: var(--mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--fg-faint);
  padding-top: 2px;
  flex: none;
}
.rail-item[aria-current="true"] {
  background: var(--bg-raised);
  border-left-color: var(--accent);
  color: var(--fg);
}
.rail-item[aria-current="true"] .num { color: var(--accent); }
.rail-item.done .num::after { content: ""; }

/* step body */
.step { min-width: 0; max-width: 68ch; }
.step-head { border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 22px; }
.step-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.step-meta .n {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: var(--r);
  padding: 2px 7px;
  font-variant-numeric: tabular-nums;
}
.step h2 {
  margin: 0 0 10px;
  font-size: clamp(25px, 4.2vw, 33px);
  font-weight: 400;
  line-height: 1.16;
  letter-spacing: -0.012em;
  text-wrap: balance;
}
.step .lede {
  margin: 0;
  font-size: 18px;
  line-height: 1.52;
  color: var(--fg-dim);
  font-style: italic;
  text-wrap: pretty;
}
.step p { text-wrap: pretty; }
.step-body p { margin: 0 0 16px; }

/* spec table */
.specs {
  margin: 26px 0;
  border-top: 1px solid var(--line);
}
.specs dl { margin: 0; }
.specs .row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.specs dt {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-faint);
  padding-top: 4px;
}
.specs dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--fg);
}

/* callouts */
.note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  margin: 16px 0;
  padding: 13px 15px;
  border-radius: var(--r);
  background: var(--bg-raised);
  border-left: 2px solid var(--line-hi);
  font-size: 15.5px;
  line-height: 1.55;
}
.note .tag {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding-top: 4px;
  color: var(--fg-faint);
  white-space: nowrap;
}
.note.pearl { border-left-color: var(--accent); }
.note.pearl .tag { color: var(--accent); }
.note.pitfall { border-left-color: var(--danger); background: #15100f; }
.note.pitfall .tag { color: var(--danger); }
.note p { margin: 0; }

/* step footer */
.viewlink {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 8px 0 4px;
  padding: 9px 13px;
  border: 1px solid var(--line-hi);
  border-radius: var(--r);
  background: var(--bg-raised);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--fg);
  transition: background .12s, border-color .12s;
}
.viewlink:hover { background: var(--bg-chip-hi); border-color: var(--accent); }
.viewlink .arrow { color: var(--accent); }

.stepnav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.stepnav button {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--fg-dim);
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.stepnav button:hover:not(:disabled) { color: var(--fg); border-color: var(--line-hi); background: var(--bg-raised); }
.stepnav button:disabled { opacity: .3; cursor: default; }

/* progress */
.progress {
  display: flex;
  gap: 3px;
  margin-bottom: 20px;
}
.progress i {
  flex: 1;
  height: 2px;
  background: var(--line);
  border-radius: 1px;
}
.progress i.on { background: var(--accent); }

/* ================= ANATOMY ================= */

.anat {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 316px;
  gap: 22px;
  max-width: 1320px;
  margin: 0 auto;
  padding-block: 18px 56px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.viewer { min-width: 0; }

.runbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 12px;
}
.runbar .eyebrow { flex: none; margin-right: 2px; }

.imagewrap {
  position: relative;
  border: 1px solid var(--line-hi);
  border-radius: var(--r);
  background: var(--bg-sunk);
  overflow: hidden;
}
#fluoroGL, #scopeGL {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
#fluoroGL[hidden], #scopeGL[hidden] { display: none !important; }
#scopeCanvas { position: relative; z-index: 1; }
#fluoro {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 100%;
  cursor: grab;
  touch-action: none;
}
#fluoro.dragging { cursor: grabbing; }

.vtip {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.03em;
  color: var(--accent);
  background: rgba(8, 12, 14, 0.86);
  border: 1px solid var(--line-hi);
  border-radius: var(--r);
  padding: 4px 8px;
  white-space: nowrap;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hint {
  position: absolute;
  left: 10px;
  bottom: 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: rgba(240,244,243,0.62);
  background: rgba(8,12,14,0.55);
  border-radius: var(--r);
  padding: 4px 8px;
  pointer-events: none;
  transition: opacity .4s;
}
.hint.gone { opacity: 0; }

/* contrast run playback, under the image */
.playbar {
  display: flex; align-items: center; gap: 6px;
  margin-top: 8px;
}
.playbar .pb { padding: 5px 9px; min-width: 32px; text-align: center; }
.playbar { flex-wrap: wrap; }
.pbmode { display: inline-flex; gap: 0; margin-left: 4px; }
.pbmode .pb { border-radius: 0; margin-left: -1px; }
.pbmode .pb:first-child { border-radius: var(--r) 0 0 var(--r); margin-left: 0; }
.pbmode .pb:last-child { border-radius: 0 var(--r) var(--r) 0; }
.playbar input[type=range] { flex: 1; min-width: 80px; }
.pbread {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em;
  color: var(--fg-dim); font-variant-numeric: tabular-nums;
  min-width: 96px; text-align: right;
}

.caption {
  margin-top: 11px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--fg-dim);
  min-height: 2.6em;
  text-wrap: pretty;
}

/* right panel */
.panel { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.block { border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-raised); }
.block > header {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
}
.block > .inner { padding: 12px; }

/* angle pad */
.pad {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 5;
  background: var(--bg-sunk);
  border: 1px solid var(--line);
  border-radius: var(--r);
  touch-action: none;
  cursor: crosshair;
  overflow: hidden;
}
.pad svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pad .puck {
  position: absolute;
  width: 13px; height: 13px;
  margin: -6.5px 0 0 -6.5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-ink), 0 0 11px rgba(242,233,216,.6);
  pointer-events: none;
}
.pad .padlabel {
  position: absolute;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--fg-faint);
  pointer-events: none;
}

.readout {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* sliders */
.slider { margin-top: 12px; }
.slider-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--fg-faint); margin-bottom: 5px;
}
.slider-head b { color: var(--fg); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
input[type=range] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 18px; background: none; cursor: pointer; display: block;
}
input[type=range]::-webkit-slider-runnable-track { height: 2px; background: var(--line-hi); border-radius: 1px; }
input[type=range]::-moz-range-track { height: 2px; background: var(--line-hi); border-radius: 1px; }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 12px; height: 12px; margin-top: -5px;
  border-radius: 50%; background: var(--accent); border: none;
}
input[type=range]::-moz-range-thumb {
  width: 12px; height: 12px; border: none; border-radius: 50%; background: var(--accent);
}

/* the scope that follows the procedure steps */
.scope { position: sticky; top: 76px; align-self: start; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.scopebox { min-width: 0; }
#scopeCanvas { display: block; width: 100%; aspect-ratio: 1 / 1; max-width: 100%; cursor: grab; touch-action: none; }
#scopeCanvas.dragging { cursor: grabbing; }
.scopecap {
  margin: 8px 0 0;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--fg-faint);
  text-wrap: pretty;
}
.roomwrap {
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--bg-sunk);
}
#roomCanvas, #scopeRoom {
  display: block; width: 100%; aspect-ratio: 16 / 10; max-width: 100%;
  cursor: grab; touch-action: none;
}
#roomCanvas.dragging, #scopeRoom.dragging { cursor: grabbing; }
.roomhint {
  margin: 7px 0 0;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.06em;
  color: var(--fg-faint);
}

/* preset + toggle grids */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.grid2 .chip { text-align: left; width: 100%; }
.togglewrap { display: flex; flex-wrap: wrap; gap: 6px; }

.preset { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; padding: 6px 9px; }
.preset .pname { font-size: 11px; }
.preset .pang { font-size: 9.5px; opacity: .62; letter-spacing: .06em; }

/* selected vessel info */
.vinfo .vname {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.25;
  margin: 0 0 3px;
  text-wrap: balance;
}
.vinfo .vmeta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin-bottom: 9px;
}
.vinfo .vnote { font-size: 14.5px; line-height: 1.5; color: var(--fg-dim); margin: 0; text-wrap: pretty; }
.vinfo .vdanger {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--danger);
  border: 1px solid var(--danger-dim);
  border-radius: var(--r);
  padding: 2px 6px;
  margin-bottom: 9px;
}
.vinfo .empty { font-size: 14.5px; color: var(--fg-faint); margin: 0; font-style: italic; }

.fshort { margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--line); }
.fbar { height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; margin-top: 5px; }
.fbar i { display: block; height: 100%; background: var(--accent); }

/* view quality: what is in the way, and the drill that hides it */
.vqnote {
  margin: 6px 0 0; font-size: 13.5px; line-height: 1.4; color: var(--fg-dim);
  min-height: 1.4em;
}
.vqv {
  color: var(--fg); border-bottom: 1px dotted var(--fg-faint); cursor: default;
}
.vqv:hover { color: var(--accent); border-bottom-color: var(--accent); }
.vqbtns { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.vqbtns[hidden] { display: none; }
.vqbtns .chip { flex: 1; text-align: center; }
.chip:disabled { opacity: .4; cursor: not-allowed; }

.drill {
  margin-top: 10px; padding: 10px 11px 11px;
  border: 1px solid var(--line-hi); border-radius: var(--r);
  background: var(--bg-sunk);
}
.drill p { margin: 6px 0 0; font-size: 14px; line-height: 1.45; color: var(--fg-dim); }
.drill p b { color: var(--fg); font-weight: 600; }
.drillhead { display: flex; justify-content: space-between; align-items: baseline; }
.drillround { font-family: var(--mono); font-size: 10.5px; color: var(--fg-dim); font-variant-numeric: tabular-nums; }
.drillscore { margin: 8px 0 0; display: grid; gap: 4px; }
.drillscore div { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.drillscore dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-faint); }
.drillscore dd { margin: 0; font-family: var(--mono); font-size: 12px; color: var(--fg-dim); font-variant-numeric: tabular-nums; }
.drillscore dd b { margin-left: 8px; font-size: 15px; }
.drillscore .of { margin-left: 8px; font-size: 10.5px; color: var(--fg-faint); }
.drill .drillid.ok { color: #9fcf9a; }
.drill .drillid.bad { color: var(--danger); }
.drill .drillteach { font-size: 13.5px; }
.drillbtns { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.drillbtns .chip { flex: 1; text-align: center; }

/* depth ramp legend */
.depthlegend .ramp {
  height: 9px; border-radius: 2px;
  background: linear-gradient(to right, rgb(48,84,150), rgb(86,158,168) 45%, rgb(214,178,96) 72%, rgb(245,232,206));
}
.depthlegend .ramprow {
  display: flex; justify-content: space-between; margin-top: 5px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .06em; color: var(--fg-faint);
}
.depthlegend .rampnote {
  margin: 8px 0 0; font-size: 13px; line-height: 1.45; color: var(--fg-dim);
}

/* legend */
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.legend span {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .04em; color: var(--fg-dim);
}
.legend i { width: 9px; height: 2px; border-radius: 1px; flex: none; }

/* footer */
.foot {
  max-width: 1320px;
  margin: 0 auto;
  padding-block: 20px 40px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  color: var(--fg-faint);
  line-height: 1.7;
}

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .anat { grid-template-columns: minmax(0, 1fr); }
  .panel { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
  .panel .block.wide { grid-column: 1 / -1; }
}

@media (max-width: 1180px) {
  .proc { grid-template-columns: 220px minmax(0, 1fr); }
  .scope {
    grid-column: 1 / -1; position: static;
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start;
  }
  .scope .viewlink { grid-column: 1 / -1; justify-self: start; }
}

@media (max-width: 840px) {
  .proc { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .scope { grid-template-columns: 1fr; }
  .rail { position: static; }
  .rail-phase { margin-bottom: 12px; }
}

@media (max-width: 620px) {
  .panel { grid-template-columns: 1fr; }
  .specs .row { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 8px 0; }
  .brand h1 { font-size: 15px; }
  .topbar { gap: 10px; }
  .step .lede { font-size: 16.5px; }
  .grid2 { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ================= guidewIRe chrome and components ================= */

body { font-family: var(--sans); font-size: 16px; }
:focus-visible { outline-color: var(--teal); }

/* Labels: guidewIRe eyebrows are small teal caps */
.eyebrow { color: var(--teal); font-size: 11px; letter-spacing: 0.08em; }

/* Controls: rounded pills, white when active (as in the app's dark mode) */
.chip {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  padding: 7px 14px;
  border-color: transparent;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.chip:hover { border-color: transparent; }
.chip.pb { padding: 7px 11px; }
.readout, .slider-head b, .rail-item .num, .step-meta .n { font-variant-numeric: tabular-nums; }

/* ---------- guidewIRe floating header ---------- */
.site-header {
  position: sticky; top: 12px; z-index: 60;
  margin: 12px auto 0; width: calc(100% - 32px); max-width: 1412px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 10px 10px 18px;
  background: rgba(26, 26, 26, 0.72);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}
.site-header .brand {
  display: flex; align-items: center; gap: 10px; flex: none;
  text-decoration: none; color: var(--fg);
  font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: -0.02em;
}
.site-header .brand img { width: 30px; height: auto; display: block; }
.site-header .brand b { color: var(--teal); font-weight: 700; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  white-space: nowrap; text-decoration: none; font-size: 14px; font-weight: 500;
  color: var(--fg-dim); padding: 8px 14px; border-radius: 999px;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--fg); background: rgba(255,255,255,0.06); }
.site-nav a.nav-cta { color: #000; background: #fff; font-weight: 600; }
.site-nav a.nav-cta:hover { background: #e5e5e5; }
@media (max-width: 560px) { .site-nav a:not(.nav-cta):not([data-keep]) { display: none; } }

/* Solid band behind the floating header so the toolbar below never shows
   content scrolling through the gap. */
body::before {
  content: ""; position: fixed; top: 0; left: 0; right: 0; height: 76px;
  background: #000; z-index: 50;
}

/* ---------- IR Stepwise toolbar (was the top bar) ---------- */
.topbar {
  top: 76px;
  max-width: 1420px; margin: 0 auto;
  padding-block: 18px 14px;
  background: rgba(0, 0, 0, 0.9);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border-bottom-color: var(--line);
}
.sw-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.sw-title .eyebrow { color: var(--teal); }
.sw-title h1 {
  margin: 0;
  font-family: var(--display); font-size: 24px; font-weight: 700; letter-spacing: -0.03em;
  line-height: 1.15;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.procs, .modes {
  background: var(--bg-raised); border-radius: 999px; padding: 4px; gap: 2px;
}
.procs .chip, .modes .chip { background: transparent; }
.procs .chip:hover, .modes .chip:hover { background: var(--bg-chip-hi); }
.procs .chip.on, .modes .chip.on { background: #fff; color: #000; }

/* Steps rail sits under both sticky bars */
.rail { top: 168px; }
.rail-item { border-radius: var(--r); border-left: 0; padding: 8px 10px; }
.rail-item[aria-current="true"] { background: var(--bg-raised); box-shadow: inset 3px 0 0 var(--teal); }
.rail-item[aria-current="true"] .num { color: var(--teal); }

/* Step text: guidewIRe headings, plain (not italic) lede */
.step h2 {
  font-family: var(--display); font-weight: 700; letter-spacing: -0.03em;
  font-size: clamp(26px, 3.6vw, 36px); line-height: 1.12;
}
.step .lede { font-style: normal; font-size: 18px; }
.step-meta .n { border-radius: 6px; }
.step-body { color: #e6e6e6; }

/* Panels: card surfaces with the app's large radii */
.scopebox, .block, .imagewrap, .roomwrap { border-radius: 16px; }
.imagewrap, .roomwrap { overflow: hidden; }
.block { background: var(--bg-raised); border-color: transparent; }
.viewlink { color: var(--teal); font-family: var(--sans); }

.foot { font-family: var(--sans); font-size: 12px; letter-spacing: 0; }

@media (max-width: 840px) {
  /* The toolbar wraps to several rows here; let it scroll away instead of
     pinning a third of the screen under the site header. */
  .topbar { position: static; }
  .rail { position: static; top: auto; }
}
@media (max-width: 620px) {
  .sw-title h1 { font-size: 19px; }
  .procs { flex-wrap: wrap; }
}
