/* =========================================================
   CountryDose — Global Stylesheet (Phase 0: Foundation)
   ---------------------------------------------------------
   This file holds the DESIGN SYSTEM for the whole website:
   colors, typography, spacing, buttons, header, footer, layout.
   Every page loads this one file so the look stays consistent.
   ========================================================= */

/* ---------- 1. Design Tokens (change theme here) ---------- */
:root {
  /* Brand colors */
  --color-primary: #2563eb;        /* main blue */
  --color-primary-dark: #1d4ed8;   /* hover blue */
  --color-primary-soft: #eff4ff;   /* light blue background */
  --color-accent: #0ea5e9;         /* sky accent for gradients */

  /* Neutrals */
  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-surface-alt: #f7f9fc;    /* section background */
  --color-border: #e5e9f0;
  --color-text: #0f172a;           /* near-black */
  --color-text-soft: #475569;      /* muted text */
  --color-text-faint: #94a3b8;     /* faint labels */

  /* Feedback */
  --color-success: #16a34a;
  --color-danger: #dc2626;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Poppins', var(--font-sans);

  /* Spacing / sizing */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.12);
  --container: 1160px;
  --header-h: 68px;

  --transition: 0.2s ease;
}

/* ---------- 2. Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  font-weight: 700;
  color: var(--color-text);
}

/* ---------- 3. Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

.section {
  padding-block: 72px;
}

.section--alt {
  background: var(--color-surface-alt);
}

.section-head {
  max-width: 620px;
  margin: 0 auto 44px;
  text-align: center;
}

.section-head .eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.section-head p {
  color: var(--color-text-soft);
  margin-top: 12px;
  font-size: 1.05rem;
}

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}

.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover {
  background: var(--color-primary-dark);
  box-shadow: var(--shadow-md);
}

.btn--ghost {
  background: #fff;
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn--ghost:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn--lg {
  padding: 15px 30px;
  font-size: 1.05rem;
}

/* ---------- 5. Header / Navbar ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.navbar {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--color-text);
}

.brand__logo {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border-radius: 10px;
  color: #fff;
}

.brand__logo svg { width: 20px; height: 20px; }

.brand__name b { color: var(--color-primary); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  color: var(--color-text-soft);
  transition: color var(--transition), background var(--transition);
}

.nav-links a:hover {
  color: var(--color-primary);
  background: var(--color-primary-soft);
}

.nav-links a.is-active {
  color: var(--color-primary);
  background: var(--color-primary-soft);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Mobile menu toggle (hidden on desktop) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 6. Hero (foundation placeholder) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(14, 165, 233, 0.12), transparent 60%),
    radial-gradient(900px 500px at 0% 0%, rgba(37, 99, 235, 0.10), transparent 55%);
  padding-block: clamp(56px, 8vw, 96px);
}

.hero__inner {
  max-width: 760px;
}

.hero .pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary);
  background: #fff;
  border: 1px solid var(--color-border);
  padding: 7px 14px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  letter-spacing: -0.02em;
}

.hero h1 .grad {
  background: linear-gradient(120deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.15rem;
  color: var(--color-text-soft);
  margin-top: 18px;
  max-width: 560px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

/* ---------- 7. Footer ---------- */
.site-footer {
  margin-top: auto;
  background: #0b1220;
  color: #cbd5e1;
  padding-block: 52px 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
}

.site-footer .brand { color: #fff; margin-bottom: 14px; }
.site-footer .brand__name { color: #fff; }
.site-footer .brand__name b { color: var(--color-accent); }

.footer-about p {
  color: #94a3b8;
  font-size: 0.95rem;
  max-width: 320px;
}

.footer-col h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  color: #94a3b8;
  padding: 5px 0;
  font-size: 0.95rem;
  transition: color var(--transition);
}
.footer-col a:hover { color: #fff; }

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}
.footer-social a {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transition: background var(--transition), transform var(--transition);
}
.footer-social a:hover {
  background: var(--color-primary);
  transform: translateY(-2px);
}
.footer-social svg { width: 20px; height: 20px; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 40px;
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.88rem;
  color: #94a3b8;
}

/* ---------- 8. Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.hidden { display: none !important; }

/* ---------- 9. Responsive ---------- */
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    padding: 16px 20px 22px;
    box-shadow: var(--shadow-md);
    transform: translateY(-140%);
    transition: transform 0.28s ease;
    z-index: 90;
  }
  .nav-links.is-open { transform: translateY(0); }
  .nav-links a { padding: 12px 14px; }

  /* hide the desktop CTA in navbar on mobile to keep it clean */
  .nav-actions .btn { display: none; }
}

