/* Beta interface (redesign under test). Loaded only when the beta is on, after the main
   stylesheet: everything is scoped under html.beta-ui so the current interface is untouched.
   Tokens: the six themes of the mockups get their exact palette (tokens.json); the others are
   derived from the variables every theme already defines. */

html.beta-ui {
    --b-bg: var(--bg);
    --b-surface: var(--surface);
    --b-surface2: var(--surface2);
    --b-line: color-mix(in srgb, var(--border) 65%, var(--bg));
    --b-border: var(--border);
    --b-text: var(--text);
    --b-muted: var(--muted);
    --b-accent: var(--btn-from, var(--accent));
    --b-accent-text: var(--accent-ink, var(--accent));
    --b-on-accent: var(--on-accent, #fff);
    --b-good: var(--good);
    --b-on-good: #0b1f18;
    --b-good-bg: var(--good-bg, transparent);
    --b-good-border: transparent;
    --b-danger: var(--danger);
    --b-danger-border: color-mix(in srgb, var(--danger) 45%, var(--bg));
    --b-timer: var(--text);
    --b-timer-glow: none;
    --b-title-glow: none;
    --b-cta-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 30%, transparent);
    --b-warn: #ffb648;
    --b-warn-bg: rgba(255, 182, 72, .12);
    --b-warn-border: transparent;
    --b-row-border: transparent;
    --b-bw: 1px;
    --b-radius: 16px;
    --b-font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --b-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
    --b-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}
