/* =========================================================
   SeniorTravelWithUs — design system
   Warm, calm and highly readable (large type, strong contrast)
   ========================================================= */

:root {
  --bg: #fbf8f3;
  --bg-alt: #f3ece1;
  --surface: #ffffff;
  --ink: #1b2a2f;
  --ink-soft: #33454b;
  --muted: #5d6e73;
  --line: #e8e0d3;
  --primary: #0e5e6f;
  --primary-strong: #0a4a58;
  --primary-ink: #ffffff;
  --primary-soft: #e1eff1;
  --accent: #e07a5f;
  --accent-strong: #c9644a;
  --accent-soft: #fbe7e0;
  --gold: #e9b949;
  --ok: #2f855a;
  --danger: #c53030;
  --dark: #10262c;

  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --shadow-sm: 0 2px 8px -2px rgba(27, 42, 47, 0.08);
  --shadow: 0 14px 34px -14px rgba(27, 42, 47, 0.22);
  --shadow-lg: 0 30px 60px -24px rgba(27, 42, 47, 0.35);

  --font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-sans: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

:root[data-theme='dark'] {
  --bg: #0e171a;
  --bg-alt: #132025;
  --surface: #182830;
  --ink: #eef3f2;
  --ink-soft: #cfdadb;
  --muted: #9fb1b4;
  --line: #243840;
  --primary: #5cc3d2;
  --primary-strong: #82d4df;
  --primary-ink: #062a31;
  --primary-soft: #133840;
  --accent: #f2937a;
  --accent-strong: #f6a893;
  --accent-soft: #3b2521;
  --dark: #0a1417;
  --shadow: 0 14px 34px -14px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 30px 60px -24px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0e171a;
    --bg-alt: #132025;
    --surface: #182830;
    --ink: #eef3f2;
    --ink-soft: #cfdadb;
    --muted: #9fb1b4;
    --line: #243840;
    --primary: #5cc3d2;
    --primary-strong: #82d4df;
    --primary-ink: #062a31;
    --primary-soft: #133840;
    --accent: #f2937a;
    --accent-strong: #f6a893;
    --accent-soft: #3b2521;
    --dark: #0a1417;
    --shadow: 0 14px 34px -14px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 30px 60px -24px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}

/* Text size levels — generous by default for comfortable reading */
html { font-size: 112.5%; }            /* 18px */
html[data-size='sm'] { font-size: 100%; }
html[data-size='lg'] { font-size: 125%; }
html[data-size='xl'] { font-size: 137.5%; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }
h1, h2, h3, h4 { font-family: var(--font-serif); line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; color: var(--ink); font-weight: 600; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: #fff; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -100px; background: var(--primary); color: var(--primary-ink); padding: 0.6rem 1rem; border-radius: 10px; z-index: 1000; }
.skip-link:focus { top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  --b: var(--primary);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  padding: 0.85em 1.5em; border-radius: 999px; border: 2px solid transparent;
  font-weight: 800; font-size: 1rem; line-height: 1.1; text-decoration: none; cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s, box-shadow 0.25s, color 0.25s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--primary); color: var(--primary-ink); box-shadow: 0 10px 22px -12px var(--primary); }
.btn--primary:hover { background: var(--primary-strong); color: var(--primary-ink); }
.btn--accent { background: var(--accent); color: #fff; box-shadow: 0 10px 22px -10px var(--accent); }
.btn--accent:hover { background: var(--accent-strong); color: #fff; }
.btn--ghost { background: rgba(255, 255, 255, 0.14); color: #fff; border-color: rgba(255, 255, 255, 0.45); backdrop-filter: blur(6px); }
.btn--ghost:hover { background: #fff; color: var(--ink); }
.btn--ghost-dark { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost-dark:hover { border-color: var(--primary); color: var(--primary); }
.btn--danger { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.btn--danger:hover { background: var(--danger); color: #fff; }
.btn--sm { padding: 0.6em 1.1em; font-size: 0.9rem; }
.btn--xs { padding: 0.4em 0.85em; font-size: 0.8rem; }
.btn--lg { padding: 1em 1.8em; font-size: 1.05rem; }
.btn--block { width: 100%; }

.link-arrow { font-weight: 800; text-decoration: none; display: inline-flex; align-items: center; gap: 0.35em; }
.link-arrow span { transition: transform 0.25s var(--ease); }
.link-arrow:hover span { transform: translateX(4px); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-size: 0.8rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-strong);
  margin-bottom: 0.6rem;
}
.eyebrow--light { color: #ffd9cc; }
.eyebrow__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(224, 122, 95, 0.3); }

.pill {
  display: inline-block; padding: 0.3em 0.85em; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary); font-size: 0.78rem; font-weight: 800;
  letter-spacing: 0.02em; text-decoration: none;
}
.pill--float { position: absolute; left: 1rem; top: 1rem; background: rgba(255, 255, 255, 0.92); color: #0e5e6f; backdrop-filter: blur(6px); }
.pill--draft { background: #fdf0c4; color: #7a5b00; }
.pill--ok { background: #dcf3e5; color: var(--ok); }
.pill--star { background: var(--accent-soft); color: var(--accent-strong); }

.avatar {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--gold)); color: #fff;
  font-family: var(--font-serif); font-weight: 700; font-size: 1.1rem;
}
.avatar--lg { width: 64px; height: 64px; font-size: 1.6rem; }

.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45em; font-size: 0.88rem; color: var(--muted); }
.meta__sep { opacity: 0.5; }

/* ---------- Admin bar ---------- */
.admin-bar { background: var(--dark); color: #e8f0f1; font-size: 0.85rem; }
.admin-bar__inner { display: flex; justify-content: space-between; align-items: center; min-height: 40px; gap: 1rem; }
.admin-bar__label { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; }
.admin-bar .dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.25); }
.admin-bar nav { display: flex; gap: 1.2rem; align-items: center; }
.admin-bar a, .admin-bar button { color: #e8f0f1; text-decoration: none; background: none; border: 0; cursor: pointer; padding: 0; font-weight: 700; }
.admin-bar a:hover, .admin-bar button:hover { color: var(--gold); }
.admin-bar form { margin: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: var(--shadow-sm); }
.site-header__inner { display: flex; align-items: center; gap: 1.5rem; min-height: 76px; }

.logo { display: inline-flex; align-items: center; gap: 0.65rem; text-decoration: none; color: var(--ink); flex: none; }
.logo:hover { color: var(--ink); }
.logo__mark { transition: transform 0.4s var(--ease); }
.logo:hover .logo__mark { transform: rotate(-8deg) scale(1.05); }
.logo__text { font-family: var(--font-serif); font-weight: 700; font-size: 1.28rem; letter-spacing: -0.02em; }
.logo__text em { color: var(--accent-strong); font-weight: 500; margin-left: 1px; }
.logo--light, .logo--light:hover { color: #fff; }
.logo--light .logo__text em { color: #ffb59f; }

.main-nav { margin-left: auto; }
.main-nav > ul { display: flex; gap: 0.3rem; list-style: none; margin: 0; padding: 0; align-items: center; }
.main-nav a, .main-nav button {
  display: inline-flex; align-items: center; gap: 0.3em;
  padding: 0.5em 0.9em; border-radius: 999px; background: none; border: 0; cursor: pointer;
  color: var(--ink-soft); font-weight: 700; text-decoration: none; font-size: 0.98rem;
  transition: background 0.2s, color 0.2s;
}
.main-nav a:hover, .main-nav button:hover { background: var(--primary-soft); color: var(--primary); }
.main-nav a.active, .main-nav button.active { color: var(--primary); background: var(--primary-soft); }

.header-tools { display: flex; align-items: center; gap: 0.5rem; }
.size-switch { display: flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
.size-switch button { background: none; border: 0; padding: 0.35em 0.7em; cursor: pointer; font-weight: 800; font-family: var(--font-serif); color: var(--ink-soft); }
.size-switch button + button { border-left: 1.5px solid var(--line); font-size: 1.1em; }
.size-switch button:hover { background: var(--primary-soft); color: var(--primary); }
.size-switch sup { font-size: 0.65em; }
.icon-btn {
  width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 50%;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-soft); cursor: pointer; transition: all 0.2s;
}
.icon-btn:hover { color: var(--primary); border-color: var(--primary); }
.i-moon { display: none; }
:root[data-theme='dark'] .i-sun { display: none; }
:root[data-theme='dark'] .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .i-sun { display: none; }
  :root:not([data-theme='light']) .i-moon { display: block; }
}

.menu-toggle { display: none; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.menu-toggle span { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
.menu-toggle[aria-expanded='true'] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded='true'] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 980px) {
  .menu-toggle { display: inline-flex; }
  .main-nav {
    position: fixed; inset: 76px 0 auto 0; margin: 0; padding: 1rem var(--gutter) 1.5rem;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    max-height: calc(100vh - 76px); overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all 0.3s var(--ease);
  }
  .main-nav.open { opacity: 1; visibility: visible; transform: none; }
  .main-nav > ul { flex-direction: column; align-items: stretch; gap: 0.2rem; }
  .main-nav a, .main-nav button { width: 100%; padding: 0.8em 1em; font-size: 1.08rem; justify-content: space-between; }
  .header-tools { margin-left: auto; }
}
@media (max-width: 640px) {
  .hide-sm { display: none; }
  .size-switch { display: none; }
  .logo__text { font-size: 1.1rem; }
  .logo__mark { width: 36px; height: 36px; }
}
@media (max-width: 380px) { .logo__text { font-size: 0.98rem; } }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 1.5rem; translate: -50% 0; z-index: 200;
  padding: 0.9rem 1.4rem; border-radius: 14px; background: var(--dark); color: #fff; font-weight: 700;
  box-shadow: var(--shadow-lg); animation: toast-in 0.5s var(--ease); max-width: calc(100% - 32px);
}
.toast--success { background: #1f6f4a; }
.toast--error { background: var(--danger); }
.toast.hide { opacity: 0; transform: translateY(10px); transition: all 0.4s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(20px); } }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; min-height: min(88vh, 780px); display: flex; align-items: center; overflow: hidden; isolation: isolate; margin-top: -76px; padding-top: 76px; }
.hero__bg { position: absolute; inset: 0; z-index: -1; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; animation: slow-zoom 24s ease-out both; }
.hero__bg::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(8, 32, 38, 0.88) 0%, rgba(8, 32, 38, 0.6) 45%, rgba(8, 32, 38, 0.15) 100%),
    linear-gradient(0deg, rgba(8, 32, 38, 0.5), transparent 40%);
}
@keyframes slow-zoom { from { transform: scale(1.12); } to { transform: scale(1); } }
.hero__inner { padding-top: 4rem; padding-bottom: 7rem; }
.hero__content > * { animation: rise 0.9s var(--ease) both; }
.hero__content > *:nth-child(2) { animation-delay: 0.08s; }
.hero__content > *:nth-child(3) { animation-delay: 0.16s; }
.hero__content > *:nth-child(4) { animation-delay: 0.24s; }
.hero__content > *:nth-child(5) { animation-delay: 0.32s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
.hero__title { color: #fff; font-size: clamp(2.6rem, 7vw, 5rem); font-weight: 600; line-height: 1.02; margin-bottom: 1.2rem; letter-spacing: -0.025em; }
.hero__title em { font-style: italic; font-weight: 400; color: #ffc3b1; }
.hero__lead { font-size: clamp(1.08rem, 1.6vw, 1.3rem); max-width: 36ch; color: rgba(255, 255, 255, 0.9); margin-bottom: 2rem; }
.hero__search {
  display: flex; align-items: center; gap: 0.6rem; max-width: 600px;
  background: #fff; color: #1b2a2f; border-radius: 999px; padding: 0.45rem 0.45rem 0.45rem 1.3rem;
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
}
.hero__search svg { color: #5d6e73; flex: none; }
.hero__search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; padding: 0.6rem 0; color: #1b2a2f; font-size: 1rem; }
.hero__search input::placeholder { color: #7b8a8e; }
.hero__chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.2rem; align-items: center; font-size: 0.9rem; }
.hero__chips span { color: rgba(255, 255, 255, 0.75); font-weight: 700; }
.hero__chips a { color: #fff; text-decoration: none; padding: 0.3em 0.9em; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 999px; backdrop-filter: blur(6px); background: rgba(255, 255, 255, 0.08); transition: background 0.2s; }
.hero__chips a:hover { background: rgba(255, 255, 255, 0.25); color: #fff; }
.hero__wave { position: absolute; left: 0; right: 0; bottom: -2px; height: 72px; line-height: 0; }
.hero__wave svg { width: 100%; height: 100%; display: block; }

@media (max-width: 860px) { .hero__inner { padding-bottom: 6rem; } }
@media (max-width: 520px) {
  .hero__search { flex-wrap: wrap; border-radius: 22px; padding: 0.6rem; }
  .hero__search svg { display: none; }
  .hero__search input { padding: 0.6rem 0.7rem; flex-basis: 100%; }
  .hero__search .btn { width: 100%; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section.container { padding-left: var(--gutter); padding-right: var(--gutter); }
.section--tint { background: var(--bg-alt); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 2.2rem; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head--center { justify-content: center; text-align: center; }

/* ---------- Featured ---------- */
.featured {
  display: grid; grid-template-columns: 1.15fr 1fr; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow);
}
.featured__media { position: relative; overflow: hidden; min-height: 380px; background: var(--bg-alt); }
.featured__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.featured:hover .featured__media img { transform: scale(1.05); }
.featured__body { padding: clamp(1.8rem, 4vw, 3.2rem); display: flex; flex-direction: column; align-items: flex-start; gap: 1.1rem; justify-content: center; }
.featured__title { font-size: clamp(1.7rem, 3vw, 2.4rem); margin: 0; }
.featured__title a, .card__title a { color: inherit; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size 0.4s var(--ease); }
.featured__title a:hover, .card__title a:hover { background-size: 100% 2px; color: inherit; }
.featured__excerpt { color: var(--muted); font-size: 1.08rem; margin: 0; }
.byline { display: flex; align-items: center; gap: 0.8rem; }
.byline strong { display: block; line-height: 1.3; }
.byline .meta { font-size: 0.85rem; }
@media (max-width: 860px) {
  .featured { grid-template-columns: 1fr; }
  .featured__media { min-height: 260px; aspect-ratio: 16 / 10; }
}

/* ---------- Cards ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.8rem; }
@media (max-width: 980px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }
.card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card__media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-alt); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.card:hover .card__media img { transform: scale(1.07); }
.card__placeholder { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft)); }
.card__placeholder svg { width: 64px; height: 64px; opacity: 0.8; }
.card__body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.card__title { font-size: 1.32rem; margin: 0; line-height: 1.25; }
.card__excerpt { color: var(--muted); font-size: 0.95rem; margin: 0; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .link-arrow { margin-top: 0.4rem; font-size: 0.95rem; }

/* ---------- Newsletter ---------- */
.newsletter { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.newsletter__box {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.5rem; align-items: center;
  padding: clamp(2rem, 5vw, 3.8rem); border-radius: var(--radius-lg); color: #fff;
  background: linear-gradient(125deg, #0a4a58 0%, #0e5e6f 50%, #1b7a86 100%);
  box-shadow: var(--shadow-lg);
}
.newsletter__deco { position: absolute; inset: 0; z-index: -1; opacity: 0.9;
  background:
    radial-gradient(circle at 92% 12%, rgba(233, 185, 73, 0.45), transparent 28%),
    radial-gradient(circle at 75% 110%, rgba(224, 122, 95, 0.55), transparent 38%);
}
.newsletter h2 { color: #fff; font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
.newsletter__text p { color: rgba(255, 255, 255, 0.85); margin: 0; }
.newsletter__row { display: flex; gap: 0.5rem; background: #fff; padding: 0.45rem; border-radius: 999px; }
.newsletter__row input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; padding: 0.6rem 1rem; color: #1b2a2f; }
.newsletter__msg { min-height: 1.5em; margin: 0.7rem 0 0 1rem; font-weight: 700; color: #ffe2b0; font-size: 0.95rem; }
@media (max-width: 860px) { .newsletter__box { grid-template-columns: 1fr; gap: 1.5rem; } }
@media (max-width: 520px) {
  .newsletter__row { flex-direction: column; border-radius: 20px; }
  .newsletter__row .btn { width: 100%; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: #b9cacd; padding: 4.5rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; }
.footer-brand p { margin: 1.1rem 0 1.4rem; max-width: 34ch; font-size: 0.95rem; }
.site-footer h4 { color: #fff; font-family: var(--font-sans); font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 800; margin-bottom: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.55rem; font-size: 0.95rem; }
.site-footer a { color: #d8e3e5; text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.site-footer .muted { color: #8aa0a4; }
.socials { display: flex; gap: 0.6rem; }
.socials a { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.08); transition: all 0.25s; }
.socials a:hover { background: var(--accent); color: #fff; transform: translateY(-3px); }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-top: 1px solid rgba(255, 255, 255, 0.1); margin-top: 3rem; padding-top: 1.5rem; font-size: 0.88rem; }
.footer-bottom p { margin: 0; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Page hero ---------- */
.page-hero {
  padding: clamp(3rem, 7vw, 5rem) 0 clamp(2.5rem, 5vw, 3.5rem);
  background:
    radial-gradient(circle at 85% 0%, var(--accent-soft), transparent 40%),
    radial-gradient(circle at 0% 100%, var(--primary-soft), transparent 45%);
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { margin-bottom: 0.3em; }
.page-hero p { color: var(--muted); font-size: 1.12rem; max-width: 60ch; }
.breadcrumbs { font-size: 0.88rem; color: var(--muted); margin-bottom: 1rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.breadcrumbs a { color: inherit; text-decoration: none; font-weight: 700; }
.breadcrumbs a:hover { color: var(--accent-strong); }
.search-inline {
  display: flex; align-items: center; gap: 0.6rem; max-width: 560px; margin-top: 1.6rem;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px; padding: 0.35rem 0.35rem 0.35rem 1.1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-inline:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.search-inline svg { color: var(--muted); flex: none; }
.search-inline input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; padding: 0.5rem 0; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.3rem; }
.chip {
  padding: 0.4em 1em; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface);
  color: var(--ink-soft); text-decoration: none; font-weight: 700; font-size: 0.9rem; transition: all 0.2s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip--active { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.chip--active:hover { color: var(--primary-ink); }

.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.5rem; margin-top: 3rem; }
.pagination a {
  min-width: 48px; height: 48px; padding: 0 1rem; display: inline-grid; place-items: center; border-radius: 999px;
  border: 1.5px solid var(--line); text-decoration: none; font-weight: 800; color: var(--ink-soft); background: var(--surface);
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination a.current { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }

.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty svg { margin: 0 auto 1rem; color: var(--accent); }

/* ---------- Article ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 100; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--gold)); }

.article-hero { position: relative; color: #fff; isolation: isolate; padding: clamp(5rem, 14vw, 10rem) 0 clamp(2.5rem, 6vw, 4rem); overflow: hidden; }
.article-hero__bg { position: absolute; inset: 0; z-index: -1; }
.article-hero__bg img { width: 100%; height: 100%; object-fit: cover; animation: slow-zoom 20s ease-out both; }
.article-hero__bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(8, 28, 33, 0.92) 0%, rgba(8, 28, 33, 0.55) 55%, rgba(8, 28, 33, 0.25) 100%); }
.article-hero--plain { background: linear-gradient(125deg, #0a4a58, #0e5e6f 60%, #1b7a86); }
.article-hero__inner { max-width: 920px; }
.article-hero h1 { color: #fff; font-size: clamp(2.1rem, 5.2vw, 3.6rem); margin-bottom: 0.4em; }
.article-hero__lead { font-size: clamp(1.08rem, 1.8vw, 1.3rem); color: rgba(255, 255, 255, 0.88); max-width: 60ch; }
.article-hero .breadcrumbs { color: rgba(255, 255, 255, 0.8); }
.article-hero .breadcrumbs a:hover { color: #ffc3b1; }
.byline--light .meta { color: rgba(255, 255, 255, 0.8); }
.byline--light .btn { margin-left: auto; }
.article-hero .pill--draft { margin-bottom: 1rem; }

.article-layout { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 2.5rem; max-width: 920px; padding-top: 3rem; padding-bottom: 2rem; }
.share { position: sticky; top: 110px; align-self: start; display: flex; flex-direction: column; align-items: center; gap: 0.6rem; }
.share__label { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.share a, .share button {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--line); color: var(--ink-soft); transition: all 0.25s;
}
.share a:hover, .share button:hover { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); transform: translateY(-2px); }
.share button.copied { background: var(--ok); border-color: var(--ok); color: #fff; }
@media (max-width: 760px) {
  .article-layout { grid-template-columns: 1fr; gap: 1.5rem; }
  .share { position: static; flex-direction: row; order: 2; justify-content: center; flex-wrap: wrap; }
}

.prose { font-size: 1.12rem; line-height: 1.85; color: var(--ink-soft); }
.prose > *:first-child { margin-top: 0; }
.prose > p:first-of-type::first-letter {
  float: left; font-family: var(--font-serif); font-size: 4.1em; line-height: 0.8; font-weight: 600;
  margin: 0.08em 0.12em 0 0; color: var(--accent-strong);
}
.prose h2 { font-size: clamp(1.6rem, 3vw, 2.05rem); margin: 2.2em 0 0.6em; color: var(--ink); }
.prose h3 { font-size: 1.4rem; margin: 1.8em 0 0.5em; color: var(--ink); }
.prose p, .prose ul, .prose ol { margin: 0 0 1.3em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: 0.45em; }
.prose li::marker { color: var(--accent); font-weight: 800; }
.prose strong { color: var(--ink); }
.prose img { border-radius: var(--radius); margin: 2rem 0; width: 100%; box-shadow: var(--shadow); }
.prose blockquote {
  margin: 2rem 0; padding: 1.4rem 1.6rem; border-left: 5px solid var(--accent); background: var(--accent-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-family: var(--font-serif); font-style: italic; font-size: 1.22rem; color: var(--ink);
}
.prose blockquote p:last-child { margin: 0; }
.prose hr { border: 0; height: 2px; background: var(--line); margin: 3rem 0; }
.prose code { background: var(--bg-alt); padding: 0.15em 0.4em; border-radius: 6px; font-size: 0.9em; }
.prose table { width: 100%; border-collapse: collapse; margin: 2rem 0; font-size: 0.98rem; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); text-align: left; }
.prose th { background: var(--primary-soft); color: var(--primary); }
.prose a { font-weight: 700; }

.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 2.5rem 0; }

/* ---------- About ---------- */
.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split__media { position: relative; }
.split__media img { border-radius: var(--radius-lg); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; box-shadow: var(--shadow-lg); }
.split__badge {
  position: absolute; right: -1rem; bottom: 2rem; background: var(--surface); border-radius: var(--radius);
  padding: 1rem 1.3rem; box-shadow: var(--shadow-lg); display: grid; border: 1px solid var(--line);
}
.split__badge strong { font-family: var(--font-serif); font-size: 1.5rem; color: var(--accent-strong); }
.split__badge span { color: var(--muted); font-size: 0.9rem; }
.split__text p { color: var(--muted); font-size: 1.06rem; }
.checklist { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 0.7rem; }
.checklist li { display: flex; gap: 0.7rem; align-items: flex-start; font-weight: 700; }
.checklist li::before { content: '✓'; flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-size: 0.85rem; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split__media img { aspect-ratio: 4 / 3; } .split__badge { right: 1rem; } }


/* ---------- Forms ---------- */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.5rem, 4vw, 2.6rem); box-shadow: var(--shadow); }

.form { display: grid; gap: 1.1rem; }
label { display: grid; gap: 0.4rem; font-weight: 700; font-size: 0.95rem; color: var(--ink-soft); }
input[type='text'], input[type='email'], input[type='password'], input[type='url'], input[type='date'], textarea, select {
  width: 100%; padding: 0.85rem 1rem; border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg);
  font-weight: 400; transition: border-color 0.2s, box-shadow 0.2s; color: var(--ink);
}
.hero__search input, .search-inline input, .newsletter__row input { width: auto; padding-left: 0; padding-right: 0; border: 0; box-shadow: none; }
.newsletter__row input { padding: 0.6rem 1rem; background: none; color: #1b2a2f; }
.hero__search input { background: none; color: #1b2a2f; }
.search-inline input { background: none; }
input:focus, textarea:focus, select:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.hero__search input:focus, .search-inline input:focus, .newsletter__row input:focus { box-shadow: none; }
textarea { resize: vertical; min-height: 120px; line-height: 1.6; }
.alert { padding: 0.9rem 1.1rem; border-radius: 12px; font-weight: 700; margin-bottom: 1rem; }
.alert--error { background: #fde8e8; color: #9b1c1c; }
:root[data-theme='dark'] .alert--error { background: #3b1818; color: #fca5a5; }
.success { text-align: center; padding: 2rem 0; }
.success__icon { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 1rem; background: #dcf3e5; color: var(--ok); font-size: 2rem; font-weight: 800; }

/* ---------- 404 ---------- */
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 5rem 0; }
.notfound__code { font-family: var(--font-serif); font-size: clamp(6rem, 18vw, 11rem); line-height: 1; font-weight: 700; background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; display: block; }
.notfound p { color: var(--muted); max-width: 48ch; margin: 0 auto 2rem; }
.notfound__actions { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   Admin
   ========================================================= */
.auth { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.auth__art { position: relative; overflow: hidden; }
.auth__art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.auth__art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(8, 32, 38, 0.85), rgba(8, 32, 38, 0.1)); }
.auth__quote { position: absolute; left: 3rem; right: 3rem; bottom: 3rem; z-index: 1; color: #fff; }
.auth__quote p { font-family: var(--font-serif); font-size: 1.6rem; font-style: italic; line-height: 1.4; }
.auth__panel { display: flex; flex-direction: column; justify-content: center; gap: 0.8rem; padding: clamp(2rem, 6vw, 5rem); max-width: 560px; width: 100%; margin: 0 auto; }
.auth__panel h1 { margin: 2rem 0 0; font-size: 2.4rem; }
.auth__panel .form { margin: 1rem 0 1.5rem; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth__art { display: none; } }

.admin-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.admin-head h1 { margin: 0.2rem 0 0; font-size: clamp(2rem, 4vw, 2.6rem); }
.admin-head__actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 2rem; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem; }
.kpi span { color: var(--muted); font-weight: 700; font-size: 0.88rem; }
.kpi strong { display: block; font-family: var(--font-serif); font-size: 2.2rem; line-height: 1.2; color: var(--primary); }
@media (max-width: 560px) { .kpis { grid-template-columns: 1fr; } }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; margin-bottom: 1.5rem; }
.panel h3 { font-family: var(--font-sans); font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 800; margin-bottom: 1rem; }
.panel > label + label, .panel > .switch + label { margin-top: 0.9rem; }
.panel__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.panel__head h2 { margin: 0; font-size: 1.4rem; }
.table-wrap { overflow-x: auto; margin: 0 -1.4rem -1.4rem; }
.table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.table th { text-align: left; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 0.8rem 1.4rem; border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.table td { padding: 0.9rem 1.4rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: color-mix(in srgb, var(--primary-soft) 40%, transparent); }
.t-right { text-align: right !important; }
.t-post { display: flex; align-items: center; gap: 0.9rem; min-width: 260px; }
.t-post img, .t-post__ph { width: 64px; height: 44px; border-radius: 8px; object-fit: cover; flex: none; background: var(--bg-alt); }
.t-post a { font-weight: 800; color: var(--ink); text-decoration: none; line-height: 1.3; }
.t-post a:hover { color: var(--primary); }
.table .pill { margin: 0.1rem 0.2rem 0.1rem 0; }
form.inline { display: inline; }

.subs { list-style: none; padding: 0; margin: 0; }
.subs { max-height: 420px; overflow-y: auto; }
.subs li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--line); font-size: 0.92rem; }

.editor__grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.5rem; align-items: start; }
@media (max-width: 1000px) { .editor__grid { grid-template-columns: 1fr; } }
.editor__title { width: 100%; border: 0 !important; background: none !important; box-shadow: none !important; padding: 0 !important; font-family: var(--font-serif); font-size: clamp(1.8rem, 4vw, 2.6rem) !important; font-weight: 600; color: var(--ink); }
.editor__title::placeholder { color: var(--muted); opacity: 0.6; }
.editor__slug { display: flex; align-items: center; gap: 0.3rem; margin: 0.5rem 0 1.2rem; font-size: 0.9rem; }
.editor__slug input { padding: 0.35rem 0.6rem !important; font-size: 0.9rem; max-width: 420px; border-radius: 8px !important; }
.md { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.md__bar { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; flex-wrap: wrap; padding: 0.5rem; border-bottom: 1px solid var(--line); background: var(--bg-alt); position: sticky; top: 76px; z-index: 5; }
.md__tabs { display: flex; gap: 0.25rem; }
.md__tabs button, .md__tools button, .md__upload {
  background: none; border: 0; padding: 0.45em 0.8em; border-radius: 8px; cursor: pointer; font-weight: 700; font-size: 0.88rem; color: var(--ink-soft);
  display: inline-flex; align-items: center; gap: 0.3em;
}
.md__tabs button.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }
.md__tools { display: flex; flex-wrap: wrap; gap: 0.1rem; }
.md__tools button:hover, .md__upload:hover { background: var(--surface); color: var(--primary); }
.md__input { border: 0 !important; border-radius: 0 !important; box-shadow: none !important; min-height: 520px; padding: 1.4rem !important; font-size: 1.02rem; line-height: 1.8; background: var(--surface) !important; font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; }
.md__preview { padding: 1.4rem 1.8rem; min-height: 520px; }
.md__foot { padding: 0.5rem 1rem; border-top: 1px solid var(--line); font-size: 0.82rem; background: var(--bg-alt); }
.md.is-uploading .md__upload { opacity: 0.5; pointer-events: none; }

.switch { display: flex; align-items: center; gap: 0.7rem; cursor: pointer; font-weight: 700; margin-bottom: 0.8rem; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch span { position: relative; width: 44px; height: 26px; border-radius: 999px; background: var(--line); flex: none; transition: background 0.2s; }
.switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform 0.25s var(--ease); }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

.cover-preview { aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; background: var(--bg-alt); display: grid; place-items: center; color: var(--muted); font-size: 0.9rem; margin-bottom: 0.8rem; border: 1.5px dashed var(--line); }
.cover-preview img { width: 100%; height: 100%; object-fit: cover; }
.file-btn { margin-bottom: 0.9rem; display: flex; }

/* ---------- Transparent header over the home hero ---------- */
.home .site-header:not(.is-scrolled) { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
@media (min-width: 981px) {
  .home .site-header:not(.is-scrolled) .main-nav > ul > li > a,
  .home .site-header:not(.is-scrolled) .main-nav > ul > li > button { color: rgba(255, 255, 255, 0.92); }
  .home .site-header:not(.is-scrolled) .main-nav > ul > li > a:hover,
  .home .site-header:not(.is-scrolled) .main-nav > ul > li > button:hover,
  .home .site-header:not(.is-scrolled) .main-nav > ul > li > a.active { background: rgba(255, 255, 255, 0.16); color: #fff; }
}
.home .site-header:not(.is-scrolled) .logo { color: #fff; }
.home .site-header:not(.is-scrolled) .logo__text em { color: #ffb59f; }
.home .site-header:not(.is-scrolled) .size-switch { border-color: rgba(255, 255, 255, 0.35); }
.home .site-header:not(.is-scrolled) .size-switch button { color: #fff; }
.home .site-header:not(.is-scrolled) .size-switch button + button { border-color: rgba(255, 255, 255, 0.35); }
.home .site-header:not(.is-scrolled) .size-switch button:hover { background: rgba(255, 255, 255, 0.16); }
.home .site-header:not(.is-scrolled) .icon-btn { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.35); color: #fff; }
.home .site-header:not(.is-scrolled):has(.main-nav.open) { background: var(--bg); }
.home .site-header:not(.is-scrolled):has(.main-nav.open) .logo { color: var(--ink); }
.home .site-header:not(.is-scrolled):has(.main-nav.open) .icon-btn { color: var(--ink-soft); border-color: var(--line); background: var(--surface); }

/* ---------- Email notifications (admin) ---------- */
.mail-status {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: 1rem 1.3rem; margin-bottom: 2rem; border-radius: var(--radius);
  background: var(--primary-soft); color: var(--ink-soft); font-size: 0.92rem;
}
.mail-status > div { display: grid; gap: 0.15rem; }
.mail-status strong { color: var(--ink); }
.mail-status code { background: var(--surface); padding: 0.1em 0.4em; border-radius: 6px; font-size: 0.88em; }
.mail-status--warn { background: #fdf0c4; color: #5c4600; }
.mail-status--warn strong { color: #3d2f00; }
:root[data-theme='dark'] .mail-status--warn { background: #3a3218; color: #f3e2a8; }
:root[data-theme='dark'] .mail-status--warn strong { color: #fff3c8; }
.mail-status__store { font-weight: 700; font-size: 0.82rem; opacity: 0.8; }
.notify-note { margin: 0 0 0.8rem; font-weight: 700; color: var(--ok); font-size: 0.92rem; }
.subs__email { word-break: break-all; }
.subs__meta { display: flex; align-items: center; gap: 0.5rem; flex: none; }
.icon-x { width: 28px; height: 28px; border-radius: 50%; border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 1.2rem; line-height: 1; }
.icon-x:hover { background: var(--accent-soft); color: var(--danger); }
.unsub { max-width: 560px; margin: 0 auto; text-align: center; }
.unsub h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.unsub p { margin-left: auto; margin-right: auto; }
.unsub form { margin: 1.5rem 0 0.5rem; }
.unsub__note { margin: 0; font-size: 0.9rem; }
.mail-status__side { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }

/* ---------- Destination tags ---------- */
.pill--tag, .chip--tag, .t-cap, .hero__chips a { text-transform: capitalize; }
.editor__hint { font-size: 0.85rem; margin: 0.5rem 0 0; }

/* Photo captions: an italic line right under an image in a story */
.prose p:has(> img:only-child) { margin: 0; }
.prose p:has(> img:only-child) + p > em:only-child { display: block; margin: -1.2rem 0 2rem; text-align: center; font-size: 0.92rem; color: var(--muted); }

/* ---------- Share bar (end of story) ---------- */
.share-bar {
  margin: 3rem 0 1rem; padding: clamp(1.4rem, 3vw, 2rem); border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.share-bar__head h2 { font-size: clamp(1.4rem, 2.6vw, 1.75rem); margin-bottom: 0.3rem; }
.share-bar__head p { color: var(--muted); margin: 0 0 1.3rem; }
.share-bar__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.7rem; }
.share-btn {
  --brand: var(--primary);
  display: flex; align-items: center; justify-content: center; gap: 0.55rem; min-height: 52px;
  padding: 0.7rem 1rem; border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg);
  color: var(--ink); font-weight: 800; font-size: 0.98rem; text-decoration: none; cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, color 0.2s;
}
.share-btn svg { color: var(--brand); flex: none; transition: color 0.2s; }
.share-btn:hover { background: var(--brand); border-color: var(--brand); color: #fff; transform: translateY(-2px); }
.share-btn:hover svg { color: #fff; }
.share-btn.copied { background: var(--ok); border-color: var(--ok); color: #fff; }
.share-btn.copied svg { color: #fff; }
.share-facebook { --brand: #1877f2; }
.share-whatsapp { --brand: #25d366; }
.share-x { --brand: #111; }
:root[data-theme='dark'] .share-x { --brand: #e7e9ea; }
.share-pinterest { --brand: #e60023; }
.share-linkedin { --brand: #0a66c2; }
.share-telegram { --brand: #26a5e4; }
.share-email { --brand: var(--accent-strong); }
.share-copy { --brand: var(--primary); }
.share-native {
  display: flex; align-items: center; justify-content: center; gap: 0.6rem; width: 100%; min-height: 58px;
  margin-bottom: 0.8rem; border: 0; border-radius: 14px; cursor: pointer;
  background: linear-gradient(120deg, var(--accent), #d62976 55%, #4f5bd5); color: #fff; font-weight: 800; font-size: 1.05rem;
}
.share-native[hidden] { display: none; }
.share-native small { font-weight: 600; opacity: 0.85; font-size: 0.82rem; }
.share a.share-facebook:hover { background: #1877f2; border-color: #1877f2; color: #fff; }
.share a.share-whatsapp:hover { background: #25d366; border-color: #25d366; color: #fff; }
.share a.share-pinterest:hover { background: #e60023; border-color: #e60023; color: #fff; }
@media (max-width: 760px) { .share { display: none; } }
@media (max-width: 420px) { .share-bar__grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Story hero slideshow (Ken Burns) ---------- */
.article-hero:has(.hero-slides) { min-height: min(82vh, 700px); display: flex; align-items: flex-end; }
.hero-slides .hero-slide {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.1); animation: none; transition: opacity 1.8s ease;
}
.hero-slides .hero-slide.is-active { opacity: 1; z-index: 1; }
.hero-slides .hero-slide.is-active,
.hero-slides .hero-slide.is-leaving { animation: ken-burns 9s linear forwards; }
.hero-slides .hero-slide:nth-child(even).is-active,
.hero-slides .hero-slide:nth-child(even).is-leaving { animation-name: ken-burns-alt; }
.hero-slides::after { z-index: 2; }
@keyframes ken-burns {
  from { transform: scale(1.16) translate(-2%, 1.5%); }
  to { transform: scale(1.07) translate(1.5%, -1%); }
}
@keyframes ken-burns-alt {
  from { transform: scale(1.07) translate(1.5%, 1%); }
  to { transform: scale(1.16) translate(-2%, -1.5%); }
}
.article-hero__inner { position: relative; z-index: 3; }
.hero-dots { position: absolute; z-index: 4; right: var(--gutter); bottom: 1.4rem; display: flex; gap: 0.45rem; }
.hero-dots button {
  width: 10px; height: 10px; padding: 0; border-radius: 999px; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, 0.5); transition: width 0.4s var(--ease), background 0.3s;
}
.hero-dots button:hover { background: rgba(255, 255, 255, 0.85); }
.hero-dots button.is-active { width: 30px; background: #fff; }
@media (max-width: 760px) { .hero-dots { left: 0; right: 0; justify-content: center; bottom: 0.9rem; } }

/* ---------- Home hero: small story cards on the left, intro + search on the right ---------- */
.hero { min-height: 100vh; min-height: 100svh; }
.hero__bg::after {
  background:
    linear-gradient(90deg, rgba(8, 32, 38, 0.55) 0%, rgba(8, 32, 38, 0.72) 55%, rgba(8, 32, 38, 0.6) 100%),
    linear-gradient(0deg, rgba(8, 32, 38, 0.55), transparent 45%);
}
.hero__inner {
  display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(2rem, 4.5vw, 4.5rem); align-items: center; padding-top: 2.5rem; padding-bottom: 6rem;
}
.hero__title { font-size: clamp(2.5rem, 5vw, 4.3rem); }
.hero__lead { max-width: 40ch; margin-bottom: 1.6rem; }
.hero__stories {
  order: -1; display: grid; gap: 0.45rem; padding: 1rem;
  background: rgba(8, 32, 38, 0.38); border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 24px;
  backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.7);
  animation: rise 0.9s var(--ease) 0.2s both;
}
.hero__stories-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.2rem 0.45rem 0.35rem; }
.hero__stories-head h2 {
  margin: 0; color: #ffd9cc; font-family: var(--font-sans); font-size: 0.8rem; font-weight: 800;
  letter-spacing: 0.14em; text-transform: uppercase;
}
.hero__stories-head a { color: #fff; font-weight: 800; font-size: 0.88rem; text-decoration: none; white-space: nowrap; }
.hero__stories-head a:hover { color: #ffc3b1; }
.mini-card {
  display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 0.95rem; align-items: center;
  padding: 0.55rem; border-radius: 16px; color: #fff; text-decoration: none;
  transition: background 0.25s, transform 0.3s var(--ease);
}
.mini-card:hover { background: rgba(255, 255, 255, 0.12); color: #fff; transform: translateX(4px); }
.mini-card__media {
  width: 116px; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden;
  display: grid; place-items: center; background: rgba(255, 255, 255, 0.1);
}
.mini-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.mini-card:hover .mini-card__media img { transform: scale(1.08); }
.mini-card__body { display: grid; gap: 0.2rem; min-width: 0; }
.mini-card__tag { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #ffc3b1; }
.mini-card__title {
  font-family: var(--font-serif); font-weight: 600; font-size: 1.08rem; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mini-card__meta { font-size: 0.8rem; color: rgba(255, 255, 255, 0.75); }
.hero__stories-empty { margin: 0.4rem; color: rgba(255, 255, 255, 0.85); }
.hero__stories-empty a { color: #fff; font-weight: 800; }
@media (max-width: 980px) {
  .hero__inner { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .hero__stories { order: 0; }
}
@media (max-width: 520px) {
  .mini-card { grid-template-columns: 92px minmax(0, 1fr); gap: 0.75rem; }
  .mini-card__media { width: 92px; }
}

/* ---------- Autopilot panel (admin) ---------- */
.autopilot { border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); }
.autopilot .panel__head { align-items: flex-start; }
.autopilot__intro { margin: 0.3rem 0 0; font-size: 0.92rem; max-width: 70ch; }
.ap-badge { flex: none; padding: 0.35em 0.9em; border-radius: 999px; font-weight: 800; font-size: 0.85rem; background: var(--bg-alt); color: var(--muted); }
.ap-badge--on { background: #dcf3e5; color: var(--ok); }
:root[data-theme='dark'] .ap-badge--on { background: #173a29; color: #6ee7a8; }
.ap-stats { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 0.8rem; margin: 0.4rem 0 1.2rem; }
.ap-stat { padding: 0.9rem 1rem; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); display: grid; gap: 0.15rem; }
.ap-stat span { font-size: 0.8rem; color: var(--muted); font-weight: 700; }
.ap-stat strong { font-size: 1.05rem; color: var(--ink); }
@media (max-width: 760px) { .ap-stats { grid-template-columns: 1fr 1fr; } .ap-stat--wide { grid-column: 1 / -1; } }
.ap-form { display: grid; grid-template-columns: 1fr 1.4fr; gap: 0.9rem 1.2rem; align-items: end; }
.ap-form .switch { grid-column: 1 / -1; margin: 0.2rem 0 0; }
.ap-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.ap-actions--secondary { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
@media (max-width: 640px) { .ap-form { grid-template-columns: 1fr; } }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }
.ap-title { margin: 1.5rem 0 0.6rem !important; }
.ap-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; font-size: 0.9rem; }
.ap-log li { display: grid; grid-template-columns: 9.5rem minmax(0, 14rem) minmax(0, 1fr); gap: 0.8rem; padding: 0.55rem 0.8rem; border-radius: 10px; background: var(--bg); border-left: 3px solid var(--line); }
.ap-log li.is-ok { border-left-color: var(--ok); }
.ap-log li.is-error { border-left-color: var(--danger); }
.ap-log__time { color: var(--muted); font-variant-numeric: tabular-nums; }
.ap-log__place { font-weight: 800; }
.ap-log__place small { font-weight: 600; color: var(--muted); }
.ap-log__result { min-width: 0; overflow-wrap: anywhere; }
.ap-log li:not(:has(.ap-log__place)) { grid-template-columns: 9.5rem minmax(0, 1fr); }
@media (max-width: 760px) { .ap-log li, .ap-log li:not(:has(.ap-log__place)) { grid-template-columns: 1fr; gap: 0.15rem; } }
select { width: 100%; padding: 0.8rem 1rem; border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); }
.ap-log li.is-warn { border-left-color: var(--gold); }

/* ---------- Home hero: brighter photo (Sahara) ---------- */
.home .hero__bg img { filter: saturate(1.08) contrast(1.03); }
.home .hero__bg::after {
  /* light shading only where text sits: top (menu), right (headline) and bottom (wave) */
  background:
    linear-gradient(180deg, rgba(8, 32, 38, 0.45) 0%, rgba(8, 32, 38, 0) 22%, rgba(8, 32, 38, 0) 70%, rgba(8, 32, 38, 0.35) 100%),
    linear-gradient(90deg, rgba(8, 32, 38, 0.05) 0%, rgba(8, 32, 38, 0.1) 45%, rgba(8, 32, 38, 0.5) 100%);
}
.home .hero__content { text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.35); }
.home .hero__search, .home .hero__chips a { text-shadow: none; }
.home .hero__chips a { background: rgba(8, 32, 38, 0.35); }
.home .hero__stories { background: rgba(8, 32, 38, 0.5); }
@media (max-width: 980px) {
  .home .hero__bg::after { background: linear-gradient(180deg, rgba(8, 32, 38, 0.5) 0%, rgba(8, 32, 38, 0.25) 40%, rgba(8, 32, 38, 0.55) 100%); }
}
.card[hidden] { display: none; }
