/* OpenEduOps — openeduops.com
   Generated from src/assets/css/parts/. Edit the partials, not this file.
   Sections: 01-tokens.css, 02-fonts.css, 03-base.css, 04-layout.css, 05-buttons.css, 06-header.css, 07-hero.css, 08-cards.css, 09-sections.css, 10-catalogue.css, 11-watch.css, 12-footer.css, 13-responsive.css, 14-motion.css
   ------------------------------------------------------------------- */

/* ---------------------------------------------------------------- tokens -
   Palette, type, spacing and motion. Taken from the OpenEduOps Design System
   (60/20/10/10 colour proportion, Space Grotesk / Inter / JetBrains Mono).
   ------------------------------------------------------------------------ */
:root {
  /* Palette */
  --navy:        #0B1F3A;
  --navy-90:     #233650;
  --navy-70:     #4A5A72;
  --navy-50:     #7d8a9c;
  --navy-30:     #b3bcca;
  --navy-15:     #d6dde6;
  --orange:      #FF6B35;
  --teal:        #00C9A7;
  --mist:        #E8EEF4;
  --white:       #FFFFFF;

  /* Semantic.
     --text-meta is the approved token for small normal text on light grounds.
     --navy-50 is a *shape* colour here: it never carries normal-size copy,
     because #7d8a9c on white is only ~3.5:1. */
  --text-body:         var(--navy);
  --text-muted:        var(--navy-70);
  --text-meta:         var(--navy-70);
  --text-on-dark:      var(--mist);
  --text-meta-on-dark: var(--navy-30);
  --text-on-accent:    var(--navy);
  --surface-page:      var(--white);
  --surface-sunken:    var(--mist);
  --surface-inverse:   var(--navy);
  --border-hairline:   var(--navy-15);

  /* Type */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;
  --ls-label: 0.12em;

  /* Space, radius, shadow, motion */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(11,31,58,.06), 0 1px 3px rgba(11,31,58,.08);
  --shadow-md: 0 4px 12px rgba(11,31,58,.10);
  --ease-standard: cubic-bezier(.2, 0, .2, 1);
  --dur-fast: 120ms;
  --dur-base: 200ms;

  /* Layout */
  --maxw-page: 1200px;
  --maxw-prose: 68ch;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --header-h: 68px;
  --tap: 44px;
}

/* ----------------------------------------------------------------- fonts -
   Self-hosted, unchanged from the previous release. The supplied files are
   TrueType; they are served as-is rather than renamed to .woff2.
   ------------------------------------------------------------------------ */
@font-face { font-family:'Inter'; font-style:normal; font-weight:400; font-display:swap;
  src:url('/assets/fonts/Inter-Regular.ttf') format('truetype'); }
@font-face { font-family:'Inter'; font-style:normal; font-weight:500; font-display:swap;
  src:url('/assets/fonts/Inter-Medium.ttf') format('truetype'); }
@font-face { font-family:'Inter'; font-style:normal; font-weight:600; font-display:swap;
  src:url('/assets/fonts/Inter-SemiBold.ttf') format('truetype'); }
@font-face { font-family:'Space Grotesk'; font-style:normal; font-weight:500; font-display:swap;
  src:url('/assets/fonts/SpaceGrotesk-Medium.ttf') format('truetype'); }
@font-face { font-family:'Space Grotesk'; font-style:normal; font-weight:600; font-display:swap;
  src:url('/assets/fonts/SpaceGrotesk-SemiBold.ttf') format('truetype'); }
@font-face { font-family:'Space Grotesk'; font-style:normal; font-weight:700; font-display:swap;
  src:url('/assets/fonts/SpaceGrotesk-Bold.ttf') format('truetype'); }
@font-face { font-family:'JetBrains Mono'; font-style:normal; font-weight:400; font-display:swap;
  src:url('/assets/fonts/JetBrainsMono-Regular.ttf') format('truetype'); }
@font-face { font-family:'JetBrains Mono'; font-style:normal; font-weight:500; font-display:swap;
  src:url('/assets/fonts/JetBrainsMono-Medium.ttf') format('truetype'); }

/* ------------------------------------------------------------------ base - */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }

body {
  margin: 0;
  background: var(--surface-page);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; height: auto; display: block; }

a { color: var(--navy); text-decoration-color: var(--navy-30); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--orange); }

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: 2px;
}
/* Orange focus disappears on the navy hero and footer: use mist there. */
.hero :focus-visible,
.final-cta :focus-visible,
.site-header :focus-visible,
.site-footer :focus-visible { outline-color: var(--mist); }

.skip-link {
  position: absolute; left: var(--gutter); top: -4rem; z-index: 100;
  background: var(--orange); color: var(--text-on-accent);
  font-family: var(--font-mono); font-size: .8125rem; text-decoration: none;
  padding: .625rem 1rem; border-radius: var(--radius-sm);
  transition: top var(--dur-base) var(--ease-standard);
}
.skip-link:focus { top: .75rem; }

/* Visually hidden but available to assistive technology. */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

/* Marks an external destination in running text and lists. */
.ext::after {
  content: "";
  display: inline-block;
  width: .5em; height: .5em;
  margin-left: .4em;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: translateY(-.1em) rotate(45deg);
}

