/* ============================================================
   VitalPulse — dark editorial design system
   Near-black canvas, high-contrast type, and restrained glass surfaces
   ============================================================ */
:root {
  color-scheme: dark;
  --bg: #050706;
  --surface: #101311;
  --surface-raised: #171b18;
  --ink: #f2f4f1;
  --ink-soft: #c0c8c2;
  --ink-faint: #929b94;
  --line: #292f2b;
  --pine: #090d0b;
  --pine-soft: #141b16;
  --on-pine: #e8efe9;
  --on-pine-dim: #a1ada4;
  --brand: #68c492;
  --brand-rgb: 104, 196, 146;
  --brand-dark: #8ad9ab;
  --scrollbar-thumb: #46574d;
  --scrollbar-thumb-hover: var(--brand);
  --coral: #e88c6b;
  --coral-dark: #f0a184;
  --lavender: #b7a8ea;
  --radius: 18px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
  --shadow-lift: 0 18px 48px rgba(0, 0, 0, 0.46);
  /* Keep the existing role tokens as aliases to one site-wide editorial family. */
  --font-family: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --serif: var(--font-family);
  --sans: var(--font-family);
  --maxw: 1320px;
}
* { box-sizing: border-box; }
.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;
}
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-raised);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(calc(-100% - 16px));
}
.skip-link:focus { transform: translateY(0); }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background-color: var(--bg);
}
body {
  position: relative;
  isolation: isolate;
  margin: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
}

/* Shared ambient light stays behind every page and never intercepts input. */
body::before,
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
body::before {
  background: radial-gradient(
    ellipse 62vw 70vh at -8% 28%,
    rgba(var(--brand-rgb), 0.42) 0%,
    rgba(var(--brand-rgb), 0.16) 30%,
    rgba(var(--brand-rgb), 0) 70%
  );
  animation: ambient-glow-drift-green 38s ease-in-out infinite alternate;
}
body::after {
  background: radial-gradient(
    ellipse 58vw 68vh at 108% 72%,
    rgba(232, 140, 107, 0.36) 0%,
    rgba(232, 140, 107, 0.14) 31%,
    rgba(232, 140, 107, 0) 72%
  );
  animation: ambient-glow-drift-coral 46s ease-in-out infinite alternate;
}
@keyframes ambient-glow-drift-green {
  from { transform: translate3d(-10vw, -4vh, 0) scale(1); }
  to { transform: translate3d(10vw, 4vh, 0) scale(1.06); }
}
@keyframes ambient-glow-drift-coral {
  from { transform: translate3d(10vw, 4vh, 0) scale(1); }
  to { transform: translate3d(-10vw, -4vh, 0) scale(1.05); }
}

@media (max-width: 760px) {
  /* Narrow screens have less empty margin, so soften the same edge lighting. */
  body::before { opacity: 0.78; }
  body::after { opacity: 0.72; }
}
/* Desktop scrollbars stay quiet until the pointer rests on the thumb. */
@media (hover: hover) and (pointer: fine) {
  /* Firefox uses the standardized properties; Chromium and WebKit use the selectors below. */
  @supports not selector(::-webkit-scrollbar) {
    :root {
      scrollbar-width: thin;
      scrollbar-color: var(--scrollbar-thumb) transparent;
    }
  }
  *::-webkit-scrollbar { width: 10px; height: 10px; }
  *::-webkit-scrollbar-track { background: transparent; }
  *::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background-color: var(--scrollbar-thumb);
    background-clip: content-box;
    transition: background-color 160ms ease;
  }
  *::-webkit-scrollbar-thumb:hover { background-color: var(--scrollbar-thumb-hover); }
  *::-webkit-scrollbar-corner { background: transparent; }
}
img { max-width: 100%; display: block; }
a { color: var(--brand-dark); }
a:hover { color: var(--coral-dark); }
:focus-visible {
  outline: 3px solid var(--brand-dark);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--surface);
  border-radius: 4px;
}
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--sans); line-height: 1.16; font-weight: 600; margin: 0; letter-spacing: -0.035em; }
.eyebrow {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 30px;
}
.section-head h2 { display: inline-flex; align-items: center; gap: 14px; font-size: 30px; }
.section-head h2::before {
  content: '';
  width: 6px;
  height: 26px;
  border-radius: 4px;
  background: var(--coral);
  flex: none;
}
.section-head::after { content: ''; flex: 1; height: 1px; background: var(--line); order: 2; }
.section-head h2 { order: 0; }
.section-head .more, .section-head .eyebrow { order: 3; font-size: 13px; font-weight: 700; white-space: nowrap; text-decoration: none; }
.section-head .more { border-bottom: 2px solid transparent; transition: border-color 0.15s; }
.section-head .more:hover { border-color: var(--coral); }

/* ---------- Shared glass navigation ---------- */
.site-header {
  background: rgba(7, 9, 8, 0.88);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid rgba(242, 244, 241, 0.1);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header::after {
  /* A single dim brand rule keeps the chrome quiet and consistent. */
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(104, 196, 146, 0.7), transparent);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 70px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #ffffff;
}
.logo svg { width: 36px; height: 36px; flex: none; }
.logo-word { font-family: var(--sans); font-size: 23px; font-weight: 700; letter-spacing: -0.04em; }
.logo-word span { color: var(--coral); }
/* The desktop links share one glass capsule; aria-current marks the selected tab. */
.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border: 1px solid rgba(226, 237, 231, 0.13);
  border-radius: 999px;
  background: rgba(226, 237, 231, 0.045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}
.main-nav a {
  position: relative;
  text-decoration: none;
  color: var(--on-pine-dim);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}
