/* Sand Engine — warm bronze desert, near-black ink */
:root {
  --bg: #f6f1e9;
  --bg-2: #efe6d6;
  --bg-3: #e8dcc5;
  --ink: #17140f;
  --ink-2: #2a241c;
  --ink-3: #5a4f3e;
  --ink-4: #8a7c64;
  --rule: #d6c9ad;
  --bronze: #b87a33;
  --bronze-2: #8a5620;
  --bronze-3: #d79552;
  --ember: #c85a1a;
  --sand-hi: #efd9a8;
  --ok: #476b3a;
  --font-sans: 'Inter Tight', 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
}
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Subtle grain */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.35;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.09 0 0 0 0 0.08 0 0 0 0 0.06 0 0 0 0.18 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
  z-index: 2;
}
@media (max-width: 720px) {
  .container { padding: 0 22px; }
}

/* ——— Top bar ——— */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  border-bottom: 1px solid color-mix(in oklab, var(--rule) 60%, transparent);
}
.topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 15px;
}
.wordmark .mark {
  width: 22px; height: 22px;
  display: inline-block;
}
/* Quiet "Technical research" tag in the topbar — matches .topbar-right tone.
   Note: .wordmark sets weight 600 + size 15px; we override both here. */
.wordmark.wordmark-quiet {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 11.5px;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--ink-4);
  display: block;
  line-height: 1.35;
  white-space: nowrap;
}
.wordmark-quiet .rp-paren {
  opacity: 0.55;
}
.wordmark-quiet .rp-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bronze-2);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--bronze-2) 18%, transparent);
  animation: rp-pulse 2.4s ease-in-out infinite;
  opacity: 0.7;
}
@keyframes rp-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.85; }
}
/* Footer signoff with the actual wordmark */
.wordmark-foot {
  font-size: 14px;
  color: var(--ink-3);
  letter-spacing: -0.01em;
  text-transform: none;
  font-family: var(--font-sans);
  font-weight: 600;
}
.topbar nav {
  display: flex;
  gap: 28px;
  font-size: 13px;
  color: var(--ink-3);
}
.topbar nav a { color: inherit; text-decoration: none; }
.topbar nav a:hover { color: var(--ink); }
.topbar-right {
  display: flex; align-items: center; gap: 18px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-4);
  letter-spacing: 0.02em;
}
.topbar-right .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ok);
  display: inline-block;
  margin-right: 6px;
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--ok) 20%, transparent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; }
  50% { opacity: 0.55; }
}
@media (max-width: 860px) {
  .topbar nav { display: none; }
}

/* ——— Section utilities ——— */
.section {
  padding-top: 120px;
  padding-bottom: 120px;
  position: relative;
}
.section-tight { padding-top: 80px; padding-bottom: 80px; }
@media (max-width: 720px) {
  .section { padding-top: 72px; padding-bottom: 72px; }
  .section-tight { padding-top: 56px; padding-bottom: 56px; }
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bronze-2);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: currentColor;
  display: inline-block;
}

h1, h2, h3 { margin: 0; letter-spacing: -0.025em; font-weight: 500; }
h1 { font-size: clamp(44px, 7vw, 88px); line-height: 0.98; }
h2 { font-size: clamp(32px, 4.6vw, 54px); line-height: 1.04; }
h3 { font-size: 20px; line-height: 1.3; font-weight: 500; }
p { margin: 0; }
.lede { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.5; color: var(--ink-2); }

.mono { font-family: var(--font-mono); }

.rule {
  height: 1px;
  background: var(--rule);
  width: 100%;
}

/* ——— Hero ——— */
.hero {
  position: relative;
  padding: 80px 0 120px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
}
.hero h1 span.accent {
  font-style: italic;
  font-weight: 400;
  color: var(--bronze-2);
}
.hero .lede { margin-top: 28px; max-width: 46ch; }
.hero-meta {
  margin-top: 40px;
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-4);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hero-meta div strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-family: var(--font-sans);
  text-transform: none;
  letter-spacing: -0.01em;
  margin-top: 4px;
  font-weight: 500;
}