/* ---------------------------------------------------------------- layout - */
.shell {
  width: 100%;
  max-width: var(--maxw-page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(4rem, 9vw, 7.5rem); }
.section-tight { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section-sunken { background: var(--surface-sunken); }

/* A section that follows the navy page head does not need a full band of
   space above it: the colour change already separates them. */
.page-head + .section,
.page-head + .watch { padding-top: clamp(2.5rem, 5vw, 4rem); }

.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head-row {
  display: flex; flex-wrap: wrap; align-items: flex-end;
  justify-content: space-between; gap: var(--space-5);
  max-width: none;
}
.section-title { font-size: clamp(1.875rem, 3.4vw, 2.75rem); font-weight: 700; letter-spacing: -.02em; }
.section-title-sm { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 700; letter-spacing: -.02em; }
.section-lede {
  margin-top: var(--space-5);
  font-size: clamp(1.0625rem, 1.4vw, 1.1875rem);
  color: var(--text-muted);
  max-width: 60ch;
}

.eyebrow {
  font-family: var(--font-mono); font-weight: 500; font-size: .75rem;
  letter-spacing: var(--ls-label); text-transform: uppercase;
  color: var(--text-meta); margin-bottom: var(--space-5);
}
.eyebrow::before {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--orange); margin-right: .625rem; vertical-align: baseline;
}
.eyebrow-on-dark { color: var(--text-meta-on-dark); }

/* ------------------------------------------------------------ page head - */
.page-head {
  background: var(--navy);
  color: var(--text-on-dark);
  padding-top: calc(var(--header-h) + clamp(2rem, 5vw, 3.5rem));
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}
.page-head-inner { max-width: 52rem; }
.page-title {
  font-size: clamp(2rem, 4.4vw, 3rem); font-weight: 700;
  letter-spacing: -.02em; color: var(--white);
}
.page-lede {
  margin-top: var(--space-5);
  font-size: clamp(1.0625rem, 1.4vw, 1.1875rem);
  color: var(--text-meta-on-dark);
  max-width: 62ch;
}

/* --------------------------------------------------------- breadcrumbs -- */
.breadcrumbs { margin-bottom: var(--space-5); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem var(--space-2); }
.breadcrumbs li {
  font-family: var(--font-mono); font-size: .75rem;
  letter-spacing: .04em; color: var(--text-meta-on-dark);
}
.breadcrumbs li + li::before {
  content: "/"; margin-right: var(--space-2); color: var(--navy-50);
}
.breadcrumbs a { color: var(--mist); text-decoration-color: rgba(232,238,244,.4); }
.breadcrumbs a:hover { text-decoration-color: var(--orange); }
.breadcrumbs [aria-current="page"] { color: var(--text-meta-on-dark); }

/* ----------------------------------------------------------- mono meta -- */
.meta-row {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--space-2) var(--space-4);
  font-family: var(--font-mono); font-size: .75rem;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-meta);
}
.meta-row-on-dark { color: var(--text-meta-on-dark); }
.meta-row > * { display: inline-flex; align-items: center; gap: .5rem; }

/* Platform badge: a labelled node, never colour alone. */
.badge {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-mono); font-size: .75rem; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-meta);
}
.badge::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  background: var(--orange); flex: none;
}
.badge-open-edx::before { background: var(--teal); }
.badge-on-dark { color: var(--text-meta-on-dark); }

/* Status pill for series state. The word carries the meaning; colour supports it. */
.status {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-mono); font-size: .75rem; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--navy); background: var(--mist);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-pill);
  padding: .3125rem .75rem;
}
.status::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--teal); flex: none;
}
.status-in-progress::before { background: var(--orange); }

/* ----------------------------------------------------------- utilities -- */
.u-mt-5 { margin-top: var(--space-5); }
.u-mt-6 { margin-top: var(--space-6); }


/* -------------------------------------------------------------- buttons -- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 1.5rem;
  font-family: var(--font-display); font-size: 1rem; font-weight: 600;
  border-radius: var(--radius-md); text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-standard),
              border-color var(--dur-fast) var(--ease-standard),
              transform var(--dur-fast) var(--ease-standard);
}
.btn-primary { background: var(--orange); color: var(--text-on-accent); }
.btn-primary:hover { background: #f0561f; }
.btn-primary:active { background: #dd4d19; transform: translateY(1px); }

.btn-ghost { background: transparent; color: var(--navy); border-color: var(--navy-30); }
.btn-ghost:hover { background: var(--mist); border-color: var(--navy-70); }
.btn-ghost:active { transform: translateY(1px); }


/* Ghost button on navy grounds */
.hero .btn-ghost, .final-cta .btn-ghost, .page-head .btn-ghost {
  color: var(--mist); border-color: rgba(232,238,244,.32);
}
.hero .btn-ghost:hover, .final-cta .btn-ghost:hover, .page-head .btn-ghost:hover {
  background: rgba(232,238,244,.08); border-color: var(--mist);
}

.cta-row { display: flex; flex-wrap: wrap; gap: var(--space-4); }

