/* Quanexas design system
   Tokens → base → layout → components → page modules → utilities. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink-950: #050a13;
  --ink-900: #08111f;
  --ink-850: #0c1727;
  --ink-800: #111e33;
  --ink-700: #1b2a44;
  --ink-600: #2a3b58;
  --on-dark: #eaf0f6;
  --on-dark-2: #b7c3d3;
  --on-dark-3: #8e9cb0;
  --line-dark: rgb(255 255 255 / 10%);
  --line-dark-strong: rgb(255 255 255 / 18%);

  --teal-200: #b8faef;
  --teal-300: #8cf5e4;
  --teal-400: #4fe3cc;
  --teal-500: #1fc7af;
  --teal-600: #0fa391;
  --teal-700: #0b7a6e;
  --teal-800: #075e55;
  --sky-400: #6cc6f2;

  --bg: #ffffff;
  --bg-alt: #f4f7fa;
  --bg-sunken: #eef2f6;
  --line: #e3e8ef;
  --line-strong: #cdd6e1;
  --text: #0a1424;
  --text-2: #3b4a5e;
  --text-3: #5f6c7f;

  --ok: #067a57;
  --ok-bg: #e8f7f0;
  --warn: #8a5300;
  --warn-bg: #fff4e0;
  --err: #b3261e;
  --err-bg: #fdecea;

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --container: 1240px;
  --gutter: clamp(20px, 4vw, 40px);
  --header-h: 72px;
  --section-y: clamp(72px, 9vw, 128px);

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgb(10 20 36 / 6%);
  --shadow-sm: 0 1px 2px rgb(10 20 36 / 5%), 0 4px 12px rgb(10 20 36 / 5%);
  --shadow: 0 2px 4px rgb(10 20 36 / 4%), 0 12px 32px rgb(10 20 36 / 8%);
  --shadow-lg: 0 4px 8px rgb(10 20 36 / 5%), 0 24px 64px rgb(10 20 36 / 14%);

  --ease: cubic-bezier(.2, .7, .2, 1);
  --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8h9.2M8.6 3.8 12.8 8l-4.2 4.2' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --arrow-out: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5 11 11 5M6 5h5v5' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3.5 8.4 2.9 2.9 6.1-6.6' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  font-feature-settings: "cv05", "cv08";
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

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

img {
  height: auto;
}

a {
  color: var(--teal-700);
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}

a:hover {
  color: var(--teal-800);
}

h1,
h2,
h3,
h4 {
  margin: 0 0 .5em;
  color: inherit;
  font-weight: 650;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.4rem, 4.2vw + .8rem, 4.25rem);
  letter-spacing: -.035em;
  line-height: 1.04;
}

h2 {
  font-size: clamp(1.85rem, 2.4vw + .8rem, 3rem);
  letter-spacing: -.03em;
  line-height: 1.1;
}

h3 {
  font-size: 1.25rem;
  letter-spacing: -.015em;
  line-height: 1.3;
}

h4 {
  font-size: 1rem;
  letter-spacing: -.01em;
  line-height: 1.4;
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

ul,
ol {
  margin: 0 0 1em;
  padding-left: 1.25em;
}

li + li {
  margin-top: .35em;
}

strong,
b {
  font-weight: 650;
}

code,
pre,
kbd {
  font-family: var(--mono);
  font-size: .9em;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

::selection {
  background: rgb(79 227 204 / 35%);
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: 3px;
  border-radius: 4px;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--teal-400);
  color: var(--ink-950);
  font-weight: 650;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform .2s var(--ease);
}

.skip-link:focus {
  transform: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

/* ---------- Layout ---------- */

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container-narrow {
  max-width: calc(820px + var(--gutter) * 2);
}

.section {
  position: relative;
  padding-block: var(--section-y);
}

.section-sm {
  padding-block: clamp(48px, 6vw, 80px);
}

.section-alt {
  background: var(--bg-alt);
}

.section-dark {
  background: var(--ink-900);
  color: var(--on-dark);
}

/* :where() keeps these at low specificity so component colours (cards, buttons) win. */
.section-dark :where(a:not(.btn)) {
  color: var(--teal-300);
}

.section-dark :where(a:not(.btn)):hover {
  color: var(--teal-200);
}

.section-line {
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 760px;
  margin-bottom: clamp(36px, 5vw, 64px);
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.section-head h2 {
  margin-bottom: .4em;
}

.section-lead {
  margin: 0;
  color: var(--text-2);
  font-size: clamp(1.05rem, .4vw + .95rem, 1.2rem);
  line-height: 1.6;
}

.section-dark .section-lead {
  color: var(--on-dark-2);
}

.section-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 48px;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.section-head-row .section-head {
  margin-bottom: 0;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.split-wide {
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}

.grid {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
}

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

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

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

.stack > * + * {
  margin-top: 16px;
}

/* ---------- Type helpers ---------- */

/* Doubled class: beats contextual "container p" rules so an eyebrow keeps its style anywhere.
   Context colour overrides below use two classes and come later, so they still apply. */
.eyebrow.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--teal-700);
  font-size: .78rem;
  font-weight: 650;
  letter-spacing: .14em;
  line-height: 1.3;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  opacity: .8;
}

.eyebrow.plain::before {
  display: none;
}

.section-dark .eyebrow,
.page-hero .eyebrow,
.hero .eyebrow,
.cta .eyebrow {
  color: var(--teal-300);
}

.lead {
  max-width: 680px;
  margin: 0;
  color: var(--text-2);
  font-size: clamp(1.1rem, .5vw + 1rem, 1.3rem);
  line-height: 1.6;
}

.muted,
.muted-copy {
  color: var(--text-3);
  font-size: .925rem;
}

.text-accent {
  background: linear-gradient(100deg, var(--teal-300) 0%, var(--teal-400) 45%, var(--sky-400) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.statement {
  margin: 0;
  font-size: clamp(1.6rem, 2vw + .9rem, 2.5rem);
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.2;
  text-wrap: balance;
}

.card .statement {
  color: var(--text);
  font-size: clamp(1.35rem, 1.1vw + 1rem, 1.9rem);
}

.statement em {
  color: var(--text-3);
  font-style: normal;
}

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: -.005em;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: .55;
  pointer-events: none;
}

.btn-sm {
  min-height: 40px;
  padding: 0 16px;
  font-size: .875rem;
}

.btn-lg {
  min-height: 54px;
  padding: 0 28px;
  font-size: 1rem;
}

.btn-primary {
  background: var(--teal-400);
  color: var(--ink-950);
  box-shadow: 0 0 0 0 rgb(79 227 204 / 0%);
}

.btn-primary:hover {
  background: var(--teal-300);
  color: var(--ink-950);
  box-shadow: 0 8px 28px rgb(79 227 204 / 28%);
}

.btn-dark {
  background: var(--ink-900);
  color: #fff;
}

.btn-dark:hover {
  background: var(--ink-700);
  color: #fff;
}

.btn-outline {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--text);
  color: var(--text);
}

.btn-ghost {
  border-color: var(--line-dark-strong);
  background: rgb(255 255 255 / 4%);
  color: var(--on-dark);
}

.btn-ghost:hover {
  border-color: rgb(255 255 255 / 40%);
  background: rgb(255 255 255 / 8%);
  color: #fff;
}

.btn-danger {
  background: var(--err);
  color: #fff;
}

.icon-arrow,
.icon-arrow-out {
  display: inline-block;
  flex: 0 0 auto;
  width: 1em;
  height: 1em;
  background: currentColor;
  -webkit-mask: var(--arrow) center / contain no-repeat;
  mask: var(--arrow) center / contain no-repeat;
  transition: transform .2s var(--ease);
}

.icon-arrow-out {
  -webkit-mask-image: var(--arrow-out);
  mask-image: var(--arrow-out);
}

a:hover > .icon-arrow,
button:hover > .icon-arrow {
  transform: translateX(3px);
}

a:hover > .icon-arrow-out {
  transform: translate(2px, -2px);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--teal-700);
  font-weight: 620;
  text-decoration: none;
}

.text-link:hover {
  color: var(--teal-800);
}

.section-dark .text-link,
.cta .text-link {
  color: var(--teal-300);
}

/* ---------- Header & navigation ---------- */

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  color: var(--on-dark);
}

.site-header::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-bottom: 1px solid transparent;
  background: rgb(5 10 19 / 82%);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}

.site-header.is-scrolled::before {
  border-bottom-color: var(--line-dark);
  background: rgb(5 10 19 / 92%);
}

.header-inner {
  display: flex;
  height: var(--header-h);
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 11px;
  color: #fff;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-decoration: none;
}

.brand:hover {
  color: #fff;
}

.brand-mark {
  width: 32px;
  height: 32px;
}

.brand-word span {
  color: var(--teal-400);
}

.primary-nav {
  flex: 1 1 auto;
}

.nav-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list > li {
  margin: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-flex;
  height: 40px;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--on-dark-2);
  font-size: .925rem;
  font-weight: 520;
  text-decoration: none;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}

.nav-link:hover,
.nav-item.is-open > .nav-link {
  background: rgb(255 255 255 / 6%);
  color: #fff;
}

.nav-link[aria-current="page"],
.nav-item.is-active > .nav-link {
  color: #fff;
}

.nav-link[aria-current="page"]::after,
.nav-item.is-active > .nav-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--teal-400);
  transform: translateX(-50%);
}

.nav-chevron {
  width: 14px;
  height: 14px;
  background: currentColor;
  -webkit-mask: var(--chevron) center / contain no-repeat;
  mask: var(--chevron) center / contain no-repeat;
  opacity: .7;
  transition: transform .2s var(--ease);
}

.nav-item.is-open .nav-chevron {
  transform: rotate(180deg);
}

.nav-menu {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-menu li {
  margin: 0;
}

.nav-menu-link {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: var(--on-dark);
  text-decoration: none;
  transition: background-color .15s var(--ease);
}

.nav-menu-link:hover,
.nav-menu-link[aria-current="page"] {
  background: rgb(255 255 255 / 6%);
  color: #fff;
}

.nav-menu-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .95rem;
  font-weight: 600;
}

.nav-menu-desc {
  color: var(--on-dark-3);
  font-size: .84rem;
  line-height: 1.45;
}

.nav-badge {
  padding: 2px 7px;
  border: 1px solid rgb(79 227 204 / 35%);
  border-radius: var(--radius-pill);
  color: var(--teal-300);
  font-size: .66rem;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-dark-strong);
  border-radius: var(--radius-pill);
  background: transparent;
  color: #fff;
}

.nav-toggle-bars {
  position: relative;
  width: 18px;
  height: 12px;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after,
.nav-toggle-bars span {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.6px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .25s var(--ease), opacity .2s var(--ease), top .25s var(--ease);
}

.nav-toggle-bars::before {
  top: 0;
}

.nav-toggle-bars span {
  top: 5.2px;
}

.nav-toggle-bars::after {
  top: 10.4px;
}

.nav-open .nav-toggle-bars::before {
  top: 5.2px;
  transform: rotate(45deg);
}

.nav-open .nav-toggle-bars span {
  opacity: 0;
}

.nav-open .nav-toggle-bars::after {
  top: 5.2px;
  transform: rotate(-45deg);
}

.nav-mobile-cta {
  display: none;
}

@media (min-width: 1024px) {
  .nav-item.has-menu > .nav-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    width: 340px;
    padding: 8px;
    border: 1px solid var(--line-dark);
    border-radius: var(--radius);
    background: var(--ink-850);
    box-shadow: 0 24px 60px rgb(0 0 0 / 45%);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -6px);
    transition: opacity .18s var(--ease), transform .18s var(--ease), visibility 0s linear .18s;
  }

  /* Invisible bridge so the pointer can travel from trigger to menu. */
  .nav-item.has-menu > .nav-menu::before {
    content: "";
    position: absolute;
    top: -14px;
    right: 0;
    left: 0;
    height: 14px;
  }

  .nav-item.is-open > .nav-menu {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
    transition: opacity .18s var(--ease), transform .18s var(--ease), visibility 0s;
  }
}

@media (min-width: 1024px) and (hover: hover) {
  .nav-item.has-menu:hover > .nav-menu {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
    transition: opacity .18s var(--ease), transform .18s var(--ease), visibility 0s;
  }

  .nav-item.has-menu:hover > .nav-link {
    background: rgb(255 255 255 / 6%);
    color: #fff;
  }
}

@media (max-width: 1023.98px) {
  .header-inner {
    justify-content: space-between;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .primary-nav {
    position: fixed;
    z-index: 99;
    top: var(--header-h);
    right: 0;
    bottom: 0;
    left: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 12px var(--gutter) 40px;
    border-top: 1px solid var(--line-dark);
    background: var(--ink-950);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .22s var(--ease), transform .22s var(--ease), visibility 0s linear .22s;
  }

  .nav-open {
    overflow: hidden;
  }

  .nav-open .primary-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .22s var(--ease), transform .22s var(--ease), visibility 0s;
  }

  .nav-list {
    display: block;
  }

  .nav-list > li {
    border-bottom: 1px solid var(--line-dark);
  }

  .nav-link {
    position: relative;
    display: flex;
    width: 100%;
    height: 60px;
    justify-content: space-between;
    padding: 0 4px;
    border-radius: 0;
    color: #fff;
    font-size: 1.15rem;
    font-weight: 560;
  }

  .nav-link:hover,
  .nav-item.is-open > .nav-link {
    background: transparent;
  }

  .nav-link[aria-current="page"]::after,
  .nav-item.is-active > .nav-link::after {
    display: none;
  }

  .nav-link[aria-current="page"] {
    color: var(--teal-300);
  }

  .nav-item.has-menu > .nav-menu {
    display: none;
    padding: 0 0 14px;
  }

  .nav-item.has-menu.is-open > .nav-menu {
    display: grid;
  }

  .nav-menu-link {
    padding: 12px;
  }

  .nav-mobile-cta {
    display: grid;
    gap: 10px;
    margin-top: 28px;
  }

  .header-cta-secondary {
    display: none;
  }
}

@media (max-width: 420px) {
  .brand {
    letter-spacing: .14em;
  }

  .header-actions .btn {
    padding: 0 14px;
  }
}

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--ink-950);
  color: var(--on-dark-2);
  font-size: .925rem;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgb(79 227 204 / 40%), transparent);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(5, minmax(0, 1fr));
  gap: 40px 28px;
  padding-block: clamp(56px, 7vw, 88px) 48px;
}

.footer-brand .brand {
  margin-bottom: 18px;
}

.footer-tagline {
  max-width: 320px;
  margin: 0 0 22px;
  color: var(--on-dark-2);
  line-height: 1.6;
}

.footer-social {
  display: flex;
  gap: 10px;
}

.footer-social a {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-dark-strong);
  border-radius: 50%;
  color: var(--on-dark-2);
  transition: color .2s var(--ease), border-color .2s var(--ease), background-color .2s var(--ease);
}

.footer-social a:hover {
  border-color: var(--teal-400);
  background: rgb(79 227 204 / 8%);
  color: var(--teal-300);
}

.footer-social svg {
  width: 18px;
  height: 18px;
}

