/* ================================================================
   Nerezidentam — Design System v3 (2026)
   Dark + Light themes · Dropdown nav · Mobile-first
   ================================================================ */

/* ===== Theme: dark (default) ===== */
:root, [data-theme="dark"] {
  --bg: #0a0d14;
  --bg-2: #0f131c;
  --bg-3: #141926;
  --surface: #181d2c;
  --surface-2: #1f253a;
  --surface-hover: #232a42;
  --text: #f5f1e8;
  --text-2: #c8c2b4;
  --text-3: #8a8579;
  --text-muted: #6b6759;
  --gold: #e6b566;
  --gold-bright: #f0c47a;
  --gold-dim: rgba(230, 181, 102, 0.12);
  --gold-line: rgba(230, 181, 102, 0.25);
  --teal: #5dbfa8;
  --teal-bright: #7dd5be;
  --teal-dim: rgba(93, 191, 168, 0.12);
  --danger: #e2725b;
  --danger-dim: rgba(226, 114, 91, 0.14);
  --warn: #e6b566;
  --success: #5dbfa8;
  --info: #6b8fc7;
  --border: rgba(245, 241, 232, 0.08);
  --border-2: rgba(245, 241, 232, 0.14);
  --border-gold: rgba(230, 181, 102, 0.4);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.4);
  --shadow-gold: 0 0 32px rgba(230, 181, 102, 0.2);
  --header-bg: rgba(10, 13, 20, 0.85);
}

/* ===== Theme: light ===== */
[data-theme="light"] {
  --bg: #faf8f3;
  --bg-2: #f1ede2;
  --bg-3: #e8e3d3;
  --surface: #ffffff;
  --surface-2: #f7f3e8;
  --surface-hover: #f0eada;
  --text: #1a1d24;
  --text-2: #3d4250;
  --text-3: #6b6759;
  --text-muted: #9a957f;
  --gold: #b8860b;
  --gold-bright: #d4a020;
  --gold-dim: rgba(184, 134, 11, 0.10);
  --gold-line: rgba(184, 134, 11, 0.28);
  --teal: #2a9078;
  --teal-bright: #3eb094;
  --teal-dim: rgba(42, 144, 120, 0.10);
  --danger: #c8503a;
  --danger-dim: rgba(200, 80, 58, 0.10);
  --warn: #b8860b;
  --success: #2a9078;
  --info: #4a6fa8;
  --border: rgba(26, 29, 36, 0.10);
  --border-2: rgba(26, 29, 36, 0.16);
  --border-gold: rgba(184, 134, 11, 0.4);
  --shadow-sm: 0 1px 4px rgba(26, 29, 36, 0.06);
  --shadow-md: 0 2px 12px rgba(26, 29, 36, 0.08);
  --shadow-lg: 0 8px 32px rgba(26, 29, 36, 0.12);
  --shadow-gold: 0 0 24px rgba(184, 134, 11, 0.15);
  --header-bg: rgba(250, 248, 243, 0.92);
}

:root {
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Manrope', -apple-system, system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --t-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --t-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color var(--t-base), color var(--t-base);
  overflow-x: hidden;
  min-width: 320px;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  font-weight: 450;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  color: var(--text);
  word-wrap: break-word;
}
h1 { font-size: clamp(1.8rem, 4.5vw, 3.5rem); font-weight: 400; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.4rem); }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.5rem); }
h4 { font-size: 1.05rem; font-weight: 500; font-family: var(--sans); }
h1 em, h2 em, h3 em { font-style: italic; color: var(--gold); font-weight: 400; }

p { margin: 0 0 16px; color: var(--text-2); word-wrap: break-word; }
p.lead, .lead { font-size: clamp(1rem, 1.4vw, 1.2rem); line-height: 1.55; color: var(--text-2); max-width: 680px; }
.lede { font-size: 1.1rem; line-height: 1.6; color: var(--text-2); font-style: italic; }

a { color: var(--gold); text-decoration: none; transition: color var(--t-fast); border-bottom: 1px dotted transparent; word-wrap: break-word; }
a:hover { color: var(--gold-bright); border-bottom-color: var(--gold-line); }

.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--gold); font-weight: 600; }
.eyebrow::before { content: ''; width: 16px; height: 1px; background: var(--gold); }

.text-muted { color: var(--text-3); }
.text-gold { color: var(--gold); }
.text-teal { color: var(--teal); }
.text-center { text-align: center; }
.mono { font-family: var(--mono); }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 24px; } }
.container-narrow { width: 100%; max-width: 820px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container-narrow { padding: 0 24px; } }