.hero-canvas-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 560px;
  justify-self: end;
  width: 100%;
}
@media (max-width: 960px) {
  .hero-canvas-wrap { justify-self: center; max-width: 480px; }
}
.hero-canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.hero-canvas-frame {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 1px solid color-mix(in oklab, var(--rule) 70%, transparent);
}
.hero-canvas-frame::before,
.hero-canvas-frame::after {
  content: "";
  position: absolute;
  width: 10px; height: 10px;
  border: 1px solid var(--bronze-2);
}
.hero-canvas-frame::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.hero-canvas-frame::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }

.canvas-caption {
  position: absolute;
  bottom: -28px;
  left: 0;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-4);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.canvas-caption em {
  color: var(--bronze-2);
  font-style: normal;
}

/* Telemetry ticker strip */
.ticker {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 18px 0;
  overflow: hidden;
  background: color-mix(in oklab, var(--bg-2) 80%, transparent);
}
.ticker-track {
  display: flex;
  gap: 56px;
  white-space: nowrap;
  animation: tickerSlide 42s linear infinite;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ticker-track span b {
  color: var(--ink);
  font-weight: 500;
}
.ticker-track span i {
  color: var(--bronze-2);
  font-style: normal;
}
@keyframes tickerSlide {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ——— What this is ——— */
.whatis {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 64px;
}
@media (max-width: 860px) {
  .whatis { grid-template-columns: 1fr; gap: 28px; }
}
.whatis p + p { margin-top: 18px; }
.whatis .body { max-width: 62ch; font-size: 19px; line-height: 1.55; color: var(--ink-2); }
.whatis .body em {
  color: var(--bronze-2);
  font-style: normal;
  border-bottom: 1px dashed color-mix(in oklab, var(--bronze-2) 50%, transparent);
}

/* ——— How it works ——— */
.howitworks {
  background: var(--bg-2);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.how-header {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 64px;
  margin-bottom: 72px;
}
@media (max-width: 860px) {
  .how-header { grid-template-columns: 1fr; gap: 20px; margin-bottom: 40px; }
}
.how-stages {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--rule);
  background: var(--bg);
}
@media (max-width: 860px) {
  .how-stages { grid-template-columns: 1fr; }
}
.stage {
  padding: 28px 26px 32px;
  border-right: 1px solid var(--rule);
  position: relative;
  min-height: 200px;
}
.stage:last-child { border-right: none; }
@media (max-width: 860px) {
  .stage { border-right: none; border-bottom: 1px solid var(--rule); }
  .stage:last-child { border-bottom: none; }
}
.stage-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--bronze-2);
  letter-spacing: 0.1em;
}
.stage h3 { margin-top: 14px; margin-bottom: 8px; font-size: 17px; font-weight: 500; }
.stage p { font-size: 14px; color: var(--ink-3); line-height: 1.5; }

.parade-wrap {
  margin-top: 48px;
  padding: 36px;
  background: var(--bg);
  border: 1px solid var(--rule);
  position: relative;
}
@media (max-width: 720px) {
  .parade-wrap { padding: 20px; }
}
.parade-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-4);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.parade-label i { color: var(--bronze-2); font-style: normal; }

.parade-canvas {
  width: 100%;
  height: 340px;
  display: block;
}
@media (max-width: 720px) {
  .parade-canvas { height: 260px; }
}

/* ——— Benchmarks ——— */
.bench {
  display: grid;
  grid-template-columns: minmax(360px, 440px) 1fr;
  gap: 80px;
  align-items: start;
}
@media (max-width: 860px) {
  .bench { grid-template-columns: 1fr; gap: 28px; }
}
.bench-intro h2 { font-size: clamp(28px, 3.4vw, 44px); line-height: 1.08; }
.bench-intro p { max-width: 40ch; color: var(--ink-3); font-size: 14px; margin-top: 18px; }

.bench-bars { display: flex; flex-direction: column; gap: 40px; }
.bar-row {
  display: grid;
  grid-template-columns: 180px 1fr 120px;
  gap: 18px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
}
@media (max-width: 720px) {
  .bar-row { grid-template-columns: 1fr; gap: 6px; }
}
.bar-row .label { letter-spacing: 0.04em; }
.bar-row .label b {
  display: block;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}
