/* ========================================
   AI Academy – Bento Hero Layout
   ======================================== */

/* CSS Variables */
:root {
  --color-bg: #ffffff;
  --color-bg-secondary: #f5f5f7;
  --color-text: #1d1d1f;
  --color-text-muted: #6e6e73;
  --color-accent: #0071e3;
  --color-border: rgba(0, 0, 0, 0.08);
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --transition-smooth: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
  --transition-fast: all 0.2s ease;
  --radius-xl: 28px;
  --radius-lg: 22px;
}

/* Final compact horizontal timeline override */
.timeline {
  display: flex !important;
  grid-template-columns: none !important;
  flex-wrap: nowrap !important;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 14px;
  scroll-snap-type: x proximity;
  scrollbar-color: rgba(0, 113, 227, 0.42) rgba(17, 24, 32, 0.08);
}

.timeline::before,
.timeline::after {
  content: "";
  flex: 0 0 8px;
}

.timeline-item {
  flex: 0 0 112px !important;
  width: 112px !important;
  max-width: 112px !important;
  min-height: 58px;
  scroll-snap-align: start;
}

@media (max-width: 700px) {
  .timeline {
    display: flex !important;
    grid-template-columns: none !important;
    flex-wrap: nowrap !important;
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .timeline-item {
    flex-basis: 108px !important;
    width: 108px !important;
    max-width: 108px !important;
  }

  .learn-chapter-head h2 {
    max-width: 100%;
    font-size: 30px;
    line-height: 1.08;
  }

  .learn-chapter-head h2 span {
    display: block;
  }

  .timeline-focus {
    width: auto;
    max-width: calc(100vw - 32px);
    margin-left: 0;
    margin-right: 0;
  }

  .timeline-focus-content {
    max-width: 100%;
    font-size: 14px;
    overflow-wrap: break-word;
  }

  .timeline-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }
}

/* Ambient Background Canvas */
#ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

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

html {
  overflow-x: hidden;
  max-width: 100vw;
}

/* The landing page uses the same typeface as Daily AI news: the system
   font (SF Pro on Apple devices), with Inter where that isn't available.
   Only the family changes; sizes and weights stay the landing page's own. */
.landing-page {
  --font-primary: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

body {
  font-family: var(--font-primary);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100vw;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-overflow-scrolling: touch;
}

input, select, textarea, button {
  font-size: 16px !important;
  touch-action: manipulation;
}

img {
  max-width: 100%;
  height: auto;
}

/* ========================================
   Header
   ======================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo {
  --logo-size: 69px;
  position: relative;
  display: block;
  flex: 0 0 var(--logo-size);
  width: var(--logo-size);
  height: var(--logo-size);
  color: inherit;
  text-decoration: none;
  isolation: isolate;
}

.logo-lockup,
.logo-wordmark,
.logo-rotor,
.logo-academy {
  position: absolute;
  inset: 0;
  display: block;
}

.logo-lockup {
  overflow: visible;
}

.logo-wordmark,
.logo-rotor,
.logo-academy {
  background: url("../img/ai_academy_logo.png") center / 100% 100% no-repeat;
}

.logo-wordmark {
  clip-path: inset(50% 0 0);
  opacity: 0.9;
  transition: opacity 0.4s ease;
}

.logo-rotor {
  z-index: 2;
  clip-path: inset(0 9% 48%);
  transform-origin: 50% 31%;
  opacity: 0.9;
  transition: opacity 0.35s ease;
  will-change: transform;
}

.logo-academy {
  z-index: 3;
  clip-path: inset(77% 0 12%);
  opacity: 0;
  pointer-events: none;
}

.logo:is(:hover, :focus-visible) .logo-wordmark {
  opacity: 0.9;
}

.logo:is(:hover, :focus-visible) .logo-rotor {
  animation: logo-rotor-spin 0.8s linear infinite;
}

.logo:focus-visible {
  border-radius: 12px;
  outline: 3px solid rgba(0, 113, 227, 0.5);
  outline-offset: 2px;
}

@keyframes logo-rotor-spin {
  to { transform: rotate(1turn); }
}

.nav {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--color-text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.02em;
  opacity: 0.75;
  transition: var(--transition-fast);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-text);
  transition: var(--transition-smooth);
}

.nav-link:hover { opacity: 1; }
.nav-link:hover::after { width: 100%; }

/* ========================================
   Shared Button
   ======================================== */
.btn-primary {
  display: inline-block;
  padding: 10px 22px;
  margin-top: 8px;
  background: #0071e3;
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border-radius: 980px;
  letter-spacing: -0.01em;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-primary:hover {
  background: #0077ed;
  transform: scale(1.05);
  box-shadow: 0 4px 14px rgba(0, 113, 227, 0.4);
}

.btn-primary:active { transform: scale(0.95); }

/* Header Button Image Hovers */
.btn-image-hover,
.btn-ai-chess {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  z-index: 0;
}

.btn-image-hover::before,
.btn-ai-chess::before {
  content: '';
  position: absolute;
  inset: -4px;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: blur(1px);
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
  z-index: -1;
  border-radius: inherit;
}

.btn-learn-ai::before {
  background-color: #fff;
  background-image: url('https://commons.wikimedia.org/wiki/Special:FilePath/ChatGPT-Logo.png');
  background-size: 130%;
}

.btn-ai-chess::before {
  background-image: url('/static/img/chess.png');
}

.btn-benchmarks::before {
  background-image:
    linear-gradient(90deg, rgba(3, 31, 49, .48), rgba(3, 31, 49, .58)),
    url('/static/img/ai_benchmarks_hover.jpg?v=water-1');
  filter: saturate(1.15) contrast(1.05);
}

.btn-ai-ceo::before {
  background-image:
    linear-gradient(90deg, rgba(2, 9, 20, 0.2), rgba(2, 13, 29, 0.5) 50%, rgba(2, 9, 20, 0.2)),
    url('/static/img/ai_ceo_hover.jpg');
  background-position: center;
  background-size: cover;
  filter: saturate(1.05) contrast(1.08);
}

.btn-research::before {
  background-image:
    linear-gradient(rgba(0, 113, 227, 0.1), rgba(0, 113, 227, 0.18)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 360'%3E%3Crect width='640' height='360' fill='%23f8fbff'/%3E%3Cg fill='none' stroke='%230071e3' stroke-width='10' opacity='0.45'%3E%3Ccircle cx='500' cy='92' r='72'/%3E%3Cpath d='M68 270 C150 132 238 312 330 164 S510 104 584 234'/%3E%3C/g%3E%3Ctext x='64' y='206' fill='%231d1d1f' font-family='Arial, sans-serif' font-size='92' font-weight='800'%3EE=mc²%3C/text%3E%3C/svg%3E");
}

.btn-image-hover:hover::before,
.btn-image-hover:focus-visible::before,
.btn-ai-chess:hover::before,
.btn-ai-chess:focus-visible::before {
  opacity: 1;
}

.btn-image-hover:hover,
.btn-image-hover:focus-visible,
.btn-ai-chess:hover,
.btn-ai-chess:focus-visible {
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  background: transparent;
}

.btn-ai-ceo {
  position: relative;
  overflow: visible;
}

.btn-ai-ceo::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  width: max-content;
  max-width: 250px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(17, 17, 17, 0.96);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
  text-align: left;
  white-space: normal;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.btn-ai-ceo:hover::after,
.btn-ai-ceo:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Text-first header navigation; artwork appears on hover and keyboard focus. */
.header .header-container { justify-content: flex-start; gap: 28px; }
.header .header-container .nav { justify-content: flex-start; gap: 12px; }
.header .header-container .nav .btn-primary {
  margin-top: 0;
  padding: 10px 16px;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: #1d1d1f;
  font-size: 16px;
  font-weight: 500;
  text-shadow: none;
  transform: none;
}
.landing-page .header .header-container .nav .btn-primary { color: #eef4ff; }
.header .header-container .nav .btn-primary[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 7px;
  font-weight: 600;
}
.header .header-container .nav .btn-primary:is(:hover, :focus-visible) {
  background: #ededf2;
  color: #1d1d1f;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .12);
}
.header .header-container .nav .btn-image-hover:is(:hover, :focus-visible) {
  background: transparent;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .65);
}
.header .header-container .nav .btn-learn-ai:is(:hover, :focus-visible) {
  color: #1d1d1f;
  text-shadow: 0 1px 3px rgba(255, 255, 255, .95);
}
.header .header-container .nav .btn-primary:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
@media (max-width: 700px) {
  .header .header-container { gap: 8px; }
  .header .header-container .nav { gap: 2px; }
  .header .header-container .nav .btn-primary { padding: 8px 5px; font-size: 12px !important; }
}

/* ========================================
   Main Content
   ======================================== */
.main-content {
  padding-top: 72px;
  position: relative;
  z-index: 1;
}

/* ========================================
   Cosmic Landing
   ======================================== */
.landing-page {
  --landing-header-offset: 72px;
  background: #02050c;
}

.landing-page.has-live-news-banner {
  --landing-header-offset: 108px;
}

.landing-page #ambient-bg {
  z-index: 0;
  mix-blend-mode: screen;
}

.landing-page .header {
  background: rgba(2, 5, 12, 0.68);
  border-bottom-color: rgba(112, 180, 255, 0.14);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
  backdrop-filter: saturate(125%) blur(20px);
  -webkit-backdrop-filter: saturate(125%) blur(20px);
}

.landing-page .logo {
  background: transparent;
  box-shadow: none;
}

.landing-page .logo-academy {
  opacity: 0.98;
  filter: brightness(0) invert(1);
}

.landing-page .logo-rotor {
  filter: drop-shadow(0 0 0.7px rgba(255, 255, 255, 0.88));
}

.landing-page .btn-primary {
  margin-top: 0;
  color: rgba(235, 246, 255, 0.9);
  background: rgba(7, 22, 45, 0.7);
  border: 1px solid rgba(114, 184, 255, 0.2);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05);
}

.landing-page .btn-primary:hover,
.landing-page .btn-primary:focus-visible {
  color: #ffffff;
  background: rgba(13, 45, 86, 0.82);
  border-color: rgba(95, 186, 255, 0.5);
  box-shadow: 0 8px 30px rgba(0, 108, 226, 0.24), inset 0 1px rgba(255, 255, 255, 0.09);
}

.btn-learn-ai:hover,
.btn-learn-ai:focus-visible,
.landing-page .btn-learn-ai:hover,
.landing-page .btn-learn-ai:focus-visible {
  color: #1d1d1f;
  text-shadow: 0 1px 3px rgba(255, 255, 255, .95);
}

.landing-page .main-content {
  background: #02050c;
}

.cosmic-globe-stage {
  position: relative;
  min-height: calc(240svh - var(--landing-header-offset));
  overflow: clip;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 30%, rgba(7, 29, 62, 0.74) 0%, rgba(2, 7, 17, 0.28) 34%, transparent 59%),
    #02050c;
}

