:root {
  --bg: #e8f0f4;
  --bg-alt: #f7fafb;
  --ink: #22343f;
  --muted: #607786;
  --navy: #1f3b57;
  --deck: #8e6159;
  --sea: #6d8fa9;
  --text-strong: var(--ink);
  --text-muted: var(--muted);
  --accent-strong: var(--navy);
  --line: rgba(31, 59, 87, 0.12);
  --white-strong: rgba(255, 255, 255, 0.88);
  --white-soft: rgba(255, 255, 255, 0.72);
  --button-blue-start: #72a4f2;
  --button-blue-end: #4f7fd0;
  --button-blue-shadow: rgba(79, 127, 208, 0.24);
  --shadow: 0 28px 60px rgba(35, 63, 82, 0.12);
  --radius: 30px;
  --shell: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top, rgba(109, 143, 169, 0.22), transparent 28%),
    linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 34%, #dfe8ed 100%);
  min-width: 320px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.14), transparent 28%),
    linear-gradient(90deg, transparent 0%, rgba(31, 59, 87, 0.028) 50%, transparent 100%);
}

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

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

button {
  font: inherit;
}

.site-shell {
  min-height: 100vh;
}

.shell {
  width: min(var(--shell), calc(100% - 2rem));
  margin: 0 auto;
}

.section-space {
  padding: 2.2rem 0 3rem;
}

.section-space--tight {
  padding-top: 0.5rem;
}

.glass {
  background: var(--white-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.glass--soft {
  background: var(--white-strong);
}

.eyebrow,
.status-feature span,
.status-item span,
.mini-card span,
.meta-label,
.quote-card span,
.timeline-card span,
.fact-card span {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sea);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(247, 250, 251, 0.78);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 82px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.brand__mark,
.overview-card__icon,
.bullet-stack__icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
}

.brand__mark {
  background: linear-gradient(180deg, var(--sea), var(--navy));
  color: white;
  font-weight: 700;
  box-shadow: 0 14px 28px rgba(31, 59, 87, 0.2);
}

.brand strong {
  display: block;
  font-size: 1.02rem;
}

.brand small {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
}

.brand span {
  min-width: 0;
}

.site-nav,
.footer-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.site-nav {
  justify-content: flex-end;
}

.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.flag-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 88px;
  justify-content: center;
  padding: 0.62rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  color: var(--navy);
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: 0 10px 22px rgba(31, 59, 87, 0.08);
  animation: flagFloat 2.8s ease-in-out infinite;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.flag-button:nth-child(2) {
  animation-delay: 0.35s;
}

.flag-button:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 16px 30px rgba(31, 59, 87, 0.16);
  border-color: rgba(31, 59, 87, 0.24);
}

.flag-button.is-active {
  background: linear-gradient(135deg, rgba(109, 143, 169, 0.18), rgba(31, 59, 87, 0.14));
  border-color: rgba(31, 59, 87, 0.24);
  box-shadow: 0 0 0 3px rgba(109, 143, 169, 0.14), 0 16px 30px rgba(31, 59, 87, 0.14);
}

.flag-button__emoji {
  font-size: 1.02rem;
}

.flag-button__media {
  width: 24px;
  height: 18px;
  display: block;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(31, 59, 87, 0.16);
}

.flag-button__label {
  font-size: 0.78rem;
}

.site-nav a,
.mobile-nav__inner a,
.footer-links a,
.social-link {
  color: var(--muted);
  transition: color 0.18s ease, opacity 0.18s ease;
}

.site-nav a:hover,
.mobile-nav__inner a:hover,
.footer-links a:hover,
.social-link:hover,
.site-nav a.is-active,
.mobile-nav__inner a.is-active {
  color: var(--navy);
}

.mobile-only {
  display: none;
}

.menu-button {
  width: 74px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(79, 127, 208, 0.2);
  background: linear-gradient(135deg, var(--button-blue-start), var(--button-blue-end));
  color: #fff;
  box-shadow: 0 14px 26px var(--button-blue-shadow);
}

