:root {
  --blue: #123A5E; --blue-dark: #0C2A45; --blue-soft: #E6EEF6;
  --orange: #E0601B; --orange-dark: #C4510F;
  --ink: #16203A; --muted: #5A6478; --line: #DCE2EC; --mist: #F3F5F9; --white: #FFFFFF;
  --ok: #1E7A4C; --ok-soft: #E6F4EC; --warn: #8A5A00; --warn-soft: #FFF4DB; --err: #B3261E; --err-soft: #FCEBEA;
  --r-s: 6px; --r: 10px; --r-l: 14px;
  --shadow: 0 1px 2px rgba(22, 32, 58, .06), 0 6px 20px rgba(22, 32, 58, .08);
  --font: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --header-h: 64px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--white); font-size: 16px; line-height: 1.55; }
img, svg { display: block; max-width: 100%; }
a { color: var(--blue); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(30px, 5.2vw, 52px); font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: clamp(24px, 3.2vw, 34px); font-weight: 700; }
h3 { font-size: 19px; font-weight: 650; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: #fff; padding: 8px 12px; border-radius: var(--r-s); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: var(--r-s);
  border: 1px solid transparent; font: inherit; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s; white-space: nowrap; }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dark); }
.btn-secondary { background: #fff; color: var(--blue); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--blue); }
.btn-ghost { background: transparent; color: var(--blue); }
.btn-ghost:hover { background: var(--blue-soft); }
.btn-danger { background: #fff; color: var(--err); border-color: #F0C8C5; }
.btn-danger:hover { background: var(--err-soft); }
.btn-ok { background: var(--ok); color: #fff; }
.btn-ok:hover { background: #17633d; }
.btn-light { background: #fff; color: var(--blue); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-outline-light:hover { border-color: #fff; }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field { margin-bottom: 16px; position: relative; }
.hint { font-size: 13px; color: var(--muted); margin-top: 4px; font-weight: 400; }
input, select, textarea { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: var(--r-s);
  min-height: 44px; padding: 9px 12px; }
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(18,58,94,.25); border-color: var(--blue); }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; min-height: 0; padding: 0; accent-color: var(--blue); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 15px; }
.check input { margin-top: 3px; flex: none; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 16px; }
.alert { padding: 12px 14px; border-radius: var(--r-s); font-size: 15px; margin-bottom: 16px; }
.alert-err { background: var(--err-soft); color: var(--err); }
.alert-ok { background: var(--ok-soft); color: var(--ok); }
.alert-info { background: var(--blue-soft); color: var(--blue-dark); }
.alert-warn { background: var(--warn-soft); color: var(--warn); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--blue); text-decoration: none; font-weight: 700; font-size: 19px; flex: none; }
.logo-mark { width: 30px; height: 30px; color: var(--blue); }
.logo-tag { font-weight: 500; color: var(--muted); font-size: 15px; padding-left: 10px; border-left: 1px solid var(--line); }
.main-nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.main-nav a { display: block; padding: 8px 12px; border-radius: var(--r-s); color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; }
.main-nav a:hover, .main-nav a[aria-current=page] { background: var(--mist); color: var(--blue); }
.nav-aux { margin-left: auto !important; align-items: center; }
.nav-aux .btn { color: #fff; padding: 8px 16px; }
.nav-aux .btn:hover { background: var(--orange-dark); color: #fff; }
.lang-select { width: auto; min-height: 36px; padding: 4px 28px 4px 10px; font-size: 14px; }
.menu-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: var(--r-s); width: 44px; height: 44px; cursor: pointer; }
.menu-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); margin: 4px auto; }

/* ---------- marketing ---------- */
.hero { background: var(--blue); color: #fff; padding: 72px 0 80px; }
.hero h1 { white-space: nowrap; margin-bottom: 16px; }
.hero .lead { font-size: 19px; color: rgba(255,255,255,.88); max-width: 640px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 28px 0 0; padding: 0; list-style: none; font-size: 15px; color: rgba(255,255,255,.88); }
.hero-points li::before { content: "✓"; margin-right: 8px; color: #8FD3AE; font-weight: 700; }
.page-hero { background: var(--blue); color: #fff; padding: 48px 0 52px; }
.page-hero h1 { font-size: clamp(28px, 4.2vw, 42px); margin-bottom: 10px; }
.page-hero p { color: rgba(255,255,255,.88); font-size: 18px; margin: 0; max-width: 680px; }
.crumbs { font-size: 14px; margin-bottom: 14px; color: rgba(255,255,255,.75); }
.crumbs a { color: rgba(255,255,255,.9); }
.section { padding: 64px 0; }
.section-alt { background: var(--mist); }
.section-head { max-width: 700px; margin-bottom: 32px; }
.section-head p { color: var(--muted); font-size: 18px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 24px; }
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }
.card .num { display: inline-flex; width: 32px; height: 32px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); align-items: center; justify-content: center; font-weight: 700; margin-bottom: 12px; }
.price-box { background: #fff; border: 2px solid var(--blue); border-radius: var(--r-l); padding: 32px; max-width: 520px; }
.price-big { font-size: 56px; font-weight: 700; color: var(--blue); line-height: 1; }
.price-big small { font-size: 18px; color: var(--muted); font-weight: 500; }
.ticks { list-style: none; padding: 0; margin: 20px 0; }
.ticks li { padding-left: 28px; position: relative; margin-bottom: 10px; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.cta-band { background: var(--blue); color: #fff; padding: 56px 0; }
.cta-band h2 { margin-bottom: 8px; }
.cta-band p { color: rgba(255,255,255,.85); margin-bottom: 24px; font-size: 18px; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { font-weight: 650; font-size: 17px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--blue); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 12px 0 0; color: var(--muted); }
.prose h2 { font-size: 22px; margin-top: 32px; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 6px; }
.table-compare { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.table-compare th, .table-compare td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); font-size: 15px; }
.table-compare th { background: var(--mist); font-weight: 650; }

/* ---------- footer ---------- */
.site-footer { background: var(--blue-dark); color: rgba(255,255,255,.8); padding: 48px 0 28px; font-size: 15px; }
.site-footer a { color: rgba(255,255,255,.9); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid h4 { color: #fff; font-size: 15px; margin: 0 0 12px; }
.site-footer .logo { color: #fff; margin-bottom: 12px; }
.site-footer .logo-mark { color: #fff; }
.site-footer .logo-tag { color: rgba(255,255,255,.7); border-color: rgba(255,255,255,.25); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 32px; padding-top: 20px; font-size: 13px; color: rgba(255,255,255,.65); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

/* ---------- app ---------- */
.app-body { background: var(--mist); min-height: 100vh; display: flex; flex-direction: column; }
.app-main { flex: 1; padding: 28px 0 56px; }
.app-body .site-footer { padding: 20px 0; }
#results { scroll-margin-top: calc(var(--header-h) + 12px); }
.actions { align-items: center; }
.table select { min-width: 150px; }
.demo-bar { background: var(--warn-soft); color: var(--warn); font-size: 14px; text-align: center; padding: 8px 16px; border-bottom: 1px solid #F1DFB0; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 24px; margin-bottom: 20px; }
.panel h2 { font-size: 20px; margin-bottom: 16px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; }
.page-title { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-title h1 { font-size: 28px; margin: 0; }
.auth-box { max-width: 460px; margin: 24px auto; }
.auth-box.wide { max-width: 640px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; }
.stat b { display: block; font-size: 26px; color: var(--blue); }
.stat span { font-size: 14px; color: var(--muted); }
.tabs { display: flex; gap: 4px; background: var(--mist); padding: 4px; border-radius: var(--r-s); width: fit-content; margin-bottom: 20px; }
.tabs button { border: 0; background: transparent; font: inherit; font-weight: 600; font-size: 15px; padding: 8px 18px; border-radius: 5px; cursor: pointer; color: var(--muted); min-height: 40px; }
.tabs button[aria-selected=true] { background: #fff; color: var(--blue); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.list { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; }
.row { display: flex; gap: 16px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.row:last-child { border-bottom: 0; }
a.row:hover { background: var(--mist); }
.row-main { flex: 1; min-width: 0; }
.row-main b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-side { text-align: right; flex: none; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
.badge { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--mist); color: var(--muted); white-space: nowrap; }
.b-ok { background: var(--ok-soft); color: var(--ok); }
.b-warn { background: var(--warn-soft); color: var(--warn); }
.b-err { background: var(--err-soft); color: var(--err); }
.b-blue { background: var(--blue-soft); color: var(--blue); }
.offer { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 18px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; margin-bottom: 12px; }
.offer:hover { border-color: #b9c6d8; }
.offer-price { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; justify-content: center; }
.offer-price b { font-size: 22px; color: var(--ink); }
.leg { display: grid; grid-template-columns: 64px 1fr 64px; gap: 12px; align-items: center; margin-bottom: 10px; }
.leg:last-child { margin-bottom: 0; }
.leg .t { font-size: 20px; font-weight: 650; }
.leg .c { font-size: 13px; color: var(--muted); }
.leg .mid { text-align: center; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.leg .end { text-align: right; }
.offer-meta { font-size: 14px; color: var(--muted); margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.viol { font-size: 13px; color: var(--warn); margin: 8px 0 0; padding-left: 18px; }
.summary-line { display: flex; justify-content: space-between; padding: 6px 0; font-size: 15px; }
.summary-line.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; font-weight: 700; font-size: 17px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 8px 0 8px 22px; position: relative; font-size: 14px; border-left: 2px solid var(--line); margin-left: 6px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 13px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--blue); }
.timeline time { color: var(--muted); display: block; font-size: 13px; }
.ac-list { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--r-s); box-shadow: var(--shadow); margin: 4px 0 0; padding: 4px; list-style: none; max-height: 300px; overflow: auto; }
.ac-list li { padding: 9px 10px; border-radius: 5px; cursor: pointer; font-size: 15px; }
.ac-list li[aria-selected=true], .ac-list li:hover { background: var(--blue-soft); }
.ac-list li small { color: var(--muted); }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: 13px; color: var(--muted); font-weight: 600; }
.table select, .table input { min-height: 36px; padding: 4px 8px; font-size: 14px; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--blue-soft); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { padding: 48px 0; text-align: center; color: var(--muted); }
.loading .spinner { margin-bottom: 12px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 8px 16px; font-size: 15px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.user-menu { position: relative; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--r-s); font-size: 15px; z-index: 200; box-shadow: var(--shadow); max-width: calc(100% - 32px); }

/* invoice */
.invoice { background: #fff; max-width: 800px; margin: 0 auto; padding: 48px; border: 1px solid var(--line); }
.invoice table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 15px; }
.invoice th, .invoice td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.invoice td.r, .invoice th.r { text-align: right; }
.inv-head { display: flex; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
@media print {
  .site-header, .demo-bar, .site-footer, .no-print { display: none !important; }
  .app-body { background: #fff; }
  .app-main { padding: 0; }
  .invoice { border: 0; padding: 0; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .menu-toggle { display: block; }
  .main-nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 12px 20px 20px; box-shadow: var(--shadow); }
  .main-nav.open { display: flex; }
  .main-nav ul { flex-direction: column; }
  .main-nav a { padding: 12px; font-size: 16px; }
  .nav-aux { margin: 8px 0 0 !important; border-top: 1px solid var(--line); padding-top: 12px !important; }
  .main-nav ul.nav-aux { align-items: stretch; }
  .nav-aux li { width: 100%; }
  .nav-aux .btn { width: 100%; margin-top: 4px; }
  .lang-select { width: 100%; min-height: 44px; }
  .cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .hero { padding: 48px 0 56px; }
  .hero h1 { white-space: normal; }
  .section { padding: 48px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .offer { grid-template-columns: 1fr; }
  .offer-price { flex-direction: row; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 12px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 10px; }
  .panel { padding: 18px; }
  .logo-tag { display: none; }
  .table-wrap { overflow-x: auto; }
  .invoice { padding: 24px; }
  .inv-head { flex-direction: column; }
  .tabs { width: 100%; }
  .tabs button { flex: 1; }
}
