/* Home page only: the interactive lab. Shared tokens (--bg, --ink, --accent ...) come from
 * style.css; the ones below are the extra colours this page needs. contrast-check reads both
 * files, so every pair this page renders is measured in both themes. */
:root {
  --x-fail: #b42318;
  --x-fail-soft: #fdeceb;
  --x-pass: #067647;
  --x-pass-soft: #e5f5ec;
  --x-review: #8a5300;
  --x-review-soft: #fff3dd;
  --x-on-status: #ffffff;
  --x-hero: #0a1424;
  --x-hero-2: #101d33;
  --x-hero-line: #22324d;
  --x-hero-ink: #eef3fa;
  --x-hero-ink-2: #a6b6cc;
  --x-hero-accent: #8cc2f5;
  --x-shadow: 0 1px 2px rgba(13, 23, 38, .05), 0 10px 30px rgba(13, 23, 38, .07);
}
@media (prefers-color-scheme: dark) {
  :root {
    --x-fail: #f97a70;
    --x-fail-soft: #371613;
    --x-pass: #4fd08f;
    --x-pass-soft: #0e2a1d;
    --x-review: #f6b13c;
    --x-review-soft: #30220a;
    --x-on-status: #160a08;
    --x-hero: #060b14;
    --x-hero-2: #0c1628;
    --x-hero-line: #1c2a42;
    --x-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
  }
}
/* end tokens */

