:root {
  --bg: #05070c;
  --bg-elevated: #0a1020;
  --bg-alt: #0d1528;
  --navy: #0b1f4a;
  --blue: #1f6fff;
  --blue-bright: #2f8cff;
  --blue-glow: rgba(47, 140, 255, 0.35);
  --silver: #c5cedd;
  --silver-bright: #e8eef8;
  --ink: #f4f7fb;
  --muted: #9aa8bc;
  --line: rgba(197, 206, 221, 0.14);
  --card: rgba(15, 28, 55, 0.55);
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.55);
  --radius: 20px;
  --font: "Instrument Sans", system-ui, -apple-system, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --header-h: 4.25rem;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1100px 560px at 88% -8%, rgba(31, 111, 255, 0.22), transparent 55%),
    radial-gradient(800px 480px at -12% 18%, rgba(11, 31, 74, 0.85), transparent 52%),
    radial-gradient(700px 400px at 50% 100%, rgba(47, 140, 255, 0.08), transparent 60%),
    var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.045;
  z-index: 60;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ——— Header ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
  padding: 0.85rem 5.5vw;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(5, 7, 12, 0.78);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(197, 206, 221, 0.22);
  background: #000;
  box-shadow: 0 0 0 1px rgba(31, 111, 255, 0.15), 0 8px 24px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

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

.brand-text span {
  font-size: 0.7rem;
  color: var(--silver);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.35rem 1.15rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.35rem 0.15rem;
  transition: color 0.2s ease;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
}

.nav a[aria-current="page"] {
  color: var(--blue-bright);
}

.nav-cta {
  color: #041028 !important;
  background: linear-gradient(135deg, var(--blue-bright), var(--blue));
  padding: 0.55rem 1rem !important;
  border-radius: 999px;
  font-weight: 650;
  box-shadow: 0 8px 24px rgba(31, 111, 255, 0.28);
}

.nav-cta:hover {
  filter: brightness(1.06);
  color: #041028 !important;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--silver-bright);
  border-radius: 2px;
  position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

/* ——— MaxFli wordmark ——— */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.02em;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  vertical-align: baseline;
}

.wordmark .x-prop {
  height: 1ex;
  width: auto;
  display: inline-block;
  vertical-align: -0.05ex;
  margin: 0 0.02em;
}

.wordmark-lg {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-family: var(--serif);
  font-weight: 600;
}

.wordmark-lg .x-prop {
  height: 1ex;
  width: auto;
  vertical-align: -0.05ex;
}

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem 1.3rem;
  border-radius: 999px;
  font-weight: 650;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.btn.primary {
  background: linear-gradient(135deg, var(--blue-bright), var(--blue));
  color: #041028;
  box-shadow: 0 10px 28px rgba(31, 111, 255, 0.3);
}

.btn.primary:hover {
  box-shadow: 0 14px 34px rgba(31, 111, 255, 0.4);
}

.btn.ghost {
  border-color: var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.02);
}

.btn.ghost:hover {
  border-color: rgba(47, 140, 255, 0.55);
  background: rgba(31, 111, 255, 0.08);
}

/* ——— Hero ——— */
.hero {
  position: relative;
  padding: 5.5rem 5.5vw 4.5rem;
  overflow: hidden;
  min-height: calc(88vh - var(--header-h));
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: center;
}

.hero-copy { position: relative; z-index: 2; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.74rem;
  color: var(--blue-bright);
  font-weight: 650;
  margin: 0 0 1rem;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.8rem, 7vw, 5.6rem);
  line-height: 0.98;
  margin: 0 0 1.2rem;
  max-width: 12ch;
}

.hero h1 em {
  font-style: italic;
  color: var(--silver-bright);
  background: linear-gradient(120deg, var(--silver-bright), var(--blue-bright));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.12rem;
  margin: 0 0 1.85rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2.25rem;
  margin-bottom: 2rem;
}

.hero-stats strong {
  display: block;
  font-size: 1.55rem;
  font-family: var(--serif);
  color: var(--ink);
}

.hero-stats span {
  color: var(--muted);
  font-size: 0.88rem;
}

.hero-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.hero-visual {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 280px;
}

.hero-prop-wrap {
  position: relative;
  width: min(420px, 86%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.hero-prop-wrap::before {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--blue-glow), transparent 68%);
  filter: blur(8px);
  opacity: 0.9;
}

.hero-rings {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-rings span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(47, 140, 255, 0.18);
}