/* Inline text-weight action used inside cards and rows. */
.action {
  display: inline-flex; align-items: center; gap: .5rem;
  min-height: var(--tap);
  font-family: var(--font-display); font-weight: 600; font-size: .9375rem;
  color: var(--navy); text-decoration: none;
}
.action::after {
  content: ""; width: .45em; height: .45em;
  border-top: 2px solid var(--orange);
  border-right: 2px solid var(--orange);
  transform: rotate(45deg);
  transition: transform var(--dur-fast) var(--ease-standard);
}
.action:hover::after { transform: rotate(45deg) translate(2px, -2px); }
.action-external::after { transform: rotate(-45deg); }
.action-external:hover::after { transform: rotate(-45deg) translate(2px, -2px); }

/* --------------------------------------------------------------- header -- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: transparent;
  transition: background-color var(--dur-base) var(--ease-standard),
              border-color var(--dur-base) var(--ease-standard);
  border-bottom: 1px solid transparent;
}
.site-header.is-stuck {
  background: rgba(11,31,58,.92);
  border-bottom-color: rgba(232,238,244,.12);
  backdrop-filter: blur(8px);
}
.header-inner {
  display: flex; align-items: center; gap: var(--space-5);
  min-height: var(--header-h);
}

.brand {
  display: flex; align-items: center; gap: .625rem;
  text-decoration: none; margin-right: auto;
}
.brand-mark { width: 40px; height: auto; }
.brand-word {
  font-family: var(--font-display); font-weight: 600; font-size: 1.0625rem;
  letter-spacing: -.01em; color: var(--mist);
}

.primary-nav { display: flex; align-items: center; gap: var(--space-6); }
.nav-list { display: flex; align-items: center; gap: var(--space-5); }
.nav-list > li { position: relative; }
.nav-list a {
  display: inline-flex; align-items: center;
  min-height: var(--tap);
  font-size: .9375rem; color: var(--mist); text-decoration: none;
  opacity: .82;
  transition: opacity var(--dur-fast) var(--ease-standard);
}
.nav-list a:hover { opacity: 1; }
.nav-list a[aria-current="page"] {
  opacity: 1;
  box-shadow: inset 0 -2px 0 var(--orange);
}

.nav-list-external {
  padding-left: var(--space-6);
  border-left: 1px solid rgba(232,238,244,.18);
}
.nav-list-external a { font-family: var(--font-mono); font-size: .8125rem; letter-spacing: .02em; }

/* --- Platforms group ---------------------------------------------------
   Without JavaScript the group renders as a plain labelled list: label
   visible, disclosure button hidden, both destinations always reachable.
   With JavaScript the label is replaced by a real disclosure button.
   Nothing here is hover-only. */
.nav-group-label {
  display: inline-flex; align-items: center; min-height: var(--tap);
  font-family: var(--font-mono); font-size: .75rem;
  letter-spacing: var(--ls-label); text-transform: uppercase;
  color: var(--text-meta-on-dark);
}
.nav-disclosure {
  display: none; align-items: center; gap: .45rem;
  min-height: var(--tap); padding: 0;
  background: none; border: 0; cursor: pointer;
  font-family: var(--font-body); font-size: .9375rem;
  color: var(--mist); opacity: .82;
}
.nav-disclosure:hover { opacity: 1; }
.nav-disclosure::after {
  content: ""; width: .45em; height: .45em;
  border-bottom: 2px solid currentColor; border-right: 2px solid currentColor;
  transform: translateY(-.15em) rotate(45deg);
  transition: transform var(--dur-fast) var(--ease-standard);
}
.nav-disclosure[aria-expanded="true"]::after { transform: translateY(.1em) rotate(-135deg); }

.nav-submenu { display: flex; align-items: center; gap: var(--space-4); }
.nav-submenu a { font-size: .9375rem; }

.js .nav-group-label { display: none; }
.js .nav-disclosure { display: inline-flex; }
.js .nav-submenu {
  display: none;
  position: absolute; top: 100%; left: -1rem; z-index: 60;
  flex-direction: column; align-items: stretch; gap: 0;
  min-width: 12rem;
  background: rgba(11,31,58,.98);
  border: 1px solid rgba(232,238,244,.16);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-4);
  box-shadow: var(--shadow-md);
}
.js .nav-group.is-open .nav-submenu { display: flex; }
.js .nav-submenu a { display: flex; }

.nav-toggle { display: none; }

