/* =============================================================
   PULSE — Public stylesheet
   Original design preserved verbatim. Built by DIGIrabbits.
   ============================================================= */

:root {
  --bg: #F4EFE6;
  --bg-deep: #ECE5D8;
  --paper: #FFFFFF;
  --ink: #0E0E0C;
  --ink-soft: #2B2A26;
  --muted: #6B6A63;
  --muted-light: #9A988F;
  --rule: #1a1a17;
  --hairline: #D9D2C2;
  --accent: #C8102E;
  --accent-deep: #9C0A22;
  --gold: #B8924B;
  --teal: #1F4842;
  --highlight: #FCEC52;
  --shadow: 0 1px 0 rgba(14,14,12,0.04), 0 8px 24px -12px rgba(14,14,12,0.12);
}

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

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Manrope', -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-image:
    radial-gradient(circle at 20% 10%, rgba(184, 146, 75, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(31, 72, 66, 0.05) 0%, transparent 40%);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.serif { font-family: 'Fraunces', Georgia, serif; font-optical-sizing: auto; }
.mono { font-family: 'JetBrains Mono', monospace; }

/* ============ TOP MASTHEAD ============ */
.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  background-color: rgba(244, 239, 230, 0.92);
}

.masthead-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 32px;
  border-bottom: 1px solid var(--hairline);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.masthead-top .date { font-weight: 600; }
.masthead-top .ticker { display: flex; gap: 24px; align-items: center; overflow: hidden; flex: 1; margin: 0 32px; justify-content: center; }
.masthead-top .live-dot {
  width: 8px; height: 8px; background: var(--accent); border-radius: 50%;
  display: inline-block; margin-right: 6px;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.masthead-main {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 18px 32px;
  gap: 24px;
}

.nav-pills { display: flex; gap: 4px; }
.nav-pills a {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 2px;
  color: var(--ink-soft);
  transition: background 0.15s;
}
.nav-pills a:hover { background: var(--bg-deep); }
.nav-pills a.active { background: var(--ink); color: var(--bg); }

.logo {
  text-align: center;
  cursor: pointer;
}
.logo .wordmark {
  font-family: 'Fraunces', serif;
  font-size: 44px;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.9;
  font-variation-settings: 'opsz' 144;
}
.logo .tagline {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--muted);
  margin-top: 4px;
}

.masthead-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 9px 14px;
  width: 240px;
  transition: all 0.2s;
}
.search-box:focus-within { border-color: var(--ink); width: 280px; }
.search-box input {
  border: none; outline: none; background: none;
  font-family: inherit; font-size: 13px; flex: 1;
}
.search-box .key {
  font-size: 10px; color: var(--muted-light);
  border: 1px solid var(--hairline);
  padding: 1px 5px; border-radius: 3px;
  font-family: 'JetBrains Mono', monospace;
}

.icon-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: grid; place-items: center;
  transition: background 0.15s;
  position: relative;
}
.icon-btn:hover { background: var(--bg-deep); }
.icon-btn .badge {
  position: absolute; top: 4px; right: 4px;
  width: 8px; height: 8px; background: var(--accent);
  border-radius: 50%; border: 2px solid var(--bg);
}

.compose-btn {
  background: var(--ink); color: var(--bg);
  padding: 10px 22px; border-radius: 999px;
  font-weight: 700; font-size: 13px;
  letter-spacing: 0.02em;
  transition: transform 0.15s, background 0.15s;
  display: flex; align-items: center; gap: 8px;
}
.compose-btn:hover { background: var(--accent); transform: translateY(-1px); }

.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--accent));
  display: grid; place-items: center;
  font-weight: 700; color: white; font-size: 14px;
  cursor: pointer;
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 1px var(--hairline);
}

/* ============ MAIN GRID ============ */
.layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 340px;
  max-width: 1440px;
  margin: 0 auto;
  gap: 32px;
  padding: 24px 32px;
}

/* ============ LEFT NAV RAIL ============ */
.rail {
  position: sticky; top: 130px; align-self: start;
  height: calc(100vh - 150px); overflow-y: auto;
}
.rail::-webkit-scrollbar { width: 0; }