.footer-col h2 {
  margin: 0 0 16px;
  color: #fff;
  font-size: .8rem;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.footer-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col li + li {
  margin-top: 10px;
}

.footer-col a {
  color: var(--on-dark-2);
  text-decoration: none;
  transition: color .15s var(--ease);
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  padding-block: 24px 32px;
  border-top: 1px solid var(--line-dark);
  color: var(--on-dark-3);
  font-size: .85rem;
}

.footer-bottom p {
  margin: 0;
}

.footer-bottom a {
  color: var(--on-dark-2);
}

/* ---------- Home hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  margin-top: calc(var(--header-h) * -1);
  padding-top: var(--header-h);
  background:
    radial-gradient(ellipse 70% 60% at 78% 38%, rgb(31 199 175 / 16%), transparent 70%),
    radial-gradient(ellipse 50% 50% at 8% 100%, rgb(108 198 242 / 10%), transparent 70%),
    var(--ink-900);
  color: var(--on-dark);
}

.hero::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-dark-strong), transparent);
}

.hero-art {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .1;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 60% 40%, #000 30%, transparent 80%);
  mask-image: radial-gradient(ellipse 80% 80% at 60% 40%, #000 30%, transparent 80%);
}

.hero-art line {
  stroke: var(--teal-400);
  stroke-width: 1;
}

.hero-art circle {
  fill: var(--teal-300);
}

.hero-art .pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: pulse 4s ease-in-out infinite;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: min(820px, calc(100svh - 0px));
  grid-template-columns: minmax(0, 1.22fr) minmax(0, .78fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  padding-block: clamp(56px, 8vw, 112px) clamp(64px, 8vw, 112px);
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  padding: 7px 14px 7px 10px;
  border: 1px solid var(--line-dark-strong);
  border-radius: var(--radius-pill);
  background: rgb(255 255 255 / 4%);
  color: var(--on-dark-2);
  font-size: .82rem;
  font-weight: 550;
  letter-spacing: .02em;
}

.signal-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal-400);
  box-shadow: 0 0 0 4px rgb(79 227 204 / 15%), 0 0 14px rgb(79 227 204 / 70%);
}

.hero-title {
  margin-bottom: 24px;
  color: #fff;
  font-size: clamp(2.75rem, 4.4vw + .6rem, 4.75rem);
  font-weight: 660;
  letter-spacing: -.042em;
  line-height: 1;
}

.hero-title .text-accent {
  display: inline-block;
  padding-bottom: .06em;
}

.hero .lead {
  color: var(--on-dark-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 28px 0 0;
  color: var(--on-dark-3);
  font-size: .875rem;
}

.hero-note::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--line-dark-strong);
}

.holo-scene {
  position: relative;
  display: grid;
  min-height: 440px;
  place-items: center;
  perspective: 900px;
}

.holo-orb {
  position: absolute;
  width: min(88%, 400px);
  aspect-ratio: 1;
  border: 1px solid rgb(120 219 223 / 14%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 48%, rgb(107 232 221 / 14%), transparent 56%),
    repeating-radial-gradient(circle at 50% 50%, transparent 0 35px, rgb(136 228 229 / 5%) 36px 37px);
  box-shadow: 0 0 120px rgb(65 194 194 / 14%), inset 0 0 60px rgb(97 210 208 / 8%);
  animation: orb-breathe 7s ease-in-out infinite;
}

.holo-graphic {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
  overflow: visible;
  filter: drop-shadow(0 0 22px rgb(101 230 210 / 18%));
  animation: holo-float 8s ease-in-out infinite;
}

.holo-orbit {
  transform-box: view-box;
  transform-origin: 210px 190px;
  animation: holo-orbit 32s linear infinite;
}

.holo-orbit ellipse {
  stroke-dasharray: 5 8;
}

.dna-strand {
  transform-box: fill-box;
  transform-origin: center;
}

.dna-strand-a {
  animation: helix-sway 6s ease-in-out infinite;
}

.dna-strand-b {
  animation: helix-sway 6s ease-in-out -3s infinite;
}

.holo-pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: pulse 3.8s ease-in-out infinite;
}

.data-panel {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 6%;
  width: 236px;
  padding: 14px 16px 12px;
  border: 1px solid rgb(154 223 224 / 22%);
  border-radius: 12px;
  background: linear-gradient(135deg, rgb(13 35 49 / 94%), rgb(8 25 39 / 90%));
  box-shadow: 0 18px 50px rgb(0 0 0 / 30%), inset 0 1px rgb(255 255 255 / 5%);
  color: #e6f3f3;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .06em;
  animation: panel-float 7s ease-in-out infinite;
}

.data-panel-head,
.data-panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.data-panel-head {
  padding-bottom: 10px;
  border-bottom: 1px solid rgb(183 220 223 / 13%);
  color: #8da9b4;
  font-size: 9px;
}

.data-panel-head > span:first-child {
  display: flex;
  gap: 4px;
}

.data-panel-head i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4c7e81;
}

.data-panel-head i:first-child {
  background: #e48b83;
}

.data-panel-head i:nth-child(2) {
  background: #e5c275;
}

.sequence-line {
  display: grid;
  grid-template-columns: 22px repeat(5, 1fr);
  gap: 5px;
  align-items: center;
  padding: 10px 0 2px;
}

.sequence-line > span {
  color: #688392;
}

.sequence-line b {
  color: #a7e6da;
  font-weight: 550;
}

.sequence-line .base-c {
  color: #7dd5ed;
}

.sequence-line .base-a {
  color: #efc47d;
}

.data-panel-foot {
  justify-content: flex-start;
  gap: 8px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgb(183 220 223 / 13%);
  color: #92aab5;
  font-family: var(--font);
  font-size: 10.5px;
  letter-spacing: 0;
}

.data-panel-foot .signal-dot {
  width: 6px;
  height: 6px;
  box-shadow: 0 0 10px rgb(79 227 204 / 70%);
}

@keyframes pulse {
  0%, 100% { opacity: .45; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.45); }
}

@keyframes holo-float {
  0%, 100% { transform: translateY(0) rotateY(-4deg); }
  50% { transform: translateY(-8px) rotateY(4deg); }
}

@keyframes holo-orbit {
  to { transform: rotate(360deg); }
}

@keyframes helix-sway {
  0%, 100% { transform: translateX(-3px) scaleX(.98); }
  50% { transform: translateX(3px) scaleX(1.02); }
}

@keyframes panel-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

@keyframes orb-breathe {
  0%, 100% { opacity: .72; transform: scale(.98); }
  50% { opacity: 1; transform: scale(1.03); }
}

/* ---------- Metrics band ---------- */

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.metric {
  padding: clamp(28px, 3.5vw, 44px) clamp(16px, 2.5vw, 32px);
}

.metric + .metric {
  border-left: 1px solid var(--line);
}

.metric-value {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: clamp(2.2rem, 3vw + .8rem, 3.4rem);
  font-weight: 640;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.04em;
  line-height: 1;
}

.metric-value small {
  margin-left: 2px;
  color: var(--teal-600);
  font-size: .5em;
  letter-spacing: 0;
}

.metric-label {
  display: block;
  max-width: 220px;
  color: var(--text-2);
  font-size: .925rem;
  line-height: 1.5;
}

/* ---------- Marquee ---------- */

.marquee {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 48s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-group {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.marquee-group li {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 22px 0;
  color: var(--text-2);
  font-size: .95rem;
  font-weight: 560;
  white-space: nowrap;
}

.marquee-group li::after {
  content: "";
  width: 5px;
  height: 5px;
  margin-inline: 32px;
  border-radius: 50%;
  background: var(--teal-500);
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ---------- Cards ---------- */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 2.4vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease);
}

.card h3 {
  margin-bottom: 10px;
}

.card p:not([class]) {
  color: var(--text-2);
}

.card > :last-child {
  margin-bottom: 0;
}

a.card:hover,
.card-hover:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
  color: var(--text);
  transform: translateY(-3px);
}

.section-alt .card {
  border-color: transparent;
  box-shadow: var(--shadow-xs);
}

.section-alt a.card:hover {
  box-shadow: var(--shadow);
}

.section-dark .card {
  border-color: var(--line-dark);
  background: linear-gradient(180deg, rgb(255 255 255 / 4%), rgb(255 255 255 / 1.5%));
  color: var(--on-dark);
}

.section-dark .card p:not([class]) {
  color: var(--on-dark-2);
}

.section-dark a.card:hover {
  border-color: rgb(79 227 204 / 35%);
  background: linear-gradient(180deg, rgb(79 227 204 / 7%), rgb(255 255 255 / 2%));
  box-shadow: 0 20px 50px rgb(0 0 0 / 30%);
  color: var(--on-dark);
}

.card-icon {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgb(79 227 204 / 16%), rgb(108 198 242 / 12%));
  color: var(--teal-700);
}

.section-dark .card-icon {
  background: linear-gradient(135deg, rgb(79 227 204 / 18%), rgb(108 198 242 / 10%));
  color: var(--teal-300);
}

.card-icon svg {
  width: 24px;
  height: 24px;
}

.card-num {
  display: block;
  margin-bottom: 40px;
  color: var(--teal-700);
  font-family: var(--mono);
  font-size: .8rem;
  letter-spacing: .1em;
}

.section-dark .card-num {
  color: var(--teal-300);
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 24px;
}

.card .text-link {
  margin-top: auto;
  padding-top: 20px;
}

/* Platform tiles */

.tile {
  min-height: 340px;
}

.tile-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 48px;
}

.tile-figure {
  color: #fff;
  font-size: clamp(3rem, 3vw + 1.5rem, 4.25rem);
  font-weight: 640;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.05em;
  line-height: .9;
}

.tile-figure small {
  display: block;
  margin-top: 10px;
  color: var(--on-dark-3);
  font-size: .8rem;
  font-weight: 550;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* Tags */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg-alt);
  color: var(--text-2);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1.3;
  white-space: nowrap;
}

.tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: .8;
}

.tag.plain::before {
  display: none;
}

.tag-success {
  border-color: rgb(6 122 87 / 20%);
  background: var(--ok-bg);
  color: var(--ok);
}

.tag-progress {
  border-color: rgb(138 83 0 / 20%);
  background: var(--warn-bg);
  color: var(--warn);
}

.tag-members {
  border-color: rgb(11 122 110 / 25%);
  background: rgb(79 227 204 / 12%);
  color: var(--teal-800);
}

.section-dark .tag {
  border-color: var(--line-dark-strong);
  background: rgb(255 255 255 / 5%);
  color: var(--on-dark-2);
}

.section-dark .tag-members {
  border-color: rgb(79 227 204 / 30%);
  background: rgb(79 227 204 / 10%);
  color: var(--teal-300);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- Home sections ---------- */

.mission-statement {
  margin: 0;
}

.mission-copy p:not([class]) {
  color: var(--text-2);
  font-size: 1.075rem;
}

.principles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.principles li {
  margin: 0;
  padding: 32px 28px 8px 0;
}

.principles li + li {
  padding-left: 28px;
  border-left: 1px solid var(--line);
}

.principles span {
  display: block;
  margin-bottom: 20px;
  color: var(--teal-700);
  font-family: var(--mono);
  font-size: .8rem;
  letter-spacing: .1em;
}

.principles h3 {
  margin-bottom: 10px;
  font-size: 1.15rem;
}

.principles p:not([class]) {
  margin: 0;
  color: var(--text-2);
  font-size: .95rem;
}

.founder-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse 60% 120% at 100% 0%, rgb(79 227 204 / 10%), transparent 60%),
    var(--bg);
}

.founder-panel h3 {
  margin-bottom: 6px;
  font-size: clamp(1.3rem, 1vw + 1rem, 1.6rem);
}

.founder-panel p:not([class]) {
  max-width: 620px;
  margin: 0;
  color: var(--text-2);
}

.monogram {
  display: inline-flex;
  flex: 0 0 auto;
  width: 84px;
  height: 84px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ink-800), var(--ink-900));
  box-shadow: inset 0 0 0 1px rgb(79 227 204 / 35%), 0 10px 30px rgb(8 17 31 / 20%);
  color: var(--teal-300);
  font-size: 1.5rem;
  font-weight: 650;
  letter-spacing: .04em;
}

/* CTA band */

.cta {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 90% at 85% 0%, rgb(31 199 175 / 22%), transparent 70%),
    radial-gradient(ellipse 50% 80% at 0% 100%, rgb(108 198 242 / 14%), transparent 70%),
    var(--ink-900);
  color: var(--on-dark);
}

.cta-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto;
  align-items: end;
  gap: 32px 64px;
  padding-block: clamp(72px, 9vw, 120px);
}

.cta h2 {
  max-width: 760px;
  margin-bottom: 16px;
  color: #fff;
}

.cta p:not([class]) {
  max-width: 600px;
  margin: 0;
  color: var(--on-dark-2);
  font-size: 1.1rem;
}

/* ---------- Page hero ---------- */

.page-hero {
  position: relative;
  overflow: hidden;
  margin-top: calc(var(--header-h) * -1);
  padding-top: var(--header-h);
  background:
    radial-gradient(ellipse 55% 90% at 90% 0%, rgb(31 199 175 / 16%), transparent 70%),
    radial-gradient(ellipse 40% 70% at 0% 100%, rgb(108 198 242 / 8%), transparent 70%),
    var(--ink-900);
  color: var(--on-dark);
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgb(255 255 255 / 3.5%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 3.5%) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 90% at 70% 0%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 90% at 70% 0%, #000 20%, transparent 75%);
  pointer-events: none;
}

.page-hero-inner {
  position: relative;
  padding-block: clamp(64px, 9vw, 128px) clamp(56px, 7vw, 96px);
}

.page-hero h1 {
  max-width: 920px;
  margin-bottom: 22px;
  color: #fff;
}

.page-hero .lead {
  color: var(--on-dark-2);
}

.page-hero .hero-actions {
  margin-top: 32px;
}

.page-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

.page-hero-meta li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--on-dark-2);
  font-size: .9rem;
}

.page-hero-meta li::before {
  content: "";
  width: 16px;
  height: 16px;
  background: var(--teal-400);
  -webkit-mask: var(--check) center / contain no-repeat;
  mask: var(--check) center / contain no-repeat;
}

.page-hero-compact .page-hero-inner {
  padding-block: clamp(56px, 7vw, 96px) clamp(44px, 5vw, 72px);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
  padding: 0;
  color: var(--on-dark-3);
  font-size: .85rem;
  list-style: none;
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.breadcrumb li + li::before {
  content: "/";
  opacity: .5;
}

.breadcrumb a {
  color: var(--on-dark-2);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: #fff;
}

/* ---------- Prose & notices ---------- */

.prose {
  max-width: 760px;
  color: var(--text-2);
  font-size: 1.05rem;
  line-height: 1.75;
}

.prose h2 {
  margin: 2em 0 .6em;
  color: var(--text);
  font-size: clamp(1.35rem, 1vw + 1rem, 1.7rem);
  letter-spacing: -.02em;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin: 1.6em 0 .5em;
  color: var(--text);
}

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

.prose li {
  padding-left: 4px;
}

.prose li::marker {
  color: var(--teal-600);
}

.notice {
  display: flex;
  gap: 14px;
  margin: 0 0 32px;
  padding: 18px 20px;
  border: 1px solid rgb(11 122 110 / 18%);
  border-radius: var(--radius);
  background: rgb(79 227 204 / 8%);
  color: var(--text-2);
  font-size: .975rem;
  line-height: 1.6;
}

.notice::before {
  content: "i";
  display: inline-flex;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--teal-700);
  color: #fff;
  font-family: Georgia, serif;
  font-size: .8rem;
  font-style: italic;
  font-weight: 700;
}

.notice-warn {
  border-color: rgb(138 83 0 / 22%);
  background: var(--warn-bg);
}

.notice-warn::before {
  content: "!";
  background: var(--warn);
  font-family: var(--font);
  font-style: normal;
}

.legal-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.legal-toc {
  position: sticky;
  top: calc(var(--header-h) + 32px);
  font-size: .9rem;
}

.legal-toc p {
  margin: 0 0 12px;
  color: var(--text);
  font-size: .78rem;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.legal-toc ol {
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--line);
  list-style: none;
}

.legal-toc li {
  margin: 0;
}

.legal-toc a {
  display: block;
  margin-left: -1px;
  padding: 6px 0 6px 16px;
  border-left: 1px solid transparent;
  color: var(--text-3);
  text-decoration: none;
}

.legal-toc a:hover {
  border-left-color: var(--teal-500);
  color: var(--text);
}

/* ---------- Forms ---------- */

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
}

label,
.label {
  color: var(--text);
  font-size: .9rem;
  font-weight: 600;
}

.field-hint {
  color: var(--text-3);
  font-size: .82rem;
  font-weight: 400;
}

input:not([type="checkbox"], [type="radio"], [type="hidden"]),
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}

select {
  padding-right: 42px;
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%235f6c7f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 14px center / 16px no-repeat;
}

textarea {
  min-height: 160px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #8c97a7;
}

input:not([type="checkbox"], [type="radio"]):hover,
select:hover,
textarea:hover {
  border-color: #aab6c5;
}

input:not([type="checkbox"], [type="radio"]):focus,
select:focus,
textarea:focus {
  border-color: var(--teal-600);
  outline: none;
  box-shadow: 0 0 0 4px rgb(31 199 175 / 18%);
}

input[type="checkbox"] {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--teal-600);
  cursor: pointer;
}

.form-status,
.auth-status {
  margin: 0 0 16px;
  font-size: .925rem;
}

.form-status:empty,
.auth-status:empty {
  display: none;
}

.form-status[data-kind],
.auth-status[data-kind] {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  color: var(--text-2);
}

.form-status[data-kind=""],
.auth-status[data-kind=""] {
  border-color: var(--line);
}

.form-status[data-kind="success"],
.auth-status[data-kind="success"] {
  border-color: rgb(6 122 87 / 22%);
  background: var(--ok-bg);
  color: var(--ok);
}

