/* Shared visual refinement. Loaded after page styles; no application behavior changes. */
html:root {
  --bg: #0b1627;
  --bg-2: #101f34;
  --surface: #14263d;
  --surface-2: #1b304a;
  --surface-solid: #14263d;
  --ink: #ffffff;
  --text: #e5edf6;
  --muted: #b8c8da;
  --gold: #edcc89;
  --gold-deep: #d8b269;
  --emerald: #65dfad;
  --emerald-deep: #44c991;
  --line: #3c5068;
  --line-strong: #698098;
  --glass-border: #698098;
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 9rem;
}
body { font-size: 1rem; line-height: 1.75; }
h1, h2, h3, h4 { font-optical-sizing: auto; line-height: 1.2; text-wrap: balance; }
p, li { text-wrap: pretty; }
button, input, select, textarea { font-family: inherit; }
.btn, .mm-btn, .tab, .lang-toggle { font-size: 1rem; line-height: 1.4; min-height: 44px; white-space: normal; }
.eyebrow, .mm-section-label, .feature-cols h4, .plan-name, .foot-col h4 { font-size: .875rem; letter-spacing: .12em; line-height: 1.5; }
.brand-tag { font-size: .75rem; letter-spacing: .15em; line-height: 1.35; }
.hero-title { font-size: clamp(2.25rem, 5.1vw, 4rem); line-height: 1.12; letter-spacing: -.025em; }
.hero-sub { font-size: clamp(1.0625rem, 1.5vw, 1.1875rem); line-height: 1.8; max-width: 48ch; }
.hero-card h3, .card h3, .why h3 { font-size: 1.5rem; line-height: 1.3; }
.hero-card li, .card > p, .card .check-list li, .plan .check-list li,
.why p, .faq p, .foot-grid p, .chat-msg, .form-success > p { font-size: 1rem; line-height: 1.75; }
.section-head p { color: var(--text); line-height: 1.8; }
.tag, .plan-badge, .lang-code { font-size: .75rem; }
.price small, .modal-fine, .field-error, .chat-chip, .chat-head .chat-sub,
.chat-head .chat-status, .chat-fine, .assist-tx small, .foot-bottom,
.disclaimer, .legalnav, footer { font-size: .875rem; line-height: 1.65; }
.form-group label { font-size: .9375rem; }
.form-group input, .form-group select, .form-group textarea, .chat-input textarea {
  font-size: 1rem; line-height: 1.6; border-color: #698098;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
.site-bg-video video { opacity: .85; filter: saturate(1.08) contrast(1.04); }
.site-bg-video::after { background: linear-gradient(180deg, #0b162766, #0b162799 75%); }
.site-header, .tabs-bar { background: #0b1627f5; }
.hero-card, .feature { background: linear-gradient(145deg, #1b304a, #12243b); }
.lang-menu, .modal-content, .chat-panel { background: #14263d; }
.assist-fab { color: #082319; }
.chat-msg.user { background: #116241; color: #fff; }
.chat-msg.user a { color: #fff; text-decoration: underline; }
.btn-primary:hover, .mm-btn-primary:hover { background: #82ebbf; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
::selection { background: #edcc89; color: #0b1627; }
.article { font-size: 1.0625rem; }
.article p, .article li { line-height: 1.85; }

/* Light working surfaces use darker accents so white button text remains clear. */
html[data-rfg-surface="light"] {
  --bg: #f1f5fa;
  --bg-2: #e5ecf4;
  --panel: #ffffff;
  --panel-2: #f5f8fc;
  --ivory: #f1f5fa;
  --ink: #12243b;
  --text: #293e54;
  --muted: #52667b;
  --faint: #52667b;
  --line: #c5d0dd;
  --line-soft: #e1e8f0;
  --emerald: #116b48;
  --emerald-deep: #0d573b;
  --green: #116b48;
  --green2: #0d573b;
  --gold: #80601f;
  color-scheme: light;
}
[data-rfg-surface="light"] .btn-primary:hover,
[data-rfg-surface="light"] .btn:hover { background: #0d573b; color: #fff; }
[data-rfg-surface="light"] .btn-ghost:hover { background: var(--bg-2); color: var(--ink); }
[data-rfg-surface="light"] .btn-quiet:hover { background: var(--bg-2); color: var(--ink); }
[data-rfg-surface="light"] .note,
[data-rfg-surface="light"] .muted,
[data-rfg-surface="light"] .auth-aux button,
[data-rfg-surface="light"] .stat span,
[data-rfg-surface="light"] .pill,
[data-rfg-surface="light"] th { font-size: .875rem; line-height: 1.6; }
[data-rfg-surface="light"] .auth-card .sub { font-size: 1rem; }
[data-rfg-surface="light"] .auth-aside { --gold: #edcc89; --emerald: #65dfad; }
[data-rfg-surface="light"] .auth-aside .lede,
[data-rfg-surface="light"] .auth-points .pt span { color: #c5d3e3; font-size: 1rem; }
[data-rfg-surface="light"] input,
[data-rfg-surface="light"] select,
[data-rfg-surface="light"] textarea { font-size: 1rem; }

@media (max-width: 600px) {
  .hero-title { font-size: clamp(2.125rem, 9vw, 3rem); }
  .hero-sub { font-size: 1.0625rem; }
  .hero-card h3 { font-size: 1.375rem; }
  .card-grid { grid-template-columns: minmax(0, 1fr); }
  .brand-name { font-size: 1.125rem; }
  .brand-tag { font-size: .75rem; letter-spacing: .1em; }
  .nav-actions { gap: 6px; }
  .nav { gap: 8px; }
  .tab { font-size: .9375rem; white-space: nowrap; }
  .nav-back { white-space: normal; text-align: center; }
  .chat-close { width: 44px; height: 44px; flex-shrink: 0; }
  .auth-form { padding: 22px 18px; }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (prefers-contrast: more) {
  html:root { --muted: #e5edf6; --line: #93abc4; }
  html[data-rfg-surface="light"] { --muted: #293e54; --line: #698098; }
}