/* ---------------------------------------------------------------- hero --- */
.hero {
  position: relative;
  background:
    radial-gradient(120% 90% at 78% 8%, #14304f 0%, rgba(11,31,58,0) 60%),
    var(--navy);
  color: var(--text-on-dark);
  padding-top: calc(var(--header-h) + clamp(3rem, 7vw, 6rem));
  padding-bottom: clamp(4rem, 8vw, 7rem);
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.hero-title {
  font-size: clamp(2.75rem, 6.2vw, 4.75rem);
  font-weight: 700; letter-spacing: -.02em; line-height: 1.05;
  color: var(--white);
}
.hero-lede {
  margin-top: var(--space-6);
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.125rem, 1.9vw, 1.4375rem);
  color: var(--mist);
  max-width: 36ch;
  /* Even out the two lines rather than leaving a short widow on the second. */
  text-wrap: balance;
}
.hero-lede::after {
  content: ""; display: block; width: 72px; height: 3px;
  background: var(--orange); border-radius: 2px; margin-top: var(--space-5);
}
.hero-text {
  margin-top: var(--space-5);
  color: var(--text-meta-on-dark);
  max-width: 54ch;
}
.hero .cta-row { margin-top: var(--space-7); }

/* ------------------------------------------------------- hero diagram --- */
.stack { width: 100%; height: auto; }
.stack .layer rect {
  fill: rgba(232,238,244,.05);
  stroke: rgba(232,238,244,.20);
  stroke-width: 1;
}
.stack .layer[data-layer="1"] rect { fill: rgba(232,238,244,.11); stroke: rgba(232,238,244,.34); }
.stack .layer-name {
  font-family: var(--font-mono); font-size: 13px; font-weight: 500;
  letter-spacing: .1em; fill: var(--mist);
}
.stack .layer-detail { font-family: var(--font-body); font-size: 12.5px; fill: var(--navy-30); }
.stack .stack-tag {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; fill: var(--navy-30);
}
.stack .stack-nodes circle { fill: var(--orange); stroke: var(--navy); stroke-width: 3; }
.stack .ops circle { fill: var(--teal); }
.stack .ops-label {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .1em; fill: var(--navy-30);
}
.stack .stack-signal { animation: signal 7s linear infinite; opacity: .9; }
@keyframes signal { from { stroke-dashoffset: 356; } to { stroke-dashoffset: 0; } }

/* ---------------------------------------------------------------- cards -- */

/* --- platform choice: two equal cards, no hierarchy between them --------- */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.5vw, 2rem);
  align-items: stretch;
}
.platform-card {
  display: flex; flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: clamp(1.5rem, 3vw, 2.25rem);
}
.platform-card::before {
  content: ""; display: block; width: 44px; height: 3px;
  background: var(--orange); border-radius: 2px; margin-bottom: var(--space-5);
}
.platform-card-open-edx::before { background: var(--teal); }
.platform-card h3 {
  font-size: clamp(1.375rem, 2.1vw, 1.75rem); font-weight: 700; letter-spacing: -.01em;
}
.platform-card .status { margin-top: var(--space-4); align-self: flex-start; }
.platform-card p { margin-top: var(--space-4); color: var(--text-muted); }
.platform-card .btn { margin-top: var(--space-6); align-self: flex-start; }
.platform-card > p:last-of-type { flex: 1 0 auto; }

/* --- start here ---------------------------------------------------------- */
.starts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.5vw, 2rem);
}
.start {
  background: var(--white);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
}
.start h3 { margin-top: var(--space-3); font-size: 1.125rem; font-weight: 600; }
.start h3 a { text-decoration: none; }
.start h3 a:hover { text-decoration: underline; text-decoration-color: var(--orange); }
.start p { margin-top: var(--space-3); color: var(--text-muted); font-size: .9375rem; }
.start .meta-row { margin-top: var(--space-4); }

/* --- tutorial card ------------------------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
  gap: clamp(1.25rem, 2.4vw, 1.75rem);
}
.tutorial-card {
  display: flex; flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: clamp(1.25rem, 2.4vw, 1.625rem);
  transition: border-color var(--dur-fast) var(--ease-standard),
              box-shadow var(--dur-fast) var(--ease-standard);
}
/* The filter script hides non-matching cards with the native `hidden`
   attribute. The `display: flex` above is an author declaration, so it
   outranks the user agent's `[hidden] { display: none }` and the cards stay
   on screen. Restore the hidden semantics for this one component — no global
   [hidden] override, because no other element the script hides declares
   `display`. Higher specificity, so cascade order does not matter. */
.tutorial-card[hidden] { display: none; }
.tutorial-card:hover { border-color: var(--navy-30); box-shadow: var(--shadow-sm); }
.section-sunken .tutorial-card { background: var(--white); }

.tutorial-card-head {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: var(--space-2) var(--space-4);
}
.tutorial-card-step {
  font-family: var(--font-mono); font-size: .75rem; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase; color: var(--text-meta);
}
.tutorial-card h3 {
  margin-top: var(--space-4);
  font-size: 1.125rem; font-weight: 600; line-height: 1.3;
}
.tutorial-card h3 a { text-decoration: none; }
.tutorial-card h3 a:hover { text-decoration: underline; text-decoration-color: var(--orange); }
.tutorial-card-outcome {
  margin-top: var(--space-3);
  color: var(--text-muted); font-size: .9375rem;
  flex: 1 0 auto;
}
.tutorial-card-env {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-hairline);
  font-family: var(--font-mono); font-size: .75rem;
  color: var(--text-meta); line-height: 1.6;
}
.tutorial-card-foot {
  margin-top: var(--space-3);
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: var(--space-2) var(--space-4);
}
.tutorial-card-duration {
  font-family: var(--font-mono); font-size: .8125rem; color: var(--text-meta);
}