.hero-intro {
  position: relative;
  z-index: 1;
  min-height: calc(100svh - var(--landing-header-offset));
  width: 100%;
  margin: 0;
  padding: 0;
  color: #ffffff;
  background: transparent;
  overflow: visible;
  isolation: isolate;
}

/* The globe and the wordmark are driven from one set of numbers so the letters
   are always standing on the horizon. They used to be placed independently -
   the globe off `top`, the wordmark off its own `bottom` - so every change of
   viewport shape slid one past the other. Measured across nine window shapes,
   the letters' feet landed anywhere from 18px to 607px off the limb. */
.cosmic-hero-visual {
  /* Half again as wide as before. The horizon is a curve and the wordmark is
     flat-bottomed, so the only way to seat every letter without burying the
     middle of the word is a shallower arc under it. */
  --globe-d: max(300svh, clamp(230vw, calc(645vw - 4980px), 300vw));
  --globe-top: 71%;
  --mark-w: min(54vw, calc(91svh - var(--landing-header-offset)));
  /* The horizon is a curve, so seating the wordmark on its apex still leaves the
     outer letters hanging: across the mark's span the limb drops by roughly
     (mark-w/2)^2 / (2 * radius), which measured 11px to 50px depending on the
     window - visible daylight under the far foot of the A and the I.
     CSS cannot square a length, but that sag over the mark's own width is a
     ratio that stays inside a narrow band (~0.036 to ~0.052 across every shape
     tested), so a single fraction of --mark-w covers it. Taking the top of that
     band seats the outermost foot everywhere and costs a little extra dip at the
     centre on the widest globes, which is what the reference shows anyway. */
  --mark-sink: calc(var(--mark-w) * 0.052 + 0.35%);
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: visible;
  perspective: 1400px;
  background: transparent;
}

/* A pool of shade behind the hero copy only. This used to be a full-height
   left-to-right wash, which also crossed the globe and left the limb dim on one
   side - in the reference the lit edge is even the whole way across. Pinned to
   the top-left and faded out well above the horizon so it never touches it. */
.cosmic-hero-visual::after {
  content: '';
  position: absolute;
  z-index: 4;
  inset: 0;
  background: radial-gradient(
    62% 52% at 4% 16%,
    rgba(0, 2, 8, 0.88) 0%,
    rgba(0, 3, 10, 0.46) 42%,
    transparent 76%
  );
  pointer-events: none;
}

/* bottom is solved from the globe, not chosen by eye:
     limb            = globe-top + 0.003 * globe-d      (disc apex: the 47%
                                                         clip radius against
                                                         the -2.7% shift)
     glyph inset     = 0.0044 * mark-w                  (the viewBox pads the
                                                         art below the letters)
   so bottom = (100% - globe-top) - 0.003*d - 0.0044*w - sink. */
.cosmic-ai-mark {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: calc(
    100% - var(--globe-top)
    - var(--globe-d) * 0.003
    - var(--mark-w) * 0.0044
    - var(--mark-sink)
  );
  width: var(--mark-w);
  height: auto;
  max-width: none;
  overflow: visible;
  transform: translateX(-50%);
}

.ai-vector-layer {
  fill: #087dff;
  mix-blend-mode: screen;
  pointer-events: none;
}

.ai-vector-glow-bloom {
  fill: #006cff;
  opacity: 0.72;
  filter: url('#ai-glow-bloom');
}

.ai-vector-glow-wide {
  fill: #087fff;
  opacity: 0.9;
  filter: url('#ai-glow-wide');
}

.ai-vector-glow-tight {
  fill: #3ba4ff;
  opacity: 1;
  filter: url('#ai-glow-tight');
}

.ai-vector-core {
  fill: #ffffff;
  stroke: rgba(255, 255, 255, 0.96);
  stroke-width: 2;
  stroke-linejoin: round;
  filter:
    drop-shadow(0 0 7px rgba(98, 190, 255, 1))
    drop-shadow(0 0 20px rgba(0, 126, 255, 0.94))
    drop-shadow(0 0 46px rgba(0, 92, 255, 0.68));
  pointer-events: none;
}

/* Fixed geometry shared by the WebGL sphere and the photographic fallback. */
.cosmic-earth-shell {
  position: absolute;
  z-index: 3;
  top: var(--globe-top);
  left: 50%;
  display: block;
  width: var(--globe-d);
  aspect-ratio: 1;
  max-width: none;
  clip-path: circle(47% at 50% 50%);
  background: #031026;
  transform: translate(-50%, -2.7%);
  pointer-events: none;
}

/* Keep the existing photographic surface and horizon alignment. Lighting is
   separate from the moving image, so the sun does not move during the reveal. */
.cosmic-earth-shell::after {
  content: '';
  position: absolute;
  inset: 3%;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 34% 0%, rgba(169, 218, 255, 0.16), transparent 26%),
    linear-gradient(112deg, transparent 32%, rgba(0, 6, 18, 0.22) 58%, rgba(0, 3, 12, 0.6) 84%),
    radial-gradient(circle at 50% 38%, transparent 35%, rgba(0, 4, 14, 0.48) 72%);
  pointer-events: none;
}

.cosmic-hero-earth {
  --earth-face: 285deg;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 106%;
  height: auto;
  max-width: none;
  transform-origin: 50% 50%;
  transform: translate(-50%, -50%) rotate(var(--earth-face));
  filter: contrast(1.08) saturate(1.04);
  /* Show the photograph while WebGL loads. Inherit visibility so the shell
     can hide it after the first fully textured canvas frame takes over. */
  visibility: inherit;
  pointer-events: none;
  backface-visibility: hidden;
}

.cosmic-earth-canvas {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  max-width: none;
  opacity: 0;
  transition: opacity 180ms ease-out;
  pointer-events: none;
}

.has-earth-renderer .cosmic-earth-canvas {
  opacity: 1;
}

.has-earth-renderer .cosmic-earth-shell {
  visibility: hidden;
  transition: visibility 0s 180ms;
}

@media (prefers-reduced-motion: reduce) {
  .cosmic-earth-canvas,
  .has-earth-renderer .cosmic-earth-shell {
    transition: none;
  }
}

/* Sized and placed to match the globe exactly, so the ring lands on the clipped
   disc edge rather than floating around it. */
.cosmic-earth-aura {
  position: absolute;
  z-index: 4;
  top: var(--globe-top);
  left: 50%;
  width: var(--globe-d);
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -2.7%);
  pointer-events: none;
}

/* Bright white-cyan limb over the sphere, surrounded by the broad blue aura. */
.cosmic-earth-aura::before {
  content: '';
  position: absolute;
  inset: 3%;
  border-radius: 50%;
  border: clamp(1.5px, 0.12vw, 3.5px) solid rgba(184, 242, 255, 0.96);
  box-shadow:
    0 0 7px 2px rgba(78, 211, 255, 0.92),
    0 0 22px 5px rgba(12, 133, 255, 0.76);
  filter: blur(0.6px);
}

/* The atmosphere throwing light out into space. This is the part the reference
   has and the old build did not: the glow belongs outside the disc, falling off
   over a long distance, rather than as a haze sitting on the surface. Layered
   shadows rather than one, so the falloff is steep near the limb and long
   further out the way scattered light actually behaves. */
.cosmic-earth-aura::after {
  content: '';
  position: absolute;
  inset: 3%;
  border-radius: 50%;
  box-shadow:
    0 0 clamp(14px, 0.9vw, 34px) clamp(2px, 0.16vw, 7px) rgba(150, 218, 255, 0.62),
    0 0 clamp(40px, 2.6vw, 100px) clamp(8px, 0.55vw, 22px) rgba(78, 178, 255, 0.44),
    0 0 clamp(105px, 6.6vw, 250px) clamp(20px, 1.4vw, 56px) rgba(24, 128, 255, 0.3),
    0 0 clamp(220px, 13vw, 480px) clamp(40px, 2.8vw, 110px) rgba(6, 92, 226, 0.19);
}

.hero-copy {
  position: absolute;
  z-index: 5;
  left: clamp(28px, 5vw, 78px);
  top: clamp(48px, 8vh, 76px);
  /* Grows with the viewport, as the AI wordmark beside it does, so the
     larger copy keeps clear of the A's left stroke. */
  width: min(clamp(300px, 29vw, 440px), calc(100% - 56px));
  padding: 0;
  text-align: left;
}

