/* ==========================================================================
   pkgoldrate.com — Global Design System
   Extracted 1:1 from Home-page-design.html so every page shares the exact
   same tokens, spacing, cards, navbar and footer.
   ========================================================================== */

:root {
    --bg: #F8FAFC;
    --surface: #FFFFFF;
    --bg-tint: #F1F5F9;
    --text: #0B1120;
    --muted: #64748B;
    --body: #475569;
    --line: #E2E8F0;
    --line-soft: #F1F5F9;
    --primary: #1E3A8A;
    --primary-dark: #172554;
    --primary-light: #EFF6FF;
    --accent: #D4AF37;
    --accent-light: #EAB308;
    --accent-soft: #FEF9C3;
    --up: #059669;
    --up-soft: #D1FAE5;
    --down: #DC2626;
    --down-soft: #FEE2E2;
    --shadow-sm: 0 1px 2px rgba(11, 17, 32, .04);
    --shadow-md: 0 4px 12px rgba(11, 17, 32, .05);
    --shadow-lg: 0 8px 24px rgba(11, 17, 32, .08);
    --radius: 10px;
    --radius-lg: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box }
html { scroll-behavior: smooth }

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text)
}

img { max-width: 100%; display: block }
a { color: inherit; text-decoration: none }
button { font-family: inherit; cursor: pointer; border: none; background: none }

/* 10% Left/Right Padding for AdSense Ads Space */
.container { max-width: 1280px; margin: 0 auto; padding: 0 10% }

@media(max-width: 1100px) { .container { padding: 0 40px } }
@media(max-width: 768px) { .container { padding: 0 20px } }

::-webkit-scrollbar { width: 6px }
::-webkit-scrollbar-track { background: var(--bg) }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 4px }
::-webkit-scrollbar-thumb:hover { background: var(--primary) }

/* ===== Header ===== */
.header {
    position: sticky; top: 0; z-index: 100;
    background: linear-gradient(90deg, rgba(235, 240, 248, 0.95) 0%, rgba(242, 238, 232, 0.95) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color .3s;
}

.header.scrolled { border-bottom: 1px solid var(--line) }

.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 0; max-width: 1280px; margin: 0 auto; position: relative;
}

/* Logo — image lockup, sized by height so the 5:1 artwork keeps its ratio
   and can never force the header taller. */
.logo {
    display: flex; align-items: center; gap: 8px;
    flex-shrink: 0; line-height: 0;
}

/* NOTE: set display on the classes themselves, never via `.logo img`.
   `.logo img` (0,1,1) outranks `.logo-mark` (0,1,0) and would keep the
   emblem visible alongside the full lockup. */
.logo-full { display: block; height: 34px; width: auto; max-width: 190px }

/* Square mark, shown only where the full lockup would crowd the header. */
.logo-mark { display: none; height: 32px; width: 32px; border-radius: 8px }

@media(max-width: 420px) {
    .logo-full { display: none }
    .logo-mark { display: block }
}

.nav {
    display: flex; gap: 20px; align-items: center;
    background: var(--surface); padding: 6px 14px; border-radius: 30px;
    border: 1px solid var(--line); box-shadow: var(--shadow-sm)
}

.nav a { font-size: 12px; font-weight: 500; color: var(--muted); transition: color .3s }
.nav a:hover { color: var(--text) }

.header-cta {
    padding: 8px 18px; background: var(--primary); color: #fff;
    border-radius: 30px; font-size: 12px; font-weight: 600; transition: all .3s;
}

.header-cta:hover { background: var(--primary-dark); transform: translateY(-1px) }

/* ---- Language switcher (rendered on both editions) ---- */
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 2px;
    background: var(--surface);
    margin-inline-start: 10px;
    flex-shrink: 0;
}

.lang-switch a {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    padding: 6px 11px;
    border-radius: 16px;
    color: var(--muted);
    white-space: nowrap;
    transition: background .2s ease, color .2s ease;
}

.lang-switch a:hover { color: var(--primary) }
.lang-switch a.is-active { background: var(--primary); color: #fff }

.lang-switch a[lang="ur"] {
    font-family: 'Noto Naskh Arabic', 'Segoe UI', serif;
    font-size: 12px;
}

@media(max-width: 520px) {
    .lang-switch { margin-inline-start: 6px }
    .lang-switch a { padding: 5px 8px }
}

.menu-btn {
    display: none; font-size: 20px; background: none; border: none;
    cursor: pointer; color: var(--text); z-index: 101
}

@media(max-width:768px) {
    .header-cta { display: none }
    .menu-btn { display: block }
    .nav {
        display: none; position: absolute; top: 100%; left: 0; right: 0;
        background: var(--surface); flex-direction: column; align-items: stretch;
        padding: 12px; margin: 8px 0 0 0; border-radius: 0 0 10px 10px;
        border: 1px solid var(--line); box-shadow: var(--shadow-lg); gap: 0;
        max-height: 80vh; overflow-y: auto;
    }
    .nav.active { display: flex }
    .nav a {
        padding: 12px 10px; border-bottom: 1px solid var(--line-soft);
        font-size: 14px; border-radius: 0;
    }
    .nav a:last-child { border-bottom: none }
}

/* ===== Ticker ===== */
.ticker {
    background: var(--primary-dark); color: #fff; overflow: hidden;
    white-space: nowrap; padding: 8px 0; border-bottom: 1px solid var(--line);
}

.ticker-track { display: inline-block; animation: scroll 60s linear infinite }
.ticker-item { display: inline-block; margin: 0 24px; font-size: 12px; font-weight: 500 }
.ticker-item .symbol {
    color: rgba(255, 255, 255, 0.6); margin-right: 6px; font-size: 10px;
    text-transform: uppercase; letter-spacing: .1em
}
.ticker-item .price { font-weight: 600; margin-right: 6px }
.ticker-item .up { color: var(--up) }
.ticker-item .down { color: var(--down) }

@keyframes scroll {
    from { transform: translateX(0) }
    to { transform: translateX(-50%) }
}

/* ===== Hero ===== */
.hero { padding: 60px 0 40px; background: var(--bg) }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center }