/* --- series rail: node-and-trace, ordered, wraps instead of overflowing --- */
.series-rail { position: relative; padding-left: 2.5rem; max-width: 58rem; }
.series-rail::before {
  content: ""; position: absolute; left: 9px; top: 1.5rem; bottom: 1.5rem; width: 2px;
  background: linear-gradient(var(--navy-30), var(--orange));
}
.series-step { position: relative; padding-block: clamp(1rem, 2vw, 1.375rem); }
.series-step + .series-step { border-top: 1px solid var(--border-hairline); }
.series-step::before {
  content: ""; position: absolute; left: -2.5rem; top: 1.75rem;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--white); border: 2px solid var(--navy-30);
  box-sizing: border-box;
}
.series-step:last-child::before { background: var(--orange); border-color: var(--orange); }

.series-step-index {
  font-family: var(--font-mono); font-size: .75rem; font-weight: 500;
  letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--text-meta);
}
.series-step h3 {
  margin-top: var(--space-2);
  font-size: 1.0625rem; font-weight: 600; line-height: 1.35;
}
.series-step h3 a { text-decoration: none; }
.series-step h3 a:hover { text-decoration: underline; text-decoration-color: var(--orange); }
.series-step-outcome { margin-top: var(--space-2); color: var(--text-muted); font-size: .9375rem; }
.series-step .meta-row { margin-top: var(--space-3); }
.series-step-action { margin-top: var(--space-1); }
/* One link per row: the title anchor covers the whole step, so the action line
   below it is a real affordance rather than dead text. */
.series-step h3 a::after { content: ""; position: absolute; inset: 0; }
.series-step:focus-within { background: var(--mist); border-radius: var(--radius-md); }

/* --- guide index rows ---------------------------------------------------- */
.guide-list { border-top: 1px solid var(--border-hairline); }
.guide-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3) var(--space-6);
  padding-block: clamp(1.125rem, 2vw, 1.5rem);
  border-bottom: 1px solid var(--border-hairline);
}
.guide-row-main { min-width: 0; }
.guide-row h3 { font-size: 1.0625rem; font-weight: 600; line-height: 1.35; }
.guide-row .meta-row { margin-top: var(--space-3); }
.guide-row-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-5);
  justify-content: flex-end;
}

/* One link per card: the title anchor covers the whole card. */
.tutorial-card { position: relative; }
.tutorial-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-md); }
.tutorial-card:focus-within { border-color: var(--navy-30); }

/* ------------------------------------------------- build/secure/operate - */
.pillar-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  position: relative;
}
/* the shared trace the three pillars sit on */
.pillar-track::before {
  content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 1px;
  background: var(--border-hairline);
}
.pillar { position: relative; padding-top: 3.25rem; display: flex; flex-direction: column; }
.pillar::before {
  content: ""; position: absolute; left: 0; top: 5px; width: 13px; height: 13px;
  border-radius: 50%; background: var(--orange);
}
.pillar-index {
  position: absolute; top: 0; left: 1.75rem;
  font-family: var(--font-mono); font-size: .75rem; font-weight: 500;
  letter-spacing: var(--ls-label); color: var(--text-meta);
  line-height: 1.4;
}
.pillar-name {
  font-size: clamp(1.5rem, 2.2vw, 1.875rem); font-weight: 700; letter-spacing: -.01em;
}
.pillar-claim {
  margin-top: var(--space-3);
  font-family: var(--font-display); font-weight: 500; font-size: 1.0625rem;
  color: var(--navy);
}
.pillar-text { margin-top: var(--space-3); color: var(--text-muted); font-size: .9375rem; }
.pillar .action { margin-top: var(--space-4); align-self: flex-start; }
.tag-row {
  display: flex; flex-wrap: wrap; gap: var(--space-2);
  margin-top: var(--space-5);
}
.tag-row li {
  font-family: var(--font-mono); font-size: .75rem; color: var(--text-meta);
  background: var(--mist); border-radius: var(--radius-pill);
  padding: .3125rem .625rem;
}
.section-sunken .tag-row li { background: var(--white); }

/* --------------------------------------------------------- the method --- */
.principles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--border-hairline);
  border-left: 1px solid var(--border-hairline);
}
.principle {
  border-right: 1px solid var(--border-hairline);
  border-bottom: 1px solid var(--border-hairline);
  padding: clamp(1.75rem, 3vw, 2.5rem);
}
.principle h3 {
  font-size: 1.25rem; font-weight: 600;
  padding-left: 1.25rem; position: relative;
}
.principle h3::before {
  content: ""; position: absolute; left: 0; top: .5em;
  width: 9px; height: 9px; border-radius: 50%; background: var(--teal);
}
.principle p { margin-top: var(--space-3); color: var(--text-muted); padding-left: 1.25rem; }