.bar-track {
  position: relative;
  height: 14px;
  background: color-mix(in oklab, var(--rule) 60%, transparent);
  overflow: hidden;
}
.bar-fill {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--bronze-3), var(--bronze-2));
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 1.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.bar-fill.ours { background: linear-gradient(90deg, var(--bronze), var(--ember)); }
.bar-row .value {
  text-align: right;
  font-size: 14px;
  color: var(--ink);
}
.bar-row .value b { font-weight: 500; }
.bar-row .value i { color: var(--ink-4); font-style: normal; font-size: 11px; }

.bench-split {
  margin-top: 72px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--rule);
}
@media (max-width: 720px) {
  .bench-split { grid-template-columns: 1fr; }
}
.bench-cell {
  padding: 40px 36px;
  border-right: 1px solid var(--rule);
}
.bench-cell:last-child { border-right: none; background: color-mix(in oklab, var(--bronze) 8%, var(--bg)); }
@media (max-width: 720px) {
  .bench-cell { border-right: none; border-bottom: 1px solid var(--rule); }
  .bench-cell:last-child { border-bottom: none; }
}
.bench-cell .cell-eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.bench-cell .big-num {
  font-size: clamp(44px, 6vw, 72px);
  letter-spacing: -0.03em;
  font-weight: 400;
  margin-top: 12px;
  line-height: 1;
}
.bench-cell .big-num em {
  font-style: normal;
  color: var(--bronze-2);
  font-family: var(--font-mono);
  font-size: 0.5em;
  margin-left: 6px;
  letter-spacing: 0;
}
.bench-cell .compare {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.03em;
}
.bench-cell .compare s { color: var(--ink-4); text-decoration-thickness: 1px; }

/* ——— Use cases ——— */
.cases {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 56px;
}
@media (max-width: 860px) { .cases { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .cases { grid-template-columns: 1fr; } }
.case {
  border: 1px solid var(--rule);
  padding: 28px 24px 32px;
  background: var(--bg);
  position: relative;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.case:hover {
  border-color: var(--bronze);
  background: color-mix(in oklab, var(--bronze) 4%, var(--bg));
}
.case-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--bronze-2);
  letter-spacing: 0.1em;
}
.case h3 { margin-top: 16px; font-size: 19px; font-weight: 500; }
.case p { margin-top: 10px; font-size: 14px; line-height: 1.55; color: var(--ink-3); }
.case .example {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--rule);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-3);
  line-height: 1.5;
}
.case .example b { color: var(--ink); font-weight: 500; }

/* Sovereign callout */
.sovereign {
  margin-top: 56px;
  padding: 48px 40px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: center;
}
@media (max-width: 860px) {
  .sovereign { grid-template-columns: 1fr; padding: 32px 24px; }
}
.sovereign h3 { color: var(--bg); font-size: clamp(22px, 2.4vw, 30px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; }
.sovereign p { color: color-mix(in oklab, var(--bg) 75%, var(--ink-4)); font-size: 14.5px; margin-top: 14px; max-width: 52ch; line-height: 1.55; }
.sovereign .eyebrow { color: var(--bronze-3); }
.sovereign .eyebrow::before { background: var(--bronze-3); }
.sovereign .airgap-viz { font-family: var(--font-mono); font-size: 10px; color: color-mix(in oklab, var(--bg) 60%, transparent); line-height: 1.35; white-space: pre; letter-spacing: 0.02em; }

/* ——— Built by ——— */
.builtby {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 64px;
}
@media (max-width: 860px) { .builtby { grid-template-columns: 1fr; gap: 28px; } }
.people {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 620px) { .people { grid-template-columns: 1fr; } }
.person {
  border: 1px solid var(--rule);
  padding: 28px 26px 32px;
  background: var(--bg);
}
.person .avatar {
  width: 56px; height: 56px;
  border: 1px solid var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
  background: var(--bg-2);
}
.person h3 { font-size: 20px; font-weight: 500; }
.person .role {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--bronze-2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.person .cv {
  margin-top: 18px;
  font-size: 14px;
  color: var(--ink-3);
  line-height: 1.55;
}
.person .cv li {
  list-style: none;
  padding: 8px 0;
  border-top: 1px dashed var(--rule);
}
.person .cv li:first-child { border-top: none; padding-top: 0; }

/* Contact block */
.contact {
  margin-top: 56px;
  padding: 48px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 64px;
}
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; gap: 20px; } }
.contact h3 { font-size: clamp(24px, 3vw, 36px); font-weight: 500; letter-spacing: -0.02em; max-width: 22ch; line-height: 1.15; }
.contact p { margin-top: 14px; color: var(--ink-3); font-size: 15px; }
.contact a.email {
  display: inline-block;
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--bronze-2);
  transition: color 0.2s;
}
.contact a.email:hover { color: var(--bronze-2); }