.rail-section { margin-bottom: 28px; }
.rail-label {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.18em; color: var(--muted);
  margin-bottom: 10px; font-weight: 600;
  padding-left: 12px;
}

.rail-item {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 12px; border-radius: 6px;
  font-weight: 500; font-size: 14px;
  color: var(--ink-soft); cursor: pointer;
  transition: all 0.15s;
  position: relative;
}
.rail-item:hover { background: var(--bg-deep); }
.rail-item.active {
  background: var(--ink); color: var(--bg);
  font-weight: 600;
}
.rail-item .count {
  margin-left: auto; font-size: 11px;
  background: var(--bg-deep); padding: 2px 8px;
  border-radius: 999px; font-weight: 600;
}
.rail-item.active .count { background: rgba(255,255,255,0.15); color: var(--bg); }
.rail-item svg { flex-shrink: 0; }

.topic-tag {
  display: inline-flex; align-items: center;
  padding: 5px 10px; margin: 2px;
  background: var(--paper); border: 1px solid var(--hairline);
  border-radius: 999px; font-size: 11px; font-weight: 500;
  color: var(--ink-soft); cursor: pointer; transition: all 0.15s;
}
.topic-tag:hover { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.topic-tag.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ============ FEED ============ */
.feed { min-width: 0; }

.feed-header {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: 16px; margin-bottom: 16px;
  border-bottom: 2px solid var(--rule);
}
.feed-header h1 {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 32px;
  letter-spacing: -0.02em;
}
.feed-tabs {
  display: flex; gap: 24px;
}
.feed-tab {
  font-size: 13px; font-weight: 600;
  color: var(--muted); padding: 4px 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer; transition: all 0.15s;
}
.feed-tab:hover { color: var(--ink); }
.feed-tab.active { color: var(--ink); border-color: var(--accent); }

/* Composer */
.composer {
  background: var(--paper);
  border: 1px solid var(--hairline);
  padding: 18px;
  margin-bottom: 24px;
  display: flex; gap: 14px;
  border-left: 3px solid var(--accent);
}
.composer .avatar { flex-shrink: 0; background: linear-gradient(135deg, var(--teal), var(--gold)); }
.composer-body { flex: 1; }
.composer textarea {
  width: 100%; border: none; outline: none;
  font-family: 'Fraunces', serif; font-size: 19px;
  resize: none; min-height: 50px;
  font-weight: 400;
  background: transparent; color: var(--ink);
}
.composer textarea::placeholder { color: var(--muted-light); font-style: italic; }
.composer-actions {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px dashed var(--hairline);
}
.composer-tools { display: flex; gap: 4px; }
.composer-tools button {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; color: var(--accent);
}
.composer-tools button:hover { background: rgba(200,16,46,0.08); }

/* Breaking News Banner */
.breaking {
  background: var(--ink); color: var(--bg);
  padding: 12px 20px; margin-bottom: 20px;
  display: flex; align-items: center; gap: 14px;
  border-left: 4px solid var(--accent);
  overflow: hidden;
  position: relative;
}
.breaking::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(200,16,46,0.15), transparent);
  animation: shimmer 4s ease-in-out infinite;
}
@keyframes shimmer { 0%,100%{transform:translateX(-100%);} 50%{transform:translateX(100%);} }
.breaking-tag {
  background: var(--accent); padding: 3px 10px;
  font-size: 10px; font-weight: 800;
  letter-spacing: 0.2em; text-transform: uppercase;
  flex-shrink: 0;
  position: relative; z-index: 1;
}
.breaking-text {
  font-family: 'Fraunces', serif; font-size: 15px; font-weight: 500;
  position: relative; z-index: 1;
}

/* News Card / Post */
.post {
  background: var(--paper);
  border: 1px solid var(--hairline);
  margin-bottom: 16px;
  padding: 20px;
  transition: all 0.2s;
  cursor: pointer;
  position: relative;
}
.post:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.post-header {
  display: flex; align-items: flex-start; gap: 12px;
  margin-bottom: 14px;
}
.source-avatar {
  width: 44px; height: 44px;
  flex-shrink: 0;
  display: grid; place-items: center;
  font-family: 'Fraunces', serif;
  font-weight: 800; font-size: 16px;
  color: white;
  border-radius: 4px;
}
.source-meta { flex: 1; min-width: 0; }
.source-line {
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
}
.source-name {
  font-weight: 700; font-size: 14px; color: var(--ink);
}
.verified {
  display: inline-grid; place-items: center;
  width: 14px; height: 14px;
  background: var(--accent); color: white;
  border-radius: 50%; font-size: 8px;
}
.source-handle {
  font-size: 13px; color: var(--muted);
}
.source-time {
  font-size: 13px; color: var(--muted);
}
.source-time::before { content: '·'; margin: 0 4px; }