/* ---------------------------------------------------------- final cta --- */
.final-cta {
  background:
    radial-gradient(100% 120% at 20% 0%, #14304f 0%, rgba(11,31,58,0) 62%),
    var(--navy);
  color: var(--text-on-dark);
}
.final-inner { max-width: 44rem; }
.final-title {
  font-size: clamp(2.25rem, 4.6vw, 3.25rem); font-weight: 700;
  letter-spacing: -.02em; color: var(--white);
}
.final-text { margin-top: var(--space-5); color: var(--text-meta-on-dark); max-width: 48ch; }
.final-cta .cta-row { margin-top: var(--space-7); }

/* -------------------------------------------------------------- prose --- */
.prose { max-width: var(--maxw-prose); }
.prose > * + * { margin-top: var(--space-5); }
.prose h2 { margin-top: var(--space-8); font-size: clamp(1.375rem, 2.2vw, 1.75rem); font-weight: 700; }
.prose h3 { margin-top: var(--space-7); font-size: 1.1875rem; font-weight: 600; }
.prose p { color: var(--text-muted); }
.prose ul { display: grid; gap: var(--space-3); }
.prose ul li { position: relative; padding-left: 1.5rem; color: var(--text-muted); }
.prose ul li::before {
  content: ""; position: absolute; left: 0; top: .6em;
  width: 8px; height: 8px; border-radius: 50%; background: var(--teal);
}
.prose strong { color: var(--navy); font-weight: 600; }

/* Scope note: the production boundary, stated plainly. */
.scope-note {
  border-left: 3px solid var(--orange);
  padding: var(--space-1) 0 var(--space-1) var(--space-5);
  color: var(--text-muted);
  font-size: .9375rem;
  max-width: 62ch;
}
.scope-note p + p { margin-top: var(--space-3); }

/* ----------------------------------------------------------- not found -- */
.notfound-code {
  font-family: var(--font-mono); font-size: .875rem;
  letter-spacing: var(--ls-label); color: var(--text-meta-on-dark);
}
.recovery-list {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}
.recovery-list li {
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}
.recovery-list h2 { font-size: 1.0625rem; font-weight: 600; }
.recovery-list p { margin-top: var(--space-2); font-size: .9375rem; color: var(--text-muted); }
.recovery-list .action { margin-top: var(--space-3); }

/* ------------------------------------------------------------ catalogue -
   The filter bar is an enhancement: it only appears once the JS flag is set,
   so nobody is offered a control that cannot work. The card list underneath
   is server-rendered and complete either way.
   ------------------------------------------------------------------------ */
.catalogue-filters { display: none; }
.js .catalogue-filters { display: block; }

.filter-bar {
  display: flex; flex-wrap: wrap; align-items: flex-start;
  gap: var(--space-5) clamp(1.5rem, 4vw, 3rem);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--border-hairline);
  margin-bottom: var(--space-6);
}
.filter-group { border: 0; margin: 0; padding: 0; min-width: 0; }
.filter-group legend {
  padding: 0; margin-bottom: var(--space-3);
  font-family: var(--font-mono); font-size: .75rem; font-weight: 500;
  letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--text-meta);
}
.filter-options { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.filter-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  min-height: var(--tap); padding: 0 .875rem;
  background: var(--white); color: var(--navy);
  border: 1px solid var(--navy-30); border-radius: var(--radius-pill);
  font-family: var(--font-mono); font-size: .8125rem; letter-spacing: .04em;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-standard),
              border-color var(--dur-fast) var(--ease-standard);
}
.filter-btn:hover { background: var(--mist); border-color: var(--navy-70); }
/* Selected state is carried by the tick mark and the border weight, not colour alone. */
.filter-btn::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  border: 1.5px solid var(--navy-30); background: transparent; flex: none;
}
.filter-btn[aria-pressed="true"] {
  background: var(--navy); color: var(--mist); border-color: var(--navy);
}
.filter-btn[aria-pressed="true"]::before { background: var(--orange); border-color: var(--orange); }
.filter-btn[aria-pressed="true"]:hover { background: var(--navy-90); border-color: var(--navy-90); }

.filter-actions {
  display: flex; align-items: center; gap: var(--space-4);
  margin-left: auto; align-self: flex-end;
}
.filter-clear {
  min-height: var(--tap); padding: 0 .875rem;
  background: none; border: 1px solid transparent; border-radius: var(--radius-sm);
  color: var(--navy); font-family: var(--font-display); font-weight: 600; font-size: .9375rem;
  cursor: pointer;
}
.filter-clear:hover { background: var(--mist); border-color: var(--border-hairline); }

.catalogue-count {
  font-family: var(--font-mono); font-size: .8125rem;
  color: var(--text-meta); margin-bottom: var(--space-6);
}

/* Shown only when a filter combination matches nothing. */
.catalogue-empty {
  border: 1px dashed var(--navy-30);
  border-radius: var(--radius-md);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--text-muted);
}
.catalogue-empty .filter-clear { margin-top: var(--space-4); border-color: var(--navy-30); }

/* ----------------------------------------------------------- watch page - */
.watch { padding-block: clamp(2.5rem, 5vw, 4rem) clamp(4rem, 8vw, 6rem); }
.watch-inner { max-width: 60rem; margin-inline: auto; }

/* 16:9, responsive, never covered by decoration. */
.video-frame {
  aspect-ratio: 16 / 9;
  background: var(--navy);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.video-frame iframe {
  display: block;
  width: 100%; height: 100%;
  border: 0;
}


.watch-blocks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin-top: clamp(2rem, 4vw, 3rem);
}
.watch-block {
  background: var(--mist);
  border-radius: var(--radius-md);
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
}
.watch-block h2 {
  font-size: 1.0625rem; font-weight: 600;
  padding-left: 1.25rem; position: relative;
}
.watch-block h2::before {
  content: ""; position: absolute; left: 0; top: .5em;
  width: 9px; height: 9px; border-radius: 50%; background: var(--teal);
}
.watch-block p { margin-top: var(--space-3); color: var(--text-muted); padding-left: 1.25rem; }
.watch-block-env p { font-family: var(--font-mono); font-size: .8125rem; line-height: 1.7; }

