/* East Africa in Brief — PHP edition stylesheet (blue theme, mobile-first). */
:root {
  --primary: #1d4f86;
  --primary-600: #173f6c;
  --primary-50: #eaf1f9;
  --accent: #d99a1f;
  --ink: #17324b;
  --muted: #5b6b7d;
  --border: #dde4ec;
  --bg: #ffffff;
  --bg-soft: #f3f6fa;
  --danger: #b42318;
  --success: #1a7f4b;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 40, 70, .06), 0 2px 8px rgba(16, 40, 70, .06);
  --shadow-lg: 0 10px 30px rgba(16, 40, 70, .14);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--bg); line-height: 1.55; font-size: 16px; font-variant-numeric: tabular-nums; }
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid rgba(29, 79, 134, .45); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .5rem; }
h1 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .75rem; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
address { font-style: normal; }

.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; }
.skip-link { position: absolute; left: 1rem; top: -4rem; background: var(--primary); color: #fff; padding: .5rem 1rem; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 1rem; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 820px; }
.narrow-wide { max-width: 1000px; }
.section { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.muted { color: var(--muted); }
.muted-light { color: rgba(255, 255, 255, .85); }
.small { font-size: .85rem; }
.lead { font-size: 1.15rem; color: var(--muted); }
.center { text-align: center; }
.danger { color: var(--danger); }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 700; color: var(--primary); margin-bottom: .5rem; }
.page-head { margin-bottom: 2rem; max-width: 760px; }
.page-head.center { margin-left: auto; margin-right: auto; }
.row-between { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; max-width: none; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.section-sub { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 2rem 0 .75rem; }

/* ---------- Grids ---------- */
.grid-2, .grid-3, .grid-4, .grid-side { display: grid; gap: 1.25rem; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } .grid-side { grid-template-columns: 1fr 300px; } }

/* ---------- Buttons & badges ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; background: var(--primary); color: #fff; border: 1px solid var(--primary); border-radius: 10px; padding: .6rem 1.1rem; font-weight: 600; font-size: .92rem; cursor: pointer; text-decoration: none; transition: background .15s, transform .15s, box-shadow .15s; font-family: inherit; line-height: 1.2; }
.btn:hover { background: var(--primary-600); text-decoration: none; }
.btn-sm { padding: .4rem .75rem; font-size: .82rem; border-radius: 8px; }
.btn-lg { padding: .8rem 1.4rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-outline { background: #fff; color: var(--primary); border-color: var(--border); }
.btn-outline:hover { background: var(--primary-50); }
.btn-ghost { background: transparent; color: var(--ink); border-color: transparent; }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-secondary { background: #fff; color: var(--primary); border-color: #fff; }
.btn-secondary:hover { background: #eef4fb; }
.btn-outline-light { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn-outline-light:hover { background: rgba(255, 255, 255, .2); }
.btn-link { background: none; border: 0; padding: 0; color: var(--primary); }
.btn-link:hover { background: none; text-decoration: underline; }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: #fdeceb; }
.badge { display: inline-flex; align-items: center; gap: .25rem; border-radius: 999px; padding: .12rem .55rem; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.badge-soft { background: var(--primary-50); color: var(--primary); }
.badge-outline { border: 1px solid var(--border); color: var(--ink); }
.badge-premium { background: #f6c443; color: #4a3400; }
.inline { display: inline; }

/* ---------- Header & footer ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--ink); font-size: 1.1rem; }
.brand:hover { text-decoration: none; }
.brand em, .footer-brand em { font-style: normal; color: var(--primary); }
.brand-mark { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 10px; background: var(--primary); color: #fff; font-size: 1.1rem; }
.site-nav { display: flex; gap: .2rem; align-items: center; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.site-nav a:not(.btn) { padding: .5rem .7rem; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: .9rem; white-space: nowrap; }
.site-nav a:not(.btn):hover { background: var(--bg-soft); text-decoration: none; color: var(--ink); }
.site-nav a.active { color: var(--primary); }
.site-nav .btn { margin-left: .4rem; white-space: nowrap; }
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--border); margin-top: 3rem; }
.footer-grid { display: grid; gap: 2rem; padding: 3rem 1.25rem; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.2fr 1fr 1fr 1.2fr; } }
.footer-grid nav a { display: block; color: var(--muted); padding: .2rem 0; font-size: .92rem; }
.footer-brand { font-weight: 700; font-size: 1.05rem; }
.footer-heading { font-weight: 700; font-size: .9rem; margin-bottom: .6rem; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; border-top: 1px solid var(--border); padding: 1.1rem 1.25rem; font-size: .78rem; color: var(--muted); }

/* ---------- Cards & panels ---------- */
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
a.card { color: inherit; display: block; transition: transform .2s, box-shadow .2s; }
a.card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.panel { padding: 1.4rem; }
.panel-title { font-size: 1.02rem; margin-bottom: 1rem; }
.panel-tint { background: var(--primary-50); border-color: #cfdeef; box-shadow: none; height: fit-content; }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; background: #0d2a47; color: #fff; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: .75; }
.hero-scrim { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10, 26, 47, .85), rgba(18, 58, 99, .62) 50%, rgba(10, 26, 47, .88)); }
.hero-inner { padding: 5rem 1.25rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1.2rem; }
.hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.4rem); max-width: 860px; text-shadow: 0 2px 12px rgba(0, 0, 0, .25); }
.hero h1 em { font-style: normal; color: #f6c443; }
.hero-badge { border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .1); border-radius: 999px; padding: .3rem 1rem; font-size: .8rem; margin: 0; }
.hero-sub { color: rgba(255, 255, 255, .88); max-width: 680px; font-size: 1.08rem; }
.hero-search { display: flex; gap: .5rem; width: 100%; max-width: 580px; }
.hero-search input { flex: 1; border-radius: 10px; border: 0; padding: .8rem 1rem; font-size: 1rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }
.country-hero .hero-inner { text-align: left; align-items: flex-start; padding: 3rem 1.25rem; }
.country-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0; }
.country-hero .hero-sub { margin: .25rem 0 0; font-size: .95rem; }
.country-hero .hero-actions { justify-content: flex-start; }
.country-hero-row { display: flex; align-items: center; gap: 1rem; }
.flag-tile { display: inline-flex; width: 64px; height: 64px; align-items: center; justify-content: center; background: rgba(255, 255, 255, .95); border-radius: 16px; font-size: 2.2rem; box-shadow: var(--shadow-lg); }
.photo-credit { font-size: .7rem; color: rgba(255, 255, 255, .6); }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 1rem; }
.hero .crumbs, .hero .crumbs a { color: rgba(255, 255, 255, .78); }