@media (max-width: 560px) {
  .section { padding-block: 52px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { justify-content: center; text-align: center; }
}

/* =========================================================
   Phase 1 — Country browsing, search, cards, states
   ========================================================= */

/* ---------- Search bar ---------- */
.search {
  position: relative;
  max-width: 520px;
}
.search--hero { margin-top: 30px; }

.search input {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--color-text);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 15px 20px 15px 50px;
  box-shadow: var(--shadow-sm);
  transition: border var(--transition), box-shadow var(--transition);
}
.search input::placeholder { color: var(--color-text-faint); }
.search input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}
.search__icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-faint);
  pointer-events: none;
}

/* ---------- Filter / toolbar row ---------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}
.toolbar .search { flex: 1 1 320px; }

.toolbar__controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.select {
  position: relative;
}
.select select {
  appearance: none;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--color-text);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 12px 42px 12px 16px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border var(--transition);
}
.select select:focus { outline: none; border-color: var(--color-primary); }
.select::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--color-text-soft);
  border-bottom: 2px solid var(--color-text-soft);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

/* ---------- Country grid & cards ---------- */
.country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 28px;
}

.country-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
}
.country-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.16);
  border-color: rgba(37, 99, 235, 0.25);
}

/* Flag wrapper: fixes the flag box to ONE uniform size for every card.
   The image sits inside and fills it (object-fit: cover). Because the
   wrapper holds the size, cards stay identical even if a flag is slow
   or fails to load. */
.country-card__flagwrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  background: linear-gradient(135deg, #eef2f9, #e4ebf5);
  border-bottom: 1px solid var(--color-border);
  overflow: hidden;
}
.country-card__flag {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.country-card:hover .country-card__flag { transform: scale(1.05); }

/* Fallback globe shown only when the flag image fails to load */
.country-card__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #9db0cc;
}
.country-card__fallback svg { width: 42px; height: 42px; }
.country-card__flagwrap.is-broken .country-card__flag { display: none; }

.country-card__body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}
.country-card__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.12rem;
  line-height: 1.3;
  /* keep long names to 2 lines so every card body lines up */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}
.country-card__meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
}
.country-card__meta li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.country-card__meta li span { color: var(--color-text-faint); }
.country-card__meta li b { color: var(--color-text); font-weight: 600; text-align: right; }
.country-card__region {
  margin-top: auto;
  display: inline-flex;
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  padding: 5px 12px;
  border-radius: 999px;
}