.hero-badge {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px;
    background: var(--primary-light); border: 1px solid var(--primary);
    border-radius: 20px; font-size: 10px; font-weight: 600; color: var(--primary);
    margin-bottom: 20px; text-transform: uppercase; letter-spacing: .1em;
}

.hero-badge .dot {
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--up); animation: pulse 2s ease-in-out infinite
}

@keyframes pulse {
    0%, 100% { opacity: 1 }
    50% { opacity: .4 }
}

.hero h1 {
    font-size: clamp(32px, 4vw, 48px); font-weight: 600; line-height: 1.15;
    margin-bottom: 16px; text-align: left; letter-spacing: -0.02em;
}

.hero p {
    font-size: clamp(15px, 1.6vw, 17px); color: var(--muted); line-height: 1.8;
    margin-bottom: 32px; max-width: 540px; text-align: left;
}

.hero-actions {
    display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 32px; justify-content: flex-start;
}

.btn-primary {
    padding: 11px 22px; background: var(--primary); color: #fff; border-radius: 6px;
    font-size: 13px; font-weight: 600; transition: all .3s;
    display: inline-flex; align-items: center; gap: 6px;
}

.btn-primary:hover {
    background: var(--primary-dark); transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.2)
}

.btn-secondary {
    padding: 11px 22px; background: var(--surface); color: var(--text);
    border: 1px solid var(--line); border-radius: 6px; font-size: 13px;
    font-weight: 600; transition: all .3s;
}

.btn-secondary:hover { border-color: var(--text); background: var(--bg-tint) }

/* Hero Bento Grid */
.bento-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr); gap: 10px; height: 360px;
}

.bento-card {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 16px;
    transition: all .3s cubic-bezier(.22, 1, .36, 1);
    display: flex; flex-direction: column; justify-content: space-between;
    position: relative; overflow: hidden;
}

.bento-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md) }

.bento-large {
    grid-column: span 2; grid-row: span 2;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff; border-color: transparent; padding: 24px
}

.bento-large:hover { border-color: transparent }
.bento-tall { grid-row: span 2 }

.bento-label {
    font-size: 10px; text-transform: uppercase; letter-spacing: .1em;
    font-weight: 600; color: var(--muted); margin-bottom: 6px
}

.bento-large .bento-label { color: rgba(255, 255, 255, 0.6) }
.bento-value { font-family: 'Sora', sans-serif; font-size: 18px; font-weight: 600; color: var(--text) }
.bento-large .bento-value { font-size: 32px; color: #fff; line-height: 1 }

.bento-change {
    font-size: 11px; font-weight: 600; color: var(--up); background: var(--up-soft);
    padding: 4px 8px; border-radius: 20px; display: inline-flex;
    align-items: center; gap: 4px; width: fit-content
}

.bento-change.down { color: var(--down); background: var(--down-soft) }
.bento-large .bento-change { background: rgba(5, 150, 105, 0.2); color: #34D399 }
.bento-large .bento-change.down { background: rgba(220, 38, 38, 0.25); color: #FCA5A5 }

.sparkline { width: 100%; height: 40px; margin-top: 12px }

@media(max-width:768px) {
    .desktop-only { display: none }
    .hero-grid { grid-template-columns: 1fr; gap: 24px; text-align: center }
    .hero h1 { text-align: center }
    .hero p { text-align: center; margin-left: auto; margin-right: auto }
    .hero-actions { justify-content: center }
    .hero-badge { margin: 0 auto 20px auto }
    .bento-grid { height: auto; grid-template-columns: 1fr 1fr; grid-template-rows: auto }
    .bento-large { grid-column: span 2; grid-row: span 1; padding: 20px }
    .bento-large .bento-value { font-size: 28px }
    .bento-tall { grid-row: span 1 }
}

/* ===== Section base ===== */
.section { padding: 64px 0 }
.section-alt { background: var(--surface) }

.section-head {
    display: flex; flex-direction: column; justify-content: center;
    align-items: center; text-align: center; margin-bottom: 32px; gap: 16px
}

.section-head-left { max-width: 600px; display: flex; flex-direction: column; align-items: center }

.section-tag {
    display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .2em;
    text-transform: uppercase; color: var(--primary); margin-bottom: 8px;
}

.section-title { font-size: clamp(22px, 3vw, 30px); margin-bottom: 8px }
.section-sub { font-size: 14px; color: var(--muted); font-weight: 400 }

.section-link {
    font-size: 13px; font-weight: 600; color: var(--text);
    display: flex; align-items: center; gap: 6px; transition: gap .3s
}

.section-link:hover { gap: 10px; color: var(--primary) }

@media(max-width:768px) { .section { padding: 48px 0 } }

/* ===== Market Pulse ===== */
.pulse-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px }

.pulse-card {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 16px;
    display: flex; flex-direction: column; gap: 8px; transition: all .3s;
}

.pulse-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px) }
.pulse-header { display: flex; justify-content: space-between; align-items: center }

.pulse-name {
    font-size: 11px; font-weight: 600; color: var(--muted);
    text-transform: uppercase; letter-spacing: .05em
}

.pulse-icon {
    width: 28px; height: 28px; border-radius: 6px; background: var(--primary-light);
    color: var(--primary); display: flex; align-items: center; justify-content: center
}

.pulse-value { font-size: 18px; font-weight: 600; color: var(--text); font-family: 'Sora', sans-serif }
.pulse-change { font-size: 11px; font-weight: 600; color: var(--up) }
.pulse-change.down { color: var(--down) }
.pulse-change.flat { color: var(--muted) }

@media(max-width:968px) { .pulse-row { grid-template-columns: repeat(2, 1fr) } }
@media(max-width:480px) { .pulse-row { grid-template-columns: 1fr } }

