/* Worldlession design system — mobile-first, accessible, no frameworks. */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --bg-card: #ffffff;
  --text: #1a2332;
  --text-muted: #5b6577;
  --border: #e2e6ec;
  --brand: #1a73e8;
  --brand-hover: #0f5ecf;
  --brand-deep: #0a2540;
  --accent: #0077a8;
  --focus: #1a73e8;
  --ad-bg: #fafbfc;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.08);
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
}
[data-theme="dark"] {
  --bg: #0f1420;
  --bg-soft: #161d2e;
  --bg-card: #182032;
  --text: #e8ecf4;
  --text-muted: #a6b0c3;
  --border: #2a3450;
  --brand: #8ab4ff;
  --brand-hover: #aecbff;
  --accent: #4cc9f0;
  --focus: #8ab4ff;
  --ad-bg: #141b2c;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.65;
}
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.25; margin: 1.4em 0 0.5em; }
h1 { font-size: 2rem; margin-top: 0.4em; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: var(--brand); }
a:hover { color: var(--brand-hover); }
img { max-width: 100%; height: auto; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 1rem; }
main.container { padding-top: 1.5rem; padding-bottom: 3rem; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--brand); color: #fff; padding: 0.6rem 1rem; z-index: 100; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; color: #fff; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

/* Header */
.site-header { border-bottom: 1px solid var(--border); background: var(--bg); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; gap: 0.75rem; padding-top: 0.6rem; padding-bottom: 0.6rem; }
.brand img { display: block; height: auto; width: 148px; max-width: 38vw; object-fit: contain; }
@media (min-width: 900px) { .brand img { width: 168px; max-width: 220px; } }
.primary-nav { display: none; }
.primary-nav.open { display: block; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--border); padding: 0.5rem 1rem 1rem; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; }
.primary-nav li a { display: block; padding: 0.55rem 0.25rem; text-decoration: none; color: var(--text); font-weight: 500; }
.primary-nav li a:hover { color: var(--brand); }
.nav-toggle { margin-left: auto; background: none; border: 1px solid var(--border); border-radius: 8px; padding: 0.5rem 0.6rem; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--text); }
.theme-toggle { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 50%; width: 40px; height: 40px; font-size: 1.1rem; cursor: pointer; color: var(--text); flex-shrink: 0; }
.header-search { display: flex; gap: 0.4rem; margin-top: 0.6rem; }
.header-search input { flex: 1; min-width: 0; }
@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .primary-nav { display: flex; align-items: center; gap: 1rem; margin-left: auto; }
  .primary-nav ul { display: flex; gap: 0.9rem; flex-wrap: wrap; }
  .primary-nav li a { padding: 0.25rem 0; }
  .header-search { margin-top: 0; }
  .header-search input { width: 200px; }
}

/* Breadcrumbs */
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 0 0 1rem; font-size: 0.9rem; }
.breadcrumbs li + li::before { content: "›"; margin-right: 0.4rem; color: var(--text-muted); }
.breadcrumbs a { text-decoration: none; }

/* Cards & grids */
.card-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card-body { padding: 1rem; display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }
.card-body h3 { margin: 0; font-size: 1.1rem; }
.card-body h3 a { text-decoration: none; color: var(--text); }
.card-body h3 a:hover { color: var(--brand); }
.card-meta { font-size: 0.85rem; color: var(--text-muted); }
.card p { font-size: 0.95rem; color: var(--text-muted); margin: 0; }
.tag { display: inline-block; font-size: 0.78rem; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 999px; padding: 0.15rem 0.7rem; color: var(--text-muted); text-decoration: none; }