/* ---------- Loading skeletons ---------- */
.skeleton {
  background: linear-gradient(100deg, #eef1f6 30%, #f6f8fb 50%, #eef1f6 70%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}
.country-card.is-skeleton { pointer-events: none; }
.country-card.is-skeleton .country-card__flagwrap {
  border-radius: 0;
  border: none;
}
.skeleton-line { height: 13px; border-radius: 6px; }
.skeleton-line.lg { width: 75%; height: 16px; }
.skeleton-line.md { width: 90%; }
.skeleton-line.sm { width: 55%; }
.skeleton-pill { width: 40%; height: 22px; border-radius: 999px; margin-top: 6px; }

/* ---------- Empty / error states ---------- */
.state {
  text-align: center;
  padding: 60px 20px;
  max-width: 460px;
  margin: 0 auto;
}
.state__icon {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--color-primary-soft);
  color: var(--color-primary);
}
.state h3 { font-size: 1.3rem; margin-bottom: 8px; }
.state p { color: var(--color-text-soft); margin-bottom: 20px; }

/* ---------- Result count ---------- */
.result-count {
  font-size: 0.9rem;
  color: var(--color-text-faint);
  margin-bottom: 18px;
}

/* ---------- Stats strip (home) ---------- */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.stat {
  text-align: center;
  padding: 30px 18px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.stat:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.stat__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.2rem;
  line-height: 1;
  background: linear-gradient(120deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat__label {
  font-size: 0.9rem;
  color: var(--color-text-soft);
  margin-top: 4px;
}

/* ---------- Section header with a "view all" link ---------- */
.section-bar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 30px;
}
.section-bar h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.section-bar p { color: var(--color-text-soft); margin-top: 6px; }
.section-bar a { color: var(--color-primary); font-weight: 600; white-space: nowrap; }
.section-bar a:hover { text-decoration: underline; }

/* ---------- Instagram CTA banner ---------- */
.cta-banner {
  background: linear-gradient(120deg, var(--color-primary), var(--color-accent));
  border-radius: var(--radius-lg);
  padding: clamp(32px, 5vw, 56px);
  color: #fff;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.cta-banner h2 { color: #fff; font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
.cta-banner p { color: rgba(255, 255, 255, 0.9); margin: 12px auto 26px; max-width: 520px; }
.cta-banner .btn--light {
  background: #fff;
  color: var(--color-primary);
}
.cta-banner .btn--light:hover { background: #f1f5ff; }

/* ---------- Responsive tweaks ---------- */
@media (max-width: 760px) {
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .country-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
  .toolbar__controls { width: 100%; }
  .toolbar__controls .select { flex: 1; }
  .toolbar__controls .select select { width: 100%; }
}

/* =========================================================
   Phase 2 — Country detail page
   ========================================================= */

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--color-text-faint);
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--color-text-soft); font-weight: 500; }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb span.sep { color: var(--color-border); }
.breadcrumb .current { color: var(--color-text); font-weight: 600; }

/* ---------- Detail hero ---------- */
.detail-hero {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 48px;
  align-items: start;
}

.detail-flag {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  background: linear-gradient(135deg, #eef2f9, #e4ebf5);
}
.detail-flag img { width: 100%; height: 100%; object-fit: cover; display: block; }

.detail-info .eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.detail-info h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.02em;
}
.detail-info .official {
  color: var(--color-text-soft);
  font-size: 1.05rem;
  margin-top: 8px;
}
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.tag {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-soft);
  background: #fff;
  border: 1px solid var(--color-border);
  padding: 7px 14px;
  border-radius: 999px;
}
.tag--primary { color: var(--color-primary); background: var(--color-primary-soft); border-color: transparent; }

.detail-highlights {
  display: flex;
  gap: 32px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.detail-highlights .hl__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.7rem;
  color: var(--color-text);
}
.detail-highlights .hl__label {
  font-size: 0.85rem;
  color: var(--color-text-faint);
}
.detail-hero .hero__actions { margin-top: 28px; }

/* ---------- Fact grid ---------- */
.fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.fact {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.fact:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.fact__label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-faint);
  margin-bottom: 10px;
}
.fact__label svg { width: 16px; height: 16px; color: var(--color-primary); }
.fact__value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-text);
  line-height: 1.35;
  word-break: break-word;
}
.fact__value small {
  display: block;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--color-text-soft);
  margin-top: 4px;
}

/* ---------- Border / neighbour chips ---------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 7px 16px 7px 8px;
  font-weight: 600;
  font-size: 0.92rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.chip:hover {
  transform: translateY(-2px);
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: var(--shadow-md);
}
.chip img {
  width: 30px;
  height: 22px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--color-border);
}

/* ---------- Detail loading + not found ---------- */
.detail-skeleton .sk-flag { aspect-ratio: 3/2; border-radius: var(--radius-md); }
.detail-skeleton .sk-line { height: 16px; border-radius: 6px; margin-bottom: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .detail-hero { grid-template-columns: 1fr; gap: 26px; }
  .detail-flag { max-width: 260px; }
}

/* =========================================================
   Phase 3 — Compare two countries
   ========================================================= */

/* ---------- Picker row (two selects + VS) ---------- */
.compare-picker {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 44px;
}
.compare-picker .select { width: 100%; }
.compare-picker .select select { width: 100%; font-size: 1rem; padding: 14px 42px 14px 16px; }
.compare-picker__vs {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--color-text);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
}

