:root {
  --navy: #071a5c;
  --navy-2: #0b2a8f;
  --blue: #1d43ff;
  --blue-dark: #0f2fd6;
  --green: #0f8a4a;
  --red: #d22f2f;
  --text: #0b1020;
  --muted: #5b6475;
  --line: #e5e8ef;
  --grey: #f2f4f8;
  --white: #fff;
  --radius: 20px;
  --shadow: 0 18px 50px rgba(7, 26, 92, .12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif; color: var(--text); background: var(--white); line-height: 1.6; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
.container { max-width: 1220px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.p { margin-bottom: 16px; font-size: 17px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.flag { border-radius: 50%; object-fit: cover; vertical-align: middle; flex: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; border-radius: 999px; background: var(--blue); color: #fff; font-weight: 600; border: 0; cursor: pointer; font-size: 16px; transition: background .15s, transform .15s; }
.btn:hover { background: var(--blue-dark); text-decoration: none; transform: translateY(-1px); }
.btn-light { background: var(--grey); color: var(--text); }
.btn-light:hover { background: #e5e8f0; }
.btn-outline { background: transparent; color: var(--text); border: 1.5px solid var(--text); }
.btn-outline:hover { background: var(--text); color: #fff; }
.btn-dark { background: #000; }
.btn-dark:hover { background: #222; }
.btn-white { background: #fff; color: var(--text); }
.btn-white:hover { background: #eef1ff; }

/* Header */
.site-header { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 50; }
.nav { display: flex; align-items: center; gap: 32px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 20px; letter-spacing: -.3px; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 40px; height: 40px; border-radius: 50%; border: 2.5px solid #fff; display: grid; place-items: center; font-weight: 800; font-size: 16px; line-height: 1; position: relative; }
.brand-mark small { position: absolute; bottom: -4px; right: -8px; background: var(--green); font-size: 9px; padding: 2px 4px; border-radius: 6px; }
.brand-tld { color: #7ee2a8; }
.nav-main { display: flex; gap: 28px; flex: 1; }
.nav-main a { color: #fff; font-weight: 500; font-size: 15px; }
.pill { background: #fff; color: var(--navy); padding: 9px 18px; border-radius: 999px; font-weight: 600; font-size: 15px; }
.pill:hover { text-decoration: none; background: #e8ecff; }
.subnav { background: rgba(255, 255, 255, .08); border-top: 1px solid rgba(255, 255, 255, .06); }
.subnav-inner { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-top: 6px; padding-bottom: 6px; }
.subnav-inner::-webkit-scrollbar { display: none; }
.subnav a { color: #fff; white-space: nowrap; padding: 7px 16px; border-radius: 10px; font-size: 15px; font-weight: 500; }
.subnav a:hover { background: rgba(255, 255, 255, .1); text-decoration: none; }
.subnav a.active { background: var(--blue); font-weight: 700; }

/* Hero + converter */
.hero { background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; padding: 64px 0 40px; position: relative; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 190px; background: #fff; border-radius: 50% 50% 0 0 / 60px 60px 0 0; }
.hero-inner { position: relative; z-index: 1; text-align: center; }
.hero h1 { font-size: clamp(28px, 4vw, 42px); letter-spacing: -1px; line-height: 1.15; font-weight: 700; }
.hero-sub { font-size: 20px; margin: 12px 0 34px; opacity: .92; }
.converter { max-width: 950px; margin: 0 auto; padding: 32px; text-align: left; box-shadow: var(--shadow); border: 0; color: var(--text); }
.conv-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: end; }
.field { min-width: 0; }
.field label { display: block; color: var(--muted); font-size: 15px; margin: 0 0 6px 4px; }
.field-box { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 14px; padding: 6px 12px 6px 18px; min-height: 72px; transition: border-color .15s, box-shadow .15s; }
.field-box:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29, 67, 255, .15); }
.field-box input, .result { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 24px; font-weight: 700; color: var(--text); background: transparent; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select { display: flex; align-items: center; gap: 8px; flex: 0 1 auto; min-width: 0; max-width: 60%; }
.select select { border: 0; font: inherit; font-weight: 600; font-size: 16px; color: var(--text); background: transparent; cursor: pointer; width: 100%; min-width: 0; text-overflow: ellipsis; padding: 8px 0; outline: 0; }
.swap { width: 46px; height: 46px; margin-bottom: 13px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 20px; cursor: pointer; color: var(--blue); transition: transform .2s, background .15s; }
.swap:hover { background: var(--grey); transform: rotate(180deg); }
.conv-foot { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 26px; flex-wrap: wrap; }
.big-rate { font-size: 26px; font-weight: 700; letter-spacing: -.4px; }
.big-rate .tail { color: #9aa1b0; }
.conv-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-note { position: relative; max-width: 950px; margin: 18px auto 0; color: var(--muted); font-size: 13px; }

/* Blue band */
.band { background: var(--blue); color: #fff; padding: 56px 0; text-align: center; background-image: repeating-radial-gradient(circle at 80% 120%, rgba(255,255,255,.05) 0 2px, transparent 2px 14px); }
.band h2 { font-size: clamp(26px, 3.6vw, 40px); letter-spacing: -1px; font-weight: 600; margin-bottom: 10px; }
.band p { font-size: 18px; opacity: .95; max-width: 760px; margin: 0 auto; }

/* Sections */
.section { padding: 80px 0; }
.section-grey { background: var(--grey); }
.section-title { font-size: clamp(28px, 4vw, 46px); font-weight: 500; letter-spacing: -1.4px; text-align: center; margin-bottom: 18px; line-height: 1.15; }
.section-title em { font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
.section-title.left { text-align: left; }
.section-lead { text-align: center; color: var(--muted); font-size: 17px; max-width: 820px; margin: 0 auto 36px; }

/* Rate tables */
.tables { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; max-width: 1030px; margin: 40px auto 0; }
.table-title { text-align: center; font-weight: 500; font-size: 17px; margin-bottom: 18px; }
.rate-table { overflow: hidden; }
.rt-head, .rt-row { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; gap: 12px; }
.rt-head { background: #fafbfc; border-bottom: 1px solid var(--line); font-weight: 500; font-size: 15px; }
.rt-head span { display: inline-flex; align-items: center; gap: 10px; }
.rt-row { border-bottom: 1px solid var(--line); font-size: 15px; }
.rt-row:last-child { border-bottom: 0; }
.rt-row:hover { background: #fafbff; }
.rt-row span:last-child { font-weight: 500; text-align: right; }
.rt-amt { color: var(--text); }

/* Chart */
.chart-card { padding: 34px 40px 30px; border: 0; }
.chart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.chart-rate { font-size: 26px; font-weight: 600; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.badge { font-size: 14px; padding: 4px 10px; border-radius: 999px; font-weight: 600; }
.badge.up { background: #e3f6eb; color: var(--green); }
.badge.down { background: #fde8e8; color: var(--red); }
.tabs { display: flex; background: var(--grey); border-radius: 999px; padding: 4px; }
.tabs button, .seg button { border: 0; background: transparent; font: inherit; font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 999px; cursor: pointer; color: var(--muted); }
.tabs button.on { background: #fff; color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.chart-wrap { position: relative; height: 340px; }
#chartSvg { width: 100%; height: 100%; display: block; overflow: visible; touch-action: pan-y; }
.chart-tip { position: absolute; top: 0; pointer-events: none; background: var(--navy); color: #fff; font-size: 13px; padding: 7px 10px; border-radius: 8px; white-space: nowrap; transform: translateX(-50%); }
.chart-axis { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.stats-panel { background: var(--blue); padding: 32px; background-image: repeating-linear-gradient(170deg, rgba(255,255,255,.12) 0 2px, transparent 2px 9px); }
.seg { display: inline-flex; background: rgba(255,255,255,.75); border-radius: 999px; padding: 5px; margin-bottom: 18px; }
.seg button { color: var(--text); }
.seg button.on { background: #000; color: #fff; }
.stats-table { overflow-x: auto; }
.stats-table table { width: 100%; border-collapse: collapse; min-width: 420px; }
.stats-table th { text-transform: uppercase; font-size: 12px; letter-spacing: .08em; color: var(--muted); font-weight: 600; text-align: right; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.stats-table th:first-child, .stats-table td:first-child { text-align: left; }
.stats-table td { padding: 14px 16px; text-align: right; font-weight: 600; font-size: 15px; border-bottom: 1px solid var(--line); }
.stats-table td:first-child { font-weight: 500; }
.stats-table tr:last-child td { border-bottom: 0; }
.chip { background: #e3f6eb; color: var(--green); font-size: 13px; padding: 3px 9px; border-radius: 999px; font-weight: 500; }

/* Pairings + live cards */
.pair-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 36px; }
.pair-link { display: flex; align-items: center; gap: 12px; padding: 14px 18px; color: var(--text); font-weight: 500; transition: box-shadow .15s, transform .15s; }
.pair-link:hover { text-decoration: none; box-shadow: var(--shadow); transform: translateY(-2px); }
.flags { display: inline-flex; flex: none; }
.flags .flag + .flag { margin-left: -8px; box-shadow: 0 0 0 2px #fff; }
.chev { margin-left: auto; font-size: 22px; color: var(--muted); line-height: 1; }
.cards4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 36px; }
.live { padding: 22px; }
.live-name { display: flex; align-items: center; gap: 10px; font-weight: 600; margin-bottom: 8px; }
.live-val { font-size: 24px; font-weight: 700; letter-spacing: -.4px; margin: 2px 0; }
.pos { color: var(--green); }
.neg { color: var(--red); }
.live a { display: inline-block; margin-top: 10px; font-weight: 500; }

/* Info */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.info { padding: 30px; }
.info h3 { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 600; margin-bottom: 12px; }
.info p { margin-bottom: 22px; }
.summary { margin-top: 24px; padding: 30px; }
.summary h3 { font-size: 20px; font-weight: 600; margin-bottom: 10px; }
.summary strong { color: var(--text); }

/* FAQ */
.faq { max-width: 860px; }
.faq .section-title { margin-bottom: 40px; }
.faq details { border-bottom: 1px solid var(--line); padding: 22px 0; }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; font-size: 20px; font-weight: 500; letter-spacing: -.3px; }
.faq summary::-webkit-details-marker { display: none; }
.pm { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%; flex: none; position: relative; }
.pm::before, .pm::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; background: var(--text); transform: translate(-50%, -50%); }
.pm::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform .2s; }
details[open] .pm::after { transform: translate(-50%, -50%) rotate(0); }
.faq details p { color: var(--muted); margin-top: 14px; max-width: 720px; }

/* CTA + footer */
.cta { background: var(--blue); color: #fff; text-align: center; padding: 90px 0; background-image: repeating-radial-gradient(circle at 20% -40%, rgba(255,255,255,.05) 0 2px, transparent 2px 16px); }
.cta h2 { font-size: clamp(30px, 4.4vw, 52px); font-weight: 500; letter-spacing: -1.5px; }
.cta p { font-size: 19px; margin: 10px 0 30px; opacity: .95; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.site-footer { background: linear-gradient(135deg, #04155a, #0a2aa0); color: #fff; padding: 64px 0 40px; }
.foot-cols { display: grid; grid-template-columns: repeat(5, 1fr); gap: 28px; }
.foot-cols h4 { font-size: 17px; margin-bottom: 16px; }
.foot-cols a { display: block; color: #fff; font-size: 14px; margin-bottom: 11px; opacity: .9; }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 48px; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.15); flex-wrap: wrap; }
.foot-bottom p { font-size: 14px; opacity: .85; text-align: right; }

/* Info pages */
.page-hero { background: var(--navy); color: #fff; padding: 56px 0; }
.page-hero h1 { font-size: clamp(30px, 4vw, 44px); letter-spacing: -1px; }
.prose { max-width: 820px; }
.prose p { font-size: 17px; margin-bottom: 18px; color: #2b3242; }
.prose h2 { font-size: 24px; margin: 30px 0 10px; letter-spacing: -.4px; }

.sitemap-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px 24px; margin-bottom: 10px; }
.sitemap-list a { display: block; padding: 8px 0; border-bottom: 1px solid var(--line); }

/* Responsive */
@media (max-width: 1000px) {
  .pair-grid, .cards4 { grid-template-columns: repeat(2, 1fr); }
  .foot-cols { grid-template-columns: repeat(3, 1fr); }
  .stats-grid { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 800px) {
  .nav-main { display: none; }
  .nav { justify-content: space-between; height: 64px; }
  .conv-row { grid-template-columns: 1fr; }
  .swap { margin: 0 auto; transform: rotate(90deg); }
  .swap:hover { transform: rotate(270deg); }
  .tables, .info-grid { grid-template-columns: 1fr; gap: 32px; }
  .section { padding: 56px 0; }
  .chart-card { padding: 22px 16px; }
  .chart-wrap { height: 240px; }
}
@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .hero { padding: 40px 0 24px; }
  .hero-sub { font-size: 17px; margin-bottom: 24px; }
  .converter { padding: 20px 16px; }
  .field-box { min-height: 62px; padding-left: 14px; }
  .field-box input, .result { font-size: 21px; }
  .select select { font-size: 14px; max-width: 140px; }
  .big-rate { font-size: 21px; }
  .conv-actions, .conv-actions .btn { width: 100%; }
  .pair-grid, .cards4 { grid-template-columns: 1fr; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .foot-bottom p { text-align: left; }
  .faq summary { font-size: 17px; }
  .stats-panel { padding: 18px 12px; }
  .tabs button { padding: 7px 10px; }
  .brand { font-size: 18px; }
  .pill { padding: 8px 14px; font-size: 14px; }
}