/* Article */
.article-hero img { border-radius: var(--radius); width: 100%; }
.article-meta { color: var(--text-muted); font-size: 0.92rem; margin: 0.6rem 0 1.2rem; display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; }
.article-layout { display: grid; gap: 2rem; }
@media (min-width: 960px) { .article-layout { grid-template-columns: minmax(0, 1fr) 300px; } .article-aside { position: sticky; top: 90px; align-self: start; } }
.toc { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 1.5rem; }
.toc h2 { font-size: 1.05rem; margin: 0 0 0.5rem; font-family: var(--font-body); }
.toc ol { margin: 0; padding-left: 1.2rem; }
.toc a { text-decoration: none; font-size: 0.95rem; }
.article-body h2 { border-bottom: 1px solid var(--border); padding-bottom: 0.3rem; }
.article-body table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.95rem; }
.article-body th, .article-body td { border: 1px solid var(--border); padding: 0.5rem 0.75rem; text-align: left; }
.article-body blockquote { border-left: 4px solid var(--brand); margin: 1rem 0; padding: 0.5rem 1rem; background: var(--bg-soft); border-radius: 0 var(--radius) var(--radius) 0; }
.faq details { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 0.6rem; padding: 0.7rem 1rem; background: var(--bg-card); }
.faq summary { cursor: pointer; font-weight: 600; }
.sources { font-size: 0.95rem; color: var(--text-muted); }
.share-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 1.5rem 0; }

/* A–Z */
.az-letters { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1rem 0 2rem; }
.az-letters a, .az-letters span { min-width: 2.6rem; height: 2.6rem; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 8px; text-decoration: none; font-weight: 600; color: var(--text); }
.az-letters a:hover { background: var(--bg-soft); }
.az-letters span.empty { opacity: 0.35; }
.az-group { margin-bottom: 2rem; }
.az-group h2 { border-bottom: 2px solid var(--brand); padding-bottom: 0.25rem; }
.az-group ul { columns: 1; list-style: none; padding: 0; }
@media (min-width: 700px) { .az-group ul { columns: 2; } }
@media (min-width: 1000px) { .az-group ul { columns: 3; } }
.az-group li { break-inside: avoid; margin-bottom: 0.35rem; }

