/* Break the Field — input-testing challenge */
/* Theme designed in the Testsigma look (teal + Inter). Not an official
   sponsorship — no "Supported by" label is shown anywhere in this game. */
#btf-wrapper {
    --btf-bg: #f8f8f6;
    --btf-surface: #ffffff;
    --btf-border: #e0e0dc;
    --btf-text: #1a1a18;
    --btf-muted: #555552;
    --btf-accent: #067E7B;
    --btf-accent-soft: #E0F4F3;
    --btf-accent-line: #bfe6e3;
    --btf-accent-bright: #0AB6B2;
    --btf-grad: linear-gradient(135deg, #0AB6B2, #09C0A1);
    /* secondary spice — warm coral */
    --btf-accent-2: #F4604B;
    --btf-accent-2-soft: #FFEDEA;
    --btf-accent-2-line: #FBCFC8;
    /* tertiary spice — electric violet */
    --btf-accent-3: #7C5CFC;
    --btf-accent-3-soft: #F0ECFF;
    --btf-accent-3-line: #D7CEFD;
    /* quaternary spice — warm amber (4th field) */
    --btf-accent-4: #E08A00;
    --btf-accent-4-soft: #FFF4E0;
    --btf-accent-4-line: #FBE0AE;
    /* multi-stop hero gradient */
    --btf-grad-multi: linear-gradient(110deg, #0AB6B2 0%, #09C0A1 35%, #F4604B 72%, #7C5CFC 100%);
    --btf-ok: #059669;
    --btf-ok-soft: #e7f6ef;
    --btf-err: #DC2626;
    --btf-warn: #D97706;

    background: var(--btf-bg);
    color: var(--btf-text);
    min-height: 80vh;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

#btf-wrapper * { box-sizing: border-box; }

.btf-screen { display: none; }
.btf-screen.on { display: block; }

.btf-wrap {
    max-width: 860px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
}

/* ---- intro ---- */
.btf-card {
    background: var(--btf-surface);
    border: 1px solid var(--btf-border);
    border-radius: 16px;
    padding: 2.25rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
    text-align: center;
}
.btf-kicker {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    font-weight: 800;
    color: #fff;
    background: var(--btf-grad-multi);
    background-size: 220% auto;
    padding: 0.35rem 0.85rem;
    border-radius: 99px;
    margin-bottom: 0.85rem;
    box-shadow: 0 4px 14px rgba(124, 92, 252, 0.28);
    animation: btf-shimmer 6s linear infinite;
}
.btf-card h1 { font-size: 2.3rem; font-weight: 800; margin: 0 0 0.75rem; letter-spacing: -0.02em; }
.btf-matchup {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 0.5rem;
    margin: 0 auto 1.4rem;
}
.btf-matchup-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 92px;
    padding: 0.7rem 0.9rem;
    background: var(--btf-accent-soft);
    border: 1px solid var(--btf-accent-line);
    border-radius: 12px;
}
.btf-matchup-stat b {
    font-size: 1.7rem;
    line-height: 1;
    color: var(--btf-accent);
    font-variant-numeric: tabular-nums;
}
.btf-matchup-stat span {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--btf-muted);
    margin-top: 0.3rem;
}
.btf-matchup-x { display: flex; align-items: center; color: var(--btf-muted); font-weight: 800; }
.btf-lead { color: var(--btf-muted); font-size: 1.05rem; max-width: 52ch; margin: 0 auto 1.5rem; line-height: 1.55; }
.btf-spec {
    text-align: left;
    background: var(--btf-accent-soft);
    border: 1px solid var(--btf-accent-line);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin: 0 auto 1.75rem;
    max-width: 60ch;
    font-size: 0.92rem;
    line-height: 1.6;
}
.btf-spec b { color: var(--btf-accent); }
.btf-byline { color: var(--btf-muted); font-size: 0.85rem; margin: 1.25rem 0 0; }
.btf-byline a { color: var(--btf-accent); text-decoration: none; font-weight: 600; }

