/* TestYard design system: slate neutrals, indigo brand, teal success. Fonts are self-hosted (public/fonts). */
@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/Inter-400.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url("/fonts/Inter-500.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/Inter-600.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/Inter-700.woff") format("woff"); }
@font-face { font-family: "Inter Display"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/InterDisplay-700.woff") format("woff"); }
@font-face { font-family: "Inter Display"; font-weight: 800; font-style: normal; font-display: swap; src: url("/fonts/InterDisplay-800.woff") format("woff"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/JetBrainsMono-400.woff") format("woff"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/JetBrainsMono-700.woff") format("woff"); }
:root {
  --bg: #f5f7fb; --surface: #ffffff; --surface-2: #edf1f8; --ink: #0f172a; --muted: #4b5a72; --line: #dbe2ee;
  --accent: #4338ca; --accent-ink: #ffffff; --accent-soft: #e8eaff; --accent-2: #0e7490; --accent-2-soft: #dcf4f8;
  --ok: #0f766e; --ok-soft: #d6f3ee; --warn: #92570a; --warn-soft: #fdf0d3; --bad: #b42318; --bad-soft: #fde7e4; --info: #1d4ed8; --info-soft: #e1eaff;
  --side: #0b1220; --side-ink: #e6ebf5; --side-muted: #93a0b8; --side-line: #1c2740; --side-hover: #16213a; --side-field: #121b30;
  --code-bg: #0b1220; --code-ink: #e6ebf5;
  --radius: 10px; --shadow: 0 1px 2px rgba(15,23,42,.05), 0 10px 30px -14px rgba(15,23,42,.22);
  --display: "Inter Display", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: var(--display);
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0a0f1d; --surface: #111a2e; --surface-2: #18233b; --ink: #e8edf7; --muted: #a3b2cd; --line: #263451;
  --accent: #9aa2ff; --accent-ink: #0a0f1d; --accent-soft: #1d2552; --accent-2: #4cc9e0; --accent-2-soft: #10303a;
  --ok: #3dd6b5; --ok-soft: #0f2e2a; --warn: #f1b24a; --warn-soft: #2f2410; --bad: #ff8a80; --bad-soft: #351a1a; --info: #7db0ff; --info-soft: #14213d;
  --side: #070b16; --side-line: #151e33; --side-hover: #121b30; --side-field: #0e1629; --code-bg: #070b16; --shadow: 0 10px 30px -14px rgba(0,0,0,.7);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0f1d; --surface: #111a2e; --surface-2: #18233b; --ink: #e8edf7; --muted: #a3b2cd; --line: #263451;
    --accent: #9aa2ff; --accent-ink: #0a0f1d; --accent-soft: #1d2552; --accent-2: #4cc9e0; --accent-2-soft: #10303a;
    --ok: #3dd6b5; --ok-soft: #0f2e2a; --warn: #f1b24a; --warn-soft: #2f2410; --bad: #ff8a80; --bad-soft: #351a1a; --info: #7db0ff; --info-soft: #14213d;
    --side: #070b16; --side-line: #151e33; --side-hover: #121b30; --side-field: #0e1629; --code-bg: #070b16; --shadow: 0 10px 30px -14px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.6 var(--sans); -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
h1, h2, h3 { font-family: var(--display); line-height: 1.18; margin: 0 0 .5em; letter-spacing: -.022em; font-weight: 700; }
h1 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 800; letter-spacing: -.03em; }
h2 { font-size: 1.3rem; } h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; } a { color: var(--accent); }
code, kbd, pre { font-family: var(--mono); font-size: .88em; }
code { background: var(--surface-2); padding: .1em .4em; border-radius: 5px; }
kbd { background: var(--surface-2); border: 1px solid var(--line); border-bottom-width: 2px; padding: .05em .45em; border-radius: 5px; }
pre { background: var(--code-bg); color: var(--code-ink); border: 1px solid var(--side-line); padding: 14px 16px; border-radius: var(--radius); overflow: auto; margin: 0; max-height: 380px; line-height: 1.5; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

/* layout */
.shell { display: grid; grid-template-columns: 276px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--side); color: var(--side-ink); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; border-right: 1px solid var(--side-line); z-index: 40; }
.brand { display: flex; gap: 11px; align-items: center; padding: 18px 18px 14px; text-decoration: none; color: inherit; }
.brand b { font-family: var(--display); font-size: 1.25rem; letter-spacing: -.02em; display: block; line-height: 1; }
.brand small { color: var(--side-muted); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.brand-mark { width: 36px; height: 36px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; font-size: 1.1rem; }
.search { padding: 0 14px 10px; }
.search input[type=search] { width: 100%; background: var(--side-field); color: var(--side-ink); border: 1px solid var(--side-line); border-radius: 8px; padding: 8px 11px; font: inherit; font-size: .88rem; }
.search input[type=search]::placeholder { color: var(--side-muted); }
#nav { overflow-y: auto; flex: 1; padding: 4px 10px 16px; scrollbar-width: thin; scrollbar-color: #2b3753 transparent; }
.grp { margin-top: 6px; }
.grp > button { all: unset; box-sizing: border-box; cursor: pointer; width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 8px 8px; color: var(--side-muted); font: 600 .7rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; border-radius: 6px; }
.grp > button:hover { color: var(--side-ink); }
.grp > button:focus-visible { outline: 2px solid var(--accent); }
.grp > button .chev { transition: transform .15s; font-size: .8rem; } .grp.closed > button .chev { transform: rotate(-90deg); }
.grp.closed ul { display: none; }
.grp ul { list-style: none; margin: 0; padding: 0; }
.grp li a { display: flex; align-items: center; gap: 9px; padding: 6px 10px; border-radius: 7px; color: #c3cde0; text-decoration: none; font-size: .9rem; }
.grp li a:hover { background: var(--side-hover); color: #fff; }
.grp li a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.dot { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid #4a5875; flex: none; }
.dot.done { background: var(--ok); border-color: var(--ok); }
.side-foot { padding: 12px 18px; border-top: 1px solid var(--side-line); display: flex; justify-content: space-between; font-size: .76rem; color: var(--side-muted); }
.side-foot a { color: var(--side-muted); }
.linkish { background: none; border: 0; color: var(--side-muted); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }
.scrim { display: none; }
.main-col { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 12px; padding: 12px 28px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 30; }
.crumbs { flex: 1; color: var(--muted); font-size: .85rem; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.icon-btn { background: var(--surface); border: 1px solid var(--line); color: var(--ink); width: 36px; height: 36px; border-radius: 9px; cursor: pointer; font-size: 1rem; }
.menu-btn { display: none; }
.pill { font: 600 .72rem var(--mono); padding: 5px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.pill.up { color: var(--ok); background: var(--ok-soft); border-color: transparent; } .pill.down { color: var(--bad); background: var(--bad-soft); border-color: transparent; }
main { padding: 30px 28px 80px; max-width: 1120px; width: 100%; margin: 0 auto; outline: none; }

/* page frame */
.eyebrow { font: 700 .72rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.page-head { margin-bottom: 22px; } .page-head p { color: var(--muted); max-width: 70ch; font-size: 1.04rem; }
.tasks { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 0 16px; margin-bottom: 22px; }
.tasks summary { cursor: pointer; padding: 12px 0; font-weight: 600; } .tasks ul { margin: 0 0 14px; padding-left: 20px; color: var(--muted); } .tasks li { margin: 3px 0; }
.stage { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; box-shadow: var(--shadow); }
.stage + .stage { margin-top: 18px; }
.stage > h2:first-child, .stage > h3:first-child { margin-top: 0; }
.page-foot { margin-top: 20px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* controls */
.btn { font: 600 .9rem var(--sans); padding: 9px 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; transition: transform .05s, background .15s; }
.btn:hover:not(:disabled) { background: var(--surface-2); } .btn:active:not(:disabled) { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); } .btn.primary:hover:not(:disabled) { filter: brightness(1.07); background: var(--accent); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: var(--accent-ink); } .btn.sm { padding: 5px 10px; font-size: .8rem; }
.btn.ghost { background: transparent; } .btn:disabled { opacity: .5; cursor: not-allowed; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; } .row.end { justify-content: flex-end; } .stack > * + * { margin-top: 14px; }
.grid { display: grid; gap: 16px; } .g2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); } .g3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field > label, .label { font-weight: 600; font-size: .86rem; }
.hint { color: var(--muted); font-size: .8rem; } .err { color: var(--bad); font-size: .8rem; min-height: 0; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=date], input[type=month], input[type=time], input[type=search], input[type=url], select, textarea, .input {
  font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; width: 100%; }
textarea { resize: vertical; min-height: 80px; } select[multiple] { padding: 6px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: 2px solid var(--accent-soft); }
[aria-invalid="true"] { border-color: var(--bad) !important; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 17px; height: 17px; margin: 0; }
.check { display: flex; align-items: center; gap: 9px; padding: 4px 0; cursor: pointer; } .check.disabled { opacity: .55; cursor: not-allowed; }
.switch { position: relative; width: 44px; height: 24px; display: inline-block; flex: none; }
.switch input { opacity: 0; position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 2; }
.switch i { position: absolute; inset: 0; background: var(--line); border-radius: 99px; transition: .15s; }
.switch i::after { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .15s; }
.switch input:checked + i { background: var(--accent); } .switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type=range] { width: 100%; accent-color: var(--accent); }
.tag { display: inline-block; font: 600 .72rem var(--mono); padding: 3px 8px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.tag.ok { background: var(--ok-soft); color: var(--ok); } .tag.bad { background: var(--bad-soft); color: var(--bad); } .tag.warn { background: var(--warn-soft); color: var(--warn); } .tag.info { background: var(--info-soft); color: var(--info); } .tag.acc { background: var(--accent-soft); color: var(--accent); }
.alert { padding: 11px 14px; border-radius: 9px; border: 1px solid transparent; font-size: .92rem; }
.alert.ok { background: var(--ok-soft); color: var(--ok); } .alert.bad { background: var(--bad-soft); color: var(--bad); } .alert.warn { background: var(--warn-soft); color: var(--warn); } .alert.info { background: var(--info-soft); color: var(--info); }
.result { margin-top: 14px; } .muted { color: var(--muted); } .mono { font-family: var(--mono); } .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

/* tables */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
thead th { background: var(--surface-2); font-weight: 600; position: sticky; top: 0; } tbody tr:last-child td { border-bottom: 0; } tbody tr:hover { background: var(--surface-2); }
th.sortable { cursor: pointer; user-select: none; } th.sortable:hover { color: var(--accent); }
.pager { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.pager button { min-width: 34px; } .pager button[aria-current="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* home */
.hero { padding: 26px 0 30px; } .hero h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); max-width: 18ch; } .hero h1 em { color: var(--accent); font-style: normal; }
.hero p { font-size: 1.12rem; color: var(--muted); max-width: 58ch; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; text-decoration: none; color: inherit; display: block; transition: transform .12s, border-color .12s; }
.card:hover { transform: translateY(-2px); border-color: var(--accent); } .card h3 { margin-bottom: 6px; } .card p { color: var(--muted); font-size: .9rem; margin: 0 0 10px; }
.bar { height: 7px; background: var(--surface-2); border-radius: 99px; overflow: hidden; } .bar > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .3s; }
.stat { display: flex; gap: 26px; flex-wrap: wrap; margin: 18px 0 8px; } .stat b { font: 800 2rem var(--display); display: block; letter-spacing: -.03em; } .stat span { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }

/* widgets */
#toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 200; max-width: min(380px, calc(100vw - 36px)); }
.toast { background: var(--ink); color: var(--bg); padding: 11px 14px; border-radius: 9px; box-shadow: 0 10px 30px -10px rgba(0,0,0,.5); font-size: .9rem; animation: pop .18s ease-out; }
.toast.ok { border-left: 4px solid var(--ok); } .toast.bad { border-left: 4px solid var(--bad); } .toast.warn { border-left: 4px solid var(--warn); }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }
.modal-back { position: fixed; inset: 0; background: rgba(10,10,14,.55); display: grid; place-items: center; z-index: 150; padding: 16px; }
.modal { background: var(--surface); border-radius: 14px; padding: 24px; width: min(460px, 100%); box-shadow: 0 30px 80px -20px rgba(0,0,0,.6); }
.dropzone { border: 2px dashed var(--line); border-radius: 12px; padding: 28px; text-align: center; color: var(--muted); transition: .15s; }
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.drag-item { padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: grab; user-select: none; }
.drag-item.dragging { opacity: .4; } .drop-target { min-height: 90px; border: 2px dashed var(--line); border-radius: 12px; padding: 12px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: center; color: var(--muted); }
.drop-target.over { border-color: var(--accent); background: var(--accent-soft); } .drop-target.filled { border-style: solid; border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.menu { position: absolute; z-index: 60; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; box-shadow: var(--shadow); padding: 5px; min-width: 170px; }
.menu button { all: unset; box-sizing: border-box; display: block; width: 100%; padding: 7px 10px; border-radius: 6px; cursor: pointer; } .menu button:hover, .menu button:focus-visible { background: var(--accent-soft); }
.tabs [role=tablist] { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; flex-wrap: wrap; }
.tabs [role=tab] { background: none; border: 0; padding: 9px 14px; cursor: pointer; font: 600 .9rem var(--sans); color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs [role=tab][aria-selected=true] { color: var(--accent); border-color: var(--accent); }
.acc-item { border: 1px solid var(--line); border-radius: 9px; margin-bottom: 8px; overflow: hidden; } .acc-item > button { all: unset; box-sizing: border-box; width: 100%; padding: 12px 14px; cursor: pointer; font-weight: 600; display: flex; justify-content: space-between; } .acc-item > div { padding: 0 14px 14px; color: var(--muted); }
.scroll-box { height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 12px; position: relative; }
.tip { position: relative; display: inline-block; } .tip > .bubble { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 6px 10px; border-radius: 7px; font-size: .8rem; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .12s; }
.tip:hover > .bubble, .tip:focus-within > .bubble { opacity: 1; }
.spinner { width: 20px; height: 20px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; vertical-align: middle; } @keyframes spin { to { transform: rotate(360deg); } }
.hold-btn { position: relative; overflow: hidden; } .hold-btn i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent-soft); z-index: 0; } .hold-btn span { position: relative; z-index: 1; }
.cal { position: absolute; z-index: 40; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; box-shadow: var(--shadow); width: 290px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; } .cal-grid button { all: unset; box-sizing: border-box; cursor: pointer; padding: 7px 0; border-radius: 7px; font-size: .85rem; } .cal-grid button:hover { background: var(--accent-soft); } .cal-grid button.sel { background: var(--accent); color: var(--accent-ink); } .cal-grid span { font-size: .72rem; color: var(--muted); padding: 4px 0; }
.shop-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--surface); display: flex; flex-direction: column; gap: 6px; } .shop-card .emoji { font-size: 2.6rem; background: var(--surface-2); border-radius: 10px; text-align: center; padding: 12px 0; }
.steps { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; } .steps li { list-style: none; padding: 5px 12px; border-radius: 99px; background: var(--surface-2); color: var(--muted); font-size: .82rem; font-weight: 600; } .steps li.on { background: var(--accent); color: var(--accent-ink); } .steps li.done { background: var(--ok-soft); color: var(--ok); }
.fixed-menu { position: sticky; top: 0; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 8px; display: flex; gap: 14px; z-index: 5; } .fixed-menu a { color: inherit; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .side { transform: none; } body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 35; }
  .menu-btn { display: inline-block; } main { padding: 22px 16px 70px; } .top { padding: 10px 16px; }
}
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

