:root {
    --bg-main: #202226;
    --bg-card: #282b30;
    --bg-pill: #30343a;
    --text-primary: #f5f6f8;
    --text-secondary: #adb2bc;
    --page-width: 1160px;
    --font-ui: 'Nunito Sans', 'Nirmala UI', 'Microsoft YaHei', 'Yu Gothic', 'Segoe UI', sans-serif;
}

html.light {
    color-scheme: light;
    --bg-main: #ddf4f3;
    --bg-card: #eaf9f7;
    --bg-pill: #c9eae8;
    --border-subtle: #397d8529;
    --text-primary: #183e46;
    --text-secondary: #486b70;
    --accent-cyan: #087d89;
    --accent-blue: #08719a;
}

html { background: var(--bg-main); scroll-behavior: smooth; }
body { min-width: 320px; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 5px;
}
.site-header { background: color-mix(in srgb, var(--bg-main) 90%, transparent); border: 0; }
.site-header > div, .site-main, .site-footer { width: 100%; max-width: var(--page-width); }
.site-header > div { padding-inline: 28px; height: 84px; }
.site-header a span { font-size: 23px; letter-spacing: -0.7px; }
.site-header a svg { width: 36px; height: 36px; }
.site-header button { min-width: 42px; min-height: 42px; }
.site-header button[data-i18n="navSignup"] { padding: 12px 22px; font-size: 14px; }
.site-main > section { padding: 72px 28px; border: 0; }
.site-main h1, .site-main h2, .site-main h3 { overflow-wrap: break-word; }
.site-main h2 { font-size: clamp(26px, 2.6vw, 34px); font-weight: 700; line-height: 1.25; letter-spacing: -0.025em; text-wrap: balance; }
.site-main h3 { font-weight: 700; letter-spacing: -0.01em; }
.site-main p { font-size: 16px; line-height: 1.75; }
.site-main .hero { padding-top: 80px; padding-bottom: 100px; isolation: isolate; }
.hero .hero-content { max-width: 560px; }
.hero-content .hero-wordmark { display: inline-flex; align-items: baseline; gap: 0.16em; font-size: clamp(36px, 5vw, 64px); line-height: 1; margin-bottom: 28px; color: var(--text-primary); white-space: nowrap; }
.hero-wordmark .wordmark-a { flex: none; width: 0.9125em; height: 0.73em; align-self: baseline; }
@supports (height: 1cap) {
    .hero-wordmark .wordmark-a { width: 1.25cap; height: 1cap; }
}
.hero-wordmark span { font-weight: 400; letter-spacing: 0.16em; }
.hero h1 { font-size: clamp(23px, 2.2vw, 28px); line-height: 1.35; letter-spacing: -0.025em; font-weight: 600; text-wrap: balance; margin-bottom: 18px; }
.hero p { max-width: 530px; font-size: 14px; line-height: 1.8; margin-bottom: 30px; }
.hero .hero-logo { width: 550px; height: 550px; right: 0; top: 8px; opacity: 0.2; z-index: 0; }
.hero-logo svg { width: 100%; height: 100%; overflow: visible; }
.hero-content > div:last-child { flex-direction: row; flex-wrap: wrap; gap: 14px; }
.hero-content button { min-height: 48px; font-size: 13px; padding: 14px 24px; }
.site-main #statsSection > .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.site-main .control-section { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); align-items: center; gap: 52px; }
.control-copy { min-width: 0; }
.site-main .control-visual { display: grid; place-items: center; width: 100%; aspect-ratio: 1; border-radius: 28px; padding: 40px; }
.control-visual svg { width: min(80%, 300px); height: auto; overflow: visible; }
.control-copy > div:first-child { margin-bottom: 30px; }
.site-main .control-copy p { font-size: 14px; line-height: 1.8; }
.control-points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.control-points > div { margin-top: 0; padding-top: 0; border: 0; min-width: 0; }
.site-main .control-points p { font-size: 13px; line-height: 1.8; }
.site-main .control-points h3 { font-size: 15px; line-height: 1.5; margin-bottom: 10px; }
.control-points .check-circle { width: 32px; height: 32px; margin-bottom: 14px; border: 0; background: #00d2ff18; }

/* The light palette uses tinted surfaces throughout, including account access. */
.light body { background: linear-gradient(120deg, #d9f3f3, #e3f7f4 58%, #d3eff1); }
.light .btn-accent { background: linear-gradient(135deg, #087f89, #08719a); box-shadow: 0 6px 20px #087f8926; }
.light .text-cyan-400 { color: var(--accent-cyan); }
.light .check-circle { color: var(--accent-cyan); border-color: #087f8933; background: #bce8e8; }
.light .site-main [class*="border-white/"] { border-color: var(--border-subtle); }
.light #wordmarkWhite stop { stop-color: #224a52; }
.light .hero .hero-logo { opacity: 0.1; }
.light .control-visual { background: radial-gradient(circle at 80% 15%, #e0fbf7, #b7eef0 45%, #75dfe7); box-shadow: 0 20px 60px #1677801a, inset 0 1px 2px #ffffffb3; }
.light .language-panel { box-shadow: 0 24px 64px #185b6429; }
.light .auth-card { box-shadow: 0 28px 100px #164c4e40; }
.light .auth-tabs { background: #d1eeeb; }
.light .auth-tab[aria-selected="true"] { box-shadow: 0 2px 8px #1c707714; }
.light .auth-field input { background: #dcf1ee; }
.light .auth-field input::placeholder { color: #55777b; opacity: 1; }
.light .auth-status[data-tone="error"] { color: #b82e48; }
.site-footer { padding-inline: 28px; }

.reviews-controls { display: flex; justify-content: flex-end; gap: 10px; margin: -6px 0 20px; }
.review-arrow { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid var(--border-subtle); border-radius: 50%; background: var(--bg-card); color: var(--text-primary); transition: background 180ms, opacity 180ms; }
.review-arrow:hover:not(:disabled) { background: var(--bg-pill); border-color: #00d2ff66; }
.review-arrow:disabled { opacity: 0.3; cursor: default; }
.reviews-track { gap: 20px; scroll-behavior: smooth; overscroll-behavior-x: contain; }
.reviews-track .review-card { min-width: 0; max-width: none; flex: 0 0 calc((100% - 40px) / 3); padding: 26px; }
.reviews-track .review-card p { font-size: 14px; line-height: 1.7; }
.reviews-track .review-card h3 { font-size: 17px; line-height: 1.4; }

@media (min-width: 900px) {
    .site-main section > .space-y-7, .site-main section > .space-y-6 {
        display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px;
    }
    .site-main section > .space-y-7 > *, .site-main section > .space-y-6 > * { margin-top: 0; }
}
@media (max-width: 899px) {
    .site-main .control-section { grid-template-columns: 1fr; gap: 36px; }
    .site-main .control-visual { max-width: 520px; justify-self: center; }
    .site-main > section { padding-block: 52px; }
    .hero .hero-content { max-width: 560px; }
    .hero .hero-logo { width: 420px; height: 420px; top: 34px; right: 12px; opacity: 0.12; }
    .site-main #statsSection > .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .reviews-track .review-card { flex-basis: calc((100% - 20px) / 2); }
}
@media (max-width: 599px) {
    .site-header > div { height: 72px; padding-inline: 20px; }
    .site-header a { gap: 7px; }
    .site-header a span { font-size: 19px; }
    .site-header a svg { width: 28px; height: 28px; }
    .site-header button { min-width: 36px; min-height: 36px; }
    .site-header button[data-i18n="navSignup"] { padding: 10px 13px; font-size: 12px; }
    .site-main > section { padding: 44px 20px; }
    .site-main .hero { padding-top: 44px; padding-bottom: 58px; }
    .hero h1 { font-size: 23px; line-height: 1.4; letter-spacing: -0.025em; }
    .hero .hero-logo { width: min(88vw, 360px); height: min(88vw, 360px); right: 0; top: 36px; }
    .hero-content > div:last-child { flex-direction: column; align-items: flex-start; }
    .site-main p { font-size: 15px; line-height: 1.7; }
    .site-main .hero p { font-size: 14px; line-height: 1.8; }
    .site-main .control-visual { padding: 28px; }
    .control-points { grid-template-columns: 1fr; gap: 24px; }
    .control-points > div { border-top: 1px solid var(--border-subtle); padding-top: 22px; }
    .site-main .control-points p { font-size: 14px; }
    .site-footer { padding-inline: 20px; }
    .reviews-controls { display: none; }
    .reviews-track { gap: 14px; }
    .reviews-track .review-card { flex-basis: 88%; padding: 22px; }
}
@media (max-width: 359px) {
    .site-header > div { padding-inline: 12px; }
    .site-header > div > div { gap: 5px; }
    .site-header a span { font-size: 17px; }
    .site-header button[data-i18n="navSignup"] { padding-inline: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    html, .reviews-track { scroll-behavior: auto; }
    .reveal-item { transition: none; transform: none; }
}

/* Local vector flags keep the language menu consistent across platforms. */
.language-picker { position: relative; direction: ltr; flex: none; }
.language-picker select { display: none; }
.language-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 42px; padding: 0 11px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.language-chevron { opacity: .5; transition: transform .2s; }
.language-toggle[aria-expanded="true"] .language-chevron { transform: rotate(180deg); }
.language-flag { display: inline-flex; flex: none; width: 25px; height: 17px; border-radius: 3px; overflow: hidden; box-shadow: 0 0 0 1px #ffffff12; }
.language-flag svg { display: block; width: 100%; height: 100%; }
.language-panel { position: fixed; z-index: 80; padding: 12px; overflow: hidden; background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border-subtle); border-radius: 22px; box-shadow: 0 24px 72px #0007; }
.language-panel:not([hidden]) { display: flex; flex-direction: column; }
.language-panel[hidden] { display: none; }
.language-panel-title { flex: none; padding: 8px 12px 14px; font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.language-options { display: grid; gap: 3px; overflow-y: auto; min-height: 0; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #626974 transparent; padding: 3px; }
.language-option { display: flex; align-items: center; gap: 13px; width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid transparent; border-radius: 12px; color: var(--text-primary); background: transparent; text-align: start; font-size: 14px; transition: background .15s; }
.language-option:hover { background: var(--bg-pill); }
.language-option[aria-pressed="true"] { background: #00d2ff0d; border-color: #00d2ff30; }
.language-check { width: 17px; height: 17px; margin-inline-start: auto; color: var(--accent-cyan); visibility: hidden; }
.language-option[aria-pressed="true"] .language-check { visibility: visible; }
.language-status { position: fixed; inset-block-start: 88px; inset-inline: 20px; z-index: 60; width: fit-content; max-width: calc(100% - 40px); margin-inline: auto; padding: 12px 18px; border: 1px solid var(--border-subtle); border-radius: 14px; background: var(--bg-card); font-size: 14px; }
.language-status:empty { display: none; }
body, body * { font-family: var(--font-ui); }
.site-main > section, .site-footer { overflow-wrap: anywhere; }
.hero-wordmark, #valProfit { direction: ltr; unicode-bidi: isolate; }
.reviews-track { direction: ltr; }
.review-card { text-align: start; }
[dir="rtl"] .hero-logo { right: auto; left: 0; }
[dir="rtl"] .text-left { text-align: right; }
[dir="rtl"] #authModal > div > button { right: auto; left: 16px; }
[dir="rtl"] #modalTitle { padding-inline-end: 28px; }

/* Account access keeps email and Telegram in the same dialog. */
#authModal { overflow-y: auto; }
.auth-card { position: relative; width: 100%; max-width: 426px; max-height: calc(100dvh - 32px); overflow-y: auto; padding: 27px; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: 28px; box-shadow: 0 28px 100px #0006; }
.auth-brand { display: flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 750; margin-bottom: 24px; }
.auth-brand svg { width: 28px; height: 28px; }
.auth-close { position: absolute; inset-inline-end: 18px; top: 18px; display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--border-subtle); border-radius: 50%; color: var(--text-secondary); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 23px; background: #0002; border: 1px solid var(--border-subtle); border-radius: 13px; }
.auth-tab { min-height: 40px; padding: 8px; border-radius: 9px; font-size: 13px; font-weight: 650; color: var(--text-secondary); }
.auth-tab[aria-selected="true"] { color: var(--text-primary); background: var(--bg-pill); box-shadow: 0 2px 8px #0002; }
#modalTitle { font-size: 22px; font-weight: 780; line-height: 1.25; margin-bottom: 8px; }
.auth-intro { color: var(--text-secondary); font-size: 12px; line-height: 1.65; margin-bottom: 21px; }
.auth-field { display: grid; gap: 7px; margin-top: 14px; }
.auth-field[hidden], #authPasswordHint[hidden], #authSocial[hidden], .auth-help [hidden] { display: none; }
.auth-field > span { font-size: 12px; color: var(--text-secondary); }
.auth-field input { min-width: 0; width: 100%; border: 1px solid var(--border-subtle); border-radius: 12px; background: #0003; padding: 13px 15px; color: var(--text-primary); font-size: 14px; outline: none; }
.auth-field input:focus { border-color: var(--accent-cyan); box-shadow: 0 0 0 3px #00d2ff12; }
.auth-hint { margin-top: 9px; color: var(--text-secondary); font-size: 11px; line-height: 1.5; }
.auth-submit { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 49px; margin-top: 21px; padding: 12px 16px; border-radius: 999px; font-size: 14px; font-weight: 700; }
.auth-help { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; margin-top: 14px; color: var(--text-secondary); font-size: 11px; }
.auth-help button:hover { color: var(--text-primary); }
.auth-status { font-size: 12px; line-height: 1.6; color: var(--text-primary); margin-top: 12px; overflow-wrap: anywhere; }
.auth-status:empty { display: none; }
.auth-status[data-tone="error"] { color: #fb8e98; }
.auth-divider { display: flex; align-items: center; gap: 13px; margin: 23px 0 17px; color: var(--text-secondary); font-size: 11px; }
.auth-divider::before, .auth-divider::after { content: ''; height: 1px; background: var(--border-subtle); flex: 1; }
.auth-telegram { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 49px; padding: 12px 14px; border-radius: 999px; border: 1px solid #30a9e455; color: #d3f0ff; background: #229ed922; font-size: 13px; font-weight: 650; }
.auth-telegram svg { color: #47b6f1; flex: none; }
.auth-telegram:hover { background: #229ed937; border-color: #47b6f1; }
.light .auth-telegram { color: #12668d; }
.auth-shared { margin: 12px 8px 0; text-align: center; color: var(--text-secondary); font-size: 11px; line-height: 1.65; }
.auth-card button:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 3px; }
.auth-card button:disabled { opacity: .55; cursor: wait; }
@media (max-width: 599px) { .auth-card { padding: 23px; border-radius: 24px; } .auth-brand { margin-bottom: 20px; } }
@media (max-width: 599px) {
    .site-header > div { gap: 8px; }
    .language-toggle { height: 36px; padding-inline: 8px; gap: 5px; }
    .language-toggle .language-flag { width: 21px; height: 14px; }
    .language-chevron { display: none; }
    .site-header button[data-i18n="navSignup"] { max-width: 116px; min-width: 0; white-space: normal; line-height: 1.3; overflow-wrap: anywhere; }
}
@media (max-width: 379px) {
    .site-header > div { padding-inline: 12px; }
    .site-header > div > div { gap: 5px; }
    .site-header a span { font-size: 16px; }
    .site-header a svg { width: 24px; }
    .site-header button[data-i18n="navSignup"] { max-width: 86px; font-size: 11px; padding-inline: 9px; }
}