/* ---------- VS header (two country cards) ---------- */
.vs-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
  margin-bottom: 40px;
}
.vs-country { text-align: center; }
.vs-country__flag {
  width: 100%;
  max-width: 200px;
  aspect-ratio: 3 / 2;
  margin: 0 auto 14px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  background: linear-gradient(135deg, #eef2f9, #e4ebf5);
}
.vs-country__flag img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vs-country h3 { font-size: 1.3rem; }
.vs-country span { color: var(--color-text-soft); font-size: 0.9rem; }
.vs-badge {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  box-shadow: var(--shadow-md);
}

/* ---------- Comparison metric rows ---------- */
.cmp-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cmp-row {
  padding: 18px 8px;
  border-bottom: 1px solid var(--color-border);
}
.cmp-row:last-child { border-bottom: none; }
.cmp-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
}
.cmp-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-faint);
  text-align: center;
  white-space: nowrap;
}
.cmp-val {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-text);
}
.cmp-val--a { text-align: right; }
.cmp-val--b { text-align: left; }
.cmp-val.is-winner { color: var(--color-primary); }
.cmp-val .win-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-success);
  margin-left: 6px;
}
.cmp-val--b .win-badge { margin-left: 0; margin-right: 6px; }
.cmp-val--text { font-size: 0.98rem; font-weight: 600; color: var(--color-text-soft); }

/* Dual comparison bars */
.cmp-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}
.cmp-bars .bar {
  height: 10px;
  border-radius: 999px;
  background: var(--color-surface-alt);
  overflow: hidden;
}
.cmp-bars .bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s ease;
}
.cmp-bars .bar--a span { background: var(--color-primary); }
.cmp-bars .bar--b span { background: #f59e0b; margin-left: auto; }

/* ---------- Share + actions ---------- */
.compare-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 40px;
}

/* ---------- Empty prompt ---------- */
.compare-empty {
  text-align: center;
  padding: 50px 20px;
  color: var(--color-text-soft);
}
.compare-empty svg { width: 54px; height: 54px; color: var(--color-primary); margin-bottom: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .vs-country h3 { font-size: 1.05rem; }
  .vs-country__flag { max-width: 130px; }
  .cmp-val { font-size: 1rem; }
  .cmp-label { font-size: 0.68rem; white-space: normal; }
  .vs-badge { width: 42px; height: 42px; font-size: 0.8rem; }
}

/* =========================================================
   Phase 4 — Quiz game
   ========================================================= */

.quiz-shell {
  max-width: 720px;
  margin: 0 auto;
}

/* ---------- Quiz hub (grid of quizzes to pick from) ---------- */
.quiz-hub {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 20px;
}
.quiz-tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px 22px;
  min-height: 190px;
  cursor: pointer;
  font-family: var(--font-sans);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.quiz-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.14);
}
.quiz-tile__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #fff;
}
.quiz-tile__icon svg { width: 24px; height: 24px; }
.quiz-tile h3 { font-size: 1.08rem; line-height: 1.3; }
.quiz-tile p { font-size: 0.88rem; color: var(--color-text-soft); flex: 1; }
.quiz-tile__badge {
  align-self: flex-start;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  padding: 4px 11px;
  border-radius: 999px;
}
.quiz-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: clamp(24px, 4vw, 44px);
}

/* ---------- Start screen ---------- */
.quiz-start { text-align: center; }
.quiz-start h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.quiz-start p { color: var(--color-text-soft); margin: 12px auto 30px; max-width: 440px; }
.quiz-modes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 30px;
}
.mode-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 22px 12px;
  background: var(--color-surface-alt);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--color-text);
  transition: border-color var(--transition), transform var(--transition), background var(--transition);
}
.mode-btn:hover { transform: translateY(-3px); background: #fff; }
.mode-btn.is-selected { border-color: var(--color-primary); background: var(--color-primary-soft); }
.mode-btn svg { width: 30px; height: 30px; color: var(--color-primary); }
.mode-btn small { font-weight: 500; color: var(--color-text-faint); font-size: 0.78rem; }

/* ---------- Back to quizzes link ---------- */
.quiz-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-soft);
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 0;
  margin-bottom: 18px;
  font-family: var(--font-sans);
}
.quiz-back:hover { color: var(--color-primary); }
.quiz-back svg { width: 16px; height: 16px; }

.quiz-title-row {
  text-align: center;
  margin-bottom: 22px;
}
.quiz-title-row h2 { font-size: 1.35rem; }
.quiz-title-row span { font-size: 0.9rem; color: var(--color-text-faint); }