/* Footer */
footer {
  padding: 48px 0 64px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-4);
  letter-spacing: 0.06em;
}
footer .foot-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
footer .foot-signoff {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  padding: 12px 0 0;
}
footer .foot-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-4);
  line-height: 1.7;
  text-transform: none;
  max-width: 64ch;
}
footer .flourish {
  margin: 28px 0;
  height: 32px;
  width: 100%;
  opacity: 0.55;
}

/* Utility */
.hide-on-mobile { }
@media (max-width: 720px) { .hide-on-mobile { display: none !important; } }

/* ——— Surface heads (I / II) ——— */
.surface-head {
  margin-top: 64px;
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 28px;
  align-items: start;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
}
@media (max-width: 720px) {
  .surface-head { grid-template-columns: 1fr; gap: 14px; }
}
.surface-mark {
  font-family: var(--font-mono);
  font-size: 44px;
  line-height: 1;
  color: var(--bronze-2);
  letter-spacing: -0.02em;
  font-feature-settings: "ss01" on;
}
.surface-title {
  margin-top: 14px;
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  max-width: 24ch;
}
.surface-sub {
  margin-top: 18px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 60ch;
}

/* ——— Race demo ——— */
.race-wrap {
  margin-top: 48px;
  margin-bottom: 56px;
  border: 1px solid var(--rule);
  background: var(--bg);
  padding: 36px 36px 40px;
}
@media (max-width: 720px) { .race-wrap { padding: 24px 18px 28px; } }
.race-caption {
  margin-bottom: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 860px) {
  .race-caption { grid-template-columns: 1fr; gap: 18px; }
}
.race-caption h4 {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.race-caption p {
  margin-top: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-3);
  max-width: 64ch;
}

.sap-race { width: 100%; }
.sr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 860px) {
  .sr-grid { grid-template-columns: 1fr; }
}

/* Single race frame */
.sr-frame {
  border: 1px solid var(--rule);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: border-color 0.4s, box-shadow 0.4s;
}
.sr-frame.is-winner {
  border-color: var(--bronze);
  box-shadow: 0 0 0 1px var(--bronze) inset, 0 8px 32px -16px color-mix(in oklab, var(--bronze) 50%, transparent);
}
.sr-frame-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--rule);
  background: color-mix(in oklab, var(--bg-2) 50%, var(--bg));
}
.sr-frame-label {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}
.sr-frame-label strong { color: var(--ink); font-weight: 500; }
.sr-frame-label .sr-sub { color: var(--ink-4); margin-left: 6px; }
.sr-dot {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block;
}
.sr-clock {
  font-family: var(--font-mono);
  display: flex; align-items: baseline; gap: 4px;
  font-variant-numeric: tabular-nums;
}
.sr-clock-num { font-size: 22px; font-weight: 500; color: var(--ink); letter-spacing: -0.01em; }
.sr-clock-unit { font-size: 12px; color: var(--ink-4); }

/* Browser chrome inside frame */
.sr-browser {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.sr-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: color-mix(in oklab, var(--bg-3) 60%, var(--bg));
  border-bottom: 1px solid var(--rule);
}
.sr-tl {
  width: 9px; height: 9px; border-radius: 50%;
  background: color-mix(in oklab, var(--ink-4) 40%, var(--bg));
}
.sr-url {
  margin-left: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-4);
  letter-spacing: 0.01em;
  flex: 1;
  text-align: center;
  padding: 4px 12px;
  background: var(--bg);
  border: 1px solid var(--rule);
}