.mobile-nav {
  position: absolute;
  top: calc(100% - 0.3rem);
  right: 1rem;
  width: min(320px, calc(100vw - 1.4rem));
  padding: 0;
  z-index: 120;
}

.mobile-nav[hidden] {
  display: none !important;
}

.mobile-nav__inner {
  display: grid;
  gap: 0.35rem;
  padding: 0.7rem;
  border-radius: 24px;
  box-shadow: 0 22px 42px rgba(31, 59, 87, 0.16);
}

.mobile-nav__inner a {
  padding: 0.78rem 0.9rem;
  border-radius: 16px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
  gap: 2rem;
  align-items: start;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 999px;
  font-weight: 600;
}

.badge--pill {
  padding: 0.62rem 0.95rem;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  color: var(--navy);
}

.badge--card {
  padding: 0.55rem 0.85rem;
  background: rgba(255, 255, 255, 0.82);
  color: var(--navy);
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.badge--deck {
  padding: 0.65rem 0.95rem;
  background: rgba(142, 97, 89, 0.12);
  color: var(--deck);
  border: 1px solid rgba(142, 97, 89, 0.18);
  margin-top: 1.25rem;
}

.section-intro h1,
.page-hero__content h1 {
  margin: 0;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.hero-intro h1 {
  font-size: clamp(3.2rem, 6vw, 6rem);
  max-width: 11ch;
  margin-top: 1rem;
}

.section-intro p,
.page-hero__content p,
.text-card p,
.overview-card p,
.timeline-card p,
.quote-panel p,
.footer-card p,
.stack-list__item p,
.bullet-stack__item p {
  color: var(--muted);
  line-height: 1.8;
}

.hero-intro p {
  font-size: 1.1rem;
  max-width: 58ch;
  margin-top: 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.8rem;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.95rem 1.22rem;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.button:hover,
.overview-card:hover {
  transform: translateY(-1px);
}

.button--primary {
  background: linear-gradient(135deg, var(--button-blue-start), var(--button-blue-end));
  color: #fff;
  box-shadow: 0 16px 30px var(--button-blue-shadow);
}

.button--secondary {
  background: linear-gradient(135deg, var(--button-blue-start), var(--button-blue-end));
  border: 1px solid rgba(79, 127, 208, 0.2);
  color: #fff;
  box-shadow: 0 16px 30px var(--button-blue-shadow);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.2rem;
  margin-top: 1.6rem;
  color: var(--muted);
}

.hero-meta span,
.timeline-card__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.hero-status {
  overflow: hidden;
}

.hero-status__media {
  position: relative;
  aspect-ratio: 1.3 / 1;
  overflow: hidden;
  border-radius: calc(var(--radius) - 6px) calc(var(--radius) - 6px) 0 0;
}

.hero-status__media img,
.hero-status__media video,
.page-hero__image img,
.page-hero__image video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-status__media video,
.page-hero__image video {
  display: block;
}

.hero-status__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 35, 52, 0.1), rgba(16, 35, 52, 0.36));
}

.hero-status__label {
  position: absolute;
  top: 1rem;
  left: 1rem;
}

.hero-status__body {
  padding: 1.2rem;
}

.status-feature,
.status-item,
.mini-card,
.stack-list__item,
.quote-card,
.template-item,
.fact-card,
.bullet-stack__item {
  padding: 1.05rem 1.15rem;
}

.status-feature strong,
.status-item strong,
.mini-card strong,
.fact-card strong {
  display: block;
  margin-top: 0.45rem;
  font-size: 1.05rem;
}

.status-grid,
.mini-grid,
.facts-grid {
  display: grid;
  gap: 0.95rem;
}

.status-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0.95rem;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.overview-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.overview-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.overview-card,
.quote-panel,
.timeline-card,
.footer-card,
.page-hero__content,
.page-hero__image,
.text-card {
  padding: 1.5rem;
}

