/* Yard plus: the race, the big measured cards and the Mac app replica, brought
   over from the Race design and drawn with Yard's own tokens and type. The
   windows are dark in both themes, like the hero terminal. */
:root {
  --win: var(--term-bg);
  --win-2: color-mix(in srgb, var(--term-bg) 88%, #fff);
  --win-line: rgba(255, 255, 255, .09);
  --win-text: var(--term-fg);
  --win-muted: #8A93A0;
  --win-other: #7A8EAB;
}

/* ---------- the race ---------- */
.rc-win {
  background: var(--win); color: var(--win-text); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(15, 20, 25, .55), 0 0 0 1px var(--win-line) inset;
}
.rc-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--win-line); }
.rc-bar i, .ap-bar i { width: 11px; height: 11px; border-radius: 50%; background: #2E3640; }
.rc-bar i:first-child, .ap-bar i:first-child { background: var(--ember); }
.rc-title { margin-left: 10px; background: none; border: 0; padding: 0; color: var(--win-muted); font-size: 12.5px; }
.rc-tools { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; padding: 16px 20px 4px; }
.rc-seg { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--win-2); box-shadow: inset 0 0 0 1px var(--win-line); }
.rc-seg-b { border: 0; background: transparent; color: var(--win-muted); font: 500 14px/1 var(--f-text); padding: 9px 14px; border-radius: 8px; cursor: pointer; }
.rc-seg-b.on { background: rgba(255, 255, 255, .1); color: var(--win-text); }
.rc-run { border: 0; cursor: pointer; padding: 10px 16px; border-radius: 10px; background: var(--ember); color: var(--on-ember); font: 600 14px/1 var(--f-text); }
.rc-lanes { display: grid; padding: 6px 20px; }
.rc-lane { padding: 16px 0 18px; border-bottom: 1px solid var(--win-line); }
.rc-lane:last-child { border-bottom: 0; }
.rc-head { display: flex; align-items: center; gap: 10px; }
.rc-name { font: 700 19px/1 var(--f-display); letter-spacing: -0.02em; }
.rc-lane .chip-measured { color: #5CC99A; background: rgba(92, 201, 154, .14); }
.rc-lane .chip-target { color: #FFC23D; background: rgba(255, 194, 61, .14); }
.rc-timer { margin-left: auto; font: 600 16px/1 var(--f-mono); font-variant-numeric: tabular-nums; }
.rc-lane.done .rc-timer { color: #6FD3A5; }
.rc-rail { padding: 22px 0 4px; }
.rc-rail-in { position: relative; margin: 0 48px; height: 66px; }
@media (max-width: 640px) {
  .rc-rail-in { margin: 0 26px; }
  .rc-stop span { font-size: 9px; }
  .rc-lane:first-child .rc-stop:nth-child(odd) span { margin-top: 14px; }
}
.rc-rail-in::before { content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 3px; border-radius: 2px; background: var(--win-line); }
.rc-stop { position: absolute; top: 0; transform: translateX(-50%); display: grid; justify-items: center; gap: 8px; }
.rc-stop::before { content: ""; width: 21px; height: 21px; border-radius: 50%; background: var(--win); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .14); transition: box-shadow .1s ease; }
.rc-stop span { font: 400 12px/1.2 var(--f-mono); color: var(--win-muted); white-space: nowrap; }
.rc-stop.hit::before { box-shadow: inset 0 0 0 3px var(--win-other); }
.rc-kiri .rc-stop.hit::before { box-shadow: inset 0 0 0 3px var(--ember); }
.rc-stop.hit span { color: var(--win-text); }
.rc-token {
  position: absolute; top: -6px; left: 0; z-index: 2; width: 30px; height: 30px; margin-left: -15px;
  border-radius: 8px; transform: skewX(-10deg); background: var(--win-other); box-shadow: inset 0 8px 0 rgba(255, 255, 255, .22);
}
.rc-kiri .rc-token { background: var(--ember); box-shadow: inset 0 8px 0 var(--ember-lid); }
.rc-orb .rc-token { background: var(--bar-other); }
.rc-dd .rc-token { background: var(--bar-dd); }
.rc-dd .rc-stop.hit::before { box-shadow: inset 0 0 0 3px var(--bar-dd); }
.rc-orb .rc-stop.hit::before { box-shadow: inset 0 0 0 3px var(--bar-other); }
.rc-note { color: var(--win-muted); font-size: 14px; margin-top: 6px; }
.rc-foot { padding: 12px 20px 16px; font-size: 13px; color: var(--win-muted); border-top: 1px solid var(--win-line); }

/* ---------- big measured cards ---------- */
.bn { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.bn-tile {
  position: relative; grid-column: span 3; min-width: 0;
  display: grid; align-content: start; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(20px, 2.6vw, 30px); box-shadow: var(--shadow);
}
.bn-boot { grid-row: span 2; background: var(--ember); color: var(--on-ember); border-color: transparent; }
.bn-boot .bn-label, .bn-boot .bn-journey span, .bn-boot .bn-journey b { color: var(--on-ember); }
.bn-boot .chip-measured { color: var(--on-ember); background: color-mix(in srgb, var(--on-ember) 14%, transparent); }
.bn-label { font-size: 15px; color: var(--text-2); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bn-big { font: 800 clamp(60px, 8.4vw, 104px)/.95 var(--f-display); letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
.bn-big small { font-size: .3em; letter-spacing: 0; margin-left: .18em; font-weight: 700; }
.bn-sub { color: var(--muted); font-size: 15px; }
.bn-journey { list-style: none; padding: 0; margin-top: 14px; display: grid; gap: 11px; }
.bn-journey li { display: grid; grid-template-columns: minmax(0, 9em) minmax(0, 1fr) 3em; gap: 10px; align-items: center; font: 400 12.5px/1.2 var(--f-mono); }
.bn-journey i { height: 11px; border-radius: 0 4px 4px 0; background: color-mix(in srgb, var(--on-ember) 30%, transparent); }
.bn-journey li:last-child i { background: var(--on-ember); }
.bn-journey b { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.bn-wide { grid-column: span 6; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: center; }
.bn-mid { font-size: 16px; color: var(--text-2); margin-top: 10px; }
.bn-mid b { color: var(--ink); font-family: var(--f-mono); font-weight: 600; font-size: .92em; }
.bn-shims { display: grid; grid-template-columns: repeat(auto-fill, minmax(12px, 1fr)); gap: 4px; }
.bn-shims i { aspect-ratio: 1; border-radius: 3px; background: var(--bar-other); opacity: .85; }
@media (max-width: 860px) {
  .bn-tile, .bn-wide { grid-column: span 6; }
  .bn-boot { grid-row: auto; }
  .bn-wide { grid-template-columns: 1fr; }
}

/* ---------- the Mac app ---------- */
.ap-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.ap-grid h2 { margin-bottom: 4px; }
.ap-grid .section-lede { margin-top: 14px; }
.ap-plats { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.ap-plats li { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.ap-plats b { font: 700 16px/1.4 var(--f-display); }
.ap-plats span { color: var(--text-2); font-size: 15px; }
.ap-win { margin: 0; background: var(--win); color: var(--win-text); border-radius: 14px; overflow: hidden; min-width: 0; box-shadow: 0 30px 60px -30px rgba(15, 20, 25, .55), 0 0 0 1px var(--win-line) inset; }
.ap-bar { display: flex; gap: 7px; padding: 12px 14px; }
.ap-body { display: grid; grid-template-columns: 200px minmax(0, 1fr); min-height: 360px; }
.ap-side { background: var(--win-2); border-right: 1px solid var(--win-line); padding: 6px 10px 12px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.ap-brand { display: flex; align-items: center; gap: 8px; font: 700 16px/1 var(--f-display); padding: 4px 6px 14px; }
.ap-brand .mark { width: 22px; height: 22px; color: var(--win-muted); }
.ap-h { font: 600 10px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--win-muted); padding: 6px 8px; }
.ap-i { display: flex; justify-content: space-between; padding: 7px 8px; border-radius: 7px; color: var(--win-muted); }
.ap-i span { font-family: var(--f-mono); font-size: 11px; }
.ap-i.on { background: rgba(255, 255, 255, .08); color: var(--win-text); }
.ap-vm { margin-top: auto; background: var(--win); border: 1px solid var(--win-line); border-radius: 10px; padding: 10px; display: grid; gap: 8px; }
.ap-vm-h { display: flex; align-items: center; gap: 7px; font-weight: 600; }
.ap-vm-h em { margin-left: auto; font-style: normal; font-size: 11px; color: #5CC99A; }
.ap-dot { width: 7px; height: 7px; border-radius: 50%; background: #5CC99A; }
.ap-vm dl { margin: 0; display: grid; gap: 4px; font: 400 11px/1.3 var(--f-mono); }
.ap-vm dl div { display: flex; justify-content: space-between; gap: 6px; }
.ap-vm dt { color: var(--win-muted); }
.ap-vm dd { margin: 0; font-variant-numeric: tabular-nums; }
.ap-mem { height: 4px; border-radius: 2px; background: var(--win-line); overflow: hidden; }
.ap-mem i { display: block; height: 100%; width: 5%; background: var(--ember); }
.ap-stop { text-align: center; padding: 6px; border-radius: 7px; background: rgba(255, 255, 255, .08); font-size: 12px; }
.ap-pane { padding: 14px 18px; display: grid; grid-template-rows: auto 1fr; }
.ap-pane-h { font: 700 18px/1 var(--f-display); }
.ap-empty { display: grid; place-content: center; justify-items: center; text-align: center; gap: 8px; color: var(--win-muted); font-size: 13px; padding: 20px; }
.ap-empty b { color: var(--win-text); font-size: 15px; }
.ap-empty code { background: rgba(255, 255, 255, .08); border-color: transparent; color: var(--win-text); }
.ap-cube { width: 44px; height: 44px; border: 2px solid var(--win-muted); border-radius: 10px; transform: skewX(-10deg); opacity: .7; margin-bottom: 4px; }
@media (max-width: 960px) { .ap-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .ap-body { grid-template-columns: 1fr; } .ap-side { border-right: 0; border-bottom: 1px solid var(--win-line); } }

@media (prefers-reduced-motion: reduce) {
  .rc-stop::before { transition: none; }
}