.hero-rings .r2 { inset: 11%; border-color: rgba(197, 206, 221, 0.16); }
.hero-rings .r3 { inset: 24%; border-color: rgba(31, 111, 255, 0.12); }

.hero-prop {
  position: relative;
  width: 72%;
  height: auto;
  border-radius: 50%;
  animation: prop-spin 28s linear infinite;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.55));
}

@keyframes prop-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ——— Sections ——— */
.section {
  padding: 4.75rem 5.5vw;
}

.section.alt {
  background: linear-gradient(180deg, transparent, rgba(11, 31, 74, 0.35), transparent);
}

.section-head {
  max-width: 42rem;
  margin-bottom: 2.4rem;
}

.section-head h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 3.8vw, 2.85rem);
  line-height: 1.15;
  margin: 0;
}

.page-hero {
  padding: 3.5rem 5.5vw 1.5rem;
}

.page-hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.08;
  margin: 0 0 0.85rem;
  max-width: 18ch;
}

.page-hero .lede {
  margin-bottom: 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 2rem;
  align-items: start;
}

.about-copy {
  color: var(--muted);
  font-size: 1.06rem;
  margin: 0;
  max-width: 42rem;
}

.about-copy.wide { max-width: 48rem; }

.about-copy + .about-copy { margin-top: 1rem; }

.pill-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.pill-list li {
  padding: 0.8rem 1.05rem;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  font-weight: 550;
  color: var(--silver-bright);
}

/* ——— Timeline / cards ——— */
.timeline {
  display: grid;
  gap: 1.1rem;
}

.timeline article,
.card,
.feature-panel {
  padding: 1.4rem 1.5rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
}

.timeline h3,
.card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.12rem;
}

.meta {
  color: var(--blue-bright);
  font-size: 0.9rem;
  margin: 0 0 0.7rem;
  font-weight: 650;
}

.timeline p:last-child,
.card p {
  margin: 0;
  color: var(--muted);
}

.type-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}

.type-grid div {
  padding: 1.15rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(31, 111, 255, 0.06);
}

.type-grid strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--silver-bright);
}

.type-grid span {
  color: var(--muted);
  font-size: 0.9rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

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

.highlight-band {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: center;
  padding: 1.75rem 1.85rem;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid rgba(47, 140, 255, 0.28);
  background:
    linear-gradient(135deg, rgba(31, 111, 255, 0.14), rgba(11, 31, 74, 0.45));
  box-shadow: var(--shadow);
}

.highlight-mark {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(197, 206, 221, 0.2);
  flex-shrink: 0;
}

.highlight-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.highlight-band h2,
.highlight-band h3 {
  margin: 0 0 0.45rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
}

.highlight-band p {
  margin: 0;
  color: var(--muted);
  max-width: 44rem;
}

.contact-panel {
  display: grid;
  gap: 1.5rem;
  max-width: 36rem;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.85rem;
}

.contact-list li {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1rem 1.15rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--card);
}

.contact-list span {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--blue-bright);
  font-weight: 650;
}

.contact-list a,
.contact-list strong {
  color: var(--ink);
  font-weight: 600;
  font-size: 1.05rem;
}

.contact-list a:hover {
  color: var(--blue-bright);
}

.fineprint {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0;
}

.cta-strip {
  margin-top: 2.5rem;
  padding: 1.6rem 1.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(15, 28, 55, 0.4);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cta-strip p {
  margin: 0;
  color: var(--muted);
  max-width: 28rem;
}

.cta-strip strong {
  display: block;
  color: var(--ink);
  margin-bottom: 0.25rem;
  font-size: 1.05rem;
}

/* ——— Footer ——— */
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 2rem 5.5vw 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

.site-footer .wordmark {
  font-weight: 650;
  color: var(--silver);
}

/* ——— Responsive ——— */
@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 3.5rem;
  }

  .hero-visual {
    order: -1;
    min-height: 220px;
  }

  .hero-prop-wrap {
    width: min(300px, 70%);
  }

  .about-grid,
  .card-grid,
  .type-grid,
  .card-grid.two {
    grid-template-columns: 1fr;
  }

  .highlight-band {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }

  .nav {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem 5.5vw 1.1rem;
    background: rgba(5, 7, 12, 0.96);
    border-bottom: 1px solid var(--line);
  }

  .nav.is-open { display: flex; }

  .nav a {
    padding: 0.75rem 0.25rem;
    border-bottom: 1px solid rgba(197, 206, 221, 0.08);
  }

  .nav-cta {
    margin-top: 0.5rem;
    text-align: center;
    justify-content: center;
  }

  .brand-text span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-prop { animation: none; }
  .btn:hover { transform: none; }
}