.form-status[data-kind="error"],
.auth-status[data-kind="error"] {
  border-color: rgb(179 38 30 / 22%);
  background: var(--err-bg);
  color: var(--err);
}

.form-note {
  margin: 0 0 20px;
  color: var(--text-3);
  font-size: .85rem;
}

.form-card {
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
  box-shadow: var(--shadow);
}

.form-card h2 {
  margin-bottom: 8px;
  font-size: clamp(1.5rem, 1vw + 1.1rem, 1.9rem);
}

.form-card > p:not([class]) {
  color: var(--text-2);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

button[aria-busy="true"] {
  position: relative;
  color: transparent !important;
}

button[aria-busy="true"]::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid var(--ink-950);
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.btn-dark[aria-busy="true"]::after {
  border-color: #fff;
  border-right-color: transparent;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Contact ---------- */

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.contact-aside {
  display: grid;
  gap: 16px;
}

.contact-item {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.contact-item h3 {
  margin-bottom: 6px;
  font-size: 1.05rem;
}

.contact-item p:not([class]) {
  margin: 0;
  color: var(--text-2);
  font-size: .95rem;
}

.contact-item a {
  font-weight: 600;
  word-break: break-word;
}

.contact-topics {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.contact-topics li {
  position: relative;
  padding-left: 26px;
  color: var(--text-2);
  font-size: .95rem;
}

.contact-topics li::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 0;
  width: 16px;
  height: 16px;
  background: var(--teal-600);
  -webkit-mask: var(--check) center / contain no-repeat;
  mask: var(--check) center / contain no-repeat;
}

/* ---------- Learning paths (/learn) ---------- */

.tracker {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: center;
  gap: 24px 48px;
  margin-top: -40px;
  padding: 24px clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
  box-shadow: var(--shadow-lg);
}

.tracker-progress {
  display: grid;
  gap: 10px;
}

.tracker-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
}

.tracker-head strong {
  font-size: 1rem;
}

.tracker-head span {
  color: var(--text-2);
  font-size: .925rem;
  font-variant-numeric: tabular-nums;
}

.tracker p {
  margin: 0;
}

.tracker .field {
  margin: 0;
}

progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--bg-sunken);
  color: var(--teal-500);
  -webkit-appearance: none;
  appearance: none;
}

progress::-webkit-progress-bar {
  border-radius: var(--radius-pill);
  background: var(--bg-sunken);
}

progress::-webkit-progress-value {
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--teal-600), var(--teal-400));
  transition: width .4s var(--ease);
}

progress::-moz-progress-bar {
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--teal-600), var(--teal-400));
}

.search-input {
  position: relative;
}

.search-input input {
  padding-left: 44px;
}

.search-input::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 15px;
  width: 18px;
  height: 18px;
  background: var(--text-3);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='8.5' cy='8.5' r='5.5' fill='none' stroke='%23000' stroke-width='1.7'/%3E%3Cpath d='m13 13 4 4' stroke='%23000' stroke-width='1.7' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='8.5' cy='8.5' r='5.5' fill='none' stroke='%23000' stroke-width='1.7'/%3E%3Cpath d='m13 13 4 4' stroke='%23000' stroke-width='1.7' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: translateY(-50%);
  pointer-events: none;
}

.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
}

.roadmap-card {
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 2.4vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}

.roadmap-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.roadmap-card:has(input:checked) {
  border-color: rgb(15 163 145 / 45%);
  background: linear-gradient(180deg, rgb(79 227 204 / 6%), var(--bg) 40%);
}

.roadmap-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.stage-number {
  color: var(--teal-700);
  font-family: var(--mono);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .06em;
}

.stage-label {
  color: var(--text-3);
  font-size: .7rem;
  font-weight: 650;
  letter-spacing: .12em;
  text-align: right;
  text-transform: uppercase;
}

.roadmap-card h3 {
  margin-bottom: 10px;
}

.roadmap-card > p:not([class]) {
  color: var(--text-2);
  font-size: .975rem;
}

.roadmap-card ul {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.roadmap-card li {
  position: relative;
  padding-left: 22px;
  color: var(--text-2);
  font-size: .925rem;
  line-height: 1.55;
}

.roadmap-card li::before {
  content: "";
  position: absolute;
  top: .62em;
  left: 2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal-500);
}

.tool-line {
  margin: 0 0 20px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  color: var(--text-2);
  font-size: .875rem;
}

.tool-line strong {
  color: var(--text);
}

.stage-check,
.roadmap-stage-check,
.lesson-complete {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: .925rem;
  font-weight: 560;
  cursor: pointer;
}

.roadmap-empty {
  margin: 32px 0 0;
  padding: 32px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  color: var(--text-2);
  text-align: center;
}

.idea-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
}

.project-idea {
  padding: clamp(24px, 2.6vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
}

.project-idea > span {
  display: block;
  margin-bottom: 18px;
  color: var(--teal-700);
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .12em;
}

.project-idea p:not([class]) {
  color: var(--text-2);
  font-size: .975rem;
}

.project-idea p:last-child {
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.project-idea strong {
  color: var(--text);
}

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

.resource-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 16px;
  padding: 22px 24px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: rgb(255 255 255 / 3%);
  text-decoration: none;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}

.resource-card:hover {
  border-color: rgb(79 227 204 / 40%);
  background: rgb(79 227 204 / 6%);
}

.resource-card strong {
  color: #fff;
  font-size: 1rem;
}

.resource-card span {
  grid-column: 1;
  color: var(--on-dark-2);
  font-size: .9rem;
  line-height: 1.5;
}

.resource-card .icon-arrow-out {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  color: var(--teal-300);
}

.section-dark .resource-card span {
  color: var(--on-dark-2);
}

/* ---------- 26-stage roadmap (/roadmap) ---------- */

.phase-rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 clamp(40px, 5vw, 64px);
  padding: 0;
  list-style: none;
}

.phase-rail li {
  margin: 0;
}

.phase-rail a {
  display: grid;
  height: 100%;
  gap: 6px;
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}

.phase-rail a:hover {
  border-color: var(--teal-500);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.phase-rail span {
  color: var(--teal-700);
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .08em;
}

.phase-rail strong {
  font-size: .95rem;
  line-height: 1.35;
}

.phase-rail small {
  color: var(--text-3);
  font-size: .8rem;
}

.roadmap-stage-list {
  display: grid;
  gap: 12px;
}

.roadmap-phase-title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 40px 0 8px;
  color: var(--text);
  font-size: .8rem;
  font-weight: 650;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.roadmap-phase-title::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--line);
}

.roadmap-phase-title:first-child {
  margin-top: 0;
}

.roadmap-stage-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}

.roadmap-stage-card:hover {
  border-color: var(--line-strong);
}

.roadmap-stage-card:has(details[open]) {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.roadmap-stage-card:has(input:checked) .roadmap-stage-number {
  border-color: var(--teal-600);
  background: var(--teal-600);
  color: #fff;
}

.roadmap-stage-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 20px clamp(18px, 2.4vw, 28px);
  cursor: pointer;
  list-style: none;
}

.roadmap-stage-summary::-webkit-details-marker {
  display: none;
}

.roadmap-stage-number {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--teal-700);
  font-family: var(--mono);
  font-size: .85rem;
  font-weight: 600;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}

.roadmap-stage-heading {
  display: grid;
  gap: 4px;
}

.roadmap-stage-heading strong {
  font-size: 1.075rem;
  letter-spacing: -.01em;
}

.roadmap-stage-heading small {
  color: var(--text-2);
  font-size: .925rem;
  line-height: 1.5;
}

.roadmap-stage-expand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--teal-700);
  font-size: .875rem;
  font-weight: 600;
  white-space: nowrap;
}

.roadmap-stage-expand::after {
  content: "";
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: var(--chevron) center / contain no-repeat;
  mask: var(--chevron) center / contain no-repeat;
  transition: transform .2s var(--ease);
}

.roadmap-stage-details[open] .roadmap-stage-expand::after {
  transform: rotate(180deg);
}

.roadmap-stage-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 40px;
  padding: 8px clamp(18px, 2.4vw, 28px) 24px calc(clamp(18px, 2.4vw, 28px) + 64px);
}

.roadmap-stage-detail-block:first-child {
  grid-column: 1 / -1;
}

.roadmap-stage-detail-block h4 {
  margin-bottom: 8px;
  color: var(--text);
  font-size: .78rem;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.roadmap-stage-detail-block p,
.roadmap-stage-detail-block li {
  color: var(--text-2);
  font-size: .95rem;
  line-height: 1.65;
}

.roadmap-stage-detail-block p {
  margin: 0;
}

.roadmap-stage-detail-block ul {
  margin: 0;
  padding-left: 1.1em;
}

.roadmap-stage-detail-block li::marker {
  color: var(--teal-600);
}

.roadmap-stage-project {
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
}

.roadmap-stage-check {
  grid-column: 1 / -1;
  margin-top: 0;
}

.roadmap-project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
}

.roadmap-project-card {
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 2.4vw, 30px);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgb(255 255 255 / 4%), rgb(255 255 255 / 1.5%));
}

.roadmap-project-status {
  align-self: flex-start;
  margin-bottom: 20px;
  padding: 5px 11px;
  border: 1px solid rgb(79 227 204 / 30%);
  border-radius: var(--radius-pill);
  background: rgb(79 227 204 / 8%);
  color: var(--teal-300);
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.roadmap-project-card h3 {
  color: #fff;
}

.roadmap-project-card p:not([class]) {
  color: var(--on-dark-2);
  font-size: .95rem;
}

.roadmap-project-evidence {
  color: var(--on-dark-2);
  font-size: .95rem;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line-dark);
}

.roadmap-project-card a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-weight: 600;
  text-decoration: none;
}

.schedule {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  counter-reset: schedule;
  list-style: none;
}

.schedule li {
  position: relative;
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 24px;
  margin: 0;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.schedule li:last-child {
  border-bottom: 1px solid var(--line);
}

.schedule strong {
  color: var(--teal-700);
  font-size: .95rem;
}

.schedule span {
  color: var(--text-2);
}

/* ---------- Academy ---------- */

.session-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 8px 16px 8px 12px;
  border: 1px solid var(--line-dark-strong);
  border-radius: var(--radius-pill);
  background: rgb(255 255 255 / 4%);
  color: var(--on-dark-2);
  font-size: .875rem;
}

.academy-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.academy-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  display: grid;
  max-height: calc(100vh - var(--header-h) - 48px);
  gap: 20px;
  overflow-y: auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
  scrollbar-width: thin;
}

.academy-sidebar .field {
  margin: 0;
}

.course-nav {
  display: grid;
  gap: 2px;
}

.course-group-label {
  display: block;
  margin: 14px 10px 6px;
  color: var(--text-3);
  font-size: .7rem;
  font-weight: 650;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.course-group-label:first-child {
  margin-top: 0;
}

.course-link {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-2);
  font-size: .925rem;
  font-weight: 540;
  text-align: left;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}

.course-link:hover {
  background: var(--bg-alt);
  color: var(--text);
}

.course-link[aria-current="true"] {
  background: var(--ink-900);
  color: #fff;
}

.course-link-state {
  flex: 0 0 auto;
  color: var(--text-3);
  font-size: .65rem;
  font-weight: 650;
  letter-spacing: .08em;
}

.course-link[aria-current="true"] .course-link-state {
  color: var(--teal-300);
}

.course-link-state.is-done {
  color: var(--ok);
}

.sidebar-note {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  color: var(--text-2);
  font-size: .85rem;
}

.sidebar-note strong {
  color: var(--text);
}

.lesson-content {
  min-width: 0;
}

.lesson-loading {
  display: grid;
  min-height: 360px;
  place-items: center;
  align-content: center;
  gap: 16px;
  color: var(--text-3);
}

.loading-ring {
  width: 36px;
  height: 36px;
  border: 3px solid var(--line);
  border-top-color: var(--teal-500);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

.lesson-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.lesson-area,
.lesson-level {
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg-alt);
  color: var(--text-2);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .04em;
}

.lesson-level {
  border-color: rgb(11 122 110 / 25%);
  background: rgb(79 227 204 / 10%);
  color: var(--teal-800);
}

.lesson-title {
  margin-bottom: 12px;
  font-size: clamp(2rem, 2vw + 1.2rem, 2.75rem);
}

.lesson-summary {
  max-width: 720px;
  color: var(--text-2);
  font-size: 1.15rem;
}

.lesson-outcome {
  margin: 28px 0 0;
  padding: 22px 24px;
  border-left: 3px solid var(--teal-500);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--bg-alt);
}

.lesson-outcome .eyebrow {
  margin-bottom: 8px;
}

.lesson-outcome p {
  margin: 0;
  color: var(--text);
  font-weight: 540;
}

.lesson-section {
  margin-top: clamp(40px, 5vw, 56px);
}

.lesson-section > h3 {
  margin-bottom: 18px;
  font-size: 1.4rem;
}

.lesson-section > .section-intro {
  margin: -8px 0 18px;
  color: var(--text-2);
}

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

.concept-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.concept-index {
  display: block;
  margin-bottom: 14px;
  color: var(--teal-700);
  font-family: var(--mono);
  font-size: .8rem;
}

.concept-card h4 {
  margin-bottom: 8px;
}

.concept-card p:not([class]) {
  margin: 0;
  color: var(--text-2);
  font-size: .925rem;
}

.lesson-steps {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  counter-reset: steps;
  list-style: none;
}

.lesson-steps li {
  position: relative;
  margin: 0;
  padding: 16px 18px 16px 60px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text-2);
  counter-increment: steps;
}

.lesson-steps li::before {
  content: counter(steps);
  position: absolute;
  top: 14px;
  left: 16px;
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--ink-900);
  color: var(--teal-300);
  font-size: .8rem;
  font-weight: 650;
}

.code-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 12px 20px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--ink-800);
  color: var(--on-dark-3);
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .1em;
}

.copy-code {
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid var(--line-dark-strong);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--on-dark);
  font-family: var(--font);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: 0;
}

.copy-code:hover {
  border-color: var(--teal-400);
  color: var(--teal-300);
}

.lesson-section pre {
  margin: 0;
  overflow-x: auto;
  padding: 20px;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--ink-900);
  color: #d9e6f2;
  font-size: .875rem;
  line-height: 1.7;
  tab-size: 4;
}

.lesson-section pre code {
  font-size: inherit;
}

.code-note {
  margin: 12px 0 0;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  color: var(--text-2);
  font-family: var(--mono);
  font-size: .85rem;
  white-space: pre-wrap;
}

.code-note::before {
  content: "Expected output\A";
  color: var(--text-3);
  font-family: var(--font);
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.practice-question {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.practice-question summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  color: var(--text);
  font-weight: 560;
  cursor: pointer;
  list-style: none;
}

.practice-question summary::-webkit-details-marker {
  display: none;
}

.practice-question summary::after {
  content: "";
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  background: var(--text-3);
  -webkit-mask: var(--chevron) center / contain no-repeat;
  mask: var(--chevron) center / contain no-repeat;
  transition: transform .2s var(--ease);
}

.practice-question[open] summary::after {
  transform: rotate(180deg);
}

.practice-answer {
  margin: 0;
  padding: 0 20px 18px;
  color: var(--text-2);
}

.project-challenge {
  padding: clamp(24px, 3vw, 36px);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse 60% 100% at 100% 0%, rgb(31 199 175 / 20%), transparent 70%),
    var(--ink-900);
  color: var(--on-dark);
}

.project-challenge .eyebrow {
  color: var(--teal-300);
}

.project-challenge h3 {
  color: #fff;
}

.project-challenge p:not([class]) {
  margin: 0;
  color: var(--on-dark-2);
}

.references-section ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.references-section li {
  margin: 0;
}

.references-section a {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 560;
  text-decoration: none;
}

.references-section a::after {
  content: "";
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  background: var(--teal-700);
  -webkit-mask: var(--arrow-out) center / contain no-repeat;
  mask: var(--arrow-out) center / contain no-repeat;
}

.references-section a:hover {
  border-color: var(--teal-500);
}

.lesson-complete {
  margin-top: 40px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-alt);
}

.lesson-content > [data-progress-status] {
  display: block;
  margin-top: 10px;
}

/* ---------- Projects ---------- */

.case-list {
  display: grid;
  gap: clamp(20px, 2.4vw, 28px);
}

.case {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
}

.case-body {
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 3.6vw, 48px);
}

.case-body .tag-row {
  margin-bottom: 24px;
}