/* Faux SAP screen */
.sr-screen {
  position: relative;
  background: #f4ecd8;
  min-height: 240px;
  padding: 0;
}
.sr-toolbar {
  display: flex;
  gap: 18px;
  padding: 8px 16px;
  background: linear-gradient(#e6d9b8, #d9c89a);
  border-bottom: 1px solid #b89e6a;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: #5a4520;
  letter-spacing: 0.04em;
}
.sr-fields {
  padding: 18px 18px 12px;
  display: grid;
  gap: 8px;
}
.sr-field {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: center;
  gap: 12px;
  padding: 6px 10px;
  background: #fbf5e3;
  border: 1px solid #c8b485;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  transition: background 0.3s, border-color 0.3s;
}
.sr-field label {
  color: #7a6440;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 9.5px;
}
.sr-field-val {
  color: var(--ink);
  font-size: 11.5px;
}
.sr-field.is-found {
  background: #fdf9ec;
}
.sr-field-payment.is-focus {
  border-color: var(--bronze);
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--bronze) 25%, transparent);
}
.sr-field-payment.is-edited .sr-field-val s {
  color: var(--ink-4);
  text-decoration-thickness: 1px;
  margin-right: 6px;
}
.sr-field-payment.is-edited .sr-field-val b {
  color: var(--bronze-2);
  font-weight: 600;
}
.sr-savebar {
  margin: 4px 18px 18px;
  padding: 8px 12px;
  background: #ebdcb0;
  border: 1px solid #b89e6a;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: #6a4f1a;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.sr-savebar.is-saved {
  background: color-mix(in oklab, #2f7a3f 90%, transparent);
  color: #f4ecd8;
  border-color: #1f5a2c;
}

/* Cursor */
.sr-cursor {
  position: absolute;
  width: 18px; height: 18px;
  pointer-events: none;
  transform: translate(-2px, -2px);
  transition: left 0.18s linear, top 0.18s linear;
  z-index: 5;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.35));
}
.sr-cursor.is-clicking {
  transform: translate(-2px, -2px) scale(0.92);
}
.sr-ripple {
  position: absolute;
  left: 50%; top: 50%;
  width: 6px; height: 6px;
  border-radius: 50%;
  border: 2px solid var(--bronze);
  transform: translate(-50%, -50%);
  animation: sr-ripple 0.5s ease-out;
}
@keyframes sr-ripple {
  0% { width: 4px; height: 4px; opacity: 1; }
  100% { width: 36px; height: 36px; opacity: 0; }
}

/* Phase strip */
.sr-phasestrip {
  border-top: 1px solid var(--rule);
  padding: 10px 14px 12px;
  background: color-mix(in oklab, var(--bg-2) 35%, var(--bg));
}
.sr-phaselabel {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-4);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.sr-phasebars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.sr-phasebar {
  position: relative;
  height: 22px;
  background: color-mix(in oklab, var(--rule) 70%, transparent);
  overflow: hidden;
}
.sr-phasebar::before {
  content: "";
  position: absolute; inset: 0;
  width: var(--p, 0%);
  background: var(--accent-bg, color-mix(in oklab, var(--bronze) 18%, transparent));
  transition: width 0.2s linear;
}
.sr-phasebar.done::before {
  width: 100%;
  background: var(--accent, var(--bronze));
  opacity: 0.85;
}
.sr-phasebar.active::before {
  background: var(--accent, var(--bronze));
}
.sr-phasebar-label {
  position: relative;
  z-index: 1;
  display: block;
  padding: 4px 8px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--ink);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 14px;
  mix-blend-mode: multiply;
}
.sr-phasebar.done .sr-phasebar-label,
.sr-phasebar.active .sr-phasebar-label {
  color: var(--bg);
  mix-blend-mode: normal;
}

/* Readout below the race */
.sr-readout {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--rule);
}
@media (max-width: 720px) { .sr-readout { grid-template-columns: 1fr; } }
.sr-readout-cell {
  padding: 18px 22px;
  border-right: 1px solid var(--rule);
}
.sr-readout-cell:last-child { border-right: none; }
@media (max-width: 720px) {
  .sr-readout-cell { border-right: none; border-bottom: 1px solid var(--rule); }
  .sr-readout-cell:last-child { border-bottom: none; }
}
.sr-r-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-4);
  margin-bottom: 12px;
}
.sr-r-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-3);
  padding: 4px 0;
}
.sr-r-row b {
  color: var(--ink);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
