/* ZimRate — Modern Fintech Design · Zimbabwe Gold Theme */

:root {
    /* Brand greens (Zimbabwe) */
    --green-900: #14532d;
    --green-800: #166534;
    --green-700: #15803d;
    --green-600: #16a34a;
    --green-100: #dcfce7;
    --green-50:  #f0fdf4;

    /* Gold (ZiG — Zimbabwe Gold currency) */
    --gold-600:  #ca8a04;
    --gold-400:  #facc15;
    --gold-300:  #fde047;

    /* Category — Official (blue) */
    --blue-700:  #1d4ed8;
    --blue-600:  #2563eb;
    --blue-100:  #dbeafe;
    --blue-50:   #eff6ff;

    /* Category — Informal (amber) */
    --amber-700: #b45309;
    --amber-600: #d97706;
    --amber-100: #fef3c7;
    --amber-50:  #fffbeb;

    /* Category — Business (violet) */
    --violet-700: #6d28d9;
    --violet-600: #7c3aed;
    --violet-100: #ede9fe;
    --violet-50:  #f5f3ff;

    /* Best-buy (emerald) */
    --emerald-600: #059669;
    --emerald-100: #d1fae5;
    --emerald-50:  #ecfdf5;

    /* Neutral grays */
    --gray-900: #111827;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50:  #f9fafb;

    /* Tokens */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.05);
    --transition: all 0.18s ease;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Zimbabwe flag colour strip */
body::before {
    content: '';
    display: block;
    height: 4px;
    background: linear-gradient(
        to right,
        #006400 0% 25%,
        #FFD200 25% 50%,
        #CE1126 50% 75%,
        #1a1a1a 75% 100%
    );
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--gray-900);
    background: var(--gray-100);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.container {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ═══════════════════════════════════════
   HEADER
═══════════════════════════════════════ */

header {
    background: linear-gradient(135deg, var(--green-900) 0%, var(--green-800) 50%, var(--green-700) 100%);
    color: white;
    padding: 1.5rem 1.25rem 1.75rem;
    position: relative;
    overflow: hidden;
}

/* Decorative blobs */
header::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -60px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    pointer-events: none;
}

header::after {
    content: '';
    position: absolute;
    bottom: -70px;
    left: -50px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,0.03);
    pointer-events: none;
}

.header-inner {
    max-width: 1080px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    text-decoration: none;
    color: inherit;
}
.header-brand:hover { opacity: 0.9; }
.header-logo-img { height: 38px; width: auto; display: block; }

.header-logo {
    width: 46px;
    height: 46px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.header-title h1 {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.header-title h1 .gold {
    color: var(--gold-400);
}

.header-title p {
    font-size: 0.78rem;
    opacity: 0.72;
    margin-top: 0.1rem;
    letter-spacing: 0.01em;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    padding: 0.35rem 0.85rem;
    border-radius: 100px;
    font-size: 0.76rem;
    font-weight: 500;
    flex-shrink: 0;
}

.live-dot {
    width: 7px;
    height: 7px;
    background: #4ade80;
    border-radius: 50%;
    animation: blink 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes blink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.6; transform: scale(0.82); }
}

/* ═══════════════════════════════════════
   SITE NAV
═══════════════════════════════════════ */

.site-nav {
    background: var(--green-800);
    border-bottom: 1px solid var(--green-900);
}

.site-nav-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    gap: 0.25rem;
}

.site-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.825rem;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
    margin-bottom: -1px;
}

.site-nav-link i { font-size: 0.75rem; }

.site-nav-link:hover {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.35);
}

.site-nav-active {
    color: white !important;
    border-bottom-color: var(--gold-400) !important;
}

/* ═══════════════════════════════════════
   MAIN
═══════════════════════════════════════ */

main.container {
    padding-top: 1.75rem;
    padding-bottom: 2rem;
}

/* ═══════════════════════════════════════
   RATE SECTION CARDS
═══════════════════════════════════════ */

.rate-section {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
}

.section-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.icon-official { background: var(--blue-50);   color: var(--blue-600);   }
.icon-informal { background: var(--amber-50);   color: var(--amber-600);  }
.icon-business { background: var(--violet-50);  color: var(--violet-600); }

.section-info {
    flex: 1;
    min-width: 0;
}

.section-title {
    font-size: 0.925rem;
    font-weight: 600;
    color: var(--gray-900);
    line-height: 1.3;
}

.section-sub {
    font-size: 0.73rem;
    color: var(--gray-500);
    margin-top: 0.05rem;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.7rem;
    border-radius: 100px;
    font-size: 0.67rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    flex-shrink: 0;
}

.badge-official { background: var(--blue-50);   color: var(--blue-700);   border: 1px solid var(--blue-100);   }
.badge-informal { background: var(--amber-50);   color: var(--amber-700);  border: 1px solid var(--amber-100);  }
.badge-business { background: var(--violet-50);  color: var(--violet-700); border: 1px solid var(--violet-100); }

/* ═══════════════════════════════════════
   TABLES
═══════════════════════════════════════ */

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}

thead tr {
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

th {
    padding: 0.6rem 1.25rem;
    text-align: left;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-500);
    white-space: nowrap;
}

td {
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.875rem;
    color: var(--gray-700);
    vertical-align: middle;
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr {
    transition: var(--transition);
}

tbody tr:hover {
    background: var(--gray-50);
}

/* Cell content helpers */
.provider-cell {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.provider-name {
    font-weight: 500;
    color: var(--gray-900);
}

.rate-num {
    font-weight: 600;
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
    color: var(--gray-900);
    letter-spacing: -0.01em;
}

.currency-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    background: var(--gray-100);
    color: var(--gray-600);
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.time-cell {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.77rem;
    color: var(--gray-500);
    white-space: nowrap;
}

.time-cell i {
    font-size: 0.65rem;
}

/* Best-buy row */
.best-buy {
    background: linear-gradient(90deg, rgba(5,150,105,0.07) 0%, transparent 75%) !important;
}

.best-buy:hover {
    background: linear-gradient(90deg, rgba(5,150,105,0.12) 0%, rgba(5,150,105,0.03) 100%) !important;
}

.best-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    background: var(--emerald-50);
    color: var(--emerald-600);
    border: 1px solid var(--emerald-100);
    padding: 0.1rem 0.45rem;
    border-radius: var(--radius-sm);
    font-size: 0.63rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.best-tag i { font-size: 0.55rem; }

/* ═══════════════════════════════════════
   INFO CARD
═══════════════════════════════════════ */

.info-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.2rem 1.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.25rem;
}

.info-icon {
    width: 36px;
    height: 36px;
    background: var(--blue-50);
    color: var(--blue-600);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-top: 0.05rem;
}

.info-text h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.35rem;
}

.info-text p {
    font-size: 0.79rem;
    color: var(--gray-500);
    line-height: 1.65;
}

.info-text p + p {
    margin-top: 0.2rem;
}

/* ═══════════════════════════════════════
   HOMEPAGE SEO INTRO
═══════════════════════════════════════ */

.homepage-seo-intro {
    background: linear-gradient(135deg, rgba(20, 83, 45, 0.08), rgba(245, 158, 11, 0.08));
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.homepage-eyebrow {
    margin: 0 0 0.45rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--green-700);
}

.homepage-seo-intro h1 {
    margin: 0;
    max-width: 820px;
    font-size: clamp(1.55rem, 3vw, 2.35rem);
    line-height: 1.15;
    letter-spacing: -0.04em;
    color: var(--gray-900);
}

.homepage-lede {
    max-width: 780px;
    margin: 0.75rem 0 0;
    color: var(--gray-600);
    font-size: 0.96rem;
    line-height: 1.7;
}

.homepage-quick-links,
.conversion-link-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.homepage-quick-links {
    margin-top: 1rem;
}

.homepage-quick-links a,
.conversion-link-grid a {
    display: inline-flex;
    align-items: center;
    padding: 0.42rem 0.78rem;
    border-radius: 999px;
    background: white;
    border: 1px solid var(--green-100);
    color: var(--green-700);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.homepage-quick-links a:hover,
.conversion-link-grid a:hover {
    background: var(--green-50);
    color: var(--green-800);
    border-color: var(--green-200);
}

.popular-conversions {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.popular-conversions .section-header.compact {
    margin-bottom: 1rem;
}

[data-theme="dark"] .homepage-seo-intro,
[data-theme="dark"] .popular-conversions {
    background: #1a2535;
    border-color: #243048;
}

[data-theme="dark"] .homepage-eyebrow {
    color: #4ade80;
}

[data-theme="dark"] .homepage-seo-intro h1 {
    color: #f1f5f9;
}

[data-theme="dark"] .homepage-lede {
    color: #94a3b8;
}

[data-theme="dark"] .homepage-quick-links a,
[data-theme="dark"] .conversion-link-grid a {
    background: rgba(74, 222, 128, 0.08);
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.16);
}

[data-theme="dark"] .homepage-quick-links a:hover,
[data-theme="dark"] .conversion-link-grid a:hover {
    background: rgba(74, 222, 128, 0.15);
    color: #86efac;
}

/* ═══════════════════════════════════════
   EXPLAINER SECTION
═══════════════════════════════════════ */

.explainer-section {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.75rem 1.75rem 1.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.25rem;
}

.explainer-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1.25rem;
}

.explainer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem 2rem;
    margin-bottom: 1.25rem;
}

.explainer-block h3 {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--green-700);
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.explainer-block h3 i {
    font-size: 0.75rem;
}

.explainer-block p {
    font-size: 0.8rem;
    color: var(--gray-600);
    line-height: 1.65;
}

.explainer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-100);
}

.explainer-link-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    background: var(--green-50);
    color: var(--green-700);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid var(--green-100);
    transition: background 0.15s, color 0.15s;
}

.explainer-link-pill:hover {
    background: var(--green-100);
    color: var(--green-800);
}