/* ===== Karat Rates Cards ===== */
.karat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px }

.karat-card {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius-lg); padding: 16px;
    display: flex; flex-direction: column; gap: 10px; transition: all 0.3s ease;
}

.karat-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-2px) }

.karat-card.featured {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.03) 0%, rgba(255, 255, 255, 1) 100%);
    border-color: var(--primary);
}

.karat-head { display: flex; justify-content: space-between; align-items: flex-start }
.karat-title { font-family: 'Sora', sans-serif; font-size: 14px; font-weight: 700; color: var(--text) }

.karat-sub {
    font-size: 10px; color: var(--muted); text-transform: uppercase;
    letter-spacing: 0.05em; margin-top: 2px; display: block;
}

.karat-badge {
    font-size: 9px; font-weight: 700; color: var(--primary);
    background: var(--primary-light); padding: 3px 8px;
    border-radius: 20px; border: 1px solid var(--primary);
}

.karat-price-main {
    font-family: 'Sora', sans-serif; font-size: 20px; font-weight: 700;
    color: var(--primary); line-height: 1;
}

.karat-price-main span { font-size: 11px; color: var(--muted); font-weight: 500; margin-left: 4px }

.karat-price-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
    padding-top: 10px; border-top: 1px solid var(--line-soft);
}

.karat-price-item { display: flex; flex-direction: column; gap: 2px }
.karat-price-label { font-size: 9px; color: var(--muted); text-transform: uppercase }
.karat-price-val { font-size: 12px; color: var(--text); font-weight: 600; font-family: 'Sora', sans-serif }

.karat-change {
    font-size: 11px; font-weight: 600; display: flex; align-items: center;
    gap: 6px; padding: 4px 8px; background: var(--up-soft); color: var(--up);
    border-radius: 6px; width: fit-content;
}

.karat-change.down { background: var(--down-soft); color: var(--down) }
.karat-change.flat { background: var(--bg-tint); color: var(--muted) }

@media(max-width:968px) { .karat-grid { grid-template-columns: repeat(2, 1fr) } }
@media(max-width:640px) { .karat-grid { grid-template-columns: 1fr } }

/* ===== International Rates Premium Cards ===== */
.intl-grid-new { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px }

.intl-card-new {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius-lg); padding: 14px;
    display: flex; flex-direction: column; gap: 10px; transition: all 0.3s ease;
}

.intl-card-new:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-2px) }
.intl-head { display: flex; align-items: center; gap: 8px }
.intl-flag { font-size: 20px; line-height: 1 }
.intl-country { font-family: 'Sora', sans-serif; font-size: 13px; font-weight: 700; color: var(--text) }
.intl-code { font-size: 10px; color: var(--muted); font-weight: 500; text-transform: uppercase }

.intl-body {
    display: flex; flex-direction: column; gap: 8px;
    padding-bottom: 8px; border-bottom: 1px solid var(--line-soft);
}

.intl-stat { display: flex; justify-content: space-between; align-items: center }
.intl-label { font-size: 11px; color: var(--muted) }
.intl-val { font-size: 12px; font-weight: 600; color: var(--text); font-family: 'Sora', sans-serif }
.intl-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto }
.intl-change { font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 4px }
.intl-change.up { color: var(--up); background: var(--up-soft) }
.intl-change.down { color: var(--down); background: var(--down-soft) }
.intl-change.stable { color: var(--muted); background: var(--bg-tint) }

.intl-link {
    font-size: 10px; font-weight: 600; color: var(--primary); text-decoration: none;
    text-transform: uppercase; letter-spacing: 0.05em; transition: gap 0.3s ease;
}

.intl-link:hover { text-decoration: underline }

/* ===== City Rates Cards ===== */
.city-grid-new { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px }

.city-card-new {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 14px;
    display: flex; flex-direction: column; gap: 12px; transition: all 0.3s ease;
}

.city-card-new:hover { border-color: var(--text); box-shadow: var(--shadow-md); transform: translateY(-2px) }

.city-card-new.your-city {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05) 0%, rgba(255, 255, 255, 1) 100%);
    border-color: var(--accent);
}

.city-head-new { display: flex; justify-content: space-between; align-items: center }
.city-name-new { font-family: 'Sora', sans-serif; font-size: 14px; font-weight: 700; color: var(--text) }
.city-name-new span { font-size: 10px; color: var(--muted); font-weight: 400 }

.city-premium-badge {
    font-size: 9px; font-weight: 700; color: var(--accent); background: var(--accent-soft);
    padding: 3px 6px; border-radius: 4px; text-transform: uppercase;
    border: 1px solid var(--accent); white-space: nowrap;
}

.city-premium-badge.floor { color: var(--primary); background: var(--primary-light); border-color: var(--primary) }
.city-premium-badge.mine { color: var(--up); background: var(--up-soft); border-color: var(--up) }

/* Cheapest market in a state. Deliberately a different treatment from
   .your-city — that class belongs to the localStorage highlight in site.js,
   and two gold cards at once reads as a bug. */
.city-card-new.is-cheapest {
    border-color: var(--up);
    box-shadow: 0 0 0 1px var(--up) inset;
}

.city-card-new.is-cheapest:hover { border-color: var(--up) }

/* Silver variant — cool slate tone so silver cards read differently from gold */
.city-premium-badge.silver { color: #475569; background: #F1F5F9; border-color: #CBD5E1 }
.city-card-new.is-silver:hover { border-color: #94A3B8 }
.city-card-new .city-sub {
    display: block;
    font-size: 10px;
    color: var(--muted);
    font-weight: 400;
    margin-top: 2px;
}

.city-prices-new {
    display: flex; justify-content: space-between; gap: 10px;
    padding-top: 10px; border-top: 1px solid var(--line-soft);
}

.city-price-block { display: flex; flex-direction: column; gap: 4px }
.city-price-label { font-size: 10px; color: var(--muted); text-transform: uppercase }
.city-price-val { font-size: 13px; color: var(--text); font-weight: 600; font-family: 'Sora', sans-serif }

@media(max-width:1100px) { .city-grid-new { grid-template-columns: repeat(3, 1fr) } }
@media(max-width:768px) { .city-grid-new { grid-template-columns: repeat(2, 1fr) } }
@media(max-width:480px) { .city-grid-new { grid-template-columns: 1fr } }

/* ===== General Grid Layouts ===== */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px }

@media(max-width:968px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr) } }
@media(max-width:640px) { .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr } }

/* Card Styles */
.card {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius-lg); padding: 20px; transition: all .3s;
}

.card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-2px) }

.card-icon {
    width: 36px; height: 36px; border-radius: 8px; background: var(--primary-light);
    color: var(--primary); display: flex; align-items: center;
    justify-content: center; margin-bottom: 14px
}

.card-title { font-size: 15px; font-weight: 600; margin-bottom: 6px }
.card-desc { font-size: 12px; color: var(--muted); line-height: 1.6 }

/* ===== Chart ===== */
.chart-card {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-md);
}

.chart-head {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 24px; flex-wrap: wrap; gap: 16px;
}

.chart-stats { display: flex; gap: 32px; flex-wrap: wrap }

.chart-stat-label {
    font-size: 10px; color: var(--muted); text-transform: uppercase;
    letter-spacing: .1em; margin-bottom: 4px; font-weight: 600
}

.chart-stat-value { font-size: 18px; font-weight: 600; color: var(--text); font-family: 'Sora', sans-serif }
.chart-stat-value .small { font-size: 11px; color: var(--muted); font-weight: 400; margin-left: 4px }
.chart-stat-value.up { color: var(--up) }
.chart-stat-value.down { color: var(--down) }

.chart-tabs {
    display: flex; gap: 4px; background: var(--bg); padding: 4px;
    border-radius: 8px; border: 1px solid var(--line)
}

.chart-tab {
    padding: 6px 12px; font-size: 11px; font-weight: 600;
    color: var(--muted); border-radius: 6px; transition: all .3s
}

.chart-tab.active { background: var(--primary); color: #fff }
.chart-tab:hover:not(.active) { color: var(--text) }

.chart-svg { width: 100%; height: auto; display: block; overflow: visible }
.chart-path { fill: none; stroke: var(--primary); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round }
.chart-area { fill: url(#grad) }
.chart-grid line { stroke: var(--line-soft); stroke-width: 1 }

.chart-label {
    font-size: 10px; fill: var(--muted);
    font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 500
}

.chart-hover-line {
    stroke: var(--text); stroke-width: 1; stroke-dasharray: 4 4;
    opacity: 0; transition: opacity .3s
}

.chart-hover-dot { fill: var(--accent); stroke: #fff; stroke-width: 2; opacity: 0; transition: opacity .3s }

.chart-tooltip {
    position: absolute; background: var(--primary-dark); color: #fff;
    padding: 8px 12px; border-radius: 6px; font-size: 12px; pointer-events: none;
    opacity: 0; transition: opacity .3s; box-shadow: var(--shadow-lg);
    transform: translate(-50%, -110%); white-space: nowrap
}

.chart-tooltip .tooltip-date { font-size: 10px; color: rgba(255, 255, 255, 0.7); margin-bottom: 4px }
.chart-tooltip .tooltip-price { font-weight: 600; font-size: 13px; color: var(--accent-light) }

@media(max-width:768px) {
    .chart-card { padding: 14px }
    .chart-stats { gap: 16px }
    .chart-stat-value { font-size: 15px }
    .chart-tabs { width: 100%; justify-content: space-between }
    .chart-tab { flex: 1; text-align: center; padding: 6px 4px }
}

/* ===== Investment Calculator ===== */
.calc-card {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-md);
    display: grid; grid-template-columns: 1fr 1fr; gap: 32px;
}

.calc-field { margin-bottom: 16px }

.calc-field label {
    display: block; font-size: 12px; font-weight: 600; color: var(--muted);
    margin-bottom: 6px; text-transform: uppercase; letter-spacing: .05em
}

.calc-field input, .calc-field select {
    width: 100%; padding: 10px 12px; background: var(--bg);
    border: 1px solid var(--line); border-radius: 6px; font-size: 14px;
    font-family: inherit; color: var(--text); transition: border-color .2s;
}

.calc-field input:focus, .calc-field select:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light)
}

.calc-results { background: var(--bg-tint); border-radius: var(--radius); padding: 20px }
.calc-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; font-size: 13px }
.calc-row+.calc-row { border-top: 1px solid var(--line) }
.calc-row .label { color: var(--muted); font-weight: 500 }
.calc-row .value { font-weight: 600; color: var(--text); font-family: 'Sora', sans-serif; font-size: 14px }
.calc-total { margin-top: 12px; padding-top: 14px; border-top: 2px solid var(--text) !important }

.calc-total .label {
    color: var(--text); font-weight: 700; font-size: 14px;
    text-transform: uppercase; letter-spacing: .05em
}

.calc-total .value { font-size: 20px; font-weight: 700; color: var(--primary) }

@media(max-width:768px) { .calc-card { grid-template-columns: 1fr; gap: 20px; padding: 16px } }

/* ===== Purity Guide ===== */
.purity-card { text-align: center; position: relative; overflow: hidden }

.purity-percent {
    font-size: 32px; font-weight: 700; color: var(--primary);
    font-family: 'Sora', sans-serif; margin-bottom: 6px
}

.purity-name { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 8px }
.purity-desc { font-size: 12px; color: var(--muted) }

/* ===== Comparison Table ===== */
.compare-table {
    width: 100%; border-collapse: collapse; background: var(--surface);
    border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md)
}

.compare-table th {
    text-align: left; padding: 12px 16px; background: var(--bg-tint);
    color: var(--text); font-family: 'Sora', sans-serif; font-size: 13px
}