.case-body h3 {
  margin-bottom: 12px;
  font-size: clamp(1.5rem, 1.2vw + 1.1rem, 2rem);
  letter-spacing: -.025em;
}

.case-body > p:not([class]) {
  color: var(--text-2);
  font-size: 1.025rem;
}

.case-body .btn-row {
  margin-top: auto;
  padding-top: 20px;
}

.case-aside {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 3.6vw, 48px);
  border-left: 1px solid var(--line);
  background: var(--bg-alt);
}

.case-facts {
  display: grid;
  gap: 0;
  margin: 0;
}

.case-facts div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.case-facts div:first-child {
  padding-top: 0;
}

.case-facts div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.case-facts dt {
  color: var(--text-3);
  font-size: .8rem;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.case-facts dd {
  margin: 0;
  color: var(--text);
  font-size: .95rem;
}

.case-callout {
  margin: 4px 0 0;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  color: var(--text-2);
  font-size: .925rem;
}

.case-callout strong {
  color: var(--text);
}

.standard-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.standard-list li {
  margin: 0;
  padding: 24px 20px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: rgb(255 255 255 / 3%);
}

.standard-list span {
  display: block;
  margin-bottom: 28px;
  color: var(--teal-300);
  font-family: var(--mono);
  font-size: .8rem;
}

.standard-list strong {
  display: block;
  margin-bottom: 6px;
  color: #fff;
}

.standard-list p:not([class]) {
  margin: 0;
  color: var(--on-dark-2);
  font-size: .9rem;
  line-height: 1.55;
}

/* ---------- About ---------- */

.value-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 48px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.value-list li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 16px;
  margin: 0;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.value-list span {
  color: var(--teal-700);
  font-family: var(--mono);
  font-size: .8rem;
  line-height: 1.9;
}

.value-list strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.05rem;
}

.value-list p:not([class]) {
  margin: 0;
  color: var(--text-2);
  font-size: .95rem;
}

.profile-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(20px, 3vw, 36px);
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
}

.profile-card h3 {
  margin-bottom: 4px;
  font-size: 1.6rem;
  letter-spacing: -.02em;
}

.profile-role {
  margin: 0 0 16px;
  color: var(--teal-700);
  font-weight: 600;
}

.profile-card p:not([class]) {
  color: var(--text-2);
}

.link-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.link-pills a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  color: var(--text);
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}

.link-pills a:hover {
  border-color: var(--teal-600);
  color: var(--teal-800);
}

.link-pills svg {
  width: 16px;
  height: 16px;
}

/* ---------- Team ---------- */

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
}

.team-card {
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 2.6vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
}

.team-card .eyebrow {
  margin: 24px 0 8px;
}

.team-card h2,
.team-card h3 {
  margin-bottom: 6px;
  font-size: 1.35rem;
  letter-spacing: -.02em;
}

.team-card > p:not([class]) {
  color: var(--text-2);
  font-size: .95rem;
}

.team-card .team-title {
  margin-bottom: 14px;
  color: var(--text);
  font-weight: 560;
}

.team-founder {
  grid-column: span 2;
  background:
    radial-gradient(ellipse 60% 120% at 100% 0%, rgb(79 227 204 / 10%), transparent 60%),
    var(--bg);
}

.team-monogram {
  display: inline-flex;
  width: 64px;
  height: 64px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ink-800), var(--ink-900));
  box-shadow: inset 0 0 0 1px rgb(79 227 204 / 35%);
  color: var(--teal-300);
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: .04em;
}

.team-founder .team-monogram {
  width: 80px;
  height: 80px;
  font-size: 1.4rem;
}

.team-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
}

.team-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  color: var(--text);
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
}

.team-links a:hover {
  border-color: var(--teal-600);
  color: var(--teal-800);
}

.team-status {
  margin: 24px 0 0;
}

/* ---------- Account / auth ---------- */

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.auth-points {
  display: grid;
  gap: 0;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.auth-points li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
  margin: 0;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.auth-points li:last-child {
  border-bottom: 1px solid var(--line);
}

.auth-points svg {
  width: 44px;
  height: 44px;
  padding: 11px;
  border-radius: 12px;
  background: rgb(79 227 204 / 12%);
  color: var(--teal-700);
}

.auth-points strong {
  display: block;
  margin-bottom: 2px;
}

.auth-points p:not([class]) {
  margin: 0;
  color: var(--text-2);
  font-size: .95rem;
}

.auth-card {
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
  box-shadow: var(--shadow-lg);
}

.auth-card h2,
.auth-card h3 {
  margin-bottom: 8px;
  font-size: 1.5rem;
  letter-spacing: -.02em;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 28px;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: var(--bg-sunken);
}

.auth-tabs button {
  min-height: 42px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-2);
  font-size: .925rem;
  font-weight: 600;
  transition: background-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}

.auth-tabs button[aria-selected="true"] {
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  color: var(--text);
}

.auth-card form .btn {
  width: 100%;
}

.auth-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--teal-700);
  font-size: .875rem;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: .2em;
}

.link-button:hover {
  color: var(--teal-800);
  text-decoration-color: currentColor;
}

.auth-help {
  color: var(--text-2);
  font-size: .925rem;
}

.auth-alt {
  margin: 20px 0 0;
  color: var(--text-3);
  font-size: .875rem;
  text-align: center;
}

.totp-box {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin: 0 0 24px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-alt);
  color: var(--text-2);
  font-size: .875rem;
  text-align: center;
}

.totp-box img {
  width: 180px;
  height: 180px;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: #fff;
}

.totp-secret {
  max-width: 100%;
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  background: var(--bg);
  color: var(--text);
  font-size: .85rem;
  letter-spacing: .08em;
  word-break: break-all;
  user-select: all;
}

#totp-code {
  font-family: var(--mono);
  font-size: 1.4rem;
  letter-spacing: .4em;
  text-align: center;
}

/* ---------- Dashboard ---------- */

.dash-welcome {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
  padding: 24px clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
}

.dash-identity {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.dash-identity .team-monogram {
  width: 52px;
  height: 52px;
  font-size: 1rem;
}

.dash-identity strong {
  display: block;
  overflow: hidden;
  font-size: 1.1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-identity span {
  color: var(--text-3);
  font-size: .875rem;
}

.dash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.progress-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.progress-card {
  display: grid;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}

.progress-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
  color: var(--text);
}

.progress-card-label {
  color: var(--text-3);
  font-size: .78rem;
  font-weight: 650;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.progress-card-value {
  font-size: 2rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.03em;
  line-height: 1;
}

.progress-card-value small {
  color: var(--text-3);
  font-size: .5em;
  font-weight: 550;
  letter-spacing: 0;
}

.progress-card .text-link {
  font-size: .875rem;
}

.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.panel {
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
}

.panel > h2 {
  margin-bottom: 8px;
  font-size: 1.4rem;
  letter-spacing: -.02em;
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.panel-head h2 {
  margin-bottom: 6px;
  font-size: 1.4rem;
  letter-spacing: -.02em;
}

.panel-head p:not([class]) {
  margin: 0;
  color: var(--text-2);
  font-size: .95rem;
}

.member-role-badge,
.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border: 1px solid rgb(11 122 110 / 25%);
  border-radius: var(--radius-pill);
  background: rgb(79 227 204 / 12%);
  color: var(--teal-800);
  font-size: .78rem;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: capitalize;
  white-space: nowrap;
}

.member-profile-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 16px;
}

.member-profile-form > label:not(.directory-opt-in) {
  display: grid;
  gap: 8px;
}

.member-profile-bio,
.member-profile-form .span-2,
.directory-opt-in,
.member-profile-actions {
  grid-column: 1 / -1;
}

.member-profile-form textarea {
  min-height: 120px;
}

.directory-opt-in {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-alt);
  cursor: pointer;
}

.directory-opt-in span {
  display: grid;
  gap: 4px;
}

.directory-opt-in strong {
  font-size: .95rem;
}

.directory-opt-in small {
  color: var(--text-2);
  font-size: .85rem;
  font-weight: 400;
  line-height: 1.5;
}

.member-profile-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

#profile-save-status {
  color: var(--text-2);
  font-size: .9rem;
}

.dashboard-stage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: .95rem;
}

.dashboard-stage:last-child {
  border-bottom: 0;
}

.dashboard-stage strong {
  font-weight: 560;
}

.dashboard-stage span {
  flex: 0 0 auto;
}

.quick-links {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.quick-links li {
  margin: 0;
}

.quick-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  transition: border-color .2s var(--ease);
}

.quick-links a:hover {
  border-color: var(--teal-500);
  color: var(--text);
}

.quick-links .icon-arrow {
  color: var(--teal-700);
}

.admin-callout {
  margin-top: 16px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--ink-900);
  color: var(--on-dark-2);
}

.admin-callout strong {
  display: block;
  margin-bottom: 4px;
  color: #fff;
}

.admin-callout p:not([class]) {
  margin: 0 0 14px;
  font-size: .9rem;
}

/* ---------- Admin console ---------- */

.admin-boundary {
  margin-bottom: 32px;
}

.admin-role-guide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(24px, 4vw, 56px);
  margin-bottom: 32px;
  padding: clamp(24px, 3.5vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
}

.admin-role-guide h2 {
  font-size: clamp(1.5rem, 1vw + 1.1rem, 2rem);
}

.admin-role-guide p:not([class]) {
  color: var(--text-2);
  font-size: .95rem;
}

.admin-invite {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 20px;
}

#invite-status {
  color: var(--text-2);
  font-size: .875rem;
}

.admin-role-grid {
  display: grid;
  gap: 8px;
}

.admin-role-grid article {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
}

.admin-role-grid strong {
  font-size: .925rem;
}

.admin-role-grid span {
  color: var(--text-2);
  font-size: .875rem;
  line-height: 1.5;
}

.admin-owner-note {
  grid-column: 1 / -1;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid rgb(6 122 87 / 22%);
  border-radius: var(--radius-sm);
  background: var(--ok-bg);
  color: var(--ok);
  font-size: .9rem;
  font-weight: 560;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.admin-metrics article {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
}

.admin-metrics span {
  display: block;
  margin-bottom: 10px;
  color: var(--text-3);
  font-size: .78rem;
  font-weight: 650;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.admin-metrics strong {
  font-size: 2.25rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.03em;
  line-height: 1;
}

.admin-console {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 0;
}

.admin-toolbar h2 {
  margin-bottom: 4px;
  font-size: 1.4rem;
  letter-spacing: -.02em;
}

.admin-toolbar p:not([class]) {
  margin: 0;
  color: var(--text-2);
  font-size: .925rem;
}

.admin-filters {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 20px 24px;
}

.admin-filters label {
  display: grid;
  gap: 6px;
  font-size: .82rem;
}

#member-count {
  margin: 0;
  padding: 0 24px 12px;
}

.admin-table-wrap {
  overflow-x: auto;
  border-top: 1px solid var(--line);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .925rem;
}

.admin-table th {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-alt);
  color: var(--text-3);
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .1em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.admin-table th:first-child,
.admin-table td:first-child {
  padding-left: 24px;
}

.admin-table th:last-child,
.admin-table td:last-child {
  padding-right: 24px;
}

.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.admin-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-table tbody tr:hover td {
  background: #fafbfd;
}

.admin-table td:first-child strong {
  display: block;
  font-weight: 600;
}

.admin-member-email {
  display: block;
  color: var(--text-3);
  font-size: .85rem;
  word-break: break-all;
}

.admin-you {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  background: var(--ink-900);
  color: var(--teal-300);
  font-size: .68rem;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
  vertical-align: 2px;
}

.admin-role-select {
  width: auto;
  min-width: 150px;
  min-height: 38px !important;
  padding-block: 6px !important;
  font-size: .9rem !important;
  text-transform: capitalize;
}

.admin-role-text {
  text-transform: capitalize;
}

.member-active,
.member-suspended {
  white-space: nowrap;
}

.member-active::before,
.member-suspended::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--ok);
  vertical-align: 1px;
}

.member-active {
  color: var(--ok);
  font-weight: 560;
}

.member-suspended {
  color: var(--err);
  font-weight: 560;
}

.member-suspended::before {
  background: var(--err);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-table button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--text);
  font-size: .85rem;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color .15s var(--ease), background-color .15s var(--ease), color .15s var(--ease);
}

.admin-table button:hover {
  border-color: var(--text);
}

.admin-table .admin-danger-action {
  border-color: rgb(179 38 30 / 30%);
  color: var(--err);
}

.admin-table .admin-danger-action:hover {
  border-color: var(--err);
  background: var(--err-bg);
}

.admin-table .admin-enable-action {
  border-color: rgb(6 122 87 / 30%);
  color: var(--ok);
}

.admin-table .admin-enable-action:hover {
  border-color: var(--ok);
  background: var(--ok-bg);
}

#member-empty {
  margin: 0;
  padding: 32px 24px;
  text-align: center;
}

.admin-setup {
  padding: clamp(24px, 3.5vw, 40px);
  border: 1px solid rgb(138 83 0 / 22%);
  border-radius: var(--radius-lg);
  background: var(--warn-bg);
}

.admin-setup h2 {
  font-size: 1.5rem;
}

.admin-setup p,
.admin-setup li {
  color: var(--text-2);
}

.admin-setup ol {
  margin: 0 0 20px;
}

.admin-setup code {
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  background: rgb(255 255 255 / 70%);
  color: var(--text);
  font-size: .85em;
}

.admin-setup pre {
  overflow-x: auto;
  margin: 0 0 20px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--ink-900);
  color: #d9e6f2;
  font-size: .85rem;
  line-height: 1.6;
}

.admin-setup pre code {
  padding: 0;
  background: none;
  color: inherit;
}

.member-details-dialog {
  width: min(640px, calc(100% - 32px));
  max-height: calc(100vh - 64px);
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--bg);
  box-shadow: var(--shadow-lg);
  color: var(--text);
}

.member-details-dialog::backdrop {
  background: rgb(5 10 19 / 60%);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.member-details-heading {
  position: sticky;
  top: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.member-details-heading .eyebrow {
  margin-bottom: 8px;
}

.member-details-heading h2 {
  margin: 0;
  font-size: 1.4rem;
  letter-spacing: -.02em;
  word-break: break-word;
}

.member-details-heading button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--bg);
  font-size: .875rem;
  font-weight: 600;
}

.member-details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
  padding: 12px 28px 28px;
}