@media (max-width: 640px) {
    .explainer-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

[data-theme="dark"] .explainer-section {
    background: #1a2535;
    border-color: #243048;
}

[data-theme="dark"] .explainer-title {
    color: #f1f5f9;
}

[data-theme="dark"] .explainer-block h3 {
    color: #4ade80;
}

[data-theme="dark"] .explainer-block p {
    color: #94a3b8;
}

[data-theme="dark"] .explainer-links {
    border-top-color: #243048;
}

[data-theme="dark"] .explainer-link-pill {
    background: rgba(74, 222, 128, 0.08);
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.15);
}

[data-theme="dark"] .explainer-link-pill:hover {
    background: rgba(74, 222, 128, 0.15);
    color: #86efac;
}

/* ═══════════════════════════════════════
   FOOTER
═══════════════════════════════════════ */

footer {
    background: white;
    border-top: 1px solid var(--gray-200);
    padding: 1.75rem 1.25rem;
    text-align: center;
}

.footer-inner {
    max-width: 1080px;
    margin: 0 auto;
    text-align: center;
}

.footer-logo-img {
    height: 28px;
    width: 110px;
    display: inline-block;
    margin-bottom: 0.3rem;
    background: var(--green-900);
    border-radius: 8px;
    padding: 4px 8px;
    box-sizing: content-box;
}

[data-theme="dark"] .footer-logo-img {
    background: transparent;
}

.footer-meta {
    font-size: 0.77rem;
    color: var(--gray-500);
    margin-bottom: 0.75rem;
}

.footer-disclaimer {
    font-size: 0.73rem;
    color: var(--gray-500);
    max-width: 560px;
    margin: 0 auto 0.75rem;
    padding: 0.5rem 0.875rem;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    line-height: 1.55;
}

.footer-copy {
    font-size: 0.73rem;
    color: var(--gray-500);
}

/* ═══════════════════════════════════════
   DELTA BADGES
═══════════════════════════════════════ */

.delta {
    display: inline-flex;
    align-items: center;
    font-size: 0.67rem;
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    border-radius: var(--radius-sm);
    margin-left: 0.35rem;
    font-variant-numeric: tabular-nums;
    vertical-align: middle;
    letter-spacing: 0.01em;
}

.delta.up   { background: var(--emerald-50); color: var(--emerald-600); }
.delta.down { background: rgba(220,38,38,0.07); color: #dc2626; }

/* ═══════════════════════════════════════
   STALE DATA BADGE
═══════════════════════════════════════ */

.stale-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--amber-50);
    color: var(--amber-700);
    border: 1px solid var(--amber-100);
    padding: 0.2rem 0.65rem;
    border-radius: 100px;
    font-size: 0.67rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    margin-left: 0.5rem;
}

.stale-badge i { font-size: 0.6rem; }

/* ═══════════════════════════════════════
   STATS BAR
═══════════════════════════════════════ */

.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 1.25rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.stat-item {
    padding: 1.1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    border-right: 1px solid var(--gray-100);
}

.stat-item:last-child { border-right: none; }

.stat-label {
    font-size: 0.66rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-500);
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.stat-value.warning { color: var(--amber-600); }
.stat-value.compact { font-size: 0.9rem; letter-spacing: 0; font-weight: 600; }

.stat-sub {
    font-size: 0.67rem;
    color: var(--gray-400);
    margin-top: 0.05rem;
}

.stat-bid-ask {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.25rem;
    font-size: 0.67rem;
}
.bid-ask-label {
    color: var(--gray-400);
    font-weight: 500;
}
.bid-ask-value {
    color: var(--gray-600);
    font-weight: 600;
}
.bid-ask-sep { color: var(--gray-300); }

[data-theme="dark"] .bid-ask-label { color: #475569; }
[data-theme="dark"] .bid-ask-value { color: #94a3b8; }
[data-theme="dark"] .bid-ask-sep   { color: #334155; }

/* ═══════════════════════════════════════
   GOLD COIN SECTION
═══════════════════════════════════════ */

.gold-coin-body {
    padding: 1.25rem 1.5rem;
}

.gold-coin-price-row {
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-bottom: 0.875rem;
}

.gold-price-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.gold-price-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
}

.gold-rate {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-700);
}

[data-theme="dark"] .gold-rate {
    color: var(--primary-400);
}

.gold-coin-meta {
    font-size: 0.8rem;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

@media (max-width: 600px) {
    .gold-coin-price-row {
        gap: 1.5rem;
    }
    .gold-rate {
        font-size: 1.2rem;
    }
}

/* ═══════════════════════════════════════
   CONVERTER CARD
═══════════════════════════════════════ */

.converter-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.converter-body {
    padding: 1.25rem 1.5rem;
}

/* Rate type toggle */
.rate-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    background: var(--gray-100);
    padding: 0.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.1rem;
}

.toggle-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0.45rem 0.875rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    cursor: pointer;
    background: transparent;
    transition: var(--transition);
    gap: 0.05rem;
    flex: 1 1 auto;
    min-width: 5rem;
}

.toggle-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
    line-height: 1.2;
    transition: var(--transition);
}

.toggle-rate {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--gray-400);
    font-variant-numeric: tabular-nums;
    transition: var(--transition);
}

.toggle-btn.active {
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.toggle-btn.active .toggle-label {
    color: var(--gray-900);
}

.toggle-btn.active .toggle-rate {
    color: var(--green-600);
}

.converter-row {
    display: flex;
    align-items: flex-end;
    gap: 0.875rem;
    margin-bottom: 0.75rem;
}

.converter-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.converter-field label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-500);
}

.converter-field input {
    width: 100%;
    padding: 0.65rem 0.875rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    background: var(--gray-50);
    transition: var(--transition);
    outline: none;
    font-variant-numeric: tabular-nums;
    -moz-appearance: textfield;
}

.converter-field input::-webkit-outer-spin-button,
.converter-field input::-webkit-inner-spin-button { -webkit-appearance: none; }