.overview-card__icon {
  background: linear-gradient(180deg, rgba(109, 143, 169, 0.18), rgba(31, 59, 87, 0.12));
  color: var(--navy);
  font-weight: 700;
}

.overview-card h3,
.text-card h2,
.timeline-card h2,
.split-panel h2,
.footer-card strong,
.page-hero__content h1 {
  margin: 0.95rem 0 0;
}

.overview-card span {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  color: var(--navy);
  font-weight: 700;
  margin-top: 1rem;
}

.split-panel {
  padding: 1.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 1.2rem;
}

.split-panel--highlight {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.86)),
    linear-gradient(135deg, rgba(109, 143, 169, 0.06), rgba(142, 97, 89, 0.08));
}

.mini-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-self: end;
}

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 1.3rem;
  align-items: stretch;
}

.page-hero__content p {
  font-size: 1.02rem;
  max-width: 56ch;
  margin-top: 1.2rem;
}

.page-hero__image {
  overflow: hidden;
  height: clamp(260px, 36vw, 420px);
  min-height: 260px;
}

.page-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.text-card {
  min-height: 100%;
}

.text-card--compact {
  min-height: 0;
}

.quote-card,
.bullet-stack,
.stack-list,
.template-grid,
.facts-grid {
  margin-top: 1.15rem;
}

.quote-card strong {
  display: block;
  font-size: 1.02rem;
  line-height: 1.7;
  margin-top: 0.5rem;
}

.stack-list,
.bullet-stack {
  display: grid;
  gap: 0.95rem;
}

.bullet-stack__item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 0.8rem;
  align-items: start;
}

.bullet-stack__icon {
  width: 36px;
  height: 36px;
  background: rgba(142, 97, 89, 0.12);
  color: var(--deck);
  font-weight: 700;
}

.timeline-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.timeline-card__tag {
  color: var(--navy);
  font-weight: 700;
  margin-top: 1rem;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.template-item {
  text-align: center;
  font-weight: 700;
  color: var(--navy);
}

.quote-panel span {
  display: block;
  margin-bottom: 0.7rem;
}

.quote-panel p {
  margin: 0;
  font-size: 1.6rem;
  line-height: 1.45;
  color: var(--ink);
}

@keyframes flagFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

.footer-space {
  padding-bottom: 2rem;
}

.footer-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
  align-items: flex-start;
  gap: 1.4rem;
}

.footer-card__main {
  min-width: 0;
}

.footer-card__aside {
  display: grid;
  gap: 1rem;
  justify-items: end;
}

.footer-card p {
  margin: 0.45rem 0 0;
  max-width: 40ch;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1rem;
  font-weight: 700;
}

.footer-contact {
  display: grid;
  gap: 0.28rem;
  justify-items: end;
  text-align: right;
}

.footer-contact--main {
  margin-top: 1rem;
  justify-items: start;
  text-align: left;
}

.footer-contact__name {
  color: var(--text-strong);
}

.footer-contact__link {
  color: var(--muted);
  font-weight: 600;
  transition: color 0.18s ease;
}

.footer-contact__link:hover {
  color: var(--navy);
}

.footer-contact__socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin-top: 0.35rem;
}

.footer-contact__social-link {
  color: var(--muted);
  font-weight: 600;
  transition: color 0.18s ease;
}

.footer-contact__social-link:hover {
  color: var(--navy);
}

.footer-contact__social-link::after {
  content: "↗";
  margin-left: 0.3rem;
  font-size: 0.78rem;
}

.footer-contact__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(110, 141, 170, 0.16);
  background: rgba(255, 255, 255, 0.82);
  color: var(--text-strong);
  line-height: 1;
  box-shadow: 0 10px 18px rgba(58, 74, 102, 0.08);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease;
}

.footer-contact__social-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 22px rgba(58, 74, 102, 0.14);
}

.footer-contact__social-link::after {
  content: none;
}

