:root {
  --bg: #fdfaf7;
  --bg-2: #f9f0ea;
  --bg-3: #f5e6dc;
  --card: #ffffff;
  --card-border: #f0d7c8;
  --accent: var(--brand-primary, #d4729d);
  --accent-2: var(--brand-accent, #8ab8d4);
  --accent-3: #b89cd4;
  --text: #2a2530;
  --text-2: #6a5f70;
  --text-3: #9c92a5;
  --border: #f0d7c8;
  --border-light: #f8e6db;
  --red: #d47272;
  --green: #82b58c;
  --radius: 16px;
  --radius-sm: 10px;
  --font-sans: 'Quicksand', 'Comfortaa', -apple-system, system-ui, sans-serif;
  --shadow-sm: 0 2px 8px rgba(212,114,157,0.08);
  --shadow: 0 4px 20px rgba(212,114,157,0.12);
  --max-w: 1200px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-sans); background: var(--bg); color: var(--text); line-height: 1.65; min-height: 100vh; font-weight: 400; font-size: 15px; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--accent-2); }
img { max-width: 100%; height: auto; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 28px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--radius-sm); }

.header { background: var(--bg); border-bottom: 2px dashed var(--border); }
.header-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; height: 76px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 700; color: var(--text); }
.logo:hover { color: var(--accent); }
.logo-img { display: block; height: 42px; max-width: 200px; object-fit: contain; border-radius: var(--radius-sm); }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a { padding: 8px 16px; border-radius: var(--radius); color: var(--text-2); font-size: 14px; font-weight: 600; transition: all .2s ease; }
.nav a:hover, .nav a.active { color: var(--accent); background: var(--bg-2); }
.header-right { display: flex; gap: 12px; align-items: center; }
.lang-switch { display: flex; background: var(--bg-2); border-radius: var(--radius); padding: 3px; }
.lang-btn { background: transparent; border: none; padding: 6px 12px; font-size: 12px; color: var(--text-2); font-weight: 600; border-radius: 8px; }
.lang-btn.active { background: var(--accent); color: white; }
.nav-toggle { display: none; background: transparent; border: 2px solid var(--border); padding: 8px; border-radius: var(--radius-sm); }
.nav-toggle-bar { display: block; width: 18px; height: 2px; background: var(--accent); margin: 3px 0; border-radius: 1px; }

main { min-height: 60vh; }
.section { padding: 56px 0; }
.section-title { font-size: 32px; font-weight: 700; margin-bottom: 36px; text-align: center; color: var(--text); }
.section-title::after { content: ''; display: block; width: 60px; height: 4px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 2px; margin: 12px auto 0; }

.hero { padding: 80px 0 60px; background: linear-gradient(135deg, var(--bg) 0%, var(--bg-2) 100%); text-align: center; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: -100px; right: -100px; width: 300px; height: 300px; border-radius: 50%; background: var(--accent); opacity: 0.08; }
.hero::after { content: ''; position: absolute; bottom: -100px; left: -100px; width: 250px; height: 250px; border-radius: 50%; background: var(--accent-2); opacity: 0.08; }
.hero .container { position: relative; z-index: 1; max-width: 800px; }
.hero h1 { font-size: 44px; font-weight: 700; line-height: 1.2; margin-bottom: 18px; letter-spacing: -0.02em; }
.hero p { font-size: 17px; color: var(--text-2); margin-bottom: 32px; line-height: 1.6; }

.exchange-selector { display: grid; grid-template-columns: 1fr auto 1fr auto; gap: 16px; align-items: end; padding: 24px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin-top: 24px; text-align: left; }
.selector-group { display: flex; flex-direction: column; gap: 6px; }
.selector-label { font-size: 12px; color: var(--text-2); font-weight: 600; }
.selector-select { padding: 12px 16px; border: 2px solid var(--border); background: var(--bg); font-family: inherit; font-size: 14px; color: var(--text); border-radius: var(--radius-sm); font-weight: 500; }
.selector-swap { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border: none; width: 48px; height: 48px; font-size: 18px; color: white; border-radius: 50%; box-shadow: var(--shadow-sm); }