/* ——— TRI Course ——— */
.course-main {
  padding: 2rem 5.5vw 4rem;
  max-width: 920px;
  margin: 0 auto;
}

.course-hub-hero {
  padding: 2.5rem 0 1.5rem;
}

.course-hub-hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.05;
  margin: 0 0 1rem;
  max-width: none;
}

.course-hub-grid {
  display: grid;
  gap: 1.25rem;
}

.course-hub-section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem 1.25rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.course-hub-section h2 {
  margin: 0 0 0.85rem;
  font-size: 1.15rem;
  color: var(--silver-bright);
  font-weight: 650;
}

.course-toc {
  list-style: none;
  margin: 0;
  padding: 0;
}

.course-toc li {
  border-bottom: 1px solid rgba(197, 206, 221, 0.08);
}

.course-toc li:last-child {
  border-bottom: none;
}

.course-toc a {
  display: block;
  padding: 0.65rem 0.15rem;
  color: var(--muted);
  font-weight: 500;
  transition: color 0.15s ease;
}

.course-toc a:hover {
  color: var(--blue-bright);
}

.course-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.course-breadcrumb a {
  color: var(--blue-bright);
  font-weight: 550;
}

.course-article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem 1.75rem 1.5rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  overflow-x: auto;
}

.course-article > h1:first-child {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  line-height: 1.15;
  margin: 0 0 1rem;
  color: var(--ink);
}

.course-article h2 {
  margin: 1.75rem 0 0.65rem;
  font-size: 1.25rem;
  color: var(--silver-bright);
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--line);
}

.course-article h3 {
  margin: 1.35rem 0 0.45rem;
  font-size: 1.05rem;
  color: var(--ink);
}

.course-article h4 {
  margin: 1.1rem 0 0.35rem;
  font-size: 0.95rem;
  color: var(--silver);
}

.course-article p {
  margin: 0.55rem 0;
  color: var(--silver);
}

.course-article strong {
  color: var(--ink);
  font-weight: 650;
}

.course-article ul,
.course-article ol {
  margin: 0.4rem 0 0.75rem;
  padding-left: 1.3rem;
  color: var(--silver);
}

.course-article li {
  margin: 0.3rem 0;
}

.course-article li::marker {
  color: var(--blue-bright);
}



.course-article hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 1.5rem 0;
}

.course-article table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 0.85rem 0 1rem;
  min-width: 28rem;
}

.course-article th,
.course-article td {
  border: 1px solid var(--line);
  padding: 0.55rem 0.65rem;
  text-align: left;
  vertical-align: top;
}

.course-article th {
  background: rgba(11, 31, 74, 0.85);
  color: var(--ink);
  font-weight: 650;
}

.course-article tr:nth-child(even) td {
  background: rgba(15, 28, 55, 0.45);
}

.course-article td {
  color: var(--silver);
}

.course-article code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em;
  background: rgba(31, 111, 255, 0.12);
  color: var(--silver-bright);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.course-article pre {
  background: rgba(5, 7, 12, 0.65);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  margin: 0.85rem 0;
}

.course-article pre code {
  background: none;
  padding: 0;
}

.course-article blockquote {
  margin: 0.85rem 0;
  padding: 0.65rem 1rem;
  border-left: 3px solid var(--blue);
  background: rgba(31, 111, 255, 0.08);
  color: var(--silver);
}

.course-back {
  margin: 1.5rem 0 0;
  font-size: 0.95rem;
}

.course-back a {
  color: var(--blue-bright);
  font-weight: 550;
}

.course-back a:hover {
  color: var(--silver-bright);
}

.course-cta-card {
  margin-top: 1.5rem;
  background: linear-gradient(145deg, rgba(31, 111, 255, 0.16), rgba(11, 31, 74, 0.55));
  border: 1px solid rgba(47, 140, 255, 0.35);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  display: grid;
  gap: 0.85rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.course-cta-card h3 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--ink);
}

.course-cta-card p {
  margin: 0;
  color: var(--silver);
  max-width: 42rem;
}

.course-cta-card .btn {
  justify-self: start;
}



/* Course content links — readable labels + clear hover */
.course-article a.course-link,
.course-article a:not(.btn):not(.nav-cta) {
  color: var(--blue-bright);
  text-decoration: underline;
  text-decoration-color: rgba(47, 140, 255, 0.35);
  text-underline-offset: 0.18em;
  font-weight: 550;
  transition: color 0.15s ease, background 0.15s ease, text-decoration-color 0.15s ease;
  border-radius: 4px;
}