section { padding: 48px 0; }
@media (min-width: 768px) { section { padding: 80px 0; } }
@media (min-width: 1024px) { section { padding: 96px 0; } }

.section-header { margin-bottom: 32px; max-width: 720px; }
.section-header.text-center { margin-left: auto; margin-right: auto; }

.mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; } .mt-48 { margin-top: 48px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 10px 20px;
  font-family: var(--sans); font-size: 0.92rem; font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent; border-radius: var(--radius-md);
  cursor: pointer; transition: all var(--t-base);
  white-space: nowrap; position: relative; overflow: hidden;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 100%);
  color: #1a1a1a;
  box-shadow: 0 4px 16px rgba(230, 181, 102, 0.25);
}
[data-theme="light"] .btn-primary { color: #ffffff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(230, 181, 102, 0.4); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-2); }
.btn-secondary:hover { background: var(--surface-hover); border-color: var(--gold-line); color: var(--gold); }
.btn-ghost { background: transparent; color: var(--text-2); border-color: var(--border-2); }
.btn-ghost:hover { color: var(--gold); border-color: var(--gold-line); }
.btn-large { padding: 14px 28px; font-size: 1rem; }
.btn-block { display: flex; width: 100%; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
  transition: all var(--t-base); position: relative;
  min-width: 0; word-wrap: break-word;
}
@media (min-width: 640px) { .card { padding: 24px; } }
.card:hover { border-color: var(--gold-line); background: var(--surface-2); transform: translateY(-2px); }

.card-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .card-grid { gap: 20px; } .card-grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .card-grid-3 { grid-template-columns: repeat(3, 1fr); } .card-grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .card-grid-4 { grid-template-columns: repeat(4, 1fr); } }

.card-number { font-family: var(--mono); font-size: 0.78rem; color: var(--gold); letter-spacing: 0.1em; font-weight: 600; }
.card-icon { width: 48px; height: 48px; border-radius: var(--radius-md); background: var(--gold-dim); color: var(--gold); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.card-icon svg { width: 24px; height: 24px; }

/* ===== Hero ===== */
.hero { padding: 56px 0 48px; position: relative; overflow: hidden; }
@media (min-width: 768px) { .hero { padding: 96px 0 72px; } }
.hero-grid { display: grid; gap: 32px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 1024px) { .hero-grid { grid-template-columns: 1.1fr 1fr; gap: 56px; } }
.hero-text h1 { margin: 16px 0 20px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-cta .btn { flex: 1; min-width: 140px; }
@media (min-width: 480px) { .hero-cta .btn { flex: 0 1 auto; } }
.hero-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }
@media (min-width: 640px) { .hero-meta { grid-template-columns: repeat(4, 1fr); margin-top: 40px; padding-top: 32px; } }
.hero-meta-item { min-width: 0; }
.hero-meta-item .label { font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-3); margin-bottom: 6px; }
.hero-meta-item .value { font-size: 1.25rem; font-family: var(--serif); color: var(--text); font-weight: 500; }
.hero-meta-item .num { color: var(--gold); }

