/* Feature Lab — shared tokens and base styles. Sizes in rem; follows the system light/dark setting.
   Result colours are blue and vermilion with a neutral grey, not red and green: see docs/research. */
:root {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --sunk: #e9ebef;
  --ink: #12161c;
  --ink-2: #3d4653;
  --ink-3: #5f6b7a;
  --line: #d3d7de;
  --line-2: #e4e7ec;
  --treat: #0072b2;
  --treat-ink: #005f94;
  --treat-soft: #e1f0f9;
  --bad: #b34700;
  --bad-mark: #d55e00;
  --bad-soft: #fbeadf;
  --ok: #00735a;
  --ok-mark: #009e73;
  --ok-soft: #dff3ed;
  --wait: #6b5200;
  --wait-soft: #fbf3c4;
  --hi: #f0e442;
  --btn: #12161c;
  --btn-ink: #ffffff;
  --panel: #0e1116;
  --panel-2: #171b22;
  --panel-ink: #e6e9ee;
  --panel-dim: #9aa4b2;
  --panel-line: #2a303a;
  --panel-treat: #56b4e9;
  --panel-bad: #ff9d5c;
  --radius: .375rem;
  --shadow: 0 1px 2px rgba(18, 22, 28, .06), 0 6px 20px rgba(18, 22, 28, .07);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1116;
    --surface: #161a21;
    --sunk: #11151b;
    --ink: #e6e9ee;
    --ink-2: #b3bcc8;
    --ink-3: #8a94a3;
    --line: #2a303a;
    --line-2: #20252d;
    --treat: #56b4e9;
    --treat-ink: #56b4e9;
    --treat-soft: #12303f;
    --bad: #ff9d5c;
    --bad-mark: #e8742a;
    --bad-soft: #3a2112;
    --ok: #4fd1ae;
    --ok-mark: #2bb894;
    --ok-soft: #10322a;
    --wait: #f0e442;
    --wait-soft: #33300f;
    --btn: #e6e9ee;
    --btn-ink: #0e1116;
    --panel: #07090c;
    --panel-2: #11151b;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 20px rgba(0, 0, 0, .3);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1rem/1.55 var(--sans); }
h1, h2, h3 { font-weight: 700; line-height: 1.15; margin: 0; letter-spacing: -.02em; }
p { margin: 0; }
a { color: var(--treat-ink); text-underline-offset: .15em; }
code, .mono { font-family: var(--mono); font-size: .92em; }
:focus-visible { outline: .18rem solid var(--treat); outline-offset: .15rem; border-radius: .2rem; }
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }

.btn { display: inline-flex; align-items: center; gap: .4rem; font: inherit; font-weight: 600; cursor: pointer;
       padding: .6rem 1.1rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface);
       color: var(--ink); text-decoration: none; line-height: 1.2; }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--btn); border-color: var(--btn); color: var(--btn-ink); }
.btn.primary:hover { opacity: .88; }
.btn.small { padding: .32rem .65rem; font-size: .82rem; }
.btn.danger { color: var(--bad); }
.btn[disabled] { opacity: .5; cursor: default; }

.mark { display: inline-flex; align-items: center; gap: .55rem; font-weight: 700; font-size: 1.05rem;
        letter-spacing: -.01em; color: inherit; text-decoration: none; }
.mark svg { width: 1.5rem; height: 1.5rem; flex: none; }

/* state chips: always a word, and a shape in front of it, never colour alone */
.chip { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 600; line-height: 1;
        padding: .28rem .5rem; border-radius: .25rem; background: var(--sunk); color: var(--ink-2); white-space: nowrap;
        border: 1px solid var(--line); }
.chip.go { background: var(--treat-soft); color: var(--treat-ink); border-color: transparent; }
.chip.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.chip.wait { background: var(--wait-soft); color: var(--wait); border-color: transparent; }
.chip.go::before { content: "▶"; font-size: .6em; }
.chip.ok::before { content: "✓"; }
.chip.bad::before { content: "✕"; }
.chip.wait::before { content: "…"; }

/* interval plot: a zero line, an interval bar, and a dot at the estimate.
   Filled dot = interval excludes zero. Hollow dot = it does not. */
.plot { position: relative; height: 1.3rem; min-width: 8rem;
        background: linear-gradient(var(--plot-zero, var(--ink-3)), var(--plot-zero, var(--ink-3))) 50% 0 / 1px 100% no-repeat; }
.plot i { position: absolute; top: 50%; height: .16rem; margin-top: -.08rem; background: var(--plot-ns, var(--ink-3)); border-radius: 1px; }
.plot b { position: absolute; top: 50%; width: .62rem; height: .62rem; margin: -.31rem 0 0 -.31rem; border-radius: 50%;
          background: var(--plot-bg, var(--surface)); border: .14rem solid var(--plot-ns, var(--ink-3)); }
.plot.sig i { background: var(--plot-sig, var(--treat)); }
.plot.sig b { background: var(--plot-sig, var(--treat)); border-color: var(--plot-sig, var(--treat)); }

.demo-bar { background: var(--hi); color: #12161c; font-size: .82rem; text-align: center; padding: .35rem 1rem; }
.demo-bar a { color: inherit; }