.watch-guide {
  margin-top: clamp(2rem, 4vw, 3rem);
  display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--space-5);
}
.watch-guide-note {
  font-size: .9375rem; color: var(--text-muted); max-width: 44ch;
}

.watch-scope { margin-top: clamp(2rem, 4vw, 2.5rem); }

/* --- previous / next viewer path ---------------------------------------- */
.watch-pager {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-hairline);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
}
/* A step with no previous keeps the next control in the right-hand column
   instead of stretching it across the full width. */
.watch-pager-next:only-child { grid-column: 2; }
.watch-pager-link {
  display: block;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  text-decoration: none;
  transition: border-color var(--dur-fast) var(--ease-standard);
}
.watch-pager-link:hover { border-color: var(--navy-30); }
.watch-pager-next { text-align: right; }
.watch-pager-label {
  display: block;
  font-family: var(--font-mono); font-size: .75rem; font-weight: 500;
  letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--text-meta);
}
.watch-pager-title {
  display: block; margin-top: var(--space-2);
  font-family: var(--font-display); font-weight: 600; font-size: 1rem;
  color: var(--navy); line-height: 1.35;
}

.watch-playlist { margin-top: clamp(2rem, 4vw, 2.5rem); }

/* ------------------------------------------------------------- footer --- */
.site-footer {
  background: var(--navy);
  border-top: 1px solid rgba(232,238,244,.12);
  color: var(--text-meta-on-dark);
  padding-block: clamp(2.5rem, 5vw, 4rem);
}
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: flex-end;
  gap: var(--space-6) clamp(2rem, 6vw, 4rem);
}
.footer-brand { margin-right: auto; }
.footer-brand img { width: 148px; }
.footer-tagline {
  margin-top: var(--space-4);
  font-family: var(--font-display); font-size: .9375rem; color: var(--mist);
}
.footer-nav { display: flex; flex-wrap: wrap; gap: var(--space-6) clamp(2rem, 5vw, 3rem); }
.footer-nav h2 {
  font-family: var(--font-mono); font-size: .6875rem; font-weight: 500;
  letter-spacing: var(--ls-label); text-transform: uppercase;
  color: var(--navy-30); margin-bottom: var(--space-3);
}
.footer-nav ul { display: grid; gap: var(--space-1); }
.footer-nav a {
  display: inline-flex; align-items: center; min-height: 32px;
  font-size: .875rem; color: var(--mist);
  text-decoration: none; opacity: .82;
}
.footer-nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.footer-legal {
  width: 100%;
  padding-top: var(--space-5);
  border-top: 1px solid rgba(232,238,244,.12);
  font-family: var(--font-mono); font-size: .75rem; color: var(--text-meta-on-dark);
}

/* ==========================================================================
   Responsive — tablet
   ========================================================================= */
@media (max-width: 1100px) {
  .hero-inner { grid-template-columns: 1fr; gap: clamp(2.5rem, 6vw, 4rem); }
  .hero-copy { max-width: 40rem; }
  .hero-visual { max-width: 620px; }
}

@media (max-width: 900px) {
  .pillar-track { grid-template-columns: 1fr; gap: 0; }
  /* the trace turns vertical: pillars stack along one line */
  .pillar-track::before { left: 6px; right: auto; top: 10px; bottom: 10px; width: 1px; height: auto; }
  .pillar { padding-top: 0; padding-left: 2.5rem; padding-block: var(--space-6); }
  .pillar + .pillar { border-top: 1px solid var(--border-hairline); }
  .pillar::before { top: 2.4rem; }
  .pillar-index { position: static; margin-bottom: var(--space-2); }

  .platform-grid, .starts { grid-template-columns: 1fr; }

  .guide-row { grid-template-columns: 1fr; }
  .guide-row-actions { justify-content: flex-start; }
}

/* ==========================================================================
   Responsive — mobile navigation
   ========================================================================= */
@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: .5rem;
    min-height: var(--tap); min-width: var(--tap); padding: 0 .75rem;
    background: transparent; border: 1px solid rgba(232,238,244,.28);
    border-radius: var(--radius-sm); cursor: pointer;
    font-family: var(--font-mono); font-size: .75rem; letter-spacing: .08em;
    text-transform: uppercase; color: var(--mist);
  }
  .nav-toggle-bars {
    position: relative; width: 16px; height: 2px; background: var(--orange);
  }
  .nav-toggle-bars::before, .nav-toggle-bars::after {
    content: ""; position: absolute; left: 0; width: 16px; height: 2px; background: var(--mist);
  }
  .nav-toggle-bars::before { top: -5px; }
  .nav-toggle-bars::after { top: 5px; }

  .header-inner { flex-wrap: wrap; position: relative; }

  .primary-nav {
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(11,31,58,.98);
    border-block: 1px solid rgba(232,238,244,.14);
    padding: var(--space-4) 0 var(--space-6);
    width: 100%;
  }
  .js .primary-nav { display: none; }
  .js .site-header.nav-open .primary-nav {
    display: flex;
    position: absolute; left: 0; right: 0; top: 100%;
    padding-inline: var(--gutter);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }

  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list > li { position: static; }
  .nav-list a {
    display: block; padding-block: .875rem; font-size: 1.0625rem; opacity: 1;
    border-bottom: 1px solid rgba(232,238,244,.10);
  }
  .nav-list a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--orange); padding-left: .75rem; }

  .nav-list-external { padding-left: 0; border-left: 0; margin-top: var(--space-4); }
  .nav-list-external a { font-size: .875rem; }

  /* On mobile the platform group is simply always open: fewer taps, and the
     panel is already a vertical stack. */
  .js .nav-disclosure { display: none; }
  .js .nav-group-label,
  .nav-group-label {
    display: block; padding-block: .875rem;
    border-bottom: 1px solid rgba(232,238,244,.10);
  }
  .js .nav-submenu,
  .nav-submenu {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    position: static; min-width: 0;
    background: none; border: 0; border-radius: 0; box-shadow: none;
    padding: 0;
  }
  .nav-submenu a { padding-left: var(--space-4); }
}