.btn-primary { display: inline-block; padding: 13px 32px; background: linear-gradient(135deg, var(--accent), var(--accent-3)); color: white; border: none; border-radius: var(--radius); font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; text-decoration: none; transition: all .2s ease; box-shadow: var(--shadow-sm); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: white; }
.btn-secondary { display: inline-block; padding: 13px 32px; background: var(--bg); color: var(--accent); border: 2px solid var(--accent); border-radius: var(--radius); font-size: 14px; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn-secondary:hover { background: var(--bg-2); color: var(--accent); }
.btn-go { display: inline-block; padding: 8px 18px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: white !important; border-radius: var(--radius); font-size: 13px; font-weight: 700; text-decoration: none; }
.btn-go:hover { transform: translateY(-1px); }

.stats-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 32px 0; }
.stat-item { padding: 28px 20px; background: var(--card); border-radius: var(--radius); text-align: center; box-shadow: var(--shadow-sm); border: 2px solid var(--border-light); }
.stat-value { font-size: 38px; font-weight: 800; background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.stat-label { font-size: 13px; color: var(--text-2); margin-top: 8px; font-weight: 600; }

.pairs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.pair-card { display: flex; align-items: center; gap: 12px; padding: 18px 22px; background: var(--card); border-radius: var(--radius); text-decoration: none; color: var(--text); font-size: 14px; transition: all .2s ease; box-shadow: var(--shadow-sm); border: 2px solid var(--border-light); }
.pair-card:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--text); }
.pair-codes { font-weight: 700; }
.pair-arrow { color: var(--accent); }
.pair-count { margin-left: auto; font-size: 12px; color: var(--text-3); font-weight: 500; }

.rate-table-wrap { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); border: 2px solid var(--border-light); }
.rate-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rate-table thead th { background: var(--bg-2); padding: 14px 18px; text-align: left; font-weight: 700; font-size: 12px; color: var(--text-2); }
.rate-table tbody td { padding: 14px 18px; border-bottom: 1px solid var(--border-light); }
.rate-table tbody tr:last-child td { border-bottom: none; }
.rate-table tbody tr:hover { background: var(--bg-2); }
.rate-value { font-weight: 700; color: var(--text); }
.rate-best { color: var(--green); }

.exchanger-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.exchanger-name a { color: var(--text); font-weight: 700; }
.exchanger-name a:hover { color: var(--accent); }
.trusted-badge, .licensed-badge { display: inline-block; padding: 3px 10px; font-size: 11px; font-weight: 700; border-radius: 12px; }
.trusted-badge { background: #e0f2e6; color: var(--green); }
.licensed-badge { background: #e6efef; color: var(--accent-2); }

.exchanger-profile { padding: 32px; background: var(--card); border-radius: var(--radius); margin-bottom: 32px; box-shadow: var(--shadow-sm); border: 2px solid var(--border-light); }
.exchanger-profile h1 { font-size: 30px; font-weight: 700; margin-bottom: 12px; }

.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-size: 14px; font-weight: 600; margin-bottom: 24px; }
.back-link:hover { color: var(--accent-2); }

.faq-list { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.faq-item { background: var(--card); border-radius: var(--radius); padding: 22px 26px; box-shadow: var(--shadow-sm); border: 2px solid var(--border-light); }
.faq-item summary { cursor: pointer; font-size: 16px; font-weight: 700; list-style: none; position: relative; padding-right: 36px; color: var(--text); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ''; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; background: var(--accent); border-radius: 50%; transition: transform .25s ease; }
.faq-item summary::before { content: '+'; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: white; font-weight: 700; z-index: 1; line-height: 1; }
.faq-item[open] summary::before { content: '−'; }
.faq-answer { margin-top: 14px; color: var(--text-2); font-size: 14px; line-height: 1.7; }

.exchanger-form { max-width: 640px; margin: 0 auto; padding: 36px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 2px solid var(--border-light); }
.field { margin-bottom: 22px; }
.field-label { display: block; font-size: 13px; color: var(--text); font-weight: 700; margin-bottom: 8px; }
.field-hint { display: block; font-size: 12px; color: var(--text-3); margin-top: 6px; }
.field input, .field textarea { width: 100%; padding: 12px 16px; background: var(--bg); border: 2px solid var(--border); border-radius: var(--radius-sm); font-family: inherit; font-size: 14px; color: var(--text); transition: border-color .2s ease; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.req { color: var(--red); }
.form-check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.form-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; }
.form-error, .form-success { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 16px; }
.form-error { background: #fbe6e6; color: var(--red); }
.form-success { background: #e6f5e9; color: var(--green); }
.honeypot { position: absolute; left: -9999px; }

.empty-state { padding: 60px; text-align: center; color: var(--text-3); font-size: 16px; background: var(--bg-2); border-radius: var(--radius); }

.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.article-card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); border: 2px solid var(--border-light); transition: all .25s ease; }
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--accent); }
.article-card-link { display: block; padding: 24px 26px; text-decoration: none; color: var(--text); }
.article-card-title { font-size: 18px; font-weight: 700; line-height: 1.35; margin-bottom: 10px; }
.article-card-excerpt { color: var(--text-2); font-size: 14px; line-height: 1.65; margin-bottom: 12px; }
.article-card-meta { display: flex; gap: 12px; font-size: 12px; color: var(--text-3); font-weight: 600; }
.article-body { max-width: 740px; margin: 0 auto; padding: 40px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 2px solid var(--border-light); }
.article-head { margin-bottom: 32px; padding-bottom: 22px; border-bottom: 2px dashed var(--border); }
.article-head h1 { font-size: 32px; font-weight: 700; line-height: 1.2; margin-bottom: 12px; }
.article-meta { display: flex; gap: 16px; font-size: 13px; color: var(--text-2); font-weight: 600; }
.article-content { font-size: 16px; line-height: 1.75; }
.article-content p { margin-bottom: 18px; }
.article-content h2 { font-size: 24px; font-weight: 700; margin: 32px 0 14px; }
.article-content h3 { font-size: 19px; font-weight: 700; margin: 24px 0 10px; }
.article-content a { color: var(--accent); }
.article-content code { background: var(--bg-2); padding: 2px 8px; border-radius: 6px; font-size: 0.9em; }
.article-content blockquote { background: var(--bg-2); padding: 16px 24px; margin: 20px 0; border-radius: var(--radius-sm); border-left: 4px solid var(--accent); color: var(--text-2); }