/* ---------- Progress + score bar ---------- */
.quiz-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-soft);
}
.quiz-score b { color: var(--color-primary); }
.quiz-progress {
  height: 8px;
  border-radius: 999px;
  background: var(--color-surface-alt);
  overflow: hidden;
  margin-bottom: 28px;
}
.quiz-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* ---------- Question ---------- */
.quiz-flag {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 3 / 2;
  margin: 0 auto 24px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  background: linear-gradient(135deg, #eef2f9, #e4ebf5);
}
.quiz-flag img { width: 100%; height: 100%; object-fit: cover; display: block; }
.quiz-question {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: 24px;
}

/* ---------- Options ---------- */
.quiz-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.option-btn {
  min-height: 64px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  text-align: center;
  line-height: 1.3;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}
.option-btn:hover:not(:disabled) { border-color: var(--color-primary); transform: translateY(-2px); }
.option-btn:disabled { cursor: default; }
.option-btn.is-correct {
  border-color: var(--color-success);
  background: #ecfdf3;
  color: #087443;
}
.option-btn.is-wrong {
  border-color: var(--color-danger);
  background: #fef2f2;
  color: #b42318;
}

/* ---------- Result screen ---------- */
.quiz-result { text-align: center; }
.score-ring {
  width: 140px;
  height: 140px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--color-primary) var(--deg, 0deg), var(--color-surface-alt) 0deg);
}
.score-ring__inner {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  flex-direction: column;
}
.score-ring__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.2rem;
  line-height: 1;
  color: var(--color-text);
}
.score-ring__label { font-size: 0.8rem; color: var(--color-text-faint); }
.quiz-result h2 { font-size: 1.8rem; margin-bottom: 8px; }
.quiz-result p { color: var(--color-text-soft); margin-bottom: 28px; }
.quiz-result .compare-actions { margin-top: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
  .quiz-modes { grid-template-columns: 1fr; }
  .quiz-options { grid-template-columns: 1fr; }
  .quiz-question { font-size: 1.12rem; }
}

/* =========================================================
   Phase 6 — Monetization (ad slots + affiliate box)
   ========================================================= */

/* ---------- Ad slot ----------
   A reserved, tidy space where a Google AdSense unit goes.
   The dashed look + "Advertisement" label are just placeholders;
   once you paste real ad code inside, it fills this space. */
.ad-slot {
  /* Hidden by default so visitors never see an empty "Advertisement"
     box. Two ways to switch ads on later:
       1) EASIEST — add Google "Auto ads" (the script in each page's
          <head>). Google places ads automatically; leave this hidden.
       2) MANUAL — paste an AdSense ad unit inside a .ad-slot and add
          the class "is-active" to that slot to reveal it. */
  display: none;
  position: relative;
  min-height: 110px;
  align-items: center;
  justify-content: center;
  margin: 40px auto;
  padding: 16px;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-alt);
  color: var(--color-text-faint);
  overflow: hidden;
}
.ad-slot.is-active { display: flex; }
.ad-slot__label {
  position: absolute;
  top: 8px;
  left: 12px;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-faint);
}
.ad-slot__hint { font-size: 0.85rem; }
/* When a real ad is inside, hide the placeholder chrome */
.ad-slot.is-filled { border: none; background: none; min-height: 0; }
.ad-slot.is-filled .ad-slot__label,
.ad-slot.is-filled .ad-slot__hint { display: none; }