.converter-field input:focus {
    border-color: var(--green-600);
    background: white;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

.converter-swap {
    color: var(--gray-400);
    font-size: 0.8rem;
    padding-bottom: 0.7rem;
    flex-shrink: 0;
}

.converter-note {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.converter-note strong { color: var(--gray-700); }

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */

@media (max-width: 768px) {
    header { padding: 1.2rem 1rem 1.5rem; }

    .header-title h1 { font-size: 1.4rem; }

    main.container { padding-top: 1.25rem; }

    .section-header { padding: 0.9rem 1.1rem; }

    th { padding: 0.55rem 1rem; }
    td { padding: 0.8rem 1rem; }

    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-item:nth-child(1),
    .stat-item:nth-child(2) { border-bottom: 1px solid var(--gray-100); }

    .stat-item:nth-child(2) { border-right: none; }

    .converter-body { padding: 1rem; }
}

@media (max-width: 480px) {
    .header-title h1 { font-size: 1.25rem; }
    .header-title p  { display: none; }

    .live-badge .live-label { display: none; }
    .live-badge { padding: 0.35rem 0.55rem; }

    .section-sub  { display: none; }
    .section-badge { display: none; }

    th { padding: 0.5rem 0.75rem; font-size: 0.6rem; }
    td { padding: 0.7rem 0.75rem; font-size: 0.82rem; }

    .info-card { flex-direction: column; }
}

/* ═══════════════════════════════════════
   HEADER ACTIONS & THEME TOGGLE
═══════════════════════════════════════ */

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.theme-toggle {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: var(--transition);
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: rgba(255,255,255,0.22);
    border-color: rgba(255,255,255,0.35);
}

/* ═══════════════════════════════════════
   STATS BAR — VALUE ROW & DELTA
═══════════════════════════════════════ */

.stat-value-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.stat-delta {
    display: inline-flex;
    align-items: center;
    font-size: 0.63rem;
    font-weight: 700;
    padding: 0.1rem 0.35rem;
    border-radius: var(--radius-sm);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
}

.stat-delta.up   { background: var(--emerald-50);           color: var(--emerald-600); }
.stat-delta.down { background: rgba(220,38,38,0.07);        color: #dc2626; }

/* ═══════════════════════════════════════
   CHART CARD
═══════════════════════════════════════ */

.chart-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.chart-body {
    padding: 1.15rem 1.65rem 1.35rem;
}

.chart-body .apexcharts-canvas {
    max-width: 100%;
}

.chart-body .apexcharts-text,
.chart-body .apexcharts-legend-text {
    fill: var(--gray-600);
    color: var(--gray-600) !important;
}

/* ═══════════════════════════════════════
   RATE CELL & COPY BUTTON
═══════════════════════════════════════ */

.rate-cell {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: transparent;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    color: var(--gray-500);
    cursor: pointer;
    font-size: 0.72rem;
    transition: var(--transition);
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
}

.copy-btn:hover {
    background: var(--gray-100);
    color: var(--gray-700);
    border-color: var(--gray-300);
}

.copy-btn.copied {
    background: var(--emerald-50);
    border-color: var(--emerald-100);
    color: var(--emerald-600);
}

/* ═══════════════════════════════════════
   REFRESH BUTTON
═══════════════════════════════════════ */

.refresh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: transparent;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    color: var(--gray-500);
    cursor: pointer;
    font-size: 0.72rem;
    transition: var(--transition);
    padding: 0;
    flex-shrink: 0;
}

.refresh-btn:hover {
    background: var(--gray-100);
    color: var(--green-700);
    border-color: var(--gray-300);
    transform: rotate(45deg);
}

[data-theme="dark"] .refresh-btn         { border-color: #243048; color: #475569; }
[data-theme="dark"] .refresh-btn:hover   { background: #243048; color: #4ade80; border-color: #334155; }

.wa-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    background: rgba(37,211,102,0.1);
    color: #25d166;
    font-size: 1rem;
    text-decoration: none;
    flex-shrink: 0;
    transition: var(--transition);
}
.wa-share-btn:hover { background: rgba(37,211,102,0.22); color: #1aab54; }

[data-theme="dark"] .wa-share-btn       { background: rgba(37,211,102,0.12); color: #4ade80; }
[data-theme="dark"] .wa-share-btn:hover { background: rgba(37,211,102,0.22); color: #86efac; }

.tg-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: rgba(41,182,246,0.1);
    color: #0088cc;
    font-size: 0.85rem;
    text-decoration: none;
    flex-shrink: 0;
    transition: var(--transition);
}
.tg-share-btn:hover { background: rgba(41,182,246,0.22); color: #0077b5; }

[data-theme="dark"] .tg-share-btn       { background: rgba(41,182,246,0.12); color: #38bdf8; }
[data-theme="dark"] .tg-share-btn:hover { background: rgba(41,182,246,0.22); color: #7dd3fc; }

/* ═══════════════════════════════════════
   TOAST NOTIFICATION
═══════════════════════════════════════ */

.toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: var(--gray-900);
    color: white;
    padding: 0.55rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.78rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    box-shadow: 0 4px 14px rgba(0,0,0,0.22);
    z-index: 9999;
    opacity: 0;
    transform: translateY(0.5rem);
    transition: opacity 0.18s ease, transform 0.18s ease;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════════════════════════════════════
   DARK MODE
═══════════════════════════════════════ */

[data-theme="dark"] {
    color-scheme: dark;
}

[data-theme="dark"] body {
    color: #e2e8f0;
    background: #0d1526;
}

[data-theme="dark"] .rate-section,
[data-theme="dark"] .stats-bar,
[data-theme="dark"] .converter-card,
[data-theme="dark"] .chart-card,
[data-theme="dark"] .info-card {
    background: #1a2535;
    border-color: #243048;
}

[data-theme="dark"] footer {
    background: #1a2535;
    border-color: #243048;
}

[data-theme="dark"] .footer-brand        { color: #4ade80; }
[data-theme="dark"] .footer-meta,
[data-theme="dark"] .footer-copy         { color: #64748b; }
[data-theme="dark"] .footer-disclaimer   {
    background: #0f172a;
    border-color: #243048;
    color: #64748b;
}

[data-theme="dark"] .section-header      { border-bottom-color: #243048; }
[data-theme="dark"] .section-title       { color: #e2e8f0; }
[data-theme="dark"] .section-sub         { color: #64748b; }

[data-theme="dark"] .stat-label          { color: #64748b; }
[data-theme="dark"] .stat-value          { color: #f1f5f9; }
[data-theme="dark"] .stat-sub            { color: #475569; }
[data-theme="dark"] .stat-item           { border-right-color: #243048; }

[data-theme="dark"] .stat-delta.up   { background: rgba(5,150,105,0.2);  color: #34d399; }
[data-theme="dark"] .stat-delta.down { background: rgba(220,38,38,0.15); color: #f87171; }

[data-theme="dark"] table thead tr   { background: #0f172a; border-bottom-color: #243048; }
[data-theme="dark"] th               { color: #64748b; }
[data-theme="dark"] td               { color: #cbd5e1; border-bottom-color: #1e293b; }

[data-theme="dark"] tbody tr:hover   { background: #1e2d42 !important; }

[data-theme="dark"] .best-buy {
    background: linear-gradient(90deg, rgba(5,150,105,0.12) 0%, transparent 75%) !important;
}
[data-theme="dark"] .best-buy:hover {
    background: linear-gradient(90deg, rgba(5,150,105,0.18) 0%, rgba(5,150,105,0.04) 100%) !important;
}

[data-theme="dark"] .provider-name   { color: #e2e8f0; }
[data-theme="dark"] .rate-num        { color: #f1f5f9; }

[data-theme="dark"] .currency-pill   { background: #0f172a; color: #64748b; }
[data-theme="dark"] .time-cell       { color: #475569; }

[data-theme="dark"] .copy-btn        { border-color: #243048; color: #64748b; }
[data-theme="dark"] .copy-btn:hover  { background: #243048; color: #94a3b8; border-color: #334155; }
[data-theme="dark"] .copy-btn.copied { background: rgba(5,150,105,0.15); border-color: rgba(5,150,105,0.3); color: #34d399; }
[data-theme="dark"] .chart-body .apexcharts-text,
[data-theme="dark"] .chart-body .apexcharts-legend-text { fill: #94a3b8; color: #94a3b8 !important; }

[data-theme="dark"] .delta.up   { background: rgba(5,150,105,0.2);  color: #34d399; }
[data-theme="dark"] .delta.down { background: rgba(220,38,38,0.15); color: #f87171; }

[data-theme="dark"] .rate-toggle { background: #0f172a; }
[data-theme="dark"] .toggle-btn.active {
    background: #243048;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
[data-theme="dark"] .toggle-label                      { color: #64748b; }
[data-theme="dark"] .toggle-btn.active .toggle-label   { color: #e2e8f0; }
[data-theme="dark"] .toggle-rate                       { color: #475569; }
[data-theme="dark"] .toggle-btn.active .toggle-rate    { color: #4ade80; }

[data-theme="dark"] .converter-field label { color: #64748b; }
[data-theme="dark"] .converter-field input {
    background: #0f172a;
    border-color: #243048;
    color: #f1f5f9;
}
[data-theme="dark"] .converter-field input:focus {
    border-color: var(--green-600);
    background: #0d1526;
    box-shadow: 0 0 0 3px rgba(22,163,74,0.2);
}
[data-theme="dark"] .converter-swap  { color: #334155; }
[data-theme="dark"] .converter-note  { color: #64748b; }
[data-theme="dark"] .converter-note strong { color: #94a3b8; }

[data-theme="dark"] .badge-official { background: rgba(37,99,235,0.15);  color: #93c5fd; border-color: rgba(37,99,235,0.25); }
[data-theme="dark"] .badge-informal { background: rgba(217,119,6,0.15);  color: #fcd34d; border-color: rgba(217,119,6,0.25); }
[data-theme="dark"] .badge-business { background: rgba(124,58,237,0.15); color: #c4b5fd; border-color: rgba(124,58,237,0.25); }

[data-theme="dark"] .best-tag {
    background: rgba(5,150,105,0.15);
    border-color: rgba(5,150,105,0.25);
    color: #34d399;
}

[data-theme="dark"] .icon-official { background: rgba(37,99,235,0.15);  color: #93c5fd; }
[data-theme="dark"] .icon-informal { background: rgba(217,119,6,0.15);  color: #fcd34d; }
[data-theme="dark"] .icon-business { background: rgba(124,58,237,0.15); color: #c4b5fd; }

[data-theme="dark"] .info-icon { background: rgba(37,99,235,0.15); color: #93c5fd; }
[data-theme="dark"] .info-text h4 { color: #e2e8f0; }
[data-theme="dark"] .info-text p   { color: #64748b; }

[data-theme="dark"] .stale-badge {
    background: rgba(180,83,9,0.2);
    border-color: rgba(180,83,9,0.3);
    color: #fcd34d;
}

[data-theme="dark"] .toast { background: #f1f5f9; color: #0f172a; }

@media (max-width: 768px) {
    [data-theme="dark"] .stat-item:nth-child(1),
    [data-theme="dark"] .stat-item:nth-child(2) { border-bottom-color: #243048; }
}

/* ═══════════════════════════════════════
   MOBILE CARD LAYOUT  (≤ 600 px)
═══════════════════════════════════════ */

@media (max-width: 600px) {

    .table-responsive {
        overflow-x: visible;
    }

    .table-responsive table {
        display: block;
        min-width: unset;
        width: 100%;
    }

    .table-responsive thead {
        display: none;
    }

    .table-responsive tbody,
    .table-responsive tr,
    .table-responsive td {
        display: block;
        width: 100%;
    }

    .table-responsive tbody tr {
        border: 1px solid var(--gray-200);
        border-radius: var(--radius-md);
        margin-bottom: 0.625rem;
        padding: 0.4rem 0.875rem;
    }

    .table-responsive tbody tr:last-child { margin-bottom: 0; }

    .table-responsive td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.45rem 0;
        border: none;
        border-bottom: 1px solid var(--gray-100);
    }

    .table-responsive td:last-child {
        border-bottom: none;
        padding-bottom: 0.1rem;
    }

    .table-responsive td::before {
        content: attr(data-label);
        font-size: 0.62rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.07em;
        color: var(--gray-500);
        flex-shrink: 0;
        min-width: 4.5rem;
    }

    [data-theme="dark"] .table-responsive tbody tr { border-color: #243048; }
    [data-theme="dark"] .table-responsive td       { border-bottom-color: #1e293b; }
}

/* ═══════════════════════════════════════
   ALERT BELL BUTTON
═══════════════════════════════════════ */

.alert-bell-btn {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: var(--transition);
    position: relative;
    flex-shrink: 0;
}

.alert-bell-btn:hover {
    background: rgba(255,255,255,0.22);
    border-color: rgba(255,255,255,0.35);
}

.alert-bell-btn .bell-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 7px;
    height: 7px;
    background: var(--gold-400);
    border-radius: 50%;
    border: 1.5px solid var(--green-900);
    display: none;
}

.alert-bell-btn.has-alerts .bell-dot { display: block; }

/* ═══════════════════════════════════════
   ALERT MODAL
═══════════════════════════════════════ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 5vh 1rem 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    width: 100%;
    max-width: 420px;
    max-height: 92vh;
    overflow-y: auto;
    transform: translateY(-12px);
    transition: transform 0.22s ease;
}

.modal-overlay.open .modal-card {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    position: sticky;
    top: 0;
    background: white;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    z-index: 1;
}

.modal-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-header h3 i { color: var(--gold-600); }

.modal-close {
    width: 28px;
    height: 28px;
    background: var(--gray-100);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--gray-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: var(--transition);
}

.modal-close:hover { background: var(--gray-200); color: var(--gray-700); }

/* Modal tabs */
.modal-tabs {
    display: flex;
    border-bottom: 1px solid var(--gray-100);
    background: var(--gray-50);
}

.modal-tab {
    flex: 1;
    padding: 0.65rem 0.5rem;
    font-size: 0.775rem;
    font-weight: 600;
    color: var(--gray-500);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
}

.modal-tab.active {
    color: var(--green-700);
    border-bottom-color: var(--green-600);
    background: white;
}

.modal-tab-panel { display: none; padding: 1.25rem 1.5rem; }
.modal-tab-panel.active { display: block; }

.modal-desc {
    font-size: 0.78rem;
    color: var(--gray-500);
    margin-bottom: 1.1rem;
    line-height: 1.55;
}

/* Form elements */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 0.9rem;
}

.form-group label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--gray-500);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.6rem 0.875rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--gray-900);
    background: var(--gray-50);
    outline: none;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--green-600);
    background: white;
    box-shadow: 0 0 0 3px rgba(22,163,74,0.12);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.btn-primary {
    width: 100%;
    padding: 0.7rem 1rem;
    background: var(--green-700);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background 0.18s ease;
    margin-top: 0.25rem;
}

.btn-primary:hover   { background: var(--green-800); }
.btn-primary:disabled { background: var(--gray-300); cursor: not-allowed; }

.alert-feedback {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    display: none;
}

.alert-feedback.success {
    display: block;
    background: var(--emerald-50);
    color: var(--emerald-600);
    border: 1px solid var(--emerald-100);
}

.alert-feedback.error {
    display: block;
    background: rgba(220,38,38,0.06);
    color: #dc2626;
    border: 1px solid rgba(220,38,38,0.15);
}

/* Manage-alerts list */
.manage-search {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.manage-search input {
    flex: 1;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
    background: var(--gray-50);
    transition: var(--transition);
}

.manage-search input:focus {
    border-color: var(--green-600);
    background: white;
    box-shadow: 0 0 0 3px rgba(22,163,74,0.12);
}

.btn-search {
    padding: 0.55rem 0.875rem;
    background: var(--green-700);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s ease;
    white-space: nowrap;
}

.btn-search:hover { background: var(--green-800); }

.alert-list { display: flex; flex-direction: column; gap: 0.5rem; }

.alert-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.875rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 0.82rem;
}

.alert-list-item.inactive { opacity: 0.55; }

.alert-item-info { flex: 1; min-width: 0; }
.alert-item-pair {
    font-weight: 600;
    color: var(--gray-900);
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.alert-item-meta { font-size: 0.72rem; color: var(--gray-500); margin-top: 0.1rem; }

.alert-item-status {
    font-size: 0.63rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.15rem 0.45rem;
    border-radius: 100px;
    flex-shrink: 0;
}
.alert-item-status.active-status   { background: var(--emerald-50); color: var(--emerald-600); border: 1px solid var(--emerald-100); }
.alert-item-status.inactive-status { background: var(--gray-100); color: var(--gray-500); border: 1px solid var(--gray-200); }

.btn-alert-action {
    padding: 0.25rem 0.55rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    background: transparent;
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--gray-600);
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}
.btn-alert-action:hover { background: var(--gray-100); }
.btn-alert-action.reactivate { color: var(--green-700); border-color: var(--emerald-100); }
.btn-alert-action.reactivate:hover { background: var(--emerald-50); }
.btn-alert-action.cancel { color: #dc2626; border-color: rgba(220,38,38,0.2); }
.btn-alert-action.cancel:hover { background: rgba(220,38,38,0.05); }

.manage-empty {
    text-align: center;
    padding: 2rem 0;
    font-size: 0.8rem;
    color: var(--gray-400);
}

/* ═══════════════════════════════════════
   SOURCE FILTER BAR
═══════════════════════════════════════ */

.filter-bar {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
    align-items: center;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.85rem;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    background: white;
    border: 1px solid var(--gray-200);
    color: var(--gray-600);
    transition: var(--transition);
    white-space: nowrap;
}

.filter-pill:hover { border-color: var(--gray-300); background: var(--gray-50); }

.filter-pill.active {
    background: var(--green-700);
    border-color: var(--green-700);
    color: white;
}

.rate-section.hidden { display: none; }

/* ═══════════════════════════════════════
   CHART PERIOD SELECTOR & SKELETON
═══════════════════════════════════════ */

.chart-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
}

.chart-period-pills {
    display: flex;
    gap: 0.25rem;
    background: var(--gray-100);
    padding: 0.2rem;
    border-radius: var(--radius-md);
}

.chart-period-btn {
    padding: 0.25rem 0.65rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    color: var(--gray-500);
    transition: var(--transition);
}

.chart-period-btn.active {
    background: white;
    color: var(--gray-900);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Skeleton */
.chart-skeleton {
    height: 220px;
    border-radius: var(--radius-md);
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-50) 50%, var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    margin: 0.5rem 0;
}

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ═══════════════════════════════════════
   DARK MODE — NEW COMPONENTS
═══════════════════════════════════════ */

[data-theme="dark"] .modal-card     { background: #1a2535; }
[data-theme="dark"] .modal-header   { background: #1a2535; border-bottom-color: #243048; }
[data-theme="dark"] .modal-header h3 { color: #e2e8f0; }
[data-theme="dark"] .modal-close    { background: #243048; color: #64748b; }
[data-theme="dark"] .modal-close:hover { background: #334155; color: #94a3b8; }
[data-theme="dark"] .modal-tabs     { background: #0f172a; border-bottom-color: #243048; }
[data-theme="dark"] .modal-tab      { color: #64748b; }
[data-theme="dark"] .modal-tab.active { color: #4ade80; border-bottom-color: #4ade80; background: #1a2535; }
[data-theme="dark"] .modal-tab-panel { }
[data-theme="dark"] .modal-desc     { color: #64748b; }
[data-theme="dark"] .form-group label { color: #64748b; }
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group select { background: #0f172a; border-color: #243048; color: #e2e8f0; }
[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group select:focus { background: #0d1526; border-color: var(--green-600); box-shadow: 0 0 0 3px rgba(22,163,74,0.2); }
[data-theme="dark"] .manage-search input { background: #0f172a; border-color: #243048; color: #e2e8f0; }
[data-theme="dark"] .manage-search input:focus { background: #0d1526; }
[data-theme="dark"] .alert-list-item   { background: #0f172a; border-color: #243048; }
[data-theme="dark"] .alert-item-pair   { color: #e2e8f0; }
[data-theme="dark"] .alert-item-meta   { color: #475569; }
[data-theme="dark"] .alert-item-status.inactive-status { background: #1e293b; color: #475569; border-color: #243048; }
[data-theme="dark"] .btn-alert-action  { border-color: #243048; color: #94a3b8; }
[data-theme="dark"] .btn-alert-action:hover { background: #243048; }
[data-theme="dark"] .manage-empty      { color: #475569; }
[data-theme="dark"] .filter-pill       { background: #1a2535; border-color: #243048; color: #94a3b8; }
[data-theme="dark"] .filter-pill:hover { background: #243048; }
[data-theme="dark"] .filter-pill.active { background: var(--green-700); border-color: var(--green-700); color: white; }
[data-theme="dark"] .chart-header-row  { border-bottom-color: #243048; }
[data-theme="dark"] .chart-period-pills { background: #0f172a; }
[data-theme="dark"] .chart-period-btn  { color: #475569; }
[data-theme="dark"] .chart-period-btn.active { background: #243048; color: #e2e8f0; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
[data-theme="dark"] .chart-skeleton    { background: linear-gradient(90deg, #1e293b 25%, #243048 50%, #1e293b 75%); background-size: 200% 100%; }

/* ═══════════════════════════════════════
   AD SLOTS
═══════════════════════════════════════ */

.ad-slot {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    margin: 0.5rem 0 1.25rem;
    padding: 0.375rem 0 0.5rem;
}

.ad-label {
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gray-400);
    line-height: 1;
}

/* Dummy placeholder — remove this block once real ads are wired up */
.ad-dummy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    max-width: 728px;
    border: 1.5px dashed var(--gray-200);
    border-radius: var(--radius-md);
    background: var(--gray-50);
    color: var(--gray-400);
    font-size: 0.8rem;
    font-weight: 500;
}

.ad-slot--leaderboard .ad-dummy { height: 90px; }
.ad-slot--rectangle   .ad-dummy { height: 280px; max-width: 336px; }

/* Dark mode */
[data-theme="dark"] .ad-dummy {
    background: #0f172a;
    border-color: #243048;
    color: #334155;
}

/* Mobile: collapse leaderboard height so it doesn't eat too much vertical space */
@media (max-width: 600px) {
    .ad-slot--leaderboard .ad-dummy { height: 60px; }
    .ad-slot--rectangle   .ad-dummy { max-width: 100%; }
}

/* ═══════════════════════════════════════
   ALERT CAPTURE CARD
═══════════════════════════════════════ */

.alert-capture-card {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    background: linear-gradient(135deg, #14532d 0%, #166534 100%);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
}
.alert-capture-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.alert-capture-body { flex: 1; min-width: 140px; }
.alert-capture-title { font-weight: 700; font-size: 1rem; color: #fff; }
.alert-capture-sub   { font-size: 0.825rem; color: rgba(255,255,255,0.75); margin-top: 2px; }
.alert-capture-form  { display: flex; gap: 0.5rem; flex-shrink: 0; }
.alert-capture-input {
    padding: 0.55rem 0.85rem;
    border-radius: 8px;
    border: none;
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    width: 220px;
    outline: none;
    background: rgba(255,255,255,0.95);
    color: #1e293b;
}
.alert-capture-input::placeholder { color: #94a3b8; }
.alert-capture-input:focus { background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,0.3); }
.alert-capture-btn {
    padding: 0.55rem 1.2rem;
    border-radius: 8px;
    border: none;
    background: #fff;
    color: #14532d;
    font-weight: 700;
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, transform 0.1s;
}
.alert-capture-btn:hover  { background: #f0fdf4; }
.alert-capture-btn:active { transform: scale(0.97); }
.alert-capture-note {
    width: 100%;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    margin: 0;
    padding-left: calc(48px + 1.5rem);
}
@media (max-width: 640px) {
    .alert-capture-card   { padding: 1.25rem; }
    .alert-capture-form   { width: 100%; }
    .alert-capture-input  { flex: 1; width: auto; }
    .alert-capture-note   { padding-left: 0; }
}

/* ─── Telegram CTA card ─────────────────────────────────────────────────────── */

.tg-cta-card {
    display: flex;
    align-items: center;
    gap: 1rem 1.5rem;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
    border: 1.5px solid #bae6fd;
    border-radius: var(--radius-md);
    padding: 1.1rem 1.5rem;
    margin-bottom: 1.25rem;
}

.tg-cta-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #0088cc;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.tg-cta-body { flex: 1; min-width: 160px; }

.tg-cta-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.15rem;
}

.tg-cta-sub {
    font-size: 0.8rem;
    color: var(--gray-500);
    line-height: 1.4;
}

.tg-cta-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.tg-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}

.tg-cta-btn--channel {
    background: #0088cc;
    color: white;
}
.tg-cta-btn--channel:hover { background: #0077b5; }

.tg-cta-btn--bot {
    background: white;
    color: #0088cc;
    border: 1.5px solid #bae6fd;
}
.tg-cta-btn--bot:hover { background: #e0f2fe; }

[data-theme="dark"] .tg-cta-card        { background: #0c1929; border-color: #0c3a5e; }
[data-theme="dark"] .tg-cta-title       { color: #f1f5f9; }
[data-theme="dark"] .tg-cta-sub         { color: #64748b; }
[data-theme="dark"] .tg-cta-btn--bot    { background: #0f2236; color: #38bdf8; border-color: #0c3a5e; }
[data-theme="dark"] .tg-cta-btn--bot:hover { background: #0c1929; }

@media (max-width: 600px) {
    .tg-cta-card    { padding: 1rem 1.25rem; }
    .tg-cta-actions { width: 100%; }
    .tg-cta-btn     { flex: 1; justify-content: center; }
}

/* ═══════════════════════════════════════
   COOKIE CONSENT BANNER
═══════════════════════════════════════ */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--gray-900);
    color: var(--gray-100);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.25);
}

.cookie-inner {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    max-width: 860px;
    width: 100%;
    flex-wrap: wrap;
}

.cookie-text {
    flex: 1;
    font-size: 0.825rem;
    line-height: 1.5;
    color: var(--gray-300);
    min-width: 200px;
}

.cookie-link {
    color: var(--gold-400);
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    gap: 0.625rem;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 0.45rem 1.1rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.cookie-btn--accept {
    background: var(--green-600);
    color: white;
}

.cookie-btn--accept:hover { background: var(--green-700); }

.cookie-btn--decline {
    background: transparent;
    color: var(--gray-400);
    border: 1px solid var(--gray-600);
}

.cookie-btn--decline:hover { background: #1e293b; }

@media (max-width: 600px) {
    .cookie-inner { flex-direction: column; gap: 0.75rem; }
    .cookie-actions { width: 100%; }
    .cookie-btn { flex: 1; text-align: center; }
}

/* Footer links */
.footer-links { margin: 0.25rem 0; }
.footer-link { color: var(--gray-500); font-size: 0.8rem; text-decoration: underline; }
.footer-link:hover { color: var(--gold-400); }
.footer-link-sep { color: var(--gray-600); font-size: 0.75rem; margin: 0 0.3rem; }
.footer-social { margin: 0.5rem 0 0.25rem; }
.footer-social-link { color: var(--gray-500); font-size: 0.8rem; text-decoration: none; }
.footer-social-link:hover { color: var(--gold-400); }

/* ═══════════════════════════════════════
   PRIVACY PAGE
═══════════════════════════════════════ */

.privacy-card {
    max-width: 760px;
    margin: 2rem auto;
    display: block;
    padding: 2rem 2.25rem;
}

.privacy-header {
    margin-bottom: 1.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.privacy-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.privacy-header h2 i { color: var(--green-600); }

.privacy-date {
    font-size: 0.8rem;
    color: var(--gray-400);
    margin-top: 0.375rem;
}

.privacy-body h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gray-700);
    margin: 1.5rem 0 0.5rem;
}

.privacy-body p,
.privacy-body li {
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--gray-600);
}

.privacy-body ul { padding-left: 1.4rem; margin: 0.4rem 0; }
.privacy-body li { margin-bottom: 0.3rem; }

.privacy-link { color: var(--green-600); text-decoration: underline; }
.privacy-link:hover { color: var(--green-700); }

.privacy-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--green-700);
    text-decoration: none;
    padding: 0.45rem 1rem;
    border: 1px solid var(--green-200, #bbf7d0);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.btn-back:hover {
    background: var(--green-50);
}

/* ── About page: data source grid ── */
.source-grid { display: flex; flex-direction: column; gap: 0.75rem; margin: 0.5rem 0 1rem; }
.source-item {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    background: var(--gray-50);
}
.source-icon {
    width: 36px; height: 36px; flex-shrink: 0;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.95rem;
    background: var(--blue-50); color: var(--blue-600);
}
.source-name { font-size: 0.875rem; font-weight: 600; color: var(--gray-700); }
.source-desc { font-size: 0.8rem; color: var(--gray-500); margin-top: 0.2rem; line-height: 1.5; }

[data-theme="dark"] .source-item { background: #0f172a; border-color: #243048; }
[data-theme="dark"] .source-name { color: #cbd5e1; }
[data-theme="dark"] .source-desc { color: #475569; }

/* ── Contact page: contact method rows ── */
.contact-methods { display: flex; flex-direction: column; gap: 0.625rem; margin: 0.5rem 0 1.25rem; }
.contact-method {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    background: var(--gray-50);
    text-decoration: none;
    transition: var(--transition);
}
.contact-method:hover { background: var(--green-50); border-color: var(--green-200, #bbf7d0); }
.contact-method-icon {
    width: 38px; height: 38px; flex-shrink: 0;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    background: var(--green-50); color: var(--green-600);
}
.contact-method-info { flex: 1; }
.contact-method-label { font-size: 0.75rem; color: var(--gray-400); font-weight: 500; }
.contact-method-value { font-size: 0.875rem; color: var(--gray-700); font-weight: 600; }
.contact-method-arrow { color: var(--gray-300); font-size: 0.8rem; }

[data-theme="dark"] .contact-method { background: #0f172a; border-color: #243048; }
[data-theme="dark"] .contact-method:hover { background: #111f35; border-color: var(--green-700); }
[data-theme="dark"] .contact-method-label { color: #475569; }
[data-theme="dark"] .contact-method-value { color: #cbd5e1; }
[data-theme="dark"] .contact-method-arrow { color: #334155; }

[data-theme="dark"] .privacy-header { border-bottom-color: #243048; }
[data-theme="dark"] .privacy-header h2 { color: #e2e8f0; }
[data-theme="dark"] .privacy-body h3 { color: #94a3b8; }
[data-theme="dark"] .privacy-body p,
[data-theme="dark"] .privacy-body li { color: #64748b; }
[data-theme="dark"] .privacy-footer { border-top-color: #243048; }
[data-theme="dark"] .btn-back { color: var(--green-400, #4ade80); border-color: #243048; }
[data-theme="dark"] .btn-back:hover { background: #0f172a; }

/* ═══════════════════════════════════════
   PRINT STYLES
═══════════════════════════════════════ */

/* ═══════════════════════════════════════
   HISTORY PAGE (/history/...)
═══════════════════════════════════════ */

.history-page { max-width: 760px; margin: 0 auto; padding: 1.5rem 0 3rem; }

.history-hero {
    background: linear-gradient(135deg, var(--green-900) 0%, var(--green-700) 100%);
    border-radius: var(--radius-lg);
    padding: 2rem 2.25rem;
    margin-bottom: 1.5rem;
    color: white;
}
.history-hero h1 { font-size: 1.5rem; font-weight: 800; margin-bottom: 0.4rem; letter-spacing: -0.02em; }
.history-hero-sub { font-size: 0.85rem; opacity: 0.75; margin-bottom: 1.25rem; }

.history-month-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.history-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.9rem;
    background: rgba(255,255,255,0.15);
    color: white;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s;
}
.history-nav-btn:hover { background: rgba(255,255,255,0.25); }
.history-nav-disabled {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.9rem;
    color: rgba(255,255,255,0.3);
    font-size: 0.8rem;
    cursor: default;
}
.history-nav-current {
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0.9;
    flex: 1;
    text-align: center;
}

.history-no-data {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gray-500);
}
.history-no-data i { font-size: 2.5rem; margin-bottom: 1rem; display: block; opacity: 0.4; }
.history-no-data p { font-size: 0.9rem; margin-bottom: 0.75rem; }
.history-no-data a { color: var(--green-700); font-weight: 500; }

.history-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.history-stat {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.history-stat-label { font-size: 0.72rem; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.04em; }
.history-stat-value { font-size: 1.1rem; font-weight: 800; color: var(--gray-900); }
.history-stat-sub   { font-size: 0.72rem; color: var(--gray-400); }
.history-stat-high  { color: var(--green-700); }
.history-stat-low   { color: var(--amber-700); }

.history-chart-wrap { position: relative; }

.history-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.history-table th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    background: var(--gray-50);
    color: var(--gray-600);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.history-table td { padding: 0.65rem 0.75rem; border-top: 1px solid var(--gray-100); }
.history-table tbody tr:hover { background: var(--gray-50); }

/* Dark mode */
[data-theme="dark"] .history-stat         { background: #1e293b; }
[data-theme="dark"] .history-stat-label   { color: #64748b; }
[data-theme="dark"] .history-stat-value   { color: #f1f5f9; }
[data-theme="dark"] .history-stat-sub     { color: #475569; }
[data-theme="dark"] .history-stat-high    { color: #4ade80; }
[data-theme="dark"] .history-stat-low     { color: #fbbf24; }
[data-theme="dark"] .history-table th     { background: #0f172a; color: #64748b; }
[data-theme="dark"] .history-table td     { border-color: #1e293b; color: #e2e8f0; }
[data-theme="dark"] .history-table tbody tr:hover { background: #1e293b; }

@media (max-width: 600px) {
    .history-stats-row { grid-template-columns: repeat(2, 1fr); }
    .history-hero { padding: 1.5rem 1.25rem; }
    .history-hero h1 { font-size: 1.2rem; }
    .history-month-nav { justify-content: space-between; }
    .history-nav-current { display: none; }
    .history-chart-wrap { } /* height controlled by ApexCharts chart.height option */
}

.history-archive-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    margin: 0.75rem 0 0 0;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--green-700);
    text-decoration: none;
    border-top: 1px solid var(--gray-200);
    width: 100%;
    justify-content: center;
    transition: color 0.15s;
}
.history-archive-link:hover { color: var(--green-800); text-decoration: underline; }
[data-theme="dark"] .history-archive-link { color: #4ade80; border-color: #1e293b; }
[data-theme="dark"] .history-archive-link:hover { color: #86efac; }

.converter-page-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.6rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--green-700);
    text-decoration: none;
    transition: color 0.15s;
}
.converter-page-link:hover { color: var(--green-800); text-decoration: underline; }
.converter-page-link i { font-size: 0.7rem; }

[data-theme="dark"] .converter-page-link       { color: #4ade80; }
[data-theme="dark"] .converter-page-link:hover { color: #86efac; }

/* ═══════════════════════════════════════
   CONVERTER PAGE (/convert/...)
═══════════════════════════════════════ */

.convert-breadcrumb {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin: 1.25rem 0 0;
}
.convert-breadcrumb a { color: var(--green-700); text-decoration: none; }
.convert-breadcrumb a:hover { text-decoration: underline; }
.convert-breadcrumb-sep { margin: 0 0.4rem; }

.convert-page { max-width: 760px; margin: 0 auto; padding: 1.5rem 0 3rem; }

.convert-hero {
    background: linear-gradient(135deg, var(--green-900) 0%, var(--green-700) 100%);
    border-radius: var(--radius-lg);
    padding: 2rem 2.25rem;
    margin-bottom: 1.5rem;
    color: white;
}

.convert-hero h1 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}

.convert-result {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.convert-result-left,
.convert-result-right { display: flex; flex-direction: column; gap: 0.25rem; }

.convert-from-label,
.convert-to-label { font-size: 0.75rem; opacity: 0.75; text-transform: uppercase; letter-spacing: 0.05em; }

.convert-from-value { font-size: 1.4rem; font-weight: 700; }
.convert-to-value   { font-size: 1.4rem; font-weight: 800; color: var(--gold-300); }

.convert-arrow-wrap {
    font-size: 1.25rem;
    opacity: 0.7;
    flex-shrink: 0;
}

.convert-rate-note {
    font-size: 0.82rem;
    opacity: 0.85;
}

.convert-updated { opacity: 0.65; }

.convert-card {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.25rem;
}

.convert-card-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.convert-card-title i { color: var(--green-600); }

.convert-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.convert-table th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    background: var(--gray-50);
    color: var(--gray-600);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.convert-table td {
    padding: 0.75rem;
    border-top: 1px solid var(--gray-100);
    vertical-align: middle;
}
.convert-table-result { font-weight: 700; color: var(--gray-900); }

.convert-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 99px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.convert-badge-official { background: var(--blue-100);  color: var(--blue-700); }
.convert-badge-bm       { background: var(--amber-100); color: var(--amber-700); }
.convert-badge-custom   { background: #ede9fe; color: #6d28d9; }

.convert-rate-input {
    width: 110px;
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    color: var(--gray-900);
    background: transparent;
    outline: none;
}
.convert-rate-input::placeholder { color: var(--gray-400); }
.convert-rate-input:focus { border-color: #6d28d9; box-shadow: 0 0 0 2px rgba(109,40,217,0.12); }

.convert-form-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.convert-input-wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex: 1;
    min-width: 160px;
}
.convert-input-prefix {
    padding: 0.55rem 0.75rem;
    background: var(--gray-100);
    color: var(--gray-600);
    font-size: 0.8rem;
    font-weight: 600;
    border-right: 1.5px solid var(--gray-300);
}
.convert-input {
    border: none;
    outline: none;
    padding: 0.55rem 0.75rem;
    font-family: inherit;
    font-size: 0.9rem;
    flex: 1;
    min-width: 0;
}
.convert-form-arrow { color: var(--gray-400); font-size: 0.9rem; }
.convert-form-target {
    font-weight: 700;
    color: var(--gray-700);
    font-size: 0.9rem;
}
.convert-go-btn {
    padding: 0.6rem 1.25rem;
    background: var(--green-700);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s;
    white-space: nowrap;
}
.convert-go-btn:hover { background: var(--green-800); }

.convert-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.convert-grid-item {
    padding: 0.4rem 0.85rem;
    background: var(--gray-100);
    color: var(--gray-700);
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    border: 1.5px solid transparent;
}
.convert-grid-item:hover   { background: var(--green-50); border-color: var(--green-700); color: var(--green-800); }
.convert-grid-active       { background: var(--green-700) !important; color: white !important; border-color: var(--green-700) !important; }

.convert-summary {
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.7;
    margin: 0.25rem 0 1.25rem;
}
.convert-summary strong { color: var(--gray-900); }

[data-theme="dark"] .convert-summary       { color: #94a3b8; }
[data-theme="dark"] .convert-summary strong { color: #f1f5f9; }

.convert-disclaimer {
    font-size: 0.78rem;
    color: var(--gray-500);
    text-align: center;
    line-height: 1.6;
}
.convert-disclaimer a { color: var(--green-700); }

/* Dark mode — converter */
[data-theme="dark"] .convert-card             { background: #1e293b; }
[data-theme="dark"] .convert-card-title       { color: #94a3b8; }
[data-theme="dark"] .convert-table th         { background: #0f172a; color: #64748b; }
[data-theme="dark"] .convert-table td         { border-color: #1e293b; color: #e2e8f0; }
[data-theme="dark"] .convert-table-result     { color: #f1f5f9; }
[data-theme="dark"] .convert-badge-custom     { background: #2e1065; color: #c4b5fd; }
[data-theme="dark"] .convert-rate-input       { border-color: #334155; color: #e2e8f0; }
[data-theme="dark"] .convert-rate-input:focus { border-color: #a78bfa; box-shadow: 0 0 0 2px rgba(167,139,250,0.15); }
[data-theme="dark"] .convert-input-wrap       { border-color: #334155; }
[data-theme="dark"] .convert-input-prefix     { background: #0f172a; color: #94a3b8; border-color: #334155; }
[data-theme="dark"] .convert-input            { background: #1e293b; color: #f1f5f9; }
[data-theme="dark"] .convert-grid-item        { background: #1e293b; color: #94a3b8; }
[data-theme="dark"] .convert-grid-item:hover  { background: #064e3b; border-color: #10b981; color: #6ee7b7; }
[data-theme="dark"] .convert-disclaimer       { color: #64748b; }

@media (max-width: 520px) {
    .convert-hero { padding: 1.5rem 1.25rem; }
    .convert-hero h1 { font-size: 1.3rem; }
    .convert-from-value,
    .convert-to-value { font-size: 1.15rem; }
    .convert-card { padding: 1.25rem 1rem; }
    .convert-form-row { flex-direction: column; align-items: stretch; }
    .convert-go-btn { width: 100%; text-align: center; }
}

/* ─── Blog ─────────────────────────────────────────────────────────────────── */

.blog-hero {
    padding: 2rem 0 1.5rem;
    border-bottom: 1.5px solid var(--gray-200);
    margin-bottom: 1.75rem;
}
.blog-hero h1 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 0.4rem;
}
.blog-hero h1 i { color: var(--green-700); margin-right: 0.4rem; }
.blog-hero p { color: var(--gray-500); font-size: 1rem; }

.blog-empty {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--gray-400);
}
.blog-empty i { font-size: 2.5rem; margin-bottom: 1rem; display: block; }
.blog-empty p { font-size: 1rem; }

.blog-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.blog-card {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1.5px solid var(--gray-200);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: var(--transition);
    min-height: 12rem;
}
.blog-card:hover {
    border-color: var(--green-700);
    box-shadow: 0 4px 12px rgba(21,128,61,0.08);
}

.blog-card-body { display: flex; flex-direction: column; gap: 0.6rem; }

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.blog-card-date,
.blog-card-read-time,
.blog-card-author {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    color: var(--gray-600);
}
.blog-card-date i,
.blog-card-read-time i,
.blog-card-author i { color: var(--green-700); font-size: 0.8rem; }

.blog-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
}
.blog-card-title a {
    color: var(--gray-900);
    text-decoration: none;
    transition: color 0.15s;
}
.blog-card-title a:hover { color: var(--green-700); }

.blog-card-excerpt {
    font-size: 0.92rem;
    color: var(--gray-600);
    line-height: 1.65;
    margin: 0;
}

.blog-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid var(--gray-200);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.blog-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--green-700);
    text-decoration: none;
    transition: gap 0.15s;
}
.blog-read-more:hover { gap: 0.55rem; }
.blog-read-more i { font-size: 0.75rem; }

/* Featured image — blog post page */
.blog-post-featured-image {
    width: 100%;
    max-height: 600px;
    object-fit: contain;
    border-radius: var(--radius-md);
    display: block;
    margin-bottom: 2rem;
    background: #f8f9fa;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

/* Featured image — blog listing and teaser cards */
.blog-card-image-link {
    display: block;
    margin: -1.5rem -1.5rem 1.25rem;
    overflow: hidden;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    background: var(--gray-50);
}
.blog-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: radial-gradient(circle at top left, #f0fdf4, var(--gray-50));
    display: block;
    transition: transform 0.35s ease;
}
.blog-card:hover .blog-card-image { transform: scale(1.015); }

@media (max-width: 600px) {
    .blog-card-image-link { margin: -1.25rem -1rem 1rem; }
}

/* Draft preview banner */

.draft-preview-banner {
    background: var(--amber-50);
    border-bottom: 2px solid var(--amber-600);
    color: var(--amber-700);
    font-size: 0.9rem;
    padding: 0.75rem 1.5rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

[data-theme="dark"] .draft-preview-banner {
    background: #3d2600;
    border-color: var(--amber-600);
    color: var(--amber-300);
}

/* Single post */

.blog-post {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1.5px solid var(--gray-200);
    padding: 2rem;
    margin-bottom: 2rem;
}

.blog-post-header {
    padding: 1.8rem;
    margin: -2rem -2rem 1.75rem;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    background: linear-gradient(135deg, #ecfdf5 0%, #f8fafc 72%);
    border-bottom: 1.5px solid var(--gray-200);
}

.blog-post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.blog-post-title {
    font-size: clamp(1.65rem, 3vw, 2.15rem);
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.blog-post-excerpt {
    font-size: 1.05rem;
    color: var(--gray-700);
    line-height: 1.65;
    margin: 0;
}

.blog-share {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.9rem 1rem;
    margin: -0.35rem 0 1.75rem;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.blog-share-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--gray-700);
    font-size: 0.9rem;
    font-weight: 700;
}

.blog-share-label i {
    color: var(--green-700);
}

.blog-share-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.blog-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 38px;
    padding: 0.48rem 0.72rem;
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    background: white;
    color: var(--gray-700);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.blog-share-btn:hover,
.blog-share-btn:focus-visible {
    border-color: var(--green-600);
    background: var(--green-50);
    color: var(--green-800);
    transform: translateY(-1px);
    outline: none;
}

.blog-share-feedback {
    display: none;
    flex-basis: 100%;
    color: var(--green-700);
    font-size: 0.78rem;
    font-weight: 600;
}

/* Prose content */
.blog-post-content { line-height: 1.8; color: var(--gray-700); font-size: 1.02rem; }
.blog-post-content p   { margin-bottom: 1.25rem; }
.blog-post-content h2  { font-size: 1.25rem; font-weight: 700; color: var(--gray-900); margin: 2rem 0 0.75rem; }
.blog-post-content h3  { font-size: 1.05rem; font-weight: 700; color: var(--gray-900); margin: 1.5rem 0 0.5rem; }
.blog-post-content ul,
.blog-post-content ol  { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.blog-post-content li  { margin-bottom: 0.4rem; }
.blog-post-content a   { color: var(--green-700); text-decoration: underline; }
.blog-post-content a:hover { color: var(--green-800); }
.blog-post-content strong { color: var(--gray-900); font-weight: 600; }

.blog-post-footer {
    padding-top: 1.5rem;
    border-top: 1.5px solid var(--gray-200);
    margin-top: 2rem;
}

/* Dark mode — blog */
[data-theme="dark"] .blog-hero h1         { color: #f1f5f9; }
[data-theme="dark"] .blog-hero p          { color: #94a3b8; }
[data-theme="dark"] .blog-hero            { border-color: #1e293b; }
[data-theme="dark"] .blog-card            { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .blog-card:hover      { border-color: #10b981; }
[data-theme="dark"] .blog-card-title a    { color: #f1f5f9; }
[data-theme="dark"] .blog-card-title a:hover { color: #6ee7b7; }
[data-theme="dark"] .blog-card-excerpt    { color: #94a3b8; }
[data-theme="dark"] .blog-card-footer     { border-color: #334155; }
[data-theme="dark"] .blog-post            { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .blog-post-header     { border-color: #334155; background: linear-gradient(135deg, #123524 0%, #1e293b 72%); }
[data-theme="dark"] .blog-post-title      { color: #f1f5f9; }
[data-theme="dark"] .blog-post-excerpt    { color: #94a3b8; }
[data-theme="dark"] .blog-share           { background: linear-gradient(135deg, #0f172a 0%, #162033 100%); border-color: #334155; }
[data-theme="dark"] .blog-share-label     { color: #cbd5e1; }
[data-theme="dark"] .blog-share-label i   { color: #6ee7b7; }
[data-theme="dark"] .blog-share-btn       { background: #111827; border-color: #334155; color: #cbd5e1; }
[data-theme="dark"] .blog-share-btn:hover,
[data-theme="dark"] .blog-share-btn:focus-visible { background: #123524; border-color: #6ee7b7; color: #f1f5f9; }
[data-theme="dark"] .blog-share-feedback  { color: #6ee7b7; }
[data-theme="dark"] .blog-post-content    { color: #cbd5e1; }
[data-theme="dark"] .blog-post-content h2,
[data-theme="dark"] .blog-post-content h3 { color: #f1f5f9; }
[data-theme="dark"] .blog-post-content strong { color: #f1f5f9; }
[data-theme="dark"] .blog-post-content a  { color: #6ee7b7; }
[data-theme="dark"] .blog-read-more       { color: #6ee7b7; }
[data-theme="dark"] .blog-post-footer     { border-color: #334155; }
[data-theme="dark"] .blog-empty           { color: #475569; }

@media (max-width: 600px) {
    .blog-post { padding: 1.25rem 1rem; }
    .blog-post-header { padding: 1.35rem 1rem; margin: -1.25rem -1rem 1.5rem; }
    .blog-post-title { font-size: 1.35rem; }
    .blog-share { align-items: stretch; margin-top: -0.35rem; padding: 0.85rem; }
    .blog-share-label { width: 100%; }
    .blog-share-actions { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .blog-share-btn { justify-content: center; }
    .blog-card { padding: 1.25rem 1rem; }
}

/* ─── Newsletter signup card ─────────────────────────────────────────────────── */

.newsletter-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1.5px solid #bbf7d0;
    border-radius: var(--radius-md);
    padding: 3rem 2rem 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
}

.newsletter-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #14532d;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin: 0 auto 1.25rem;
}

.newsletter-card-body { margin-bottom: 1.5rem; }
.newsletter-card-title {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--gray-900);
    margin-bottom: 0.4rem;
}
.newsletter-card-sub {
    font-size: 0.925rem;
    color: var(--gray-600);
    max-width: 420px;
    margin: 0 auto;
    line-height: 1.6;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 460px;
    margin: 0 auto 0.875rem;
}

.newsletter-input {
    flex: 1;
    min-width: 220px;
    border: 1.5px solid #86efac;
    border-radius: 8px;
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    background: #fff;
    color: var(--gray-900);
    transition: border-color 0.15s;
}
.newsletter-input:focus { border-color: #14532d; }

.newsletter-btn {
    background: #14532d;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.65rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}
.newsletter-btn:hover    { background: #166534; }
.newsletter-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.newsletter-note {
    font-size: 0.78rem;
    color: var(--gray-500);
    margin: 0;
}

.newsletter-feedback {
    font-size: 0.875rem;
    min-height: 1.4em;
    margin-top: 0.5rem;
}
.newsletter-feedback.success { color: #15803d; font-weight: 600; }
.newsletter-feedback.error   { color: #dc2626; }
.newsletter-feedback.error,
.alert-feedback.error {
    font-weight: 600;
}

[data-theme="dark"] .newsletter-card           { background: linear-gradient(135deg, #0f2d1a 0%, #14532d22 100%); border-color: #166534; }
[data-theme="dark"] .newsletter-card-title     { color: #f1f5f9; }
[data-theme="dark"] .newsletter-card-sub       { color: #94a3b8; }
[data-theme="dark"] .newsletter-input          { background: #1e293b; border-color: #334155; color: #f1f5f9; }
[data-theme="dark"] .newsletter-input:focus    { border-color: #6ee7b7; }
[data-theme="dark"] .newsletter-note           { color: #64748b; }
[data-theme="dark"] .newsletter-feedback.success { color: #6ee7b7; }

@media (max-width: 600px) {
    .newsletter-card  { padding: 2rem 1.25rem; }
    .newsletter-input { min-width: 0; width: 100%; }
    .newsletter-form  { flex-direction: column; }
    .newsletter-btn   { width: 100%; }
}

/* ─── Homepage blog teaser ───────────────────────────────────────────────────── */

.blog-teaser { margin-bottom: 2rem; }

.blog-teaser-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.blog-teaser-view-all {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--green-700);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.15s;
}
.blog-teaser-view-all:hover { color: var(--green-900); }

.blog-teaser-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.blog-teaser .blog-card { height: 100%; }

.blog-teaser .blog-card-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

[data-theme="dark"] .blog-teaser-view-all       { color: #6ee7b7; }
[data-theme="dark"] .blog-teaser-view-all:hover { color: #a7f3d0; }

@media (max-width: 900px) {
    .blog-teaser-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .blog-teaser-grid { grid-template-columns: 1fr; }
}

/* ─── Remittance comparison page ────────────────────────────────────────────── */

.rm-draft-notice {
    background: #fef9c3;
    border: 1px solid #fde047;
    border-radius: 8px;
    padding: 0.65rem 1rem;
    font-size: 0.8rem;
    color: #713f12;
    margin-bottom: 1.25rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
[data-theme="dark"] .rm-draft-notice { background: #1c1a09; border-color: #713f12; color: #fde047; }

.rm-hero { margin-bottom: 1.75rem; }
.rm-hero h1 { font-size: 1.6rem; font-weight: 800; color: var(--gray-900); margin-bottom: 0.4rem; }
.rm-hero p  { color: var(--gray-600); font-size: 0.95rem; }
[data-theme="dark"] .rm-hero h1 { color: #f1f5f9; }
[data-theme="dark"] .rm-hero p  { color: #94a3b8; }

.rm-calculator {
    background: var(--green-50);
    border: 1.5px solid var(--green-200);
    border-radius: 12px;
    padding: 1.1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.rm-calc-label { font-size: 0.875rem; font-weight: 600; color: var(--gray-700); white-space: nowrap; }
.rm-calc-row   { display: flex; align-items: center; gap: 0.5rem; }
.rm-calc-prefix, .rm-calc-suffix {
    font-size: 0.875rem; font-weight: 600; color: var(--green-700);
}
.rm-calc-input {
    border: 1.5px solid var(--green-300);
    border-radius: 8px;
    padding: 0.45rem 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    width: 110px;
    color: var(--gray-900);
    background: #fff;
    outline: none;
}
.rm-calc-input:focus { border-color: var(--green-600); }
[data-theme="dark"] .rm-calculator   { background: #0f2a1a; border-color: #166534; }
[data-theme="dark"] .rm-calc-input   { background: #1e293b; color: #f1f5f9; border-color: #166534; }

.rm-table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1.5px solid var(--gray-200);
    margin-bottom: 0.75rem;
}
.rm-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.rm-table thead th {
    background: var(--green-700);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.65rem 1rem;
    text-align: left;
    white-space: nowrap;
}
.rm-table thead th:last-child { width: 110px; }
.rm-table tbody tr { border-bottom: 1px solid var(--gray-100); transition: background 0.15s; }
.rm-table tbody tr:last-child { border-bottom: none; }
.rm-table tbody tr:hover { background: var(--green-50); }
.rm-table tbody td { padding: 0.85rem 1rem; color: var(--gray-800); vertical-align: middle; }

.rm-provider-cell { display: flex; align-items: center; gap: 0.6rem; }
.rm-logo {
    width: 34px; height: 34px; border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 800; color: #fff; flex-shrink: 0;
    letter-spacing: 0.5px;
}
.rm-name { font-weight: 600; color: var(--gray-900); }
.rm-best {
    display: inline-flex; align-items: center;
    background: #dcfce7; color: #15803d;
    font-size: 0.65rem; font-weight: 700;
    padding: 0.15rem 0.5rem; border-radius: 20px;
    border: 1px solid #bbf7d0;
    text-transform: uppercase; letter-spacing: 0.04em;
    white-space: nowrap;
}
.rm-gets-highlight { font-weight: 700; color: var(--green-700); font-size: 0.95rem; }
.rm-th-from { min-width: 130px; }
.rm-from    { font-size: 0.78rem; color: var(--gray-500); }

.rm-cta {
    display: inline-flex; align-items: center; gap: 0.35rem;
    background: var(--green-700); color: #fff;
    font-size: 0.78rem; font-weight: 600;
    padding: 0.45rem 0.85rem; border-radius: 8px;
    text-decoration: none; white-space: nowrap;
    transition: background 0.15s;
}
.rm-cta:hover { background: var(--green-800); }

[data-theme="dark"] .rm-table-wrap    { border-color: #334155; }
[data-theme="dark"] .rm-table thead th { background: #166534; }
[data-theme="dark"] .rm-table tbody tr { border-color: #1e293b; }
[data-theme="dark"] .rm-table tbody tr:hover { background: #0f2a1a; }
[data-theme="dark"] .rm-table tbody td { color: #cbd5e1; }
[data-theme="dark"] .rm-name          { color: #f1f5f9; }
[data-theme="dark"] .rm-best          { background: #064e3b; color: #6ee7b7; border-color: #065f46; }
[data-theme="dark"] .rm-gets-highlight { color: #4ade80; }
[data-theme="dark"] .rm-from          { color: #64748b; }

.rm-rates-note {
    font-size: 0.78rem; color: var(--gray-500);
    margin-bottom: 2.5rem; line-height: 1.6;
    display: flex; gap: 0.4rem; align-items: flex-start;
}
.rm-rates-note a { color: var(--green-700); }
.rm-rates-note i { margin-top: 0.15rem; flex-shrink: 0; }

.rm-about { margin-bottom: 2.5rem; }
.rm-about h2 { font-size: 1.1rem; font-weight: 700; color: var(--gray-900); margin-bottom: 1.25rem; }
.rm-about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.rm-about-card {
    display: flex; gap: 0.85rem; align-items: flex-start;
    background: var(--gray-50); border: 1px solid var(--gray-200);
    border-radius: 10px; padding: 0.9rem 1rem;
}
.rm-about-logo {
    width: 38px; height: 38px; border-radius: 8px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 800; color: #fff; letter-spacing: 0.5px;
}
.rm-about-card strong { font-size: 0.875rem; color: var(--gray-900); display: block; margin-bottom: 0.25rem; }
.rm-about-card p { font-size: 0.8rem; color: var(--gray-600); margin: 0; line-height: 1.6; }

[data-theme="dark"] .rm-about h2       { color: #f1f5f9; }
[data-theme="dark"] .rm-about-card     { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .rm-about-card strong { color: #f1f5f9; }
[data-theme="dark"] .rm-about-card p   { color: #94a3b8; }

.rm-faq { margin-bottom: 2.5rem; }
.rm-faq h2 { font-size: 1.1rem; font-weight: 700; color: var(--gray-900); margin-bottom: 1rem; }
.rm-faq-item {
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}
.rm-faq-item summary {
    font-size: 0.875rem; font-weight: 600; color: var(--gray-900);
    padding: 0.85rem 1rem; cursor: pointer; list-style: none;
    display: flex; justify-content: space-between; align-items: center;
    user-select: none;
}
.rm-faq-item summary::-webkit-details-marker { display: none; }
.rm-faq-item summary::after {
    content: '+'; font-size: 1.1rem; color: var(--green-700); font-weight: 400; flex-shrink: 0;
}
.rm-faq-item[open] summary::after { content: '−'; }
.rm-faq-item[open] summary { background: var(--green-50); }
.rm-faq-item p {
    font-size: 0.845rem; color: var(--gray-600); line-height: 1.7;
    padding: 0.75rem 1rem 0.9rem; margin: 0; border-top: 1px solid var(--gray-100);
}
.rm-faq-item p a { color: var(--green-700); }

[data-theme="dark"] .rm-faq h2         { color: #f1f5f9; }
[data-theme="dark"] .rm-faq-item       { border-color: #334155; }
[data-theme="dark"] .rm-faq-item summary { color: #f1f5f9; }
[data-theme="dark"] .rm-faq-item[open] summary { background: #0f2a1a; }
[data-theme="dark"] .rm-faq-item p     { color: #94a3b8; border-color: #1e293b; }

@media (max-width: 640px) {
    .rm-hero h1        { font-size: 1.3rem; }
    .rm-about-grid     { grid-template-columns: 1fr; }
    .rm-th-from, .rm-from { display: none; }
    .rm-table thead th, .rm-table tbody td { padding: 0.65rem 0.65rem; }
}

/* ─── Widget demo page ───────────────────────────────────────────────────────── */

.widget-demo {
    max-width: 860px;
    margin: 0 auto;
    padding: 2rem 0 3rem;
}

.widget-demo-hero {
    margin-bottom: 2.5rem;
}

.widget-demo-hero h1 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.widget-demo-hero p {
    color: var(--gray-600);
    font-size: 1rem;
}

.widget-demo-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

.widget-demo-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--green-700);
    margin-bottom: 0.75rem;
}

.widget-demo-preview {
    min-height: 120px;
}

.widget-demo-code-block {
    position: relative;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 1rem 3rem 1rem 1rem;
    margin-bottom: 1.5rem;
}

.widget-demo-code-block code {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: var(--gray-800);
    word-break: break-all;
    display: block;
}

.widget-copy-btn {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-500);
    font-size: 0.95rem;
    padding: 0.25rem;
    border-radius: 4px;
    line-height: 1;
}

.widget-copy-btn:hover { color: var(--green-700); }

.widget-copy-confirm {
    position: absolute;
    top: 0.65rem;
    right: 2.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--green-700);
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.widget-copy-confirm.visible { opacity: 1; }

.widget-demo-steps {
    color: var(--gray-700);
    font-size: 0.875rem;
    padding-left: 1.25rem;
    margin-bottom: 1.25rem;
    line-height: 1.7;
}

.widget-demo-note {
    font-size: 0.8rem;
    color: var(--gray-500);
    line-height: 1.6;
}

.widget-demo-note a { color: var(--green-700); }

[data-theme="dark"] .widget-demo-hero h1  { color: #f1f5f9; }
[data-theme="dark"] .widget-demo-hero p   { color: #94a3b8; }
[data-theme="dark"] .widget-demo-code-block { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .widget-demo-code-block code { color: #e2e8f0; }
[data-theme="dark"] .widget-demo-steps    { color: #cbd5e1; }
[data-theme="dark"] .widget-demo-note     { color: #64748b; }

@media (max-width: 640px) {
    .widget-demo-body { grid-template-columns: 1fr; }
    .widget-demo-hero h1 { font-size: 1.3rem; }
}

/* ─── Related posts ─────────────────────────────────────────────────────────── */

.related-posts {
    margin-top: 2.5rem;
}

.related-posts-heading {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1.5px solid var(--gray-200);
}

[data-theme="dark"] .related-posts-heading {
    color: #f1f5f9;
    border-color: #334155;
}

/* ─── Regional currency strip ───────────────────────────────────────────────── */

.currency-strip {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    margin: -1rem 0 0.5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.currency-strip::-webkit-scrollbar { display: none; }

.currency-strip-card {
    flex: 0 0 auto;
    background: white;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.15s;
}
.currency-strip-card:hover { border-color: var(--green-700); }

.currency-strip-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
}

.currency-strip-code {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
}

.currency-strip-rate {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.2;
}

.currency-strip-label {
    font-size: 0.62rem;
    color: var(--gray-400);
}

.currency-strip-delta {
    font-size: 0.65rem;
    font-weight: 700;
    white-space: nowrap;
}
.currency-strip-delta.up   { color: var(--green-600); }
.currency-strip-delta.down { color: #dc2626; }

[data-theme="dark"] .currency-strip-card       { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .currency-strip-card:hover { border-color: #10b981; }
[data-theme="dark"] .currency-strip-code       { color: #475569; }
[data-theme="dark"] .currency-strip-rate       { color: #f1f5f9; }
[data-theme="dark"] .currency-strip-label      { color: #334155; }

/* ─── Extra convert-table badge variants ────────────────────────────────────── */

.convert-badge-bm-min { background: #fef9c3; color: #a16207; }
.convert-badge-cash   { background: #ccfbf1; color: #0f766e; }

[data-theme="dark"] .convert-badge-bm-min { background: #422006; color: #fcd34d; }
[data-theme="dark"] .convert-badge-cash   { background: #042f2e; color: #5eead4; }

@media print {
    body::before,
    header .live-badge,
    .theme-toggle,
    .converter-card,
    .chart-card,
    .copy-btn,
    .refresh-btn,
    .wa-share-btn,
    .delta,
    .stat-delta,
    .ad-slot,
    .cookie-banner,
    footer { display: none !important; }

    body { background: white; color: black; }

    .stats-bar { position: static; box-shadow: none; border: 1px solid #ccc; }

    .rate-section { box-shadow: none; page-break-inside: avoid; }

    table { min-width: unset; }

    a[href]::after { content: none; }
}