main.full { padding: 0; }
.x-home {
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
.x-home .sr-only, .sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.x-home :focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.x-home button { font: inherit; color: inherit; cursor: pointer; }
.x-mono { font-family: var(--mono); }
.x-js-only[hidden] { display: none !important; }

/* ---------- hero ---------- */
.x-hero {
  position: relative; color: var(--x-hero-ink); overflow: hidden; isolation: isolate;
  background:
    radial-gradient(700px circle at var(--mx, 72%) var(--my, 10%), rgba(84, 154, 232, .20), transparent 62%),
    radial-gradient(900px circle at 0% 100%, rgba(28, 93, 153, .35), transparent 60%),
    var(--x-hero);
}
.x-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .6;
  background-image: linear-gradient(var(--x-hero-line) 1px, transparent 1px), linear-gradient(90deg, var(--x-hero-line) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at 60% 30%, #000 10%, transparent 70%);
  mask-image: radial-gradient(ellipse at 60% 30%, #000 10%, transparent 70%);
}
.x-hero > .wrap { padding-top: 72px; padding-bottom: 72px; }
@media (min-width: 900px) { .x-hero > .wrap { padding-top: 104px; padding-bottom: 96px; } }
.x-hero :focus-visible { outline-color: var(--x-hero-accent); }
.x-toprow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.x-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--x-hero-ink-2); border: 1px solid var(--x-hero-line); background: rgba(255, 255, 255, .03); padding: 5px 12px 5px 9px; border-radius: 999px; margin: 0; }
.x-dot { width: 8px; height: 8px; border-radius: 50%; background: #4fd08f; animation: x-ping 2.2s infinite; }
@keyframes x-ping { 0% { box-shadow: 0 0 0 0 rgba(79, 208, 143, .55); } 80%, 100% { box-shadow: 0 0 0 9px rgba(79, 208, 143, 0); } }
.x-tools { margin-left: auto; display: flex; gap: 8px; }
.x-tool { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border: 1px solid var(--x-hero-line); background: rgba(255, 255, 255, .04); border-radius: 9px; font-size: 14px; color: var(--x-hero-ink-2); }
.x-tool:hover { color: var(--x-hero-ink); background: rgba(255, 255, 255, .08); }
.x-tool[aria-pressed="true"] { color: var(--x-hero-ink); border-color: var(--x-hero-accent); }
.x-kbd { font-family: var(--mono); font-size: 12px; border: 1px solid currentColor; border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; opacity: .8; }
.x-hero h1 { font-size: clamp(34px, 4.6vw, 54px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.08; margin: 28px 0 24px; max-width: 22ch; color: #fff; }
.x-rot { color: var(--x-hero-accent); display: inline-block; transition: opacity .35s, transform .35s; }
.x-rot.out { opacity: 0; transform: translateY(.3em); }
.x-hero .x-lede { font-size: 20px; line-height: 1.6; color: var(--x-hero-ink-2); max-width: 56ch; margin: 0; }
.x-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.x-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 11px; font-weight: 600; text-decoration: none; font-size: 16px; border: 1px solid transparent; transition: box-shadow .2s, background .2s; }
.x-btn-light { background: #fff; color: #0a1424; box-shadow: 0 8px 30px rgba(84, 154, 232, .35); }
.x-btn-light:hover { box-shadow: 0 0 0 4px rgba(140, 194, 245, .35), 0 8px 30px rgba(84, 154, 232, .45); }
.x-btn-glass { color: #fff; border-color: var(--x-hero-line); background: rgba(255, 255, 255, .04); }
.x-btn-glass:hover { background: rgba(255, 255, 255, .09); }
.x-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--x-hero-line); border: 1px solid var(--x-hero-line); border-radius: 14px; overflow: hidden; margin-top: 40px; }
@media (min-width: 760px) { .x-stats { grid-template-columns: repeat(4, 1fr); } }
.x-stat { background: var(--x-hero-2); padding: 24px 26px; }
.x-stat .x-big { display: block; font-size: 32px; font-weight: 600; letter-spacing: -0.02em; color: #fff; font-variant-numeric: tabular-nums; line-height: 1.2; }
.x-stat span { font-size: 14px; color: var(--x-hero-ink-2); }

/* ---------- live lab ---------- */
.x-lab { display: grid; grid-template-columns: 1fr; background: var(--bg); color: var(--ink); border-radius: 18px; overflow: hidden; box-shadow: var(--x-shadow); border: 1px solid var(--border); }
@media (min-width: 1100px) { .x-lab { grid-template-columns: 1fr 1.1fr 1fr; } }
.x-lab :focus-visible { outline-color: var(--accent); }
.x-col { padding: 24px; min-width: 0; }
.x-col + .x-col { border-top: 1px solid var(--border); }
@media (min-width: 1100px) { .x-col + .x-col { border-top: 0; border-left: 1px solid var(--border); } }
.x-colh { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-soft); font-weight: 600; }
.x-lab textarea { width: 100%; min-height: 320px; resize: vertical; border: 1px solid var(--border); background: var(--surface); color: var(--ink); border-radius: 12px; padding: 14px; font: 16px/1.75 var(--mono); }
.x-hint { font-size: 13px; color: var(--ink-soft); margin: 8px 0 0; }
.x-linkbtn { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; font-size: 13px; text-transform: none; letter-spacing: 0; }
.x-pv { border: 1px solid var(--border); border-radius: 12px; padding: 18px 18px 22px; min-height: 300px; background: var(--bg); font-size: 15px; }
.x-pv > * { position: relative; }
.x-pv-crumb { font-size: 12px; color: var(--ink-soft); margin-bottom: 6px; }
.x-pv-title { font-size: 23px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 12px; }
.x-pv-h1 { font-size: 22px; font-weight: 700; margin: 14px 0 6px; }
.x-pv-h2 { font-size: 19px; font-weight: 600; margin: 14px 0 6px; }
.x-pv-h3 { font-size: 17px; font-weight: 600; margin: 12px 0 4px; }
.x-pv-h4, .x-pv-h5, .x-pv-h6 { font-size: 15px; font-weight: 600; margin: 10px 0 4px; }
.x-pv-p { margin: 6px 0; }
.x-pv-a { color: var(--accent); text-decoration: underline; }
.x-pv-img { display: flex; align-items: center; gap: 10px; margin: 8px 0; padding: 10px; border-radius: 10px; background: linear-gradient(135deg, #cfe0f3, #e9d9f5); color: #2b3a52; font-size: 13px; }
.x-pv table { margin: 8px 0; font-size: 14px; }
.x-pv td, .x-pv th { border: 1px solid var(--border); padding: 5px 8px; font-size: 14px; text-transform: none; letter-spacing: 0; color: var(--ink); }
.x-pv th { background: var(--surface); font-weight: 600; }
.x-flag { outline: 2px solid var(--x-fail); outline-offset: 3px; border-radius: 4px; animation: x-flag .5s both; }
.x-flag.rv { outline-color: var(--x-review); }
.x-flag::after { content: attr(data-n); position: absolute; top: -11px; right: -11px; min-width: 21px; height: 21px; padding: 0 4px; border-radius: 11px; background: var(--x-fail); color: var(--x-on-status); font: 600 11px/21px var(--mono); text-align: center; box-shadow: 0 0 0 3px var(--bg); }
.x-flag.rv::after { background: var(--x-review); }
@keyframes x-flag { from { outline-offset: 12px; outline-color: transparent; } }
.x-glow { animation: x-glow 1.1s ease-out; }
@keyframes x-glow { 0% { background: var(--x-pass-soft); box-shadow: 0 0 0 6px var(--x-pass-soft); } 100% { background: transparent; box-shadow: 0 0 0 0 transparent; } }
.x-score { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); margin-bottom: 12px; }
.x-ring { width: 64px; height: 64px; flex: none; border-radius: 50%; display: grid; place-items: center; }
.x-ring > span { width: 50px; height: 50px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font: 600 17px var(--mono); }
.x-score-t { display: block; font-weight: 600; }
.x-score-s { font-size: 14px; color: var(--ink-soft); }
.x-findings { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.x-finding { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: start; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); animation: x-in .35s both; animation-delay: calc(var(--i, 0) * 60ms); margin: 0; }
@keyframes x-in { from { opacity: 0; transform: translateY(6px); } }
.x-n { width: 22px; height: 22px; border-radius: 50%; background: var(--x-fail); color: var(--x-on-status); font: 600 11px/22px var(--mono); text-align: center; }
.rv .x-n { background: var(--x-review); }
.x-finding .x-t { display: block; font-size: 14.5px; line-height: 1.35; font-weight: 600; }
.x-meta { font-size: 13px; color: var(--ink-soft); display: block; margin-top: 2px; }
.x-kind { font-weight: 600; color: var(--x-fail); }
.rv .x-kind { color: var(--x-review); }
.x-fixbtn { border: 1px solid var(--border); background: var(--surface); border-radius: 8px; padding: 4px 10px; font-size: 13px; font-weight: 600; }
.x-fixbtn:hover { border-color: var(--x-pass); color: var(--x-pass); }
.x-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.x-sbtn { min-height: 36px; padding: 0 14px; border-radius: 10px; font-weight: 600; font-size: 14px; border: 1px solid var(--border); background: var(--bg); }
.x-sbtn.solid { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.x-sbtn:disabled { opacity: .6; cursor: default; }
.x-clear { display: none; text-align: center; padding: 18px 8px; color: var(--x-pass); }
.x-clear.on { display: block; }
.x-clear path { stroke-dasharray: 60; stroke-dashoffset: 60; animation: x-draw .7s .1s forwards; }
@keyframes x-draw { to { stroke-dashoffset: 0; } }
.x-clear .x-t { display: block; font-weight: 600; }
.x-clear .x-s { color: var(--ink-soft); font-size: 14px; display: block; margin-top: 4px; }
.x-confetti { position: fixed; pointer-events: none; z-index: 80; width: 8px; height: 12px; border-radius: 2px; }

/* ---------- in plain words ---------- */
.x-basics { margin-top: 64px; border: 1px solid var(--x-hero-line); border-radius: 18px; background: rgba(255, 255, 255, .03); padding: 28px; }
@media (min-width: 900px) { .x-basics { padding: 36px 40px; } }
.x-hero .x-basics-h { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--x-hero-accent); margin: 0 0 22px; }
.x-basics-grid { display: grid; gap: 28px; }
@media (min-width: 700px) { .x-basics-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .x-basics-grid { grid-template-columns: repeat(4, 1fr); gap: 36px; } }
.x-hero .x-basic h3 { font-size: 18px; font-weight: 600; color: #fff; margin: 0 0 8px; }
.x-hero .x-basic p { font-size: 15.5px; line-height: 1.6; color: var(--x-hero-ink-2); margin: 0; }

/* ---------- lab section ---------- */
/* Narrow screens: the result sits right under the editor, the preview comes last. */
@media (max-width: 1099px) { .x-lab .x-col:nth-child(3) { order: 2; } .x-lab .x-col:nth-child(2) { order: 3; } }
@media (min-width: 700px) { .x-lab textarea { font-size: 14px; } }
/* Without JavaScript these two sections have nothing under their heading, so they stay out of the way. */
.x-js-off #contrast, .x-js-off #simulator { display: none; }
.x-revtag { font: 600 11px var(--mono); color: var(--x-review); border: 1px solid currentColor; border-radius: 6px; padding: 0 5px; margin-left: 4px; vertical-align: 1px; }
h2[tabindex="-1"]:focus { outline: none; }
h2[tabindex="-1"]:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.x-exbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.x-exname { font-weight: 600; font-size: 16px; }
.x-exbtns { display: flex; flex-wrap: wrap; gap: 10px; }
.x-exbtns .x-sbtn { min-height: 42px; padding: 0 18px; font-size: 15px; }
.x-fieldlabel { display: block; font-size: 13px; font-weight: 600; color: var(--ink-soft); margin: 0 0 6px; }
.x-titlein { width: 100%; height: 44px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); border-radius: 10px; padding: 0 14px; font: 600 16px "IBM Plex Sans", sans-serif; margin-bottom: 16px; }
.x-pv-none { color: var(--ink-soft); font-weight: 400; font-style: italic; }
.x-pv-li { display: flex; gap: 8px; margin: 4px 0 4px 6px; }
.x-pv-bul { color: var(--ink-soft); min-width: 1.2em; }
.x-howtext[hidden] { display: none; }
.x-howtext { display: block; margin-top: 6px; font-size: 13.5px; color: var(--ink); line-height: 1.5; }
.x-hint code { font-size: 12px; }

/* ---------- sections ---------- */
.x-block { padding: 72px 0; border-bottom: 1px solid var(--border); }
@media (min-width: 900px) { .x-block { padding: 120px 0; } }
.x-head { margin-bottom: 48px; max-width: 760px; }
.x-head h2 { font-size: clamp(28px, 3.4vw, 38px); font-weight: 600; letter-spacing: -0.022em; line-height: 1.12; margin: 16px 0 14px; }
.x-head p { color: var(--ink-soft); font-size: 18px; line-height: 1.65; margin: 0; }
.x-tag { display: inline-flex; align-items: center; font-family: var(--mono); font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 4px 11px; border-radius: 999px; }
.x-card { background: var(--bg); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--x-shadow); }
.x-small { font-size: 13px; color: var(--ink-soft); }

/* ---------- contrast lab ---------- */
.x-cx { display: grid; gap: 32px; }
@media (min-width: 900px) { .x-cx { grid-template-columns: 1.25fr 1fr; } }
.x-cx-prev { padding: 34px 28px; border-radius: 16px; border: 1px solid var(--border); min-height: 260px; display: flex; flex-direction: column; justify-content: center; gap: 12px; transition: background .25s, color .25s; }
.x-cx-prev .x-lbl { font: 13px var(--mono); color: inherit; margin: 0; }
.x-cx-prev .x-lg { font-size: 24px; line-height: 1.3; margin: 0; color: inherit; }
.x-cx-prev .x-nm { font-size: 16px; margin: 0; color: inherit; }
.x-cx-panel { padding: 28px; }
.x-ratio { display: flex; align-items: baseline; gap: 6px; }
.x-ratio .x-r { font-size: 64px; line-height: 1; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.x-ratio .x-u { font-size: 22px; color: var(--ink-soft); }
.x-meter { height: 8px; border-radius: 99px; background: var(--surface); margin: 14px 0 6px; position: relative; border: 1px solid var(--border); }
.x-meter .x-fill { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: linear-gradient(90deg, var(--x-fail), var(--x-review) 40%, var(--x-pass) 70%); transition: width .35s; }
.x-tick { position: absolute; top: -5px; width: 2px; height: 18px; background: var(--ink-soft); }
.x-tick small { position: absolute; top: 18px; left: -10px; font: 500 11px var(--mono); color: var(--ink-soft); }
.x-badges { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 32px 0 20px; }
.x-badge { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 9px 12px; border-radius: 10px; font-size: 14px; border: 1px solid var(--border); }
.x-badge .x-res { font: 700 12.5px var(--mono); }
.x-badge.ok { background: var(--x-pass-soft); } .x-badge.ok .x-res { color: var(--x-pass); }
.x-badge.no { background: var(--x-fail-soft); } .x-badge.no .x-res { color: var(--x-fail); }
.x-pickers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.x-picker label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-bottom: 4px; }
.x-picker .x-row { display: flex; gap: 6px; align-items: center; border: 1px solid var(--border); border-radius: 10px; padding: 4px; background: var(--surface); }
.x-picker input[type=color] { width: 34px; height: 30px; border: 0; padding: 0; background: none; border-radius: 6px; cursor: pointer; flex: none; }
.x-picker input[type=text] { width: 100%; min-width: 0; border: 0; background: transparent; font: 500 15px var(--mono); color: var(--ink); }
.x-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.x-chip { border: 1px solid var(--border); background: var(--bg); border-radius: 999px; padding: 4px 10px 4px 5px; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.x-chip .x-sw { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--border); flex: none; }
.x-chip[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* ---------- simulator ---------- */
.x-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.x-tab { border: 0; background: none; padding: 10px 14px; font-size: 15px; color: var(--ink-soft); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; }
.x-tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.x-tab:hover { color: var(--ink); }
.x-sim { display: grid; gap: 32px; }
@media (min-width: 900px) { .x-sim { grid-template-columns: 1.4fr 1fr; } }
.x-stage { position: relative; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); padding: 18px; overflow: hidden; min-height: 380px; }
.x-mock { background: #fff; color: #172b4d; border-radius: 12px; padding: 20px; box-shadow: 0 2px 10px rgba(0, 0, 0, .06); transition: filter .5s; font-size: 15px; }
.x-mock .x-mt { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 4px; color: #172b4d; }
.x-mock .x-upd { font-size: 13px; color: #a5adba; margin-bottom: 14px; transition: color .4s; }
.x-mock .x-status { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; font-size: 14px; }
.x-mock .x-status span { display: inline-flex; align-items: center; gap: 7px; }
.x-loz { display: inline-flex; align-items: center; height: 20px; min-width: 20px; border-radius: 4px; font: 700 11px sans-serif; letter-spacing: .03em; color: #fff; overflow: hidden; transition: padding .4s; }
.x-loz.g { background: #36b37e; } .x-loz.r { background: #de350b; }
.x-chart { display: flex; align-items: flex-end; gap: 10px; height: 120px; padding: 12px; border: 1px solid #dfe1e6; border-radius: 8px; margin-bottom: 6px; }
.x-chart i { flex: 1; border-radius: 4px 4px 0 0; }
.x-leg { display: flex; gap: 14px; font-size: 12.5px; color: #42526e; margin-bottom: 14px; }
.x-leg i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.x-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.x-form .x-fl { font-size: 13px; font-weight: 600; display: block; margin-bottom: 3px; color: #172b4d; }
.x-form .x-inp { height: 32px; border: 2px solid #dfe1e6; border-radius: 6px; }
.x-req { color: #de350b; }
.x-note { font-size: 13px; color: #42526e; margin-bottom: 12px; }
.x-note .x-l { color: #0052cc; text-decoration: underline; }
.x-embed { display: flex; align-items: center; gap: 10px; border: 1px dashed #b3bac5; border-radius: 8px; padding: 10px; font-size: 13px; color: #42526e; }
.x-stage.sr .x-mock { filter: blur(6px) grayscale(1) opacity(.25) !important; }
.x-sro { position: absolute; inset: 18px; display: none; align-items: flex-start; justify-content: center; padding-top: 10px; }
.x-stage.sr .x-sro { display: flex; }
.x-srbox { width: 100%; max-width: 440px; background: #0b1220; color: #e6edf7; border-radius: 14px; padding: 16px 18px; font: 500 14px/1.6 var(--mono); box-shadow: 0 20px 50px rgba(0, 0, 0, .4); }
.x-srbox .x-hd { display: flex; align-items: center; gap: 8px; color: #8fa3bf; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }
.x-srbox ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.x-srbox li { opacity: 0; transform: translateX(-6px); transition: opacity .3s, transform .3s; color: #e6edf7; margin: 0; }
.x-srbox li.on { opacity: 1; transform: none; }
.x-srbox li.bad { color: #ff9a90; } .x-srbox li.good { color: #7ee2ad; }
.x-srbox li::before { content: "\25B8  "; color: #7d91ad; }
.x-side { padding: 28px; display: grid; gap: 14px; align-content: start; }
.x-switch { display: flex; align-items: center; gap: 12px; border: 1px solid var(--border); background: var(--surface); border-radius: 12px; padding: 12px 14px; text-align: left; width: 100%; }
.x-track { width: 44px; height: 26px; border-radius: 99px; background: var(--border); position: relative; flex: none; transition: background .25s; }
.x-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .25s; }
.x-switch[aria-checked="true"] .x-track { background: var(--x-pass); }
.x-switch[aria-checked="true"] .x-track::after { transform: translateX(18px); }
.x-switch .x-t { display: block; font-weight: 600; font-size: 15px; }
.x-switch .x-s { font-size: 13px; color: var(--ink-soft); }
.x-explain h3 { margin: 0 0 6px; font-size: 18px; }
.x-explain p { color: var(--ink-soft); font-size: 15px; margin: 0; }
.x-rule { display: inline-block; margin-top: 10px; font: 500 12.5px var(--mono); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 4px 8px; color: var(--ink); }

/* ---------- coverage ---------- */
.x-covbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 18px; }
.x-seg { display: inline-flex; padding: 3px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; gap: 2px; }
.x-seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 9px; font-size: 14px; color: var(--ink-soft); }
.x-seg button[aria-pressed="true"] { background: var(--bg); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.x-covcount { font-family: var(--mono); font-size: 14px; color: var(--ink-soft); }
.x-cov { display: grid; gap: 32px; }
@media (min-width: 980px) { .x-cov { grid-template-columns: 1.5fr 1fr; } }
.x-prin { margin-bottom: 28px; }
.x-prin h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); margin: 0 0 8px; }
.x-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.x-tile { position: relative; text-align: left; border: 1px solid var(--border); background: var(--bg); border-radius: 12px; padding: 12px; display: grid; gap: 4px; min-height: 96px; transition: transform .2s, border-color .2s, opacity .3s, box-shadow .2s; }
.x-tile:hover { transform: translateY(-2px); box-shadow: var(--x-shadow); }
.x-tile[aria-expanded="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.x-tile .x-num { font: 600 17px var(--mono); }
.x-tile .x-nm { font-size: 13px; line-height: 1.3; color: var(--ink-soft); }
.x-tile .x-lv { position: absolute; top: 10px; right: 10px; font: 600 11px var(--mono); padding: 2px 6px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); }
.x-dots { display: flex; flex-wrap: wrap; gap: 3px; margin-top: auto; }
.x-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.x-tile.dim { opacity: .3; }
.x-detail { padding: 28px; position: sticky; top: 84px; align-self: start; }
.x-detail .x-dbig { font-size: 42px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; margin-top: 10px; }
.x-detail h3 { margin: 4px 0 0; font-size: 19px; }
.x-detail ul { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.x-detail li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; padding: 8px 10px; border-radius: 10px; background: var(--surface); margin: 0; animation: x-in .3s both; animation-delay: calc(var(--i, 0) * 40ms); }
.x-detail li code { display: block; background: none; border: 0; padding: 0; font: 500 12px var(--mono); color: var(--ink-soft); }
.x-ok { color: var(--x-pass); }

/* ---------- estimator ---------- */
.x-est { display: grid; gap: 32px; }
@media (min-width: 900px) { .x-est { grid-template-columns: 1fr 1.2fr; } }
.x-estin { padding: 28px; }
.x-estin label { font-weight: 600; display: block; margin-bottom: 10px; }
.x-estin input[type=range] { width: 100%; accent-color: var(--accent); height: 28px; }
.x-estnum { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.x-estnum input { width: 130px; height: 40px; border: 1px solid var(--border); border-radius: 10px; padding: 0 12px; font: 600 16px var(--mono); background: var(--surface); color: var(--ink); }
.x-estbig { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.x-estbig .x-r { font-size: 54px; font-weight: 600; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--x-fail); }
.x-estbig p { color: var(--ink-soft); margin: 8px 0 0; }
.x-estout { padding: 28px; display: grid; gap: 18px; align-content: start; }
.x-estout h3 { margin: 0; font-size: 18px; }
.x-bar { display: grid; gap: 6px; }
.x-bar .x-lb { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; }
.x-bar .x-lb span:last-child { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--ink-soft); white-space: nowrap; }
.x-trk { height: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 99px; overflow: hidden; }
.x-trk i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--accent); transition: width .8s cubic-bezier(.2, .8, .2, 1); }

/* ---------- story ---------- */
.x-story { display: grid; gap: 48px; }
@media (min-width: 900px) { .x-story { grid-template-columns: 1fr 1.1fr; } }
/* Inactive steps keep full contrast; only the rail and the number change. */
.x-step { padding: 26px 0 26px 28px; border-left: 2px solid var(--border); position: relative; transition: border-color .4s; }
@media (min-width: 900px) { .x-step { min-height: 44vh; display: flex; flex-direction: column; justify-content: center; } }
.x-step.on { border-left-color: var(--accent); }
.x-step .x-k { position: absolute; left: -15px; top: 28px; width: 28px; height: 28px; border-radius: 50%; background: var(--bg); border: 2px solid var(--border); display: grid; place-items: center; font: 600 13px var(--mono); transition: background .3s, border-color .3s, color .3s; }
@media (min-width: 900px) { .x-step .x-k { top: calc(50% - 14px); } }
.x-step.on .x-k { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.x-step h3 { font-size: 22px; font-weight: 600; letter-spacing: -0.015em; margin: 0 0 6px; }
.x-step p { color: var(--ink-soft); margin: 0; }
.x-device { position: sticky; top: 96px; align-self: start; padding: 16px; min-height: 340px; }
.x-chrome { display: flex; gap: 6px; margin-bottom: 12px; }
.x-chrome i { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.x-scene { display: none; animation: x-scene .45s both; }
.x-scene.on { display: block; }
@keyframes x-scene { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.x-mkt { display: flex; gap: 14px; align-items: center; padding: 16px; border: 1px solid var(--border); border-radius: 12px; }
.x-logo { width: 54px; height: 54px; border-radius: 12px; background: #1c5d99; display: grid; place-items: center; flex: none; }
.x-pill { display: inline-block; font-size: 12.5px; padding: 2px 8px; border-radius: 99px; background: var(--x-pass-soft); color: var(--x-pass); font-weight: 600; }
.x-pill.red { background: var(--x-fail-soft); color: var(--x-fail); }
.x-rows { display: grid; gap: 6px; margin-top: 12px; }
.x-rowi { display: grid; grid-template-columns: 1fr auto; gap: 10px; font-size: 14px; padding: 8px 10px; border-radius: 8px; background: var(--surface); }
.x-rowi .x-st { font-family: var(--mono); font-size: 13px; color: var(--ink-soft); }
.x-prog { height: 6px; background: var(--surface); border-radius: 99px; overflow: hidden; margin-top: 12px; }
.x-prog i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; }
.x-scene.on .x-prog i { animation: x-fillp 2.4s ease-out forwards; }
@keyframes x-fillp { to { width: 100%; } }
.x-grp { display: grid; grid-template-columns: 2.6rem 1fr auto; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: 12px; margin-top: 8px; font-size: 15px; }
.x-grp .x-cnt { font: 600 19px var(--mono); }
.x-grp small { display: block; color: var(--ink-soft); font-size: 12.5px; }
.x-report { border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.x-report .x-rr { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.x-report .x-rr:last-child { border-bottom: 0; }
.x-more { margin-top: 72px; }
.x-more h3 { margin-top: 0; }

/* ---------- prose sections ---------- */
.x-prose-block { padding: 88px 0 8px; }
.x-prose-block h2 { margin-top: 0; }

/* ---------- palette ---------- */
dialog.x-pal { width: min(620px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--border); border-radius: 16px; background: var(--bg); color: var(--ink); box-shadow: 0 40px 100px rgba(0, 0, 0, .45); margin-top: 12vh; }
dialog.x-pal::backdrop { background: rgba(6, 11, 20, .55); }
.x-palin { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.x-palin input { flex: 1; border: 0; background: none; font: inherit; font-size: 17px; color: var(--ink); outline: none; min-width: 0; }
.x-pallist { list-style: none; margin: 0; padding: 8px; max-height: 52vh; overflow: auto; }
.x-pallist li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-size: 15px; margin: 0; }
.x-pallist li small { color: var(--ink-soft); font-family: var(--mono); font-size: 12.5px; white-space: nowrap; }
.x-pallist li[aria-selected="true"] { background: var(--accent-soft); }
.x-palfoot { padding: 8px 16px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--ink-soft); display: flex; gap: 14px; }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .x-home *, .x-home *::before, .x-home *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
html[data-motion="off"] .x-home *, html[data-motion="off"] .x-home *::before, html[data-motion="off"] .x-home *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
.x-more .card h4 { margin: 0 0 8px; font-size: 18px; }
.x-tool { white-space: nowrap; }
.x-hint code { white-space: nowrap; }
@media (max-width: 700px) {
  .x-tools { margin-left: 0; }
  .x-tool .x-kbd { display: none; }
}