html.beta-ui[data-theme="amethyste"] { --b-bg:#140d1b; --b-surface:#1c1327; --b-surface2:#221730; --b-line:#2c1f3e; --b-border:#3a2a50; --b-text:#f0eaf7; --b-muted:#b3a3c8; --b-accent:#a567f0; --b-accent-text:#c08cf7; --b-on-accent:#140d1b; --b-good:#3fd99b; --b-on-good:#0b1f18; --b-good-bg:#16302a; --b-danger:#ff6b88; --b-danger-border:#6b2a3d; --b-timer:#ffffff; --b-cta-shadow:0 10px 30px rgba(165,103,240,.35); }
html.beta-ui[data-theme="neoretro"] { --b-bg:#140a1f; --b-surface:#1e0f30; --b-surface2:#291640; --b-line:#3d2360; --b-border:#5a3590; --b-text:#f6eaff; --b-muted:#c4a9dd; --b-accent:#ff2e97; --b-accent-text:#ff5aad; --b-on-accent:#140a1f; --b-good:#2de2e6; --b-on-good:#06222a; --b-good-bg:#0f2f3a; --b-danger:#ff7aa8; --b-danger-border:#7a2a55; --b-timer:#2de2e6; --b-title-glow:0 0 24px rgba(255,46,151,.45); --b-timer-glow:0 0 10px rgba(45,226,230,.9), 0 0 28px rgba(255,46,151,.6); --b-cta-shadow:0 0 0 2px #2de2e6, 0 0 24px rgba(255,46,151,.6); }
html.beta-ui[data-theme="chrome"] { --b-bg:#0f1419; --b-surface:#151b22; --b-surface2:#192029; --b-line:#222c38; --b-border:#33404f; --b-text:#e9eff6; --b-muted:#9fb1c4; --b-accent:#46cfe0; --b-accent-text:#46cfe0; --b-on-accent:#062028; --b-good:#3fd99b; --b-on-good:#0b1f18; --b-good-bg:#0c2e2a; --b-danger:#ff6b88; --b-danger-border:#5a2a38; --b-timer:#ffffff; --b-cta-shadow:0 10px 30px rgba(70,207,224,.25); }
html.beta-ui[data-theme="sunset"] { --b-bg:#1d1217; --b-surface:#241820; --b-surface2:#2d1d25; --b-line:#3a2830; --b-border:#4f3642; --b-text:#f7e9ee; --b-muted:#c7a9b3; --b-accent:#ff7a4d; --b-accent-text:#ff8a62; --b-on-accent:#1d1217; --b-good:#3fd99b; --b-on-good:#0b1f18; --b-good-bg:#16302a; --b-danger:#ff6b88; --b-danger-border:#6b2a3d; --b-timer:#ffffff; --b-cta-shadow:0 10px 30px rgba(255,94,156,.3); }
html.beta-ui[data-theme="retro"] { --b-bg:#ece1cc; --b-surface:#f8f1e1; --b-surface2:#e7dcc3; --b-line:#d4c6a6; --b-border:#a8977a; --b-text:#3a3225; --b-muted:#5e5442; --b-accent:#a84f1c; --b-accent-text:#8f4216; --b-on-accent:#ffffff; --b-good:#1e6f66; --b-on-good:#ffffff; --b-good-bg:#dcefe9; --b-danger:#b43628; --b-danger-border:#b43628; --b-timer:#3a3225; --b-cta-shadow:0 6px 18px rgba(90,60,20,.18); --b-warn:#7a4a00; --b-warn-bg:#f5e2b8; --b-good-text:#155049; }
html.beta-ui[data-theme="contrast"] { --b-bg:#000; --b-surface:#000; --b-surface2:#0d0d0d; --b-line:#fff; --b-border:#fff; --b-text:#fff; --b-muted:#ebebeb; --b-accent:#ffd400; --b-accent-text:#ffd400; --b-on-accent:#000; --b-good:#5cff9d; --b-on-good:#000; --b-good-bg:#000; --b-good-border:#5cff9d; --b-danger:#ff8a8a; --b-danger-border:#ff8a8a; --b-timer:#fff; --b-cta-shadow:none; --b-warn:#ffd400; --b-warn-bg:#000; --b-warn-border:#ffd400; --b-row-border:#fff; --b-bw:2px; }
html.beta-ui[data-theme="contrast"] body { font-size: 17px; }
html.beta-ui[data-theme="contrast"] a { text-decoration: underline; }

/* ---------- Base ---------- */
html.beta-ui body { background: var(--b-bg); color: var(--b-text); font-family: var(--b-font); line-height: 1.55; }
html.beta-ui h1, html.beta-ui h2, html.beta-ui h3 { font-family: var(--b-display); letter-spacing: -0.01em; }
html.beta-ui .b-mono { font-family: var(--b-mono); }
/* Default link colour with no weight at all, so any component (buttons included) wins. */
:where(html.beta-ui a) { color: var(--b-accent-text); }
/* Links inside running text are underlined, not told apart by colour alone. */
html.beta-ui .b-note a, html.beta-ui .b-lead a { text-decoration: underline; }
html.beta-ui :focus-visible { outline: 2px solid var(--b-accent-text); outline-offset: 2px; }

/* ---------- Shell: sidebar + main ---------- */
.b-app { display: flex; min-height: 100vh; }
.b-side { flex: 0 0 248px; border-inline-end: var(--b-bw) solid var(--b-line); padding: 20px 14px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--b-bg); }
/* Thin theme-coloured scrollbar, as in the current interface; ::-webkit rules for browsers without scrollbar-color. */
.b-side { scrollbar-width: thin; scrollbar-color: var(--b-border) transparent; }
.b-side:hover { scrollbar-color: var(--b-muted) transparent; }
.b-side::-webkit-scrollbar { width: 6px; }
.b-side::-webkit-scrollbar-track { background: transparent; }
.b-side::-webkit-scrollbar-thumb { background: var(--b-border); border-radius: 999px; }
.b-side:hover::-webkit-scrollbar-thumb { background: var(--b-muted); }
.b-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; color: var(--b-text) !important; text-decoration: none; font-family: var(--b-display); font-weight: 700; font-size: 17px; }
.b-brand .brand-logo { width: 36px; height: 36px; }
.b-brand .brand-name { font-family: var(--b-font); }
.b-nav { display: flex; flex-direction: column; gap: 16px; font-size: 14px; }
.b-nav-group { display: flex; flex-direction: column; gap: 2px; }
.b-nav-label { padding: 0 10px 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--b-muted); }
.b-nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--b-muted); text-decoration: none; min-height: 40px; }
.b-nav a svg { flex: 0 0 auto; color: var(--b-accent-text); }
.b-nav a:hover { background: var(--b-surface); color: var(--b-text); }
/* Current page: the theme's own gradient, as in the original design, with white text; dark
   text only where the accent is too light for white (sunny, chrome, forest, high contrast). */
.b-nav a[aria-current="page"] { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: var(--b-nav-on, #fff); font-weight: 600; box-shadow: 0 6px 18px var(--glow, transparent); }
.b-nav a[aria-current="page"] svg { color: currentColor; }
html.beta-ui[data-theme="sunny"] { --b-nav-on: #3a2c00; }
html.beta-ui[data-theme="chrome"] { --b-nav-on: #062028; }
html.beta-ui[data-theme="forest"] { --b-nav-on: #04220f; }
html.beta-ui[data-theme="contrast"] { --b-nav-on: #000; }
.b-side-foot { margin-top: auto; border-top: var(--b-bw) solid var(--b-line); padding: 14px 10px 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.b-side-foot a { display: flex; align-items: center; gap: 8px; color: var(--b-muted); text-decoration: none; min-height: 32px; }
.b-side-foot a:hover { color: var(--b-text); }
.b-version { margin-top: 6px; justify-content: space-between; padding: 8px 10px; border-radius: 8px; border: var(--b-bw) solid var(--b-line); color: var(--b-text) !important; }
.b-version b { font-family: var(--b-mono); font-size: 12px; color: var(--b-accent-text); }
.b-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.b-content { padding: 24px 28px 48px; display: flex; flex-direction: column; gap: 20px; }

/* ---------- Header ---------- */
.b-head { border-bottom: var(--b-bw) solid var(--b-line); padding: 12px 28px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; background: var(--b-bg); position: sticky; top: 0; z-index: 30; }
.b-head h1 { margin: 0; font-size: 24px; font-weight: 700; }
.b-head .b-sub { display: block; font-size: 13px; color: var(--b-muted); font-family: var(--b-font); font-weight: 400; }
.b-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.b-pill { height: 40px; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 999px; border: var(--b-bw) solid var(--b-border); background: var(--b-surface); color: var(--b-text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; }
.b-pill.icon { width: 40px; padding: 0; justify-content: center; }
.b-pill[aria-pressed="true"] { border-color: var(--b-accent); color: var(--b-accent-text); }
.b-swatch { width: 14px; height: 14px; border-radius: 50%; background: var(--b-accent); box-shadow: 0 0 0 2px var(--b-surface), 0 0 0 3px var(--b-border); }
html.beta-ui .lang-btn { height: 40px; border-radius: 999px; border: var(--b-bw) solid var(--b-border); background: var(--b-surface); color: var(--b-text); font-family: var(--b-font); }
html.beta-ui .lang-menu { background: var(--b-surface); border: var(--b-bw) solid var(--b-border); border-radius: 12px; }
.b-menu-toggle { display: none; }
.b-avatar { position: relative; }
.b-avatar img, .b-avatar .av { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; background: var(--b-surface2); }
.b-dropdown { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); min-width: 230px; background: var(--b-surface); border: var(--b-bw) solid var(--b-border); border-radius: 12px; padding: 6px; display: none; z-index: 60; box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.b-dropdown.open { display: block; }
.b-dropdown a, .b-dropdown button { display: flex; width: 100%; align-items: center; gap: 8px; min-height: 40px; padding: 8px 10px; border-radius: 8px; border: 0; background: none; color: var(--b-text); font: inherit; font-size: 14px; text-decoration: none; cursor: pointer; text-align: start; }
.b-dropdown a:hover, .b-dropdown button:hover { background: var(--b-surface2); }
.b-dropdown form { margin: 0; }

/* ---------- Buttons ---------- */
.b-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 0; background: var(--b-accent); color: var(--b-on-accent) !important; font: inherit; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; box-shadow: var(--b-cta-shadow); }
.b-btn.lg { min-height: 54px; font-size: 17px; padding: 0 24px; }
.b-btn-line { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 12px; border: var(--b-bw) solid var(--b-border); background: transparent; color: var(--b-text) !important; font: inherit; font-weight: 600; font-size: 14.5px; text-decoration: none; cursor: pointer; }
.b-btn-line.danger { border-color: var(--b-danger-border); color: var(--b-danger) !important; }
.b-btn-line.sm, .b-btn.sm { min-height: 38px; font-size: 13.5px; padding: 0 14px; border-radius: 10px; }
.b-iconbtn { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border: var(--b-bw) solid var(--b-border); background: transparent; color: var(--b-text); cursor: pointer; text-decoration: none; }
.b-iconbtn.ghost { border-color: transparent; color: var(--b-muted); }
/* Drawer buttons (open / close the menu) only exist on narrow screens. */
.b-iconbtn.b-menu-toggle { display: none; }

/* ---------- Cards ---------- */
.b-card { background: var(--b-surface); border: var(--b-bw) solid var(--b-line); border-radius: var(--b-radius); padding: 22px; }
.b-card h2 { margin: 0 0 4px; font-size: 20px; }
.b-note { margin: 0; font-size: 13.5px; color: var(--b-muted); }
.b-eyebrow { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--b-accent-text); }
.b-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; border-radius: 999px; padding: 3px 10px; border: var(--b-bw) solid transparent; }
.b-badge.warn { color: var(--b-warn); background: var(--b-warn-bg); border-color: var(--b-warn-border); }
.b-badge.good { color: var(--b-good); background: var(--b-good-bg); border-color: var(--b-good-border); }
.b-alert { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; border-color: var(--b-danger); }

/* ---------- Dashboard ---------- */
.b-timer { display: flex; flex-wrap: wrap; gap: 28px; padding: 28px; }
.b-timer-left { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.b-timer-right { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.b-clock { font-family: var(--b-mono); font-weight: 700; font-size: clamp(52px, 8vw, 88px); line-height: 1; letter-spacing: -0.03em; color: var(--b-timer); text-shadow: var(--b-timer-glow); direction: ltr; unicode-bidi: isolate; }
.b-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.b-quick button, .b-quick a { min-height: 44px; border-radius: 10px; border: var(--b-bw) solid var(--b-border); background: var(--b-surface2); color: var(--b-text); font-family: var(--b-mono); font-size: 14px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.b-quick a { font-family: var(--b-font); font-weight: 600; }
.b-auto { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 12px; border: var(--b-bw) solid var(--b-line); font-size: 14px; font-weight: 600; margin: 0; cursor: pointer; }
.b-auto small { display: block; font-size: 12.5px; font-weight: 400; color: var(--b-muted); }
.b-row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.b-row-actions .danger { margin-inline-start: auto; }
.b-row-actions form { margin: 0; }
.b-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.b-stat { background: var(--b-surface); border: var(--b-bw) solid var(--b-line); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.b-stat .l { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--b-muted); }
.b-stat .l svg { color: var(--b-accent-text); }
.b-stat .v { font-family: var(--b-display); font-size: 28px; font-weight: 700; line-height: 1.1; }
.b-stat .v small { font-size: 16px; color: var(--b-muted); font-weight: 600; }
.b-bar { height: 8px; border-radius: 999px; background: var(--b-surface2); border: var(--b-bw) solid var(--b-row-border); overflow: hidden; }
.b-bar > i { display: block; height: 100%; min-width: 8px; border-radius: 999px; background: var(--b-accent); }
.b-split { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.b-links { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.b-link-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 14px; border-radius: 12px; background: var(--b-surface2); border: var(--b-bw) solid var(--b-row-border); }
.b-link-row .t { flex: 1 1 240px; min-width: 0; }
.b-link-row .t b { font-weight: 600; font-size: 14.5px; }
.b-link-row .u { font-family: var(--b-mono); font-size: 12.5px; color: var(--b-muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; direction: ltr; text-align: start; }
html.beta-ui .feed .row { border-bottom: var(--b-bw) solid var(--b-line); }

/* ---------- Generic pages inside the beta shell ---------- */
html.beta-ui .card { background: var(--b-surface); border: var(--b-bw) solid var(--b-line); border-radius: var(--b-radius); }
html.beta-ui .card-title, html.beta-ui .section-label { font-family: var(--b-display); }
html.beta-ui .btn { background: var(--b-accent); color: var(--b-on-accent); border-radius: 12px; font-family: var(--b-font); box-shadow: none; }
html.beta-ui .btn-ghost { background: transparent; border: var(--b-bw) solid var(--b-border); color: var(--b-text); border-radius: 12px; font-family: var(--b-font); }
html.beta-ui input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), html.beta-ui select, html.beta-ui textarea { background: var(--b-surface2); border: var(--b-bw) solid var(--b-border); color: var(--b-text); border-radius: 10px; font-family: var(--b-font); }

/* ---------- Public pages: header, home, footer ---------- */
.b-pub-head { border-bottom: var(--b-bw) solid var(--b-line); padding: 14px 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.b-pub-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 14.5px; font-weight: 500; flex: 1 1 0; min-width: 0; }
.b-pub-nav a { color: var(--b-muted); text-decoration: none; }
.b-pub-nav a:hover { color: var(--b-text); }
.b-wrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.b-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding: 72px 0 56px; }
.b-hero-text { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.b-hero h1 { margin: 0; font-size: clamp(38px, 5vw, 60px); font-weight: 700; line-height: 1.04; letter-spacing: -0.02em; text-shadow: var(--b-title-glow); }
.b-lead { margin: 0; font-size: 18px; color: var(--b-muted); max-width: 540px; }
.b-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.b-preview { flex: 1 1 460px; min-width: 0; background: var(--b-surface); border: var(--b-bw) solid var(--b-line); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.b-preview-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--b-muted); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.b-live { display: inline-flex; align-items: center; gap: 6px; color: var(--b-danger); }
.b-live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.b-screen { border-radius: 14px; padding: 26px 24px; background: var(--b-surface2); text-align: center; }
.b-screen .b-clock { font-size: clamp(44px, 6vw, 68px); }
.b-plus { margin-top: 10px; display: inline-flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.b-plus .n, .b-feedrows b, .b-mono { direction: ltr; unicode-bidi: isolate; }
.b-plus .n { font-family: var(--b-mono); font-size: 13px; font-weight: 700; color: var(--b-on-good); background: var(--b-good); border-radius: 6px; padding: 3px 8px; }
.b-plus .w { font-size: 13px; font-weight: 600; background: var(--b-surface); border-radius: 6px; padding: 3px 8px; }
.b-feedrows { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.b-feedrows div { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; background: var(--b-surface2); border: var(--b-bw) solid var(--b-row-border); border-radius: 10px; }
.b-feedrows b { font-family: var(--b-mono); color: var(--b-good-text, var(--b-good)); }
.b-numbers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: var(--b-bw) solid var(--b-line); border-bottom: var(--b-bw) solid var(--b-line); }
.b-numbers div { padding: 24px 0 24px 24px; border-inline-start: var(--b-bw) solid var(--b-line); }
.b-numbers div:first-child { padding-inline-start: 0; border-inline-start: 0; }
.b-numbers b { display: block; font-family: var(--b-display); font-size: 34px; font-weight: 700; }
.b-numbers span { font-size: 14px; color: var(--b-muted); }
.b-section { padding: 96px 0 0; }
.b-section > h2 { margin: 0 0 36px; font-size: clamp(28px, 3.4vw, 40px); font-weight: 700; line-height: 1.1; max-width: 680px; }
.b-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.b-feature { background: var(--b-surface); border: var(--b-bw) solid var(--b-line); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.b-feature.wide { grid-column: span 2; padding: 28px; }
.b-feature h3 { margin: 0; font-size: 17px; }
.b-feature.wide h3, .b-feature.big h3 { font-size: 24px; }
.b-feature p { margin: 0; font-size: 14px; color: var(--b-muted); }
.b-feature svg { color: var(--b-accent-text); }
.b-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.b-chips span { font-size: 13px; font-weight: 600; border: var(--b-bw) solid var(--b-border); border-radius: 999px; padding: 5px 12px; }
.b-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.b-steps li { border-top: 3px solid var(--b-border); padding-top: 18px; }
.b-steps li:first-child { border-top-color: var(--b-accent); }
.b-steps .num { font-family: var(--b-mono); font-size: 14px; color: var(--b-accent-text); font-weight: 700; }
.b-steps h3 { margin: 6px 0 8px; font-size: 18px; }
.b-steps p { margin: 0; font-size: 14px; color: var(--b-muted); }
.b-data { display: flex; flex-wrap: wrap; gap: 32px; }
.b-data > div:first-child { flex: 1 1 360px; min-width: 0; }
.b-data-cols { flex: 1 1 520px; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.b-data-cols ul { margin: 0; padding-inline-start: 18px; font-size: 14px; color: var(--b-muted); display: flex; flex-direction: column; gap: 8px; }
.b-faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; align-items: start; }
.b-faq button { display: flex; width: 100%; justify-content: space-between; gap: 12px; background: none; border: 0; border-bottom: var(--b-bw) solid var(--b-line); padding: 20px 0; color: var(--b-text); font: inherit; font-size: 16px; font-weight: 600; text-align: start; cursor: pointer; }
.b-faq button span { color: var(--b-accent-text); }
.b-faq p { margin: 12px 0 8px; color: var(--b-muted); font-size: 15px; }
.b-guides { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.b-guides a { background: var(--b-surface); border: var(--b-bw) solid var(--b-line); border-radius: 12px; padding: 16px 18px; color: var(--b-text); text-decoration: none; font-weight: 600; }
.b-guides a.hl { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; background: var(--b-surface2); border: 2px solid var(--b-accent); font-size: 17px; }
.b-guides a.hl span { font-size: 14px; color: var(--b-accent-text); font-weight: 600; }
.b-final { margin: 96px 0 0; padding: 56px 40px; border-radius: 24px; background: var(--b-surface2); border: var(--b-bw) solid var(--b-border); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.b-final h2 { margin: 0 0 8px; font-size: clamp(28px, 3.4vw, 40px); }
.b-foot { margin-top: 80px; border-top: var(--b-bw) solid var(--b-line); padding: 32px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; font-size: 14px; color: var(--b-muted); }
.b-foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.b-foot a { color: var(--b-muted); text-decoration: underline; }
.b-foot .b-ver { font-family: var(--b-mono); font-size: 12.5px; font-weight: 700; color: var(--b-accent-text); }

/* ---------- Beta bar and feedback ---------- */
.b-betabar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; padding: 8px 16px; font-size: 13.5px; background: var(--b-surface2); border-bottom: var(--b-bw) solid var(--b-line); color: var(--b-text); }
.b-betabar form { margin: 0; }
.b-betabar button { background: none; border: 0; color: var(--b-accent-text); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; min-height: 32px; }
.b-fb-open { position: fixed; inset-inline-end: 22px; bottom: 80px; z-index: 55; }
.b-fb { position: fixed; inset-inline-end: 22px; bottom: 136px; z-index: 56; width: min(360px, calc(100vw - 32px)); background: var(--b-surface); border: var(--b-bw) solid var(--b-border); border-radius: 16px; padding: 18px; box-shadow: 0 16px 40px rgba(0,0,0,.4); }
.b-fb[hidden] { display: none; }
.b-fb h2 { margin: 0 0 10px; font-size: 18px; }
.b-stars { display: flex; gap: 6px; margin: 4px 0 12px; border: 0; padding: 0; }
.b-stars label { cursor: pointer; }
.b-stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.b-stars span { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 10px; border: var(--b-bw) solid var(--b-border); font-weight: 700; }
.b-stars input:checked + span { background: var(--b-accent); color: var(--b-on-accent); border-color: var(--b-accent); }
.b-stars input:focus-visible + span { outline: 2px solid var(--b-accent-text); outline-offset: 2px; }
.b-fb textarea { width: 100%; min-height: 96px; padding: 10px; box-sizing: border-box; }

/* ---------- Narrow screens ---------- */
@media (max-width: 980px) {
    .b-features, .b-guides { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .b-feature.wide { grid-column: 1 / -1; }
    .b-steps, .b-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .b-numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .b-numbers div:nth-child(3) { padding-inline-start: 0; border-inline-start: 0; }
}
@media (max-width: 880px) {
    .b-side { position: fixed; inset-block: 0; inset-inline-start: 0; width: min(300px, 86vw); z-index: 300; transform: translateX(-105%); transition: transform .2s; box-shadow: 0 0 40px rgba(0,0,0,.45); }
    [dir="rtl"] .b-side { transform: translateX(105%); }
    .b-side.open { transform: none; }
    .b-menu-toggle, .b-iconbtn.b-menu-toggle { display: inline-flex; }
    .b-content { padding: 18px 16px 40px; }
    .b-head { padding: 10px 16px; }
}
@media (max-width: 640px) {
    .b-fb-open { bottom: 16px; inset-inline-end: 16px; }
    .b-wrap { padding: 0 16px; }
    .b-pub-head { padding: 12px 16px; }
    .b-features, .b-guides, .b-faq, .b-data-cols, .b-steps, .b-stats { grid-template-columns: minmax(0, 1fr); }
    .b-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .b-final { padding: 32px 20px; }
}
@media (prefers-reduced-motion: reduce) { .b-side { transition: none; } }