a.btn { text-decoration: none; display: inline-block; color: var(--ink); } a.btn.primary { color: var(--accent-ink); }
.icon-btn { font-size: 1.15rem; line-height: 1; }

/* ---- Flaky & dynamic labs (fl-*, dl-*) ---- */
.fl-jump { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.fl-scenario > h2 { margin-bottom: .2em; }
.fl-cover-wrap { position: relative; display: inline-block; padding: 14px 18px; border: 1px dashed var(--line); border-radius: 10px; }
.fl-overlay { position: absolute; inset: 0; background: rgba(23,24,28,.74); color: #fff; display: grid; place-items: center; border-radius: 10px; font-weight: 600; z-index: 5; }
.fl-overlay[hidden], .fl-banner[hidden], .dl-overlay[hidden], .dl-skel-wrap[hidden] { display: none; }
.fl-track { position: relative; height: 58px; border: 1px dashed var(--line); border-radius: 10px; overflow: hidden; }
.fl-mover { position: absolute; left: 0; top: 10px; animation: fl-slide 3s ease-in-out infinite alternate; }
.fl-track.fl-paused .fl-mover { animation-play-state: paused; }
@keyframes fl-slide { from { left: 0; } to { left: calc(100% - 130px); } }
.fl-toast { display: inline-block; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; font-weight: 600; }
.fl-cookie-area { position: relative; min-height: 170px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; padding: 14px; }
.fl-cookie-area .fl-continue { position: absolute; left: 14px; bottom: 10px; }
.fl-banner { position: absolute; left: 0; right: 0; bottom: 0; background: var(--ink); color: var(--bg); padding: 12px 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; z-index: 5; }
.fl-grid { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 10px; }
.fl-dot { width: 12px; height: 12px; border-radius: 3px; background: var(--ok); }
.fl-dot.bad { background: var(--bad); }
.fl-fade { opacity: 0; transition: opacity .8s ease; padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.fl-fade.on { opacity: 1; }
.fl-tour { background: var(--info-soft); color: var(--info); border: 1px solid var(--info); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }

.dl-skel { display: block; height: 14px; border-radius: 6px; margin: 8px 0; background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: dl-shimmer 1.2s ease infinite; }
@keyframes dl-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.dl-bar { height: 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.dl-bar > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .25s linear; }
.dl-overlay-wrap { position: relative; display: inline-block; padding: 16px 20px; border: 1px dashed var(--line); border-radius: 10px; min-width: 220px; }
.dl-overlay { position: absolute; inset: 0; background: color-mix(in srgb, var(--bg) 72%, transparent); display: grid; place-items: center; z-index: 5; border-radius: 10px; font-weight: 600; }
.dl-overlay.dl-invisible { background: transparent; color: transparent; }
.dl-list { list-style: none; margin: 0; padding: 0; }
.dl-list li { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.dl-opts { position: absolute; z-index: 20; left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; box-shadow: var(--shadow); list-style: none; margin: 4px 0 0; padding: 4px; }
.dl-opts[hidden] { display: none; }
.dl-opts li { padding: 7px 10px; border-radius: 6px; cursor: pointer; }
.dl-opts li[aria-selected="true"], .dl-opts li:hover { background: var(--accent-soft); }

/* ---- Locator Lab (lab-*) ---- */
.lab-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 18px; align-items: start; }
.lab-side { position: sticky; top: 64px; max-height: calc(100vh - 90px); overflow: auto; padding-right: 4px; }
.lab-side .row select { flex: 1; min-width: 0; padding: 6px 8px; }
.lab-progress { margin: 8px 0; color: var(--muted); font-size: .8rem; }
.lab-cat { font: 700 .68rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: 14px 0 4px; }
.lab-item { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border-radius: 7px; cursor: pointer; font-size: .88rem; }
.lab-item:hover { background: var(--surface-2); } .lab-item.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.lab-item:focus-visible { outline: 2px solid var(--accent); } .lab-it { flex: 1; } .lab-item .dot { border-color: var(--muted); } .lab-lvl { color: var(--muted); font-size: .65rem; letter-spacing: -1px; }
.lab-main { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.lab-goal { font-size: 1.02rem; margin: 6px 0 10px; }
.lab-frame-host { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.lab-frame { display: block; width: 100%; height: 280px; border: 0; background: #fff; }
.lab-input { min-height: 56px; resize: vertical; font-size: .92rem; }
.lab-bench { display: flex; flex-direction: column; gap: 10px; }
.lab-try { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lab-kind { display: flex; flex-wrap: wrap; gap: 6px; min-height: 24px; }
.lab-notes-wrap, .lab-notes { margin: 0; padding: 0; list-style: none; } .lab-notes li { padding: 7px 10px; border-left: 3px solid var(--warn); background: var(--warn-soft); border-radius: 6px; margin-bottom: 6px; font-size: .88rem; }
.lab-notes li.ok { border-color: var(--ok); background: var(--ok-soft); } .lab-notes li.bad { border-color: var(--bad); background: var(--bad-soft); }
.lab-matches { margin: 0; padding-left: 22px; font-size: .8rem; max-height: 220px; overflow: auto; } .lab-matches code { white-space: pre-wrap; word-break: break-all; }
.lab-sug, .lab-sol { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.lab-sug li, .lab-sol li { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .lab-sug code, .lab-sol code { flex: 1 1 260px; word-break: break-all; }
.lab-picks { border-top: 1px dashed var(--line); padding-top: 12px; }
@media (max-width: 900px) { .lab-layout { grid-template-columns: 1fr; } .lab-side { position: static; max-height: 320px; } }

/* --- dynamic-lab additions (dl-) --- */
.dl-item { padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); margin-bottom: 8px; } .dl-item h4 { margin: 0 0 2px; font: 600 .95rem var(--sans); } .dl-item p { margin: 0; font-size: .85rem; }
.dl-lazy-ph { height: 140px; width: 320px; max-width: 100%; display: grid; place-items: center; border: 2px dashed var(--line); border-radius: 10px; color: var(--muted); }
.dl-opt { padding: 8px 12px; border: 1px solid var(--line); border-radius: 7px; margin-bottom: 4px; cursor: pointer; background: var(--surface); } .dl-opt:hover, .dl-opt:focus-visible { background: var(--accent-soft); }

/* ---- Home page (hm-*) ---- */
main:has(.hm-hero) { max-width: 1180px; }
.hm-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 36px; align-items: center; padding: 34px 34px 30px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 20px;
  background: radial-gradient(900px 340px at 0% -10%, var(--accent-soft), transparent 60%), radial-gradient(700px 320px at 110% 110%, var(--accent-2-soft), transparent 60%), var(--surface); box-shadow: var(--shadow); }
.hm-hero h1 { font-size: clamp(2.1rem, 4.2vw, 3.2rem); max-width: 16ch; margin-bottom: .4em; } .hm-hero h1 em { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hm-hero p { font-size: 1.02rem; }
.hm-hero .eyebrow { display: inline-block; padding: 4px 10px; border-radius: 99px; background: var(--accent-soft); letter-spacing: .08em; }
.hm-qs { background: var(--code-bg); color: var(--code-ink); border: 1px solid var(--side-line); border-radius: 14px; overflow: hidden; box-shadow: 0 24px 50px -24px rgba(15,23,42,.55); min-width: 0; }
.hm-qs-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--side-line); } .hm-qs-head b { font-size: .86rem; }
.hm-tabs, .hm-path-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.hm-tabs button { background: transparent; border: 1px solid transparent; color: #aab6cd; border-radius: 8px; padding: 4px 10px; font: 600 .78rem var(--sans); cursor: pointer; }
.hm-tabs button:hover { color: #fff; } .hm-tabs button[aria-selected=true] { background: #1c2845; color: #fff; border-color: #2c3b61; }
.hm-qs-file { display: flex; justify-content: space-between; align-items: center; padding: 8px 14px 0; color: #93a0b8; font-size: .76rem; }
.hm-qs .btn { background: #16213a; color: #e6ebf5; border-color: #2c3b61; }
.hm-qs pre { border: 0; border-radius: 0; background: transparent; max-height: 250px; font-size: .78rem; padding: 10px 14px 14px; }
.hm-qs pre.hm-run { background: #0e1730; color: #8fe3d0; max-height: none; border-top: 1px solid var(--side-line); padding: 10px 14px; }
.hm-sec { margin-top: 54px; } .hm-sec > h2 { font-size: 1.55rem; margin-bottom: .35em; } .hm-sec > p.muted { max-width: 70ch; }
.hm-sec input[type=search] { max-width: 640px; padding: 12px 14px; font-size: 1rem; border-radius: 12px; background: var(--surface); }
.hm-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.hm-chip { border: 1px solid var(--line); cursor: pointer; background: var(--surface); color: var(--ink); padding: 5px 12px; font-family: var(--sans); font-weight: 500; font-size: .82rem; } .hm-chip:hover { border-color: var(--accent); color: var(--accent); }
.hm-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-top: 6px; } .hm-results > p { grid-column: 1 / -1; margin: 4px 0; }
.hm-hit { display: flex; flex-direction: column; gap: 3px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-decoration: none; color: inherit; transition: border-color .12s, transform .12s; }
.hm-hit:hover { border-color: var(--accent); transform: translateY(-2px); } .hm-hit .eyebrow { margin: 0; font-size: .64rem; } .hm-hit .muted { font-size: .82rem; }
.hm-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 10px; }
.hm-step { position: relative; padding: 20px 18px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); } .hm-step h3 { margin: 10px 0 4px; } .hm-step p { margin: 0; font-size: .9rem; }
.hm-num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font: 700 .9rem var(--display); }
.hm-path-tabs { margin: 14px 0 6px; padding: 5px; background: var(--surface-2); border-radius: 12px; border: 1px solid var(--line); }
.hm-path-tabs button { background: transparent; border: 0; border-radius: 8px; padding: 7px 13px; font: 600 .86rem var(--sans); color: var(--muted); cursor: pointer; }
.hm-path-tabs button:hover { color: var(--ink); } .hm-path-tabs button[aria-selected=true] { background: var(--surface); color: var(--accent); box-shadow: 0 1px 3px rgba(15,23,42,.18); }
.hm-path { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; } .hm-path > p { margin-top: 0; }
.hm-steplist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.hm-steplist a { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); border: 1px solid transparent; } .hm-steplist a:hover { background: var(--surface-2); border-color: var(--line); }
.hm-tick { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line); font: 600 .75rem var(--mono); color: var(--muted); }
.hm-steplist li.on .hm-tick { background: var(--ok); border-color: var(--ok); color: var(--accent-ink); } .hm-steplist li.on b { text-decoration: none; color: var(--ok); }
.hm-feat { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 10px; }
.hm-feat-card { display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: 16px; text-decoration: none; color: inherit; border: 1px solid var(--line); background: linear-gradient(160deg, var(--surface), var(--surface-2)); transition: transform .12s, border-color .12s, box-shadow .12s; }
.hm-feat-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow); } .hm-feat-card h3 { margin: 6px 0 0; font-size: 1.15rem; } .hm-feat-card p { margin: 0; font-size: .9rem; flex: 1; } .hm-go { color: var(--accent); font-weight: 600; font-size: .86rem; margin-top: 6px; }
.hm-tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin-top: 10px; } .hm-tip { padding: 16px 18px; border-left: 3px solid var(--accent-2); background: var(--surface); border-radius: 0 12px 12px 0; border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); } .hm-tip h3 { margin: 0 0 4px; font-size: 1rem; } .hm-tip p { margin: 0; font-size: .9rem; }
.hm-faq { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin-bottom: 8px; padding: 0 16px; } .hm-faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; } .hm-faq[open] summary { color: var(--accent); } .hm-faq p { margin: 0 0 14px; }
.card { border-radius: 14px; } .card:hover { box-shadow: var(--shadow); }
@media (max-width: 980px) { .hm-hero { grid-template-columns: 1fr; padding: 24px 20px; } .hm-hero h1 { max-width: 20ch; } }