/* ---------- Stats ---------- */
.stats-wrap { position: relative; z-index: 2; }
.stat-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
@media (min-width: 1024px) { .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat-card > div { min-width: 0; }
.stat-grid.overlap { margin-top: -2.5rem; }
.stat-card { display: flex; align-items: center; gap: .9rem; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow-lg); }
.stat-icon { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 10px; background: var(--primary-50); color: var(--primary); font-size: 1.2rem; flex-shrink: 0; }
.stat-card dt, .stat-tile dt { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.stat-card dd, .stat-tile dd { margin: .1rem 0 0; font-size: 1.3rem; font-weight: 800; }
.stat-tiles { display: grid; gap: .75rem; grid-template-columns: repeat(2, 1fr); margin: 0 0 2rem; }
@media (min-width: 720px) { .stat-tiles { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .stat-tiles { grid-template-columns: repeat(6, 1fr); } }
.stat-tile { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: .85rem; }
.stat-tile p { margin: 0; }

/* ---------- Country & news cards ---------- */
.country-card-media, .news-card-media { position: relative; height: 140px; overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; background: var(--primary); }
.news-card-media { height: 120px; }
.country-card-media img, .news-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
a.card:hover .country-card-media img, a.card:hover .news-card-media img { transform: scale(1.05); }
.flag-chip { position: absolute; left: .75rem; top: .75rem; display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; background: rgba(255, 255, 255, .92); border-radius: 12px; font-size: 1.5rem; }
.country-card-title { position: absolute; inset: auto 0 0 0; padding: 2rem .9rem .7rem; background: linear-gradient(0deg, rgba(0, 0, 0, .68), transparent); color: #fff; }
.country-card-title h3 { margin: 0; font-size: 1.15rem; }
.country-card-title p { margin: 0; font-size: .78rem; opacity: .88; }
.country-card-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; padding: 1rem; margin: 0; }
.country-card-stats dt { font-size: .66rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.country-card-stats dd { margin: 0; font-weight: 700; }
.news-card-media .badge-premium { position: absolute; right: .7rem; top: .7rem; }
.news-card-body { padding: 1rem; }
.news-card-body h3 { margin: .4rem 0; font-size: 1rem; }
.news-card-body p { color: var(--muted); font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: .8rem; color: var(--muted); }
.band { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cta-band { background: var(--primary); color: #fff; }
.cta-inner { padding: 3.5rem 1.25rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: .75rem; }
.cta-inner h2 { color: #fff; font-size: clamp(1.4rem, 3vw, 2rem); max-width: 720px; }
.empty-note { color: var(--muted); border: 1px dashed var(--border); padding: 2.5rem; border-radius: var(--radius); text-align: center; grid-column: 1 / -1; }

/* ---------- Forms & filters ---------- */
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.field label { font-weight: 600; font-size: .88rem; }
.field input, .field select, .field textarea, .filter-bar input, .filter-bar select { width: 100%; border: 1px solid #c9d4e0; border-radius: 9px; padding: .55rem .7rem; font: inherit; font-size: .93rem; background: #fff; color: var(--ink); }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(29, 79, 134, .15); }
.field-hint { margin: 0; font-size: .78rem; color: var(--muted); }
.field-error { margin: 0; font-size: .8rem; font-weight: 600; color: var(--danger); }
.req { color: var(--danger); }
.check-label { flex-direction: row; display: flex; align-items: center; gap: .5rem; font-weight: 600; }
.check-label input { width: auto; }
.form-actions { display: flex; gap: .75rem; align-items: center; padding-top: 1rem; border-top: 1px solid var(--border); margin-top: .5rem; flex-wrap: wrap; }
.filter-bar { display: grid; gap: .75rem 1rem; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin-bottom: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); align-items: end; }
.filter-bar .field { margin: 0; }
.field-actions { flex-direction: row; flex-wrap: wrap; gap: .5rem; grid-column: 1 / -1; }
.field-note { grid-column: 1 / -1; margin: 0; }
.chip-bar { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; align-items: center; }
.chip-bar fieldset { display: contents; border: 0; }
.chip { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--border); border-radius: 999px; padding: .4rem .95rem; font-size: .88rem; font-weight: 600; color: var(--ink); background: #fff; cursor: pointer; }
.chip:hover { background: var(--bg-soft); text-decoration: none; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip-on { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip-on:hover { background: var(--primary-600); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: .75rem .8rem; border-bottom: 1px solid var(--border); background: var(--bg-soft); white-space: nowrap; }
td { padding: .7rem .8rem; border-bottom: 1px solid #edf1f5; vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafcfe; }
.num { text-align: right; white-space: nowrap; }
.cell-strong { font-weight: 600; }
.cell-link { color: var(--ink); }
.empty-row { text-align: center; color: var(--muted); padding: 2.5rem; }
.row-actions { white-space: nowrap; text-align: right; }
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .1rem 0; }
.col-country { font-weight: 700; color: var(--ink); }
.enquiry-msg { max-width: 420px; }
.data-table { margin-top: 1.25rem; }
.data-table summary { cursor: pointer; font-weight: 600; padding: .75rem 0; }

/* ---------- Charts ---------- */
.chart-wrap { position: relative; width: 100%; }
.chart-empty { border: 1px dashed var(--border); border-radius: var(--radius); padding: 4rem 1rem; text-align: center; color: var(--muted); }
.tab-list { display: inline-flex; background: var(--bg-soft); border-radius: 9px; padding: .2rem; margin-bottom: .75rem; }
.tab { border: 0; background: transparent; padding: .35rem .85rem; border-radius: 7px; font: inherit; font-size: .85rem; font-weight: 600; color: var(--muted); cursor: pointer; }
.tab.active { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---------- Country dashboard extras ---------- */
.meter-row { margin-bottom: .9rem; }
.meter-label { display: flex; justify-content: space-between; gap: .5rem; font-size: .88rem; margin-bottom: .25rem; }
.meter { height: 8px; border-radius: 999px; background: var(--bg-soft); overflow: hidden; }
.meter-fill { height: 100%; border-radius: 999px; background: var(--primary); }
.diamond-list { list-style: none; padding: 0; margin: 0 0 .75rem; }
.diamond-list li { position: relative; padding-left: 1.3rem; margin-bottom: .6rem; font-size: .92rem; }
.diamond-list li::before { content: "◆"; position: absolute; left: 0; color: var(--primary); font-size: .75rem; top: .15rem; }
.law-row { border-bottom: 1px solid var(--border); padding-bottom: .75rem; margin-bottom: .75rem; }
.law-row:last-of-type { border-bottom: 0; }
.law-row-head { display: flex; justify-content: space-between; gap: .5rem; align-items: flex-start; }
.law-row-title { font-weight: 600; font-size: .9rem; margin: 0; }
.doc-link { display: block; font-size: .82rem; margin-top: .3rem; }
.law-card { padding: 1.2rem; }
.law-card h3 { font-size: 1rem; }
.law-summary { color: var(--muted); font-size: .92rem; }
.doc-list { list-style: none; margin: .5rem 0 0; padding: .6rem 0 0; border-top: 1px solid var(--border); font-size: .88rem; }
.doc-list li { margin-bottom: .3rem; }
/* Country FAQ */
.faq { margin-top: 2rem; }
.faq h2 { font-size: 1.25rem; margin: 0 0 .25rem; }
.faq-list { margin-top: .9rem; padding: 0; overflow: hidden; }
.faq-item { border-top: 1px solid var(--border); padding: .8rem 1.1rem; }
.faq-item:first-child { border-top: 0; }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: .75rem; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "\25BE"; color: var(--muted); transition: transform .2s; }
.faq-item[open] summary::after { transform: rotate(180deg); }
.faq-item summary h3 { font-size: 1rem; margin: 0; font-weight: 600; }
.faq-item p { margin: .5rem 0 0; color: var(--muted); font-size: .92rem; line-height: 1.6; }
.sources-note { margin-top: 2rem; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; }
.sources-note p { margin: 0 0 .35rem; }

/* ---------- Guides & articles ---------- */
.guide-layout { display: grid; gap: 2.5rem; }
@media (min-width: 1024px) { .guide-layout { grid-template-columns: 230px 1fr; } }
.guide-toc { display: none; }
@media (min-width: 1024px) { .guide-toc { display: block; } }
.toc { position: sticky; top: 90px; }
.toc-heading { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--muted); }
.toc ul { list-style: none; padding: 0; margin: 0; }
.toc a { display: block; padding: .3rem .5rem; border-radius: 6px; color: var(--muted); font-size: .9rem; }
.toc a:hover { background: var(--bg-soft); color: var(--ink); text-decoration: none; }
.guide-meta { margin-top: .5rem; }
.prose { font-size: 1.02rem; line-height: 1.75; max-width: 760px; }
.prose h2 { font-size: 1.4rem; margin: 2rem 0 .75rem; scroll-margin-top: 90px; }
.prose h3 { font-size: 1.12rem; margin: 1.5rem 0 .5rem; scroll-margin-top: 90px; }
.prose ul, .prose ol { padding-left: 1.4rem; margin: 0 0 1rem; }
.prose li { margin-bottom: .35rem; }
.prose strong { color: var(--ink); }
.article-head { margin-bottom: 1.75rem; }
.article-head h1 { margin: .75rem 0; }
.standfirst { font-size: 1.15rem; color: var(--muted); }
.premium-flag { color: #8a5a00; font-weight: 700; }
.premium-bar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; background: #fff8e6; border: 1px solid #f1d58c; border-radius: var(--radius); padding: .9rem 1.1rem; margin-bottom: 1.5rem; }
.premium-bar p { margin: 0; color: #5c4300; }
.premium-gate { position: relative; margin-top: -3rem; padding: 1.75rem; border-color: #f1d58c; box-shadow: var(--shadow-lg); }
.premium-gate::before { content: ""; position: absolute; left: 0; right: 0; top: -4rem; height: 4rem; background: linear-gradient(0deg, #fff, rgba(255, 255, 255, 0)); pointer-events: none; }
.gate-title { font-weight: 700; color: #7a4f00; }
.check-list { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.check-list li { margin-bottom: .45rem; font-size: .93rem; }
.numbered-list { padding-left: 1.2rem; font-size: .92rem; color: var(--muted); }
.numbered-list li { margin-bottom: .5rem; }

/* ---------- Pricing, services, about ---------- */
.plans-grid { align-items: stretch; }
.plan-card { position: relative; padding: 1.6rem; display: flex; flex-direction: column; }
.plan-card .check-list { flex: 1; }
.plan-card-hot { border: 2px solid var(--primary); box-shadow: var(--shadow-lg); }
.plan-badge { position: absolute; top: -.75rem; left: 50%; transform: translateX(-50%); background: var(--primary); color: #fff; }
.plan-name { font-size: 1.15rem; }
.plan-price { font-size: 2rem; font-weight: 800; margin: .25rem 0; }
.plan-price .small { font-weight: 500; margin-left: .25rem; }
.plan-note { max-width: 640px; margin: 2rem auto 0; }
.service-icon { display: inline-flex; width: 46px; height: 46px; align-items: center; justify-content: center; border-radius: 12px; background: var(--primary-50); font-size: 1.3rem; margin-bottom: .75rem; }
.about-section { margin-bottom: 2.25rem; }
.plain-list { padding-left: 1.2rem; }
.credit-list { list-style: none; padding: 0; display: grid; gap: .5rem; }
@media (min-width: 720px) { .credit-list { grid-template-columns: repeat(2, 1fr); } }
.credit-item { border: 1px solid var(--border); border-radius: 10px; padding: .7rem .85rem; font-size: .85rem; }
.center-panel { text-align: center; padding: 5rem 1.25rem; }
.big-link { font-size: 1.15rem; font-weight: 700; word-break: break-all; }

/* ---------- Flash messages ---------- */
.flash { max-width: 1240px; margin: 1rem auto 0; padding: .8rem 1.1rem; border-radius: 10px; font-weight: 600; font-size: .92rem; }
.flash-success { background: #e8f6ee; color: var(--success); border: 1px solid #b8e2c8; }
.flash-error { background: #fdeceb; color: var(--danger); border: 1px solid #f5c2bd; }
main > .flash { margin-left: 1.25rem; margin-right: 1.25rem; }
@media (min-width: 1290px) { main > .flash { margin-left: auto; margin-right: auto; } }

/* ---------- WhatsApp button ---------- */
.wa-float { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 60; display: inline-flex; align-items: center; gap: .5rem; background: #25d366; color: #fff; border-radius: 999px; padding: .8rem 1.1rem; font-weight: 700; box-shadow: var(--shadow-lg); }
.wa-float:hover { background: #1ebe5b; text-decoration: none; transform: translateY(-1px); }
.wa-float span[aria-hidden] { font-size: 1.3rem; }
@media (max-width: 560px) { .wa-float-label { display: none; } }

/* ---------- Admin console ---------- */
.admin-body { background: var(--bg-soft); }
.admin-shell { display: flex; flex-direction: column; min-height: 100vh; }
@media (min-width: 1024px) { .admin-shell { flex-direction: row; } }
.admin-sidebar { background: #fff; border-right: 1px solid var(--border); display: flex; flex-direction: column; }
@media (min-width: 1024px) { .admin-sidebar { width: 260px; position: sticky; top: 0; height: 100vh; } }
.admin-brand { display: flex; align-items: center; gap: .65rem; padding: 1rem 1.1rem; border-bottom: 1px solid var(--border); }
.admin-brand small { display: block; color: var(--muted); font-size: .75rem; }
.admin-nav { flex: 1; padding: .6rem; overflow-y: auto; display: flex; flex-direction: column; gap: .1rem; }
.admin-nav a { display: flex; align-items: center; gap: .6rem; padding: .5rem .75rem; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: .9rem; }
.admin-nav a:hover { background: var(--bg-soft); color: var(--ink); text-decoration: none; }
.admin-nav a.active { background: var(--primary-50); color: var(--primary); }
.admin-foot { border-top: 1px solid var(--border); padding: .75rem; display: flex; flex-direction: column; gap: .35rem; }
.admin-main { flex: 1; padding: 1.5rem; max-width: 1200px; }
@media (min-width: 1024px) { .admin-main { padding: 2.25rem; } }
.admin-main .card.panel { margin-bottom: 1.5rem; }
.admin-main .flash { margin: 0 0 1rem; }
.quick-card { padding: 1rem; display: flex !important; flex-direction: column; gap: .25rem; }
.login-body { background: linear-gradient(160deg, #0d2a47, #1d4f86); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.login-card { width: 100%; max-width: 400px; padding: 1.75rem; }
.login-brand { display: flex; gap: .85rem; align-items: center; margin-bottom: 1.25rem; }
.login-brand h1 { font-size: 1.25rem; margin: 0; }

@media print { .site-header, .site-footer, .wa-float { display: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ------------------------------------------------------------------ */
/* Motion: reveal, hero zoom, ticker, floating dock — reduced-motion safe */
/* ------------------------------------------------------------------ */

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease-out, transform .7s ease-out;
  will-change: opacity, transform;
}
[data-reveal].is-visible { opacity: 1; transform: none; }

@keyframes kenburns {
  from { transform: scale(1) translateY(0); }
  to { transform: scale(1.09) translateY(-1.5%); }
}
.hero-bg { animation: kenburns 26s ease-in-out infinite alternate; }

/* Rotating homepage hero */
.hero-slides { position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; z-index: -2; }
.hero-slide {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0;
  transition: opacity 1.6s ease-in-out;
  animation: kenburns 26s ease-in-out infinite alternate;
}
.hero-slide.is-active { opacity: 1; }
.hero-spotlight-wrap {
  position: absolute; right: 1.25rem; bottom: 1.1rem; z-index: 5;
  display: flex; align-items: center; gap: .6rem;
}
.hero-spotlight {
  display: inline-block; padding: .35rem 1rem; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.3); background: rgba(0,0,0,.32);
  color: #fff; font-size: .78rem; font-weight: 600; text-decoration: none;
  backdrop-filter: blur(6px); transition: background .25s;
}
a.hero-spotlight:hover { background: rgba(0,0,0,.5); text-decoration: none; color: #fff; }
.hero-dots { display: flex; gap: .35rem; }
.hero-dot {
  width: 8px; height: 8px; border-radius: 999px; padding: 0;
  border: 1px solid rgba(255,255,255,.65); background: transparent; cursor: pointer;
  transition: background .25s;
}
.hero-dot.is-active { background: #fff; }
.hero-dot:hover { background: rgba(255,255,255,.55); }
@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: none; animation: none; }
  .hero-slide:not(.is-active) { display: none; }
}

@keyframes shimmer-slide {
  from { background-position: 0% 50%; }
  to { background-position: 200% 50%; }
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, #fbbf24 0%, #fde68a 30%, #fbbf24 60%, #f59e0b 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer-slide 6s linear infinite;
}

/* Market ticker */
.ticker { overflow: hidden; background: #0d2440; border-bottom: 1px solid rgba(255,255,255,.08); }
.ticker-viewport { display: flex; width: max-content; }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.ticker-track {
  display: flex; align-items: center; flex-shrink: 0;
  padding: .55rem 0; margin: 0; list-style: none;
  animation: ticker-scroll 36s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track li { white-space: nowrap; }
.ticker-track a {
  display: inline-flex; align-items: baseline; gap: .4rem;
  padding: 0 1.4rem; font-size: .875rem; color: rgba(255,255,255,.85);
  text-decoration: none; border-right: 1px solid rgba(255,255,255,.14);
  transition: color .2s;
}
.ticker-track a:hover, .ticker-track a:focus-visible { color: #fde68a; }
.ticker-track strong { color: #fff; font-weight: 600; }
.ticker-year { color: rgba(255,255,255,.55); font-size: .75rem; }

/* Floating dock (share + back to top), sits above the WhatsApp float */
.fa-dock {
  position: fixed; right: 1.25rem; bottom: 5.25rem; z-index: 60;
  display: flex; flex-direction: column; align-items: flex-end; gap: .5rem;
}
.fa-btn {
  display: flex; align-items: center; gap: .45rem;
  height: 2.75rem; min-width: 2.75rem; padding: 0 .7rem;
  border: 1px solid var(--border); border-radius: 999px;
  background: rgba(255,255,255,.95); color: var(--ink);
  font: inherit; font-size: .95rem; cursor: pointer;
  box-shadow: var(--shadow-lg); backdrop-filter: blur(6px);
  transition: transform .25s, border-color .25s, color .25s, opacity .3s;
}
.fa-btn:hover { transform: translateY(-2px); border-color: rgba(29,79,134,.45); color: var(--primary); }
.fa-btn .fa-label { font-size: .8rem; font-weight: 600; max-width: 0; overflow: hidden; white-space: nowrap; transition: max-width .3s ease; }
.fa-btn:hover .fa-label, .fa-btn:focus-visible .fa-label { max-width: 6rem; }
.fa-btn[data-top] { opacity: 0; transform: translateY(8px); pointer-events: none; }
.fa-btn[data-top].dock-visible { opacity: 1; transform: none; pointer-events: auto; }
.fa-btn.dock-copied { border-color: var(--success); color: var(--success); }

/* Sector meters grow when revealed */
.meter-fill { transform-origin: left; }
[data-reveal] .meter-fill { animation: meter-grow 1s cubic-bezier(.22,1,.36,1) both; animation-play-state: paused; }
[data-reveal].is-visible .meter-fill { animation-play-state: running; }
@keyframes meter-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Cards lift on hover */
.card.panel, .law-card, .news-card, .stat-card { transition: box-shadow .3s ease, transform .3s ease; }
.card.panel:hover, .law-card:hover, .news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.country-card { transition: transform .3s ease, box-shadow .3s ease; }
.country-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.country-card-media img { transition: transform .5s ease; }
.country-card:hover .country-card-media img { transform: scale(1.06); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .hero-bg, .hero h1 em, .ticker-track, [data-reveal] .meter-fill { animation: none; }
  .ticker-viewport { width: 100%; overflow-x: auto; }
  .card.panel:hover, .law-card:hover, .news-card:hover, .country-card:hover,
  .country-card-media img, .fa-btn:hover { transform: none; }
}