.footer-contact__social-link--youtube {
  background: linear-gradient(135deg, #ff4e45, #ff1f1f);
  color: #fff;
  border-color: rgba(255, 31, 31, 0.28);
}

.footer-contact__social-link--youtube:hover {
  color: #fff;
}

.footer-contact__social-link--x {
  background: linear-gradient(135deg, #25282c, #090a0c);
  color: #fff;
  border-color: rgba(9, 10, 12, 0.3);
}

.footer-contact__social-link--x:hover {
  color: #fff;
}

.footer-contact__social-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.footer-contact__social-link--youtube .footer-contact__social-label::before {
  content: "▶";
  font-size: 0.72rem;
}

.footer-contact__social-link--x .footer-contact__social-label::before {
  content: "X";
  font-size: 0.8rem;
  font-weight: 800;
}

.footer-support {
  display: grid;
  gap: 0.8rem;
  max-width: 30ch;
  justify-items: end;
  text-align: right;
}

.footer-support__intro {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
}

.footer-support__image {
  width: 56px;
  height: 56px;
  display: block;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(110, 141, 170, 0.18);
  box-shadow: 0 10px 18px rgba(58, 74, 102, 0.12);
}

.footer-support__text {
  margin: 0;
}

.footer-support__button {
  width: fit-content;
}

.footer-rights {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  text-align: right;
}

.button--kofi {
  background: linear-gradient(135deg, var(--button-blue-start), var(--button-blue-end));
  color: #fff;
  box-shadow: 0 14px 26px var(--button-blue-shadow);
}

.button--kofi:hover {
  box-shadow: 0 18px 30px rgba(79, 127, 208, 0.28);
}

.social-link::after {
  content: "↗";
  font-size: 0.92rem;
}

.footer-links {
  gap: 0.8rem 1rem;
  justify-content: flex-end;
}

.strava-panel {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.strava-card {
  display: grid;
  gap: 1rem;
  width: min(100%, 320px);
  padding: 1rem;
  color: var(--ink);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.strava-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 38px rgba(35, 63, 82, 0.16);
}

.strava-card img {
  width: 100%;
  border-radius: 20px;
  border: 1px solid var(--line);
  object-fit: cover;
}

.strava-card .button {
  width: 100%;
  justify-content: center;
}

@media (max-width: 1100px) {
  .hero-grid,
  .page-hero,
  .split-panel,
  .page-grid-2,
  .timeline-grid,
  .overview-grid,
  .overview-grid--three,
  .overview-grid--two {
    grid-template-columns: 1fr;
  }

  .mini-grid,
  .template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .desktop-only {
    display: none;
  }

  .mobile-only {
    display: block;
  }

  .header-right {
    gap: 0.8rem;
  }

  .language-switcher {
    gap: 0.5rem;
  }

  .flag-button {
    min-width: 72px;
    padding: 0.56rem 0.78rem;
  }

  .shell {
    width: min(var(--shell), calc(100% - 1.1rem));
  }

  .site-header__inner {
    min-height: 74px;
  }

  .hero-intro h1,
  .page-hero__content h1 {
    font-size: clamp(2.4rem, 8vw, 4rem);
    max-width: none;
  }

  .status-grid,
  .facts-grid,
  .footer-card {
    grid-template-columns: 1fr;
  }

  .status-grid,
  .footer-card {
    display: grid;
  }

  .footer-card__aside {
    justify-items: start;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .footer-contact,
  .footer-rights {
    justify-items: start;
    text-align: left;
  }

  .footer-support {
    justify-items: start;
    text-align: left;
  }

  .footer-support__intro {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .footer-support__button {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .section-space {
    padding: 1.4rem 0 2.2rem;
  }

  .hero-actions,
  .hero-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-header__inner {
    align-items: flex-start;
    padding: 0.8rem 0;
  }

  .brand {
    flex: 1 1 auto;
  }

  .brand__logo {
    width: 64px;
    height: 64px;
  }

  .header-right {
    width: 100%;
    justify-content: space-between;
  }

  .language-switcher {
    order: 0;
  }

  .menu-button {
    order: 1;
  }

  .mobile-nav {
    top: calc(100% - 0.4rem);
    right: 0.55rem;
    width: min(300px, calc(100vw - 1.1rem));
  }

  .mobile-nav__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
    padding: 0.55rem;
  }

  .mobile-nav__inner a {
    padding: 0.72rem 0.8rem;
    font-size: 0.95rem;
  }

  .button {
    width: 100%;
    justify-content: center;
  }

  .entry-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .status-grid,
  .mini-grid,
  .template-grid {
    grid-template-columns: 1fr;
  }

  .quote-panel p {
    font-size: 1.28rem;
  }

  .page-hero__image {
    min-height: 220px;
  }

  .slideshow__viewport,
  .slideshow__slide img,
  .slideshow__slide video {
    min-height: 220px;
  }
}

@media (max-width: 420px) {
  .shell {
    width: min(var(--shell), calc(100% - 0.8rem));
  }

  .site-header__inner {
    gap: 0.7rem;
  }

  .brand__logo {
    width: 54px;
    height: 54px;
  }

  .brand strong {
    font-size: 0.95rem;
  }

  .brand small {
    display: none;
  }

  .flag-button {
    min-width: 64px;
    padding: 0.5rem 0.7rem;
  }

  .flag-button__emoji {
    font-size: 0.95rem;
  }

  .flag-button__label {
    font-size: 0.72rem;
  }

  .menu-button {
    width: 64px;
  }

  .mobile-nav {
    right: 0.4rem;
    width: min(280px, calc(100vw - 0.8rem));
  }

  .mobile-nav__inner {
    gap: 0.4rem;
    padding: 0.45rem;
  }

  .mobile-nav__inner a {
    padding: 0.65rem 0.72rem;
    border-radius: 14px;
    font-size: 0.92rem;
  }

  .entry-metrics > div,
  .run-stat-block {
    min-width: 100%;
  }

  .hero-panel__media img,
  .featured-entry__media img,
  .featured-entry__media video,
  .run-story-card__media .slideshow__viewport,
  .run-story-card__media .slideshow__slide img,
  .run-story-card__media .slideshow__slide video,
  .archive-entry__media .slideshow__viewport,
  .archive-entry__media .slideshow__slide img,
  .archive-entry__media .slideshow__slide video {
    min-height: 200px;
  }
}

/* IA refresh */

body.page--dynamic {
  background:
    radial-gradient(circle at top right, rgba(157, 192, 222, 0.24), transparent 32%),
    linear-gradient(180deg, rgba(245, 250, 255, 0.98), rgba(235, 244, 251, 0.9));
}

body.page--static {
  background:
    radial-gradient(circle at top left, rgba(194, 216, 232, 0.2), transparent 28%),
    linear-gradient(180deg, rgba(247, 251, 255, 0.98), rgba(239, 246, 252, 0.92));
}

body.page--home {
  background:
    radial-gradient(circle at top center, rgba(180, 208, 229, 0.24), transparent 34%),
    linear-gradient(180deg, rgba(246, 250, 254, 1), rgba(232, 241, 248, 0.95));
}

.section-heading {
  max-width: 760px;
  margin-bottom: 1.75rem;
}

.section-heading h2 {
  margin-bottom: 0.7rem;
}

.section-heading p {
  margin: 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  padding: 0.9rem 1.4rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button--primary {
  background: linear-gradient(135deg, var(--button-blue-start), var(--button-blue-end));
  box-shadow: 0 16px 30px var(--button-blue-shadow);
  color: #fff;
}

.button--secondary {
  background: linear-gradient(135deg, var(--button-blue-start), var(--button-blue-end));
  border: 1px solid rgba(79, 127, 208, 0.2);
  color: #fff;
  box-shadow: 0 16px 30px var(--button-blue-shadow);
}

.text-link {
  color: var(--accent-strong);
  font-weight: 600;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
}

.meta-list li,
.meta-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(110, 141, 170, 0.24);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  background: rgba(255, 255, 255, 0.58);
  color: var(--text-muted);
  font-size: 0.92rem;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 1.5rem;
  padding: clamp(1.4rem, 3vw, 2rem);
}

.hero-panel__content h1 {
  margin-bottom: 1rem;
}

.hero-panel__content p {
  max-width: 62ch;
}

.hero-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.5rem;
}

.hero-panel__media,
.featured-entry__media {
  overflow: hidden;
}

.hero-panel__media img,
.hero-panel__media video,
.featured-entry__media img,
.featured-entry__media video {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
}

.home-now {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 1.25rem;
}

.home-now__panel,
.home-now__details {
  padding: 1.5rem;
}

.detail-row {
  display: grid;
  gap: 0.35rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(110, 141, 170, 0.16);
}

.detail-row:last-child {
  border-bottom: 0;
}

.detail-row span,
.entry-meta {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.detail-row strong {
  color: var(--text-strong);
  font-size: 1.02rem;
}

.latest-grid,
.reader-paths,
.detail-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.update-card,
.info-card,
.journal-entry,
.phase-card,
.archive-entry,
.spec-card {
  padding: 1.4rem;
}

.update-card {
  display: grid;
  gap: 1rem;
}

.update-card__header,
.archive-entry__header,
.phase-card__header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.update-card__body h3,
.archive-entry h3,
.phase-card h3,
.journal-entry h2,
.featured-entry__content h2,
.detail-lead h2 {
  margin-bottom: 0.65rem;
}

.narrative-grid,
.detail-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
  gap: 1.3rem;
}

.narrative-intro,
.detail-lead {
  padding: 1.5rem;
}

.narrative-media {
  margin-top: 1.4rem;
  overflow: hidden;
  border-radius: 24px;
}

.narrative-media img,
.narrative-media video {
  width: 100%;
  min-height: 260px;
  max-height: 420px;
  object-fit: cover;
  display: block;
}

.narrative-closing {
  margin-top: 1.4rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(110, 141, 170, 0.18);
  color: var(--text-strong);
}

.narrative-cards {
  display: grid;
  gap: 1.1rem;
}

.phase-spotlight {
  padding: 1.6rem;
  margin-bottom: 1.4rem;
}

.phase-spotlight__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) auto;
  gap: 1rem;
  align-items: end;
}

.phase-spotlight__meta {
  display: grid;
  justify-items: end;
  gap: 0.65rem;
}

.phase-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
}

.route-map-card {
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
  margin-bottom: 1.4rem;
}

.route-map-card__copy h2 {
  margin: 0.6rem 0 0.8rem;
}

.route-map-card__copy p,
.route-map-card__note {
  color: var(--text-muted);
  line-height: 1.75;
}

.route-map-card__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.route-legend-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(110, 141, 170, 0.18);
  color: var(--text-muted);
  font-size: 0.92rem;
}