/* Forms */
form .field { margin-bottom: 1rem; }
label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="datetime-local"], textarea, select {
  width: 100%; padding: 0.6rem 0.75rem; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--text); font-size: 1rem; font-family: inherit;
}
textarea { min-height: 120px; resize: vertical; }
.hint { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.25rem; }
.field-error { color: #b91c1c; font-size: 0.9rem; margin-top: 0.25rem; }
[data-theme="dark"] .field-error { color: #fca5a5; }
.btn { display: inline-block; background: var(--brand); color: #fff; border: none; border-radius: 8px; padding: 0.65rem 1.2rem; font-size: 1rem; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--brand-hover); color: #fff; }
.btn-secondary { background: var(--bg-soft); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); color: var(--text); }
.btn-danger { background: #b91c1c; }
.link-button { background: none; border: none; padding: 0; color: var(--brand); cursor: pointer; font-size: inherit; text-decoration: underline; }

/* Ad slots — always labeled, never mimicking content */
.ad-slot { border: 1px dashed var(--border); background: var(--ad-bg); border-radius: var(--radius); padding: 0.75rem; margin: 1.5rem 0; text-align: center; }
.ad-label { display: block; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.4rem; }
.ad-placeholder p { font-size: 0.85rem; color: var(--text-muted); margin: 0.5rem 0; }

/* Search */
.search-filters { display: flex; gap: 0.75rem; flex-wrap: wrap; margin: 1rem 0; }
.search-filters .field { margin: 0; min-width: 180px; flex: 1; }
.result-item { border-bottom: 1px solid var(--border); padding: 1rem 0; }
.result-item h3 { margin: 0 0 0.3rem; font-size: 1.15rem; }
.result-kind { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.autocomplete-list { position: absolute; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); list-style: none; margin: 0; padding: 0.3rem; z-index: 60; width: 100%; }
.autocomplete-list li a { display: block; padding: 0.5rem 0.7rem; text-decoration: none; color: var(--text); border-radius: 6px; }
.autocomplete-list li a:hover, .autocomplete-list li a.active { background: var(--bg-soft); }
.autocomplete-wrap { position: relative; }
.pagination { display: flex; gap: 0.5rem; margin: 2rem 0; flex-wrap: wrap; }
.pagination a, .pagination span { border: 1px solid var(--border); border-radius: 8px; padding: 0.45rem 0.9rem; text-decoration: none; }
.pagination .current { background: var(--brand); color: #fff; border-color: var(--brand); }

/* Country */
.country-sections h2 { margin-top: 2rem; }
.fact-list { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); margin-top: 2rem; padding: 2rem 0 1rem; }
.footer-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.site-footer h2 { font-size: 1rem; font-family: var(--font-body); margin: 0 0 0.6rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.35rem; }
.site-footer a { text-decoration: none; color: var(--text-muted); }
.site-footer a:hover { color: var(--brand); }
.tagline { color: var(--text-muted); font-size: 0.95rem; }
.footer-bottom { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border); font-size: 0.88rem; color: var(--text-muted); }

/* Cookie banner */
.cookie-banner { position: fixed; bottom: 0; left: 0; right: 0; background: var(--bg-card); border-top: 1px solid var(--border); box-shadow: 0 -2px 12px rgba(0,0,0,0.12); padding: 1rem; z-index: 80; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0; flex: 1 1 300px; font-size: 0.95rem; }
.cookie-actions { display: flex; gap: 0.5rem; }

/* Alerts */
.alert { border-radius: var(--radius); padding: 0.9rem 1.1rem; margin-bottom: 1rem; border: 1px solid; }
.alert-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.alert-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
[data-theme="dark"] .alert-success { background: #064e3b; border-color: #065f46; color: #d1fae5; }
[data-theme="dark"] .alert-error { background: #7f1d1d; border-color: #991b1b; color: #fecaca; }
.notice { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1rem 0; font-size: 0.95rem; }

/* Admin */
.admin-layout { display: grid; gap: 1.5rem; }
@media (min-width: 900px) { .admin-layout { grid-template-columns: 220px minmax(0, 1fr); } }
.admin-nav { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; align-self: start; }
.admin-nav ul { list-style: none; margin: 0; padding: 0; }
.admin-nav li a { display: block; padding: 0.45rem 0.6rem; border-radius: 6px; text-decoration: none; color: var(--text); }
.admin-nav a:hover { background: var(--border); }
.admin-nav .who { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.8rem; }
table.admin-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.admin-table th, .admin-table td { border-bottom: 1px solid var(--border); padding: 0.55rem 0.6rem; text-align: left; vertical-align: top; }
.admin-table th { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.status-badge { display: inline-block; font-size: 0.78rem; border-radius: 999px; padding: 0.15rem 0.7rem; border: 1px solid var(--border); background: var(--bg-soft); }
.status-published { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.status-draft { background: #f3f4f6; color: #374151; }
.status-review, .status-fact-check { background: #fef9c3; border-color: #fde68a; color: #854d0e; }
.status-approved, .status-scheduled { background: #e0f2fe; border-color: #bae6fd; color: #0c4a6e; }
.status-archived { background: #f3f4f6; color: #6b7280; }
.stat-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); margin-bottom: 1.5rem; }
@media (min-width: 800px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.stat .num { font-size: 1.8rem; font-weight: 700; font-family: var(--font-display); }
.stat .lbl { font-size: 0.88rem; color: var(--text-muted); }
.login-wrap { max-width: 420px; margin: 3rem auto; }
.workflow-bar { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin: 1rem 0; padding: 0.9rem 1rem; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media print { .site-header, .site-footer, .cookie-banner, .ad-slot, .share-row { display: none; } }

/* ============ Worldlession mockup design: hero, badges, popular categories ============ */

/* Full-bleed hero with Earth backdrop */
.hero-full {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  background: #0a2540 url("/images/hero-earth.jpg") center right / cover no-repeat;
  color: #fff;
  padding: 3.2rem 0 2.6rem;
  position: relative;
}
.hero-full::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(8, 25, 47, 0.92) 0%, rgba(8, 25, 47, 0.55) 45%, rgba(8, 25, 47, 0.05) 75%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; }
.hero-eyebrow {
  margin: 0 0 0.7rem;
  font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: #9fd8f5;
}
.hero-title {
  margin: 0 0 0.9rem;
  font-family: var(--font-body);
  font-size: 2.4rem; font-weight: 800; line-height: 1.15;
  color: #fff;
}
.hero-accent {
  background: linear-gradient(90deg, #38bdf8, #4cc9f0);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: #4cc9f0;
}
.hero-sub { color: #c9d6e8; font-size: 1.05rem; margin: 0 0 1.6rem; max-width: 34rem; }

/* Big hero search bar */
.hero-searchbar {
  display: flex; align-items: center;
  background: #fff; border-radius: 999px;
  padding: 0.35rem 0.35rem 0.35rem 1.1rem;
  max-width: 34rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
.hero-searchbar .search-icon { color: #8a94a6; flex-shrink: 0; margin-right: 0.6rem; }
.hero-searchbar input {
  flex: 1; min-width: 0; border: none; outline: none;
  font-size: 1rem; color: var(--text); background: transparent;
  padding: 0.6rem 0;
}
.hero-searchbar button {
  background: var(--brand); color: #fff; border: none; cursor: pointer;
  border-radius: 999px; padding: 0.7rem 1.9rem;
  font-size: 1rem; font-weight: 600; flex-shrink: 0;
}
.hero-searchbar button:hover { background: var(--brand-hover); }

/* Feature badges row */
.hero-badges {
  list-style: none; margin: 2.2rem 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem;
  max-width: 40rem;
}
.hero-badges li { display: flex; align-items: center; gap: 0.7rem; color: #e8eef7; font-size: 0.92rem; line-height: 1.35; }
.hero-badges svg { color: #cfe6fa; flex-shrink: 0; }
@media (min-width: 700px) { .hero-badges { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 700px) {
  .hero-title { font-size: 3rem; }
  .hero-full { padding: 4.2rem 0 3.4rem; }
}

/* Popular categories */
.pop-cats { margin: 2.4rem 0 0.5rem; }
.pop-cats-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1.1rem; }
.pop-cats-head h2 { margin: 0; font-family: var(--font-body); font-size: 1.35rem; font-weight: 700; }
.view-all { font-size: 0.95rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.pop-cats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; }
@media (min-width: 800px) { .pop-cats-grid { grid-template-columns: repeat(6, 1fr); } }
.pop-cat {
  background: var(--tile, var(--bg-soft));
  border-radius: 14px;
  padding: 1.3rem 0.6rem 1.1rem;
  display: flex; flex-direction: column; align-items: center; gap: 0.65rem;
  text-decoration: none; color: var(--text);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.pop-cat:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--text); }
.pop-cat-icon { color: var(--tile-ink, var(--brand)); display: flex; }
.pop-cat-name { font-size: 0.92rem; font-weight: 600; }
[data-theme="dark"] .pop-cat { --tile: var(--bg-soft) !important; }

/* Header search bar (mockup style) */
.header-inner { gap: 1rem; }
.primary-nav ul { align-items: center; }
.header-searchbar {
  display: flex; align-items: center;
  border: 1px solid var(--border); border-radius: 999px;
  padding: 0.2rem 0.2rem 0.2rem 0.9rem;
  background: var(--bg-soft);
  margin-left: auto;
}
.header-searchbar input {
  border: none; outline: none; background: transparent;
  font-size: 0.92rem; color: var(--text);
  width: 150px; padding: 0.35rem 0;
}
.header-searchbar button {
  background: var(--brand); color: #fff; border: none; cursor: pointer;
  border-radius: 999px; width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.header-searchbar button:hover { background: var(--brand-hover); }
@media (min-width: 900px) {
  .primary-nav { margin-left: 0; }
  .primary-nav ul { gap: 1.4rem; }
  .primary-nav li a { font-size: 1rem; }
}
@media (max-width: 899px) {
  .header-searchbar { display: none; }
  .primary-nav.open .header-searchbar { display: flex; margin: 0.8rem 0 0; }
  .primary-nav.open .header-searchbar input { flex: 1; width: auto; }
}
/* Old header-search class no longer used */
.header-search { display: none; }

/* Dark navy footer to match hero */
.site-footer { background: #0a2540; border-top: none; color: #c9d6e8; }
.site-footer h2 { color: #fff; }
.site-footer a { color: #a9bcd6; }
.site-footer a:hover { color: #fff; }
.site-footer .tagline, .site-footer .brand-desc { color: #8fa3bf; }
.footer-bottom { border-top-color: rgba(255, 255, 255, 0.12); color: #8fa3bf; }
.site-footer .link-button { color: #a9bcd6; }