.course-article a.course-link:hover,
.course-article a:not(.btn):not(.nav-cta):hover {
  color: #fff;
  background: rgba(31, 111, 255, 0.22);
  text-decoration-color: var(--blue-bright);
}

.course-list a {
  color: var(--blue-bright);
  text-decoration: none;
  border-bottom: 1px solid rgba(47, 140, 255, 0.35);
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  border-radius: 4px;
  padding: 0.05em 0.15em;
}

.course-list a:hover {
  color: #fff;
  background: rgba(31, 111, 255, 0.22);
  border-bottom-color: var(--blue-bright);
}



/* ——— MaxFli-first homepage hero ——— */
.hero-logo {
  margin: 0.35rem 0 0.85rem;
  line-height: 0;
  max-width: min(100%, 36rem);
}
.hero-logo img {
  width: 100%;
  height: auto;
  display: block;
}

.brand-text .wordmark {
  font-size: 1.05rem;
  font-weight: 700;
}
.brand-text .wordmark .x-prop {
  height: 1ex;
  vertical-align: baseline;
}


.plain-list {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}
.plain-list li { margin: 0.35rem 0; }
.plain-list li::marker { color: var(--blue-bright); }
.fineprint { font-size: 0.85rem; color: var(--muted); }
.fineprint a { color: var(--blue-bright); text-decoration: underline; text-underline-offset: 2px; }


/* ——— Examiner competence framework (SD24 A6.5) ——— */
.framework-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin-top: 1.5rem;
}
.framework-toc a {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--silver-bright);
  background: rgba(15, 28, 55, 0.45);
}
.framework-toc a:hover {
  border-color: rgba(47, 140, 255, 0.45);
  color: var(--ink);
}
.framework-block {
  margin-bottom: 2.5rem;
}
.framework-title {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}
.framework-grades {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}
@media (max-width: 1100px) {
  .framework-grades { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .framework-grades { grid-template-columns: 1fr; }
}
.framework-grade {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem 1rem 1rem;
  box-shadow: var(--shadow);
}
.framework-grade h4 {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--silver-bright);
}
.framework-grade ul {
  margin: 0;
  padding-left: 1.05rem;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}
.framework-grade li { margin: 0.3rem 0; }
.framework-grade.g1 { border-top: 3px solid #c45c5c; }
.framework-grade.g2 { border-top: 3px solid #c9a227; }
.framework-grade.g3 { border-top: 3px solid #2f8cff; }
.framework-grade.g4 { border-top: 3px solid #3ecf8e; }


/* Keep competency OB IDs on one line */
.course-article table th:first-child,
.course-article table td:first-child {
  white-space: nowrap;
  width: 1%;
  vertical-align: top;
}


.course-article table td.ob-id,
.course-article table th:first-child,
.course-article table td:first-child {
  white-space: nowrap !important;
  width: 1%;
  min-width: 4.5rem;
  vertical-align: top;
}

/* —— Password gate (Examining / TRI Course) —— */
html.gate-locked body > *:not(#maxfli-gate):not(.grain) {
  visibility: hidden !important;
}
#maxfli-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: color-mix(in srgb, var(--bg, #0b1220) 92%, black);
  backdrop-filter: blur(8px);
}
.maxfli-gate-card {
  width: min(26rem, 100%);
  padding: 1.75rem 1.5rem;
  border-radius: 1rem;
  border: 1px solid color-mix(in srgb, currentColor 14%, transparent);
  background: color-mix(in srgb, var(--bg, #111827) 88%, white 4%);
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}
.maxfli-gate-card h1 {
  font-size: 1.6rem;
  margin: 0.35rem 0 0.5rem;
}
.maxfli-gate-lede {
  margin: 0 0 1.25rem;
  opacity: 0.85;
  line-height: 1.45;
}
#maxfli-gate-form label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  opacity: 0.8;
}
#maxfli-gate-pass {
  width: 100%;
  box-sizing: border-box;
  padding: 0.7rem 0.85rem;
  border-radius: 0.55rem;
  border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
  background: color-mix(in srgb, var(--bg, #0b1220) 80%, white 6%);
  color: inherit;
  font: inherit;
  margin-bottom: 0.85rem;
}
.maxfli-gate-err {
  color: #f87171;
  font-size: 0.9rem;
  margin: 0 0 0.75rem;
}
#maxfli-gate-form .btn {
  width: 100%;
}
.maxfli-gate-back {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.9rem;
}