/* ---------- Affiliate box ---------- */
.affiliate-box {
  background: linear-gradient(135deg, #fff, var(--color-primary-soft));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 26px 28px;
  margin-top: 40px;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.affiliate-box__icon {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #fff;
}
.affiliate-box__icon svg { width: 28px; height: 28px; }
.affiliate-box__text { flex: 1; min-width: 200px; }
.affiliate-box__text h3 { font-size: 1.15rem; margin-bottom: 4px; }
.affiliate-box__text p { color: var(--color-text-soft); font-size: 0.92rem; }
.affiliate-box .btn { white-space: nowrap; }

/* =========================================================
   Mobile fixes — Compare & Quiz (keep phone layout accurate)
   These rules ONLY apply on screens 620px and smaller, so the
   desktop / PC layout is never affected.
   ========================================================= */

@media (max-width: 620px) {

  /* ============ COMPARE (phone) ============ */

  /* Stack the two country pickers vertically, VS badge in the middle */
  .compare-picker {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .compare-picker__vs { margin: 2px auto; }
  .select, .cmp-val, .vs-country { min-width: 0; }
  .compare-picker .select select { width: 100%; max-width: 100%; }

  /* Two-country header: side by side but compact so it never crowds */
  .vs-header { gap: 12px; margin-bottom: 30px; }
  .vs-country__flag { max-width: 110px; margin-bottom: 10px; }
  .vs-country h3 { font-size: 1rem; }
  .vs-country span { font-size: 0.8rem; }
  .vs-badge { width: 44px; height: 44px; font-size: 0.8rem; }

  /* Each metric: label centered on top, the two values in a row below,
     then the bars. Clean and easy to read on a narrow screen. */
  .cmp-row { padding: 16px 4px; }
  .cmp-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "label label"
      "a b";
    gap: 4px 12px;
  }
  .cmp-label { grid-area: label; margin-bottom: 2px; white-space: normal; }
  .cmp-val--a { grid-area: a; text-align: left; }
  .cmp-val--b { grid-area: b; text-align: right; }
  .cmp-val { font-size: 1.02rem; }
  .cmp-val--text { font-size: 0.9rem; }
  .cmp-bars { margin-top: 10px; }

  /* Buttons full width, stacked */
  .compare-actions { flex-direction: column; }
  .compare-actions .btn { width: 100%; }

  /* ============ QUIZ (phone) ============ */

  /* Quizzes: one per row, easy to tap */
  .quiz-hub { grid-template-columns: 1fr; }
  .quiz-tile { min-height: 0; }

  /* Options: one per row so long country names fit fully */
  .quiz-options { grid-template-columns: 1fr; }
  .option-btn { min-height: 54px; }

  .quiz-card { padding: 22px 18px; }
  .quiz-question { font-size: 1.1rem; }
  .quiz-flag { max-width: 240px; }
}

/* Extra-small phones */
@media (max-width: 380px) {
  .vs-country__flag { max-width: 92px; }
  .vs-country h3 { font-size: 0.9rem; }
  .vs-badge { width: 38px; height: 38px; font-size: 0.72rem; }
  .cmp-val { font-size: 0.95rem; }
}

/* =========================================================
   Blog (public) — listing + article
   ========================================================= */

/* Button variants used by the blog/admin */
.btn--sm { padding: 8px 14px; font-size: 0.85rem; }
.btn--danger { background: #fef2f2; color: var(--color-danger); border-color: #fbd5d5; }
.btn--danger:hover { background: var(--color-danger); color: #fff; }

/* ---------- Blog listing grid ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}
.blog-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.14);
  border-color: rgba(37, 99, 235, 0.25);
}
.blog-card__cover {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #eef2f9, #e4ebf5);
  overflow: hidden;
}
.blog-card__cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s ease; }
.blog-card:hover .blog-card__cover img { transform: scale(1.05); }
.blog-card__ph { display: grid; place-items: center; height: 100%; color: #9db0cc; }
.blog-card__ph svg { width: 48px; height: 48px; }
.blog-card__body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.blog-card__date { font-size: 0.8rem; color: var(--color-text-faint); font-weight: 500; }
.blog-card__title { font-size: 1.2rem; line-height: 1.3; }
.blog-card__excerpt { color: var(--color-text-soft); font-size: 0.94rem; flex: 1; }
.blog-card__more { color: var(--color-primary); font-weight: 600; font-size: 0.9rem; }

/* ---------- Pagination ---------- */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 44px; flex-wrap: wrap; }
.pagination__link {
  min-width: 42px; height: 42px; display: grid; place-items: center;
  padding: 0 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--color-border); background: #fff;
  font-weight: 600; color: var(--color-text-soft);
  transition: border-color var(--transition), color var(--transition);
}
.pagination__link:hover { border-color: var(--color-primary); color: var(--color-primary); }
.pagination__link.is-current { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* ---------- Single article ---------- */
.post-wrap { max-width: 760px; }
.post-title { font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1.15; margin: 8px 0 16px; letter-spacing: -0.02em; }
.post-meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--color-text-faint); font-size: 0.9rem; margin-bottom: 28px; }
.post-cover { border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--color-border); margin-bottom: 32px; }
.post-cover img { width: 100%; display: block; }

