/**
 * BOptionsB · appearance inspired by ai.starimg.ru.
 * Load after app.css and the route stylesheet. Layouts, forms and JS hooks
 * remain in their existing files; this layer owns the shared visual system.
 */

:root {
    --star-bg: #f5f5f7;
    --star-panel: #ffffff;
    --star-input: #fbfbfd;
    --star-soft: #f0f0f3;
    --star-hover: #eaeaef;
    --star-text: #1d1d1f;
    --star-muted: #6e6e73;
    --star-faint: #76767d;
    --star-line: #e5e5e9;
    --star-line-strong: #d2d2d7;
    --star-blue: #0a84ff;
    --star-action: #0071e3;
    --star-action-hover: #005fc2;
    --star-link: #006acb;
    --star-blue-soft: #edf5ff;
    --star-green: #167347;
    --star-green-soft: #eaf7ef;
    --star-red: #c5323e;
    --star-red-soft: #fff0f1;
    --star-amber: #91620a;
    --star-amber-soft: #fff7e6;
    --star-shadow: 0 1px 2px rgb(0 0 0 / 2%);
    --star-shell: 65rem;
    --star-radius: 20px;
    --star-control: 12px;
    --star-page-gutter: var(--page-gutter, clamp(0.875rem, 3.4vw, 1.875rem));
    --star-font: var(--font-sans, "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
    --star-mono: var(--font-mono, "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace);
    color-scheme: light;
}

:root.dark {
    --star-bg: #080809;
    --star-panel: #141416;
    --star-input: #111113;
    --star-soft: #1e1e21;
    --star-hover: #29292d;
    --star-text: #f5f5f7;
    --star-muted: #a1a1a6;
    --star-faint: #909098;
    --star-line: #2c2c30;
    --star-line-strong: #424247;
    --star-link: #64aeff;
    --star-blue-soft: #11263f;
    --star-green: #70d7a2;
    --star-green-soft: #142b20;
    --star-red: #ff8a94;
    --star-red-soft: #341b20;
    --star-amber: #f0c46b;
    --star-amber-soft: #302716;
    --star-shadow: 0 1px 2px rgb(0 0 0 / 12%);
    color-scheme: dark;
}

/* Bridge the original page palettes to a single light/dark token set. */
html:root[data-theme] body.star-theme {
    --surface: var(--star-panel);
    --surface-raised: var(--star-panel);
    --surface-soft: var(--star-input);
    --surface-muted: var(--star-soft);
    --line: var(--star-line);
    --line-soft: var(--star-line);
    --text: var(--star-text);
    --text-muted: var(--star-muted);
    --brand: var(--star-blue);
    --brand-strong: var(--star-link);
    --brand-soft: var(--star-blue-soft);
    --success: var(--star-green);
    --danger: var(--star-red);
    --warning: var(--star-amber);
    --radius-card: var(--star-radius);
    --radius-control: var(--star-control);
    --shadow-card: var(--star-shadow);
    --shadow-card-hover: var(--star-shadow);
    --hb-bg: var(--star-bg);
    --hb-surface: var(--star-panel);
    --hb-text: var(--star-text);
    --hb-muted: var(--star-muted);
    --hb-border: var(--star-line);
    --hb-btn: var(--star-action);
    --hb-btn-text: #fff;
    --hb-secondary: var(--star-soft);
    --hb-accent: var(--star-link);
    --hb-radius: var(--star-radius);
    --hb-radius-sm: 16px;
    --sp-bg: var(--star-bg);
    --sp-surface: var(--star-panel);
    --sp-text: var(--star-text);
    --sp-muted: var(--star-muted);
    --sp-border: var(--star-line);
    --sp-btn: var(--star-action);
    --sp-btn-text: #fff;
    --sp-secondary: var(--star-soft);
    --sp-radius: var(--star-radius);
    --sp-radius-sm: 16px;
    margin: 0;
    background: var(--star-bg) !important;
    color: var(--star-text) !important;
    font-family: var(--star-font);
    font-optical-sizing: auto;
    font-size: 1rem;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

html:root { background: var(--star-bg); scrollbar-width: none !important; -ms-overflow-style: none !important; }
html:root::-webkit-scrollbar,
html:root body::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}
body.star-theme,
body.star-theme.font-sans,
html:root[data-theme] body.star-theme .font-sans { font-family: var(--star-font); font-optical-sizing: auto; }
body.star-theme :where(button, input, textarea, select, label, summary) { font-family: inherit; font-size: inherit; }
body.star-theme :where(code, pre, kbd, samp, .font-mono, .dash-sidebar__id-value, .dash-copy-field__input, .dash-referral-code code, .hb-signal__pair, .hb-signal__tag, .hb-badge, .sp-badge, .blog-kicker) {
    font-family: var(--star-mono);
}
body.star-theme :where(h1, h2, h3) { letter-spacing: -0.025em; text-wrap: balance; }
body.star-theme :where(p, li, td, .hb-hero__lead, .sp-legal, .blog-prose) { text-wrap: pretty; }
body.star-theme :where(a, button, input, select, textarea, summary):focus-visible {
    outline: 3px solid var(--star-blue) !important;
    outline-offset: 3px;
}
body.star-theme ::selection { background: var(--star-blue); color: #fff; }

/* A quiet, open header like the reference; menus keep their original hooks. */
html:root[data-theme] body.star-theme .site-header { padding: 18px 0; }
html:root[data-theme] body.star-theme .site-header__wrap {
    max-width: var(--star-shell);
    padding: 0 var(--star-page-gutter);
}
html:root[data-theme] body.star-theme .site-header nav {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}
html:root[data-theme] body.star-theme .site-header__bar {
    border-radius: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
html:root[data-theme] body.star-theme .site-header__inner { min-height: 40px; padding: 0; gap: 16px; flex-wrap: wrap; }
html:root[data-theme] body.star-theme .site-header__actions { margin-left: auto; }
html:root[data-theme] body.star-theme .site-header__logo { font-size: 1rem; letter-spacing: -0.025em; color: var(--star-text); }
html:root[data-theme] body.star-theme .site-header__logo img { width: 32px; height: 32px; border-radius: 10px; }
html:root[data-theme] body.star-theme .site-header__logo > span { display: inline; }
html:root[data-theme] body.star-theme .site-header__logo-accent { color: var(--star-text); }
html:root[data-theme] body.star-theme .site-header .nav-link,
html:root[data-theme] body.star-theme .site-header .mobile-nav-link {
    color: var(--star-muted) !important;
    background: transparent !important;
    border-radius: 9px;
    font-size: 0.875rem;
    font-weight: 400;
    box-shadow: none;
}
html:root[data-theme] body.star-theme .site-header .nav-link:hover,
html:root[data-theme] body.star-theme .site-header .mobile-nav-link:hover {
    background: var(--star-soft) !important;
    color: var(--star-text) !important;
}
html:root[data-theme] body.star-theme .site-header .nav-link.active,
html:root[data-theme] body.star-theme .site-header .nav-link-active {
    background: var(--star-blue-soft) !important;
    color: var(--star-link) !important;
}
html:root[data-theme] body.star-theme .site-header__user { border-color: var(--star-line); }
html:root[data-theme] body.star-theme .site-header__desktop { order: 1; }
html:root[data-theme] body.star-theme .site-header__actions > .theme-toggle { order: 2; }
html:root[data-theme] body.star-theme .site-header__burger { order: 3; }
html:root[data-theme] body.star-theme .site-header__avatar { background: var(--star-blue-soft); color: var(--star-link); border-radius: 10px; }
html:root[data-theme] body.star-theme .site-header__register { border-radius: 10px; min-height: 38px; font-weight: 500; }
html:root[data-theme] body.star-theme .site-header__burger {
    background: transparent; border: 1px solid var(--star-line); border-radius: 10px; color: var(--star-text);
}
html:root[data-theme] body.star-theme #mobile-menu.site-header__mobile {
    background: var(--star-panel) !important;
    border: 1px solid var(--star-line) !important;
    border-radius: 16px;
    box-shadow: 0 12px 36px rgb(0 0 0 / 12%) !important;
}
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-height: 38px;
    padding: 7px 13px;
    border: 1px solid var(--star-line-strong);
    border-radius: 9px;
    background: transparent;
    color: var(--star-muted);
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.4;
    white-space: nowrap;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}
.theme-toggle:hover { background: var(--star-soft); color: var(--star-text); }
html:not([data-theme-paid="1"]) .theme-toggle,
html:not([data-theme-paid="1"]) .auth-theme-bar { display: none; }

/* Reusable panels, fields and actions across public, account and admin views. */
html:root[data-theme] body.star-theme :is(
    .card, .stat-card, .signal-card, .table-container, .sp-block, .blog-card,
    .dash-panel, .dash-sidebar__card, .dash-mini-stat, .dash-chart-card,
    .dash-plan-overview, .admin-sidebar__card, .admin-stat, .admin-chart-card,
    .payment-page-card, .payment-modal-dialog, .payment-panel, .payment-info-card,
    .payment-card-box, .hb-card, .hb-step, .hb-signal, .auth-page__container
) {
    background: var(--star-panel) !important;
    border: 1px solid var(--star-line) !important;
    border-radius: var(--star-radius);
    box-shadow: var(--star-shadow) !important;
    color: var(--star-text);
}
html:root[data-theme] body.star-theme :is(.card-header, .card-footer, .dash-panel__head, .dash-panel__foot, .dash-chart-card__head) {
    background: transparent !important;
    border-color: var(--star-line) !important;
}
html:root[data-theme] body.star-theme :is(.form-input, .input, .auth-input, select, textarea) {
    background: var(--star-input) !important;
    color: var(--star-text) !important;
    border: 1px solid var(--star-line-strong) !important;
    border-radius: var(--star-control);
    min-height: var(--control-h, 2.75rem);
    font-size: max(16px, var(--type-md, 1rem));
    box-shadow: none;
}
html:root[data-theme] body.star-theme :is(.form-input, .input, .auth-input, select, textarea):focus {
    border-color: var(--star-blue) !important;
    box-shadow: 0 0 0 3px var(--star-blue-soft);
}
html:root[data-theme] body.star-theme :is(input, textarea)::placeholder { color: var(--star-faint); opacity: 1; }
html:root[data-theme] body.star-theme :is(input, select, textarea):disabled { opacity: .7; cursor: not-allowed; }
html:root[data-theme] body.star-theme :is(input, select, textarea)[aria-invalid="true"],
html:root[data-theme] body.star-theme input.border-red-500 { border-color: var(--star-red) !important; }
body.star-theme :is(input[type="checkbox"], input[type="radio"]) { accent-color: var(--star-action); }

html:root[data-theme] body.star-theme :is(.btn, .hb-btn, .sp-btn, .dash-btn, .payment-action-btn, .auth-submit) {
    border-radius: var(--star-control);
    font-weight: 500;
    letter-spacing: 0;
    white-space: normal;
    line-height: 1.4;
    min-height: var(--control-h, 2.75rem);
    font-size: max(14px, var(--type-sm, 0.875rem));
    box-shadow: none;
    transition: background .15s, border-color .15s, color .15s;
}
html:root[data-theme] body.star-theme :is(
    .btn-primary, .hb-btn--primary, .sp-btn--primary, .dash-btn--primary, .auth-submit,
    .site-header__register, .payment-action-btn-primary, .payment-action-btn-dark,
    .dash-copy-field__btn, .hb-btn--light
) {
    background: var(--star-action) !important;
    color: #fff !important;
    border-color: var(--star-action) !important;
    box-shadow: none !important;
}
html:root[data-theme] body.star-theme :is(
    .btn-primary, .hb-btn--primary, .sp-btn--primary, .dash-btn--primary, .auth-submit,
    .site-header__register, .payment-action-btn-primary, .payment-action-btn-dark,
    .dash-copy-field__btn, .hb-btn--light
):hover { background: var(--star-action-hover) !important; opacity: 1; }
html:root[data-theme] body.star-theme :is(
    .btn-secondary, .hb-btn--secondary, .sp-btn--secondary, .dash-btn--secondary,
    .payment-action-btn-secondary, .dash-load-more, .dash-pay-copy__btn
) {
    background: var(--star-soft) !important;
    color: var(--star-text) !important;
    border: 1px solid var(--star-line) !important;
    box-shadow: none !important;
}
html:root[data-theme] body.star-theme :is(.btn-secondary, .hb-btn--secondary, .sp-btn--secondary, .dash-btn--secondary):hover {
    background: var(--star-hover) !important;
}
html:root[data-theme] body.star-theme button:disabled { cursor: not-allowed; }

/* Homepage: compact card-based sections instead of large full-bleed bands. */
html:root[data-theme] body.star-theme :is(.hb-wrap, .sp-wrap) { max-width: var(--star-shell); padding-inline: var(--star-page-gutter); }
html:root[data-theme] body.star-theme .hb-hero { padding: 0 0 20px; }
html:root[data-theme] body.star-theme .hb-hero__grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    gap: clamp(1.25rem, 3vw, 2rem);
    padding: clamp(1.25rem, 3.2vw, 1.875rem);
    border: 1px solid var(--star-line);
    border-radius: var(--star-radius);
    background: var(--star-panel);
    align-items: start;
}
html:root[data-theme] body.star-theme .hb-hero__title { font-size: var(--type-3xl, clamp(1.7rem, 1.15rem + 2.2vw, 2.5rem)); line-height: 1.2; margin-bottom: 14px; font-weight: 600; }
html:root[data-theme] body.star-theme .hb-hero__lead { font-size: var(--type-md, 1rem); line-height: 1.65; color: var(--star-muted); }
html:root[data-theme] body.star-theme :is(.hb-badge, .sp-badge, .blog-kicker) {
    padding: 0;
    margin-bottom: 12px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--star-faint);
    font-family: var(--star-mono);
    font-size: .75rem;
    font-weight: 400;
    letter-spacing: .06em;
    text-transform: uppercase;
}
html:root[data-theme] body.star-theme :is(.hb-badge__dot, .sp-badge__dot) { display: none; }
html:root[data-theme] body.star-theme .hb-actions { margin: 24px 0; gap: 10px; }
html:root[data-theme] body.star-theme .hb-stats { max-width: none; gap: 16px; margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--star-line); }
html:root[data-theme] body.star-theme .hb-stat {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: left;
    padding: 0;
    gap: 12px;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}