.hero-copy > .hero-eyebrow,
.hero-copy > .hero-headline,
.hero-copy > .hero-blurb,
.hero-copy > .hero-scroll-hint {
  opacity: 0;
  filter: blur(7px);
  transform: translateY(12px);
  animation: cosmic-copy-reveal 0.85s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-copy > .hero-eyebrow {
  animation-delay: 3.05s;
}

.hero-copy > .hero-headline {
  animation-delay: 3.16s;
}

.hero-copy > .hero-blurb {
  animation-delay: 3.3s;
}

.hero-copy > .hero-scroll-hint {
  animation-delay: 3.44s;
}

.hero-eyebrow {
  margin-bottom: 14px;
  color: #8dcbff;
  font-size: clamp(11px, 0.9vw, 14px);
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-headline {
  margin-bottom: 18px;
  color: #ffffff;
  font-size: clamp(34px, 3.9vw, 60px);
  font-weight: 850;
  letter-spacing: -0.052em;
  line-height: 1.01;
}

.hero-headline-accent {
  display: inline-block;
}

@property --hero-purple-x {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 82%;
}

@property --hero-purple-y {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 50%;
}

.hero-headline-accent-text {
  --hero-purple-x: 82%;
  --hero-purple-y: 50%;
  display: inline-block;
  background-image:
    radial-gradient(
      circle at var(--hero-purple-x) var(--hero-purple-y),
      #ffffff 0%,
      #a8dcff 22%,
      rgba(76, 171, 255, 0) 58%
    ),
    linear-gradient(100deg, #ffffff 0%, #99d6ff 46%, #168dff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 12px rgba(43, 155, 255, 0.32));
  animation: hero-blue-drift 5.8s ease-in-out infinite alternate;
  transition: --hero-purple-x 0.5s ease, --hero-purple-y 0.5s ease, filter 0.25s ease;
}

.hero-headline-accent:hover .hero-headline-accent-text {
  filter: drop-shadow(0 0 18px rgba(43, 155, 255, 0.5)) saturate(1.05) brightness(1.04);
}

.hero-headline-accent.is-pointer-tracking .hero-headline-accent-text {
  animation: none;
}

.hero-blurb {
  max-width: 24em;
  margin: 0;
  color: rgba(221, 237, 251, 0.72);
  font-size: clamp(14px, 1.15vw, 18px);
  font-weight: 450;
  line-height: 1.55;
}

.hero-scroll-hint {
  display: flex;
  justify-content: flex-start;
  margin-top: 20px;
}

.scroll-dot {
  width: 5px;
  height: 5px;
  background: #8dcbff;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(59, 164, 255, 0.1), 0 0 18px rgba(59, 164, 255, 0.6);
  opacity: 0.82;
  animation: scroll-bounce 2.4s ease-in-out infinite;
}

@keyframes cosmic-copy-reveal {
  from {
    opacity: 0;
    filter: blur(7px);
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(10px); opacity: 0.8; }
}

@keyframes hero-blue-drift {
  0% {
    --hero-purple-x: 58%;
    --hero-purple-y: 40%;
  }
  50% {
    --hero-purple-x: 92%;
    --hero-purple-y: 62%;
  }
  100% {
    --hero-purple-x: 68%;
    --hero-purple-y: 46%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-option,
  .landing-option-arrow,
  .cosmic-hero-earth,
  .scroll-dot {
    animation: none;
    transition: none;
  }

  .hero-headline-accent-text {
    animation: none;
    transition: none;
  }

  .hero-copy > .hero-eyebrow,
  .hero-copy > .hero-headline,
  .hero-copy > .hero-blurb,
  .hero-copy > .hero-scroll-hint {
    opacity: 1;
    filter: none;
    transform: none;
    animation: none;
  }
}

/* ========================================
   Cosmic Landing Options
   ======================================== */
.academy-ways {
  position: relative;
  z-index: 6;
  width: min(1200px, 100%);
  margin: -62px auto 0;
  padding: 0 32px 120px;
}

.landing-options {
  position: relative;
  padding: 0 0 94px;
}

.builder-eyebrow {
  color: #55adff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.landing-options-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  overflow: visible;
  border: 0;
  background: transparent;
}

.landing-option {
  --option-accent: #78bdff;
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  min-width: 0;
  min-height: 126px;
  padding: 24px 22px;
  border: 1px solid color-mix(in srgb, var(--option-accent) 62%, rgba(255, 255, 255, 0.2));
  border-radius: 18px;
  color: #f7fbff;
  cursor: pointer;
  text-decoration: none;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--option-accent) 27%, #08172b), #0a172a);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.24),
    0 4px 0 color-mix(in srgb, var(--option-accent) 24%, #020711),
    0 16px 34px rgba(0, 0, 0, 0.38),
    0 0 28px color-mix(in srgb, var(--option-accent) 10%, transparent);
  backdrop-filter: blur(14px) saturate(122%);
  -webkit-backdrop-filter: blur(14px) saturate(122%);
  overflow: hidden;
  transform: translateY(0);
  transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.landing-option:nth-child(2) {
  --option-accent: #b5a0ff;
}

.landing-option:nth-child(3) {
  --option-accent: #ffbd99;
}

.landing-option:hover,
.landing-option:focus-visible {
  color: #ffffff;
  border-color: color-mix(in srgb, var(--option-accent) 76%, rgba(255, 255, 255, 0.22));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--option-accent) 38%, #0b203a), #10243b);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.3),
    0 6px 0 color-mix(in srgb, var(--option-accent) 32%, #020711),
    0 22px 44px rgba(0, 0, 0, 0.46),
    0 0 38px color-mix(in srgb, var(--option-accent) 18%, transparent);
  transform: translateY(-4px);
}

.landing-option:active {
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.13),
    0 10px 24px rgba(0, 0, 0, 0.36);
  transform: translateY(3px) scale(0.99);
}

.landing-option:focus-visible {
  z-index: 1;
  outline: 3px solid color-mix(in srgb, var(--option-accent) 82%, white);
  outline-offset: 4px;
}

.landing-option-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--option-accent);
  background: color-mix(in srgb, var(--option-accent) 10%, rgba(1, 8, 20, 0.38));
  border: 1px solid color-mix(in srgb, var(--option-accent) 36%, transparent);
  border-radius: 13px;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06), 0 0 24px color-mix(in srgb, var(--option-accent) 12%, transparent);
}

.landing-option-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.landing-option-copy {
  min-width: 0;
}

.landing-option-copy strong {
  display: block;
  font-size: clamp(20px, 1.8vw, 25px);
  font-weight: 720;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.landing-option-copy small {
  display: block;
  margin-top: 8px;
  color: #c6d7e8;
  font-size: 13px;
  font-weight: 450;
  line-height: 1.45;
}

.landing-option-arrow {
  position: static;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid color-mix(in srgb, var(--option-accent) 58%, transparent);
  border-radius: 999px;
  color: #041322;
  background: var(--option-accent);
  box-shadow: 0 0 22px color-mix(in srgb, var(--option-accent) 14%, transparent);
  font-size: 18px;
  font-weight: 800;
  transition: color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.landing-option:hover .landing-option-arrow,
.landing-option:focus-visible .landing-option-arrow {
  color: #031021;
  background: color-mix(in srgb, var(--option-accent) 72%, white);
  box-shadow: 0 0 28px color-mix(in srgb, var(--option-accent) 36%, transparent);
  transform: translate(3px, -3px);
}

.landing-option:last-child:hover .landing-option-arrow,
.landing-option:last-child:focus-visible .landing-option-arrow {
  transform: translateY(3px);
}

@media (prefers-reduced-motion: reduce) {
  .landing-option,
  .landing-option-arrow {
    transition: none;
  }

  .landing-option:hover,
  .landing-option:focus-visible,
  .landing-option:active,
  .landing-option:is(:hover, :focus-visible) .landing-option-arrow,
  .landing-option:last-child:is(:hover, :focus-visible) .landing-option-arrow {
    transform: none;
  }
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Full author bio remains a separate section below the choices. */
.way-builder {
  --profile-ink: #f5f9ff;
  --profile-muted: rgba(213, 229, 244, 0.72);
  --profile-blue: #68b9ff;
  --profile-violet: #a68cff;
  position: relative;
  scroll-margin-top: 96px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(250px, 0.48fr);
  gap: clamp(36px, 5vw, 72px);
  padding: clamp(48px, 6vw, 78px) clamp(28px, 5vw, 68px) clamp(30px, 4vw, 48px);
  color: var(--profile-ink);
  background: transparent;
  border-block: 1px solid rgba(111, 184, 255, 0.16);
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.way-builder::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--profile-blue), var(--profile-violet));
}

.builder-copy,
.builder-portrait,
.builder-footer {
  position: relative;
  z-index: 1;
}

.builder-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 20px;
  color: var(--profile-blue);
}

.builder-eyebrow::before {
  content: '';
  width: 26px;
  height: 2px;
  background: currentColor;
}

.builder-copy h2 {
  max-width: 14ch;
  margin-bottom: 24px;
  color: var(--profile-ink);
  font-size: clamp(38px, 4.4vw, 58px);
  font-weight: 850;
  letter-spacing: -0.052em;
  line-height: 1.01;
}

.builder-bio {
  max-width: 62ch;
  color: var(--profile-muted);
  font-size: 16px;
  line-height: 1.78;
}

.builder-bio a {
  color: #8dcbff;
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.builder-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 34px 0 0;
}

.builder-facts > div {
  min-width: 0;
  padding: 17px 18px 18px;
  background: rgba(5, 16, 34, 0.46);
  border: 1px solid rgba(111, 184, 255, 0.14);
  border-radius: 14px;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.builder-facts dt {
  margin-bottom: 7px;
  color: var(--profile-blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.builder-facts > div:nth-child(even) dt {
  color: var(--profile-violet);
}

.builder-facts dd {
  margin: 0;
  color: rgba(234, 243, 252, 0.8);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
}

.builder-portrait {
  align-self: start;
  justify-self: end;
  width: min(100%, 292px);
  margin: 0;
  padding: 10px 10px 20px;
  background: rgba(5, 16, 34, 0.5);
  border: 1px solid rgba(111, 184, 255, 0.17);
  border-radius: 22px;
  box-shadow: 0 28px 64px -42px rgba(0, 101, 219, 0.48), inset 0 1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(14px);
}

.builder-portrait img {
  display: block;
  width: 50%;
  margin-inline: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 22%;
  border-radius: 14px;
}

/* Beneath the portrait, never across the face. */
.builder-portrait figcaption {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 18px 10px 0;
}

.builder-portrait figcaption strong {
  color: var(--profile-ink);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.builder-portrait figcaption span {
  color: rgba(213, 229, 244, 0.7);
  font-size: 13px;
  line-height: 1.5;
}

.builder-portrait .portrait-company {
  align-self: flex-start;
  margin: 9px 0 6px;
  padding: 7px 10px;
  color: #9bd5ff;
  background: rgba(18, 101, 181, 0.16);
  border: 1px solid rgba(104, 185, 255, 0.24);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.builder-portrait .portrait-place {
  color: rgba(198, 216, 233, 0.52);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.builder-footer {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 3fr);
  gap: 18px;
  margin-top: 2px;
  padding: 14px;
  background: rgba(5, 16, 34, 0.22);
  border: 1px solid rgba(111, 184, 255, 0.13);
  border-radius: 22px;
}

.builder-links,
.academy-channels {
  display: grid;
  min-width: 0;
  gap: 10px;
}

.builder-links {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.academy-channels {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-left: 18px;
  border-left: 1px solid rgba(111, 184, 255, 0.13);
}

.builder-links a,
.academy-channels a {
  color: rgba(238, 247, 255, 0.9);
  text-decoration: none;
}

.social-logo-link {
  --social-brand: #f5f7fb;
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 112px;
  padding: 17px 10px 14px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  overflow: hidden;
  background: rgba(8, 23, 45, 0.34);
  border: 1px solid rgba(134, 194, 248, 0.12);
  border-radius: 15px;
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.social-logo-link::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 18%, color-mix(in srgb, var(--social-brand) 15%, transparent), transparent 54%);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.social-logo-mark {
  position: relative;
  z-index: 1;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--social-brand);
}

.social-logo-mark svg {
  display: block;
  width: 100%;
  height: 100%;
}

.social-logo-label {
  position: relative;
  z-index: 1;
  max-width: 100%;
  overflow: hidden;
  color: rgba(238, 247, 255, 0.88);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-logo-linkedin {
  --social-brand: #2d9bf0;
}

.social-logo-huggingface {
  --social-brand: #ffd21e;
}

.social-logo-youtube {
  --social-brand: #ff1744;
}

.social-logo-tiktok .social-logo-mark {
  filter: drop-shadow(-1.5px 0 #25f4ee) drop-shadow(1.5px 0 #fe2c55);
}

.social-logo-instagram {
  --social-brand: #ff5e9a;
}

.builder-links a:hover,
.academy-channels a:hover {
  color: inherit;
  transform: translateY(-3px);
  background: rgba(13, 35, 65, 0.58);
  border-color: color-mix(in srgb, var(--social-brand) 42%, transparent);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.2);
}

.builder-links a:hover::before,
.academy-channels a:hover::before {
  opacity: 1;
}

.builder-links a:focus-visible,
.academy-channels a:focus-visible,
.builder-bio a:focus-visible {
  outline: 3px solid rgba(95, 184, 255, 0.64);
  outline-offset: 3px;
}

.academy-channels-title {
  grid-column: 1 / -1;
  padding: 2px 2px 0;
  color: rgba(198, 216, 233, 0.52);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ========================================
   Responsive, Minimal Options + Bio
   ======================================== */
@media (max-width: 1100px) {
  .hero-copy {
    left: 32px;
  }

  .way-builder {
    padding: 56px 46px 38px;
  }
}

@media (max-width: 860px) {
  .hero-intro {
    padding: 0;
  }

  .hero-copy {
    left: 24px;
    width: min(320px, calc(100% - 48px));
  }

  .cosmic-ai-mark {
    width: min(64vw, calc(91svh - var(--landing-header-offset)));
  }

  .academy-ways {
    padding: 0 24px 88px;
  }

  .landing-options-list {
    grid-template-columns: 1fr;
  }

  .landing-option {
    min-height: 104px;
    padding-inline: 20px;
  }

  .way-builder {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.52fr);
    gap: 36px;
  }

  .builder-copy h2 {
    font-size: clamp(34px, 5.4vw, 46px);
  }

  .builder-facts {
    grid-template-columns: 1fr;
  }

  .builder-footer {
    grid-template-columns: 1fr;
  }

  .academy-channels {
    padding: 18px 0 0;
    border-top: 1px solid rgba(111, 184, 255, 0.13);
    border-left: 0;
  }
}

@media (max-width: 640px) {
  .hero-intro {
    padding: 0;
  }

  /* A phone is far narrower than the globe, so it only ever sees a slim column
     of it. Pulling the diameter in brings the lit band into that column instead
     of leaving a strip of open ocean under the horizon. Set on the shared vars
     so the wordmark follows the smaller globe instead of drifting off it. */
  .cosmic-hero-visual {
    /* The vw floor matters on a landscape or short phone: sized off svh alone
       the globe collapses to a few hundred pixels, and a tight arc under a
       wide word puts the outer letters back in open space. Portrait phones are
       unaffected - svh wins there, so the lit band stays as tuned. */
    --globe-d: max(150svh, 270vw);
    --mark-w: min(90vw, 440px, calc(91svh - var(--landing-header-offset)));
  }

  /* The scrim that keeps the hero copy readable runs left-to-right on desktop,
     where the text sits in the left margin. On a phone the copy is at the top
     and the globe is at the bottom, so the same gradient was dimming half the
     Earth - here it falls downward and clears before the horizon. */
  .cosmic-hero-visual::after {
    background: linear-gradient(180deg, rgba(0, 2, 8, 0.82) 0%, rgba(0, 3, 10, 0.42) 22%, transparent 46%);
  }


  .hero-copy {
    top: 26px;
    left: 18px;
    width: min(320px, calc(100% - 36px));
    transform: none;
  }

  .hero-eyebrow {
    margin-bottom: 10px;
    font-size: 11px;
  }

  .hero-headline {
    margin-bottom: 12px;
    font-size: clamp(32px, 9.6vw, 40px);
  }

  .hero-blurb {
    margin: 0;
    max-width: 300px;
    font-size: 15px;
  }

  .hero-scroll-hint {
    margin-top: 15px;
  }

  .academy-ways {
    margin-top: -48px;
    padding: 0 16px 60px;
  }

  .landing-options {
    padding: 0 0 64px;
  }

  .landing-options-list {
    grid-template-columns: 1fr;
    grid-auto-flow: row;
    overflow: visible;
  }

  .landing-option {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    min-height: 88px;
    gap: 12px;
    padding: 18px 16px;
  }

  .landing-option-copy strong {
    font-size: 22px;
  }

  .landing-option-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .way-builder {
    grid-template-columns: 1fr;
    gap: 34px;
    margin: 0;
    padding: 40px 20px 20px 24px;
    border-radius: 0;
  }

  /* Portrait first on a phone: the face introduces the bio that follows. */
  .builder-portrait {
    order: -1;
    justify-self: stretch;
    width: 100%;
    margin: 0;
    padding: 8px 8px 18px;
  }

  .builder-portrait img {
    aspect-ratio: 16 / 11;
    object-position: center 24%;
  }

  .builder-copy h2 {
    max-width: none;
    font-size: 34px;
  }

  .builder-facts {
    grid-template-columns: 1fr;
  }

  .builder-footer {
    gap: 12px;
    padding: 10px;
  }

  .builder-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .academy-channels {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding-top: 12px;
  }

  .social-logo-link {
    min-height: 104px;
    padding-inline: 7px;
  }

  .social-logo-mark {
    width: 38px;
    height: 38px;
  }

  .social-logo-label {
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .social-logo-link {
    transition: background 0.15s ease, border-color 0.15s ease;
  }

  .builder-links a:hover,
  .academy-channels a:hover {
    transform: none;
  }
}

/* ========================================
   Research Page
   ======================================== */
.research-main {
  min-height: 100vh;
  padding: 128px 24px 80px;
}

.research-hero,
.research-papers {
  max-width: 900px;
  margin: 0 auto;
}

.research-hero {
  padding: 38px 0 28px;
}

.research-eyebrow {
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 18px;
  text-transform: uppercase;
}

.research-eyebrow a,
.research-paper a:not(.btn-primary) {
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 113, 227, 0.25);
}

.research-eyebrow a:hover,
.research-paper a:not(.btn-primary):hover {
  border-bottom-color: var(--color-accent);
}

.research-hero h1 {
  font-size: clamp(44px, 8vw, 84px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 22px;
}

.research-subtitle {
  color: var(--color-text-muted);
  font-size: 20px;
  line-height: 1.55;
  max-width: 720px;
}

.research-paper {
  padding: 38px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: rgba(245, 245, 247, 0.68);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.research-papers {
  display: grid;
  gap: 22px;
}

.research-paper-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.research-paper-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 113, 227, 0.08);
  color: var(--color-accent);
  font-size: 12px;
  font-weight: 700;
}

.research-paper h2 {
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.research-paper p {
  color: var(--color-text-muted);
  font-size: 16px;
  line-height: 1.75;
  margin-bottom: 16px;
}

.research-paper-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.research-paper-button {
  margin-top: 0;
}

@media (max-width: 680px) {
  .research-main {
    padding: 96px 16px 56px;
  }

  .research-hero {
    padding-top: 20px;
  }

  .research-subtitle {
    font-size: 17px;
  }

  .research-paper {
    padding: 24px;
    border-radius: 20px;
  }

  .research-paper h2 {
    font-size: 22px;
  }
}

/* ========================================
   Timeline Page
   ======================================== */
.hero-sections {
  max-width: 1200px;
  margin: 36px auto 8px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(12, 48, 92, 0.08);
  background:
    radial-gradient(120% 140% at 10% 0%, rgba(0, 113, 227, 0.16), transparent 58%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 252, 0.92));
  box-shadow: 0 24px 50px rgba(13, 35, 66, 0.08);
  cursor: pointer;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
  min-height: 320px;
}

.hero-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 64px rgba(13, 35, 66, 0.14);
  border-color: rgba(0, 113, 227, 0.2);
}

.hero-card-image {
  position: relative;
  min-height: 200px;
}

.hero-card-bg {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-card-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.18) 55%, rgba(255, 255, 255, 0.92));
  pointer-events: none;
}

.hero-card:hover .hero-card-bg {
  transform: scale(1.07);
}

.hero-card-info {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 18px 24px 24px;
}

.hero-card-info h2 {
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.06;
  letter-spacing: -0.04em;
  color: #18212d;
}

.hero-subtitle {
  font-size: 15px;
  line-height: 1.55;
  color: #5c6978;
}

.timeline-section {
  padding: 120px 24px;
  max-width: 800px;
  margin: 0 auto;
}

.timeline-title {
  text-align: left;
  font-size: clamp(30px, 4.2vw, 42px);
  font-weight: 700;
  margin-bottom: 18px;
  letter-spacing: -0.03em;
}

.timeline-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.timeline-search-wrap {
  flex: 1 1 320px;
}

.timeline-search-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #607188;
  margin-bottom: 8px;
}

.timeline-search {
  width: 100%;
  border: 1px solid rgba(29, 29, 31, 0.14);
  background: rgba(247, 250, 255, 0.95);
  color: #17202b;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 15px !important;
  line-height: 1.3;
}

.timeline-search:focus {
  outline: none;
  border-color: rgba(0, 113, 227, 0.45);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.12);
}

.timeline-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.timeline-filter {
  border: 1px solid rgba(29, 29, 31, 0.13);
  border-radius: 999px;
  padding: 8px 12px;
  background: #f4f7fb;
  color: #2d3948;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.timeline-filter:hover {
  transform: translateY(-1px);
  background: #edf4ff;
}

.timeline-filter.is-active {
  background: #0e5bb1;
  border-color: #0e5bb1;
  color: #ffffff;
}

.timeline-ruler {
  margin-bottom: 20px;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid rgba(0, 113, 227, 0.16);
  background:
    radial-gradient(120% 180% at 8% 0%, rgba(14, 91, 177, 0.14), transparent 58%),
    linear-gradient(155deg, rgba(14, 91, 177, 0.1), rgba(14, 91, 177, 0.02));
  box-shadow: 0 16px 34px rgba(11, 25, 48, 0.12);
}

.timeline-ruler-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.timeline-ruler-label {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #4f6480;
}

.timeline-ruler-active {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #173357;
}

.timeline-ruler-track-wrap { position: relative; }

.timeline-ruler-track {
  position: relative;
  height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(13, 86, 167, 0.12);
  overflow: hidden;
}

.timeline-ruler-track::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 2px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, rgba(13, 86, 167, 0.22), rgba(13, 86, 167, 0.58), rgba(13, 86, 167, 0.22));
}