/* ===== Gauge ===== */
.gauge-card { background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--radius-xl); padding: 20px; box-shadow: var(--shadow-lg); max-width: 100%; overflow: hidden; }
@media (min-width: 640px) { .gauge-card { padding: 24px; } }
.gauge-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; font-family: var(--mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-3); flex-wrap: wrap; gap: 8px; }
.gauge-card-flag { font-size: 1.4rem; }
.gauge { position: relative; padding: 16px 0; }
.gauge svg { width: 100%; max-width: 280px; margin: 0 auto; display: block; }
.gauge-value { text-align: center; margin-top: -28px; position: relative; z-index: 2; }
.gauge-value .num { font-family: var(--serif); font-size: 2.2rem; color: var(--gold); font-weight: 500; }
.gauge-value .label { font-family: var(--mono); font-size: 0.74rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 4px; }
.gauge-status { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border-radius: var(--radius-md); margin-top: 20px; font-size: 0.88rem; background: var(--gold-dim); border: 1px solid var(--gold-line); }
.gauge-status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex-shrink: 0; margin-top: 6px; }
.gauge-status-dot.pulse { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.3); opacity: 0.6; } }
.gauge-status.warn { background: var(--danger-dim); border-color: rgba(226, 114, 91, 0.3); }
.gauge-status.warn .gauge-status-dot { background: var(--danger); }
.gauge-breakdown { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--border-2); }
.gauge-breakdown-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 0.88rem; color: var(--text-2); gap: 12px; }
.gauge-breakdown-row span:last-child { color: var(--text); font-family: var(--mono); }
.gauge-arc-fill { stroke-dasharray: 314; stroke-dashoffset: 100; animation: gaugeFill 2.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
@keyframes gaugeFill { to { stroke-dashoffset: 50; } }
.gauge-needle { transform-origin: 120px 110px; animation: needleMove 2.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
@keyframes needleMove { from { transform: rotate(-90deg); } to { transform: rotate(50deg); } }
.gauge-tip { fill: var(--gold); }

/* ===== Country tiles ===== */
.countries-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .countries-grid { gap: 12px; grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .countries-grid { grid-template-columns: repeat(4, 1fr); } }
.country-tile { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); text-decoration: none; transition: all var(--t-base); min-width: 0; }
.country-tile:hover { background: var(--surface-2); border-color: var(--gold-line); transform: translateY(-2px); }
.country-tile .flag { font-size: 1.6rem; line-height: 1; flex-shrink: 0; }
.country-tile .info { flex: 1; min-width: 0; }
.country-tile .name { color: var(--text); font-weight: 500; font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.country-tile .rule { font-family: var(--mono); font-size: 0.7rem; color: var(--text-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== Pricing ===== */
.pricing-grid { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 32px; }
@media (min-width: 640px) { .pricing-grid { gap: 20px; grid-template-columns: repeat(2, 1fr); margin-top: 48px; } }
@media (min-width: 1100px) { .pricing-grid { grid-template-columns: repeat(4, 1fr); } }
.pricing-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px 20px; position: relative; transition: all var(--t-base); min-width: 0; }
@media (min-width: 640px) { .pricing-card { padding: 28px 24px; } }
.pricing-card:hover { border-color: var(--gold-line); transform: translateY(-4px); }
.pricing-card.featured { border-color: var(--gold); background: linear-gradient(180deg, var(--surface) 0%, rgba(230, 181, 102, 0.05) 100%); box-shadow: var(--shadow-gold); }
.pricing-card .badge { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: var(--gold); color: #1a1a1a; padding: 4px 12px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; border-radius: 20px; white-space: nowrap; }
[data-theme="light"] .pricing-card .badge { color: #ffffff; }
.pricing-price { margin: 16px 0 4px; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.pricing-price .amount { font-family: var(--serif); font-size: 2.4rem; font-weight: 500; color: var(--gold); line-height: 1; }
.pricing-price .currency { font-family: var(--mono); color: var(--text-3); font-size: 0.9rem; }
.pricing-period { font-family: var(--mono); font-size: 0.74rem; color: var(--text-3); margin-bottom: 16px; }
.pricing-features { list-style: none; padding: 0; margin: 16px 0; }
.pricing-features li { padding: 8px 0 8px 26px; font-size: 0.88rem; color: var(--text-2); position: relative; border-bottom: 1px dashed var(--border); }
.pricing-features li::before { content: ''; position: absolute; left: 0; top: 14px; width: 16px; height: 16px; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23e6b566' stroke-width='2'><path d='M3 8 L7 12 L13 4'/></svg>"); background-repeat: no-repeat; }
.pricing-features li.disabled { color: var(--text-muted); }
.pricing-features li.disabled::before { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%236b6759' stroke-width='2'><path d='M4 4 L12 12 M12 4 L4 12'/></svg>"); }

.tag { display: inline-block; padding: 2px 8px; font-family: var(--mono); font-size: 0.7rem; font-weight: 600; border-radius: 4px; background: var(--gold-dim); color: var(--gold); border: 1px solid var(--gold-line); }
.tag.warn { background: var(--danger-dim); color: var(--danger); border-color: rgba(226, 114, 91, 0.3); }
.tag.teal { background: var(--teal-dim); color: var(--teal); border-color: rgba(93, 191, 168, 0.3); }
.tag.info { background: rgba(107, 143, 199, 0.12); color: var(--info); border-color: rgba(107, 143, 199, 0.3); }

/* ===== Tracker app shell — FIXED ===== */
.app-shell { display: grid; gap: 20px; grid-template-columns: 1fr; margin-top: 24px; min-width: 0; }
@media (min-width: 1024px) { .app-shell { grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 24px; } }
.app-sidebar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; height: fit-content; min-width: 0; }
@media (min-width: 1024px) { .app-sidebar { padding: 24px; position: sticky; top: 80px; } }
.app-sidebar h4 { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-3); margin: 0 0 14px; font-family: var(--mono); font-weight: 500; }
.app-main { min-width: 0; overflow: hidden; }

.field { margin-bottom: 12px; }
.field label { display: block; font-size: 0.85rem; color: var(--text-2); margin-bottom: 6px; font-weight: 500; }
.field input, .field select, .field textarea { width: 100%; max-width: 100%; padding: 10px 12px; background: var(--bg-2); border: 1px solid var(--border-2); border-radius: var(--radius-md); color: var(--text); font-size: 0.92rem; transition: all var(--t-fast); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); background: var(--bg); box-shadow: 0 0 0 3px var(--gold-dim); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field-help { font-size: 0.78rem; color: var(--text-3); margin-top: 6px; }

.status-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 540px) { .status-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }
@media (min-width: 1280px) { .status-grid { grid-template-columns: repeat(3, 1fr); } }
.status-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px; transition: all var(--t-base); min-width: 0; }
.status-card:hover { background: var(--surface-2); }
.status-card .country { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.status-card .country .flag { font-size: 1.4rem; flex-shrink: 0; }
.status-card .country .name { flex: 1; font-weight: 500; min-width: 0; }
.status-card .days { font-family: var(--serif); font-size: 1.6rem; font-weight: 500; color: var(--gold); }
.status-card .days .total { font-size: 0.9rem; color: var(--text-3); font-family: var(--mono); font-weight: 400; }
.status-card .meta { font-size: 0.82rem; color: var(--text-3); margin-top: 8px; line-height: 1.5; word-wrap: break-word; }

.progress { height: 6px; background: var(--bg-2); border-radius: 3px; overflow: hidden; margin: 8px 0; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--teal), var(--gold)); border-radius: 3px; transition: width var(--t-slow); position: relative; }
.progress-bar::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent); animation: progressShine 2s linear infinite; }
@keyframes progressShine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.progress-bar.warn { background: linear-gradient(90deg, var(--gold), var(--danger)); }
.progress-bar.danger { background: linear-gradient(90deg, var(--danger), var(--danger)); }
.progress-bar.teal { background: var(--teal); }

.trips-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.trips-table { width: 100%; border-collapse: collapse; min-width: 540px; }
.trips-table th, .trips-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.trips-table th { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-3); font-weight: 500; background: var(--bg-2); }
.trips-table tbody tr:hover { background: var(--surface-2); }
.trips-table .empty { text-align: center; color: var(--text-3); padding: 32px; }
.trip-action { cursor: pointer; color: var(--text-3); font-size: 0.82rem; transition: color var(--t-fast); user-select: none; }
.trip-action:hover { color: var(--danger); }

