/* /tests/ — the tests home. Builds on /tests/take.css (same tokens, header, buttons). */
.th-main{max-width:760px}
.th-hero{text-align:center;padding:14px 0 6px}
.th-hero h1{font-family:var(--tk-fd);font-weight:600;color:var(--ink);font-size:clamp(28px,5.4vw,42px);line-height:1.1;letter-spacing:-.02em;margin:14px 0 10px}
.th-lede{max-width:520px;margin:0 auto;color:var(--ink-body);font-size:15.5px}
.th-who{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:16px}
.th-chip{display:inline-flex;align-items:center;gap:6px;max-width:100%;padding:6px 13px;border-radius:999px;background:var(--surface);border:1px solid var(--line);font-size:13px;color:var(--ink-body);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.th-chip b{color:var(--muted);font-weight:700;text-transform:uppercase;letter-spacing:.08em;font-size:11px}
.th-chip-l{color:var(--muted)}
/* filter */
.th-seg{display:flex;gap:4px;margin:26px auto 4px;padding:4px;border-radius:999px;background:var(--surface);border:1px solid var(--line);width:max-content;max-width:100%}
.th-seg button{appearance:none;border:0;background:none;border-radius:999px;min-height:38px;padding:0 16px;font-weight:700;font-size:14px;color:var(--muted);cursor:pointer;display:inline-flex;align-items:center;gap:7px}
.th-seg button i{font-style:normal;font-size:12px;min-width:20px;height:20px;border-radius:10px;background:var(--surface-3);color:var(--ink-body);display:inline-flex;align-items:center;justify-content:center;padding:0 6px}
.th-seg button.on{background:var(--ink);color:var(--bg)}
.th-seg button.on i{background:color-mix(in srgb,var(--bg) 22%,transparent);color:var(--bg)}
/* test cards */
.th-list{display:grid;gap:14px;margin-top:18px}
.th-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--tk-r);padding:20px 22px;box-shadow:var(--tk-sh);position:relative;overflow:hidden}
.th-card::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--line-strong)}
.th-todo::before{background:var(--brand)}.th-progress::before{background:var(--gold)}.th-done::before{background:var(--tk-ok)}
.th-c-top{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.th-pill{font-size:12px;font-weight:800;padding:4px 10px;border-radius:999px;letter-spacing:.02em}
.th-pill.ok{background:var(--brand-soft);color:var(--brand)}
.th-pill.warn{background:var(--gold-soft);color:var(--gold)}
.th-pill.done{background:var(--ok-soft,rgba(30,154,107,.12));color:var(--tk-ok)}
.th-pill.mute{background:var(--surface-3);color:var(--muted)}
.th-lv{font-size:12px;color:var(--muted);font-weight:700;text-transform:uppercase;letter-spacing:.08em;margin-left:auto}
.th-card h2{font-family:var(--tk-fd);font-weight:600;font-size:clamp(18px,3.4vw,21px);color:var(--ink);line-height:1.25;letter-spacing:-.01em;margin:12px 0 6px}
.th-meta{margin:0;color:var(--ink-body);font-weight:700;font-size:14.5px;display:flex;flex-wrap:wrap;gap:8px}
.th-meta span{color:var(--muted)}
.th-sub{margin:4px 0 0;color:var(--muted);font-size:13.5px}
.th-c-f{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:16px;flex-wrap:wrap}
.th-c-f .th-sub{margin:0}
.th-c-f .tk2-btn{min-width:170px}
.th-c-f .tk2-btn svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.th-c-f span.tk2-btn{color:var(--muted);cursor:default;border-style:dashed}
@media(max-width:520px){.th-card{padding:18px 16px 18px 18px}.th-c-f .tk2-btn{width:100%}.th-c-f .th-sub:empty{display:none}}
.th-score{display:flex;align-items:center;gap:10px;margin-top:14px;padding:10px 12px;border-radius:12px;background:var(--surface-2);font-size:13.5px;color:var(--muted);flex-wrap:wrap}
.th-score b{color:var(--ink);font-size:15px}
.th-bar{flex:1 1 90px;height:8px;border-radius:5px;background:var(--surface-3);overflow:hidden;display:block;min-width:60px}
.th-bar i{display:block;height:100%;border-radius:5px;background:linear-gradient(90deg,var(--brand),var(--gold))}
.th-none{text-align:center;color:var(--muted);padding:30px 0}
/* results */
.th-sec{margin-top:38px}
.th-h2{font-family:var(--tk-fd);font-weight:600;font-size:18px;color:var(--ink);margin:0 0 4px}
.th-res{padding:4px 20px}
.th-r{display:grid;grid-template-columns:1fr auto;gap:6px 14px;align-items:center;padding:14px 0;border-top:1px solid var(--line)}
.th-r:first-child{border-top:0}
.th-r-m b{display:block;color:var(--ink);font-size:15px;line-height:1.35}
.th-r-m small,.th-r-s small{color:var(--muted);font-size:12.5px}
.th-r-s{text-align:right}.th-r-s b{display:block;color:var(--ink);font-family:var(--tk-fd);font-weight:600}
.th-r-a{grid-column:1/-1;display:flex;gap:8px;flex-wrap:wrap}
.th-board{grid-column:1/-1;background:var(--surface-2);border-radius:12px;padding:12px 14px}
.th-board ol{margin:10px 0 0;padding-left:22px}
.th-board li{display:flex;justify-content:space-between;gap:10px;padding:4px 0}
.th-board li.me{color:var(--brand);font-weight:700}
.th-board small{color:var(--muted)}
.th-opt{display:flex;gap:8px;align-items:flex-start;font-size:13.5px;cursor:pointer}
/* level & badges */
.th-prog{margin-top:18px;padding:0}
.th-prog summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:14px;padding:16px 20px}
.th-prog summary::-webkit-details-marker{display:none}
.th-lvl{width:52px;height:52px;border-radius:14px;background:var(--gold-soft);color:var(--gold);display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:10.5px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;flex:0 0 auto}
.th-lvl b{font-family:var(--tk-fd);font-size:20px;line-height:1}
.th-prog-m{flex:1;min-width:0;color:var(--muted);font-size:13.5px}
.th-prog-m b{color:var(--ink)}
.th-prog-m .th-bar{margin-top:8px}
.th-chev{font-size:20px;color:var(--muted);transition:transform .2s}
.th-prog[open] .th-chev{transform:rotate(180deg)}
.th-prog > .th-sub{padding:0 20px}
.th-badges{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px;padding:14px 20px 20px}
.th-badge{border:1px solid var(--line);border-radius:14px;padding:12px;opacity:.5}
.th-badge.on{opacity:1;border-color:color-mix(in srgb,var(--gold) 45%,transparent);background:var(--gold-soft)}
.th-badge i{font-style:normal;color:var(--gold);font-size:18px}
.th-badge b{display:block;color:var(--ink);font-size:14px;margin-top:2px}
.th-badge small{color:var(--muted);font-size:12px;line-height:1.4;display:block}
/* empty / sign-in */
.th-empty{text-align:center;padding:36px 22px;margin-top:22px}
.th-gate{margin-top:60px}
.th-empty-i{width:56px;height:56px;border-radius:16px;margin:0 auto 12px;background:var(--brand-soft);color:var(--brand);display:flex;align-items:center;justify-content:center}
.th-empty-i svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.th-empty h2{font-size:19px}
.th-empty p{color:var(--muted);margin:0 0 18px}
.th-empty .tk2-btn svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.th-btns{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}
.th-btns .tk2-btn{min-width:0}
@media(max-width:520px){.th-btns{width:100%}.th-btns .tk2-btn{flex:1 1 140px;justify-content:center}}