.compare-table td { padding: 12px 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted) }
.compare-table td strong { color: var(--text) }
.compare-table tr.is-today { background: var(--primary-light); font-weight: 700 }
.up-text { color: var(--up) }
.down-text { color: var(--down) }
.flat-text { color: var(--muted) }

/* ===== FAQ ===== */
.faq-list { max-width: 700px; margin: 0 auto }

.faq-item {
    border: 1px solid var(--line); border-radius: var(--radius);
    margin-bottom: 10px; background: var(--surface); transition: all .3s
}

.faq-item:hover { border-color: var(--muted) }
.faq-item.open { border-color: var(--text); box-shadow: var(--shadow-md) }

.faq-q {
    padding: 16px 20px; font-size: 14px; font-weight: 600; color: var(--text);
    cursor: pointer; display: flex; justify-content: space-between;
    align-items: center; gap: 12px; font-family: 'Sora', sans-serif
}

.faq-q .icon { font-size: 18px; color: var(--primary); transition: transform .3s; font-weight: 400 }
.faq-item.open .faq-q .icon { transform: rotate(45deg) }

.faq-a {
    max-height: 0; overflow: hidden;
    transition: max-height .4s cubic-bezier(.22, 1, .36, 1), padding .4s cubic-bezier(.22, 1, .36, 1);
    padding: 0 20px; font-size: 13px; color: var(--muted); line-height: 1.7
}

.faq-item.open .faq-a { max-height: 500px; padding-bottom: 16px }

/* ===== Breadcrumb (shared by inner pages) ===== */
.breadcrumb {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
    font-size: 11px; color: var(--muted); padding: 16px 0 0;
}

.breadcrumb a { color: var(--muted); transition: color .3s }
.breadcrumb a:hover { color: var(--primary) }
.breadcrumb .sep { opacity: .5 }
.breadcrumb .current { color: var(--text); font-weight: 600 }

/* ===== Prose (articles, guides, info pages) ===== */
.prose {
    max-width: 840px;
    margin: 0 auto;
    font-size: 15.5px;
    color: var(--body);
    line-height: 1.9;
}

.prose > *:first-child { margin-top: 0 }

/* Anchor jumps must clear the sticky header */
.prose h2, .prose h3 { scroll-margin-top: 96px }

/* ---- On this page (auto-built from the h2s) ---- */
.prose-toc {
    background: var(--bg-tint);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px 20px 12px;
    margin: 0 0 34px;
}

.prose-toc-title {
    font-family: 'Sora', sans-serif;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--muted);
    margin-bottom: 12px;
}

.prose-toc ol {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: toc;
    columns: 2;
    column-gap: 30px;
}

.prose-toc li {
    margin: 0 0 7px;
    padding: 0;
    break-inside: avoid;
    counter-increment: toc;
}

.prose-toc li::marker { content: none }

/* Extra .prose in the selector so these beat the generic `.prose a` rule,
   which would otherwise repaint every entry blue and underlined. */
.prose .prose-toc a,
.prose-toc a {
    font-size: 13px;
    line-height: 1.5;
    color: var(--body);
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: baseline;
    gap: 9px;
    transition: color .2s ease;
}

.prose .prose-toc a::before,
.prose-toc a::before {
    content: counter(toc, decimal-leading-zero);
    font-family: 'Sora', sans-serif;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--accent);
    flex-shrink: 0;
    text-decoration: none;
}

.prose .prose-toc a:hover,
.prose-toc a:hover { color: var(--primary); text-decoration: none }

@media(max-width: 640px) {
    .prose-toc ol { columns: 1 }
    .prose-toc { padding: 16px 18px 12px }
}

.prose h2 {
    font-size: clamp(19px, 2.1vw, 22px);
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1.35;
    /* Generous top margin is what separates sections in a long article —
       more effective than adding rules or boxes. */
    margin: 52px 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line-soft);
}

.prose h2:first-child { margin-top: 0 }

.prose h3 {
    font-size: 16px;
    color: var(--text);
    letter-spacing: -0.01em;
    line-height: 1.45;
    margin: 30px 0 10px;
}

/* A hairline before each h3 keeps long articles readable without adding
   another heavy rule. */
.prose h3::before {
    content: '';
    display: block;
    width: 28px;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
    margin-bottom: 12px;
    opacity: .75;
}

.prose p { margin-bottom: 16px }

.prose .lead {
    font-size: 17px;
    line-height: 1.82;
    color: var(--text);
}

.prose ul { list-style: none; margin: 0 0 20px; padding: 0 }

.prose ul li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 13px;
}

.prose ul li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 11px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

/* A lead-in term at the start of a bullet is the pattern used throughout —
   give it a touch more presence so lists scan cleanly. */
.prose ul li > strong:first-child { color: var(--text); font-weight: 700 }

.prose ol { margin: 0 0 20px 22px; padding: 0 }
.prose ol li { margin-bottom: 13px; padding-left: 4px }
.prose ol li::marker { color: var(--primary); font-weight: 700 }

.prose strong { color: var(--text); font-weight: 600 }

.prose a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
}

/* Inline live figure — typographic emphasis, not a chip */
.prose .val {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}

.prose .note {
    border-left: 3px solid var(--accent);
    padding: 2px 0 2px 18px;
    margin: 24px 0;
    color: var(--text);
}

/* A data table inside an article. The wrapper owns the spacing and the
   horizontal scroll so narrow screens never force the whole page sideways. */
.prose .table-wrap {
    overflow-x: auto;
    margin: 4px 0 24px;
    -webkit-overflow-scrolling: touch;
}

.prose .table-wrap .compare-table { margin: 0; min-width: 460px }

/* Links inside a data table read as cells, not as prose links. */
.prose .compare-table a {
    text-decoration: none;
    color: var(--text);
}

.prose .compare-table a:hover { color: var(--primary) }