.source-category {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.15em; color: var(--muted);
  font-weight: 600; margin-top: 2px;
}

.post-menu {
  color: var(--muted); padding: 4px;
  border-radius: 4px; transition: all 0.15s;
}
.post-menu:hover { background: var(--bg-deep); color: var(--ink); }

.post-headline {
  font-family: 'Fraunces', serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin-bottom: 10px;
  color: var(--ink);
}
.post-headline:hover { color: var(--accent); }

.post-summary {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.post-image {
  width: 100%;
  height: 280px;
  margin-bottom: 14px;
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  background: var(--bg-deep);
}
.post-image .img-tag {
  position: absolute; top: 12px; left: 12px;
  background: rgba(14,14,12,0.85); color: var(--bg);
  padding: 4px 10px; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.15em;
  backdrop-filter: blur(4px); z-index: 2;
}
.post-image .img-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  color: white; padding: 24px 16px 12px;
  font-size: 11px; font-style: italic;
}
.post-image img.uploaded {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

.post-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.post-tag {
  font-size: 11px; color: var(--accent);
  font-weight: 600; padding: 3px 8px;
  background: rgba(200,16,46,0.06);
  border-radius: 2px;
}

.post-actions {
  display: flex; justify-content: space-between;
  padding-top: 12px; border-top: 1px dashed var(--hairline);
}
.post-action {
  display: flex; align-items: center; gap: 6px;
  color: var(--muted); font-size: 13px;
  padding: 6px 8px; border-radius: 4px;
  transition: all 0.15s;
}
.post-action:hover { color: var(--ink); background: var(--bg-deep); }
.post-action.liked { color: var(--accent); }
.post-action.shared { color: var(--teal); }
.post-action svg { width: 16px; height: 16px; }

/* Quoted/Re-shared post inside post */
.quoted {
  border: 1px solid var(--hairline);
  padding: 14px;
  margin-bottom: 14px;
  border-radius: 2px;
  background: var(--bg);
}
.quoted .source-name { font-size: 13px; }
.quoted .post-headline { font-size: 17px; margin-bottom: 6px; }
.quoted .post-summary { font-size: 13px; margin-bottom: 0; }

/* Live update card variant */
.post.live { border-left: 3px solid var(--accent); }
.live-tag {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--accent); color: white;
  padding: 2px 8px; font-size: 10px;
  font-weight: 800; letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ============ RIGHT SIDEBAR ============ */
.sidebar {
  position: sticky; top: 130px; align-self: start;
}

.widget {
  background: var(--paper);
  border: 1px solid var(--hairline);
  padding: 18px;
  margin-bottom: 16px;
}

.widget-header {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}
.widget-title {
  font-family: 'Fraunces', serif;
  font-weight: 700; font-size: 17px;
  letter-spacing: -0.01em;
}
.widget-link { font-size: 11px; color: var(--accent); font-weight: 600; }

.trending-item {
  padding: 10px 0;
  border-bottom: 1px dashed var(--hairline);
  cursor: pointer; transition: all 0.15s;
}
.trending-item:last-child { border-bottom: none; padding-bottom: 0; }
.trending-item:hover .trending-topic { color: var(--accent); }
.trending-meta {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.15em; color: var(--muted);
  font-weight: 600; margin-bottom: 4px;
  display: flex; align-items: center; gap: 8px;
}
.trending-rank {
  background: var(--ink); color: var(--bg);
  width: 16px; height: 16px;
  display: inline-grid; place-items: center;
  font-size: 9px; font-weight: 700;
}
.trending-topic {
  font-family: 'Fraunces', serif;
  font-size: 15px; font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  transition: color 0.15s;
}
.trending-stats {
  font-size: 11px; color: var(--muted);
  margin-top: 4px;
}

.source-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--hairline);
}
.source-item:last-child { border-bottom: none; padding-bottom: 0; }
.source-item .source-avatar { width: 36px; height: 36px; font-size: 13px; }
.source-item-info { flex: 1; min-width: 0; }
.source-item-name {
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; gap: 4px;
}
.source-item-handle { font-size: 11px; color: var(--muted); }
.follow-btn {
  padding: 5px 12px;
  background: var(--ink); color: var(--bg);
  border-radius: 999px;
  font-size: 11px; font-weight: 700;
  transition: all 0.15s;
}
.follow-btn:hover { background: var(--accent); }
.follow-btn.following {
  background: transparent; color: var(--ink);
  border: 1px solid var(--ink);
}