.main-nav a:hover { color: #ffffff; background: rgba(255, 255, 255, 0.075); }
.main-nav a[aria-current='page'] {
  color: #f2fff7;
  background: rgba(var(--brand-rgb), 0.16);
  box-shadow: inset 0 0 0 1px rgba(var(--brand-rgb), 0.24);
}
.main-nav a:focus-visible { border-radius: 999px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle {
  display: none;
  border: 1px solid rgba(226, 237, 231, 0.2);
  background: rgba(226, 237, 231, 0.055);
  border-radius: 14px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}
.nav-toggle:hover,
.nav-open .nav-toggle { border-color: rgba(var(--brand-rgb), 0.42); background: rgba(var(--brand-rgb), 0.12); }
.nav-toggle:focus-visible { border-radius: 14px; }
.nav-toggle svg { width: 20px; height: 20px; stroke: var(--on-pine); }
.nav-toggle .icon-close { display: none; }
.nav-open .nav-toggle .icon-burger { display: none; }
.nav-open .nav-toggle .icon-close { display: block; }

/* ---------- Compact editorial introduction ---------- */
.home-hero {
  padding: clamp(26px, 3vw, 36px) 0 18px;
  background: radial-gradient(ellipse at 50% 0%, rgba(104, 196, 146, 0.1), transparent 66%);
  color: var(--ink);
}
.home-hero__content {
  width: 100%;
  text-align: center;
}
.home-hero__tag {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.home-hero__tag-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.home-hero__content h1 {
  max-width: 18ch;
  margin: 10px auto 8px;
  color: var(--ink);
  font-size: clamp(38px, 3.8vw, 50px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.home-hero__content h1 em {
  color: var(--brand-dark);
  font-family: var(--serif);
  font-size: 1.08em;
  font-weight: 400;
  letter-spacing: -0.025em;
}
.home-hero__content > p {
  max-width: 54ch;
  margin: 0 auto 12px;
  color: var(--ink-soft);
  font-size: clamp(15px, 1.2vw, 16px);
  line-height: 1.55;
  text-wrap: pretty;
}
.home-hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 46px;
  padding: 0 26px;
  border-radius: 999px;
  background: #f4f5f2;
  color: #080a09;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}
.home-hero__cta:hover { background: #ffffff; color: #080a09; transform: translateY(-2px); }
/* The lead article shares the regular card treatment and stays secondary to the page title. */
.lead-spotlight { padding: 0 0 clamp(20px, 2.4vw, 30px); }
.lead-story-card { width: 100%; min-width: 0; }
.lead-story-card .article-card-surface--wide {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.82fr);
  grid-template-rows: auto auto;
}
.lead-story-card .article-card-copy {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  gap: 10px;
  padding: 20px 26px 18px;
}
.lead-story-card .article-card-title {
  max-width: 34ch;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.18;
}
.lead-story-card .article-card-summary { -webkit-line-clamp: 2; }
.lead-story-card .article-card-media {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  height: clamp(180px, 17vw, 220px);
  aspect-ratio: auto;
  margin: 16px 16px 16px 0;
}
.lead-story-card .article-card-footer { grid-column: 1 / -1; grid-row: 2; }

/* ---------- Featured story cards ---------- */
.hero { padding: 20px 0 8px; }
.featured-stories .hero-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 680px) {
  .hero { padding-top: 20px; }
}
.hero-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.hero-card {
  display: flex;
  min-width: 0;
  border-radius: 24px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.28s cubic-bezier(0.2, 0.75, 0.25, 1);
}
.card-snip {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* ---------- Badges & meta ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1.5px solid currentColor;
  border-radius: 999px;
  padding: 3px 13px;
  width: fit-content;
  text-decoration: none;
  background: transparent;
}
.badge:hover { background: rgba(255, 255, 255, 0.07); }
.badge-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.card-meta, .meta {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 700;
}

/* ---------- Latest cards grid ---------- */
.section { padding-top: 60px; padding-bottom: 60px; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.post-card {
  position: relative;
  display: flex;
  min-width: 0;
  border-radius: 24px;
  text-decoration: none;
  color: inherit;
}
.article-card-surface {
  position: relative;
  isolation: isolate;
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.025), transparent 46%), var(--surface);
  box-shadow: var(--shadow);
  translate: 0 0;
  transform: perspective(1100px) rotateX(var(--card-tilt-x, 0deg)) rotateY(var(--card-tilt-y, 0deg));
  transform-style: preserve-3d;
  transition: translate 0.28s cubic-bezier(0.2, 0.75, 0.25, 1), transform 0.24s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}
.article-card-surface::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(320px circle at var(--card-glow-x, 50%) var(--card-glow-y, 0%), rgba(104, 196, 146, 0.16), transparent 64%);
  content: "";
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.article-card-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 13px;
  padding: 21px 22px 17px;
  transform: translateZ(10px);
}
.article-card-topline {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.article-card-topline--meta-only { justify-content: flex-end; }
.article-card-meta {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-align: right;
  text-transform: uppercase;
}
.article-card-title {
  color: var(--ink);
  font-size: clamp(19px, 1.55vw, 22px);
  font-weight: 650;
  line-height: 1.22;
  text-wrap: balance;
}
.article-card-title a { color: inherit; text-decoration: none; }
.article-card-summary {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.article-card-media {
  position: relative;
  z-index: 1;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  margin: 0 16px;
  border: 1px solid rgba(226, 237, 231, 0.1);
  border-radius: 17px;
  background: var(--surface-raised);
  color: inherit;
  text-decoration: none;
  transform: translateZ(16px);
}
.article-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.2, 0.75, 0.25, 1), filter 0.35s ease;
}
.article-card-orb {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(138, 217, 171, 0.45);
  border-radius: 50%;
  background: rgba(5, 7, 6, 0.78);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  color: var(--brand-dark);
  backdrop-filter: blur(8px);
  transform: translateZ(22px);
  transition: transform 0.35s cubic-bezier(0.2, 0.75, 0.25, 1), background 0.3s ease, border-color 0.3s ease;
}
.article-card-orb svg { width: 23px; height: 23px; }
.article-card-pulse-baseline { opacity: 0.28; }
/* Register the duration as a time value so its return to the idle pace can interpolate smoothly. */
@property --article-card-pulse-duration {
  syntax: "<time>";
  inherits: false;
  initial-value: 1.85s;
}
.article-card-pulse-trace {
  --article-card-pulse-duration: 1.85s;
  stroke-dasharray: 13 87;
  animation: article-card-pulse-travel var(--article-card-pulse-duration) linear infinite;
  transition: --article-card-pulse-duration 1.2s ease-in-out;
}
/* Uneven offsets give the ECG highlight a repeating slow-fast rhythm without moving its badge. */
@keyframes article-card-pulse-travel {
  0% { stroke-dashoffset: 0; }
  24% { stroke-dashoffset: -13; }
  37% { stroke-dashoffset: -34; }
  61% { stroke-dashoffset: -47; }
  74% { stroke-dashoffset: -69; }
  100% { stroke-dashoffset: -100; }
}
.article-card-footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: auto 22px 0;
  padding: 13px 0 16px;
  border-top: 1px solid var(--line);
  color: var(--brand-dark);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}
.article-card-arrow { font-size: 16px; line-height: 1; transition: transform 0.25s ease; }
.hero-card .article-card-title { font-size: clamp(20px, 1.7vw, 24px); }
.post-card--full-link { cursor: pointer; }
/* Stretch the title link across the homepage card for a larger click target. */
.post-card--full-link .card-title-link--stretched::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.post-card:focus-within {
  outline: 3px solid var(--brand-dark);
  outline-offset: 3px;
  box-shadow: 0 0 0 2px var(--surface);
}
.hero-card:focus-visible, .pick-row:focus-visible {
  outline: 3px solid var(--brand-dark);
  outline-offset: 4px;
  box-shadow: 0 0 0 2px var(--surface);
}
/* Keep the outer card as a steady pointer target while its inner surface lifts. */
@media (hover: hover) and (pointer: fine) {
  .hero-card:hover .article-card-surface,
  .post-card:hover .article-card-surface,
  .pick-row:hover .article-card-surface {
    translate: 0 -6px;
    border-color: rgba(138, 217, 171, 0.56);
    box-shadow: 0 24px 54px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(104, 196, 146, 0.13);
  }
  .hero-card:hover .article-card-surface::before,
  .post-card:hover .article-card-surface::before,
  .pick-row:hover .article-card-surface::before { opacity: 1; }
  .hero-card:hover .article-card-media img,
  .post-card:hover .article-card-media img,
  .pick-row:hover .article-card-media img { transform: scale(1.045); filter: saturate(1.06) brightness(1.04); }
  .hero-card:hover .article-card-orb,
  .post-card:hover .article-card-orb,
  .pick-row:hover .article-card-orb { background: rgba(8, 18, 12, 0.88); border-color: var(--brand-dark); }
  /* Reach the faster hover pace quickly; leaving the card uses the 1.2-second base transition. */
  .hero-card:hover .article-card-pulse-trace,
  .post-card:hover .article-card-pulse-trace,
  .pick-row:hover .article-card-pulse-trace {
    --article-card-pulse-duration: 0.8s;
    transition-duration: 160ms;
    transition-timing-function: ease-out;
  }
  .hero-card:hover .article-card-arrow,
  .post-card:hover .article-card-arrow,
  .pick-row:hover .article-card-arrow { transform: translate(3px, -2px); }
}

/* ---------- Category directory (editorial index) ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-block: 1px solid var(--line);
}
.cat-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 204px;
  flex-direction: column;
  gap: 14px;
  padding: 22px 20px 20px;
  text-decoration: none;
  color: inherit;
  border-right: 1px solid var(--line);
  background: transparent;
  transition: background-color 0.2s ease;
}
.cat-card:nth-child(5n), .cat-card:last-child { border-right: 0; }
.cat-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  transition: color 0.2s ease;
}
.cat-card p {
  max-width: 30ch;
  margin: 0;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.65;
}
.cat-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}
.cat-card .cat-count {
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.cat-arrow {
  width: 17px;
  height: 17px;
  flex: none;
  color: var(--brand-dark);
  opacity: 0.5;
  transform: translateX(-2px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.cat-card:focus-visible {
  z-index: 1;
  outline: 2px solid var(--brand-dark);
  outline-offset: -3px;
  background: var(--surface);
}
.cat-card:focus-visible h3 { color: var(--brand-dark); }
.cat-card:focus-visible .cat-arrow { opacity: 1; transform: translateX(2px); }
@media (hover: hover) and (pointer: fine) {
  .cat-card:hover { background: var(--surface); }
  .cat-card:hover h3 { color: var(--brand-dark); }
  .cat-card:hover .cat-arrow { opacity: 1; transform: translateX(2px); }
}

/* ---------- Editors' picks (magazine tile grid) ---------- */
.picks-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
}
.pick-row {
  position: relative;
  display: flex;
  min-width: 0;
  border-radius: 24px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.28s cubic-bezier(0.2, 0.75, 0.25, 1);
}
.article-card-surface--wide {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  grid-template-rows: auto auto;
}
.pick-feature .article-card-copy { grid-column: 1; grid-row: 1; }
.pick-feature .article-card-media {
  grid-column: 2;
  grid-row: 1;
  align-self: stretch;
}
.pick-feature .article-card-footer { grid-column: 1 / -1; grid-row: 2; }
.pick-rank {
  position: absolute;
  z-index: 2;
  top: 13px;
  left: 15px;
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 700;
  line-height: 1;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(20, 28, 24, 0.55);
  pointer-events: none;
}