/* ---- Byline ---- */
.prose-byline {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--muted);
    padding-bottom: 18px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--line-soft);
}

.prose-byline .dot {
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}

.prose-byline strong { color: var(--text); font-weight: 600 }
.prose-byline .sep { opacity: .4 }

/* ---- Related links ---- */
.related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 4px 0 8px;
}

.related-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 15px 17px;
    text-decoration: none !important;
    box-shadow: var(--shadow-sm);
    transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.related-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Spans, so they need explicit block display to stack inside the anchor */
.related-card-body { display: block; min-width: 0 }

.related-card-title {
    display: block;
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
    line-height: 1.35;
    margin-bottom: 3px;
}

.related-card-desc {
    display: block;
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.55;
    font-weight: 400;
}

.related-card:hover .related-card-title { color: var(--primary) }

.related-card-arrow {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}

.related-card:hover .related-card-arrow {
    background: var(--primary);
    color: #fff;
    transform: translateX(2px);
}

/* Guide index — the same card with a category label above the title, so the
   set reads as a library rather than as a list of links. */
.related-card-tag {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 6px;
}

.related-grid.is-guides { margin: 0 }
.related-grid.is-guides .related-card { align-items: flex-start; padding: 18px 20px }
.related-grid.is-guides .related-card-arrow { margin-top: 2px }

/* State chips — a compact index of every province under a country page. */
.state-cloud { display: flex; flex-wrap: wrap; gap: 8px }

.state-cloud a {
    display: inline-flex;
    align-items: baseline;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 7px 15px;
    transition: border-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.state-cloud a:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.state-cloud a .count { font-size: 11px; font-weight: 500; color: var(--muted) }
.state-cloud a:hover .count { color: var(--primary) }

@media(max-width: 640px) {
    .related-grid { grid-template-columns: 1fr }
}

@media(max-width: 768px) {
    .prose { font-size: 15px; line-height: 1.85 }
    .prose h2 { margin: 36px 0 14px }
}

.callout {
    background: var(--primary-light); border-left: 4px solid var(--primary);
    border-radius: var(--radius); padding: 16px 20px; margin: 20px 0;
    font-size: 13px; color: var(--text); line-height: 1.7;
}

.callout.gold { background: var(--accent-soft); border-left-color: var(--accent) }

/* Prev / next through the historical date archive. */
.date-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 700px;
    margin: 26px auto 0;
}

.date-nav-link {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 8px 16px;
    white-space: nowrap;
    transition: border-color .2s ease, color .2s ease;
}

.date-nav-link:hover { border-color: var(--primary); color: var(--primary) }
.date-nav-link.is-index { color: var(--muted) }

@media(max-width: 560px) {
    .date-nav { flex-wrap: wrap; justify-content: center }
}

/* Source-of-truth line under the rate grid. Deliberately quiet — it is a
   credibility signal, not a headline. */
.benchmark-note {
    margin: -8px 0 0;
    padding: 12px 16px;
    background: var(--bg-tint);
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.7;
    color: var(--muted);
    text-align: center;
}

.benchmark-note strong { color: var(--text); font-weight: 600 }
.benchmark-note a { color: var(--primary); font-weight: 600; white-space: nowrap }

/* ===== City link cloud ===== */
.link-cloud { display: flex; flex-wrap: wrap; gap: 8px }

.link-cloud a {
    font-size: 12px; font-weight: 500; color: var(--text); background: var(--surface);
    border: 1px solid var(--line); border-radius: 20px; padding: 6px 14px;
    transition: all .3s;
}

.link-cloud a:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light) }
.section-alt .link-cloud a { background: var(--bg) }

/* ===== Alerts / flash ===== */
.alert {
    border-radius: var(--radius); padding: 12px 16px; font-size: 13px;
    font-weight: 500; margin-bottom: 16px; border: 1px solid transparent;
}

.alert-success { background: var(--up-soft); color: var(--up); border-color: var(--up) }
.alert-error { background: var(--down-soft); color: var(--down); border-color: var(--down) }
.alert-info { background: var(--primary-light); color: var(--primary); border-color: var(--primary) }

/* A multi-line alert (the admin coverage warning) needs readable body text
   rather than the single-line flash treatment. */
.alert ul { margin: 10px 0 0 18px; font-weight: 400; line-height: 1.7 }
.alert p { margin: 10px 0 0; font-weight: 400; line-height: 1.7 }
.alert code {
    background: rgba(0, 0, 0, .06);
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 12px;
}

/* ===== REDESIGNED PREMIUM FOOTER (Navy Blue Theme) ===== */
.footer-new {
    background: linear-gradient(135deg, #152445 0%, #0B1428 100%);
    color: rgba(255, 255, 255, 0.7);
    padding: 60px 0 24px; position: relative;
    border-top: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 -10px 40px rgba(11, 17, 32, 0.1);
}

.footer-glow {
    position: absolute; top: -1px; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%);
    opacity: 0.5;
}

.footer-top {
    display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px;
    margin-bottom: 40px; padding-bottom: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand-block h3 {
    color: #fff; font-size: 22px; margin-bottom: 12px;
    display: flex; align-items: center; gap: 8px;
}

.footer-brand-block h3 span { color: var(--accent) }
.footer-brand-block p { font-size: 13px; line-height: 1.7; max-width: 400px; margin-bottom: 20px }

.footer-logo { height: 44px; width: auto; max-width: 230px; display: block; margin-bottom: 16px }
@media(max-width: 480px) { .footer-logo { height: 38px } }
.footer-socials { display: flex; gap: 10px }

.social-icon {
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex; align-items: center; justify-content: center;
    color: rgba(255, 255, 255, 0.8); transition: all 0.3s ease;
}

.social-icon:hover { background: var(--accent); border-color: var(--accent); color: var(--text); transform: translateY(-2px) }

.footer-status-card {
    background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius); padding: 16px;
    display: flex; flex-direction: column; justify-content: center;
}