/* ---- hero (cinematic intro) ---- */
.btf-hero { overflow: hidden; position: relative; isolation: isolate; }
/* animated colour-blobs glow behind the card */
.btf-hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: -40%; left: -20%;
    width: 70%; height: 80%;
    background: radial-gradient(circle at 30% 30%, rgba(10,182,178,0.22), transparent 60%),
                radial-gradient(circle at 70% 70%, rgba(124,92,252,0.18), transparent 60%);
    filter: blur(28px);
    animation: btf-blob 9s ease-in-out infinite alternate;
}
.btf-hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    bottom: -45%; right: -15%;
    width: 65%; height: 75%;
    background: radial-gradient(circle at 60% 40%, rgba(244,96,75,0.20), transparent 60%);
    filter: blur(30px);
    animation: btf-blob 11s ease-in-out infinite alternate-reverse;
}
@keyframes btf-blob {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(8%, 6%) scale(1.15); }
}
.btf-hero-title {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.02;
    margin: 0 0 0.6rem;
}
.btf-hero-line { display: block; }
.btf-hero-line-2 {
    background: var(--btf-grad-multi);
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--btf-accent);
    animation: btf-rise 0.5s cubic-bezier(.2,.8,.2,1) both, btf-shimmer 6s linear infinite 0.6s;
}
@keyframes btf-shimmer {
    to { background-position: 220% center; }
}
.btf-hero-line:not(.btf-hero-line-2) { animation: btf-rise 0.5s cubic-bezier(.2,.8,.2,1) both; }
@keyframes btf-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.btf-hero-tag {
    color: var(--btf-muted);
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0 auto 1.5rem;
    animation: btf-rise 0.5s 0.18s cubic-bezier(.2,.8,.2,1) both;
}
.btf-hero-stats { margin-bottom: 1.6rem; }
.btf-hero-stats .btf-matchup-stat {
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.btf-hero-stats .btf-matchup-stat b { transition: transform 0.2s ease; }
.btf-hero-stats .btf-matchup-stat:hover { transform: translateY(-4px); }
/* card 1 — teal (default), card 2 — coral, card 3 — violet */
.btf-hero-stats .btf-matchup-stat:nth-child(3) {
    background: var(--btf-accent-2-soft);
    border-color: var(--btf-accent-2-line);
}
.btf-hero-stats .btf-matchup-stat:nth-child(3) b { color: var(--btf-accent-2); }
.btf-hero-stats .btf-matchup-stat:nth-child(3):hover { box-shadow: 0 8px 18px rgba(244, 96, 75, 0.22); }
.btf-hero-stats .btf-matchup-stat:nth-child(5) {
    background: var(--btf-accent-3-soft);
    border-color: var(--btf-accent-3-line);
}
.btf-hero-stats .btf-matchup-stat:nth-child(5) b { color: var(--btf-accent-3); }
.btf-hero-stats .btf-matchup-stat:nth-child(5):hover { box-shadow: 0 8px 18px rgba(124, 92, 252, 0.22); }
.btf-hero-stats .btf-matchup-stat:nth-child(1):hover { box-shadow: 0 8px 18px rgba(10, 182, 178, 0.22); }

.btf-btn.btf-hero-cta {
    position: relative;
    font-size: 1.05rem;
    padding: 0.9rem 2.2rem;
    background: linear-gradient(120deg, #0AB6B2, #09C0A1 55%, #F4604B);
    background-size: 180% auto;
    color: #fff;
    box-shadow: 0 10px 24px rgba(10, 182, 178, 0.30);
    animation: btf-cta-pulse 2.4s ease-in-out infinite;
    transition: transform 0.12s ease, background-position 0.4s ease, box-shadow 0.2s ease;
}
.btf-btn.btf-hero-cta:hover {
    transform: translateY(-2px);
    background-position: 100% center;
    box-shadow: 0 14px 30px rgba(244, 96, 75, 0.32);
    filter: none;
}
@keyframes btf-cta-pulse {
    0%, 100% { box-shadow: 0 10px 24px rgba(10, 182, 178, 0.30); }
    50%      { box-shadow: 0 10px 32px rgba(124, 92, 252, 0.40); }
}
.btf-cta-arrow { display: inline-block; transition: transform 0.18s ease; }
.btf-hero-cta:hover .btf-cta-arrow { transform: translateX(3px); }

.btf-hero-foot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.1rem;
}
.btf-hero-foot-sep { color: var(--btf-border); }
.btf-hero-link {
    appearance: none;
    border: 0;
    background: none;
    color: var(--btf-accent);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.2rem 0.1rem;
}
.btf-hero-link:hover { text-decoration: underline; }
.btf-details-caret { display: inline-block; transition: transform 0.18s ease; font-size: 0.75em; }
.btf-hero-link.open .btf-details-caret { transform: rotate(180deg); }

.btf-details { margin-top: 1rem; animation: btf-rise 0.3s ease both; }
.btf-details .btf-spec { margin-bottom: 0; }

/* ---- how-it-works (carousel) ---- */
.btf-howto-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.btf-howto-back {
    appearance: none;
    border: 1px solid var(--btf-border);
    background: #f1f1ee;
    color: var(--btf-muted);
    border-radius: 8px;
    padding: 0.4rem 0.8rem;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}
.btf-howto-back:hover { background: #e7e7e3; }
.btf-howto-title { font-weight: 700; color: var(--btf-text); }

.btf-demo {
    background: var(--btf-accent-soft);
    border: 1px solid var(--btf-accent-line);
    border-radius: 14px;
    padding: 1.25rem 1rem 1rem;
    margin-bottom: 1.5rem;
}
.btf-demo-viewport { display: flex; align-items: center; gap: 0.5rem; }
.btf-demo-arrow {
    flex-shrink: 0;
    appearance: none;
    border: 1px solid var(--btf-accent-line);
    background: #fff;
    color: var(--btf-accent);
    width: 38px; height: 38px;
    border-radius: 50%;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}
.btf-demo-arrow:hover { background: var(--btf-accent); color: #fff; }
.btf-demo-arrow:active { transform: scale(0.94); }

.btf-demo-stage {
    position: relative;
    flex: 1;
    min-height: 168px;
    display: grid;
    place-items: center;
}
.btf-scene {
    position: absolute;
    inset: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none;
}
.btf-scene.on { opacity: 1; transform: none; pointer-events: auto; }

.btf-demo-caption {
    text-align: center;
    color: var(--btf-muted);
    font-size: 0.92rem;
    line-height: 1.5;
    margin: 1rem 0 0.9rem;
    min-height: 2.7em;
}
.btf-demo-caption strong { color: var(--btf-text); font-weight: 700; }
.btf-demo-caption b { color: var(--btf-accent); }

.btf-demo-dots { display: flex; justify-content: center; gap: 0.5rem; }
.btf-demo-dot {
    appearance: none;
    border: 0;
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--btf-accent-line);
    cursor: pointer;
    padding: 0;
    transition: width 0.2s ease, background 0.2s ease;
}
.btf-demo-dot.active { width: 24px; border-radius: 5px; background: var(--btf-accent); }

/* ---- demo: mini scene components ---- */
/* scene 1 — field tabs */
.btf-mini-tab {
    border: 1px solid var(--btf-border);
    background: #fff;
    color: var(--btf-muted);
    border-radius: 9px;
    padding: 0.55rem 0.9rem;
    font-size: 0.88rem;
    font-weight: 600;
}
.btf-scene-fields.run .btf-mini-tab.on {
    background: var(--btf-accent);
    border-color: var(--btf-accent);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 14px rgba(10, 182, 178, 0.3);
    transition: all 0.3s ease;
}

/* scene 2 — input + submit */
.btf-scene-input { flex-direction: column; }
.btf-mini-input-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; justify-content: center; }
.btf-mini-input {
    position: relative;
    display: inline-flex;
    align-items: center;
    background: #fafafa;
    border: 1px solid var(--btf-border);
    border-radius: 9px;
    padding: 0.65rem 3.6rem 0.65rem 0.85rem;
    min-width: 220px;
    font-family: var(--fm, ui-monospace, "SFMono-Regular", Menlo, monospace);
    font-size: 1rem;
}
.btf-scene-input.run .btf-mini-input { border-color: var(--btf-accent); box-shadow: 0 0 0 2px var(--btf-accent-soft); }
.btf-mini-typed { white-space: pre; color: var(--btf-text); }
.btf-mini-caret {
    width: 2px; height: 1.1em;
    background: var(--btf-accent);
    margin-left: 1px;
    animation: btf-blink 1s steps(1) infinite;
}
@keyframes btf-blink { 50% { opacity: 0; } }
.btf-mini-len {
    position: absolute;
    right: 0.55rem; top: 50%; transform: translateY(-50%);
    font-size: 0.7rem; color: var(--btf-muted);
    background: #eee; padding: 0.1rem 0.4rem; border-radius: 6px;
}
.btf-mini-submit {
    background: var(--btf-accent);
    color: #fff;
    border-radius: 9px;
    padding: 0.65rem 1.2rem;
    font-weight: 700;
    font-size: 0.95rem;
}
.btf-scene-input.run .btf-mini-submit { animation: btf-tap 0.5s ease; }
@keyframes btf-tap { 0%,100% { transform: scale(1); } 45% { transform: scale(0.92); } }

/* scene 3 — coverage bar + checks flipping */
.btf-scene-checks { flex-direction: column; align-items: stretch; gap: 0.7rem; width: 100%; max-width: 340px; }
.btf-mini-bar-wrap { display: flex; align-items: center; gap: 0.6rem; }
.btf-mini-bar { flex: 1; height: 10px; background: #fff; border: 1px solid var(--btf-accent-line); border-radius: 99px; overflow: hidden; }
.btf-mini-bar-fill { display: block; height: 100%; width: 8%; background: linear-gradient(90deg, var(--btf-accent), var(--btf-accent-bright)); border-radius: 99px; transition: width 0.9s cubic-bezier(.2,.8,.2,1); }
.btf-scene-checks.run .btf-mini-bar-fill { width: 86%; }
.btf-mini-bar-val { font-size: 0.78rem; font-weight: 700; color: var(--btf-accent); min-width: 2.6em; text-align: right; }
/* swap the 0% label for 86% once the scene runs (text node hidden, pseudo shown) */
.btf-scene-checks.run .btf-mini-bar-val { font-size: 0; }
.btf-scene-checks.run .btf-mini-bar-val::before { content: "86%"; font-size: 0.78rem; }

.btf-mini-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.btf-mini-check {
    display: flex; align-items: center; gap: 0.5rem;
    background: #fff;
    border: 1px solid var(--btf-border);
    border-radius: 8px;
    padding: 0.5rem 0.7rem;
    font-size: 0.85rem;
    color: #9a9a96;
}
.btf-mini-tick { display: none; color: var(--btf-ok); font-weight: 800; }
.btf-scene-checks.run .btf-mini-check {
    color: var(--btf-text);
    background: var(--btf-ok-soft);
    border-color: #bfe6d3;
    animation: btf-pop 0.35s ease both;
}
.btf-scene-checks.run .btf-mini-check:nth-child(2) { animation-delay: 0.15s; }
.btf-scene-checks.run .btf-mini-check:nth-child(3) { animation-delay: 0.3s; }
.btf-scene-checks.run .btf-mini-lock { display: none; }
.btf-scene-checks.run .btf-mini-tick { display: inline; }

@media (max-width: 560px) {
    .btf-hero-title { font-size: 2.3rem; }
    .btf-mini-input { min-width: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .btf-hero-line, .btf-hero-tag, .btf-details,
    .btf-scene, .btf-mini-caret,
    .btf-hero::before, .btf-hero::after,
    .btf-kicker, .btf-hero-line-2, .btf-btn.btf-hero-cta, .btf-score-num,
    .btf-scene-checks.run .btf-mini-check,
    .btf-scene-input.run .btf-mini-submit { animation: none; transition: none; }
    .btf-scene { transition: opacity 0.2s ease; transform: none; }
    .btf-mini-bar-fill { transition: none; }
}

/* ---- buttons ---- */
.btf-btn {
    appearance: none;
    border: 0;
    border-radius: 10px;
    padding: 0.8rem 1.6rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    touch-action: manipulation;
    transition: transform 0.08s ease, filter 0.15s ease, background 0.15s ease;
}
.btf-btn:active { transform: translateY(1px); }
.btf-btn--primary { background: var(--btf-accent); color: #fff; }
.btf-btn--primary:hover { filter: brightness(1.1); }
.btf-btn--ghost { background: transparent; color: var(--btf-accent); border: 1px solid var(--btf-accent); }

/* ---- top bar (coverage + done) ---- */
.btf-topbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--btf-surface);
    border: 1px solid var(--btf-border);
    border-radius: 14px;
    padding: 0.9rem 1.1rem;
    margin-bottom: 1.25rem;
}
/* scoreboard number */
.btf-score-board {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 1rem 0 0.25rem;
    border-right: 1px solid var(--btf-border);
    margin-right: 0.5rem;
}
.btf-score-board .btf-total-label { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.68rem; }
.btf-score-line { display: flex; align-items: baseline; gap: 0.15rem; font-variant-numeric: tabular-nums; line-height: 1; }
.btf-score-big {
    font-size: 2.1rem; font-weight: 800;
    background: var(--btf-grad-multi);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--btf-accent);
}
.btf-score-big.bump { animation: btf-bump 0.3s ease; }
@keyframes btf-bump { 0% { transform: scale(1); } 45% { transform: scale(1.18); } 100% { transform: scale(1); } }
.btf-score-sep, .btf-score-max { font-size: 1.05rem; font-weight: 700; color: var(--btf-muted); }

.btf-total { flex: 1; min-width: 120px; }
.btf-total-top { display: flex; justify-content: space-between; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.4rem; }
.btf-total-label { color: var(--btf-muted); }
.btf-total-num { color: var(--btf-accent); font-variant-numeric: tabular-nums; }
.btf-total-track { height: 12px; background: #eee; border-radius: 99px; overflow: hidden; }
.btf-total-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--btf-accent), var(--btf-accent-2) 55%, var(--btf-accent-3)); border-radius: 99px; transition: width 0.45s cubic-bezier(.4,0,.2,1); }
.btf-done-btn { white-space: nowrap; background: var(--btf-ok); color: #fff; }
.btf-done-btn:hover { filter: brightness(1.08); }

/* mute / icon button */
.btf-icon-btn {
    appearance: none;
    border: 1px solid var(--btf-border);
    background: #f1f1ee;
    border-radius: 10px;
    width: 42px; height: 42px;
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
    transition: background 0.15s ease, transform 0.08s ease;
}
.btf-icon-btn:hover { background: #e7e7e3; }
.btf-icon-btn:active { transform: translateY(1px); }
.btf-icon-btn.muted { opacity: 0.6; }

/* ---- tabs ---- */
.btf-tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: -1px; }
.btf-tab {
    appearance: none;
    border: 1px solid var(--btf-border);
    border-bottom: none;
    background: #f1f1ee;
    color: var(--btf-muted);
    padding: 0.65rem 1rem;
    border-radius: 10px 10px 0 0;
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.btf-tab.on { background: var(--btf-surface); color: var(--btf-text); position: relative; z-index: 2; }
/* active tab grows a coloured top bar, keyed to that field's accent */
.btf-tab.on::before {
    content: "";
    position: absolute;
    top: -1px; left: -1px; right: -1px;
    height: 3px;
    border-radius: 10px 10px 0 0;
    background: var(--btf-tab-accent, var(--btf-accent));
}
.btf-tab:nth-child(1) { --btf-tab-accent: var(--btf-accent);   --btf-tab-soft: var(--btf-accent-soft); }
.btf-tab:nth-child(2) { --btf-tab-accent: var(--btf-accent-2); --btf-tab-soft: var(--btf-accent-2-soft); }
.btf-tab:nth-child(3) { --btf-tab-accent: var(--btf-accent-3); --btf-tab-soft: var(--btf-accent-3-soft); }
.btf-tab:nth-child(4) { --btf-tab-accent: var(--btf-accent-4); --btf-tab-soft: var(--btf-accent-4-soft); }
.btf-tab.on { color: var(--btf-tab-accent, var(--btf-text)); }
.btf-tab-count {
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
    background: var(--btf-tab-soft, var(--btf-accent-soft));
    color: var(--btf-tab-accent, var(--btf-accent));
    padding: 0.1rem 0.45rem;
    border-radius: 99px;
}
.btf-tab.complete { color: var(--btf-ok); }
.btf-tab.complete .btf-tab-count { background: var(--btf-ok-soft); color: var(--btf-ok); }
.btf-tab.complete .btf-tab-name::after { content: ' ✓'; color: var(--btf-ok); font-weight: 800; }

/* ---- panels ---- */
.btf-panels {
    background: var(--btf-surface);
    border: 1px solid var(--btf-border);
    border-radius: 0 14px 14px 14px;
    padding: 1.5rem;
}
.btf-panel { display: none; }
.btf-panel.on { display: block; }
/* each panel inherits its field accent so the submit/focus/progress match the tab */
.btf-panel:nth-child(1) { --btf-fld-accent: var(--btf-accent);   --btf-fld-soft: var(--btf-accent-soft); }
.btf-panel:nth-child(2) { --btf-fld-accent: var(--btf-accent-2); --btf-fld-soft: var(--btf-accent-2-soft); }
.btf-panel:nth-child(3) { --btf-fld-accent: var(--btf-accent-3); --btf-fld-soft: var(--btf-accent-3-soft); }
.btf-panel:nth-child(4) { --btf-fld-accent: var(--btf-accent-4); --btf-fld-soft: var(--btf-accent-4-soft); }
.btf-field-hint { color: var(--btf-muted); font-size: 0.92rem; margin: 0 0 1.1rem; }

.btf-input-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem; }
.btf-input-label { font-weight: 700; font-size: 0.85rem; width: 100%; }
.btf-req { color: var(--btf-err); }
.btf-input-wrap { position: relative; flex: 1; min-width: 220px; }
.btf-input {
    width: 100%;
    padding: 0.7rem 4.2rem 0.7rem 0.85rem;
    border: 1px solid var(--btf-border);
    border-radius: 10px;
    font-size: 1rem;
    font-family: var(--fm, ui-monospace, "SFMono-Regular", Menlo, monospace);
    background: #fafafa;
}
.btf-input:focus { outline: 2px solid var(--btf-fld-accent, var(--btf-accent)); border-color: var(--btf-fld-accent, var(--btf-accent)); background: #fff; }
.btf-len {
    position: absolute;
    right: 0.6rem; top: 50%; transform: translateY(-50%);
    font-size: 0.72rem; color: var(--btf-muted);
    background: #eee; padding: 0.1rem 0.4rem; border-radius: 6px;
    font-variant-numeric: tabular-nums;
}
.btf-submit { background: var(--btf-fld-accent, var(--btf-accent)); color: #fff; border: 0; border-radius: 10px; padding: 0.7rem 1.3rem; font-weight: 700; cursor: pointer; touch-action: manipulation; transition: filter 0.15s ease, transform 0.08s ease; }
.btf-submit:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btf-submit.hit { animation: btf-hit 0.4s ease; }
.btf-submit.miss { animation: btf-miss 0.3s ease; }
@keyframes btf-hit { 0% { background: var(--btf-ok); } 100% { background: var(--btf-fld-accent, var(--btf-accent)); } }
@keyframes btf-miss { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

.btf-progress { margin: 1.25rem 0 0.75rem; font-size: 0.95rem; }
.btf-progress-label { font-weight: 700; }
.btf-progress-num b { color: var(--btf-fld-accent, var(--btf-accent)); font-variant-numeric: tabular-nums; }

/* ---- checklist ---- */
.btf-checklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.45rem; }
@media (max-width: 560px) { .btf-checklist { grid-template-columns: 1fr; } }
.btf-check {
    display: flex; align-items: center; gap: 0.55rem;
    padding: 0.55rem 0.75rem;
    border-radius: 9px;
    border: 1px solid var(--btf-border);
    font-size: 0.88rem;
}
.btf-check.locked { color: #9a9a96; background: #f6f6f3; }
.btf-check.found { color: var(--btf-text); background: var(--btf-ok-soft); border-color: #bfe6d3; animation: btf-pop 0.35s ease; }
.btf-check.found .btf-check-icon { color: var(--btf-ok); font-weight: 800; }
.btf-check-icon { width: 1.1em; text-align: center; }
@keyframes btf-pop { 0% { transform: scale(0.96); opacity: 0.4; } 60% { transform: scale(1.02); } 100% { transform: scale(1); opacity: 1; } }

/* ---- result ---- */
.btf-result-head { text-align: center; margin-bottom: 1.5rem; }
.btf-score-ring {
    width: 140px; height: 140px; margin: 0 auto 1rem;
    border-radius: 50%;
    display: grid; place-items: center;
    background: conic-gradient(var(--btf-accent) 0, var(--btf-accent) 100%, #eee 0);
    box-shadow: inset 0 0 0 10px var(--btf-surface);
}
.btf-score-num {
    font-size: 3rem; font-weight: 800; line-height: 1;
    background: var(--btf-grad-multi);
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--btf-accent);
    animation: btf-shimmer 6s linear infinite;
}
.btf-score-num::after { content: ' / 100'; font-size: 0.9rem; color: var(--btf-muted); -webkit-text-fill-color: var(--btf-muted); font-weight: 600; }
.btf-score-sub { color: var(--btf-muted); font-weight: 600; margin-top: 0.5rem; }
.btf-grade { font-size: 1.05rem; max-width: 50ch; margin: 0.75rem auto 0; }

.btf-bd-field { margin-top: 1.5rem; }
/* breakdown sections key to the same field accents as the tabs */
.btf-bd-field:nth-child(1) { --btf-fld-accent: var(--btf-accent);   --btf-fld-soft: var(--btf-accent-soft); }
.btf-bd-field:nth-child(2) { --btf-fld-accent: var(--btf-accent-2); --btf-fld-soft: var(--btf-accent-2-soft); }
.btf-bd-field:nth-child(3) { --btf-fld-accent: var(--btf-accent-3); --btf-fld-soft: var(--btf-accent-3-soft); }
.btf-bd-field:nth-child(4) { --btf-fld-accent: var(--btf-accent-4); --btf-fld-soft: var(--btf-accent-4-soft); }
.btf-bd-title { display: flex; align-items: center; justify-content: space-between; font-size: 1.05rem; margin: 0 0 0.6rem; padding-bottom: 0.4rem; border-bottom: 2px solid var(--btf-fld-accent, var(--btf-border)); }
.btf-bd-count { font-size: 0.8rem; color: var(--btf-fld-accent, var(--btf-accent)); background: var(--btf-fld-soft, var(--btf-accent-soft)); padding: 0.15rem 0.55rem; border-radius: 99px; }
.btf-bd-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.btf-bd-row { display: flex; gap: 0.7rem; padding: 0.6rem 0.75rem; border-radius: 9px; border: 1px solid var(--btf-border); }
.btf-bd-row.hit { background: var(--btf-ok-soft); border-color: #bfe6d3; }
.btf-bd-row.miss { background: #fff5f5; border-color: #f3c9c9; }
.btf-bd-icon { font-weight: 800; }
.btf-bd-row.hit .btf-bd-icon { color: var(--btf-ok); }
.btf-bd-row.miss .btf-bd-icon { color: var(--btf-err); }
.btf-bd-body { display: flex; flex-direction: column; }
.btf-bd-label { font-weight: 700; font-size: 0.9rem; }
.btf-bd-why { color: var(--btf-muted); font-size: 0.83rem; line-height: 1.45; margin-top: 0.1rem; }

/* mystery footer — count only, never reveals unfound checks */
.btf-mystery {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.6rem;
    padding: 0.7rem 0.9rem;
    border-radius: 10px;
    border: 1px dashed var(--btf-border);
    background: repeating-linear-gradient(45deg, #f6f6f3, #f6f6f3 8px, #f1f1ee 8px, #f1f1ee 16px);
    color: var(--btf-muted);
    font-size: 0.88rem;
}
.btf-mystery b { color: var(--btf-warn); font-variant-numeric: tabular-nums; }
.btf-mystery-icon { font-size: 1rem; }
.btf-mystery.cleared {
    border: 1px solid #bfe6d3;
    background: var(--btf-ok-soft);
    color: var(--btf-text);
}
.btf-mystery.cleared .btf-mystery-icon { color: var(--btf-ok); font-weight: 800; }

.btf-nudge {
    text-align: center;
    max-width: 46ch;
    margin: 2rem auto 0;
    color: var(--btf-muted);
    font-size: 0.92rem;
    line-height: 1.55;
}
.btf-result-actions { text-align: center; margin: 1.25rem 0 1rem; }
.btf-result-actions .btf-btn--primary {
    background: linear-gradient(120deg, #0AB6B2, #09C0A1 55%, #F4604B);
    background-size: 180% auto;
    box-shadow: 0 8px 20px rgba(10, 182, 178, 0.28);
    transition: transform 0.12s ease, background-position 0.4s ease, box-shadow 0.2s ease;
}
.btf-result-actions .btf-btn--primary:hover {
    filter: none;
    transform: translateY(-2px);
    background-position: 100% center;
    box-shadow: 0 12px 26px rgba(244, 96, 75, 0.30);
}
#btf-leaderboard { margin: 2rem auto 0; max-width: 480px; }

@media (max-width: 560px) {
    .btf-topbar { flex-wrap: wrap; }
    .btf-score-board { border-right: none; }
    .btf-matchup-stat { min-width: 72px; padding: 0.6rem; }
}