/* The fifth pick stays full width, with copy and its inset cover side by side. */
@media (min-width: 681px) {
  .picks-list .pick-row:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

/* ---------- Weekly activity tools ---------- */
.home-weekly-tool { padding: 24px 0 8px; }
.home-weekly-tool h2 { scroll-margin-top: 96px; }
.home-weekly-tool__inner {
  display: grid;
  grid-template-columns: minmax(250px, 0.78fr) minmax(0, 1.22fr);
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
  padding: clamp(22px, 3vw, 36px);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--pine);
  color: var(--on-pine);
}
.home-weekly-tool__copy h2 {
  max-width: 17ch;
  margin-bottom: 10px;
  color: #ffffff;
  font-size: clamp(27px, 2.5vw, 34px);
}
.home-weekly-tool__copy p { max-width: 38ch; margin: 0 0 16px; color: var(--on-pine); }
.home-weekly-tool__copy .btn-solid { background: var(--brand); color: #07110b; }
.home-weekly-tool__copy .btn-solid:hover { background: var(--brand-dark); color: #07110b; }
.home-activity-check {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
}
.home-activity-check__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.home-activity-check__head h3 { font-size: 18px; }
.home-activity-check__head span { color: var(--ink-faint); font-size: 12px; font-weight: 700; }
.home-activity-check__fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.home-activity-check__fields label { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: 13px; font-weight: 700; }
.home-activity-check__fields small { color: var(--ink-faint); font-size: 11px; font-weight: 500; }
.home-activity-check input[type='number'] {
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--ink);
  font: inherit;
  font-variant-numeric: tabular-nums;
}
.home-activity-check__progress { margin-top: 14px; }
.home-activity-check__progress-label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.home-activity-check__progress-label [data-activity-progress-value] { font-variant-numeric: tabular-nums; }
.home-activity-check progress { display: block; width: 100%; height: 10px; overflow: hidden; border: 0; border-radius: 99px; appearance: none; background: var(--line); }
.home-activity-check progress::-webkit-progress-bar { border-radius: 99px; background: var(--line); }
.home-activity-check progress::-webkit-progress-value { border-radius: 99px; background: var(--brand); }
.home-activity-check progress::-moz-progress-bar { border-radius: 99px; background: var(--brand); }
.home-activity-check__status { min-height: 2.8em; margin: 10px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 1.5; }
.home-activity-check__hint { margin: 8px 0 0; color: var(--ink-faint); font-size: 11px; line-height: 1.5; }
.home-activity-check__hint a { color: var(--brand-dark); text-underline-offset: 2px; }

/* ---------- Sleep and recovery planner ---------- */
/* Align the sleep planner shell with the full-width activity tool above it. */
.home-sleep-tool { padding-top: 24px; padding-left: 0; padding-right: 0; }
.home-sleep-tool__inner {
  display: grid;
  grid-template-columns: minmax(240px, 0.78fr) minmax(0, 1.22fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  padding: clamp(26px, 4vw, 54px);
  border-radius: var(--radius);
  border: 1px solid rgba(183, 168, 234, 0.22);
  background: #111016;
}
.home-sleep-tool__copy h2 {
  max-width: 14ch;
  margin-bottom: 16px;
  color: #ddd5ff;
  font-size: clamp(28px, 3vw, 40px);
  scroll-margin-top: 216px;
}
.home-sleep-tool__copy p { max-width: 38ch; margin: 0 0 18px; color: var(--ink-soft); }
.home-sleep-tool__copy .home-sleep-tool__source { margin-bottom: 0; color: var(--lavender); font-size: 13px; }
.home-sleep-tool__source a { color: var(--lavender); font-weight: 700; text-underline-offset: 3px; }
.home-sleep-planner {
  min-width: 0;
  padding: 24px;
  border: 1px solid rgba(183, 168, 234, 0.2);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
}
.home-sleep-planner__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.home-sleep-planner__head h3 { font-size: 20px; }
.home-sleep-planner__head span { color: var(--ink-faint); font-size: 12px; font-weight: 700; }
.home-sleep-planner__timing {
  display: grid;
  grid-template-columns: minmax(150px, 0.72fr) minmax(0, 1.28fr);
  gap: 18px;
  align-items: end;
}
.sleep-time-field,
.sleep-target-field,
.sleep-habit-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.sleep-time-field,
.sleep-target-field legend,
.sleep-habit-field legend { font-size: 13px; font-weight: 800; }
.sleep-time-field { display: flex; flex-direction: column; gap: 8px; }
.sleep-time-field input[type='time'] {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--ink);
  font: inherit;
  font-variant-numeric: tabular-nums;
}
.sleep-target-field legend,
.sleep-habit-field legend { margin-bottom: 8px; }
.sleep-target-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sleep-target-options label,
.sleep-habit-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}
.sleep-target-options label:has(input:checked),
.sleep-habit-list label:has(input:checked) { border-color: var(--lavender); background: rgba(183, 168, 234, 0.13); color: #e7e1ff; }
.sleep-target-options input,
.sleep-habit-list input { flex: none; accent-color: var(--lavender); }
.sleep-plan-result {
  margin: 20px 0;
  padding: 18px 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--pine-soft);
  color: var(--on-pine);
}
.sleep-plan-result__title { margin: 0 0 4px; color: var(--on-pine-dim); font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.sleep-plan-result__time { margin: 0 0 4px; color: #ffffff; font-family: var(--serif); font-size: 24px; line-height: 1.25; }
.sleep-plan-result__time strong { color: var(--lavender); }
.sleep-plan-result > p:last-child { margin: 0; color: var(--on-pine); font-size: 13px; line-height: 1.5; }
.sleep-plan-result > p:last-child strong { color: #ffffff; }
.sleep-habit-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sleep-habit-list label { min-height: 48px; font-weight: 600; line-height: 1.35; }
.home-sleep-planner progress { display: block; width: 100%; height: 10px; margin-top: 16px; overflow: hidden; border: 0; border-radius: 99px; appearance: none; background: var(--line); }
.home-sleep-planner progress::-webkit-progress-bar { border-radius: 99px; background: var(--line); }
.home-sleep-planner progress::-webkit-progress-value { border-radius: 99px; background: var(--lavender); }
.home-sleep-planner progress::-moz-progress-bar { border-radius: 99px; background: var(--lavender); }
.sleep-habit-status { margin: 8px 0 0; color: var(--ink-faint); font-size: 12px; }
.home-sleep-tool__note { margin: 16px 0 0; color: var(--ink-faint); font-size: 11px; line-height: 1.5; }

.weekly-planner-page { padding-top: clamp(30px, 5vw, 68px); padding-bottom: 76px; }
.weekly-planner-intro h1 { max-width: 32ch; font-size: clamp(34px, 4vw, 52px); }
.weekly-planner-intro p { max-width: 68ch; margin: 14px 0 0; color: var(--ink-soft); font-size: 17px; }
.weekly-guidance {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px 36px;
  margin-top: 28px;
  padding: 24px 28px;
  border-radius: 14px;
  border: 1px solid rgba(104, 196, 146, 0.24);
  background: #101711;
}
.weekly-guidance h2 { margin-bottom: 8px; color: var(--brand-dark); font-size: 21px; }
.weekly-guidance p { max-width: 86ch; margin: 0; color: var(--ink-soft); }
.weekly-guidance a { font-weight: 700; text-underline-offset: 3px; }
.weekly-planner-layout {
  display: grid;
  grid-template-columns: minmax(310px, 0.78fr) minmax(0, 1.42fr);
  align-items: start;
  gap: 28px;
  margin-top: 30px;
}
.planner-controls {
  display: grid;
  gap: 22px;
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.planner-controls fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.planner-controls legend { margin-bottom: 10px; font-size: 15px; font-weight: 800; line-height: 1.4; }
.planner-choice-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.planner-choice-row:has(input:checked) { border-color: var(--brand); background: rgba(104, 196, 146, 0.12); }
.planner-choice-row input, .planner-day-choice input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--brand-dark); }
.planner-choice-row span { display: flex; flex-direction: column; gap: 2px; }
.planner-choice-row strong { font-size: 14px; line-height: 1.4; }
.planner-choice-row small { color: var(--ink-faint); font-size: 12px; line-height: 1.4; }
.planner-day-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.planner-day-choice {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 44px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.planner-day-choice.is-checked { border-color: var(--brand); background: rgba(104, 196, 146, 0.12); color: var(--brand-dark); }
.planner-field-note { margin: 9px 0 0; color: var(--ink-faint); font-size: 12px; line-height: 1.5; }
.planner-submit { justify-self: start; min-height: 46px; cursor: pointer; }
.planner-error { margin: -10px 0 0; color: var(--coral-dark); font-size: 13px; font-weight: 700; }
.weekly-plan-result { min-width: 0; padding-top: 4px; }
.weekly-plan-result__head { margin-bottom: 18px; }
.weekly-plan-result__head h2 { font-size: clamp(23px, 2.4vw, 30px); }
.weekly-plan-result__head p { max-width: 72ch; margin: 9px 0 0; color: var(--ink-soft); }
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 9px; }
.week-day {
  min-width: 0;
  min-height: 138px;
  padding: 13px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.week-day.is-active { border-color: rgba(104, 196, 146, 0.55); background: #101a14; }
.week-day h3 { margin-bottom: 12px; color: var(--brand-dark); font-family: var(--sans); font-size: 12px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.week-day p { margin: 0 0 8px; color: var(--ink-soft); font-size: 12px; line-height: 1.45; }
.week-day p:last-child { margin-bottom: 0; }
.week-day .week-day-rest { color: var(--ink-faint); }
.weekly-plan-note { max-width: 90ch; margin: 18px 0 0; color: var(--ink-faint); font-size: 12px; line-height: 1.6; }
.weekly-plan-note a { color: var(--brand-dark); text-underline-offset: 3px; }

/* ---------- Breadcrumb & article header ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--ink-faint);
  padding: 28px 0 0;
}
.breadcrumb a { color: var(--ink-soft); text-decoration: none; }
.breadcrumb a:hover { color: var(--coral-dark); text-decoration: underline; }
.back-home { margin: 18px 0 0; }
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, transform 0.15s;
}
.btn-ghost:hover { border-color: var(--coral); color: var(--coral-dark); transform: translateX(-2px); }
.article-header { max-width: 780px; margin: 34px auto 0; text-align: left; }
.article-header h1 { font-size: clamp(28px, 4.4vw, 42px); font-weight: 700; margin: 14px 0 16px; }
.article-header .standfirst { font-family: var(--serif); font-style: italic; font-size: 18.5px; color: var(--ink-soft); line-height: 1.65; margin: 0 0 18px; }
.article-meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
/* Keep article cover images aligned with the reading column. */
.article-cover { max-width: 720px; margin: 30px auto 0; }
.article-cover img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow-lift); }

/* ---------- Prose ---------- */
.prose { max-width: 68ch; margin: 40px auto 0; font-size: 17px; color: var(--ink); line-height: 1.82; }
.prose p { margin: 0 0 1.35em; }
.prose h2 { font-size: 26px; margin: 2.2em 0 0.7em; font-weight: 700; }
.prose h3 { font-size: 20px; margin: 1.8em 0 0.6em; font-weight: 600; }
.prose ul, .prose ol { margin: 0 0 1.35em; padding-left: 1.4em; }
.prose li { margin-bottom: 0.5em; }
.prose blockquote {
  margin: 1.6em 0;
  padding: 14px 22px;
  border-left: 4px solid var(--coral);
  background: var(--surface);
  border-radius: 0 12px 12px 0;
  color: var(--ink-soft);
  font-style: italic;
  box-shadow: var(--shadow);
}
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.5em; font-size: 15px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.prose th { background: var(--surface-raised); font-weight: 700; }
.prose a { color: var(--brand-dark); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
.prose a:hover { color: var(--coral-dark); }
.prose .note-box {
  background: rgba(104, 196, 146, 0.1);
  border: 1px solid rgba(104, 196, 146, 0.26);
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 15.5px;
  margin: 1.6em 0;
}
.sources { margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line); }
.sources h2 { font-size: 18px; margin-bottom: 12px; }
.sources ol { margin: 0; padding-left: 1.3em; font-size: 14px; color: var(--ink-soft); }
.sources li { margin-bottom: 7px; }

/* ---------- Prev / next + related ---------- */
.pager { max-width: 920px; margin: 56px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pager a {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px 24px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--brand);
  transition: box-shadow 0.22s, transform 0.22s, border-color 0.22s;
}
.pager a:hover { box-shadow: var(--shadow-lift); transform: translateY(-3px); border-top-color: var(--coral); }
.pager .dir { font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); font-weight: 800; display: block; margin-bottom: 6px; }
.pager .next { text-align: right; }
.pager strong { font-family: var(--serif); font-size: 17px; font-weight: 600; }

/* ---------- Category page ---------- */
.page-head { padding: 44px 0 8px; }
.page-head h1 { font-size: clamp(30px, 4.5vw, 44px); margin: 12px 0 10px; }
.page-head .lede { max-width: 640px; color: var(--ink-soft); font-size: 17px; margin: 0; }
.cat-accent { width: 56px; height: 6px; border-radius: 4px; }
.load-more-wrap { text-align: center; margin-top: 40px; }
.btn-solid {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand);
  color: #07110b;
  border: none;
  border-radius: 999px;
  padding: 13px 28px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--sans);
  box-shadow: var(--shadow);
  transition: background 0.18s, transform 0.18s, box-shadow 0.18s;
}
.btn-solid:hover { background: var(--brand-dark); color: #07110b; transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.hidden-by-js { display: none; }
.no-js .hidden-by-js { display: flex; }
.no-js .load-more-wrap { display: none; }

/* ---------- Contact page ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 44px; margin-top: 36px; }
.contact-block { border-left: 4px solid var(--coral); padding: 4px 0 4px 20px; margin-bottom: 30px; }
.contact-block h3 { font-size: 17px; margin-bottom: 7px; }
.contact-block p { margin: 0 0 8px; font-size: 14.5px; color: var(--ink-soft); }
.contact-block a { font-weight: 600; font-size: 14.5px; }
.contact-form { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px; border-top: 4px solid var(--brand); }
.contact-form label { display: block; font-size: 13.5px; font-weight: 700; margin: 0 0 6px; color: var(--ink); }
.contact-form .field { margin-bottom: 18px; }
.contact-form input, .contact-form textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 15px;
  font-family: var(--sans);
  background: var(--surface-raised);
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: 3px solid var(--brand-dark);
  outline-offset: 2px;
  border-color: var(--brand-dark);
  box-shadow: 0 0 0 2px var(--surface);
}
.contact-form textarea { min-height: 130px; resize: vertical; }
.contact-form .fineprint { font-size: 13px; color: var(--ink-faint); line-height: 1.6; margin: 12px 0 0; }

/* ---------- Legal pages ---------- */
.legal-body { max-width: 760px; margin: 36px auto 0; }
.legal-body h2 { font-size: 24px; margin: 2em 0 0.6em; }
.legal-body h3 { font-size: 17.5px; margin: 1.5em 0 0.5em; }
.legal-body p, .legal-body li { font-size: 15.5px; color: var(--ink-soft); }
.legal-body ul, .legal-body ol { padding-left: 1.4em; }
.legal-body li { margin-bottom: 0.45em; }
.legal-toc {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--pine);
  padding: 20px 24px;
  margin: 24px 0 8px;
  font-size: 14.5px;
}
.legal-toc strong { display: block; margin-bottom: 8px; font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); }
.legal-toc ol { margin: 0; padding-left: 1.3em; columns: 2; column-gap: 32px; }
.cc-credits { font-size: 14px; }
.cc-credits li { margin-bottom: 9px; }