.footer-status-card h4 {
    color: var(--accent); font-size: 11px; text-transform: uppercase;
    letter-spacing: 0.15em; margin-bottom: 12px; font-family: 'Sora', sans-serif;
}

.status-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.status-item:last-child { border-bottom: none }
.status-label { font-size: 12px; color: rgba(255, 255, 255, 0.6) }
.status-value { font-family: 'Sora', sans-serif; font-weight: 600; color: #fff; font-size: 13px }
.status-up { color: var(--up) }
.status-down { color: var(--down) }

.footer-links-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; margin-bottom: 32px }

.footer-col h5 {
    color: #fff; font-size: 12px; font-weight: 600; margin-bottom: 14px;
    font-family: 'Sora', sans-serif; position: relative; padding-bottom: 8px;
}

.footer-col h5::after {
    content: ''; position: absolute; bottom: 0; left: 0;
    width: 24px; height: 2px; background: var(--accent);
}

.footer-col ul { list-style: none }
.footer-col li { margin-bottom: 8px }

.footer-col a {
    font-size: 12px; color: rgba(255, 255, 255, 0.6); transition: all 0.3s ease;
    display: inline-block; position: relative; padding-left: 0;
}

.footer-col a:hover { color: var(--accent); transform: translateX(4px) }

.footer-attribution {
    text-align: center; font-size: 11px; color: rgba(255, 255, 255, 0.45);
    padding-bottom: 16px;
}

.footer-attribution a { color: var(--accent); font-weight: 600 }

.footer-bottom-bar {
    display: flex; justify-content: center; align-items: center;
    padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap; gap: 12px;
}

.footer-copy { font-size: 11px; color: rgba(255, 255, 255, 0.4); text-align: center }
.footer-copy span { color: var(--accent) }

@media(max-width:1024px) {
    .footer-links-grid { grid-template-columns: repeat(3, 1fr); row-gap: 28px }
}

@media(max-width:768px) {
    .footer-top { grid-template-columns: 1fr; gap: 24px }
    .footer-links-grid { grid-template-columns: 1fr 1fr; gap: 24px; row-gap: 28px }
    .footer-bottom-bar { flex-direction: column; text-align: center }
}

@media(max-width:480px) { .footer-links-grid { grid-template-columns: 1fr } }

/* ===== Back to Top ===== */
.back-to-top {
    position: fixed; bottom: 20px; right: 20px; width: 40px; height: 40px;
    background: var(--primary); color: #fff; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 16px; opacity: 0; visibility: hidden;
    transition: all .4s; z-index: 99; box-shadow: var(--shadow-lg)
}

.back-to-top.visible { opacity: 1; visibility: visible }
.back-to-top:hover { transform: translateY(-4px); background: var(--primary-dark) }

/* ===== Animations ===== */
/*
 * Scroll reveal.
 *
 * The hidden state is scoped to `html.js`, which site.js sets inline in the
 * head. If the script fails to load, is blocked, or throws before it runs, the
 * class never appears and every .reveal element renders normally. An animation
 * is worth having; an animation that can hide the entire article is not.
 */
.js .reveal {
    opacity: 0; transform: translateY(20px);
    transition: opacity .8s cubic-bezier(.22, 1, .36, 1), transform .8s cubic-bezier(.22, 1, .36, 1)
}

.js .reveal.visible { opacity: 1; transform: none }

/* Respect a reduced-motion preference: show everything, animate nothing. */
@media (prefers-reduced-motion: reduce) {
    .js .reveal { opacity: 1; transform: none; transition: none }
}

/* Dropdown CSS */
.nav-item { position: relative }

.dropdown-menu {
    position: absolute; top: 100%; left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 12px; padding: 12px; min-width: 200px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    opacity: 0; visibility: hidden; transition: all 0.3s ease;
    z-index: 1000; display: flex; flex-direction: column; gap: 4px;
}

/*
 * Hover-capable pointers only.
 *
 * A touchscreen fires :hover on tap. Without this guard, touching a nav item
 * applied translateX(-50%) to the dropdown — which on mobile, where the menu
 * is a full-width static block, slid the whole list sideways off centre. It
 * snapped back the moment the finger lifted, because that ended the :hover.
 *
 * On mobile the dropdown is opened by the .active class from site.js instead,
 * so nothing is lost by scoping this to real pointers.
 */
@media (hover: hover) {
    .nav-item:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0) }
}

.dropdown-label {
    font-size: 11px; text-transform: uppercase; font-weight: 700;
    color: var(--primary); padding: 4px 8px; letter-spacing: 0.5px; opacity: 0.7;
}

.dropdown-menu a {
    padding: 8px 12px; border-radius: 6px; font-size: 13px; color: var(--text);
    text-decoration: none; transition: background 0.2s, color 0.2s;
    display: block; border-bottom: none !important;
}

.dropdown-menu a:hover { background: var(--bg-tint); color: var(--primary) }
.dropdown-divider { height: 1px; background: var(--line); margin: 8px 0 }
.view-all { font-weight: 600; color: var(--accent) !important; text-align: center }
.arrow { font-size: 10px; margin-left: 2px; transition: transform 0.3s; display: inline-block }

/* Same reason as above — on touch the arrow would flip on contact and flip
   back on release. Mobile uses .nav-item.active .arrow instead. */
@media (hover: hover) {
    .nav-item:hover .arrow { transform: rotate(180deg) }
}

@media(max-width:768px) {
    .nav-item { width: 100% }
    .nav-item .nav-link { display: flex; justify-content: space-between; align-items: center; width: 100%; cursor: pointer }

    /* The :hover selector is listed here as well as being wrapped in
       @media (hover: hover) above. That guard handles it on any modern
       browser; this repeat wins on specificity for anything older, where the
       hover rule would otherwise shift the open dropdown sideways on touch. */
    .dropdown-menu,
    .nav-item:hover .dropdown-menu {
        position: static; transform: none; opacity: 1; visibility: visible;
        box-shadow: none; border: none; background: rgba(0, 0, 0, 0.02);
        margin-top: 4px; display: none;
        left: auto; top: auto;
    }

    .nav-item.active .dropdown-menu,
    .nav-item.active:hover .dropdown-menu { display: flex }

    .nav-item.active .arrow { transform: rotate(180deg) }
    .nav-item:hover .arrow { transform: none }
    .nav-item.active:hover .arrow { transform: rotate(180deg) }
}