.alert-banner { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border-2); margin-bottom: 12px; word-wrap: break-word; }
.alert-banner.warn { background: var(--danger-dim); border-color: rgba(226, 114, 91, 0.3); }
.alert-banner.info { background: var(--gold-dim); border-color: var(--gold-line); }
.alert-banner-icon { width: 20px; height: 20px; color: var(--gold); flex-shrink: 0; margin-top: 2px; }
.alert-banner.warn .alert-banner-icon { color: var(--danger); }
.alert-banner-text { min-width: 0; flex: 1; }
.alert-banner-text .title { font-weight: 600; margin-bottom: 4px; word-wrap: break-word; }
.alert-banner-text .desc { color: var(--text-2); font-size: 0.88rem; word-wrap: break-word; }

.premium-overlay { position: relative; }
.premium-overlay .locked { filter: blur(4px) brightness(0.7); pointer-events: none; user-select: none; }
.premium-overlay .unlock { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: rgba(15, 19, 28, 0.85); backdrop-filter: blur(8px); border-radius: var(--radius-lg); padding: 24px; }
[data-theme="light"] .premium-overlay .unlock { background: rgba(255, 255, 255, 0.92); }
.premium-overlay .unlock h3 { color: var(--gold); margin-bottom: 8px; }
.premium-overlay .unlock p { color: var(--text-2); margin-bottom: 20px; max-width: 360px; }