/* Stats widget */
.stats-widget {
  background: var(--ink); color: var(--bg);
  padding: 20px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.stats-widget::before {
  content: ''; position: absolute;
  top: -20px; right: -20px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, var(--accent), transparent 60%);
  opacity: 0.4;
}
.stats-label {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.2em; opacity: 0.7;
  margin-bottom: 6px;
}
.stats-number {
  font-family: 'Fraunces', serif;
  font-size: 36px; font-weight: 800;
  letter-spacing: -0.02em; line-height: 1;
  margin-bottom: 6px;
}
.stats-detail { font-size: 12px; opacity: 0.85; }

/* Footer note */
.footer-note {
  padding: 16px 0;
  font-size: 11px; color: var(--muted);
  line-height: 1.6;
}
.footer-note a { color: var(--ink); font-weight: 600; }
.footer-note .links { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 8px; }

/* Source avatar color variations */
.src-1 { background: linear-gradient(135deg, #C8102E, #9C0A22); }
.src-2 { background: linear-gradient(135deg, #1F4842, #0a2825); }
.src-3 { background: linear-gradient(135deg, #B8924B, #8a6e36); }
.src-4 { background: linear-gradient(135deg, #2C3E50, #1a2530); }
.src-5 { background: linear-gradient(135deg, #7F2982, #4f1652); }
.src-6 { background: linear-gradient(135deg, #D97706, #92400E); }

/* Image placeholders with thematic gradients */
.img-tech {
  background:
    radial-gradient(circle at 30% 40%, rgba(255,255,255,0.15) 0%, transparent 50%),
    linear-gradient(135deg, #1F4842 0%, #0a2825 50%, #1F4842 100%);
}
.img-politics {
  background:
    linear-gradient(135deg, #C8102E 0%, #9C0A22 100%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40'><path d='M0 0h40v40H0z' fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='1'/></svg>");
}
.img-business {
  background:
    linear-gradient(135deg, #B8924B 0%, #8a6e36 50%, #5a4623 100%);
}
.img-culture {
  background:
    linear-gradient(135deg, #7F2982 0%, #4f1652 100%);
}
.img-sports {
  background:
    linear-gradient(135deg, #D97706 0%, #92400E 100%);
}
.img-science {
  background:
    linear-gradient(135deg, #2C3E50 0%, #1a2530 100%);
}

.img-pattern {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  color: rgba(255,255,255,0.85);
}
.img-pattern svg { opacity: 0.4; }

@media (max-width: 1100px) {
  .layout { grid-template-columns: 70px minmax(0, 1fr) 320px; }
  .rail-item span:not(.count) { display: none; }
  .rail-label { display: none; }
  .rail-item { justify-content: center; }
  .rail-item .count { display: none; }
}
@media (max-width: 880px) {
  .layout { grid-template-columns: 70px minmax(0, 1fr); }
  .sidebar { display: none; }
  .masthead-top .ticker { display: none; }
  .search-box { display: none; }
}
@media (max-width: 600px) {
  .layout { grid-template-columns: 1fr; padding: 16px; gap: 0; }
  .rail { display: none; }
  .masthead-main { padding: 14px 16px; grid-template-columns: 1fr auto 1fr; }
  .nav-pills { display: none; }
  .logo .wordmark { font-size: 32px; }
  .feed-header h1 { font-size: 24px; }
  .post-headline { font-size: 20px; }
  .post-image { height: 200px; }
}

/* =============================================================
   COUNTRY HUB — homepage grid, country mini-site, section pills
   Added for the country-wise news feature. Built by DIGIrabbits.
   ============================================================= */

/* Extra gradient used by some country tiles */
.img-gold {
  background: linear-gradient(135deg, #B8924B 0%, #d8b56b 50%, #8a6e36 100%);
}

/* ---- Country grid (home page) ---- */
.country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
  margin-bottom: 8px;
}
.country-tile {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.country-tile:hover {
  transform: translateY(-3px);
  border-color: var(--rule);
  box-shadow: 0 1px 0 rgba(14,14,12,0.06), 0 18px 36px -16px rgba(14,14,12,0.28);
}
.country-thumb {
  position: relative;
  height: 118px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.country-flag {
  font-size: 52px;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.25));
}
.country-count {
  position: absolute;
  top: 10px;
  right: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(14,14,12,0.45);
  backdrop-filter: blur(4px);
  padding: 3px 8px;
  border-radius: 999px;
}
.country-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}
.country-name {
  font-family: 'Fraunces', serif;
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.country-tagline {
  font-size: 12px;
  color: var(--muted);
}
.country-latest {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.35;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.country-cta {
  margin-top: auto;
  padding-top: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent);
}

/* ---- Country hero banner (country.php) ---- */
.country-hero {
  border-radius: 4px;
  padding: 30px 28px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.country-hero-inner {
  display: flex;
  align-items: center;
  gap: 20px;
}
.country-hero-flag {
  font-size: 66px;
  line-height: 1;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}
.country-hero-name {
  font-family: 'Fraunces', serif;
  font-weight: 900;
  font-size: 40px;
  letter-spacing: -0.03em;
  line-height: 0.95;
  color: #fff;
  margin: 0;
}
.country-hero-tagline {
  margin-top: 6px;
  font-size: 14px;
  color: rgba(255,255,255,0.88);
}
.country-hero-meta {
  margin-top: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.78);
}

/* ---- Section (category) pills on the country page ---- */
.cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--hairline);
}
.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--paper);
  transition: all 0.15s;
}
.cat-pill:hover { border-color: var(--rule); }
.cat-pill.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.cat-pill-n {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  opacity: 0.7;
}

/* ---- Country chip inside post cards ---- */
.country-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  color: var(--teal);
}
.country-chip:hover { color: var(--accent); }

@media (max-width: 600px) {
  .country-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .country-name { font-size: 17px; }
  .country-thumb { height: 90px; }
  .country-flag { font-size: 40px; }
  .country-hero-name { font-size: 28px; }
  .country-hero-flag { font-size: 46px; }
}

/* =============================================================
   HOME PAGE — country blocks (Europe edition)
   Each country shows a lead story + a compact list of its latest.
   ============================================================= */

.ctry-block {
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  box-shadow: var(--shadow);
  padding: 18px 20px 16px;
  margin-bottom: 18px;
}

/* --- header row --- */
.ctry-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 2px solid var(--ink);
}
.ctry-head-name {
  font-family: 'Fraunces', serif;
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ctry-head-name:hover { color: var(--accent); }
.ctry-head-flag { font-size: 22px; line-height: 1; }
.ctry-head-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.ctry-head-link {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

/* --- lead story --- */
.ctry-lead {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 16px;
  padding-bottom: 14px;
  margin-bottom: 12px;
  border-bottom: 1px dashed var(--hairline);
  color: inherit;
}
.ctry-lead-thumb {
  height: 108px;
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.ctry-lead-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ctry-lead-body { min-width: 0; }
.ctry-meta {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 5px;
}
.ctry-lead-title {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 19px;
  line-height: 1.22;
  letter-spacing: -0.015em;
  margin: 0 0 6px;
}
.ctry-lead:hover .ctry-lead-title { color: var(--accent); }
.ctry-lead-sum {
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-soft);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- remaining stories --- */
.ctry-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 22px;
}
.ctry-list li { min-width: 0; }
.ctry-list a {
  display: block;
  color: inherit;
  padding-left: 11px;
  border-left: 2px solid var(--hairline);
  transition: border-color 0.15s;
}
.ctry-list a:hover { border-left-color: var(--accent); }
.ctry-list a:hover .ctry-item-title { color: var(--accent); }
.ctry-list .ctry-meta { margin-bottom: 2px; }
.ctry-item-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

/* --- countries with nothing published yet --- */
.ctry-soon-note {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 14px;
}
.ctry-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 8px;
}
.ctry-mini {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 3px;
  color: var(--ink-soft);
  transition: all 0.15s;
}
.ctry-mini:hover {
  border-color: var(--ink);
  color: var(--ink);
  transform: translateY(-1px);
}
.ctry-mini-flag { font-size: 18px; line-height: 1; }
.ctry-mini-name { font-size: 13px; font-weight: 600; }

/* --- masthead "All 29 →" pill --- */
.nav-more { font-weight: 700; color: var(--accent) !important; }

@media (max-width: 880px) {
  .ctry-list { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .ctry-block { padding: 14px 14px 12px; }
  .ctry-head-name { font-size: 20px; }
  .ctry-lead { grid-template-columns: 108px minmax(0, 1fr); gap: 12px; }
  .ctry-lead-thumb { height: 78px; }
  .ctry-lead-title { font-size: 16px; }
  .ctry-lead-sum { display: none; }
  .ctry-mini-grid { grid-template-columns: 1fr 1fr; }
}

/* =============================================================
   MASTHEAD — all-countries dropdown
   Uses <details> so it still opens if JavaScript is unavailable.
   ============================================================= */

.nav-dd { position: relative; }

.nav-dd-btn {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  border-radius: 2px;
  user-select: none;
  transition: background 0.15s;
}
.nav-dd-btn::-webkit-details-marker { display: none; }
.nav-dd-btn::marker { content: ''; }
.nav-dd-btn:hover { background: var(--bg-deep); }
.nav-dd[open] .nav-dd-btn { background: var(--ink); color: var(--bg); }

.nav-dd-n {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--bg-deep);
  color: var(--muted);
}
.nav-dd[open] .nav-dd-n { background: rgba(255,255,255,0.18); color: var(--bg); }
.nav-dd-caret { transition: transform 0.15s; }
.nav-dd[open] .nav-dd-caret { transform: rotate(180deg); }
.nav-dd-flag { font-size: 15px; line-height: 1; }

.nav-dd-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 60;
  width: 540px;
  max-width: calc(100vw - 32px);
  max-height: min(70vh, 470px);
  overflow-y: auto;
  padding: 12px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  box-shadow: 0 18px 44px -14px rgba(14,14,12,0.34);
}
.nav-dd-head {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 2px 6px 10px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 8px;
}
.nav-dd-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
}
.nav-dd-grid a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 3px;
  color: var(--ink-soft);
  min-width: 0;
}
.nav-dd-grid a:hover { background: var(--bg-deep); color: var(--ink); }
.nav-dd-grid a.active { background: var(--ink); color: var(--bg); }
.nav-dd-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 880px) {
  .nav-dd-panel { width: 420px; }
}
/* Keep the country dropdown reachable on phones (the rest of the
   pill row is hidden there to save space). */
@media (max-width: 600px) {
  .nav-pills { display: flex; }
  .nav-pills > a { display: none; }
  .nav-dd-panel { width: min(330px, calc(100vw - 24px)); padding: 10px; }
  .nav-dd-grid { grid-template-columns: 1fr 1fr; }
}

/* =============================================================
   Explore page + rail items that need reader accounts
   ============================================================= */

.explore-note {
  font-size: 13px;
  color: var(--muted);
  margin: -6px 0 16px;
}

/* Rail entries that aren't available yet (Bookmarks / Discussions /
   Following) — visibly inactive instead of looking clickable. */
.rail-item.soon {
  cursor: default;
  opacity: 0.45;
}
.rail-item.soon:hover { background: none; }
.soon-tag {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--hairline);
  padding: 1px 5px;
  border-radius: 999px;
}

/* Pagination */
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
}
.pager-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-soft);
  transition: all 0.15s;
}
.pager-btn:hover { border-color: var(--ink); color: var(--ink); }
.pager-btn.disabled { opacity: 0.35; pointer-events: none; }
.pager-info {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