.route-legend-pill::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 10px;
}

.route-legend-pill--south::before {
  background: #d97706;
}

.route-legend-pill--azores::before {
  background: #2563eb;
}

.route-legend-pill--return::before {
  background: #0f766e;
}

.route-legend-pill--north::before {
  background: #7c3aed;
}

.route-map {
  width: 100%;
  min-height: 420px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(110, 141, 170, 0.18);
  background: rgba(225, 235, 243, 0.55);
}

.route-map .leaflet-control-zoom a {
  color: var(--navy);
}

.route-map .leaflet-popup-content-wrapper,
.route-map .leaflet-popup-tip {
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  box-shadow: 0 18px 32px rgba(31, 59, 87, 0.14);
}

.route-map-marker {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--button-blue-start), var(--button-blue-end));
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 4px rgba(79, 127, 208, 0.14);
}

.phase-card {
  position: relative;
}

.phase-card--current {
  box-shadow: 0 24px 44px rgba(66, 92, 118, 0.15);
  border: 1px solid rgba(98, 130, 164, 0.3);
}

.phase-milestones {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.2rem;
}

.phase-milestone {
  padding-top: 0.9rem;
  border-top: 1px solid rgba(110, 141, 170, 0.16);
}

.phase-milestone strong,
.spec-card strong {
  display: block;
  color: var(--text-strong);
}