.aeo-faq { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.aeo-faq-header { padding: 16px 20px; font-family: var(--mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--gold); border-bottom: 1px solid var(--border); background: var(--bg-2); }
.aeo-q { padding: 18px 20px; border-bottom: 1px solid var(--border); }
.aeo-q:last-child { border-bottom: none; }
.aeo-q-title { font-family: var(--serif); font-size: 1.05rem; font-weight: 500; margin: 0 0 10px; color: var(--text); }
.aeo-q-answer { color: var(--text-2); }
.aeo-q-answer p { margin: 0 0 8px; }
.aeo-q-answer p:last-child { margin-bottom: 0; }

.faq { margin: 24px 0; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; cursor: pointer; font-weight: 500; color: var(--text); user-select: none; gap: 16px; }
.faq-question:hover { color: var(--gold); }
.faq-toggle { font-size: 1.4rem; color: var(--gold); font-family: var(--mono); transition: transform var(--t-base); flex-shrink: 0; line-height: 1; }
.faq-item.open .faq-toggle { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height var(--t-base); color: var(--text-2); }
.faq-item.open .faq-answer { max-height: 1200px; padding-bottom: 14px; }

.cta-block { background: linear-gradient(135deg, var(--surface) 0%, var(--bg-2) 100%); border: 1px solid var(--gold-line); border-radius: var(--radius-xl); padding: 32px 20px; text-align: center; position: relative; overflow: hidden; }
@media (min-width: 640px) { .cta-block { padding: 40px 32px; } }
.cta-block::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at top, var(--gold-dim), transparent 70%); pointer-events: none; }
.cta-block > * { position: relative; }
.cta-block h2 { margin: 16px 0; }
.cta-block p { max-width: 600px; margin: 0 auto 20px; }

.persona-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; transition: all var(--t-base); min-width: 0; }
.persona-card:hover { border-color: var(--gold-line); transform: translateY(-2px); }
.persona-icon { width: 48px; height: 48px; color: var(--gold); margin-bottom: 16px; }
.persona-card h4 { font-family: var(--serif); font-size: 1.1rem; margin: 0 0 8px; }
.persona-card p { font-size: 0.9rem; color: var(--text-2); margin: 0 0 12px; }
.persona-card .quote { font-style: italic; color: var(--text-3); font-size: 0.84rem; padding-top: 12px; border-top: 1px dashed var(--border); }

.stats-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .stats-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
.counter-block { text-align: center; min-width: 0; }
.counter-block .num { display: block; font-family: var(--serif); font-size: clamp(1.6rem, 4vw, 3rem); color: var(--gold); font-weight: 500; line-height: 1; }
.counter-block .label { font-family: var(--mono); font-size: 0.72rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 8px; }

.article { max-width: 760px; margin: 0 auto; padding: 48px 16px; }
@media (min-width: 768px) { .article { padding: 64px 24px; } }
.article-header { margin-bottom: 32px; }
.article-header h1 { margin: 16px 0 16px; }
.article .body p, .article .body ul, .article .body ol { font-size: 1rem; line-height: 1.7; }
.article .body h2 { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--border); }
.article .body h3 { margin-top: 28px; }
.article .body blockquote { margin: 24px 0; padding: 14px 20px; background: var(--surface); border-left: 3px solid var(--gold); font-style: italic; color: var(--text-2); border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.article .body table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 0.92rem; }
.article .body th, .article .body td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.article .body th { font-family: var(--mono); font-size: 0.78rem; text-transform: uppercase; color: var(--gold); background: var(--bg-2); }

.reading-progress { position: fixed; top: 0; left: 0; height: 3px; background: var(--gold); width: 0%; z-index: 1000; transition: width 0.1s linear; }

.fade-up { opacity: 0; transform: translateY(20px); animation: fadeUp 0.6s ease-out forwards; }
.fade-up-1 { animation-delay: 0.1s; } .fade-up-2 { animation-delay: 0.2s; } .fade-up-3 { animation-delay: 0.3s; }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

/* ===== Calculators / Tools ===== */
.calc-card { background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--radius-lg); padding: 20px; margin: 16px 0; }
@media (min-width: 640px) { .calc-card { padding: 28px; } }
.calc-result { padding: 20px; background: var(--gold-dim); border: 1px solid var(--gold-line); border-radius: var(--radius-md); margin-top: 20px; }
.calc-result h4 { color: var(--gold); margin: 0 0 12px; font-family: var(--mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; }
.calc-result .value { font-family: var(--serif); font-size: clamp(1.6rem, 4vw, 2.4rem); color: var(--gold); font-weight: 500; line-height: 1.1; }
.calc-result .breakdown { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--gold-line); font-size: 0.92rem; color: var(--text-2); }
.calc-result .row { display: flex; justify-content: space-between; padding: 4px 0; gap: 12px; }
.calc-result .row span:last-child { color: var(--text); font-family: var(--mono); }