.timeline-ruler-progress {
  position: absolute;
  left: 0; top: 50%;
  height: 4px; width: 0%;
  transform: translateY(-50%);
  border-radius: 999px;
  background: linear-gradient(90deg, #2f9bff, #0e5bb1);
  box-shadow: 0 0 14px rgba(47, 155, 255, 0.58);
  transition: width 0.3s ease;
}

.timeline-ruler-cursor {
  position: absolute;
  top: 50%; left: 0%;
  width: 14px; height: 14px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: #ffffff;
  border: 3px solid #0e5bb1;
  box-shadow: 0 0 0 8px rgba(14, 91, 177, 0.14);
  transition: left 0.3s ease;
}

.timeline-ruler-dots {
  position: absolute;
  inset: 0;
}

.timeline-ruler-dot {
  --lane: 0;
  appearance: none;
  padding: 0;
  position: absolute;
  top: 50%;
  width: 10px; height: 10px;
  border-radius: 50%;
  transform: translate(-50%, calc(-50% + (var(--lane) * 8px)));
  background: #b8cde8;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px rgba(14, 91, 177, 0.22);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.timeline-ruler-dot:hover,
.timeline-ruler-dot:focus-visible {
  transform: translate(-50%, calc(-50% + (var(--lane) * 8px))) scale(1.2);
  background: #55a8ff;
}

.timeline-ruler-dot:focus-visible {
  outline: 2px solid rgba(14, 91, 177, 0.5);
  outline-offset: 2px;
}

.timeline-ruler-dot.is-active {
  background: #0e5bb1;
  transform: translate(-50%, calc(-50% + (var(--lane) * 8px))) scale(1.35);
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 8px rgba(14, 91, 177, 0.2);
}

.timeline-ruler-dot.is-hidden { display: none; }

.timeline-ruler-years {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: #5f738d;
}

.timeline {
  position: relative;
  padding-left: 34px;
  border-left: 1px solid rgba(0, 113, 227, 0.24);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.timeline-item {
  position: relative;
  margin-bottom: 0;
  padding-left: 22px;
  cursor: pointer;
  outline: none;
}

.timeline-item.is-hidden { display: none; }

.timeline-marker {
  position: absolute;
  left: -41px; top: 14px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--color-accent);
  z-index: 1;
  box-shadow: 0 0 0 3px #ffffff;
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.timeline-year {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 8px;
  line-height: 1.1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: rgba(0, 113, 227, 0.08);
  border: 1px solid rgba(0, 113, 227, 0.16);
  border-radius: 999px;
  padding: 6px 11px;
  transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

.timeline-content {
  padding: 15px 18px;
  background: linear-gradient(145deg, #f8fafd 0%, #eef3f9 100%);
  border-radius: 14px;
  min-height: 0;
  border: 1px solid var(--color-border);
  font-size: 15px;
  line-height: 1.55;
  color: #1f2329;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.timeline-item:hover .timeline-content,
.timeline-item:focus-visible .timeline-content,
.timeline-item.is-active .timeline-content {
  transform: translateY(-2px);
  border-color: rgba(0, 113, 227, 0.3);
  box-shadow: 0 14px 30px rgba(14, 91, 177, 0.16);
}

.timeline-item:hover .timeline-marker,
.timeline-item:focus-visible .timeline-marker,
.timeline-item.is-active .timeline-marker {
  transform: scale(1.12);
  border-color: #0d56a7;
  box-shadow: 0 0 0 3px #ffffff, 0 0 0 7px rgba(14, 91, 177, 0.15);
}

.timeline-item:hover .timeline-year,
.timeline-item:focus-visible .timeline-year,
.timeline-item.is-active .timeline-year {
  background: rgba(0, 113, 227, 0.16);
  border-color: rgba(0, 113, 227, 0.3);
  color: #0d56a7;
}

.timeline-event-list {
  margin: 0; padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.timeline-event-list li {
  display: inline-flex;
  align-items: center;
  line-height: 1.45;
}

.timeline-event-list li+li::before {
  content: "•";
  color: rgba(0, 113, 227, 0.65);
  margin-right: 8px;
}

.timeline-item.timeline-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.timeline-item.timeline-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   FAQ Sections
   ======================================== */
.faq-section {
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 24px;
}

.faq-container {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  overflow: hidden;
}

.faq-toggle {
  width: 100%;
  padding: 24px 32px;
  background: none;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: var(--transition-fast);
  font-family: var(--font-primary);
}

.faq-toggle:hover { background: var(--color-bg-secondary); }

.faq-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--color-text);
  text-align: left;
}

.faq-icon {
  font-size: 32px;
  font-weight: 300;
  color: var(--color-accent);
  transition: transform 0.3s ease;
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.faq-content.active {
  max-height: 10000px;
  padding-bottom: 32px;
}

.faq-placeholder {
  text-align: center;
  padding: 40px;
  color: var(--color-text-muted);
  font-size: 16px;
}

.timeline-wrapper {
  padding: 0 32px 8px;
}

.faq-images {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 32px;
  align-items: center;
}

.faq-image {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.image-explanation {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  padding: 24px 32px;
  border-radius: 16px;
  margin-bottom: 20px;
  border-left: 4px solid var(--color-accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.explanation-text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  margin: 0;
}

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

.explanation-text .example {
  font-style: italic;
  color: var(--color-text-muted);
  font-size: 15px;
}

.agent-link {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: border-bottom-color 0.2s ease;
}

.agent-link:hover { border-bottom-color: var(--color-accent); }

.button-container {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 32px;
  flex-wrap: wrap;
}

.button-container .btn-primary { margin-top: 0; }

@media (max-width: 900px) {
  .hero-sections {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-card:last-child {
    grid-column: 1 / -1;
  }

  .timeline-wrapper { padding: 0 20px 6px; }
  .timeline-title { text-align: center; margin-bottom: 28px; }
  .timeline-toolbar { justify-content: center; }
  .timeline-search-wrap { flex-basis: 100%; }
  .timeline { padding-left: 26px; gap: 12px; }
  .timeline-item { padding-left: 16px; }
  .timeline-marker { left: -33px; top: 13px; }
  .timeline-content { padding: 14px; font-size: 14px; }
  .timeline-ruler { padding: 14px; }
  .timeline-ruler-head { margin-bottom: 10px; }
  .timeline-ruler-active { font-size: 13px; }
  .timeline-ruler-track { height: 40px; }
}

@media (max-width: 560px) {
  .hero-sections {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 20px;
    padding: 0 16px;
  }

  .hero-card {
    min-height: 268px;
    border-radius: 24px;
  }

  .hero-card:last-child {
    grid-column: auto;
  }

  .hero-card-image {
    min-height: 164px;
  }

  .hero-card-info {
    padding: 16px 18px 20px;
  }

  .hero-card-info h2 {
    font-size: 28px;
  }

  .hero-subtitle {
    font-size: 14px;
  }

  .timeline-filter { font-size: 12px; padding: 7px 10px; }
  .timeline-year { font-size: 12px; padding: 5px 10px; }
  .timeline-content { border-radius: 12px; line-height: 1.5; }
  .timeline-ruler { padding: 12px; }
  .timeline-ruler-active { font-size: 12px; line-height: 1.35; }
  .timeline-ruler-track { height: 38px; }
  .timeline-ruler-dot { width: 9px; height: 9px; }
  .timeline-ruler-years { font-size: 11px; }
}

/* ========================================
   LearnAI Redesign
   ======================================== */
.learn-hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 78px 24px 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 430px);
  gap: 52px;
  align-items: end;
}

.learn-hero-copy {
  max-width: 760px;
}

.learn-eyebrow,
.learn-section-kicker {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.learn-hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(44px, 6vw, 76px);
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: 0;
  color: #121820;
}

.learn-section-nav {
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(29, 29, 31, 0.12);
  border-bottom: 1px solid rgba(29, 29, 31, 0.12);
}

.learn-section-nav a {
  display: grid;
  gap: 5px;
  padding: 18px 0;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(29, 29, 31, 0.1);
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.learn-section-nav a:last-child {
  border-bottom: 0;
}

.learn-section-nav a:hover {
  color: var(--color-accent);
  padding-left: 10px;
}

.learn-section-nav span {
  font-size: 19px;
  font-weight: 750;
  line-height: 1.15;
}

.learn-section-nav small {
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.35;
}

.learn-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px 96px;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 54px;
  align-items: start;
}

.learn-sidebar {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 8px;
  padding-top: 8px;
}

.learn-sidebar a {
  color: #4d5968;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  padding: 10px 0;
  border-bottom: 1px solid rgba(29, 29, 31, 0.08);
  transition: color 0.2s ease, transform 0.2s ease;
}

.learn-sidebar a:hover {
  color: var(--color-accent);
  transform: translateX(4px);
}

.learn-content {
  min-width: 0;
  display: grid;
  gap: 74px;
}

.learn-section {
  scroll-margin-top: 100px;
}

.learn-section-head {
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(29, 29, 31, 0.12);
}

.learn-section-head h2 {
  margin: 0;
  font-size: clamp(31px, 4vw, 52px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: 0;
  color: #151b24;
}

.timeline-wrapper {
  padding: 0;
}

.timeline-title,
.timeline-marker,
.timeline-ruler {
  display: none;
}

.timeline-toolbar {
  align-items: end;
  margin-bottom: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(29, 29, 31, 0.1);
}

.timeline-search {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.timeline-filter {
  border-radius: 8px;
  background: transparent;
}

.timeline-filter.is-active {
  background: #1f2329;
  border-color: #1f2329;
}

.timeline {
  padding-left: 0;
  border-left: 0;
  display: grid;
  gap: 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: minmax(116px, 150px) minmax(0, 1fr);
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(29, 29, 31, 0.1);
}

.timeline-year {
  display: block;
  width: fit-content;
  margin: 2px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #1667c5;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.35;
}

.timeline-content {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #1f2329;
  font-size: 16px;
  line-height: 1.62;
}

.timeline-item:hover .timeline-content,
.timeline-item:focus-visible .timeline-content,
.timeline-item.is-active .timeline-content {
  transform: none;
  box-shadow: none;
  color: #10151c;
}

.timeline-item:hover .timeline-year,
.timeline-item:focus-visible .timeline-year,
.timeline-item.is-active .timeline-year {
  background: transparent;
  border-color: transparent;
  color: #004f9f;
}

.timeline-item:hover,
.timeline-item:focus-visible,
.timeline-item.is-active {
  background: rgba(0, 113, 227, 0.035);
}

.timeline-item.timeline-reveal {
  transform: translateY(12px);
}

.timeline-event-list {
  display: grid;
  gap: 5px;
}

.timeline-event-list li+li::before {
  content: "";
  display: none;
}

.faq-images {
  padding: 0;
  gap: 26px;
  align-items: stretch;
}

.image-explanation {
  max-width: 760px;
  margin-bottom: 0;
  padding: 0 0 0 22px;
  border-radius: 0;
  border: 0;
  border-left: 3px solid var(--color-accent);
  background: transparent;
  box-shadow: none;
}

.explanation-text {
  font-size: 17px;
  line-height: 1.75;
}

.faq-image {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.1);
}

.learn-section-media .button-container {
  justify-content: flex-start;
}

@media (max-width: 900px) {
  .learn-hero {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 54px;
  }

  .learn-layout {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .learn-sidebar {
    position: static;
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 0 0 10px;
    border-bottom: 1px solid rgba(29, 29, 31, 0.1);
  }

  .learn-sidebar a {
    flex: 0 0 auto;
    border-bottom: 0;
  }

  .timeline-item {
    grid-template-columns: minmax(96px, 124px) minmax(0, 1fr);
    gap: 18px;
  }

  .timeline-toolbar {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .learn-hero {
    padding: 38px 16px 24px;
  }

  .learn-hero h1 {
    font-size: clamp(39px, 13vw, 52px);
  }

  .learn-layout {
    padding: 20px 16px 72px;
  }

  .learn-content {
    gap: 56px;
  }

  .learn-section-head h2 {
    font-size: 32px;
  }

  .timeline-toolbar {
    gap: 12px;
  }

  .timeline-filters {
    width: 100%;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 16px 0;
  }

  .timeline-year {
    font-size: 12px;
  }

  .timeline-content {
    font-size: 15px;
  }

  .image-explanation {
    padding-left: 16px;
  }

  .explanation-text {
    font-size: 16px;
  }
}

/* Final compact horizontal timeline override */
.timeline {
  display: flex !important;
  grid-template-columns: none !important;
  flex-wrap: nowrap !important;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 14px;
  scroll-snap-type: x proximity;
  scrollbar-color: rgba(0, 113, 227, 0.42) rgba(17, 24, 32, 0.08);
}

.timeline::before,
.timeline::after {
  content: "";
  flex: 0 0 8px;
}

.timeline-item {
  flex: 0 0 112px !important;
  width: 112px !important;
  max-width: 112px !important;
  min-height: 58px;
  scroll-snap-align: start;
}

@media (max-width: 700px) {
  .timeline {
    display: flex !important;
    grid-template-columns: none !important;
    flex-wrap: nowrap !important;
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .timeline-item {
    flex-basis: 108px !important;
    width: 108px !important;
    max-width: 108px !important;
  }
}

/* Horizontal milestone scrubber override */
.timeline {
  display: flex;
  flex-direction: row;
  grid-template-columns: none;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 14px;
  scroll-snap-type: x proximity;
  scrollbar-color: rgba(0, 113, 227, 0.42) rgba(17, 24, 32, 0.08);
}

.timeline::before {
  content: "";
  flex: 0 0 8px;
}

.timeline::after {
  content: "";
  flex: 0 0 8px;
}

.timeline-item {
  flex: 0 0 112px;
  min-height: 58px;
  scroll-snap-align: start;
}

@media (max-width: 700px) {
  .timeline {
    grid-template-columns: none;
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .timeline-item {
    flex-basis: 108px;
  }
}

/* LearnAI visual rail timeline */
.learn-cover-grid {
  display: block;
}

.learn-cover-visual,
.learn-chapter-image,
.timeline-toolbar {
  display: none !important;
}

.timeline-wrapper {
  padding-left: 96px;
}

.timeline-focus {
  margin: 0 0 22px;
  max-width: 920px;
}

.timeline {
  display: none !important;
}

.timeline-visual {
  position: relative;
  height: 140px;
  max-width: 980px;
  margin: 0;
  padding: 28px 0 36px;
}

.visual-timeline-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 68px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #5f6f82 0 28%, #0071e3 28% 72%, #21a67a 72% 100%);
  box-shadow: 0 8px 24px rgba(0, 113, 227, 0.12);
}

.visual-timeline-marker {
  position: absolute;
  top: 68px;
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 50%;
  border: 3px solid #ffffff;
  background: #0071e3;
  box-shadow: 0 0 0 1px rgba(17, 24, 32, 0.16), 0 8px 18px rgba(17, 24, 39, 0.12);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.visual-timeline-marker:hover,
.visual-timeline-marker:focus-visible,
.visual-timeline-marker.is-active {
  transform: translate(-50%, -50%) scale(1.55);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.14), 0 12px 24px rgba(17, 24, 39, 0.16);
  outline: none;
}

.visual-era-foundations { background: #5f6f82; }
.visual-era-consumer { background: #0071e3; }
.visual-era-genai { background: #21a67a; }

.timeline-visual::before,
.timeline-visual::after {
  position: absolute;
  top: 92px;
  color: #687586;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.timeline-visual::before {
  content: "1950";
  left: 0;
}

.timeline-visual::after {
  content: "2026";
  right: 0;
}

@media (max-width: 980px) {
  .timeline-wrapper {
    padding-left: 0;
  }
}

@media (max-width: 700px) {
  .learn-cover-visual,
  .learn-chapter-image {
    display: none !important;
  }

  .timeline-visual {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    height: 126px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .visual-timeline-line {
    left: 0;
    right: auto;
    width: 760px;
  }

  .visual-timeline-marker {
    transform: translate(-50%, -50%);
  }

  .timeline-visual::after {
    left: 730px;
    right: auto;
  }
}

/* ========================================
   LearnAI Chapter Layout
   ======================================== */
.learn-cover {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(44px, 6vw, 76px) 24px 36px;
}

.learn-cover-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.learn-cover-copy {
  min-width: 0;
}

.learn-cover h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(36px, 5.8vw, 68px);
  line-height: 0.98;
  font-weight: 820;
  letter-spacing: 0;
  color: #111820;
}

.learn-cover-visual {
  position: relative;
  min-height: 270px;
}

.learn-cover-visual img {
  position: absolute;
  width: 190px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(17, 24, 32, 0.1);
  box-shadow: 0 22px 48px rgba(17, 24, 39, 0.14);
}

.learn-cover-visual img:nth-child(1) {
  top: 0;
  right: 70px;
  z-index: 2;
}

.learn-cover-visual img:nth-child(2) {
  top: 58px;
  right: 0;
  z-index: 3;
}

.learn-cover-visual img:nth-child(3) {
  top: 116px;
  right: 128px;
  z-index: 1;
}

.learn-jump-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(17, 24, 32, 0.14);
}

.learn-jump-links a {
  color: #18212d;
  text-decoration: none;
  font-size: 15px;
  font-weight: 750;
  padding: 9px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.learn-jump-links a:hover {
  color: var(--color-accent);
  border-color: currentColor;
}

.learn-chapters {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 100px;
  display: grid;
  gap: clamp(54px, 7vw, 92px);
}

.learn-chapter {
  scroll-margin-top: 104px;
}

.learn-chapter-head {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 170px;
  gap: 24px;
  align-items: start;
  margin-bottom: 24px;
  padding-top: 22px;
  border-top: 1px solid rgba(17, 24, 32, 0.18);
}

.learn-chapter-number {
  position: sticky;
  top: 104px;
  color: rgba(17, 24, 32, 0.23);
  font-size: clamp(34px, 5vw, 56px);
  line-height: 0.88;
  font-weight: 850;
  letter-spacing: 0;
}

.learn-chapter-head h2 {
  max-width: 720px;
  margin: 0;
  color: #111820;
  font-size: clamp(28px, 4.1vw, 48px);
  line-height: 1.02;
  font-weight: 820;
  letter-spacing: 0;
}

.learn-chapter-head p:not(.learn-section-kicker) {
  margin: 12px 0 0;
  color: var(--color-text-muted);
  font-size: 17px;
  line-height: 1.45;
}

.learn-chapter-image {
  width: 170px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(17, 24, 32, 0.1);
  box-shadow: 0 14px 32px rgba(17, 24, 39, 0.09);
}

.timeline-wrapper {
  padding: 0;
}

.timeline-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: end;
  gap: 16px;
  margin: 0 0 20px 96px;
  padding: 0 0 20px;
  border-bottom: 1px solid rgba(17, 24, 32, 0.12);
}

.timeline-search-label {
  color: #536172;
}

.timeline-search {
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.82);
}

.timeline-filters {
  justify-content: flex-end;
}

.timeline-filter {
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.58);
}

.timeline-filter.is-active {
  background: #121820;
  border-color: #121820;
}

.timeline {
  padding-left: 96px;
  border-left: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.timeline-title,
.timeline-marker,
.timeline-ruler {
  display: none;
}

.timeline-item {
  position: relative;
  overflow: hidden;
  min-height: 142px;
  display: grid;
  grid-template-columns: 1fr;
  align-content: space-between;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(17, 24, 32, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.54);
  box-shadow: none;
  cursor: pointer;
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.timeline-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #006bd6;
}

.timeline-item::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(17, 24, 32, 0.1);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.95) 0 25%, transparent 26%),
    conic-gradient(from 40deg, rgba(0, 113, 227, 0.86), rgba(33, 191, 148, 0.62), rgba(0, 113, 227, 0.86));
  opacity: 0.7;
}

.timeline-item[data-era="foundations"]::before { background: #5f6f82; }
.timeline-item[data-era="consumer"]::before { background: #0071e3; }
.timeline-item[data-era="genai"]::before { background: #21a67a; }

.timeline-item[data-era="foundations"]::after {
  background:
    linear-gradient(90deg, transparent 45%, rgba(95, 111, 130, 0.9) 46% 54%, transparent 55%),
    linear-gradient(transparent 45%, rgba(95, 111, 130, 0.9) 46% 54%, transparent 55%);
  opacity: 0.42;
}

.timeline-item[data-era="consumer"]::after {
  background:
    radial-gradient(circle at 50% 50%, #ffffff 0 22%, transparent 24%),
    conic-gradient(from 10deg, #0071e3, #7ab8ff, #0071e3);
}

.timeline-item[data-era="genai"]::after {
  background:
    radial-gradient(circle at 30% 34%, #21a67a 0 12%, transparent 13%),
    radial-gradient(circle at 70% 34%, #21a67a 0 12%, transparent 13%),
    radial-gradient(circle at 50% 72%, #21a67a 0 12%, transparent 13%),
    linear-gradient(35deg, transparent 42%, rgba(33, 166, 122, 0.55) 43% 48%, transparent 49%),
    linear-gradient(-35deg, transparent 42%, rgba(33, 166, 122, 0.55) 43% 48%, transparent 49%);
  opacity: 0.7;
}

.timeline-item.is-truncated {
  display: none;
}

.timeline-item:hover,
.timeline-item:focus-visible,
.timeline-item.is-active {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(0, 113, 227, 0.32);
}

.timeline-year {
  display: block;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #006bd6;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
}

.timeline-content {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #1f252d;
  font-size: 14px;
  line-height: 1.48;
}

.timeline-actions {
  padding-left: 96px;
  margin-top: 18px;
}

.timeline-toggle {
  appearance: none;
  border: 1px solid rgba(17, 24, 32, 0.16);
  border-radius: 999px;
  background: #121820;
  color: #ffffff;
  cursor: pointer;
  font-family: var(--font-primary);
  font-size: 14px !important;
  font-weight: 750;
  line-height: 1;
  padding: 12px 18px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.timeline-toggle:hover {
  background: #26313f;
  transform: translateY(-1px);
}

/* Compact hover timeline: show details in one panel instead of every card. */
.timeline-focus {
  margin: 0 0 18px 96px;
  min-height: 126px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
  padding: 22px 24px;
  border: 1px solid rgba(0, 113, 227, 0.18);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(245, 249, 255, 0.72)),
    radial-gradient(80% 120% at 0% 0%, rgba(0, 113, 227, 0.11), transparent 55%);
  box-shadow: 0 18px 44px rgba(17, 24, 39, 0.08);
}

.timeline-focus-year {
  color: #006bd6;
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 850;
  line-height: 0.98;
  letter-spacing: 0;
}

.timeline-focus-content {
  max-width: 780px;
  color: #151b24;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.44;
  font-weight: 650;
}

.timeline-focus-content .timeline-event-list {
  font-size: inherit;
}

.timeline {
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 8px;
}

.timeline-item {
  min-height: 62px;
  align-content: center;
  justify-items: start;
  gap: 0;
  padding: 12px 12px 12px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
}

.timeline-item.is-truncated {
  display: grid;
}

.timeline-item::before {
  width: 3px;
}

.timeline-item::after {
  top: 50%;
  right: 10px;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
}

.timeline-year {
  max-width: calc(100% - 22px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timeline-content {
  display: none;
}

.timeline-item:hover,
.timeline-item:focus-visible,
.timeline-item.is-active {
  transform: translateY(-2px);
  background: #ffffff;
  border-color: rgba(0, 113, 227, 0.42);
}

.timeline-item:hover .timeline-content,
.timeline-item:focus-visible .timeline-content,
.timeline-item.is-active .timeline-content {
  transform: none;
  box-shadow: none;
}

.timeline-item:hover .timeline-year,
.timeline-item:focus-visible .timeline-year,
.timeline-item.is-active .timeline-year {
  background: transparent;
  border-color: transparent;
  color: #004f9f;
}

.timeline-event-list {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
}

.timeline-event-list li+li::before {
  content: "";
  display: none;
}

.lesson-stack {
  display: grid;
  gap: 42px;
}

.lesson-row {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(26px, 5vw, 64px);
  align-items: center;
  padding-left: 96px;
}

.lesson-row-flip .image-explanation {
  order: 2;
}

.lesson-row-flip .faq-image {
  order: 1;
}

.image-explanation {
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.explanation-text {
  color: #1f252d;
  font-size: clamp(16px, 1.6vw, 18px);
  line-height: 1.66;
}

.faq-image {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(17, 24, 39, 0.1);
}

.lesson-stack .button-container {
  justify-content: flex-start;
  padding-left: 96px;
}

@media (max-width: 980px) {
  .timeline-toolbar,
  .timeline-focus,
  .timeline,
  .timeline-actions,
  .lesson-row,
  .lesson-stack .button-container {
    padding-left: 0;
    margin-left: 0;
  }

  .learn-chapter-head {
    grid-template-columns: 1fr 140px;
    gap: 12px;
  }

  .learn-chapter-number {
    position: static;
  }

  .learn-chapter-image {
    width: 140px;
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: end;
  }

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

  .lesson-row,
  .lesson-row-flip {
    grid-template-columns: 1fr;
  }

  .lesson-row-flip .image-explanation,
  .lesson-row-flip .faq-image {
    order: initial;
  }
}

@media (max-width: 700px) {
  .landing-page {
    --landing-header-offset: 60px;
  }

  .landing-page.has-live-news-banner {
    --landing-header-offset: 94px;
  }

  .header-container {
    min-height: 60px;
    height: 60px;
    padding: 0 10px;
    gap: 8px;
  }

  .logo {
    --logo-size: 40px;
  }

  .nav {
    flex-wrap: nowrap;
    gap: 4px;
  }

  .nav .btn-primary {
    padding: 6px;
    font-size: 10px !important;
    margin-top: 0;
    white-space: nowrap;
  }

  .main-content {
    padding-top: 60px;
  }

  .learn-cover {
    padding: 34px 16px 28px;
  }

  .learn-cover-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .learn-cover h1 {
    font-size: clamp(32px, 10vw, 44px);
  }

  .learn-cover-visual {
    min-height: 132px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .learn-cover-visual img {
    position: static;
    width: 100%;
    aspect-ratio: 1 / 0.78;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.1);
  }

  .learn-chapters {
    padding: 0 16px 76px;
    gap: 56px;
  }

  .learn-chapter {
    scroll-margin-top: 92px;
  }

  .learn-chapter-head h2 {
    font-size: clamp(28px, 9vw, 38px);
  }

  .learn-chapter-head {
    grid-template-columns: 48px minmax(0, 1fr) 86px;
    gap: 10px;
    align-items: start;
  }

  .learn-chapter-number {
    grid-column: 1;
  }

  .learn-chapter-head > div:nth-child(2) {
    display: contents;
  }

  .learn-chapter-head .learn-section-kicker {
    grid-column: 2;
    margin-top: 4px;
  }

  .learn-chapter-head h2 {
    grid-column: 1 / -1;
  }

  .learn-chapter-head p:not(.learn-section-kicker) {
    grid-column: 1 / -1;
  }

  .learn-chapter-image {
    width: 86px;
    height: 86px;
    max-height: none;
    grid-column: 3;
    grid-row: 1;
  }

  .timeline-toolbar {
    grid-template-columns: 1fr;
  }

  .timeline-filters {
    justify-content: flex-start;
  }

  .timeline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .timeline-item {
    min-height: 54px;
    padding: 10px 10px 10px 13px;
  }

  .timeline-focus {
    grid-template-columns: 1fr;
    gap: 8px;
    min-height: 0;
    padding: 18px;
  }

  .timeline-focus-year {
    font-size: 28px;
  }

  .timeline-focus-content {
    font-size: 16px;
    line-height: 1.5;
  }

  .lesson-stack {
    gap: 38px;
  }

  .explanation-text {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .logo:is(:hover, :focus-visible) .logo-rotor {
    animation: none;
    transform: none;
  }
}
/* Final compact horizontal timeline override */
.timeline {
  display: flex;
  flex-direction: row;
  grid-template-columns: none;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 14px;
  scroll-snap-type: x proximity;
  scrollbar-color: rgba(0, 113, 227, 0.42) rgba(17, 24, 32, 0.08);
}

.timeline::before,
.timeline::after {
  content: "";
  flex: 0 0 8px;
}

.timeline-item {
  flex: 0 0 112px;
  min-height: 58px;
  scroll-snap-align: start;
}

@media (max-width: 700px) {
  .timeline {
    display: flex;
    grid-template-columns: none;
    flex-wrap: nowrap;
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .timeline-item {
    flex-basis: 108px;
  }
}

/* Final LearnAI hover timeline: keep milestones as data, show only the visual rail. */
#history-section .timeline {
  display: none !important;
}

#history-section .timeline-wrapper {
  padding-left: 96px;
  min-width: 0;
}

#history-section .timeline-focus {
  margin: 0 0 22px;
  max-width: 920px;
  height: 170px;
  min-height: 170px;
  align-content: start;
  box-sizing: border-box;
  overflow: hidden;
}

#history-section .timeline-focus-year {
  line-height: 1;
}

#history-section .timeline-focus-content {
  display: -webkit-box;
  max-width: 820px;
  min-height: 2.85em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

#history-section .timeline-visual {
  position: relative;
  display: block;
  width: 100%;
  height: 144px;
  max-width: 980px;
  margin: 0;
  padding: 0 18px;
  overflow-x: auto;
  overflow-y: hidden;
  box-sizing: border-box;
}

#history-section .timeline-image-preview {
  width: min(340px, 100%);
  aspect-ratio: 16 / 9;
  margin: -8px 0 48px;
  overflow: hidden;
  border: 1px solid rgba(17, 24, 32, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 18px 42px rgba(17, 24, 39, 0.1);
}

#history-section .timeline-image-preview img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 12px;
  object-fit: contain;
  background: #ffffff;
  box-sizing: border-box;
}

.visual-timeline-track {
  position: relative;
  min-width: 100%;
  height: 144px;
}

.visual-timeline-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 72px;
  width: auto;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #5f6f82, #0071e3 48%, #21a67a);
  box-shadow: 0 8px 24px rgba(0, 113, 227, 0.12);
}

.visual-timeline-marker {
  position: absolute;
  top: 72px;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  padding: 0;
  border-radius: 50%;
  border: 3px solid #ffffff;
  background: #0071e3;
  box-shadow: 0 0 0 1px rgba(17, 24, 32, 0.16), 0 8px 18px rgba(17, 24, 39, 0.12);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.visual-timeline-marker:hover,
.visual-timeline-marker:focus-visible,
.visual-timeline-marker.is-active {
  transform: translate(-50%, -50%) scale(1.55);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.14), 0 12px 24px rgba(17, 24, 39, 0.16);
  outline: none;
  z-index: 2;
}

.visual-era-foundations {
  background: #5f6f82;
}

.visual-era-consumer {
  background: #0071e3;
}

.visual-era-genai {
  background: #21a67a;
}

#history-section .timeline-visual::before,
#history-section .timeline-visual::after {
  content: none;
}

.visual-timeline-track::before,
.visual-timeline-track::after,
.visual-timeline-label {
  position: absolute;
  top: 98px;
  color: #687586;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.visual-timeline-track::before {
  content: "1950";
  left: 0;
}

.visual-timeline-track::after {
  content: "2026";
  right: 0;
}

.visual-timeline-label {
  pointer-events: none;
}

.visual-timeline-label-middle {
  left: 50%;
  transform: translateX(-50%);
}

@media (max-width: 980px) {
  .learn-chapters,
  .learn-chapter,
  .learn-chapter-head,
  .timeline-wrapper,
  .lesson-stack,
  .lesson-row {
    min-width: 0;
    max-width: 100%;
  }

  #history-section .timeline-wrapper {
    padding-left: 0;
  }
}

@media (max-width: 700px) {
  body {
    overflow-x: hidden;
  }

  .learn-cover,
  .learn-chapters,
  .learn-chapter,
  .timeline-wrapper,
  .timeline-focus,
  .lesson-stack,
  .lesson-row,
  .image-explanation,
  .faq-image {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  #history-section .timeline-focus {
    height: 144px;
    min-height: 144px;
  }

  #history-section .timeline-focus-content {
    min-height: 3em;
  }

  .learn-chapter-head {
    max-width: 100%;
    min-width: 0;
  }

  #history-section .timeline-visual {
    height: 132px;
    width: 100%;
    max-width: none;
  }

  #history-section .timeline-image-preview {
    width: 100%;
    margin: -2px 0 38px;
  }

  .visual-timeline-track {
    min-width: 760px;
    height: 132px;
  }

  .visual-timeline-line,
  .visual-timeline-marker {
    top: 66px;
  }

  .visual-timeline-track::before,
  .visual-timeline-track::after,
  .visual-timeline-label {
    top: 90px;
  }
}

/* LearnAI chapter accordions */
.learn-chapters {
  gap: 12px;
}

.learn-chapter {
  border-top: 1px solid rgba(17, 24, 32, 0.18);
}

.learn-chapter-toggle {
  appearance: none;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.learn-chapter-toggle .learn-chapter-head {
  grid-template-columns: 72px minmax(0, 1fr) 44px;
  margin-bottom: 0;
  padding: 18px 0;
  border-top: 0;
  align-items: center;
}

.learn-chapter-toggle:hover .learn-chapter-head h2,
.learn-chapter-toggle:focus-visible .learn-chapter-head h2 {
  color: var(--color-accent);
}

.learn-chapter-toggle:focus-visible {
  outline: 3px solid rgba(0, 113, 227, 0.24);
  outline-offset: 6px;
  border-radius: 8px;
}

.learn-chapter-toggle .learn-chapter-number {
  position: static;
}

.learn-chapter-toggle-icon {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  justify-self: end;
  border: 1px solid rgba(17, 24, 32, 0.16);
  border-radius: 50%;
  color: var(--color-accent);
  font-size: 24px;
  font-weight: 650;
  line-height: 1;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.learn-chapter.is-open .learn-chapter-toggle-icon {
  background: var(--color-accent);
  color: #ffffff;
  transform: rotate(45deg);
}

.learn-chapter-panel[hidden] {
  display: none !important;
}

.learn-chapter-panel {
  padding: 10px 0 44px;
}

@media (max-width: 700px) {
  .learn-chapters {
    gap: 8px;
  }

  .learn-chapter-toggle .learn-chapter-head {
    grid-template-columns: 48px minmax(0, 1fr) 38px;
    gap: 10px;
    padding: 16px 0;
  }

  .learn-chapter-toggle .learn-chapter-head > div:nth-child(2) {
    display: block;
  }

  .learn-chapter-toggle .learn-chapter-head .learn-section-kicker,
  .learn-chapter-toggle .learn-chapter-head h2,
  .learn-chapter-toggle .learn-chapter-head p:not(.learn-section-kicker) {
    grid-column: auto;
  }

  .learn-chapter-toggle-icon {
    width: 34px;
    height: 34px;
    font-size: 22px;
  }

  .learn-chapter-panel {
    padding: 8px 0 34px;
  }
}