/* ==========================================================================
   Responsive — small screens
   ========================================================================= */
@media (max-width: 720px) {
  :root { --header-h: 60px; }
  .principles { grid-template-columns: 1fr; }
  .hero-title { line-height: 1.06; }
  /* keep the diagram legible: drop the secondary labels and scale the type up
     so it survives the SVG being rendered at a fraction of its design width */
  .stack .layer-detail, .stack .stack-tag { display: none; }
  .stack .layer-name { font-size: 21px; }
  .stack .ops-label { font-size: 19px; }
  .footer-inner { align-items: flex-start; }
  .watch-pager { grid-template-columns: 1fr; }
  .watch-pager-next, .watch-pager-next:only-child { grid-column: 1; text-align: left; }
  .filter-actions { margin-left: 0; }
}

@media (max-width: 520px) {
  .stack .layer-name { font-size: 25px; }
  .stack .ops-label { font-size: 22px; }
  .section-head-row { flex-direction: column; align-items: flex-start; }
}

/* 320px: the tightest supported width. Nothing may overflow horizontally. */
@media (max-width: 380px) {
  .brand-word { font-size: 1rem; }
  .brand-mark { width: 34px; }
  .nav-toggle-text { display: none; }
  .nav-toggle { padding-inline: .625rem; }
  .cta-row { flex-direction: column; align-items: stretch; }
  .cta-row .btn { width: 100%; }
  .series-rail { padding-left: 1.75rem; }
  .series-step::before { left: -1.75rem; }
  .series-rail::before { left: 5px; }
}

/* --------------------------------------------------------------- motion --
   Content is visible by default. Nothing in this stylesheet hides a `.reveal`
   element on its own: `reveal-pending` is added by JavaScript, one element at
   a time, only for elements it has already committed to revealing. If the
   script never runs, never loads, or fails halfway, every section is on screen.

   Two classes, two jobs:
     · reveal-pending   — the only rule that hides anything.
     · reveal-motion    — the transition that fades it back in.
   Dropping both together snaps an element visible with no animation at all,
   which is what the script's failsafes do. A transition that never runs can
   therefore never strand content at zero opacity.
   ------------------------------------------------------------------------ */
.reveal-pending { opacity: 0; transform: translateY(14px); }
.reveal-motion {
  transition: opacity 520ms var(--ease-standard), transform 520ms var(--ease-standard);
}
.reveal-motion.reveal-delay-1 { transition-delay: 80ms; }
.reveal-motion.reveal-delay-2 { transition-delay: 160ms; }

/* Hero entrance — a short, staggered rise.

   It moves the copy but never fades it. An `animation-delay` with `backwards`
   fill holds an element at its `from` state before the animation starts, so a
   timeline that is frozen or never started (a background tab, a throttled
   renderer, a page captured mid-load) would hold that state indefinitely. With
   opacity left out of the keyframe, the worst case is copy sitting 10px low —
   the hero text can never be invisible. */
.js .hero-copy > * { animation: rise 620ms var(--ease-standard) backwards; }
.js .hero-copy > :nth-child(1) { animation-delay: 40ms; }
.js .hero-copy > :nth-child(2) { animation-delay: 110ms; }
.js .hero-copy > :nth-child(3) { animation-delay: 190ms; }
.js .hero-copy > :nth-child(4) { animation-delay: 260ms; }
.js .hero-copy > :nth-child(5) { animation-delay: 330ms; }
@keyframes rise { from { transform: translateY(10px); } }

/* ==========================================================================
   Reduced motion
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .hero-copy > *,
  .stack .stack-signal { animation: none; }
  /* Even if a stale class survives, the content stays visible. */
  .reveal-pending { opacity: 1; transform: none; }
  .reveal-motion { transition: none; }
  .btn:active { transform: none; }
  .action:hover::after { transform: rotate(45deg); }
  .action-external:hover::after { transform: rotate(-45deg); }
}

/* Printing must never omit or displace a section. */
@media print {
  .reveal-pending { opacity: 1; transform: none; }
  .reveal-motion { transition: none; }
  .js .hero-copy > * { animation: none; }
}