.bar-chart { display: grid; gap: 10px; margin: 16px 0; }
.bar-row { display: grid; grid-template-columns: minmax(80px, 30%) 1fr minmax(50px, 80px); gap: 10px; align-items: center; font-size: 0.9rem; }
.bar-row .label { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row .bar { background: var(--bg-2); border-radius: 4px; height: 24px; position: relative; overflow: hidden; }
.bar-row .bar-fill { height: 100%; background: linear-gradient(90deg, var(--gold-dim), var(--gold)); border-radius: 4px; transition: width 1s cubic-bezier(0.4, 0, 0.2, 1); }
.bar-row .value { font-family: var(--mono); color: var(--gold); text-align: right; font-weight: 600; font-size: 0.85rem; }

/* SEO content blocks */
.tldr-box { background: var(--gold-dim); border-left: 3px solid var(--gold); padding: 16px 20px; border-radius: 0 var(--radius-md) var(--radius-md) 0; margin: 24px 0; }
.tldr-box .label { font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--gold); margin-bottom: 8px; font-weight: 600; }
.tldr-box p { margin: 0; color: var(--text); font-weight: 500; }

.callout { background: var(--surface); border: 1px solid var(--gold-line); border-radius: var(--radius-md); padding: 16px 20px; margin: 24px 0; display: flex; gap: 14px; align-items: flex-start; }
.callout-icon { font-size: 1.5rem; flex-shrink: 0; }
.callout-body { flex: 1; }
.callout-body p { margin: 0 0 8px; }
.callout-body p:last-child { margin: 0; }

/* Country page widgets */
.country-hero { padding: 32px 0 24px; border-bottom: 1px solid var(--border); }
.country-hero-flag { font-size: 4rem; line-height: 1; }
.country-stats { display: grid; gap: 12px; grid-template-columns: 1fr; margin: 24px 0; }
@media (min-width: 640px) { .country-stats { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .country-stats { grid-template-columns: repeat(4, 1fr); } }
.country-stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px 16px; }
.country-stat .label { font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-3); margin-bottom: 6px; }
.country-stat .value { font-family: var(--serif); font-size: 1.3rem; color: var(--gold); font-weight: 500; }
.country-stat .value.small { font-size: 1rem; line-height: 1.3; }

.toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px 20px; margin: 24px 0; }
.toc-label { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--gold); margin-bottom: 10px; font-weight: 600; }
.toc ul { list-style: none; padding: 0; margin: 0; }
.toc li { padding: 4px 0; }
.toc a { color: var(--text-2); border: none; font-size: 0.92rem; }
.toc a:hover { color: var(--gold); }

/* Sticky CTA mobile */
.sticky-cta { position: fixed; bottom: 12px; left: 12px; right: 12px; background: var(--surface); border: 1px solid var(--gold-line); border-radius: var(--radius-md); padding: 10px 14px; display: none; align-items: center; justify-content: space-between; gap: 12px; z-index: 100; box-shadow: var(--shadow-lg); transform: translateY(150%); transition: transform var(--t-base); }
.sticky-cta.is-visible { transform: translateY(0); }
@media (max-width: 768px) { .sticky-cta { display: flex; } }

/* Heatmap */
.heatmap-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 4px; }
.heatmap-grid { display: grid; grid-template-columns: repeat(53, 1fr); gap: 2px; min-width: 540px; }
.heatmap-cell { aspect-ratio: 1; background: var(--bg-2); border-radius: 2px; cursor: pointer; transition: transform var(--t-fast); }
.heatmap-cell:hover { transform: scale(1.5); z-index: 1; }
.heatmap-cell[data-c="RU"] { background: rgba(226, 114, 91, 0.6); }
.heatmap-cell[data-c="GE"] { background: rgba(93, 191, 168, 0.6); }
.heatmap-cell[data-c="AE"] { background: rgba(230, 181, 102, 0.6); }
.heatmap-cell[data-c="RS"] { background: rgba(107, 143, 199, 0.6); }
.heatmap-cell[data-c="TR"] { background: rgba(180, 80, 80, 0.6); }
