/* =========================================================
   Brand colors come from the admin panel (--yellow, --ink).
   Everything else is defined here.
   ========================================================= */
:root {
  --yellow: #FFDE00;
  --ink: #000000;
  --paper: #FFFFFF;
  --mist: #F2F3F5;
  --line: #E3E5E8;
  --muted: #5F636B;
  --up: #0A8F4E;
  --down: #D3302F;
  --up-on-ink: #3DD68C;
  --down-on-ink: #FF6B5E;
  --muted-on-ink: #9A9EA6;
  --focus: #0A84FF;
  --r-lg: 24px;
  --r-md: 14px;
  --wrap: 1180px;
  --font: "Geist", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.5; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.1; margin: 0; letter-spacing: -0.025em; }
h1 { font-size: clamp(2.25rem, 1.6rem + 3.2vw, 3.75rem); font-weight: 700; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.4rem, 1.2rem + 0.9vw, 1.9rem); font-weight: 700; }
h3 { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { top: 12px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- buttons & links ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 999px; font-weight: 600; font-size: 0.97rem; text-decoration: none; border: 0; cursor: pointer; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #2a2a2a; }
.btn-ghost { background: var(--mist); color: var(--ink); min-height: 40px; padding: 0 16px; font-size: 0.92rem; }
.btn-ghost:hover { background: var(--line); }
.link { font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; text-decoration-color: var(--yellow); }
.link:hover { text-decoration-color: var(--ink); }
.muted { color: var(--muted); }

/* ---------- header ---------- */
.site-h { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, 0.86); -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px); border-bottom: 1px solid rgba(0, 0, 0, 0.06); }
.h-in { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.logo-img { max-height: 36px; width: auto; }
.wordmark { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.2rem; letter-spacing: -0.03em; }
.wordmark i { width: 22px; height: 22px; border-radius: 6px; background: var(--yellow); box-shadow: inset 0 0 0 2px var(--ink); }
.h-nav { margin-left: auto; }
.h-nav ul, .m-nav ul { list-style: none; margin: 0; padding: 0; }
.h-nav ul { display: flex; gap: 4px; }
.h-nav a { display: block; padding: 8px 12px; font-size: 0.94rem; color: var(--muted); text-decoration: none; border-radius: 999px; }
.h-nav a:hover { color: var(--ink); }
.h-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.h-end { display: flex; align-items: center; gap: 10px; }
.langs { display: flex; background: var(--mist); border-radius: 999px; padding: 3px; }
.langs a { padding: 4px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.langs a[aria-current="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
.menu-btn { display: none; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--mist); cursor: pointer; place-items: center; }
.menu-btn svg { width: 22px; height: 22px; }
.m-nav { border-top: 1px solid var(--line); background: var(--paper); height: calc(100dvh - 64px); overflow: auto; padding: 12px 20px 40px; }
.m-nav a { display: block; padding: 14px 0; font-size: 1.75rem; font-weight: 600; letter-spacing: -0.025em; text-decoration: none; border-bottom: 1px solid var(--line); }
.m-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 4px; text-underline-offset: 6px; }
@media (max-width: 920px) {
  .h-nav { display: none; }
  .h-end { margin-left: auto; }
  .menu-btn { display: grid; }
}
@media (min-width: 921px) { .m-nav { display: none !important; } }

/* ---------- hero (home) ---------- */
.hero { background: var(--mist); padding: 28px 0 40px; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.hero-main h1 { max-width: 12ch; }
.upd { color: var(--muted); font-size: 0.92rem; margin-top: 10px; }
.notice { color: var(--muted); font-size: 0.85rem; margin-top: 14px; max-width: 46ch; }
@media (min-width: 960px) {
  .hero { padding: 64px 0 72px; }
  .hero-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 56px; align-items: start; }
  .hero-main { position: sticky; top: 100px; }
}

/* ---------- converter ---------- */
.conv { position: relative; margin-top: 24px; background: var(--paper); border-radius: var(--r-lg); padding: 6px; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 12px 32px -18px rgba(0, 0, 0, 0.18); }
.conv-field { padding: 14px 16px 16px; border-radius: 18px; }
.conv-get { background: var(--mist); }
.conv-field label, .conv-field .lbl { display: block; font-size: 0.85rem; color: var(--muted); font-weight: 500; margin-bottom: 4px; }
.conv-line { display: flex; align-items: center; gap: 12px; }
.conv input, .conv output { flex: 1; min-width: 0; font-size: clamp(1.75rem, 1.3rem + 2vw, 2.4rem); font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; border: 0; background: none; padding: 0; outline: none; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv input:focus-visible { outline: none; }
.conv-field:focus-within { box-shadow: inset 0 0 0 2px var(--ink); }
.conv select { appearance: none; -webkit-appearance: none; border: 0; border-radius: 999px; background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 10px center / 16px; color: #fff; font-weight: 600; font-size: 1rem; padding: 10px 34px 10px 16px; cursor: pointer; }
.conv-get select { background-color: var(--paper); color: var(--ink); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E"); box-shadow: inset 0 0 0 1px var(--line); }
.conv-swap { position: relative; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; margin: -22px auto; border-radius: 50%; border: 4px solid var(--paper); background: var(--yellow); color: var(--ink); cursor: pointer; transition: transform .3s ease; }
.conv-swap svg { width: 20px; height: 20px; stroke-width: 2.2; }
.conv-swap:hover { transform: rotate(180deg); }
.conv-rate { padding: 12px 16px 10px; font-size: 0.9rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.conv-solo .conv { margin-top: 0; }

/* ---------- rate board (the bold element) ---------- */
.board { background: var(--ink); color: #fff; border-radius: var(--r-lg); padding: 8px 8px 4px; }
.board table, .cross-t { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.board table { table-layout: fixed; }
.board thead th:not(:first-child) { width: 30%; }
@media (min-width: 560px) { .board thead th:not(:first-child) { width: 27%; } }
.cur > span { min-width: 0; }
.board thead th { font-size: 0.8rem; font-weight: 500; color: var(--muted-on-ink); text-align: right; padding: 12px 14px 10px; cursor: help; }
.board thead th:first-child { text-align: left; cursor: default; }
.board tbody tr { border-top: 1px solid rgba(255, 255, 255, 0.08); }
.board tbody th { text-align: left; padding: 0; font-weight: 400; }
.board td { text-align: right; padding: 0 14px; font-size: clamp(1.1rem, 0.95rem + 0.6vw, 1.4rem); font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.cur { display: grid; grid-template-columns: 24px auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center; width: 100%; text-align: left; background: none; border: 0; padding: 12px 14px; cursor: pointer; color: #fff; border-radius: 14px; }
.cur .flag { grid-row: 1 / 3; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15); }
.cur .code { font-weight: 600; font-size: 1.06rem; letter-spacing: 0.02em; }
.cur .nm { font-size: 0.8rem; color: var(--muted-on-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board tbody tr:hover { background: rgba(255, 255, 255, 0.05); }
.board tbody tr.on { background: rgba(255, 255, 255, 0.1); box-shadow: inset 4px 0 0 var(--yellow); }
.board-foot { font-size: 0.82rem; color: var(--muted-on-ink); padding: 12px 14px 12px; border-top: 1px solid rgba(255, 255, 255, 0.08); }

/* trend arrows */
.tr { display: inline-block; width: 0; height: 0; margin-right: 8px; vertical-align: 0.2em; }
.tr.up { border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 7px solid var(--up); }
.tr.down { border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 7px solid var(--down); }
.tr.flat { width: 6px; height: 6px; border-radius: 50%; background: var(--line); vertical-align: 0.25em; }
.board .tr.up { border-bottom-color: var(--up-on-ink); }
.board .tr.down { border-top-color: var(--down-on-ink); }
.board .tr.flat { background: #3a3d42; }

/* ---------- cross rates ---------- */
.cross-head h2 { font-size: 1.25rem; }
.cross-t { margin-top: 12px; }
.cross-t th, .cross-t td { padding: 10px 4px; border-top: 1px solid var(--line); }
.cross-t thead th { border-top: 0; font-size: 0.8rem; font-weight: 500; color: var(--muted); text-align: right; padding-bottom: 6px; }
.cross-t thead th:first-child, .cross-t tbody th { text-align: left; }
.cross-t tbody th { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.cross-t .flag { border-radius: 3px; box-shadow: 0 0 0 1px var(--line); }
.cross-t td { text-align: right; font-weight: 500; }
.cross-inline { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px 20px 18px; }
.cross-inline .link, .sheet .link { display: inline-block; margin-top: 16px; }
.rates-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
@media (min-width: 960px) {
  .rates-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 28px; align-items: start; }
  .cross-inline { position: sticky; top: 88px; }
}

/* bottom sheet (phone) / side drawer (desktop) */
.sheet { border: 0; padding: 0; margin: 0; max-width: none; max-height: none; background: var(--paper); color: var(--ink); }
.sheet::backdrop { background: rgba(0, 0, 0, 0.42); }
.sheet[open] { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: 100%; max-height: 86dvh; border-radius: 24px 24px 0 0; overflow: auto; animation: sheet-up .28s cubic-bezier(.2, .8, .2, 1); }
.sheet-body { padding: 26px 20px calc(24px + env(safe-area-inset-bottom)); }
.sheet-x { position: sticky; top: 12px; float: right; margin: 12px 12px 0 0; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--mist); display: grid; place-items: center; cursor: pointer; z-index: 2; }
.sheet-x svg { width: 18px; height: 18px; }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheet-in { from { transform: translateX(100%); } to { transform: none; } }
@media (min-width: 760px) {
  .sheet[open] { left: auto; top: 0; bottom: 0; width: 440px; max-height: none; height: 100dvh; border-radius: 24px 0 0 24px; animation-name: sheet-in; }
  .sheet-body { padding: 32px 28px; }
}

/* ---------- Western Union band ---------- */
.wu { background: var(--yellow); padding: 48px 0; }
.wu-in { max-width: 860px; }
.wu h2 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.75rem); letter-spacing: -0.035em; margin-top: 18px; max-width: 18ch; }
.wu p { margin: 14px 0 24px; max-width: 58ch; font-size: 1.05rem; }
.wu-badge { display: inline-block; border: 1.5px solid var(--ink); border-radius: 999px; padding: 5px 14px; font-size: 0.85rem; font-weight: 600; }
.wu-badge-img { max-height: 44px; width: auto; }
@media (min-width: 960px) { .wu { padding: 72px 0; } }

/* ---------- sections ---------- */
.sec { padding: 44px 0; }
.sec-tight { padding-top: 8px; }
.sec-h { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-top { padding: 32px 0 24px; }
.page-top .lead, .lead { font-size: 1.15rem; color: var(--muted); margin-top: 12px; max-width: 56ch; }
.narrow h2 { margin: 36px 0 12px; }
.narrow h2:first-child { margin-top: 0; }
.narrow p + p { margin-top: 12px; }
.conv-solo { margin-top: 24px; }
.page-top .conv-solo + .muted { margin-top: 12px; font-size: 0.9rem; }
.prose { margin-top: 20px; font-size: 1.08rem; max-width: 64ch; }
.prose p + p { margin-top: 14px; }
@media (min-width: 960px) { .page-top { padding: 56px 0 32px; } .sec { padding: 64px 0; } }

.crumbs { display: flex; align-items: center; gap: 4px; font-size: 0.9rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.crumbs svg { width: 14px; height: 14px; }
.cur-hero { display: grid; gap: 22px; }
.cur-hero h1 { display: flex; align-items: center; gap: 14px; }
.cur-hero h1 .flag { width: 40px; height: 30px; border-radius: 5px; box-shadow: 0 0 0 1px var(--line); }
.cur-sub { font-size: 1.15rem; color: var(--muted); margin-top: 8px; }
.bigrates { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
.bigrates div { background: var(--mist); border-radius: 18px; padding: 16px 18px; }
.bigrates dt { font-size: 0.85rem; color: var(--muted); }
.bigrates dd { margin: 4px 0 0; font-size: clamp(1.9rem, 1.5rem + 1.6vw, 2.6rem); font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.bigrates small { font-size: 0.9rem; color: var(--muted); font-weight: 500; margin-left: 6px; letter-spacing: 0; }
@media (min-width: 960px) { .cur-hero { grid-template-columns: 1fr 460px; align-items: end; } }

.pill-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pill-links a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border-radius: 999px; background: var(--mist); text-decoration: none; font-weight: 600; font-size: 0.92rem; }
.pill-links a:hover { background: var(--line); }
.pill-links span { color: var(--muted); font-weight: 400; }
.pill-links .flag { border-radius: 3px; width: 20px; height: 15px; }

.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 36px 18px 0; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq details p { padding: 0 0 18px; color: var(--muted); }

/* locations */
.locs { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.loc { padding: 20px 0; border-top: 1px solid var(--line); }
.loc:last-child { border-bottom: 1px solid var(--line); }
.loc-row { display: flex; gap: 10px; color: var(--muted); margin-top: 8px; }
.loc-row svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; }
.loc-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
@media (min-width: 760px) {
  .locs { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); column-gap: 40px; }
  .loc:last-child { border-bottom: 0; }
}

/* contact actions */
.acts { list-style: none; padding: 0; margin: 24px 0 0; border-radius: var(--r-lg); background: var(--mist); overflow: hidden; }
.acts li + li { border-top: 1px solid var(--line); }
.act { display: flex; align-items: center; gap: 14px; padding: 18px 18px; text-decoration: none; }
.act:hover { background: var(--line); }
.act > svg:first-child { width: 40px; height: 40px; padding: 9px; border-radius: 50%; background: var(--yellow); flex-shrink: 0; }
.act span { flex: 1; display: flex; flex-direction: column; color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
.act b { color: var(--ink); font-weight: 600; }
.act > svg:last-child { width: 18px; height: 18px; color: var(--muted); }

/* ---------- footer ---------- */
.site-f { background: var(--ink); color: #fff; padding: 52px 0 28px; margin-top: 24px; }
.f-in { display: grid; gap: 32px; grid-template-columns: 1fr 1fr; }
.f-brand { grid-column: 1 / -1; max-width: 380px; }
.f-brand p { color: var(--muted-on-ink); margin-top: 14px; font-size: 0.95rem; }
.f-brand .f-wu { color: var(--yellow); font-weight: 600; font-size: 0.88rem; }
.site-f .wordmark i { box-shadow: none; }
.f-col h2 { font-size: 0.95rem; letter-spacing: 0; color: #fff; margin-bottom: 12px; }
.f-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.f-col a, .f-col li { color: var(--muted-on-ink); text-decoration: none; font-size: 0.95rem; }
.f-col a:hover { color: #fff; }
.f-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 44px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.82rem; color: var(--muted-on-ink); }
.f-bottom a { color: var(--muted-on-ink); }
@media (min-width: 960px) {
  .f-in { grid-template-columns: 1.6fr repeat(auto-fit, minmax(150px, 1fr)); }
  .f-brand { grid-column: auto; }
}

/* ---------- small phones ---------- */
@media (max-width: 400px) {
  .wrap { padding: 0 16px; }
  .cur { padding: 11px 10px; column-gap: 10px; }
  .board td { padding: 0 10px; }
  .board thead th { padding: 12px 10px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
  .site-h, .site-f, .wu, .conv, .sheet { display: none !important; }
  .board { background: #fff; color: #000; border: 1px solid #000; }
}