/* ===== Admin ===== */
.admin-shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh }

.admin-side {
    background: linear-gradient(135deg, #152445 0%, #0B1428 100%);
    padding: 24px 16px; color: rgba(255, 255, 255, .7)
}

.admin-side h4 {
    color: var(--accent); font-size: 11px; text-transform: uppercase;
    letter-spacing: .15em; margin: 20px 0 10px
}

.admin-side a {
    display: block; padding: 9px 12px; border-radius: 8px; font-size: 13px;
    color: rgba(255, 255, 255, .7); transition: all .25s
}

.admin-side a:hover, .admin-side a.active { background: rgba(255, 255, 255, .08); color: #fff }
.admin-main { padding: 28px 32px; background: var(--bg) }

.admin-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm) }
.admin-table th { text-align: left; padding: 10px 14px; background: var(--bg-tint); font-size: 12px; font-family: 'Sora', sans-serif }
.admin-table td { padding: 8px 14px; border-top: 1px solid var(--line); font-size: 13px }
.admin-table input, .admin-table select { width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; font-family: inherit; font-size: 13px; background: var(--bg) }

@media(max-width:768px) { .admin-shell { grid-template-columns: 1fr } .admin-main { padding: 20px } }

/* ==========================================================================
   CITY PAGE HERO
   Deliberately different from the home page bento grid: centred headline with
   a single connected unit below — navy headline panel joined to a white stat
   rail — so a city page reads as its own template, not a home page clone.
   ========================================================================== */

.city-hero {
    padding: 34px 0 56px;
    background: var(--bg);
    text-align: center;
}

.city-hero .hero-badge { margin: 0 auto 18px }

.city-hero h1 {
    font-size: clamp(30px, 4.2vw, 46px);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    text-align: center;
}

.city-hero h1 .accent { color: var(--primary) }

/* Guide headlines are full sentences rather than a place name, so they get a
   smaller size and a measure that keeps them to two or three lines. */
.city-hero.is-guide h1 {
    font-size: clamp(26px, 3.2vw, 36px);
    line-height: 1.2;
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
}

.city-hero .city-lede {
    font-size: clamp(14px, 1.5vw, 16px);
    color: var(--muted);
    line-height: 1.8;
    max-width: 620px;
    margin: 0 auto 26px;
    text-align: center;
}

.city-hero .hero-actions { justify-content: center; margin-bottom: 0 }

.rate-chip {
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    background: rgba(5, 150, 105, .22);
    color: #34D399;
    white-space: nowrap;
}

.rate-chip.down { background: rgba(220, 38, 38, .25); color: #FCA5A5 }

.rate-stamp {
    font-size: 11px;
    color: rgba(255, 255, 255, .55);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.rate-stamp .dot {
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--up);
    animation: pulse 2s ease-in-out infinite;
}

/* ---- Karat panels: one card per purity, 24K filled ---- */
.karat-panels {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin: 40px auto 0;
    text-align: left;
}

.karat-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 22px 22px 18px;
    box-shadow: var(--shadow-sm);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.karat-panel:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

/* Featured 24K panel */
.karat-panel.is-featured {
    background: linear-gradient(155deg, #24408F 0%, var(--primary) 46%, var(--primary-dark) 100%);
    border-color: transparent;
    box-shadow: 0 16px 38px rgba(23, 37, 84, .24);
    position: relative;
    overflow: hidden;
}

.karat-panel.is-featured::after {
    content: '';
    position: absolute;
    top: -40%; right: -25%;
    width: 260px; height: 260px;
    background: radial-gradient(circle, rgba(212, 175, 55, .16) 0%, transparent 68%);
    pointer-events: none;
}

.karat-panel.is-featured:hover { border-color: transparent }
.karat-panel.is-featured > * { position: relative; z-index: 1 }

.karat-panel-head { text-align: center; padding-bottom: 18px }

.karat-panel-title {
    font-family: 'Sora', sans-serif;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 5px;
}

.is-featured .karat-panel-title { color: #fff }

.karat-panel-sub { font-size: 12px; color: var(--muted); font-weight: 500 }
.is-featured .karat-panel-sub { color: rgba(255, 255, 255, .62) }

.karat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 0;
    border-top: 1px solid var(--line-soft);
}

.is-featured .karat-row { border-top-color: rgba(255, 255, 255, .13) }

.karat-row-label { font-size: 13px; color: var(--muted); font-weight: 500 }
.is-featured .karat-row-label { color: rgba(255, 255, 255, .72) }

.karat-row-value {
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.is-featured .karat-row-value { color: #F0C14B }

/* Three-panel variant (used by the international silver summary) */
.karat-panels.is-trio {
    grid-template-columns: repeat(3, 1fr);
    max-width: 780px;
}

@media(max-width: 980px) {
    .karat-panels { grid-template-columns: repeat(2, 1fr); gap: 14px }
    .karat-panels.is-trio { grid-template-columns: repeat(2, 1fr) }
}

@media(max-width: 768px) {
    .city-hero { padding: 24px 0 44px }
    .karat-panel { padding: 18px 18px 15px }
    .karat-panel-title { font-size: 17px }
}

@media(max-width: 480px) {
    .karat-panels,
    .karat-panels.is-trio { grid-template-columns: 1fr }
}

/* ===== Print ===== */
@media print {
    .header, .ticker, .footer-new, .back-to-top, .hero-actions, .chart-tabs { display: none !important }
    body { background: #fff }
    .section { padding: 12px 0 }
}