.pricing-card { max-width: 480px; margin: 0 auto; background: var(--card); border-radius: var(--radius); padding: 44px 36px; text-align: center; box-shadow: var(--shadow); border: 2px solid var(--border-light); }
.pricing-badge { display: inline-block; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: white; padding: 5px 16px; border-radius: 14px; font-size: 11px; font-weight: 700; margin-bottom: 16px; }
.pricing-price { display: flex; align-items: baseline; justify-content: center; gap: 6px; margin-bottom: 6px; }
.pricing-amount { font-size: 60px; font-weight: 800; background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.pricing-currency { font-size: 18px; color: var(--text-2); font-weight: 700; }
.pricing-period { font-size: 13px; color: var(--text-2); margin-bottom: 28px; }
.pricing-features { text-align: left; margin: 28px 0; font-size: 14px; }
.pricing-features li { padding: 6px 0 6px 26px; position: relative; color: var(--text-2); }
.pricing-features li::before { content: '♡'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.subscribe-form { display: flex; flex-direction: column; gap: 14px; }
.subscribe-submit { padding: 14px; font-size: 14px; }
.subscribe-note { font-size: 12px; color: var(--text-3); text-align: center; }

.footer { background: var(--bg-2); padding: 60px 0 28px; margin-top: 80px; }
.footer-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 28px; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer-title { font-size: 14px; font-weight: 700; margin-bottom: 14px; color: var(--text); }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: 14px; color: var(--text-2); }
.footer-links a:hover { color: var(--accent); }
.footer-text { font-size: 13px; color: var(--text-2); line-height: 1.65; }

@media (max-width: 768px) {
  .nav { display: none; position: absolute; top: 76px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--bg); border-bottom: 2px dashed var(--border); padding: 8px 0; z-index: 100; }
  .nav.open { display: flex; }
  .nav a { padding: 14px 28px; border-radius: 0; border-bottom: 1px dashed var(--border-light); }
  .nav-toggle { display: block; }
  .hero h1 { font-size: 32px; }
  .section-title { font-size: 26px; }
  .stats-strip { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .exchange-selector { grid-template-columns: 1fr; }
  .selector-swap { width: 100%; border-radius: var(--radius); }
}


/* ==== shared from app.js dynamic rendering ==== */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.3s ease forwards; }

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 8px;
}
.how-card {
  text-align: center;
  padding: 32px 24px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  transition: all 0.2s ease;
}
.how-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}
.how-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: var(--bg-2);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm, var(--radius));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--accent);
}
.how-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}
.how-card p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.55;
  margin: 0;
}
@media (max-width: 768px) {
  .how-grid { grid-template-columns: 1fr; gap: 14px; }
  .how-card { padding: 20px 18px; }
}


.exchanger-form .field-check { flex-direction: row; align-items: center; }
.exchanger-form .form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}
.exchanger-form .form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
}
.exchanger-form .honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  pointer-events: none;
}
.exchanger-form .field-hint {
  display: block;
  margin-top: 4px;
}


.subscription-page .pricing-card { margin-top: 8px; }
.page-payment main { padding-top: 12px; }
.subscribe-error { padding: 10px 14px; border-radius: var(--radius-sm, var(--radius)); font-size: 14px; margin-top: 10px; color: var(--red, #c00); background: rgba(255,0,0,0.08); }


/* logo is white by default — invert for light themes */
.header .logo-img { filter: brightness(0) saturate(0); }


/* ===== stats-strip: ensure single row for 4 items ===== */
.stats-strip {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  flex-wrap: nowrap !important;
}
.stats-strip .stat-item { min-width: 0; }
@media (max-width: 768px) {
  .stats-strip { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 480px) {
  .stats-strip { grid-template-columns: 1fr !important; }
}