html:root[data-theme] body.star-theme .hb-stat__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    box-shadow: none;
}
html:root[data-theme] body.star-theme .hb-stat__icon svg {
    width: 20px;
    height: 20px;
}
html:root[data-theme] body.star-theme .hb-stat--accuracy .hb-stat__icon {
    background: var(--star-green-soft);
    color: var(--star-green);
}
html:root[data-theme] body.star-theme .hb-stat--monitoring .hb-stat__icon {
    background: var(--star-blue-soft);
    color: var(--star-link);
}
html:root[data-theme] body.star-theme .hb-stat--traders .hb-stat__icon {
    background: #f3e8ff;
    color: #7c3aed;
}
html:root.dark[data-theme] body.star-theme .hb-stat--traders .hb-stat__icon {
    background: #2a1a40;
    color: #c084fc;
}
html:root[data-theme] body.star-theme .hb-stat__value { font-size: 1.5rem; font-weight: 600; line-height: 1.1; }
html:root[data-theme] body.star-theme .hb-stat__label { color: var(--star-muted); font-size: .875rem; }
html:root[data-theme] body.star-theme .hb-hero__preview { display: block; padding-top: 0; }
html:root[data-theme] body.star-theme .hb-signals { display: grid; gap: 10px; min-height: 0; max-width: none; }
html:root[data-theme] body.star-theme .hb-signal {
    position: relative; top: auto; left: auto; right: auto; width: auto;
    margin: 0; transform: none; opacity: 1; padding: 16px;
    background: var(--star-input) !important; border-radius: 14px; animation: none;
}
html:root[data-theme] body.star-theme .hb-signal__head { margin-bottom: 10px; }
html:root[data-theme] body.star-theme .hb-signal__tag { font-family: var(--star-mono); font-size: .75rem; font-weight: 400; color: var(--star-muted); }
html:root[data-theme] body.star-theme .hb-signal__row { margin-bottom: 6px; }
html:root[data-theme] body.star-theme .hb-signal__pair { font-size: 1.125rem; font-family: var(--star-mono); }
html:root[data-theme] body.star-theme .hb-hero__preview .hb-signal__pair {
    filter: blur(8px);
    user-select: none;
    pointer-events: none;
}
html:root[data-theme] body.star-theme .hb-signal__time { color: var(--star-muted); }
html:root[data-theme] body.star-theme .hb-section { padding: 0 0 20px; background: transparent !important; }
html:root[data-theme] body.star-theme .hb-section > .hb-wrap {
    width: 100%;
    max-width: var(--star-shell);
    padding: clamp(1.25rem, 3.2vw, 1.875rem);
    border: 1px solid var(--star-line);
    border-radius: var(--star-radius);
    background: var(--star-panel);
}
html:root[data-theme] body.star-theme .hb-section__head { margin-bottom: 24px; text-align: left; }
html:root[data-theme] body.star-theme .hb-section__title { font-size: var(--type-xl, clamp(1.25rem, 1.08rem + 0.85vw, 1.625rem)); font-weight: 600; line-height: 1.25; }
html:root[data-theme] body.star-theme .hb-section__lead { margin-left: 0; font-size: 1rem; color: var(--star-muted); }
html:root[data-theme] body.star-theme :is(.hb-features, .hb-steps, .hb-reviews) { gap: 16px; }
html:root[data-theme] body.star-theme :is(.hb-feature, .hb-step, .hb-review) { border-radius: 14px; padding: 22px; background: var(--star-input) !important; }
html:root[data-theme] body.star-theme :is(.hb-feature__icon, .hb-seo__icon, .hb-step__num) { border-radius: 12px; box-shadow: none; }
html:root[data-theme] body.star-theme .hb-features .hb-feature:nth-child(1) .hb-feature__icon { background: #dbeafe; color: #1d4ed8; }
html:root[data-theme] body.star-theme .hb-features .hb-feature:nth-child(2) .hb-feature__icon { background: #fff7e6; color: #c2410c; }
html:root[data-theme] body.star-theme .hb-features .hb-feature:nth-child(3) .hb-feature__icon { background: #f3e8ff; color: #7c3aed; }
html:root[data-theme] body.star-theme .hb-steps .hb-step:nth-child(1) .hb-step__num { background: #0a84ff; color: #fff; }
html:root[data-theme] body.star-theme .hb-steps .hb-step:nth-child(2) .hb-step__num { background: #7c3aed; color: #fff; }
html:root[data-theme] body.star-theme .hb-steps .hb-step:nth-child(3) .hb-step__num { background: #167347; color: #fff; }
html:root[data-theme] body.star-theme .hb-seo .hb-seo__item:nth-child(1) .hb-seo__icon { background: #dbeafe; color: #1d4ed8; }
html:root[data-theme] body.star-theme .hb-seo .hb-seo__item:nth-child(2) .hb-seo__icon { background: #ccfbf1; color: #0f766e; }
html:root[data-theme] body.star-theme .hb-seo .hb-seo__item:nth-child(3) .hb-seo__icon { background: #dcfce7; color: #15803d; }
html:root[data-theme] body.star-theme .hb-seo .hb-seo__item:nth-child(4) .hb-seo__icon { background: #ffedd5; color: #c2410c; }
html:root[data-theme] body.star-theme .hb-review__stars { color: #f59e0b; }
html:root[data-theme] body.star-theme .footer-socials a:nth-child(1) { color: #0077ff; background: #e8f1ff; }
html:root[data-theme] body.star-theme .footer-socials a:nth-child(2) { color: #229ed9; background: #e6f6fc; }
html:root.dark[data-theme] body.star-theme .hb-features .hb-feature:nth-child(1) .hb-feature__icon,
html:root.dark[data-theme] body.star-theme .hb-seo .hb-seo__item:nth-child(1) .hb-seo__icon { background: #11263f; color: #64aeff; }
html:root.dark[data-theme] body.star-theme .hb-features .hb-feature:nth-child(2) .hb-feature__icon { background: #302716; color: #f0c46b; }
html:root.dark[data-theme] body.star-theme .hb-features .hb-feature:nth-child(3) .hb-feature__icon { background: #2a1a40; color: #c084fc; }
html:root.dark[data-theme] body.star-theme .hb-seo .hb-seo__item:nth-child(2) .hb-seo__icon { background: #0c2e2a; color: #2dd4bf; }
html:root.dark[data-theme] body.star-theme .hb-seo .hb-seo__item:nth-child(3) .hb-seo__icon { background: #142b20; color: #70d7a2; }
html:root.dark[data-theme] body.star-theme .hb-seo .hb-seo__item:nth-child(4) .hb-seo__icon { background: #3a2412; color: #fb923c; }
html:root.dark[data-theme] body.star-theme .footer-socials a:nth-child(1) { color: #6aa8ff; background: #11263f; }
html:root.dark[data-theme] body.star-theme .footer-socials a:nth-child(2) { color: #67c8ef; background: #0c2a3a; }
html:root[data-theme] body.star-theme :is(.hb-feature__title, .hb-step__title, .hb-review__name) { color: var(--star-text); font-weight: 600; }
html:root[data-theme] body.star-theme :is(.hb-feature__text, .hb-step__text, .hb-review__text) { color: var(--star-muted); font-size: var(--type-md, 1rem); }
html:root[data-theme] body.star-theme .hb-cta { padding-block: 24px; background: transparent; border-top: 0; color: var(--star-text); }
html:root[data-theme] body.star-theme .hb-cta__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
html:root[data-theme] body.star-theme .hb-cta__inner .hb-section__title,
html:root[data-theme] body.star-theme .hb-cta__inner .hb-section__lead {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}
html:root[data-theme] body.star-theme .hb-cta__inner .hb-section__lead { margin-bottom: 2rem; }
html:root[data-theme] body.star-theme .hb-cta__inner .hb-btn {
    margin-left: auto;
    margin-right: auto;
    align-self: center;
}
html:root[data-theme] body.star-theme :is(.hb-cta__title, .hb-cta__text, .hb-cta__lead) { color: var(--star-text); }
html:root[data-theme] body.star-theme .hb-demo-video { border-radius: 16px; border-color: var(--star-line); box-shadow: none; }

/* Paid plans keep branded gradients; free stays a quiet panel. */
html:root[data-theme] body.star-theme :is(.hb-price, .dash-plan-card) {
    --plan-title: var(--star-text);
    --plan-muted: var(--star-muted);
    --plan-price: var(--star-text);
    --plan-price-sub: var(--star-muted);
    --plan-feature: var(--star-muted);
    --plan-check: var(--star-link);
    --plan-cross: var(--star-faint);
    background: var(--star-input) !important;
    border: 1px solid var(--star-line) !important;
    border-radius: 16px;
    box-shadow: none !important;
    color: var(--star-text);
    padding: 22px;
}
html:root[data-theme] body.star-theme :is(.hb-price--month, .dash-plan-card--month) {
    --plan-title: #fff;
    --plan-muted: rgb(255 255 255 / 78%);
    --plan-price: #fff;
    --plan-price-sub: rgb(255 255 255 / 70%);
    --plan-feature: rgb(255 255 255 / 92%);
    --plan-check: #dbeafe;
    --plan-cross: rgb(255 255 255 / 45%);
    background: linear-gradient(160deg, #1563d4 0%, #0d4bb8 52%, #062d7a 100%) !important;
    border: 0 !important;
    box-shadow: 0 12px 32px rgb(10 132 255 / 32%) !important;
    color: #fff;
}
html:root[data-theme] body.star-theme :is(.hb-price--popular, .dash-plan-card--popular) {
    --plan-title: #fff;
    --plan-muted: rgb(255 255 255 / 78%);
    --plan-price: #fff;
    --plan-price-sub: rgb(255 255 255 / 70%);
    --plan-feature: rgb(255 255 255 / 92%);
    --plan-check: #edd5ff;
    --plan-cross: rgb(255 255 255 / 45%);
    background: linear-gradient(160deg, #7c3aed 0%, #6d28d9 52%, #3b0764 100%) !important;
    border: 0 !important;
    box-shadow: 0 12px 32px rgb(124 58 237 / 34%) !important;
    color: #fff;
}
html:root[data-theme] body.star-theme :is(.hb-price--dark, .dash-plan-card--forever) {
    --plan-title: #fff;
    --plan-muted: rgb(255 255 255 / 72%);
    --plan-price: #fff;
    --plan-price-sub: rgb(255 255 255 / 58%);
    --plan-feature: rgb(255 255 255 / 90%);
    --plan-check: #e5e5e5;
    --plan-cross: rgb(255 255 255 / 40%);
    background: linear-gradient(160deg, #1a1a1a 0%, #0a0a0a 52%, #000 100%) !important;
    border: 0 !important;
    box-shadow: 0 12px 32px rgb(0 0 0 / 28%) !important;
    color: #fff;
}
html:root[data-theme] body.star-theme :is(
    .hb-price--month, .hb-price--popular, .hb-price--dark,
    .dash-plan-card--month, .dash-plan-card--popular, .dash-plan-card--forever
) :is(
    .hb-price__name, .hb-price__amount, .hb-price__muted, .hb-price__list, .hb-price__item,
    .dash-plan-card__name, .dash-plan-card__price, .dash-plan-card__desc, .dash-plan-card__features
) { color: var(--plan-title); }
html:root[data-theme] body.star-theme :is(
    .hb-price--month, .hb-price--popular, .hb-price--dark,
    .dash-plan-card--month, .dash-plan-card--popular, .dash-plan-card--forever
) :is(.hb-price__muted, .hb-price__amount span, .dash-plan-card__desc, .dash-plan-card__price span) {
    color: var(--plan-muted);
}
html:root[data-theme] body.star-theme :is(
    .hb-price--month, .hb-price--popular, .hb-price--dark,
    .dash-plan-card--month, .dash-plan-card--popular, .dash-plan-card--forever
) :is(.hb-price__list, .dash-plan-card__features) { color: var(--plan-feature); }
html:root[data-theme] body.star-theme :is(.hb-price--month, .dash-plan-card--month) .hb-price__badge,
html:root[data-theme] body.star-theme :is(.hb-price--month, .dash-plan-card--month) .dash-plan-card__tag {
    background: rgb(255 255 255 / 18%);
    color: #fff;
    border: 0;
    border-radius: 7px;
}
html:root[data-theme] body.star-theme :is(.hb-price--popular, .dash-plan-card--popular) :is(.hb-price__badge, .dash-plan-card__tag) {
    background: rgb(255 255 255 / 20%);
    color: #fff;
    border: 0;
    border-radius: 7px;
}
html:root[data-theme] body.star-theme :is(
    .hb-price--month, .hb-price--popular, .hb-price--dark,
    .dash-plan-card--month, .dash-plan-card--popular, .dash-plan-card--forever
) :is(.hb-btn--light, .hb-btn--primary, .dash-btn--primary) {
    background: #fff !important;
    color: #111 !important;
    border-color: #fff !important;
    box-shadow: none !important;
}
html:root[data-theme] body.star-theme :is(
    .hb-price--month, .hb-price--popular, .hb-price--dark,
    .dash-plan-card--month, .dash-plan-card--popular, .dash-plan-card--forever
) :is(.hb-btn--light, .dash-btn--primary):hover {
    background: rgb(255 255 255 / 92%) !important;
    opacity: 1;
}
html:root[data-theme] body.star-theme :is(.hb-price--month, .hb-price--popular, .hb-price--dark) .dash-btn--secondary,
html:root[data-theme] body.star-theme :is(.dash-plan-card--month, .dash-plan-card--popular, .dash-plan-card--forever) .dash-btn--secondary {
    background: rgb(255 255 255 / 12%) !important;
    color: #fff !important;
    border: 1px solid rgb(255 255 255 / 22%) !important;
}
html:root[data-theme] body.star-theme :is(.hb-price__name, .hb-price__amount, .dash-plan-card__name, .dash-plan-card__price) { color: var(--plan-title, var(--star-text)); }
html:root[data-theme] body.star-theme :is(.hb-price__muted, .hb-price__list, .hb-price__amount span, .dash-plan-card__hint, .dash-plan-card__desc, .dash-plan-card__features, .dash-plan-card__price span) { color: var(--plan-muted, var(--star-muted)); }
html:root[data-theme] body.star-theme :is(.hb-price__badge, .dash-plan-card__badge) { background: var(--star-blue-soft); color: var(--star-link); border: 0; border-radius: 7px; }
html:root[data-theme] body.star-theme .hb-price__amount { font-size: 2rem; }

/* Secondary public pages and reading surfaces. */
html:root[data-theme] body.star-theme .sp-hero { padding: 14px 0 24px; }
html:root[data-theme] body.star-theme .sp-hero__title { font-size: var(--type-2xl, clamp(1.5rem, 1.15rem + 1.5vw, 2.125rem)); line-height: 1.25; }
html:root[data-theme] body.star-theme .sp-section { padding: 0 0 24px; background: transparent; }
html:root[data-theme] body.star-theme .sp-wrap--narrow { max-width: 50rem; }
html:root[data-theme] body.star-theme .sp-wrap--medium { max-width: 60rem; }
html:root[data-theme] body.star-theme :is(.sp-hero__lead, .sp-legal) { font-size: 1rem; }
html:root[data-theme] body.star-theme details.group {
    background: var(--star-panel) !important;
    border: 1px solid var(--star-line) !important;
    border-radius: 14px;
    box-shadow: none !important;
}
html:root[data-theme] body.star-theme details.group summary { color: var(--star-text); padding: 20px 24px; font-size: 1rem; }
html:root[data-theme] body.star-theme details.group summary:hover { background: var(--star-input); }
html:root[data-theme] body.star-theme .blog-shell { max-width: 52rem; padding-top: 12px; }
html:root[data-theme] body.star-theme .blog-list__header { text-align: left; }
html:root[data-theme] body.star-theme .blog-list__lead { margin-left: 0; }
html:root[data-theme] body.star-theme :is(.blog-list__title, .blog-card__title, .blog-post__title, .blog-post__content, .blog-content) { color: var(--star-text); }
html:root[data-theme] body.star-theme :is(.blog-list__lead, .blog-card__excerpt, .blog-card__meta, .blog-post__meta) { color: var(--star-muted); }
html:root[data-theme] body.star-theme :is(.blog-card__icon-only, .blog-card__cover) { background: var(--star-soft); }
html:root[data-theme] body.star-theme .blog-card:hover { transform: none; border-color: var(--star-line-strong) !important; }

/* Account / admin: neutral panels, compact heading, familiar blue selection. */
html:root[data-theme] body.star-theme .dashboard-page { max-width: 76rem; padding-top: 12px; }
html:root[data-theme] body.star-theme .admin-shell { max-width: 82rem; }
html:root[data-theme] body.star-theme :is(.dash-page-head, .admin-page-head) { background: transparent; border: 0; box-shadow: none; padding: 0 0 12px; }
html:root[data-theme] body.star-theme :is(.dash-page-head__title, .admin-page-head__title) { color: var(--star-text); font-size: var(--type-xl, 1.625rem); font-weight: 600; }
html:root[data-theme] body.star-theme :is(.dash-page-head__lead, .admin-page-head__lead, .dash-panel__lead) { color: var(--star-muted); font-size: var(--type-sm, .875rem); }
html:root[data-theme] body.star-theme :is(.dash-panel__title, .admin-sidebar__brand) { color: var(--star-text); font-size: var(--type-lg, 1.125rem); font-weight: 600; }
html:root[data-theme] body.star-theme :is(.dash-panel__head, .dash-panel__body) { padding: 22px 24px; }
html:root[data-theme] body.star-theme .dash-panel__body--flush { padding: 0; }
html:root[data-theme] body.star-theme :is(.dash-sidebar__id, .dash-session, .dash-ref-step, .dash-copy-field__inner, .dash-pay-stat, .dash-pay-copy__box, .dash-pay-qr-guide) {
    background: var(--star-input);
    border-color: var(--star-line);
    box-shadow: none;
}
html:root[data-theme] body.star-theme :is(.dash-nav, .admin-nav) { background: transparent !important; border: 0 !important; box-shadow: none !important; }
html:root[data-theme] body.star-theme :is(.dash-nav__link, .admin-nav__link) { background: transparent; color: var(--star-muted); border-radius: 10px; box-shadow: none; font-weight: 400; }
html:root[data-theme] body.star-theme :is(.dash-nav__link, .admin-nav__link):hover { background: var(--star-soft); color: var(--star-text); }
html:root[data-theme] body.star-theme :is(.dash-nav__link, .admin-nav__link).active { background: var(--star-blue-soft); color: var(--star-link); box-shadow: none; }
html:root[data-theme] body.star-theme :is(.dash-bottom-nav__bar, .admin-bottom-nav__bar) { background: var(--star-panel) !important; border: 1px solid var(--star-line); box-shadow: 0 4px 24px rgb(0 0 0 / 8%); border-radius: 16px; }
html:root[data-theme] body.star-theme :is(.dash-bottom-nav__item, .admin-bottom-nav__item) { color: var(--star-muted); border-radius: 10px; }
html:root[data-theme] body.star-theme :is(.dash-bottom-nav__item, .admin-bottom-nav__item).is-active { color: var(--star-link); background: var(--star-blue-soft); box-shadow: none; }
html:root[data-theme] body.star-theme .dash-bottom-nav__item.is-active :is(.dash-bottom-nav__icon, .dash-bottom-nav__label) { color: var(--star-link); }
html:root[data-theme] body.star-theme :is(.dash-pay-tab, .dash-pay-simple__method) { background: var(--star-input); border-color: var(--star-line); color: var(--star-muted); border-radius: 12px; }
html:root[data-theme] body.star-theme :is(.dash-pay-tab, .dash-pay-simple__method).is-active { background: var(--star-blue-soft); border-color: var(--star-blue); color: var(--star-link); }
html:root[data-theme] body.star-theme :is(.dash-pay-qr__img, #crypto-qr-image, #crypto-qr-code) { background-color: #fff; }
html:root[data-theme] body.star-theme .data-table thead { background: var(--star-input) !important; }
html:root[data-theme] body.star-theme .data-table :is(th, td) { border-color: var(--star-line); }
html:root[data-theme] body.star-theme .data-table th { color: var(--star-muted); font-size: var(--type-xs, .75rem); font-weight: 500; }
html:root[data-theme] body.star-theme .data-table tbody tr:hover { background: var(--star-input); }

/* Explicit text tokens also cover fragments inserted by the existing scripts. */
html:root[data-theme] body.star-theme :is(
    .dash-sidebar__id-value, .dash-stat__value, .dash-chart-card__title,
    .dash-chart-donut__value, .dash-chart-legend__num, .dash-empty__title,
    .dash-signal__head-title, .dash-signal__pair, .dash-metric__value,
    .dash-signal__confidence-head strong, .dash-step__title, .dash-history-item__pair,
    .dash-history-metric__value, .dash-copy-field__input, .dash-ref-step__title,
    .dash-ref-item__name, .dash-plan-current__name, .dash-plans-title, .dash-kv__val,
    .dash-plan-overview__name, .dash-referral-code code, .dash-pay-flow strong,
    .dash-pay-stat__value, .dash-pay-copy__value, .dash-pay-simple__row dd,
    .admin-sidebar__user-name, .blog-article__title, .blog-prose, .blog-prose h2, .blog-prose h3
) { color: var(--star-text); }
html:root[data-theme] body.star-theme :is(
    .dash-sidebar__id-kicker, .dash-stat__label, .dash-chart-card__tag,
    .dash-chart-legend__name, .dash-empty__text, .dash-signal__confidence-head, .dash-signal__head-meta,
    .dash-metric__label, .dash-feedback__title, .dash-step__text, .dash-mini-stat__label,
    .dash-history-item__date, .dash-history-metric__label, .dash-ref-step__text,
    .dash-ref-item__date, .dash-plan-current__meta, .dash-kv__key, .dash-referral-lead,
    .dash-referral-code, .dash-pay-summary__kicker, .dash-pay-summary__perks li,
    .dash-pay-summary__meta, .dash-pay-tab__text small, .dash-pay-flow li,
    .dash-pay-stat__label, .dash-pay-stat__hint, .dash-pay-help__text p,
    .dash-pay-simple__row dt, .dash-pay-qr-guide__head p, .dash-pay-qr-guide__steps p,
    .dash-pay-simple__help, .admin-sidebar__user-role, .blog-list__rss-link,
    .blog-card__meta-row, .blog-empty, .blog-pagination__info, .blog-article__meta,
    .blog-prose blockquote
) { color: var(--star-muted); }
html:root[data-theme] body.star-theme :is(
    .dash-sidebar__id-inner, .dash-sidebar__copy, .dash-stat__icon, .dash-metric,
    .dash-chart-card__tag, .dash-chart-legend__row, .dash-plan-current__meta,
    .dash-plan-overview .dash-kv, .dash-referral-code code, .dash-pay-flow,
    .admin-sidebar__user, .blog-prose code
) { background: var(--star-soft); border-color: var(--star-line); box-shadow: none; }
html:root[data-theme] body.star-theme .dash-metric__label { font-size: .75rem; }
html:root[data-theme] body.star-theme :is(.dash-plan-card--month, .dash-plan-card--popular, .dash-plan-card--forever) :is(.dash-plan-card__desc, .dash-plan-card__price span) { color: var(--plan-muted); }
html:root[data-theme] body.star-theme :is(.dash-plan-card--month, .dash-plan-card--popular, .dash-plan-card--forever) .dash-plan-card__tag { color: #fff; background: rgb(255 255 255 / 18%); border-radius: 7px; font-size: .75rem; }
html:root[data-theme] body.star-theme :is(.dash-badge--muted, .dash-badge--forever, .dash-pay-badge--muted, .dash-signal__status--pending) { background: var(--star-soft); color: var(--star-muted); }
html:root[data-theme] body.star-theme :is(.dash-signal__dir--up, .dash-signal__status--won, .dash-badge--ok, .dash-pay-tip--ok, .dash-pay-simple__status.is-ok) { background: var(--star-green-soft); color: var(--star-green); box-shadow: none; }
html:root[data-theme] body.star-theme :is(.dash-signal__dir--down, .dash-signal__status--lost, .dash-pay-simple__status.is-error) { background: var(--star-red-soft); color: var(--star-red); box-shadow: none; }
html:root[data-theme] body.star-theme :is(.dash-pay-tip--warn, .dash-pay-simple__status.is-pending) { background: var(--star-amber-soft); color: var(--star-amber); }
html:root[data-theme] body.star-theme :is(.dash-btn--feedback-won, .btn-success, .payment-action-btn-success) { background: #167347; color: #fff; box-shadow: none; }
html:root[data-theme] body.star-theme :is(.dash-btn--feedback-lost, .btn-danger, .payment-action-btn-danger) { background: #c5323e; color: #fff; box-shadow: none; }
html:root[data-theme] body.star-theme .dash-pay-simple__cancel { background: var(--star-red-soft); color: var(--star-red); box-shadow: none; }
html:root[data-theme] body.star-theme .dash-copy-field__btn.is-copied { background: #167347 !important; color: #fff !important; }
html:root[data-theme] body.star-theme :is(.hb-signal__dir--up, .hb-signal__pct--up) { color: var(--star-green); }
html:root[data-theme] body.star-theme :is(.hb-signal__dir--down, .hb-signal__pct--down) { color: var(--star-red); }
html:root[data-theme] body.star-theme .blog-prose h2::before { display: none; }
html:root[data-theme] body.star-theme .blog-article__title { font-size: clamp(1.75rem, 4vw, 2.25rem); font-weight: 600; }

/* Authentication uses the same rounded panel and field treatment. */
.auth-theme-bar { display: flex; justify-content: flex-end; max-width: var(--star-shell); margin: 0 auto; padding: 22px var(--star-page-gutter) 0; }
html:root[data-theme] body.star-theme .auth-page { background: transparent; min-height: calc(100svh - 82px); padding: 32px 20px 60px; }
html:root[data-theme] body.star-theme .auth-page__container { width: min(460px, 100%); max-width: 460px; padding: 32px; align-items: stretch; }
html:root[data-theme] body.star-theme .auth-page__logo { justify-content: flex-start; color: var(--star-text); font-size: 1.125rem; margin-bottom: 30px; }
html:root[data-theme] body.star-theme .auth-page__logo img { width: 34px; height: 34px; border-radius: 10px; }
html:root[data-theme] body.star-theme .auth-page__logo-accent { color: var(--star-text); }
html:root[data-theme] body.star-theme .auth-form__header { text-align: left; margin-bottom: 26px; }
html:root[data-theme] body.star-theme .auth-form__title { color: var(--star-text); font-size: clamp(1.5rem, 4vw, 1.75rem); font-weight: 600; }
html:root[data-theme] body.star-theme :is(.auth-form__subtitle, .auth-form__footer, .auth-form__remember, .auth-form__terms) { color: var(--star-muted); font-size: var(--type-sm, .875rem); }
html:root[data-theme] body.star-theme :is(.auth-field__label, .form-label) { color: var(--star-muted); font-weight: 500; font-size: var(--type-sm, .875rem); }
html:root[data-theme] body.star-theme :is(.auth-field__link, .auth-form__footer a, .auth-form__terms a) { color: var(--star-link); }
html:root[data-theme] body.star-theme .auth-field__toggle { color: var(--star-muted); }
html:root[data-theme] body.star-theme .auth-form__alert--error { color: #fff; background: #ff4d4d; border: 0; }
html:root[data-theme] body.star-theme .auth-form__alert--success { color: #fff; background: #22c55e; border: 0; }
html:root[data-theme] body.star-theme .toast-item--error { background: #ff4d4d; }
html:root[data-theme] body.star-theme .toast-item--success { background: #22c55e; }
html:root[data-theme] body.star-theme .toast-item--info { background: #0a84ff; }
html:root[data-theme] body.star-theme :is(.toast-item, .auth-form__alert) { color: #fff; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18); }
html:root[data-theme] body.star-theme :is(.toast-item__text, .auth-form__alert-text) { color: #fff; }

/* Legacy Tailwind utility colors are still used by forms and dynamic messages. */
html:root[data-theme] body.star-theme :is(.text-gray-900, .text-gray-800, .text-gray-700, .text-slate-900, .text-slate-800, .text-slate-700) { color: var(--star-text) !important; }
html:root[data-theme] body.star-theme :is(.text-gray-600, .text-gray-500, .text-gray-400, .text-gray-300, .text-slate-600, .text-slate-500, .text-slate-400) { color: var(--star-muted) !important; }
html:root[data-theme] body.star-theme :is(.text-primary-600, .text-primary-700, .text-blue-600, .text-blue-700) { color: var(--star-link) !important; }
html:root[data-theme] body.star-theme :is(.bg-white, .bg-gray-50, .bg-slate-50) { background-color: var(--star-panel) !important; }
html:root[data-theme] body.star-theme :is(.bg-gray-100, .bg-gray-200, .bg-slate-100, .bg-slate-200) { background-color: var(--star-soft) !important; }
html:root[data-theme] body.star-theme :is(.border-gray-100, .border-gray-200, .border-gray-300, .border-slate-100, .border-slate-200) { border-color: var(--star-line) !important; }
html:root[data-theme] body.star-theme :is(.bg-primary-50, .bg-blue-50, .bg-primary-100, .bg-blue-100) { background-color: var(--star-blue-soft) !important; }
html:root[data-theme] body.star-theme :is(.text-green-600, .text-green-700, .text-green-800, .text-emerald-600, .text-emerald-700) { color: var(--star-green) !important; }
html:root[data-theme] body.star-theme :is(.bg-green-50, .bg-green-100, .bg-emerald-50, .bg-emerald-100) { background-color: var(--star-green-soft) !important; }
html:root[data-theme] body.star-theme :is(.text-red-600, .text-red-700, .text-red-800, .text-rose-600) { color: var(--star-red) !important; }
html:root[data-theme] body.star-theme :is(.bg-red-50, .bg-red-100, .bg-rose-50, .bg-rose-100) { background-color: var(--star-red-soft) !important; }
html:root[data-theme] body.star-theme :is(.text-amber-600, .text-amber-700, .text-yellow-700) { color: var(--star-amber) !important; }
html:root[data-theme] body.star-theme :is(.bg-amber-50, .bg-amber-100, .bg-yellow-50, .bg-yellow-100) { background-color: var(--star-amber-soft) !important; }
html:root[data-theme] body.star-theme #preloader { background: var(--star-bg) !important; }
html:root[data-theme] body.star-theme footer {
    margin-top: 24px;
    background: transparent !important;
    border-top: 1px solid var(--star-line) !important;
    color: var(--star-muted);
}
html:root[data-theme] body.star-theme footer > .max-w-7xl { max-width: var(--star-shell); padding: clamp(1.5rem, 4vw, 2rem) var(--star-page-gutter); }

@media (min-width: 640px) {
    html:root[data-theme] body.star-theme :is(.hb-features, .hb-steps, .hb-reviews) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (min-width: 768px) {
    html:root[data-theme] body.star-theme .hb-pricing { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}
@media (min-width: 1024px) {
    html:root[data-theme] body.star-theme .site-header__nav { display: flex !important; }
    html:root[data-theme] body.star-theme .site-header__desktop { display: flex !important; }
    html:root[data-theme] body.star-theme .site-header__burger { display: none !important; }
    html:root[data-theme] body.star-theme .site-header__mobile { display: none !important; }
    html:root[data-theme] body.star-theme :is(.hb-features, .hb-steps, .hb-reviews) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    html:root[data-theme] body.star-theme :is(.dash-plans, body.site-itd .dashboard-page .dash-plans) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    html:root[data-theme] body.star-theme footer .grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}
@media (min-width: 1200px) {
    html:root[data-theme] body.star-theme .hb-pricing { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
    html:root[data-theme] body.star-theme .site-header__nav { display: none !important; }
    html:root[data-theme] body.star-theme .site-header__desktop { display: none !important; }
    html:root[data-theme] body.star-theme .site-header__burger { display: inline-flex !important; }
    html:root[data-theme] body.star-theme .hb-hero__grid { grid-template-columns: minmax(0, 1fr); }
    html:root[data-theme] body.star-theme .hb-hero__preview { border-top: 1px solid var(--star-line); padding-top: 22px; }
    html:root[data-theme] body.star-theme .dash-layout { flex-direction: column; }
    html:root[data-theme] body.star-theme .dash-sidebar { width: 100%; position: static; }
    html:root[data-theme] body.star-theme :is(.dash-plans, body.site-itd .dashboard-page .dash-plans) {
        grid-template-columns: minmax(0, 1fr);
    }
    html:root[data-theme] body.star-theme footer .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}
@media (max-width: 767px) {
    html:root[data-theme] body.star-theme .site-header { padding: 12px 0; }
    html:root[data-theme] body.star-theme :is(.site-header__wrap, .hb-wrap, .sp-wrap) { padding-inline: var(--star-page-gutter); }
    html:root[data-theme] body.star-theme .site-header__inner { gap: 8px; min-height: 2.75rem; }
    html:root[data-theme] body.star-theme .hb-hero__grid { padding: clamp(1.15rem, 4vw, 1.5rem); gap: 1.25rem; }
    html:root[data-theme] body.star-theme .hb-section > .hb-wrap { width: 100%; padding: clamp(1.15rem, 4vw, 1.5rem); }
    html:root[data-theme] body.star-theme .hb-stats { gap: 12px; }
    html:root[data-theme] body.star-theme .hb-stat__value { font-size: var(--type-xl, 1.375rem); }
    html:root[data-theme] body.star-theme .hb-pricing { grid-template-columns: minmax(0, 1fr); }
    html:root[data-theme] body.star-theme .hb-actions,
    html:root[data-theme] body.star-theme .sp-actions { flex-wrap: wrap; }
    html:root[data-theme] body.star-theme .hb-actions > a,
    html:root[data-theme] body.star-theme .hb-actions > button,
    html:root[data-theme] body.star-theme .sp-actions > a,
    html:root[data-theme] body.star-theme .sp-actions > button { flex: 1 1 12rem; justify-content: center; }
    html:root[data-theme] body.star-theme .hb-signal { padding: 16px; }
    html:root[data-theme] body.star-theme :is(.dash-panel__head, .dash-panel__body) { padding: 18px; }
    html:root[data-theme] body.star-theme .dash-panel__body--flush { padding: 0; }
    html:root[data-theme] body.star-theme .dashboard-page { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
    html:root[data-theme] body.star-theme footer .grid { grid-template-columns: minmax(0, 1fr) !important; }
    .theme-toggle { min-height: var(--touch-min, 44px); padding: 8px 10px; }
    .auth-theme-bar { padding: 16px var(--star-page-gutter) 0; }
    html:root[data-theme] body.star-theme .auth-page { padding: 20px var(--star-page-gutter) 48px; }
    html:root[data-theme] body.star-theme .auth-page__container { padding: clamp(1.25rem, 4vw, 1.75rem); }
    html:root[data-theme] body.star-theme .auth-submit,
    html:root[data-theme] body.star-theme :is(.btn, .hb-btn, .sp-btn, .dash-btn) { min-height: var(--touch-min, 44px); }
}
@media (max-width: 520px) {
    html:root[data-theme] body.star-theme .hb-stats { grid-template-columns: minmax(0, 1fr); }
    html:root[data-theme] body.star-theme .hb-stat { flex-direction: row; align-items: center; gap: 0.75rem; }
    html:root[data-theme] body.star-theme :is(.hb-price__amount, .dash-plan-card__price) { font-size: clamp(1.5rem, 7vw, 2rem); }
    html:root[data-theme] body.star-theme .data-table { font-size: var(--type-sm); }
}
@media (max-width: 380px) {
    html:root[data-theme] body.star-theme .site-header__logo { gap: 6px; font-size: .875rem; }
    html:root[data-theme] body.star-theme .site-header__logo img { width: 28px; height: 28px; }
    html:root[data-theme] body.star-theme .site-header__actions { gap: 6px; }
    html:root[data-theme] body.star-theme .theme-toggle { font-size: .8125rem; padding-inline: 8px; }
    html:root[data-theme] body.star-theme .hb-hero__grid,
    html:root[data-theme] body.star-theme .hb-section > .hb-wrap { padding: 1.1rem; }
    html:root[data-theme] body.star-theme .hb-actions > a,
    html:root[data-theme] body.star-theme .hb-actions > button { flex-basis: 100%; }
}
@media (max-height: 500px) and (orientation: landscape) {
    html:root[data-theme] body.star-theme .site-header { padding: 8px 0; }
    html:root[data-theme] body.star-theme .hb-hero { padding-bottom: 12px; }
    html:root[data-theme] body.star-theme .auth-page { min-height: auto; padding-top: 8px; }
    html:root[data-theme] body.star-theme #mobile-menu.site-header__mobile {
        max-height: calc(100dvh - 4.25rem);
        overflow-y: auto;
    }
}
@media (min-width: 1800px) {
    html:root { font-size: 17px; }
    :root { --star-shell: 72rem; }
}
@media (min-width: 2200px) {
    html:root { font-size: 18px; }
    :root { --star-shell: 80rem; }
}
html:root[data-theme] body.star-theme {
    overflow-x: clip;
    max-width: 100%;
}
html:root[data-theme] body.star-theme :is(
    .hb-hero__grid, .hb-features, .hb-steps, .hb-reviews, .hb-pricing, .hb-stats,
    .dash-layout, .dash-plans, .dash-main, .admin-stat-grid, .sp-grid--2, .sp-grid--3,
    footer .grid, .site-header__inner, .site-header__actions
) {
    min-width: 0;
    max-width: 100%;
}
html:root[data-theme] body.star-theme :is(
    .hb-hero__title, .hb-section__title, .hb-section__lead, .dash-page-head__title,
    .dash-page-head__lead, .sp-legal, .blog-prose
) {
    overflow-wrap: anywhere;
    max-width: 100%;
}
html:root[data-theme] body.star-theme :is(img, video, canvas, iframe) {
    max-width: 100%;
}
html:root[data-theme] body.star-theme iframe { width: 100%; }
@media (max-width: 639px) {
    html:root[data-theme] body.star-theme .hb-stats { grid-template-columns: minmax(0, 1fr); }
    html:root[data-theme] body.star-theme :is(.hb-btn, .sp-btn, .dash-btn, .site-header__register) {
        white-space: normal;
        max-width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    html:root { scroll-behavior: auto !important; }
    body.star-theme *, body.star-theme *::before, body.star-theme *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
    body.star-theme.home-itd > .site-header,
    body.star-theme.home-itd > main > section,
    body.star-theme.home-itd > footer {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}