.phase-milestone span,
.spec-card span {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.featured-entry {
  display: grid;
  grid-template-columns: minmax(240px, 0.82fr) minmax(0, 1.18fr);
  gap: 1.2rem;
  padding: 1.4rem;
  margin-bottom: 1.5rem;
}

.featured-entry--compact {
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr);
}

.featured-entry__content {
  display: grid;
  gap: 0.95rem;
  align-content: start;
}

.slideshow {
  display: grid;
  gap: 0.8rem;
  height: 100%;
}

.slideshow__viewport {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 280px;
  background: rgba(225, 235, 243, 0.55);
}

.slideshow__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.slideshow__slide img,
.slideshow__slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slideshow__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.slideshow__button,
.slideshow__dot {
  border: 1px solid rgba(79, 127, 208, 0.2);
  background: linear-gradient(135deg, var(--button-blue-start), var(--button-blue-end));
  color: #fff;
}

.slideshow__button {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.slideshow__button:hover,
.slideshow__dot:hover,
.slideshow__dot.is-active {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(66, 92, 118, 0.12);
}

.slideshow__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  flex: 1;
}

.slideshow__dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  cursor: pointer;
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.entry-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.entry-metrics > div {
  min-width: 130px;
  padding: 0.85rem 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(110, 141, 170, 0.18);
}