.member-detail-item {
  display: grid;
  gap: 4px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.member-detail-item strong {
  color: var(--text-3);
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.member-detail-item span {
  color: var(--text);
  font-size: .95rem;
  word-break: break-word;
}

/* ---------- 404 ---------- */

.error-page {
  display: grid;
  min-height: calc(100vh - var(--header-h));
  align-items: center;
}

.error-code {
  display: block;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: clamp(4rem, 12vw, 9rem);
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: 1;
}

/* ---------- Motion ---------- */

.reveal-pending {
  opacity: 0;
  transform: translateY(18px);
}

.reveal-pending.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .marquee-track {
    animation: none;
  }

  .reveal-pending {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
  .footer-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

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

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

@media (max-width: 1023.98px) {
  .grid-4,
  .principles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .principles li:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .grid-3,
  .roadmap-grid,
  .roadmap-project-grid,
  .team-grid,
  .resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-inner {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
  }

  .holo-scene {
    width: min(100%, 520px);
    min-height: 380px;
    margin-inline: auto;
  }

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

  .metric:nth-child(3) {
    border-left: 0;
  }

  .metric:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .split,
  .split-wide,
  .contact-layout,
  .auth-shell,
  .dash-grid,
  .admin-role-guide,
  .case {
    grid-template-columns: minmax(0, 1fr);
  }

  .case-aside {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .cta-inner {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .academy-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .academy-sidebar {
    position: static;
    max-height: none;
  }

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

  .legal-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .legal-toc {
    display: none;
  }

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

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

  .team-founder {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  :root {
    --header-h: 64px;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .roadmap-grid,
  .roadmap-project-grid,
  .team-grid,
  .resource-grid,
  .idea-grid,
  .principles,
  .progress-cards,
  .value-list,
  .standard-list,
  .references-section ul,
  .member-profile-form,
  .member-details-grid,
  .field-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .principles li,
  .principles li + li {
    padding: 24px 0 8px;
    border-left: 0;
  }

  .principles li + li {
    border-top: 1px solid var(--line);
  }

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

  .phase-rail li:last-child {
    grid-column: 1 / -1;
  }

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

  .hero-title {
    font-size: clamp(2.5rem, 10vw, 3.4rem);
  }

  .hero-actions .btn,
  .cta .btn {
    flex: 1 1 auto;
  }

  .holo-scene {
    min-height: 320px;
  }

  .holo-graphic {
    width: min(86%, 340px);
  }

  .data-panel {
    right: 0;
    bottom: 0;
    width: 210px;
  }

  .metric {
    padding: 24px 16px;
  }

  .founder-panel,
  .profile-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .roadmap-stage-summary {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
  }

  .roadmap-stage-expand {
    display: none;
  }

  .roadmap-stage-body {
    grid-template-columns: minmax(0, 1fr);
    padding-left: clamp(18px, 2.4vw, 28px);
  }

  .schedule li {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .case-facts div {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .admin-role-grid article {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .admin-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-table thead {
    display: none;
  }

  .admin-table,
  .admin-table tbody,
  .admin-table tr,
  .admin-table td {
    display: block;
    width: 100%;
  }

  .admin-table tr {
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
  }

  .admin-table tbody tr:last-child {
    border-bottom: 0;
  }

  .admin-table td,
  .admin-table th:first-child,
  .admin-table td:first-child,
  .admin-table td:last-child {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    border: 0;
  }

  .admin-table td:first-child {
    display: block;
    padding-bottom: 10px;
  }

  .admin-table td[data-label]::before {
    content: attr(data-label);
    color: var(--text-3);
    font-size: .72rem;
    font-weight: 650;
    letter-spacing: .1em;
    text-transform: uppercase;
  }

  .admin-table tbody tr:hover td {
    background: transparent;
  }

  .admin-role-select {
    width: 100%;
  }

  .tracker {
    margin-top: -28px;
  }

  .dash-welcome {
    align-items: flex-start;
  }

  .member-details-heading,
  .member-details-grid {
    padding-inline: 20px;
  }
}

@media (max-width: 480px) {
  .metrics {
    grid-template-columns: minmax(0, 1fr);
  }

  .metric + .metric {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .data-panel {
    display: none;
  }

  .admin-metrics {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media print {
  .reveal-pending {
    opacity: 1 !important;
    transform: none !important;
  }

  .site-header,
  .site-footer,
  .nav-toggle,
  .hero-art,
  .holo-scene {
    display: none !important;
  }

  .page-hero,
  .hero,
  .section-dark,
  .cta {
    background: none !important;
    color: #000 !important;
  }

  .page-hero h1,
  .page-hero .lead {
    color: #000 !important;
  }
}

/* ---------- Utilities ---------- */

.mt-xl {
  margin-top: clamp(56px, 7vw, 96px);
}

.mt-lg {
  margin-top: clamp(40px, 5vw, 64px);
}

.mt-md {
  margin-top: 32px;
}

.card-tags {
  margin-bottom: 28px;
}

.eyebrow.founder-kicker {
  margin-bottom: 10px;
}

.btn-row.center {
  justify-content: center;
}

.value-list.single {
  grid-template-columns: minmax(0, 1fr);
}

.search-input {
  display: block;
}

.section-dark + .cta {
  border-top: 1px solid var(--line-dark);
}

/* ---------- Toolbox ---------- */

.mono,
textarea.mono,
input.mono {
  font-family: var(--mono);
  font-size: .9rem;
}

textarea.mono {
  line-height: 1.55;
}

input[type="file"] {
  padding: 10px;
  font-size: .875rem;
}

.tool-index {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}

.tool-index a {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}

.tool-index a:hover {
  border-color: var(--teal-500);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  transform: translateY(-2px);
}

.tool-index span {
  color: var(--teal-700);
  font-size: .7rem;
  font-weight: 650;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.tool-index strong {
  font-size: .95rem;
}

.tool-list {
  display: grid;
  gap: clamp(24px, 3vw, 40px);
  padding-block: clamp(48px, 6vw, 80px);
}

.tool {
  scroll-margin-top: calc(var(--header-h) + 16px);
  padding: clamp(22px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
}

.tool:target {
  border-color: var(--teal-500);
  box-shadow: 0 0 0 4px rgb(31 199 175 / 15%);
}

.tool-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: 24px;
}

.tool-head > div:first-child {
  max-width: 760px;
}

.tool-head h2 {
  margin: 12px 0 8px;
  font-size: clamp(1.4rem, 1vw + 1.1rem, 1.8rem);
  letter-spacing: -.02em;
}

.tool-head p {
  margin: 0;
  color: var(--text-2);
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tool-body {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(20px, 3vw, 36px);
  align-items: start;
}

.tool-input {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.tool-input .field,
.calc-card .field {
  margin: 0;
}

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

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

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
}

.field-row > .check-row {
  align-self: end;
  padding-bottom: 12px;
}

.tool-output {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  min-height: 180px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--bg-alt);
}

.tool-empty {
  margin: auto;
  color: var(--text-3);
  text-align: center;
}

.tool-note {
  margin: 0;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-2);
  font-size: .875rem;
}

.tool-note:empty {
  display: none;
}

.tool-note[data-kind="warn"] {
  border-color: rgb(138 83 0 / 22%);
  background: var(--warn-bg);
  color: var(--warn);
}

.tool-note[data-kind="error"] {
  border-color: rgb(179 38 30 / 22%);
  background: var(--err-bg);
  color: var(--err);
}

.tool-next {
  margin: 22px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-size: .875rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  margin: 0;
}

.stat-grid div {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.stat-grid dt {
  color: var(--text-3);
  font-size: .7rem;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.stat-grid dd {
  margin: 4px 0 0;
  font-size: 1.02rem;
  font-variant-numeric: tabular-nums;
  font-weight: 620;
  word-break: break-word;
}

.out-block {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.out-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 8px 7px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--text-2);
  font-size: .8rem;
  font-weight: 650;
}

.out-block pre {
  max-height: 260px;
  margin: 0;
  overflow: auto;
  padding: 12px 14px;
  color: var(--text);
  font-size: .82rem;
  line-height: 1.6;
  white-space: pre;
}

.copy-button {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--bg);
  font-size: .78rem;
  font-weight: 600;
  white-space: nowrap;
}

.copy-button:hover {
  border-color: var(--text);
}

.out-title {
  margin: 6px 0 0;
  font-size: 1rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg);
  font-size: .82rem;
  font-variant-numeric: tabular-nums;
}

.chip-button {
  font-weight: 600;
  cursor: pointer;
}

.chip-button.mono {
  font-family: var(--mono);
}

.chip-button:hover,
.chip-button[aria-pressed="true"] {
  border-color: var(--teal-500);
  color: var(--teal-800);
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}

.data-table th {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-alt);
  color: var(--text-3);
  font-size: .7rem;
  font-weight: 650;
  letter-spacing: .08em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
  vertical-align: top;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.truncate {
  display: inline-block;
  max-width: 22ch;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

.bar {
  display: block;
  width: 100px;
  height: 8px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: var(--bg-sunken);
}

.bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal-600), var(--teal-400));
}

.histogram {
  position: relative;
  display: flex;
  height: 150px;
  align-items: flex-end;
  gap: 3px;
  padding: 12px 12px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.histogram-bar {
  flex: 1 1 0;
  min-width: 4px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, var(--teal-400), var(--teal-600));
}

.histogram-axis {
  position: absolute;
  right: 12px;
  bottom: 6px;
  left: 12px;
  display: flex;
  justify-content: space-between;
  color: var(--text-3);
  font-size: .72rem;
}

.q-cells {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.q-cell {
  display: inline-grid;
  min-width: 30px;
  padding: 3px 2px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: .72rem;
  line-height: 1.25;
  text-align: center;
}

.q-cell b {
  font-weight: 600;
}

.q-high {
  background: var(--ok-bg);
  color: var(--ok);
}

.q-mid {
  background: var(--warn-bg);
  color: var(--warn);
}

.q-low {
  background: var(--err-bg);
  color: var(--err);
}

.flag-grid,
.enzyme-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin: 4px 0 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.flag-grid legend,
.enzyme-grid legend {
  padding: 0 6px;
  font-size: .85rem;
  font-weight: 650;
}

.flag-grid .check-row,
.enzyme-grid .check-row {
  font-size: .82rem;
}

.flag-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.flag-list li {
  display: grid;
  grid-template-columns: 48px 132px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: .875rem;
}

.flag-list b {
  color: var(--teal-700);
  font-variant-numeric: tabular-nums;
}

.cigar-bar {
  display: flex;
  height: 34px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.cigar-bar span {
  display: flex;
  min-width: 3px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 600;
  white-space: nowrap;
}

.op-match {
  background: rgb(79 227 204 / 35%);
  color: var(--teal-800);
}

.op-mismatch {
  background: var(--warn-bg);
  color: var(--warn);
}

.op-insert {
  background: #e4e7fb;
  color: #333c99;
}

.op-delete {
  background: var(--err-bg);
  color: var(--err);
}

.op-skip {
  background: repeating-linear-gradient(90deg, var(--bg-sunken) 0 6px, var(--bg) 6px 12px);
  color: var(--text-3);
}

.op-clip {
  background: var(--bg-sunken);
  color: var(--text-3);
}

.re-map {
  position: relative;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.re-map::before {
  content: "";
  position: absolute;
  top: 15px;
  right: 10px;
  left: 10px;
  height: 4px;
  border-radius: 2px;
  background: var(--line-strong);
}

.re-marker {
  position: absolute;
  top: 7px;
  width: 2px;
  height: 20px;
  margin-left: -1px;
  background: var(--teal-700);
}

.re-axis {
  position: absolute;
  right: 10px;
  bottom: 4px;
  left: 10px;
  display: flex;
  justify-content: space-between;
  color: var(--text-3);
  font-size: .72rem;
}

.status-chip {
  display: inline-flex;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  font-size: .75rem;
  font-weight: 650;
  white-space: nowrap;
}

.status-chip.is-good {
  background: var(--ok-bg);
  color: var(--ok);
}

.status-chip.is-check {
  background: var(--warn-bg);
  color: var(--warn);
}

.check-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  color: var(--text-2);
  font-size: .875rem;
  list-style: none;
}

.check-list li {
  margin: 0;
}

.primer-card {
  display: grid;
  gap: 12px;
}

.file-field {
  display: grid;
  gap: 6px;
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.calc-card {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-alt);
}

.calc-card h3 {
  margin: 0;
  font-size: 1.02rem;
}

.calc-card .field-hint {
  margin: 0;
}

.calc-result {
  margin: 4px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

@media (max-width: 1023.98px) {
  .tool-body {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .field-row-3,
  .field-row-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flag-list li {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .flag-list li > :last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .flag-grid,
  .enzyme-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Header search ---------- */

.header-search {
  display: inline-flex;
  height: 40px;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid var(--line-dark-strong);
  border-radius: var(--radius-pill);
  background: rgb(255 255 255 / 4%);
  color: var(--on-dark-2);
  font-size: .875rem;
  transition: border-color .2s var(--ease), color .2s var(--ease), background-color .2s var(--ease);
}

.header-search:hover {
  border-color: rgb(255 255 255 / 40%);
  background: rgb(255 255 255 / 8%);
  color: #fff;
}

.header-search-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='8.5' cy='8.5' r='5.5' fill='none' stroke='%23000' stroke-width='1.8'/%3E%3Cpath d='m13 13 4 4' stroke='%23000' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='8.5' cy='8.5' r='5.5' fill='none' stroke='%23000' stroke-width='1.8'/%3E%3Cpath d='m13 13 4 4' stroke='%23000' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

kbd {
  display: inline-flex;
  min-width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border: 1px solid currentColor;
  border-radius: 6px;
  font-family: var(--font);
  font-size: .72rem;
  font-weight: 600;
  line-height: 1;
  opacity: .75;
}

@media (max-width: 1279.98px) {
  .header-search {
    width: 40px;
    justify-content: center;
    padding: 0;
  }

  .header-search-label,
  .header-search kbd,
  .header-cta-secondary {
    display: none;
  }
}

@media (max-width: 1023.98px) {
  .header-search {
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 420px) {
  .header-signin {
    display: none;
  }
}

/* ---------- Search dialog ---------- */

.search-open {
  overflow: hidden;
}

.search-dialog {
  width: min(680px, calc(100% - 24px));
  max-height: min(640px, calc(100vh - 48px));
  margin: 8vh auto auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
  box-shadow: 0 30px 80px rgb(5 10 19 / 35%);
  color: var(--text);
}

.search-dialog[open] {
  display: flex;
  flex-direction: column;
}

.search-dialog::backdrop {
  background: rgb(5 10 19 / 55%);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.search-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--text-3);
}

.search-input-field {
  flex: 1 1 auto;
  min-height: 40px !important;
  padding: 6px 4px !important;
  border: 0 !important;
  box-shadow: none !important;
  color: var(--text);
  font-size: 1.05rem !important;
}

.search-input-field:focus {
  outline: none;
}

.search-close {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text-2);
  font-size: .75rem;
  font-weight: 600;
}

.search-results {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 8px;
  overscroll-behavior: contain;
}

.search-group + .search-group {
  margin-top: 6px;
}

.search-group-label {
  margin: 8px 10px 4px;
  color: var(--text-3);
  font-size: .7rem;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.search-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
}

.search-result[aria-selected="true"] {
  background: var(--bg-alt);
  box-shadow: inset 3px 0 0 var(--teal-500);
  color: var(--text);
}

.search-result-title {
  grid-column: 1;
  overflow: hidden;
  font-size: .95rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result-text {
  grid-column: 1;
  overflow: hidden;
  color: var(--text-3);
  font-size: .82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result .icon-arrow-out {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  color: var(--text-3);
}

.search-empty {
  margin: 0;
  padding: 32px 16px;
  color: var(--text-3);
  text-align: center;
}

.search-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
  color: var(--text-3);
  font-size: .78rem;
}

.search-foot span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

@media (max-width: 720px) {
  .search-dialog {
    margin-top: 12px;
  }

  .search-foot {
    display: none;
  }
}

/* ---------- Levels page ---------- */

.level-summary {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) auto auto;
  align-items: center;
  gap: 20px 40px;
  margin-top: -40px;
  padding: 24px clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
  box-shadow: var(--shadow-lg);
}

.level-summary-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.level-summary-label {
  color: var(--text-3);
  font-size: .75rem;
  font-weight: 650;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.level-summary-title {
  font-size: 1.25rem;
  letter-spacing: -.015em;
}

.level-summary-rank {
  color: var(--text-2);
  font-size: .9rem;
}

.level-summary-stats {
  display: flex;
  gap: 28px;
  margin: 0;
}

.level-summary-stats dt {
  color: var(--text-3);
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.level-summary-stats dd {
  margin: 4px 0 0;
  font-size: 1.6rem;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  letter-spacing: -.02em;
  line-height: 1;
}

.level-summary-badges,
.dash-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.level-summary-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--text-3);
  font-size: .82rem;
}

.badge-disc {
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1.5px dashed var(--line-strong);
  border-radius: 50%;
  color: var(--text-3);
  font-size: .85rem;
  font-weight: 650;
}

.badge-disc.is-earned {
  border: 0;
  background: linear-gradient(135deg, var(--teal-400), var(--sky-400));
  box-shadow: 0 4px 14px rgb(31 199 175 / 35%);
  color: var(--ink-950);
}

.level-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.level-strip li {
  margin: 0;
}

.level-strip a {
  display: grid;
  height: 100%;
  gap: 4px;
  padding: 14px 14px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}

.level-strip a:hover {
  border-color: var(--teal-500);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  transform: translateY(-2px);
}

.level-strip a.is-current {
  border-color: var(--teal-600);
  box-shadow: 0 0 0 3px rgb(31 199 175 / 15%);
}

.level-strip-number {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-sunken);
  color: var(--teal-800);
  font-size: .82rem;
  font-weight: 700;
}

.level-strip a.is-complete .level-strip-number {
  background: var(--teal-600);
  color: #fff;
}

.level-strip strong {
  font-size: .92rem;
  line-height: 1.3;
}

.level-strip small {
  color: var(--text-3);
  font-size: .78rem;
}

.placement {
  padding: clamp(22px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
}

.placement-question {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0 0 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.placement-question legend {
  margin-bottom: 8px;
  padding: 0;
  font-weight: 600;
}

.placement-question legend span {
  color: var(--teal-700);
}

.placement-question .check-row {
  font-size: .925rem;
}

.placement-result {
  margin-top: 22px;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--ink-900);
  color: var(--on-dark-2);
}

.placement-result h3 {
  margin-bottom: 8px;
  color: #fff;
}

.placement-result .eyebrow {
  color: var(--teal-300);
}

.placement-result p {
  margin: 0 0 16px;
}

.level-list {
  display: grid;
  gap: clamp(20px, 2.6vw, 32px);
}

.level {
  scroll-margin-top: calc(var(--header-h) + 16px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
}

.level.is-complete {
  border-color: rgb(15 163 145 / 45%);
}

.level-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(200px, 260px);
  align-items: center;
  gap: 18px 28px;
  padding: clamp(20px, 2.6vw, 30px);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 50% 140% at 100% 0%, rgb(79 227 204 / 10%), transparent 60%),
    var(--bg);
}

.level-number {
  display: grid;
  width: 76px;
  height: 76px;
  place-content: center;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--ink-800), var(--ink-950));
  color: #fff;
  text-align: center;
}

.level-number span {
  color: var(--teal-300);
  font-size: .62rem;
  font-weight: 650;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.level-number strong {
  font-size: 2rem;
  line-height: 1;
}

.level.is-complete .level-number {
  background: linear-gradient(135deg, var(--teal-500), var(--sky-400));
}

.level.is-complete .level-number span,
.level.is-complete .level-number strong {
  color: var(--ink-950);
}

.level-heading .eyebrow {
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.level-heading h2 {
  margin: 0 0 4px;
  font-size: clamp(1.5rem, 1.2vw + 1.1rem, 2rem);
}

.level-tagline {
  margin: 0;
  color: var(--text-2);
}

.level-progress {
  display: grid;
  gap: 8px;
  color: var(--text-2);
  font-size: .85rem;
  font-weight: 600;
}

.level-body {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
}

.level-main {
  padding: clamp(20px, 2.6vw, 30px);
}

.level-main h3 {
  margin: 20px 0 10px;
  font-size: 1.05rem;
}

.level-audience {
  margin: 0;
  color: var(--text-2);
}

.outcome-list {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.outcome-list li,
.check-points li {
  position: relative;
  margin: 0;
  padding-left: 28px;
  color: var(--text-2);
}

.outcome-list li::before,
.check-points li::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 0;
  width: 18px;
  height: 18px;
  background: var(--teal-600);
  -webkit-mask: var(--check) center / contain no-repeat;
  mask: var(--check) center / contain no-repeat;
}

.level-project {
  margin-top: 22px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--ink-900);
  color: var(--on-dark-2);
}

.level-project .eyebrow {
  margin-bottom: 6px;
  color: var(--teal-300);
}

.level-project h3 {
  margin: 0 0 6px;
  color: #fff;
}

.level-project p {
  margin: 0;
  font-size: .95rem;
}

.level-side {
  padding: clamp(20px, 2.6vw, 30px);
  border-left: 1px solid var(--line);
  background: var(--bg-alt);
}

.level-side h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
}

.level-side h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 22px 0 10px;
  color: var(--text);
  font-size: .78rem;
  font-weight: 650;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.level-side .nav-badge {
  border-color: rgb(11 122 110 / 30%);
  color: var(--teal-800);
}

.level-checklist {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.level-checklist li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: .9rem;
}

.level-checklist li.is-done {
  border-color: rgb(15 163 145 / 35%);
  background: rgb(79 227 204 / 7%);
}

.level-checklist .check-row {
  font-size: .9rem;
}

.level-item-link {
  flex: 0 0 auto;
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none;
}

.quiz-dot {
  display: inline-block;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin-top: 1px;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
}

.quiz-dot.is-done {
  border-color: var(--teal-600);
  background: var(--teal-600) var(--check) center / 12px no-repeat;
  background-image: none;
  box-shadow: inset 0 0 0 4px var(--bg);
}

.link-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.link-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  font-size: .925rem;
}

.link-list a {
  font-weight: 600;
  text-decoration: none;
}

.link-list-meta {
  color: var(--text-3);
  font-size: .78rem;
}

.chip-link {
  color: var(--text);
  font-weight: 560;
  text-decoration: none;
}

.chip-link:hover {
  border-color: var(--teal-500);
  color: var(--teal-800);
}

/* ---------- Practice ---------- */

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

.quiz-card {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
}

.quiz-card.is-passed {
  border-color: rgb(15 163 145 / 40%);
  background: linear-gradient(180deg, rgb(79 227 204 / 7%), var(--bg) 60%);
}

.quiz-card h3 {
  margin: 0;
}

.quiz-card p {
  margin: 0 0 10px;
}

.quiz-card .btn {
  justify-self: start;
}

.quiz-card-level {
  color: var(--teal-700);
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.quiz-player {
  scroll-margin-top: calc(var(--header-h) + 16px);
  margin-top: 28px;
  padding: clamp(22px, 3.4vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
  box-shadow: var(--shadow-lg);
}

.quiz-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--text-3);
  font-size: .85rem;
  font-weight: 600;
}

.quiz-question {
  margin: 22px 0 16px;
  font-size: clamp(1.2rem, .8vw + 1rem, 1.45rem);
}

.quiz-options {
  display: grid;
  gap: 8px;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: .975rem;
  text-align: left;
  transition: border-color .15s var(--ease), background-color .15s var(--ease);
}

.quiz-option:hover:not(:disabled) {
  border-color: var(--teal-600);
  background: rgb(79 227 204 / 6%);
}

.quiz-option:disabled {
  cursor: default;
  opacity: .75;
}

.quiz-option.is-correct {
  border-color: var(--ok);
  background: var(--ok-bg);
  opacity: 1;
}

.quiz-option.is-wrong {
  border-color: var(--err);
  background: var(--err-bg);
  opacity: 1;
}

.quiz-option-letter {
  display: inline-flex;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-sunken);
  font-size: .85rem;
  font-weight: 700;
}

.quiz-option.is-correct .quiz-option-letter {
  background: var(--ok);
  color: #fff;
}

.quiz-option.is-wrong .quiz-option-letter {
  background: var(--err);
  color: #fff;
}

.quiz-feedback {
  margin-top: 16px;
}

.quiz-feedback:empty {
  display: none;
}

.quiz-feedback[data-kind] {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: .95rem;
}

.quiz-feedback[data-kind="success"] {
  background: var(--ok-bg);
  color: var(--ok);
}

.quiz-feedback[data-kind="error"] {
  background: var(--err-bg);
  color: var(--err);
}

.quiz-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
}

.quiz-result {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}

.quiz-result p {
  max-width: 560px;
  color: var(--text-2);
}

.quiz-result .btn-row {
  justify-content: center;
}

.quiz-score {
  display: inline-flex;
  width: 120px;
  height: 120px;
  align-items: center;
  justify-content: center;
  border: 6px solid var(--warn-bg);
  border-radius: 50%;
  color: var(--warn);
  font-size: 2rem;
  font-weight: 700;
}

.quiz-score.is-passed {
  border-color: var(--ok-bg);
  color: var(--ok);
}

.challenge-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.challenge {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
}

.challenge.is-solved {
  border-color: rgb(15 163 145 / 40%);
}

.challenge h3,
.challenge p {
  margin: 0;
}

.challenge > p {
  color: var(--text-2);
}

.challenge-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.challenge-xp {
  color: var(--teal-700);
  font-size: .8rem;
  font-weight: 650;
}

.challenge-form {
  display: flex;
  gap: 8px;
}

.challenge-form input {
  flex: 1 1 auto;
  font-family: var(--mono);
}

.challenge-hint,
.challenge-solution {
  color: var(--text-2);
  font-size: .9rem;
}

.challenge-hint summary,
.challenge-solution summary {
  color: var(--teal-700);
  font-weight: 600;
  cursor: pointer;
}

.challenge-hint p,
.challenge-solution p {
  margin: 8px 0 0;
}

.tool-note[data-kind="success"] {
  border-color: rgb(6 122 87 / 22%);
  background: var(--ok-bg);
  color: var(--ok);
}

/* ---------- Filter bars, glossary ---------- */

.filter-bar {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
}

.filter-bar .field {
  margin: 0;
}

.letter-nav {
  position: sticky;
  z-index: 5;
  top: var(--header-h);
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-bottom: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 94%);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.letter-nav a,
.letter-nav span {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 650;
  text-decoration: none;
}

.letter-nav a:hover {
  background: var(--bg-alt);
}

.letter-nav span {
  color: var(--line-strong);
}

.glossary-group {
  scroll-margin-top: calc(var(--header-h) + 64px);
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.glossary-letter {
  margin: 0;
  color: var(--teal-700);
  font-size: 2rem;
  line-height: 1.1;
}

.glossary-group dl {
  display: grid;
  gap: 4px;
  margin: 0;
}

.glossary-entry {
  scroll-margin-top: calc(var(--header-h) + 80px);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  transition: background-color .4s var(--ease);
}

.glossary-entry:target,
.glossary-entry.is-highlighted {
  background: rgb(79 227 204 / 12%);
}

.glossary-entry dt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-weight: 650;
}

.glossary-entry dt .tag {
  font-weight: 600;
}

.glossary-entry dd {
  margin: 4px 0 0;
  color: var(--text-2);
}

.glossary-link {
  margin-left: 8px;
  font-size: .85rem;
  font-weight: 600;
}

/* ---------- Cheat sheets ---------- */

.sheet-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}

.sheet-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  display: grid;
  gap: 16px;
}

.sheet-sidebar .field {
  margin: 0;
}

.sheet-nav {
  display: grid;
  gap: 2px;
}

.sheet-nav a {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: .9rem;
  font-weight: 560;
  text-decoration: none;
}

.sheet-nav a:hover {
  background: var(--bg-alt);
  color: var(--text);
}

.sheet-nav a.is-dimmed {
  opacity: .4;
  pointer-events: none;
}

.sheet {
  scroll-margin-top: calc(var(--header-h) + 16px);
  margin-bottom: 28px;
  padding: clamp(20px, 2.6vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
}

.sheet-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 8px;
}

.sheet-head h2 {
  margin: 0 0 4px;
  font-size: clamp(1.35rem, 1vw + 1rem, 1.7rem);
}

.sheet-head p {
  margin: 0;
  color: var(--text-2);
}

.sheet-head .tag {
  text-decoration: none;
}

.sheet-section h3 {
  margin: 22px 0 10px;
  color: var(--text-3);
  font-size: .78rem;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.command {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px 16px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.command-code {
  margin: 0;
  overflow-x: auto;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--ink-900);
  color: #d9e6f2;
  font-size: .82rem;
  line-height: 1.55;
  white-space: pre;
}

.command-desc {
  margin: 0;
  padding-top: 8px;
  color: var(--text-2);
  font-size: .9rem;
}

.command .copy-button {
  margin-top: 6px;
}

/* ---------- Resources ---------- */

.resource-tabs {
  margin-bottom: 14px;
}

.chip-count {
  margin-left: 4px;
  color: var(--text-3);
  font-family: var(--font);
  font-size: .75rem;
  font-weight: 600;
}

.resource-group {
  padding: 22px 0 8px;
}

.resource-group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
  margin-bottom: 14px;
}

.resource-group-head h2 {
  margin: 0;
  font-size: clamp(1.35rem, 1vw + 1rem, 1.7rem);
}

.resource-group-head p {
  margin: 0;
  color: var(--text-3);
}

.resource-items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.resource-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}

.resource-item:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
  color: var(--text);
  transform: translateY(-2px);
}

.resource-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.resource-level {
  color: var(--text-3);
  font-size: .75rem;
  font-weight: 600;
}

.resource-item h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 0;
  font-size: 1.02rem;
}

.resource-item h3 .icon-arrow-out {
  color: var(--teal-700);
  font-size: .85rem;
}

.resource-item p {
  margin: 0;
  color: var(--text-2);
  font-size: .9rem;
  line-height: 1.55;
}

.resource-host {
  margin-top: auto;
  padding-top: 4px;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: .75rem;
}

/* ---------- Formats guide and careers ---------- */

.format-guide h2 {
  scroll-margin-top: calc(var(--header-h) + 20px);
}

.format-guide .table-scroll {
  margin: 16px 0 24px;
}

.format-guide .data-table {
  font-size: .9rem;
}

.format-example {
  margin: 16px 0 20px;
  overflow-x: auto;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--ink-900);
  color: #d9e6f2;
  font-size: .82rem;
  line-height: 1.6;
  tab-size: 12;
}

.format-example code {
  font-size: inherit;
}

.prose code {
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--bg-sunken);
  color: var(--text);
  font-size: .86em;
}

.prose pre code {
  padding: 0;
  background: none;
  color: inherit;
}

.genetic-code td span {
  display: block;
  white-space: nowrap;
}

.genetic-code td span + span {
  margin-top: 2px;
}

.genetic-code b {
  font-family: var(--mono);
  font-weight: 600;
}

.codon-start b {
  color: var(--ok);
}

.codon-stop {
  color: var(--err);
}

.role-skills {
  margin-top: auto !important;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: .9rem;
}

.check-points {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.faq-list {
  max-width: 860px;
}

.skills-table td {
  vertical-align: top;
}

/* ---------- Academy, roadmap and dashboard additions ---------- */

a.lesson-area {
  text-decoration: none;
}

a.lesson-area:hover {
  border-color: var(--teal-500);
}

.roadmap-stage-level {
  display: inline-flex;
  margin-left: 4px;
  padding: 1px 8px;
  border: 1px solid rgb(11 122 110 / 25%);
  border-radius: var(--radius-pill);
  background: rgb(79 227 204 / 10%);
  color: var(--teal-800);
  font-size: .7rem;
  font-weight: 650;
  letter-spacing: .04em;
  text-decoration: none;
  vertical-align: 2px;
}

.dash-levels {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.dash-level {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 90px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
}

.dash-level:hover {
  border-color: var(--teal-500);
  color: var(--text);
}

.dash-level-text {
  display: grid;
  min-width: 0;
}

.dash-level-text strong {
  font-size: .925rem;
}

.dash-level-text small {
  color: var(--text-3);
  font-size: .78rem;
}

/* ---------- Responsive additions ---------- */

@media (max-width: 1180px) {
  .footer-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

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

@media (max-width: 1023.98px) {
  .level-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .level-head {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .level-progress {
    grid-column: 1 / -1;
  }

  .level-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .level-side {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

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

  .sheet-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .sheet-sidebar {
    position: static;
  }

  .sheet-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .sheet-nav a {
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    font-size: .82rem;
  }

  .command {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .command-desc {
    grid-column: 1;
    grid-row: 2;
    padding-top: 0;
  }

  .command .copy-button {
    grid-column: 2;
    grid-row: 1;
  }

  .filter-bar {
    grid-template-columns: minmax(0, 1fr);
  }
}

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

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

  .level-summary-stats {
    gap: 20px;
  }

  .level-number {
    width: 60px;
    height: 60px;
    border-radius: 16px;
  }

  .level-number strong {
    font-size: 1.6rem;
  }

  .quiz-grid,
  .challenge-list,
  .resource-items {
    grid-template-columns: minmax(0, 1fr);
  }

  .glossary-group {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .letter-nav a,
  .letter-nav span {
    width: 28px;
    height: 28px;
  }

  .dash-level {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .dash-level progress {
    grid-column: 1 / -1;
  }
}

input[type="radio"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  accent-color: var(--teal-600);
  cursor: pointer;
}

/* Keep the "find your level" introduction in view beside the longer question list. */
#placement .split > div:first-child {
  position: sticky;
  top: calc(var(--header-h) + 32px);
}

@media (max-width: 1023.98px) {
  #placement .split > div:first-child {
    position: static;
  }
}

@media (max-width: 720px) {
  .tool-index {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tool-index a {
    padding: 12px;
  }
}

/* ---------- Study topics ---------- */

.topic-readbar {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: 40;
  height: 3px;
  pointer-events: none;
}

.topic-readbar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--teal-500), var(--sky-400));
  transform: scaleX(0);
  transform-origin: left;
}

.topic-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.topic-meta li {
  margin: 0;
  padding: 5px 12px;
  border: 1px solid var(--line-dark-strong);
  border-radius: var(--radius-pill);
  background: rgb(255 255 255 / 4%);
  color: var(--on-dark-2);
  font-size: .82rem;
  font-weight: 560;
}

.topic-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.topic-status:empty {
  display: none;
}

.topic-status {
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgb(79 227 204 / 14%);
  color: var(--teal-300);
  font-size: .82rem;
  font-weight: 650;
}

.topic-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(32px, 4vw, 64px);
  padding-block: clamp(48px, 6vw, 80px) var(--section-y);
}

.topic-aside {
  position: relative;
}

.topic-toc {
  position: sticky;
  top: calc(var(--header-h) + 28px);
  font-size: .88rem;
}

.topic-toc-title,
.topic-progress-title,
.try-this-title {
  margin: 0 0 10px;
  color: var(--text);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.topic-toc ol {
  display: grid;
  gap: 2px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.topic-toc li {
  margin: 0;
}

.topic-toc a {
  display: block;
  padding: 6px 10px;
  border-left: 2px solid var(--line);
  color: var(--text-3);
  line-height: 1.35;
  text-decoration: none;
  transition: color .15s var(--ease), border-color .15s var(--ease), background .15s var(--ease);
}

.topic-toc a:hover {
  color: var(--text);
}

.topic-toc a[aria-current] {
  border-left-color: var(--teal-500);
  background: linear-gradient(90deg, rgb(31 199 175 / 8%), transparent);
  color: var(--text);
  font-weight: 620;
}

.topic-progress-card {
  position: sticky;
  top: calc(var(--header-h) + 28px);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-alt);
  font-size: .88rem;
}

.topic-toc + .topic-progress-card {
  position: static;
}

.topic-progress-list {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.topic-progress-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  color: var(--text-3);
}

.topic-progress-list b {
  color: var(--text);
  font-weight: 650;
}

.topic-progress-list li.is-done b {
  color: var(--ok);
}

.topic-progress-xp {
  margin: 0 0 10px;
  color: var(--text-3);
}

.topic-progress-xp b {
  color: var(--teal-700);
}

.topic-article {
  min-width: 0;
  max-width: 860px;
  color: var(--text-2);
  font-size: 1.05rem;
  line-height: 1.75;
}

.topic-article h2 {
  margin: 0 0 .7em;
  color: var(--text);
  font-size: clamp(1.55rem, 1.2vw + 1.1rem, 2.05rem);
  letter-spacing: -.025em;
}

.topic-article h3 {
  margin: 1.8em 0 .5em;
  color: var(--text);
  font-size: 1.2rem;
}

.topic-article strong {
  color: var(--text);
}

.topic-article li {
  margin-bottom: .35em;
  padding-left: 4px;
}

.topic-article li::marker {
  color: var(--teal-600);
}

.topic-article :not(pre) > code {
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--bg-sunken);
  color: var(--text);
  font-family: var(--mono);
  font-size: .86em;
}

.topic-article a:not([class]) {
  color: var(--teal-700);
  text-decoration: underline;
  text-decoration-color: rgb(11 122 110 / 35%);
  text-underline-offset: 3px;
}

.topic-section-block {
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.topic-section-block + .topic-section-block {
  margin-top: clamp(56px, 6vw, 80px);
  padding-top: clamp(40px, 4vw, 56px);
  border-top: 1px solid var(--line);
}

.topic-intro .outcome-list {
  margin-bottom: 20px;
}

.topic-article .outcome-list li {
  padding-left: 28px;
}

.topic-prereq {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  font-size: .95rem;
}

.topic-figure {
  margin: 32px 0;
}

.topic-figure-frame {
  overflow-x: auto;
  padding: clamp(14px, 2vw, 24px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.topic-figure img {
  display: block;
  width: 100%;
  min-width: 520px;
  height: auto;
  margin: 0 auto;
}

.topic-figure figcaption,
.mol-viewer-block figcaption {
  margin-top: 12px;
  color: var(--text-3);
  font-size: .9rem;
  line-height: 1.55;
}

.topic-figure-open {
  white-space: nowrap;
  color: var(--teal-700);
  font-weight: 600;
}

.callout {
  margin: 28px 0;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal-500);
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  font-size: .98rem;
}

.callout p:last-child {
  margin-bottom: 0;
}

.callout-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin-bottom: 6px;
  color: var(--text);
  font-weight: 680;
}

.callout-kicker {
  color: var(--teal-700);
  font-size: .7rem;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.callout-tip {
  border-left-color: #2f80ed;
  background: #f1f6fe;
}

.callout-tip .callout-kicker {
  color: #1d5fc4;
}

.callout-warn {
  border-left-color: #d98a00;
  background: var(--warn-bg);
}

.callout-warn .callout-kicker {
  color: var(--warn);
}

.callout-bio {
  border-left-color: #8e4ec6;
  background: #f7f2fc;
}

.callout-bio .callout-kicker {
  color: #6e3aa3;
}

.topic-details {
  margin: 28px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.topic-details > summary {
  padding: 16px 20px;
  color: var(--text);
  font-weight: 650;
  cursor: pointer;
}

.topic-details-body {
  padding: 0 20px 20px;
}

.try-this,
.topic-extensions,
.dataset-practise {
  margin-top: 16px;
  padding: 16px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: .95rem;
}

.try-this ol,
.topic-extensions ul,
.dataset-practise ul {
  margin: 0;
  padding-left: 1.2em;
}

.takeaways li {
  margin-bottom: .6em;
}

.reference-list {
  font-size: .92rem;
}

.reference-list li {
  margin-bottom: .6em;
}

.topic-complete {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-top: 64px;
  padding: 24px 28px;
  border-radius: var(--radius);
  background: var(--ink-900);
  color: var(--on-dark-2);
}

.topic-complete > div {
  flex: 1 1 320px;
}

.topic-complete-title {
  margin: 0 0 4px;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 680;
}

.topic-complete-text {
  margin: 0;
  font-size: .95rem;
}

.topic-complete .btn-outline {
  border-color: var(--line-dark-strong);
  color: var(--on-dark);
}

.topic-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}

.topic-pager-link {
  display: grid;
  gap: 4px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}

.topic-pager-link:last-child {
  text-align: right;
}

.topic-pager-link span {
  color: var(--text-3);
  font-size: .8rem;
}

a.topic-pager-link:hover {
  border-color: var(--teal-500);
  box-shadow: var(--shadow-sm);
}

.topic-pager-link.is-planned {
  background: var(--bg-alt);
  color: var(--text-3);
}

@media (max-width: 1023.98px) {
  .topic-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .topic-toc {
    display: none;
  }

  .topic-progress-card,
  .topic-toc + .topic-progress-card {
    position: static;
  }
}

.topic-figure-hint {
  display: none;
  color: var(--text-2);
  font-weight: 600;
}

@media (max-width: 640px) {
  .topic-figure-hint {
    display: inline;
  }

  .topic-pager {
    grid-template-columns: 1fr;
  }

  .topic-pager-link:last-child {
    text-align: left;
  }

  .topic-figure img {
    min-width: 540px;
  }
}

/* ---------- Code cells ---------- */

.code-cell {
  margin: 32px 0 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow-xs);
  scroll-margin-top: calc(var(--header-h) + 24px);
  transition: border-color .2s var(--ease);
}

.code-cell + .code-after,
.code-cell + .code-cell {
  margin-top: 16px;
}

.code-cell.is-passed {
  border-color: rgb(6 122 87 / 45%);
}

.code-cell.is-failed {
  border-color: rgb(179 38 30 / 35%);
}

.code-cell-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 8px;
}

.code-cell-kind {
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-sunken);
  color: var(--text-3);
  font-size: .7rem;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.code-cell-exercise .code-cell-kind {
  background: #e7f8f4;
  color: var(--teal-800);
}

.code-cell.was-passed .code-cell-head::after {
  content: "Passed";
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--ok-bg);
  color: var(--ok);
  font-size: .72rem;
  font-weight: 700;
}

.code-cell-title,
.topic-article .code-cell-title {
  margin: 0;
  color: var(--text);
  font-size: 1.08rem;
}

.code-cell-intro {
  font-size: .98rem;
}

.code-cell-intro p:last-child {
  margin-bottom: 12px;
}

.code-cell-files {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px;
  color: var(--text-3);
  font-size: .85rem;
}

.code-file {
  max-width: 100%;
  padding: 2px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  overflow-wrap: anywhere;
  color: var(--text-2);
  font-family: var(--mono);
  font-size: .78rem;
  text-decoration: none;
}

.code-file:hover {
  border-color: var(--teal-500);
  color: var(--teal-800);
}

.code-static,
.code-editor,
.code-solution-code {
  margin: 0;
  border-radius: var(--radius-sm);
  background: #0b1424;
  color: #dce6f2;
  font-family: var(--mono);
  font-size: .86rem;
  line-height: 1.6;
  tab-size: 4;
}

.code-static,
.code-solution-code {
  overflow-x: auto;
  padding: 14px 16px;
  white-space: pre;
}

.code-editor {
  display: flex;
  overflow: hidden;
  border: 1px solid transparent;
}

.code-editor:focus-within {
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgb(31 199 175 / 20%);
}

.code-gutter {
  flex: 0 0 auto;
  padding: 14px 10px 26px 12px;
  border-right: 1px solid rgb(255 255 255 / 7%);
  color: #50607a;
  text-align: right;
  user-select: none;
}

.code-gutter span {
  display: block;
}

.code-area {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.code-highlight,
.code-editor .code-input {
  margin: 0;
  padding: 14px 16px 26px;
  border: 0;
  font: inherit;
  letter-spacing: normal;
  white-space: pre;
  overflow-wrap: normal;
  word-break: normal;
  tab-size: 4;
}

.code-highlight {
  overflow: hidden;
  min-height: 100%;
  pointer-events: none;
}

.code-editor .code-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 0;
  background: transparent;
  color: transparent;
  caret-color: #ffffff;
  resize: none;
  outline: none;
  box-shadow: none;
}

.code-editor .code-input:hover,
.code-editor .code-input:focus {
  border: 0;
  box-shadow: none;
}

.code-editor .code-input::selection {
  background: rgb(108 198 242 / 35%);
  color: transparent;
}

.tok-c { color: #7d8ba1; font-style: italic; }
.tok-s { color: #9be2b5; }
.tok-n { color: #f5c26b; }
.tok-k { color: #f28fb0; }
.tok-b { color: #7fd1f7; }
.tok-f { color: #c8a6ff; }
.tok-d { color: #f5c26b; }

.code-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.code-run-icon {
  width: 0;
  height: 0;
  margin-right: 2px;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid currentcolor;
}

.code-cell.is-running .code-run-icon {
  width: 12px;
  height: 12px;
  border: 2px solid currentcolor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

.code-shortcut {
  color: var(--text-3);
  font-family: var(--mono);
  font-size: .75rem;
}

@media (hover: none) {
  .code-shortcut {
    display: none;
  }
}

.code-status {
  flex: 1 1 200px;
  color: var(--text-3);
  font-size: .82rem;
  text-align: right;
}

.code-output {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
}

.code-stream {
  overflow-x: auto;
  max-height: 420px;
  margin: 0;
  color: var(--text);
  font-family: var(--mono);
  font-size: .84rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.code-stream + .code-stream,
.code-stream + .code-figure,
.code-figure + .code-verdict,
.code-stream + .code-verdict {
  margin-top: 10px;
}

.code-stderr {
  color: var(--err);
}

.code-figure {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-xs);
  background: #fff;
}

.code-empty {
  margin: 0;
  color: var(--text-3);
  font-size: .9rem;
}

.code-verdict {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-xs);
  font-size: .92rem;
}

.code-verdict.is-good {
  background: var(--ok-bg);
  color: var(--ok);
}

.code-verdict.is-bad {
  background: var(--err-bg);
  color: var(--err);
}

.code-extras {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 12px;
  font-size: .9rem;
}

.code-hint,
.code-solution {
  flex: 1 1 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
}

.code-solution-label {
  margin: 0 0 8px;
  color: var(--text);
  font-weight: 650;
}

.code-solution .btn {
  margin-top: 10px;
}

.code-after {
  margin-top: 10px;
  padding: 0 4px;
  font-size: .95rem;
}

.code-after > summary {
  color: var(--teal-700);
  font-weight: 620;
  cursor: pointer;
}

.code-after p {
  margin: 8px 0 0;
}

.code-noscript {
  margin: 10px 0 0;
  color: var(--text-3);
  font-size: .9rem;
}

/* ---------- 3D molecule viewer ---------- */

.mol-viewer-block {
  margin: 36px 0;
}

.mol-viewer {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.mol-placeholder {
  display: grid;
  place-content: center;
  gap: 6px;
  min-height: 360px;
  background:
    radial-gradient(circle at 50% 40%, rgb(31 199 175 / 10%), transparent 60%),
    #f7f9fb;
  color: var(--text-3);
  text-align: center;
}

.mol-placeholder-kicker {
  color: var(--teal-700);
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.mol-stage {
  position: relative;
}

.mol-canvas {
  display: block;
  width: 100%;
  height: 360px;
  background: #f7f9fb;
  cursor: grab;
  touch-action: none;
}

.mol-canvas:active {
  cursor: grabbing;
}

.mol-canvas:focus-visible {
  outline: 3px solid rgb(31 199 175 / 45%);
  outline-offset: -3px;
}

.mol-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #f7f9fb;
  color: var(--text-3);
  font-size: .92rem;
}

.mol-loading .loading-ring {
  width: 24px;
  height: 24px;
}

.mol-tooltip {
  position: absolute;
  z-index: 2;
  max-width: 320px;
  padding: 6px 10px;
  border-radius: var(--radius-xs);
  background: var(--ink-900);
  color: #fff;
  font-size: .78rem;
  line-height: 1.4;
  pointer-events: none;
}

.mol-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
}

.mol-segment {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--bg);
}

.mol-segment button,
.mol-toggle,
.mol-action {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--text-2);
  font-size: .8rem;
  font-weight: 600;
}

.mol-segment button + button {
  border-left: 1px solid var(--line);
}

.mol-segment button[aria-pressed="true"] {
  background: var(--ink-900);
  color: #fff;
}

.mol-toggle,
.mol-action {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--bg);
}

.mol-toggle[aria-pressed="true"] {
  border-color: var(--teal-500);
  background: #e7f8f4;
  color: var(--teal-800);
}

.mol-toggle:hover,
.mol-action:hover,
.mol-segment button:hover:not([aria-pressed="true"]) {
  color: var(--text);
}

.mol-zoom {
  display: inline-flex;
  gap: 4px;
}

.mol-zoom .mol-action {
  min-width: 32px;
  padding: 0;
  font-size: 1rem;
}

.mol-picker,
.mol-slice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-3);
  font-size: .8rem;
  font-weight: 600;
}

.mol-picker .mol-select {
  width: auto;
  min-height: 32px;
  padding: 0 34px 0 12px;
  border-radius: var(--radius-pill);
  background-position: right 10px center;
  color: var(--text);
  font-size: .8rem;
  font-weight: 600;
}

.mol-slice input[type="range"] {
  width: 110px;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  accent-color: var(--teal-600);
  -webkit-appearance: auto;
  appearance: auto;
}

.mol-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding: 10px 14px 0;
  font-size: .8rem;
}

.mol-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
}

.mol-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.mol-swatch.is-hbond {
  width: 18px;
  height: 0;
  border-top: 2px dashed #0b7a6e;
  border-radius: 0;
}

.mol-swatch.is-rainbow {
  width: 40px;
  background: linear-gradient(90deg, #2f6fed, #12a5c4, #3cb44b, #f2b705, #e5484d);
}

.mol-swatch.is-ligand {
  border-radius: 50%;
  background: conic-gradient(#5b6576 0 40%, #2f6fed 0 60%, #e5484d 0 80%, #b4532a 0);
}

.mol-readout {
  margin: 0;
  padding: 8px 14px 12px;
  color: var(--text-3);
  font-size: .85rem;
  line-height: 1.5;
}

.mol-links {
  display: inline-block;
}

/* ---------- Interactive explainers ---------- */

.widget-card {
  margin: 32px 0;
  padding: clamp(18px, 2.4vw, 26px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #f7fbfb, var(--bg) 120px);
}

.widget-kicker {
  margin: 0 0 4px;
  color: var(--teal-700);
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.widget-title {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 1.15rem;
}

.topic-article .widget-title {
  margin-top: 0;
}

.widget {
  font-size: .95rem;
}

.widget-field {
  margin-bottom: 12px;
}

.widget input.mono,
.widget textarea.mono {
  min-height: 44px;
  font-family: var(--mono);
  font-size: .92rem;
  letter-spacing: .04em;
}

.widget textarea.mono {
  min-height: 0;
  resize: vertical;
}

.widget .chip-row {
  margin-bottom: 12px;
}

.widget-note {
  min-height: 0;
  margin: 0 0 8px;
  color: var(--warn);
  font-size: .85rem;
}

.widget-note:empty {
  display: none;
}

.widget-output .widget-note {
  margin: 0;
  color: var(--text-3);
}

.widget-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.widget-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.widget-stats div {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
}

.widget-stats dt {
  color: var(--text-3);
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.widget-stats dd {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 680;
}

.widget-output {
  display: grid;
  gap: 6px;
  margin: 0;
}

.widget-code-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.widget-code {
  overflow-x: auto;
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  background: var(--bg-sunken);
  color: var(--text);
  font-size: .88rem;
  letter-spacing: .04em;
  white-space: nowrap;
}

.widget-code-row .widget-code {
  flex: 1 1 auto;
}

.base-tile {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 26px;
  height: 30px;
  border-radius: 5px;
  color: #fff;
  font-family: var(--mono);
  font-size: .85rem;
  font-weight: 800;
}

.base-A { background: #2f80ed; }
.base-T { background: #e5484d; }
.base-G { background: #12a594; }
.base-C { background: #e09a14; }
.base-U { background: #8e4ec6; }

.strand-scroll,
.dogma-scroll,
.fold-scroll {
  overflow-x: auto;
  padding-bottom: 4px;
}

.strand-ladder {
  display: grid;
  gap: 2px;
  width: max-content;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
}

.strand-row {
  display: flex;
  align-items: center;
  gap: 3px;
}

.strand-end {
  width: 26px;
  color: var(--text-3);
  font-size: .8rem;
  font-weight: 700;
  text-align: center;
}

.hbond-mark {
  display: inline-flex;
  justify-content: center;
  gap: 3px;
  width: 26px;
  height: 14px;
}

.hbond-mark i {
  width: 2px;
  height: 100%;
  background: repeating-linear-gradient(180deg, var(--teal-600) 0 3px, transparent 3px 5px);
}

.dogma-grid {
  display: grid;
  gap: 6px;
  width: max-content;
  min-width: 100%;
}

.dogma-row {
  display: grid;
  grid-template-columns: 150px auto;
  align-items: center;
  gap: 12px;
}

.dogma-label {
  position: sticky;
  left: 0;
  z-index: 1;
  display: grid;
  padding-right: 6px;
  background: var(--bg);
  line-height: 1.25;
}

.dogma-label b {
  color: var(--text);
  font-size: .85rem;
}

.dogma-label small {
  color: var(--text-3);
  font-size: .72rem;
}

.dogma-cells {
  display: flex;
  font-size: .95rem;
  letter-spacing: .08em;
}

.dogma-codon {
  display: inline-flex;
  justify-content: center;
  min-width: 3.3em;
  padding: 3px 2px;
  border-radius: 4px;
  transition: background .12s var(--ease);
}

.dogma-codon.is-alt {
  background: var(--bg-alt);
}

.dogma-codon.is-hovered {
  background: #dff5f0;
}

.dogma-codon.is-changed {
  background: #fde7e7;
  box-shadow: inset 0 0 0 1.5px #e5484d;
}

.dogma-codon.is-after-stop {
  opacity: .4;
}

.dogma-codon .is-mutated {
  color: #c62828;
  font-weight: 800;
  text-decoration: underline;
}

.dogma-lead {
  padding: 3px 2px;
  color: var(--text-3);
}

.dogma-row.is-mrna .dogma-cells {
  color: #6e3aa3;
}

.dogma-aa {
  color: var(--text);
  font-family: var(--font);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: 0;
}

.dogma-aa.is-start {
  color: var(--ok);
}

.dogma-aa.is-stop {
  color: var(--err);
}

.fold-figure svg {
  display: block;
  max-width: none;
}

.fold-base {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
}

.base-text-A { fill: #2f80ed; }
.base-text-C { fill: #c27f00; }
.base-text-G { fill: #0f8f80; }
.base-text-U { fill: #8e4ec6; }

.fold-bracket {
  overflow-x: auto;
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-xs);
  background: var(--bg-sunken);
  color: var(--text);
  font-size: .88rem;
  line-height: 1.5;
}

.widget-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 0;
  font-size: .82rem;
}

.widget-note.is-muted {
  color: var(--text-3);
}

/* Genome browser */
.gb-scroll {
  overflow-x: auto;
  padding-bottom: 4px;
}

.gb-scroll svg {
  display: block;
  max-width: none;
}

.wheel-figure svg {
  display: block;
  width: 100%;
  max-width: 380px;
  height: auto;
}

/* Variant effect explorer */
.ve-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 12px;
}

.ve-form .widget-field {
  flex: 1 1 260px;
  margin-bottom: 0;
}

.ve-form .btn {
  min-height: 44px;
}

.ve-output {
  display: grid;
  gap: 12px;
}

.ve-output > * {
  min-width: 0;
}

/* A line of a data file shown in a lesson, such as a VCF record */
.topic-pre {
  overflow-x: auto;
  margin: 12px 0 18px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-sunken);
  font-size: .85rem;
  line-height: 1.5;
}

.ve-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.ve-badge {
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: .85rem;
  font-weight: 750;
}

.ve-badge.is-high {
  background: var(--err-bg);
  color: var(--err);
}

.ve-badge.is-moderate {
  background: var(--warn-bg);
  color: var(--warn);
}

.ve-badge.is-low {
  background: var(--ok-bg);
  color: var(--ok);
}

.ve-badge.is-modifier {
  background: var(--bg-sunken);
  color: var(--text-2);
}

.ve-where {
  color: var(--text-3);
  font-size: .88rem;
  font-weight: 600;
}

.ve-note {
  margin: 0;
  color: var(--text-2);
}

.ve-decay {
  padding: 10px 12px;
  border-left: 3px solid var(--err);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  background: var(--err-bg);
}

.ve-names {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.ve-names div {
  min-width: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
}

.ve-names dt {
  color: var(--text-3);
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.ve-names dd {
  margin: 3px 0 0;
  font-size: .88rem;
  overflow-wrap: anywhere;
}

.ve-rewritten {
  display: block;
  margin-top: 2px;
  color: var(--warn);
  font-size: .8rem;
  font-weight: 600;
}

.ve-block-title {
  margin: 0 0 6px;
  color: var(--text-3);
  font-size: .78rem;
  font-weight: 650;
}

.ve-scroll {
  overflow-x: auto;
  padding-bottom: 4px;
}

.ve-seq-row {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.ve-seq-label {
  flex: 0 0 76px;
  color: var(--text-3);
  font-size: .78rem;
  font-weight: 650;
}

.ve-seq {
  font-size: .92rem;
  letter-spacing: .12em;
}

.ve-seq mark {
  border-radius: 3px;
}

.ve-ref {
  background: #fde2e1;
  color: var(--err);
}

.ve-alt {
  background: #dff5ee;
  color: var(--ok);
}

.ve-aa.is-changed {
  background: var(--warn-bg);
  color: var(--warn);
  font-weight: 750;
}

.ve-aa.is-stop {
  color: var(--err);
  font-weight: 800;
}

@media (max-width: 640px) {
  .ve-names {
    grid-template-columns: 1fr;
  }
}

/* lac operon switch */
.lac-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lac-control .label {
  margin: 0;
  font-weight: 650;
}

.lac-figure {
  overflow-x: auto;
}

.lac-figure svg {
  display: block;
  width: 100%;
  min-width: 540px;
  max-width: 680px;
  height: auto;
}

.lac-gene-label {
  fill: #fff;
  font-size: 13px;
  font-style: italic;
  font-weight: 750;
}

.lac-site-label {
  font-size: 11.5px;
  font-weight: 700;
}

.lac-protein-label {
  fill: #fff;
  font-size: 11px;
  font-weight: 750;
}

.lac-small-label {
  fill: var(--text-2);
  font-size: 11.5px;
  font-weight: 650;
}

.lac-meter {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.lac-bar {
  height: 10px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: var(--bg-sunken);
}

.lac-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  transition: width .3s var(--ease);
}

.lac-bar .is-off {
  background: #97a3b6;
}

.lac-bar .is-low {
  background: #f5a524;
}

.lac-bar .is-high {
  background: var(--teal-500);
}

.lac-level {
  margin: 0;
}

.lac-note {
  margin: 10px 0 0;
  color: var(--text-2);
}

@media (prefers-reduced-motion: reduce) {
  .lac-bar span {
    transition: none;
  }
}

.gb-tick,
.gb-row-label,
.gb-exon-label {
  fill: var(--text-3);
  font-size: 12px;
  font-weight: 600;
}

.gb-gene {
  cursor: pointer;
}

.gb-gene:focus-visible {
  outline: none;
}

.gb-gene:focus-visible path,
.gb-gene:hover path {
  stroke: #0a1424;
  stroke-width: 2;
}

.gb-gene-label {
  fill: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.gb-gene.is-selected .gb-gene-label {
  fill: var(--teal-800);
  text-decoration: underline;
}

.gb-codon {
  font-size: 12px;
  font-weight: 750;
}

.gb-codon.is-start { fill: var(--teal-700); }
.gb-codon.is-stop { fill: #b3261e; }

.gb-chips {
  margin: 10px 0 14px;
}

.gb-chips .chip-button[aria-pressed="true"] {
  border-color: var(--ink-900);
  background: var(--ink-900);
  color: #fff;
}

.gb-detail {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.gb-title {
  margin: 0 0 6px;
  color: var(--text-2);
  font-size: .92rem;
}

.gb-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px 18px;
  margin: 12px 0 8px;
}

.gb-facts dt {
  color: var(--text-3);
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.gb-facts dd {
  margin: 2px 0 0;
  color: var(--text);
  font-size: .9rem;
}

.gb-exons {
  margin: 4px 0 10px;
  padding-left: 22px;
  color: var(--text-2);
  font-size: .88rem;
}

.gb-lines summary {
  color: var(--teal-800);
  font-size: .88rem;
  font-weight: 650;
  cursor: pointer;
}

.gb-lines pre {
  overflow-x: auto;
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-xs);
  background: var(--bg-sunken);
  color: var(--text);
  font-size: .76rem;
  line-height: 1.55;
  tab-size: 4;
  white-space: pre;
}

/* Helical wheel */
.wheel-figure {
  display: flex;
  justify-content: center;
}

.wheel-letter {
  fill: #fff;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 800;
}

.wheel-number {
  fill: var(--text-3);
  font-size: 10px;
  font-weight: 650;
}

@media (max-width: 640px) {
  .widget-stats {
    grid-template-columns: 1fr 1fr;
  }

  .dogma-row {
    grid-template-columns: 110px auto;
  }
}

/* ---------- Knowledge check ---------- */

.kc-form {
  display: grid;
  gap: 14px;
}

.kc-question {
  margin: 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  font-size: .98rem;
}

.kc-question legend {
  display: flex;
  gap: 12px;
  float: left;
  width: 100%;
  margin-bottom: 10px;
  padding: 0;
  color: var(--text);
  font-weight: 640;
  line-height: 1.45;
}

.kc-question legend + * {
  clear: left;
}

.kc-num {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-sunken);
  color: var(--text-2);
  font-size: .8rem;
  font-weight: 700;
}

.kc-option {
  display: flex;
  font-weight: 450;
  gap: 10px;
  margin: 0 0 4px 38px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  line-height: 1.45;
  cursor: pointer;
}

.kc-option:hover {
  background: var(--bg-alt);
}

.kc-question.is-right {
  border-color: rgb(6 122 87 / 40%);
}

.kc-question.is-wrong {
  border-color: rgb(179 38 30 / 35%);
}

.kc-question.is-right .kc-num {
  background: var(--ok-bg);
  color: var(--ok);
}

.kc-question.is-wrong .kc-num {
  background: var(--err-bg);
  color: var(--err);
}

.kc-option.is-answer {
  border-color: rgb(6 122 87 / 35%);
  background: var(--ok-bg);
}

.kc-option.is-chosen-wrong {
  border-color: rgb(179 38 30 / 30%);
  background: var(--err-bg);
}

.kc-explain {
  margin: 10px 0 0 38px;
  color: var(--text-2);
  font-size: .92rem;
}

.kc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.kc-result:empty {
  display: none;
}

.kc-result {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.kc-result[data-kind="success"] {
  background: var(--ok-bg);
  color: var(--ok);
}

.kc-result[data-kind="error"] {
  background: var(--err-bg);
  color: var(--err);
}

@media (max-width: 640px) {
  .kc-option,
  .kc-explain {
    margin-left: 0;
  }
}

/* ---------- Study library index ---------- */

.topic-features {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.topic-features li {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text-3);
  font-size: .92rem;
}

.topic-features strong {
  color: var(--text);
  font-size: 1rem;
}

.topic-levels {
  display: grid;
  gap: clamp(48px, 6vw, 72px);
}

.topic-level-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
  margin-bottom: 22px;
}

.topic-level-head h2 {
  margin-bottom: 4px;
  font-size: clamp(1.5rem, 1.4vw + 1rem, 2.1rem);
}

.topic-level-head p:not(.eyebrow) {
  margin: 0;
  color: var(--text-3);
}

.topic-level-num {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--ink-900);
  color: var(--teal-300);
  font-size: 1.4rem;
  font-weight: 750;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.topic-grid li {
  display: flex;
  margin: 0;
}

.topic-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text-2);
  text-decoration: none;
}

.topic-card.is-available {
  border-color: rgb(31 199 175 / 45%);
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}

.topic-card.is-available:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.topic-card.is-planned {
  background: transparent;
  color: var(--text-3);
}

.topic-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.topic-card-num {
  color: var(--text-3);
  font-family: var(--mono);
  font-size: .8rem;
}

.topic-card .status-chip:not(.is-good, .is-progress) {
  background: var(--bg-sunken);
  color: var(--text-3);
}

.status-chip.is-progress {
  background: var(--warn-bg);
  color: var(--warn);
}

.topic-card-title {
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.3;
}

.topic-card.is-planned .topic-card-title {
  color: var(--text-2);
}

.topic-card-summary {
  font-size: .9rem;
  line-height: 1.55;
}

.topic-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 8px;
  color: var(--teal-700);
  font-size: .85rem;
  font-weight: 650;
}

@media (max-width: 1023.98px) {
  .topic-features,
  .topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .topic-features,
  .topic-grid {
    grid-template-columns: 1fr;
  }

  .topic-level-head {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .topic-level-head .text-link {
    grid-column: 2;
  }
}

/* ---------- Practice datasets ---------- */

.dataset-nav {
  margin-bottom: 32px;
}

.dataset-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
}

.dataset-card {
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
  box-shadow: var(--shadow-xs);
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.dataset-head h2 {
  margin-bottom: 4px;
  font-size: clamp(1.4rem, 1vw + 1rem, 1.8rem);
}

.dataset-organism {
  margin: 0 0 12px;
  color: var(--text-3);
  font-style: italic;
}

.dataset-summary {
  max-width: 820px;
  color: var(--text-2);
  font-size: 1.02rem;
}

.dataset-note {
  margin: 14px 0 0;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--warn-bg);
  color: var(--warn);
  font-size: .9rem;
}

.dataset-files {
  margin: 0;
}

.dataset-card .table-scroll {
  position: relative;
  margin-top: 20px;
}

.dataset-files td {
  vertical-align: top;
}

.dataset-file {
  color: var(--teal-700);
  font-family: var(--mono);
  font-size: .84rem;
  font-weight: 600;
  word-break: break-all;
}

.dataset-file-desc {
  display: block;
  margin-top: 2px;
  color: var(--text-3);
  font-size: .8rem;
}

.dataset-stats {
  color: var(--text-2);
}

.dataset-preview {
  overflow-x: auto;
  max-height: 320px;
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--radius-xs);
  background: #0b1424;
  color: #dce6f2;
  font-size: .78rem;
  line-height: 1.5;
  white-space: pre;
}

.dataset-checksum {
  margin: 8px 0 0;
  color: var(--text-3);
  font-size: .75rem;
  word-break: break-all;
}

.dataset-meta {
  display: grid;
  gap: 8px;
  margin: 20px 0 0;
  font-size: .9rem;
}

.dataset-meta div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 12px;
}

.dataset-meta dt {
  color: var(--text-3);
  font-weight: 650;
}

.dataset-meta dd {
  margin: 0;
  color: var(--text-2);
}

.dataset-meta a {
  color: var(--teal-700);
}

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

.remote-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.remote-card h3 {
  font-size: 1.1rem;
}

.remote-card h3 a {
  color: var(--text);
  text-decoration: none;
}

.remote-card h3 a:hover {
  color: var(--teal-700);
}

.remote-card p {
  color: var(--text-2);
  font-size: .92rem;
}

.remote-command {
  grid-template-columns: minmax(0, 1fr) auto;
  padding-bottom: 0;
}

.remote-command .command-code {
  margin: 0;
}

@media (max-width: 860px) {
  .remote-grid {
    grid-template-columns: 1fr;
  }

  .dataset-meta div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

.link-list-planned {
  color: var(--text-3);
}
