/* Lab Pulse (/pulse): the lab landing page's look, with its own colour
   tokens. Every text colour here is a solid colour measured against the
   surface it sits on, in both themes (challenge/test/pulse.js holds 4.5:1). */
:root {
  --bg: #fbf7f0;
  --card: #ffffff;
  --stripe: #f8f5fc;
  --ink: #16131f;
  --muted: #57526a;
  --link: #5b21b6;
  --line: rgba(22, 19, 31, .12);
  --shadow: 0 1px 2px rgba(22,19,31,.05), 0 14px 40px -12px rgba(40, 30, 90, .18);
  --accent: #7c3aed;
  --accent2: #ec4899;
  --accent3: #f59e0b;
  --chip: #f1edf7;
  --chip-ink: #463f5c;
  --ok-bg: #dcfce7;
  --ok-ink: #14532d;
  --bad-bg: #fee2e2;
  --bad-ink: #8f1d1d;
  --warn-bg: #fef3c7;
  --warn-ink: #78350f;
  --run-bg: #e0e7ff;
  --run-ink: #312e81;
  --alert-bg: #fff1f2;
  --alert-line: #e11d48;
  --notice-bg: #fffbeb;
  --notice-line: #d97706;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #120f24;
    --card: #1c1834;
    --stripe: #221d3d;
    --ink: #f4f1ff;
    --muted: #bdb8d4;
    --link: #c4b5fd;
    --line: rgba(255, 255, 255, .11);
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 18px 50px -14px rgba(0,0,0,.6);
    --chip: #2c2748;
    --chip-ink: #dcd8ee;
    --ok-bg: #0f2e1d;
    --ok-ink: #86efac;
    --bad-bg: #3b1219;
    --bad-ink: #fecaca;
    --warn-bg: #362606;
    --warn-ink: #fde68a;
    --run-bg: #1e2350;
    --run-ink: #c7d2fe;
    --alert-bg: #3b1219;
    --alert-line: #fb7185;
    --notice-bg: #362606;
    --notice-line: #fbbf24;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #120f24; --card: #1c1834; --stripe: #221d3d; --ink: #f4f1ff; --muted: #bdb8d4; --link: #c4b5fd;
  --line: rgba(255, 255, 255, .11); --shadow: 0 1px 2px rgba(0,0,0,.3), 0 18px 50px -14px rgba(0,0,0,.6);
  --chip: #2c2748; --chip-ink: #dcd8ee; --ok-bg: #0f2e1d; --ok-ink: #86efac; --bad-bg: #3b1219; --bad-ink: #fecaca;
  --warn-bg: #362606; --warn-ink: #fde68a; --run-bg: #1e2350; --run-ink: #c7d2fe;
  --alert-bg: #3b1219; --alert-line: #fb7185; --notice-bg: #362606; --notice-line: #fbbf24;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
}
a { color: var(--link); text-underline-offset: 3px; }
a:focus-visible, .tbl:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
h1, h2 { font-family: "Space Grotesk", Inter, sans-serif; letter-spacing: -.03em; margin: 0; line-height: 1.08; }

.nav { max-width: 1160px; margin: 0 auto; padding: calc(18px + env(safe-area-inset-top)) 16px 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.logo { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 18px; text-decoration: none; color: var(--ink); }
.flask { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent2)); font-size: 20px; }
.nav-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; white-space: nowrap; }
.nav-link:hover { color: var(--ink); text-decoration: underline; }

main { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.hero { padding: 40px 0 8px; max-width: 820px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--muted); box-shadow: var(--shadow); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
.hero h1 { font-size: clamp(36px, 7vw, 64px); margin: 18px 0 14px; font-weight: 700; }
.hero h1::after { content: ""; display: block; width: 120px; height: 6px; margin-top: 16px; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent2), var(--accent3)); }
.lede { font-size: clamp(17px, 2.2vw, 19px); color: var(--muted); max-width: 660px; margin: 0; }
.fresh { margin: 16px 0 0; font-size: 15px; font-weight: 600; color: var(--muted); }
.fresh b { color: var(--ink); }

.banners { display: grid; gap: 12px; margin: 22px 0 0; max-width: 820px; }
.banner { margin: 0; padding: 16px 18px; border-radius: 18px; background: var(--alert-bg); color: var(--ink); border: 1px solid var(--alert-line); border-left-width: 6px; font-weight: 600; }
.banner.notice { background: var(--notice-bg); border-color: var(--notice-line); }
.banner b { display: block; font-family: "Space Grotesk", sans-serif; font-size: 18px; margin-bottom: 4px; }
.banner a { color: var(--ink); font-weight: 700; }
.banner .go { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; }
.banner .go a { display: inline-flex; align-items: center; min-height: 44px; }

.panel { margin: 30px 0 0; padding: 22px; border-radius: 26px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 14px; }
.panel h2 { font-size: clamp(24px, 4vw, 32px); }
.panel-head p { margin: 0; color: var(--muted); font-size: 14px; font-weight: 600; }
.panel-head p b { color: var(--ink); }
.panel-head p a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; vertical-align: middle; }

/* the five iPhone apps */
.ios { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ios li { display: grid; grid-template-columns: minmax(150px, 1.1fr) minmax(0, 1.3fr) minmax(0, 1.5fr) minmax(0, 1fr); gap: 10px 16px; align-items: center; padding: 12px 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); }
.ios .app b { display: block; font-size: 17px; }
.cell-label { display: none; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sub { display: block; font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 10px; border-radius: 10px; font-size: 14px; font-weight: 700; background: var(--chip); color: var(--chip-ink); text-decoration: none; line-height: 1.3; }
a.chip { min-height: 44px; }
a.chip:hover { text-decoration: underline; }
.chip.ok { background: var(--ok-bg); color: var(--ok-ink); }
.chip.bad { background: var(--bad-bg); color: var(--bad-ink); }
.chip.warn { background: var(--warn-bg); color: var(--warn-ink); }
.chip.running { background: var(--run-bg); color: var(--run-ink); }
.chip .mark { font-size: 15px; }
.ios .up a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }

/* the lab apps */
.ci-line { margin: 0 0 6px; font-weight: 600; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.note { margin: 0 0 14px; font-size: 14px; color: var(--muted); max-width: 820px; }
.note b { color: var(--ink); }
.tbl { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 16px; max-width: 100%; }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 760px; }
th, td { text-align: left; padding: 0 12px; height: 48px; border-bottom: 1px solid var(--line); white-space: nowrap; }
thead th { position: sticky; top: 0; background: var(--card); color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
tbody tr:nth-child(even) td { background: var(--stripe); }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.app a, td.app span.n { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 700; }
td.app a { color: var(--ink); }
td.app .e { width: 30px; height: 30px; border-radius: 9px; display: inline-grid; place-items: center; font-size: 16px; }
.est { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 1px 6px; border-radius: 6px; background: var(--chip); color: var(--chip-ink); }
.dim { color: var(--muted); }

.foot { max-width: 1160px; margin: 0 auto; padding: 30px 16px calc(40px + env(safe-area-inset-bottom)); color: var(--muted); font-size: 14px; }
.foot p { margin: 0 0 6px; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; }
.noscript { max-width: 820px; margin: 20px auto; padding: 0 16px; color: var(--ink); }

@media (max-width: 760px) {
  .panel { padding: 16px; border-radius: 22px; }
  .ios li { grid-template-columns: 1fr; gap: 8px; }
  .cell-label { display: block; margin-bottom: 2px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