.entry-metrics span {
  display: block;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.entry-metrics strong {
  color: var(--text-strong);
}

.archive-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
}

.filter-chip {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.45rem;
  padding: 0.68rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(79, 127, 208, 0.2);
  background: linear-gradient(135deg, var(--button-blue-start), var(--button-blue-end));
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.filter-chip span {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.88rem;
}

.filter-chip:hover,
.filter-chip.is-active {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px var(--button-blue-shadow);
}

.archive-list {
  display: grid;
  gap: 1rem;
}

.archive-list--dense {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.archive-entry__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.archive-entry__media {
  overflow: hidden;
  margin-bottom: 1rem;
}

.archive-entry__media .slideshow__viewport,
.archive-entry__media .slideshow__slide img,
.archive-entry__media .slideshow__slide video {
  min-height: 220px;
}

.journal-shell {
  max-width: 860px;
}

.journal-list {
  display: grid;
  gap: 1rem;
}

.journal-entry {
  display: grid;
  gap: 1rem;
}

.journal-entry--with-media {
  grid-template-columns: minmax(0, 1fr) 180px;
  align-items: start;
}

.journal-entry__content {
  min-width: 0;
}

.journal-entry__excerpt {
  font-size: 1.05rem;
  color: var(--text-strong);
}

.journal-entry__media {
  width: 180px;
  display: grid;
  gap: 0.65rem;
  justify-self: end;
}

.journal-entry__media--single {
  width: 200px;
}

.journal-entry__media-item {
  overflow: hidden;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(136, 167, 194, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
  aspect-ratio: 4 / 3;
}

.journal-entry__media--single .journal-entry__media-item {
  aspect-ratio: 1 / 1;
}

.journal-entry__media-item img,
.journal-entry__media-item video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.detail-sections {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 980px) {
  .hero-panel,
  .home-now,
  .narrative-grid,
  .detail-grid,
  .featured-entry,
  .featured-entry--compact,
  .phase-grid,
  .latest-grid,
  .reader-paths,
  .detail-sections,
  .archive-list--dense {
    grid-template-columns: 1fr;
  }

  .phase-spotlight__grid {
    grid-template-columns: 1fr;
  }

  .phase-spotlight__meta {
    justify-items: start;
  }
}

@media (max-width: 720px) {
  .hero-panel,
  .home-now__panel,
  .home-now__details,
  .featured-entry,
  .phase-card,
  .update-card,
  .info-card,
  .journal-entry,
  .detail-lead {
    padding: 1.2rem;
  }

  .archive-entry__header,
  .update-card__header,
  .phase-card__header,
  .archive-entry__footer {
    flex-direction: column;
  }

  .route-map-card {
    padding: 1.2rem;
  }

  .route-map {
    min-height: 320px;
  }

  .entry-metrics,
  .hero-panel__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .journal-entry--with-media {
    grid-template-columns: 1fr;
  }

  .journal-entry__media,
  .journal-entry__media--single {
    width: 100%;
    justify-self: stretch;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .journal-entry__media--single {
    grid-template-columns: minmax(0, 1fr);
    max-width: 260px;
  }

  .spec-grid {
    grid-template-columns: 1fr;
  }
}

.run-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.82fr);
  gap: 1rem;
  align-items: stretch;
}

.run-lead,
.run-live,
.strava-log__entry,
.run-story-card,
.run-story-featured,
.strava-empty,
.strava-highlight {
  padding: 1.5rem;
}

.run-live {
  display: grid;
  gap: 0.8rem;
  padding: 1.2rem;
  height: 100%;
  align-content: start;
}

.run-lead {
  display: grid;
  gap: 1rem;
  height: 100%;
  align-content: start;
}

.run-lead__media {
  overflow: hidden;
  border-radius: 24px;
}

.run-lead__media img,
.run-lead__media video {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.run-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.run-stats-card {
  padding: 1.5rem;
  display: grid;
  gap: 1rem;
}

.run-stats-card__header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  color: var(--text-muted);
}

.run-stats-card__header p {
  margin: 0.35rem 0 0;
}

.run-stats-card__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.run-stat-block {
  padding: 1rem;
  display: grid;
  gap: 0.3rem;
}

.run-stat-block span,
.run-stat-block small {
  color: var(--text-muted);
}

.run-stat-block strong {
  font-size: 1.5rem;
  line-height: 1.1;
}

.run-live__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.run-live__actions .button {
  padding: 0.72rem 1rem;
  font-size: 0.92rem;
}

.run-live__sync {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.83rem;
}

.strava-highlight,
.strava-empty {
  display: grid;
  gap: 0.7rem;
  padding: 1.1rem;
}

.strava-highlight__header,
.strava-log__header {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: flex-start;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.strava-highlight__location,
.strava-log__location {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.strava-log {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}

.strava-log__entry {
  display: grid;
  gap: 0.65rem;
  padding: 1rem;
}

.strava-highlight h3,
.strava-log__entry h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.28;
}

.entry-metrics--compact {
  gap: 0.55rem;
}

.entry-metrics--compact > div {
  min-width: 0;
  flex: 1 1 96px;
  padding: 0.58rem 0.72rem;
  border-radius: 16px;
}

.entry-metrics--compact span {
  font-size: 0.75rem;
}

.entry-metrics--compact strong {
  font-size: 0.98rem;
}

.run-story-featured {
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1.22fr);
  gap: 1.2rem;
  margin-bottom: 1.5rem;
}

.run-story-featured__media,
.run-story-card__media {
  overflow: hidden;
}

.run-story-featured__content {
  display: grid;
  gap: 0.95rem;
  align-content: start;
}

.run-story-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.run-story-card {
  display: grid;
  gap: 1rem;
}

.run-story-card__media .slideshow__viewport,
.run-story-card__media .slideshow__slide img,
.run-story-card__media .slideshow__slide video {
  min-height: 240px;
}

@media (max-width: 980px) {
  .run-overview,
  .run-stats-card__metrics,
  .run-story-featured,
  .run-story-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .strava-log {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .run-lead,
  .run-live,
  .run-story-featured,
  .run-story-card,
  .strava-log__entry,
  .strava-empty,
  .strava-highlight {
    padding: 1rem;
  }

  .run-live__actions,
  .run-stats-card__header,
  .strava-highlight__header,
  .strava-log__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .entry-metrics--compact {
    flex-direction: row;
    align-items: stretch;
  }
}

.brand__logo {
  width: 80px;
  height: 80px;
  display: block;
  object-fit: contain;
  background: transparent;
  border: 0;
  box-shadow: none;
}