/* ---------- Footer (deep forest chrome) ---------- */
.site-footer {
  margin-top: 80px;
  background: var(--pine);
  color: var(--on-pine-dim);
}
.site-footer::before {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(104, 196, 146, 0.64), transparent);
}
.footer-inner { padding: 44px 0 38px; }
.footer-top { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; padding-bottom: 24px; border-bottom: 1px solid rgba(226, 237, 231, 0.18); }
.footer-brand { display: flex; align-items: center; gap: 10px; color: #ffffff; text-decoration: none; }
.footer-brand svg { width: 30px; height: 30px; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-legal a {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--on-pine);
  text-decoration: none;
  border: 1px solid rgba(226, 237, 231, 0.3);
  border-radius: 999px;
  padding: 6px 15px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.footer-legal a:hover { background: var(--coral); border-color: var(--coral); color: #080a09; }
.disclaimer-bar {
  margin-top: 22px;
  font-size: 13px;
  color: var(--on-pine-dim);
  line-height: 1.65;
}
.footer-bottom { margin-top: 14px; font-size: 12.5px; color: var(--ink-faint); }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 96px 0 72px; }
.notfound .code { font-family: var(--serif); font-size: 96px; font-weight: 700; color: var(--coral); line-height: 1; }
.notfound h1 { font-size: 28px; margin: 18px 0 10px; }
.notfound p { color: var(--ink-soft); max-width: 460px; margin: 0 auto 26px; }

/* ---------- Responsive ---------- */
/* ---------- Tablet / iPad (681–1080px) ---------- */
@media (max-width: 1080px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cat-card:nth-child(5n) { border-right: 1px solid var(--line); }
  .cat-card:nth-child(2n), .cat-card:last-child { border-right: 0; }
  .cat-card:nth-child(n+3) { border-top: 1px solid var(--line); }
  .hero-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-card:last-child { grid-column: 1 / -1; justify-self: center; width: calc((100% - 22px) / 2); }
  .featured-stories .hero-card:last-child { grid-column: auto; justify-self: stretch; width: auto; }
  .weekly-planner-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  .contact-grid { grid-template-columns: 1fr; }
  .legal-toc ol { columns: 1; }
  .header-inner { gap: 14px; }
  /* Tighten the capsule before switching to the phone menu at 680px. */
  .main-nav { gap: 2px; padding: 4px; }
  .main-nav a { padding: 7px 10px; font-size: 13px; }
  .home-weekly-tool__inner { grid-template-columns: minmax(0, 1fr); }
  .home-sleep-tool__inner { grid-template-columns: minmax(0, 1fr); }
  .home-sleep-tool__copy h2 { scroll-margin-top: 96px; }
}
@media (max-width: 680px) {
  .container { padding-left: 32px; padding-right: 32px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-card:last-child { grid-column: auto; justify-self: stretch; width: auto; }
  .home-hero { padding: 24px 0 16px; }
  .home-hero__content h1 { max-width: 15ch; margin-top: 10px; font-size: clamp(34px, 7.5vw, 42px); }
  .home-hero__content > p { max-width: 36ch; margin-bottom: 14px; font-size: 15px; }
  .home-hero__cta { min-height: 44px; }
  .lead-spotlight { padding-bottom: 22px; }
  .lead-story-card .article-card-surface--wide {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
  }
  .lead-story-card .article-card-copy { grid-column: 1; grid-row: 1; padding: 18px 18px 14px; }
  .lead-story-card .article-card-title { font-size: clamp(20px, 5.6vw, 25px); }
  .lead-story-card .article-card-media {
    grid-column: 1;
    grid-row: 2;
    height: clamp(152px, 40vw, 198px);
    margin: 0 12px;
  }
  .lead-story-card .article-card-footer { grid-column: 1; grid-row: 3; margin: 14px 18px 0; }
  .featured-stories .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .picks-list { grid-template-columns: 1fr; }
  .pick-feature .article-card-surface--wide {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
  }
  .pick-feature .article-card-copy { grid-column: 1; grid-row: 1; }
  .pick-feature .article-card-media { grid-column: 1; grid-row: 2; }
  .pick-feature .article-card-footer { grid-column: 1; grid-row: 3; }
  /* At phone widths, the glass capsule becomes a floating vertical menu. */
  .main-nav {
    display: flex;
    position: absolute;
    /* Leave room below the sticky header and scroll within short landscape screens. */
    max-height: calc(100dvh - 94px);
    overflow-y: auto;
    overscroll-behavior: contain;
    top: calc(100% + 8px);
    left: 16px;
    right: 16px;
    max-width: 520px;
    margin-inline: auto;
    border: 1px solid rgba(226, 237, 231, 0.14);
    border-radius: 22px;
    background: rgba(9, 13, 11, 0.94);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);
    flex-direction: column;
    align-items: stretch;
    padding: 8px;
    gap: 4px;
    box-shadow: var(--shadow-lift);
    /* Keep the exit visible long enough for opacity and position to reverse. */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transform-origin: top center;
    transition:
      opacity 180ms cubic-bezier(0.23, 1, 0.32, 1),
      transform 180ms cubic-bezier(0.23, 1, 0.32, 1),
      visibility 0s linear 180ms;
  }
  .nav-open .main-nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition-delay: 0s, 0s, 0s;
  }
  .main-nav a {
    padding: 13px 14px;
    border-radius: 14px;
    font-size: 16px;
    color: var(--on-pine);
    opacity: 0;
    transform: translateY(6px);
    transition:
      color 0.18s ease,
      background-color 0.18s ease,
      box-shadow 0.18s ease,
      opacity 140ms cubic-bezier(0.23, 1, 0.32, 1),
      transform 140ms cubic-bezier(0.23, 1, 0.32, 1);
  }
  /* Reveal links in a short cascade without shifting the menu layout. */
  .nav-open .main-nav a {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0s, 0s, 0s, var(--nav-item-delay, 0s), var(--nav-item-delay, 0s);
  }
  .nav-open .main-nav a:nth-child(2) { --nav-item-delay: 30ms; }
  .nav-open .main-nav a:nth-child(3) { --nav-item-delay: 60ms; }
  .nav-open .main-nav a:nth-child(4) { --nav-item-delay: 90ms; }
  .nav-open .main-nav a:nth-child(5) { --nav-item-delay: 120ms; }
  .nav-open .main-nav a:nth-child(6) { --nav-item-delay: 150ms; }
  .main-nav a:hover { color: #ffffff; background: rgba(255, 255, 255, 0.07); }
  .main-nav a[aria-current='page'] {
    color: #f2fff7;
    background: rgba(var(--brand-rgb), 0.16);
    box-shadow: inset 0 0 0 1px rgba(var(--brand-rgb), 0.24);
  }
  .nav-toggle { display: inline-flex; }
  .card-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: minmax(0, 1fr); }
  .cat-card {
    min-height: 0;
    padding: 19px 10px 18px;
    border-right: 0;
  }
  .cat-card + .cat-card { border-top: 1px solid var(--line); }
  .pick-row h3 { font-size: 19px; }
  .pick-rank { font-size: 36px; }
  .pager { grid-template-columns: 1fr; }
  .article-card-copy { gap: 11px; padding: 19px 18px 14px; }
  .article-card-media { margin-right: 12px; margin-left: 12px; border-radius: 15px; }
  .article-card-footer { margin-right: 18px; margin-left: 18px; padding-bottom: 14px; }
  .section { padding-top: 46px; padding-bottom: 46px; }
  .section-head h2 { font-size: 24px; }
  .home-weekly-tool { padding-top: 20px; }
  .home-weekly-tool__inner { gap: 18px; padding: 20px; }
  .home-weekly-tool__copy h2 { max-width: 18ch; margin-bottom: 8px; font-size: 27px; }
  .home-weekly-tool__copy p { margin-bottom: 14px; }
  .home-activity-check { padding: 16px; }
  .home-activity-check__head { margin-bottom: 12px; }
  .home-activity-check__fields { gap: 8px; }
  .home-activity-check__fields label { font-size: 12px; }
  .home-activity-check__fields small { font-size: 10px; }
  .home-activity-check input[type='number'] { min-height: 42px; padding: 7px 8px; }
  .home-activity-check__progress { margin-top: 12px; }
  .home-sleep-tool__inner { gap: 24px; padding: 24px; }
  .home-sleep-tool__copy h2 { max-width: 18ch; font-size: 29px; }
  .home-sleep-planner { padding: 18px; }
  .home-sleep-planner__timing { grid-template-columns: 1fr; gap: 16px; }
  .weekly-planner-page { padding-top: 30px; padding-bottom: 52px; }
  .weekly-planner-intro h1 { font-size: 34px; }
  .weekly-guidance { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 20px; }
  .planner-controls { padding: 18px; }
  .planner-day-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .week-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .week-day { min-height: 124px; }
}
@media (max-width: 460px) {
  .cat-grid { grid-template-columns: 1fr; }
  .cat-card { min-height: 0; }
  .home-activity-check__fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sleep-target-options label { justify-content: center; gap: 5px; padding: 8px 6px; font-size: 12px; white-space: nowrap; }
  .sleep-habit-list { grid-template-columns: 1fr; }
  .planner-day-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Shared reveal values consumed by explicit Web Animations keyframes. */
.viewport-reveal {
  --viewport-reveal-x: 0px;
  --viewport-reveal-y: 28px;
  --viewport-reveal-tilt: 1.4deg;
  --viewport-reveal-scale: 0.988;
  --viewport-reveal-origin: 50% 78%;
  transform-origin: var(--viewport-reveal-origin);
}
.viewport-reveal--content {
  --viewport-reveal-y: 18px;
  --viewport-reveal-tilt: 0.7deg;
  --viewport-reveal-scale: 0.996;
  --viewport-reveal-origin: 50% 84%;
}
.viewport-reveal--from-left {
  --viewport-reveal-x: -24px;
  --viewport-reveal-y: 18px;
  --viewport-reveal-origin: 72% 78%;
}
.viewport-reveal--from-right {
  --viewport-reveal-x: 24px;
  --viewport-reveal-y: 18px;
  --viewport-reveal-origin: 28% 78%;
}

/* At compact widths, reveal vertically without rotating full-width sections out of bounds. */
@media (max-width: 1080px) {
  .viewport-reveal,
  .viewport-reveal--content,
  .viewport-reveal--from-left,
  .viewport-reveal--from-right {
    --viewport-reveal-x: 0px;
    --viewport-reveal-tilt: 0deg;
    --viewport-reveal-origin: 50% 78%;
  }
}

@media (max-width: 460px) {
  /* A category heading and its metadata may need separate rows on small phones. */
  .section-head { flex-wrap: wrap; }
  .section-head .eyebrow { white-space: normal; max-width: 100%; overflow-wrap: anywhere; }
}
/* Keep reveal motion inside the mobile content gutter so cards never drift sideways. */
@media (max-width: 680px) {
  .viewport-reveal--from-left,
  .viewport-reveal--from-right {
    --viewport-reveal-x: 0px;
    --viewport-reveal-origin: 50% 78%;
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  body::before,
  body::after { animation: none; }
  .article-card-pulse-trace { animation: none; opacity: 0; }
  /* Keep the menu state readable while removing its positional movement. */
  .main-nav,
  .main-nav a { transform: none; }
  .hero-card:hover .article-card-surface,
  .post-card:hover .article-card-surface,
  .pick-row:hover .article-card-surface { translate: none !important; }
  .article-card-surface { transform: none !important; }
  .hero-card:hover .article-card-media img,
  .post-card:hover .article-card-media img,
  .pick-row:hover img { transform: none !important; }
  .viewport-reveal,
  .viewport-reveal.is-visible {
    opacity: 1 !important;
    translate: none !important;
    rotate: none !important;
    scale: none !important;
    filter: none !important;
  }
}

/* Keep the shared navigation legible when backdrop blur is unavailable. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header { background: #080b09; }
}
@media (prefers-reduced-transparency: reduce) {
  .site-header { background: #080b09; }
  .site-header { -webkit-backdrop-filter: none; backdrop-filter: none; }
}
/* Plain-text contact addresses remain readable and selectable without opening mail apps. */
.contact-email {
  color: var(--brand);
  font-weight: 800;
  overflow-wrap: anywhere;
  user-select: text;
}