/* Article body typography */
.post-content { font-size: 1.08rem; line-height: 1.8; color: #1f2a3d; }
.post-content h2 { font-size: 1.6rem; margin: 36px 0 14px; }
.post-content h3 { font-size: 1.3rem; margin: 28px 0 12px; }
.post-content p { margin-bottom: 18px; }
.post-content ul, .post-content ol { margin: 0 0 18px 22px; }
.post-content li { margin-bottom: 8px; }
.post-content a { color: var(--color-primary); text-decoration: underline; }
.post-content img { max-width: 100%; height: auto; border-radius: var(--radius-md); margin: 20px 0; }
.post-content blockquote {
  margin: 22px 0; padding: 14px 22px;
  border-left: 4px solid var(--color-primary);
  background: var(--color-primary-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--color-text-soft); font-style: italic;
}
.post-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }

/* =========================================================
   Admin panel
   ========================================================= */
body.admin { background: var(--color-surface-alt); }

.admin-topbar { background: #fff; border-bottom: 1px solid var(--color-border); position: sticky; top: 0; z-index: 100; }
.admin-topbar__in { max-width: 1000px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.admin-topbar__actions { display: flex; gap: 10px; }

.admin-main { max-width: 1000px; margin: 0 auto; padding: 34px 20px 80px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.admin-head h1 { font-size: 1.6rem; }
.admin-head p { color: var(--color-text-faint); font-size: 0.9rem; margin-top: 2px; }

.admin-empty { text-align: center; background: #fff; border: 1px dashed var(--color-border); border-radius: var(--radius-md); padding: 50px 20px; }
.admin-empty p { color: var(--color-text-soft); margin-bottom: 18px; }

/* Post list */
.admin-table { display: flex; flex-direction: column; gap: 12px; }
.admin-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 16px 20px; flex-wrap: wrap; }
.admin-row__title { font-weight: 600; font-family: var(--font-display); display: block; }
.admin-row__meta { font-size: 0.82rem; color: var(--color-text-faint); display: flex; align-items: center; gap: 8px; margin-top: 3px; }
.admin-row__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.badge { font-size: 0.68rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.04em; }
.badge--live { background: #ecfdf3; color: #087443; }
.badge--draft { background: #fef3c7; color: #92600a; }

/* Auth (login / setup) */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 30px 20px; }
.auth-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 38px 34px; }
.auth-card h1 { font-size: 1.5rem; margin-bottom: 6px; }
.auth-sub { color: var(--color-text-soft); font-size: 0.92rem; margin-bottom: 22px; }
.auth-card label, .post-form label.fld { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 16px; color: var(--color-text); }
.auth-card input, .post-form input[type="text"], .post-form input[type="password"], .post-form input[type="file"], .post-form textarea, .post-form select {
  width: 100%; margin-top: 7px; font-family: var(--font-sans); font-size: 1rem;
  padding: 12px 14px; border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  color: var(--color-text); background: #fff; font-weight: 400;
}
.auth-card input:focus, .post-form input:focus, .post-form textarea:focus, .post-form select:focus {
  outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.auth-card .btn { width: 100%; margin-top: 6px; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: 0.92rem; font-weight: 500; }
.alert--error { background: #fef2f2; color: #b42318; border: 1px solid #fbd5d5; }
.alert--ok { background: #ecfdf3; color: #087443; border: 1px solid #bbf7d0; }

/* Post form */
.post-form { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 28px; }
.fld-note { font-size: 0.8rem; color: var(--color-text-faint); font-weight: 400; }
.fld-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.post-form__actions { display: flex; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
#editor { background: #fff; min-height: 320px; border-radius: 0 0 var(--radius-sm) var(--radius-sm); font-size: 1.02rem; }
.ql-toolbar.ql-snow, .ql-container.ql-snow { border-color: var(--color-border); }

@media (max-width: 560px) {
  .fld-row { grid-template-columns: 1fr; }
  .admin-row { flex-direction: column; align-items: flex-start; }
}
