:root {
  --bg: #0b1220;
  --bg2: #111a2c;
  --panel: rgba(255, 255, 255, .05);
  --line: rgba(255, 255, 255, .1);
  --text: #eef3ff;
  --muted: #93a0bb;
  --brand: #3ee0b3;
  --brand2: #7aa7ff;
  --max: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; color-scheme: dark; }
body {
  background: radial-gradient(80% 50% at 10% -10%, #16324a, var(--bg) 55%);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.55;
  overflow-x: hidden;
}
body.is-splash { overflow: hidden; }
body.is-rtl { direction: rtl; }
.loader {
  position: fixed; inset: 0; z-index: 900;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: #0b1220;
  transition: opacity .4s ease, visibility .4s ease;
}
.loader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader__brand { font-weight: 800; letter-spacing: .12em; }
.loader__brand span { color: var(--brand); }
.loader__tag { color: var(--muted); font-size: 13px; }
.loader__bar { width: min(220px, calc(100vw - 48px)); height: 4px; border-radius: 4px; background: rgba(255,255,255,.12); overflow: hidden; }
.loader__bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--brand2)); }
.loader__pct { font-size: 12px; color: var(--muted); }
a { color: inherit; text-decoration: none; }
.nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 16px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) clamp(16px, 4vw, 32px) 12px;
  background: rgba(11, 18, 32, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.logo { font-weight: 800; letter-spacing: .06em; }
.logo span { color: var(--brand); }
.nav__links { margin-left: auto; display: flex; gap: 22px; }
.nav__links a { color: var(--muted); font-size: 14px; }
.nav__right { display: flex; align-items: center; gap: 10px; }
.lang { position: relative; }
.lang__btn {
  background: #1a2438; border: 1px solid var(--line); color: #eef3ff;
  border-radius: 10px; cursor: pointer; padding: 8px 12px; font: inherit; font-size: 13px;
  min-width: 64px;
}
.lang__menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
  list-style: none; min-width: 168px; max-height: min(50vh, 360px); overflow-y: auto;
  padding: 6px; border-radius: 12px; border: 1px solid var(--line);
  background: #151e32;
}
.lang__menu li {
  padding: 10px 12px; border-radius: 8px; cursor: pointer; color: #eef3ff; font-size: 13px;
}
.lang__menu li:hover, .lang__menu li[aria-selected="true"] { background: #2a3a5c; }
.nav__menu {
  display: none; width: 44px; height: 44px; flex-direction: column;
  justify-content: center; gap: 5px; padding: 10px;
  background: #1a2438; border: 1px solid var(--line); border-radius: 12px; cursor: pointer;
}
.nav__menu span { display: block; height: 2px; background: var(--text); }
.nav.is-open .nav__menu span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.is-open .nav__menu span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__menu span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; padding: 12px 20px; font: inherit; font-weight: 650;
  border: 1px solid transparent; cursor: pointer;
}
.btn--solid { background: linear-gradient(120deg, var(--brand), var(--brand2)); color: #081018; }
.btn--ghost { background: var(--panel); border-color: var(--line); color: var(--text); }
.hero, .section { padding: clamp(48px, 8vw, 88px) clamp(16px, 4vw, 32px); }
.hero { max-width: var(--max); margin: 0 auto; }
.kicker { color: var(--brand); letter-spacing: .18em; text-transform: uppercase; font-size: 12px; margin-bottom: 12px; }
h1 { font-size: clamp(32px, 7vw, 56px); line-height: 1.08; letter-spacing: -.03em; max-width: 14ch; }
.lead { margin-top: 14px; color: var(--muted); max-width: 52ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.note { margin-top: 18px; color: var(--muted); font-size: 13px; }
.section__head { max-width: var(--max); margin: 0 auto 28px; }
.section__head h2 { font-size: clamp(24px, 4vw, 36px); }
.section--alt { background: var(--bg2); }
.calc, .form { max-width: var(--max); margin: 0 auto; display: grid; gap: 14px; }
.calc { grid-template-columns: 1fr 1fr auto; align-items: end; }
.field { display: grid; gap: 8px; color: var(--muted); font-size: 14px; }
.field input, .field select {
  background: #1a2438; border: 1px solid #4a5c7a; color: #ffffff;
  border-radius: 12px; padding: 13px 14px; font: inherit; font-size: 16px;
  -webkit-appearance: none; appearance: none; min-height: 48px;
  color-scheme: dark;
}
.field select option {
  background: #ffffff;
  color: #111827;
}
.result {
  max-width: var(--max); margin: 18px auto 0;
  border: 1px solid var(--line); border-radius: 18px; padding: 22px;
  background: var(--panel);
}
.result__usd { font-size: clamp(28px, 5vw, 40px); font-weight: 800; color: var(--brand); margin: 6px 0; }
.result__range, .result__tip { color: var(--muted); font-size: 14px; }
.table-wrap { max-width: var(--max); margin: 0 auto; overflow-x: auto; }
.board { width: 100%; border-collapse: collapse; min-width: 560px; }
.board th, .board td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); font-size: 14px; }
.board th { color: var(--muted); font-weight: 600; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form__hint { min-height: 1.2em; font-size: 13px; }
.form__hint.ok { color: var(--brand); }
.form__hint.err { color: #ff8b97; }
.faq { max-width: 720px; margin: 0 auto; display: grid; gap: 10px; }
.qa { border: 1px solid var(--line); border-radius: 14px; padding: 4px 16px; background: var(--panel); }
.qa summary { cursor: pointer; padding: 12px 0; font-weight: 650; list-style: none; }
.qa summary::-webkit-details-marker { display: none; }
.qa p { color: var(--muted); padding: 0 0 14px; font-size: 14px; }
.foot { padding: 28px 16px calc(28px + env(safe-area-inset-bottom, 0px)); text-align: center; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }
body.is-rtl .lang__menu { right: auto; left: 0; }
body.is-rtl .nav__links { margin-left: 0; margin-right: auto; }

@media (max-width: 1100px), (hover: none) and (pointer: coarse) {
  .nav__menu { display: flex; }
  .nav__cta { display: none; }
  .nav__links {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; padding: 8px 18px 16px;
    background: rgba(11, 18, 32, .96); border-bottom: 1px solid var(--line);
  }
  .nav.is-open .nav__links { display: flex; }
  .nav__links a { padding: 14px 0; font-size: 16px; }
  .calc { grid-template-columns: 1fr; }
  .calc .btn { width: 100%; height: 48px; }
}
@media (max-width: 720px) {
  .form__row { grid-template-columns: 1fr; }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; height: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
