/* ============================================================
   BIBLINGO GREEK-WIKI — reference-surface layer
   Builds on colors_and_type.css + site.css (tokens + shell).
   Scholarly, reading-first. The paradigm table is the hero.
   ============================================================ */

:root {
  /* Greek text: a polytonic-capable serif, a touch larger than body. */
  --font-greek: 'Literata', 'GFS Didot', Georgia, 'Times New Roman', serif;
  --gw-reading: 68ch;              /* prose measure */
  --gw-sidebar: 264px;
  --gw-rail: clamp(16px, 3vw, 40px);
}

/* ---- Page frame ---------------------------------------------------------- */
.gw {
  --nav-h: 66px;
  padding-top: calc(var(--nav-h) + 8px);
  min-height: 100vh;
}
.gw-wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--gw-rail); }

.gw-layout {
  display: grid;
  grid-template-columns: var(--gw-sidebar) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}
@media (max-width: 900px) { .gw-layout { grid-template-columns: 1fr; } }

/* ---- Breadcrumbs --------------------------------------------------------- */
.gw-crumbs {
  font-family: var(--font-ui); font-size: 13px; font-weight: 600;
  letter-spacing: .01em; color: var(--slate-500);
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 0 0 18px;
}
.gw-crumbs a { color: var(--slate-600); }
.gw-crumbs a:hover { color: var(--brand-blue); }
.gw-crumbs .sep { color: var(--slate-300); }

/* ---- Sidebar ------------------------------------------------------------- */
/* Sticky, with its own scroll area so a long concept list scrolls
   independently of the article instead of running past the viewport. */
.gw-sidebar {
  position: sticky; top: calc(var(--nav-h) + 16px);
  max-height: calc(100vh - var(--nav-h) - 32px);
  overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  padding-right: 6px; /* room for the scrollbar so text isn't clipped */
  scrollbar-width: thin; scrollbar-color: var(--slate-300) transparent;
}
.gw-sidebar::-webkit-scrollbar { width: 8px; }
.gw-sidebar::-webkit-scrollbar-thumb { background: var(--slate-300); border-radius: 999px; }
.gw-sidebar::-webkit-scrollbar-thumb:hover { background: var(--slate-400); }
.gw-sidebar::-webkit-scrollbar-track { background: transparent; }
@media (max-width: 900px) {
  /* on mobile the sidebar is a collapsible block in normal flow — no clipping */
  .gw-sidebar { position: static; max-height: none; overflow: visible; padding-right: 0; }
  .gw-sidebar .gw-nav-group { display: none; }
  .gw-sidebar.open .gw-nav-group { display: block; }
}
.gw-side-toggle {
  display: none; width: 100%; justify-content: space-between; align-items: center;
  font-family: var(--font-ui); font-weight: 700; font-size: 14px; color: var(--ink);
  padding: 12px 14px; border: 1px solid var(--slate-200); border-radius: var(--r-md);
  background: var(--surface); cursor: pointer;
}
@media (max-width: 900px) { .gw-side-toggle { display: flex; } }
.gw-nav-group { margin-bottom: 22px; }
.gw-nav-group h4 {
  font-family: var(--font-ui); font-size: 11px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--slate-500); margin: 0 0 10px;
}
.gw-nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.gw-nav-list a {
  display: block; position: relative;                 /* block so long names wrap */
  font-family: var(--font-ui); font-size: 14px; color: var(--slate-700);
  padding: 7px 34px 7px 10px; border-radius: var(--r-sm); line-height: 1.3;
  overflow-wrap: anywhere;                             /* never force a horizontal bar */
  transition: background .18s ease, color .18s ease;
}
.gw-nav-list a:hover { background: var(--surface-2); color: var(--brand-blue); }
.gw-nav-list a[aria-current="page"] { background: var(--blue-50); color: var(--blue-600); font-weight: 700; }
.gw-nav-list .n { position: absolute; top: 7px; right: 10px; color: var(--slate-400); font-size: 12px; font-variant-numeric: tabular-nums; }

/* ---- Main column --------------------------------------------------------- */
.gw-main { min-width: 0; }
.gw-eyebrow {
  font-family: var(--font-ui); font-weight: 700; font-size: 12px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--brand-blue); margin: 0 0 12px;
  display: inline-flex; align-items: center; gap: 8px;
}
.gw-title {
  font-family: var(--font-display); font-weight: 900; letter-spacing: -.03em;
  line-height: 1.05; color: var(--ink);
  font-size: clamp(30px, 4.4vw, 46px); margin: 0 0 14px; text-wrap: balance;
}
.gw-title .gk { font-family: var(--font-greek); font-weight: 600; letter-spacing: 0; }
.gw-lede {
  font-family: var(--font-body); font-size: var(--text-md); line-height: 1.7;
  color: var(--slate-600); max-width: var(--gw-reading); margin: 0 0 8px;
}
.gw-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 4px; }
.gw-tag {
  font-family: var(--font-ui); font-size: 12px; font-weight: 700; letter-spacing: .02em;
  color: var(--blue-700); background: var(--blue-50);
  border: 1px solid var(--blue-100); border-radius: var(--r-pill); padding: 5px 12px;
}
.gw-tag.alt { color: var(--slate-600); background: var(--surface-2); border-color: var(--slate-200); }

/* ---- Prose --------------------------------------------------------------- */
.gw-prose { max-width: var(--gw-reading); }
.gw-prose p {
  font-family: var(--font-body); font-size: var(--text-md); line-height: 1.75;
  color: var(--slate-700); margin: 0 0 1.15em;
}
.gw-prose .gk { font-family: var(--font-greek); font-weight: 500; color: var(--ink); }
.gw-prose em, .gw-prose i { color: var(--slate-600); }
.gw-prose b, .gw-prose strong { color: var(--ink); font-weight: 700; }

.gw-section { margin: clamp(32px, 5vw, 52px) 0; scroll-margin-top: calc(var(--nav-h) + 20px); }
.gw-section > h2 {
  font-family: var(--font-display); font-weight: 900; letter-spacing: -.02em;
  font-size: clamp(19px, 2.4vw, 25px); color: var(--ink);
  margin: 0 0 6px; padding-bottom: 10px;
  display: flex; align-items: center; gap: 12px;
}
.gw-section > h2 .kind {
  flex: none;
  font-family: var(--font-ui); font-size: 11px; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: #fff; background: var(--brand-blue);
  padding: 3px 9px; border-radius: var(--r-pill);
}
.gw-section > h2 .h { min-width: 0; }
/* a cross-reference target: mark the heading it lands on */
.gw-anchor { display: block; height: 0; scroll-margin-top: calc(var(--nav-h) + 20px); }
.gw-section:target > h2 .h, .gw-anchor:target ~ h2 .h { background: linear-gradient(transparent 62%, var(--blue-100) 62%); }
/* Greek capital with a breathing mark: the mark prints in the word space */
.gk.cap { margin-left: .14em; }

/* "Part of a series" note under a multi-part heading */
.gw-prose .gw-parts, .gw-parts { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: -2px 0 16px; font-family: var(--font-ui); font-size: 13px; line-height: 1.5; font-weight: 600; color: var(--slate-500); }
.gw-parts a { color: var(--blue-700); }
.gw-parts a:hover { color: var(--brand-blue); text-decoration: underline; }
.gw-parts a:focus-visible { outline: 3px solid var(--blue-300); outline-offset: 2px; border-radius: 3px; }

/* Numbered examples from the book: a box, so the prose between them reads as prose */
.gw-section.gw-exsec { margin: 0; }
.gw-ex {
  margin: 4px 0 22px; padding: 12px 18px 6px; scroll-margin-top: calc(var(--nav-h) + 20px);
  background: var(--surface); border: 1px solid var(--blue-100); border-left: 3px solid var(--blue-300);
  border-radius: var(--r-md);
}
.gw-ex figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 6px; }
.gw-ex figcaption .n {
  font-family: var(--font-ui); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--slate-400); text-decoration: none;
}
.gw-ex figcaption .n:hover { color: var(--brand-blue); }
.gw-ex figcaption .n:focus-visible { outline: 3px solid var(--blue-300); outline-offset: 2px; border-radius: 3px; }
.gw-ex figcaption .t { font-family: var(--font-ui); font-size: 14.5px; font-weight: 700; color: var(--ink); }
.gw-prose .gw-ex-body p { margin: 0 0 .5em; }
.gw-ex:target { border-color: var(--blue-300); box-shadow: 0 0 0 3px var(--blue-50); }

/* A long quotation from a cited source */
.gw-quote { margin: 0 0 1.15em; padding: 2px 0 2px 20px; border-left: 3px solid var(--slate-300); }
.gw-prose .gw-quote p { color: var(--slate-600); margin: 0; }

/* Hover help: glossary definitions and spelled-out abbreviations (data-tip) */
.gw-tip { position: relative; cursor: help; text-decoration: underline dotted var(--slate-400); text-decoration-thickness: 1px; text-underline-offset: 3px; }
abbr.gw-tip { border: 0; }
.gw-tip::after {
  content: attr(data-tip); position: absolute; z-index: 30; left: 50%; bottom: calc(100% + 8px);
  width: max-content; max-width: min(320px, 80vw); padding: 8px 11px; border-radius: 8px;
  background: var(--ink); color: #fff; font: 500 13px/1.45 var(--font-ui); letter-spacing: 0;
  text-transform: none; text-align: left; white-space: normal; text-decoration: none;
  box-shadow: 0 10px 28px -12px rgba(6,41,58,.5);
  opacity: 0; pointer-events: none; transform: translate(-50%, 4px);
  transition: opacity .15s ease, transform .15s ease;
}
.gw-tip.tip-left::after { left: 0; transform: translate(0, 4px); }
.gw-tip.tip-right::after { left: auto; right: 0; transform: translate(0, 4px); }
.gw-tip:hover::after, .gw-tip:focus::after { opacity: 1; transform: translate(-50%, 0); }
.gw-tip.tip-left:hover::after, .gw-tip.tip-left:focus::after,
.gw-tip.tip-right:hover::after, .gw-tip.tip-right:focus::after { transform: translate(0, 0); }
.gw-tip:focus { outline: none; }
.gw-tip:focus-visible { outline: 2px solid var(--blue-300); outline-offset: 2px; border-radius: 3px; }
@media (prefers-reduced-motion: reduce) { .gw-tip::after { transition: none; } }
.gw-section > h2 .kind.morph { background: var(--blue-700); }
.gw-section > h2 .kind.syntax { background: #4a7a63; }
.gw-section > h2 .kind.semantics { background: #7a5aa2; }
.gw-section > h2 .kind.phonology { background: #b07636; }

/* Objectives */
.gw-obj { list-style: none; margin: 4px 0 0; padding: 0; max-width: var(--gw-reading); }
.gw-obj li {
  font-family: var(--font-body); font-size: var(--text-base); line-height: 1.6;
  color: var(--slate-700); padding: 9px 0 9px 30px; position: relative;
  border-bottom: 1px solid var(--slate-100);
}
.gw-obj li::before {
  content: ""; position: absolute; left: 4px; top: 16px; width: 8px; height: 8px;
  border-radius: 2px; background: var(--blue-300); transform: rotate(45deg);
}

/* ---- Paradigm table — the hero component --------------------------------- */
.gw-tablecard {
  margin: 22px 0; border: 1px solid var(--slate-200); border-radius: var(--r-lg);
  background: var(--surface); overflow: hidden;
  box-shadow: 0 1px 0 rgba(22,50,61,.03), 0 18px 40px -28px rgba(11,98,134,.28);
}
.gw-tablecard figcaption {
  font-family: var(--font-ui); font-size: 13px; font-weight: 700; color: var(--slate-600);
  padding: 12px 16px; border-bottom: 1px solid var(--slate-200);
  background: linear-gradient(var(--surface-2), var(--surface));
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.gw-tablecard figcaption .code {
  font-family: var(--font-ui); font-weight: 800; font-size: 11px; letter-spacing: .06em;
  color: var(--blue-700); background: var(--blue-50); border: 1px solid var(--blue-100);
  padding: 2px 8px; border-radius: var(--r-sm);
}
.gw-tablescroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.gw-table { border-collapse: collapse; width: 100%; min-width: max-content; }
table.gw-table th, table.gw-table td {
  padding: 10px 16px; text-align: left; border-bottom: 1px solid var(--slate-100);
  white-space: nowrap;
}
table.gw-table thead th {
  position: sticky; top: 0; z-index: 1;
  font-family: var(--font-ui); font-size: 12px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: var(--slate-600);
  background: var(--surface-2); border-bottom: 1px solid var(--slate-200);
}
table.gw-table tbody th {
  font-family: var(--font-ui); font-size: 12px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--slate-500);
  background: var(--surface); border-right: 1px solid var(--slate-100);
  position: sticky; left: 0;
}
table.gw-table td {
  font-family: var(--font-greek); font-size: 1.12rem; color: var(--ink); font-weight: 500;
}
/* ending emphasis: the text after a hyphen is the changing morpheme */
table.gw-table td .end { color: var(--blue-600); font-weight: 700; }
/* tables of uses and descriptions: wrap to the page instead of scrolling */
table.gw-table.is-text { min-width: 100%; }
table.gw-table.is-text th, table.gw-table.is-text td { white-space: normal; min-width: 9ch; }
table.gw-table.is-text td { font-family: var(--font-body); font-size: var(--text-base); line-height: 1.5; vertical-align: top; }
table.gw-table.is-text td .gk { font-family: var(--font-greek); }
/* a table wider than the page says so */
.gw-tablecard.has-overflow figcaption::after {
  content: 'Scroll sideways →'; margin-left: auto; flex: none;
  font-family: var(--font-ui); font-size: 11.5px; font-weight: 700; color: var(--blue-700);
}
.gw-tablecard.has-overflow.at-end figcaption::after { content: '← Scroll back'; }
.gw-tablescroll { background:
  linear-gradient(to right, var(--surface) 30%, rgba(255,255,255,0)) left / 28px 100% no-repeat local,
  linear-gradient(to left, var(--surface) 30%, rgba(255,255,255,0)) right / 28px 100% no-repeat local,
  radial-gradient(farthest-side at 0 50%, rgba(11,98,134,.18), transparent) left / 12px 100% no-repeat scroll,
  radial-gradient(farthest-side at 100% 50%, rgba(11,98,134,.18), transparent) right / 12px 100% no-repeat scroll; }
table.gw-table tbody tr:hover td, table.gw-table tbody tr:hover th { background: var(--blue-50); }
table.gw-table tbody tr:last-child td, table.gw-table tbody tr:last-child th { border-bottom: 0; }

/* ---- Vocabulary list ----------------------------------------------------- */
.gw-vocab { width: 100%; border-collapse: collapse; margin: 12px 0; }
.gw-vocab th {
  font-family: var(--font-ui); font-size: 11px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--slate-500); text-align: left;
  padding: 8px 14px; border-bottom: 2px solid var(--slate-200);
}
.gw-vocab td { padding: 10px 14px; border-bottom: 1px solid var(--slate-100); vertical-align: baseline; }
.gw-vocab td.g { font-family: var(--font-greek); font-size: 1.1rem; color: var(--ink); font-weight: 500; white-space: nowrap; }
.gw-vocab td.gloss { font-family: var(--font-body); color: var(--slate-700); }
.gw-vocab td.meta { font-family: var(--font-ui); font-size: 12px; color: var(--slate-500); }
.gw-vocab td.meta a { color: var(--blue-600); font-weight: 600; }
.gw-vocab tr:hover td { background: var(--surface-2); }

/* ---- Related / cross-links ----------------------------------------------- */
.gw-related { margin: clamp(36px, 5vw, 56px) 0 0; }
.gw-related h3 {
  font-family: var(--font-ui); font-size: 12px; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--slate-500); margin: 0 0 14px;
}
.gw-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.gw-chip {
  font-family: var(--font-ui); font-size: 14px; font-weight: 600; color: var(--slate-700);
  background: var(--surface); border: 1px solid var(--slate-200); border-radius: var(--r-pill);
  padding: 9px 16px; transition: transform .18s cubic-bezier(.22,1,.36,1), border-color .18s, color .18s, box-shadow .18s;
}
.gw-chip:hover { color: var(--brand-blue); border-color: var(--blue-200); transform: translateY(-2px); box-shadow: 0 10px 20px -12px rgba(11,98,134,.35); }
.gw-chip .gk { font-family: var(--font-greek); }

/* ---- Prev / next --------------------------------------------------------- */
.gw-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 44px 0 0; }
@media (max-width: 560px) { .gw-pager { grid-template-columns: 1fr; } }
.gw-pager a {
  display: flex; flex-direction: column; gap: 4px; padding: 16px 18px;
  border: 1px solid var(--slate-200); border-radius: var(--r-md); background: var(--surface);
  transition: border-color .18s, box-shadow .18s, transform .18s cubic-bezier(.22,1,.36,1);
}
.gw-pager a:hover { border-color: var(--blue-200); box-shadow: 0 12px 26px -18px rgba(11,98,134,.4); transform: translateY(-2px); }
.gw-pager a.next { text-align: right; }
.gw-pager .lbl { font-family: var(--font-ui); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--slate-400); }
.gw-pager .ttl { font-family: var(--font-ui); font-size: 15px; font-weight: 700; color: var(--ink); }

/* ============================================================
   HUB / INDEX
   ============================================================ */
.gw-hero { text-align: center; padding: clamp(20px, 5vw, 44px) 0 clamp(28px, 5vw, 48px); }
.gw-hero .gw-eyebrow { justify-content: center; }
.gw-hero h1 {
  font-family: var(--font-display); font-weight: 900; letter-spacing: -.035em;
  font-size: clamp(34px, 6vw, 62px); line-height: 1.02; color: var(--ink);
  margin: 0 auto 16px; max-width: 16ch; text-wrap: balance;
}
.gw-hero h1 .gk { font-family: var(--font-greek); font-weight: 600; color: var(--brand-blue); letter-spacing: 0; }
.gw-hero p { font-family: var(--font-body); font-size: var(--text-md); line-height: 1.7; color: var(--slate-600); max-width: 60ch; margin: 0 auto; }

/* ---- Search -------------------------------------------------------------- */
.gw-search { max-width: 620px; margin: 26px auto 0; position: relative; }
.gw-search-box {
  display: flex; align-items: center; gap: 12px; background: var(--surface);
  border: 1.5px solid var(--slate-200); border-radius: var(--r-pill);
  padding: 14px 20px; box-shadow: 0 14px 34px -22px rgba(11,98,134,.4);
  transition: border-color .2s, box-shadow .2s;
}
.gw-search-box:focus-within { border-color: var(--blue-300); box-shadow: 0 16px 40px -20px rgba(11,98,134,.5); }
.gw-search-box svg { flex: none; color: var(--slate-400); }
.gw-search-box input {
  flex: 1; border: 0; outline: 0; background: transparent; min-width: 0;
  font-family: var(--font-ui); font-size: 16px; color: var(--ink);
}
.gw-search-box input::placeholder { color: var(--slate-400); }
.gw-search-box kbd {
  font-family: var(--font-ui); font-size: 11px; font-weight: 700; color: var(--slate-500);
  background: var(--surface-2); border: 1px solid var(--slate-200); border-bottom-width: 2px;
  border-radius: 6px; padding: 2px 7px;
}
.gw-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 10px); z-index: 20;
  background: var(--surface); border: 1px solid var(--slate-200); border-radius: var(--r-lg);
  box-shadow: 0 30px 60px -24px rgba(6,41,58,.45); overflow: hidden; text-align: left;
  max-height: 60vh; overflow-y: auto;
}
.gw-results[hidden] { display: none; }
.gw-result {
  display: flex; align-items: baseline; gap: 12px; padding: 12px 18px;
  border-bottom: 1px solid var(--slate-100);
}
.gw-result:hover, .gw-result.active { background: var(--blue-50); }
.gw-result .rt { font-family: var(--font-ui); font-size: 15px; font-weight: 600; color: var(--ink); }
.gw-result .rt .gk { font-family: var(--font-greek); }
.gw-result .rk {
  font-family: var(--font-ui); font-size: 10px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: #fff; background: var(--slate-400);
  padding: 2px 7px; border-radius: var(--r-pill); flex: none;
}
.gw-result .rk.concept { background: var(--brand-blue); }
.gw-result .rk.paradigm { background: var(--blue-700); }
.gw-result .rk.lesson { background: #4a7a63; }
.gw-result .rmeta { font-family: var(--font-ui); font-size: 12px; color: var(--slate-500); margin-left: auto; }
.gw-noresult { padding: 18px; font-family: var(--font-ui); font-size: 14px; color: var(--slate-500); text-align: center; }

/* ---- Browse grid --------------------------------------------------------- */
.gw-browse { margin: clamp(40px, 6vw, 72px) 0; }
.gw-browse h2 {
  font-family: var(--font-display); font-weight: 900; letter-spacing: -.02em;
  font-size: clamp(22px, 3vw, 30px); color: var(--ink); margin: 0 0 6px;
}
.gw-browse .sub { font-family: var(--font-body); color: var(--slate-600); margin: 0 0 24px; font-size: var(--text-base); }
.gw-poscols { columns: 3 220px; column-gap: 40px; }
@media (max-width: 640px) { .gw-poscols { columns: 2 150px; column-gap: 24px; } }
.gw-posgroup { break-inside: avoid; margin-bottom: 26px; }
.gw-posgroup h3 {
  font-family: var(--font-ui); font-size: 12px; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--brand-blue); margin: 0 0 10px;
  padding-bottom: 8px; border-bottom: 1px solid var(--slate-200);
  display: flex; justify-content: space-between; align-items: baseline;
}
.gw-posgroup h3 .n { color: var(--slate-400); font-weight: 700; }
.gw-posgroup ul { list-style: none; margin: 0; padding: 0; }
.gw-posgroup li { margin: 0 0 2px; }
.gw-posgroup a {
  font-family: var(--font-ui); font-size: 14px; color: var(--slate-700);
  display: block; padding: 4px 0; line-height: 1.35;
}
.gw-posgroup a:hover { color: var(--brand-blue); }
.gw-posgroup a .gk { font-family: var(--font-greek); }

/* ---- Stat strip ---------------------------------------------------------- */
.gw-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(24px, 6vw, 64px); margin: 30px 0 0; }
.gw-stat { text-align: center; }
.gw-stat b { font-family: var(--font-display); font-weight: 900; font-size: clamp(26px, 3.4vw, 40px); color: var(--brand-blue); letter-spacing: -.03em; display: block; }
.gw-stat span { font-family: var(--font-ui); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--slate-500); }

/* ---- Callout to the app -------------------------------------------------- */
.gw-appcta {
  margin: clamp(44px, 6vw, 72px) 0 0; border-radius: var(--r-xl); overflow: hidden;
  background: var(--grad-brand-bg); color: #fff; padding: clamp(30px, 5vw, 52px);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px;
}
.gw-appcta h3 { font-family: var(--font-display); font-weight: 900; font-size: clamp(20px, 3vw, 30px); letter-spacing: -.02em; margin: 0 0 6px; color: #fff; }
/* The paragraph matches the headline's width: width:0 keeps it out of the text
   column's intrinsic sizing (so the headline alone sets the column width) and
   min-width:100% then fills that column. */
.gw-appcta p { font-family: var(--font-body); color: #cfe6f2; margin: 0; line-height: 1.6; width: 0; min-width: 100%; }
.gw-appcta .btn { background: #fff; color: var(--brand-blue); box-shadow: var(--shadow-lg); flex: none; }
.gw-appcta .btn:hover { transform: translateY(-2px); }

@media (prefers-reduced-motion: reduce) {
  .gw-chip, .gw-pager a, .gw-appcta .btn { transition: none; }
}

/* ============================================================
   Cross-references, Articles, Glossary  (added)
   ============================================================ */

/* inline cross-reference links (section numbers, article refs) */
.gw-xref {
  color: var(--blue-600); font-weight: 600;
  text-decoration: underline; text-decoration-color: var(--blue-200);
  text-underline-offset: 2px; text-decoration-thickness: 1.5px;
  border-radius: 3px; padding: 0 1px; transition: color .15s, background .15s;
}
.gw-xref:hover { color: var(--blue-700); background: var(--blue-50); text-decoration-color: var(--blue-400); }

/* ---- Hub: articles grid ---- */
.gw-artgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.gw-artgroup { border: 1px solid var(--slate-200); border-radius: var(--r-lg); background: var(--surface); padding: 18px 20px; }
.gw-artgroup h3 {
  font-family: var(--font-ui); font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--brand-blue); margin: 0 0 12px; display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
}
.gw-artgroup h3 .tag { font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: none; color: var(--slate-400); }
.gw-artgroup ul { list-style: none; margin: 0; padding: 0; }
.gw-artgroup li { margin: 0 0 4px; }
.gw-artgroup a { font-family: var(--font-body); font-size: 14px; color: var(--slate-700); line-height: 1.4; display: block; padding: 3px 0; }
.gw-artgroup a:hover { color: var(--brand-blue); }
.gw-artgroup a .an { font-family: var(--font-ui); font-weight: 700; color: var(--blue-700); font-size: 12px; margin-right: 4px; }

/* ---- Hub: glossary card ---- */
.gw-glosscard {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  margin: 8px 0 0; padding: 24px clamp(22px, 4vw, 36px);
  border: 1px solid var(--blue-100); border-radius: var(--r-xl);
  background: linear-gradient(120deg, var(--blue-50), var(--surface));
  transition: border-color .18s, box-shadow .18s, transform .18s cubic-bezier(.22,1,.36,1);
}
.gw-glosscard:hover { border-color: var(--blue-200); box-shadow: 0 18px 40px -26px rgba(11,98,134,.5); transform: translateY(-2px); }
.gw-glosscard h2 { font-family: var(--font-display); font-weight: 900; letter-spacing: -.02em; font-size: clamp(20px, 3vw, 28px); color: var(--ink); margin: 4px 0 6px; }
.gw-glosscard p { font-family: var(--font-body); color: var(--slate-600); margin: 0; max-width: 60ch; }
.gw-glosscard-cta { font-family: var(--font-ui); font-weight: 700; color: var(--brand-blue); white-space: nowrap; }

/* ---- Glossary page ---- */
.gw-alpha { display: flex; flex-wrap: wrap; gap: 6px; margin: 20px 0 8px; position: sticky; top: calc(var(--nav-h) + 8px); z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(6px); padding: 8px 0; }
.gw-alpha a {
  font-family: var(--font-ui); font-weight: 700; font-size: 13px; color: var(--slate-600);
  width: 30px; height: 30px; display: grid; place-items: center; border-radius: var(--r-sm);
  border: 1px solid var(--slate-200); background: var(--surface); transition: all .15s;
}
.gw-alpha a:hover { background: var(--brand-blue); color: #fff; border-color: var(--brand-blue); }
.gw-glossary .gl-letter {
  font-family: var(--font-display); font-weight: 900; font-size: 28px; color: var(--brand-blue);
  border-bottom: 2px solid var(--slate-200); padding-bottom: 6px; margin: 8px 0 6px;
}
.gl-list { margin: 0; }
.gl-entry { padding: 14px 0; border-bottom: 1px solid var(--slate-100); scroll-margin-top: calc(var(--nav-h) + 60px); }
.gl-entry dt {
  font-family: var(--font-display); font-weight: 700; font-size: var(--text-md); color: var(--ink);
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin: 0 0 4px;
}
.gl-entry dt .gk { font-family: var(--font-greek); }
.gl-entry dd {
  margin: 0; font-family: var(--font-body); font-size: var(--text-base); line-height: 1.65; color: var(--slate-700);
  max-width: var(--gw-reading);
}
.gl-entry dd .gk { font-family: var(--font-greek); color: var(--ink); }
.gl-ref a, .gl-ref { font-family: var(--font-ui); font-size: 12px; font-weight: 700; color: var(--blue-600); }
.gl-abbr {
  font-family: var(--font-ui); font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: none;
  color: #fff; background: var(--slate-400); padding: 2px 8px; border-radius: var(--r-pill);
}
.gl-abbrgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 8px; }
.gl-abbrcard { border: 1px solid var(--slate-200); border-radius: var(--r-md); padding: 14px 16px; background: var(--surface); }
.gl-abbrcard h4 { font-family: var(--font-ui); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-blue); margin: 0 0 8px; }
.gl-abbrcard .gw-vocab td { padding: 5px 8px; border: 0; }

/* result badge colors for the new search types */
.gw-result .rk.article { background: #7a5aa2; }
.gw-result .rk.term { background: #4a7a63; }

/* textbook title link */
.gw-book { font-style: italic; color: var(--blue-600); text-decoration: underline; text-decoration-color: var(--blue-200); text-underline-offset: 2px; }
.gw-book:hover { color: var(--blue-700); text-decoration-color: var(--blue-400); }
.footer-base .gw-book { color: inherit; text-decoration-color: rgba(255,255,255,.35); }
.footer-base .gw-book:hover { text-decoration-color: rgba(255,255,255,.7); }

/* ---- Hub category cards + category index pages ---- */
.gw-cats { margin: clamp(26px, 5vw, 46px) 0 0; }
.gw-catgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.gw-catgrid .gw-glosscard { margin: 0; flex-direction: column; align-items: flex-start; gap: 14px; }
.gw-catgrid .gw-glosscard .gw-glosscard-cta { align-self: flex-start; }
.gw-index-hero { padding-top: clamp(10px, 2vw, 22px); }
.gw-index-hero h1 { max-width: 22ch; }

/* Article interludes within the Lessons index */
.gw-posgroup.gw-interlude { background: var(--blue-50); border: 1px solid var(--blue-100); border-radius: var(--r-md); padding: 12px 14px; }
.gw-posgroup.gw-interlude h3 { color: var(--blue-700); border-bottom-color: var(--blue-200); }
.gw-posgroup.gw-interlude h3 .tag { color: #fff; background: #7a5aa2; padding: 2px 8px; border-radius: var(--r-pill); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: none; }
.gw-posgroup.gw-interlude .an { color: var(--blue-700); font-weight: 700; }

/* Prose bullet lists (system titles, morphology notes, examples) */
.gw-prose .gw-ul { max-width: var(--gw-reading); margin: 0 0 1.2em; padding-left: 1.3em; }
.gw-prose .gw-ul li { font-family: var(--font-body); font-size: var(--text-md); line-height: 1.7; color: var(--slate-700); margin: 0 0 .55em; }
.gw-prose .gw-ul li::marker { color: var(--blue-300); }
.gw-prose .gw-ul li strong { color: var(--ink); }
.gw-prose .gw-ul .gk { font-family: var(--font-greek); color: var(--ink); }

/* --- New Testament Translation section --------------------------------- */
/* Boxed article description/summary at the top of each NT article page */
.gw-descbox {
  margin: 18px 0 4px; max-width: var(--gw-reading);
  padding: 16px 20px; border: 1px solid var(--blue-100, var(--slate-200));
  border-left: 4px solid var(--brand-blue); border-radius: var(--r-md);
  background: var(--blue-50, #f2f6fc);
  font-family: var(--font-body); font-size: var(--text-md); line-height: 1.6;
  color: var(--slate-700); font-style: normal;
}
/* Sub-headings inside a NT article's prose (emitted directly in .gw-prose) */
.gw-prose > h2 {
  font-family: var(--font-display); font-weight: 900; letter-spacing: -.02em;
  font-size: clamp(18px, 2.2vw, 22px); color: var(--ink);
  margin: 1.7em 0 .5em; padding-top: .2em;
}
.gw-prose > h2:first-child { margin-top: 0; }
/* "Learn More" episode links */
.gw-learnmore {
  margin-top: clamp(32px, 5vw, 48px); padding: 22px 24px;
  border: 1px solid var(--slate-200); border-radius: var(--r-lg);
  background: var(--blue-50, #f2f6fc);
}
.gw-learnmore > h2 {
  font-family: var(--font-display); font-weight: 900; letter-spacing: -.02em;
  font-size: clamp(17px, 2vw, 21px); color: var(--ink); margin: 0 0 4px;
}
.gw-learnmore > p { margin: 0 0 .8em; font-size: var(--text-base); color: var(--slate-600); }
.gw-lm-list { list-style: none; margin: 0 0 .6em; padding: 0; }
.gw-lm-list li {
  font-family: var(--font-body); font-size: var(--text-base); line-height: 1.5;
  color: var(--slate-700); padding: 6px 0; border-bottom: 1px solid var(--slate-200);
}
.gw-lm-list li:last-child { border-bottom: 0; }
.gw-lm-list a { font-weight: 600; }
.gw-lm-guest { color: var(--slate-500); font-weight: 400; }
.gw-lm-playlist { margin: .4em 0 0; }
.gw-lm-playlist a { font-weight: 700; }

/* --- Featured library on the hub (full width, right under the search) ---- */
.gw-featured-wrap { margin: 0 0 clamp(4px, 1.5vw, 10px); }
.gw-glosscard.gw-featured {
  margin: 0; width: 100%; box-sizing: border-box; flex-wrap: nowrap; gap: clamp(18px, 4vw, 40px);
  padding: clamp(24px, 4vw, 38px) clamp(22px, 4.5vw, 44px);
  border-color: var(--blue-200);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(11,98,134,.10), transparent 55%),
    linear-gradient(120deg, var(--blue-50), var(--surface) 70%);
  box-shadow: 0 22px 48px -34px rgba(11,98,134,.55);
}
.gw-featured h2 { font-size: clamp(24px, 3.6vw, 36px); line-height: 1.12; margin: 6px 0 10px; max-width: 30ch; }
.gw-featured p { max-width: 68ch; font-size: var(--text-md); line-height: 1.6; }
.gw-featured-stats { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; }
.gw-featured-stats li {
  font-family: var(--font-ui); font-size: 12.5px; font-weight: 700; color: var(--blue-700);
  background: #fff; border: 1px solid var(--blue-100); border-radius: var(--r-pill); padding: 5px 11px;
}
.gw-featured .gw-glosscard-cta {
  flex: none; align-self: center; color: #fff; background: var(--brand-blue);
  padding: 14px 26px; border-radius: var(--r-pill); box-shadow: var(--shadow-brand);
  transition: transform .18s cubic-bezier(.22,1,.36,1), background .18s;
}
.gw-featured:hover .gw-glosscard-cta { background: var(--blue-600); transform: translateX(3px); }
.gw-featured:focus-visible { outline: 3px solid var(--blue-300); outline-offset: 3px; }
@media (max-width: 720px) {
  .gw-glosscard.gw-featured { flex-direction: column; align-items: flex-start; flex-wrap: wrap; }
  .gw-featured .gw-glosscard-cta { align-self: flex-start; }
}

/* --- Lessons index: chapter exam rows ------------------------------------ */
.gw-posgroup { scroll-margin-top: calc(var(--nav-h, 72px) + 20px); }
.gw-posgroup .gw-exam-li a { font-weight: 700; color: var(--green-700); }
.gw-posgroup .gw-exam-li a:hover { color: var(--green-800); }
.gw-exam-badge {
  display: inline-block; margin-right: 7px; padding: 1px 7px; border-radius: var(--r-pill);
  font-family: var(--font-ui); font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  color: #fff; background: var(--green-600); vertical-align: 1px;
}
.gw-tag.quiz { color: var(--green-700); background: var(--green-50); border-color: var(--green-200); text-decoration: none; }
.gw-tag.quiz:hover { background: var(--green-100); }

/* --- Self-grading quiz ---------------------------------------------------- */
/* .btn sets display:inline-flex, which would beat the [hidden] attribute that
   quiz.js toggles on the Check / Try again buttons — make [hidden] win here. */
.gw-quiz [hidden] { display: none !important; }
.gw-quiz {
  margin: clamp(36px, 6vw, 56px) 0 0; max-width: var(--gw-reading);
  padding: clamp(20px, 3.5vw, 30px) clamp(18px, 3.5vw, 30px);
  border: 1px solid var(--blue-100); border-radius: var(--r-xl);
  background: linear-gradient(180deg, var(--blue-50), var(--surface) 140px);
  scroll-margin-top: calc(var(--nav-h, 72px) + 20px);
}
.gw-quiz-head { margin-bottom: 6px; }
.gw-quiz-kicker {
  display: block; font-family: var(--font-ui); font-size: 11px; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--blue-700);
}
.gw-quiz-head h2 {
  font-family: var(--font-display); font-weight: 900; letter-spacing: -.02em;
  font-size: clamp(20px, 2.6vw, 26px); color: var(--ink); margin: 4px 0 4px;
}
.gw-quiz-meta { font-family: var(--font-ui); font-size: 13px; color: var(--slate-500); margin: 0; }
.gw-quiz-best {
  margin-left: 6px; padding: 2px 8px; border-radius: var(--r-pill); font-weight: 700;
  color: var(--blue-700); background: #fff; border: 1px solid var(--blue-100);
}
.gw-quiz.is-mastered .gw-quiz-best { color: var(--green-700); background: var(--green-50); border-color: var(--green-200); }
.gw-quiz-list { list-style: none; margin: 16px 0 0; padding: 0; }
.gw-q { margin: 0 0 22px; padding: 4px 0 0; border-radius: var(--r-md); }
.gw-q fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.gw-q legend {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 0; margin: 0 0 10px;
  font-family: var(--font-body); font-size: var(--text-md); line-height: 1.5; font-weight: 600; color: var(--ink);
}
.gw-q-num {
  flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  font-family: var(--font-ui); font-size: 12.5px; font-weight: 800; color: #fff; background: var(--brand-blue);
  transform: translateY(-1px);
}
.gw-q-prompt { flex: 1 1 0; min-width: 0; }
.gw-q-prompt .gk, .gw-opt-text .gk, .gw-q-expl .gk { font-family: var(--font-greek); font-weight: 500; }
.gw-q-hint {
  flex-basis: 100%; padding-left: 36px; font-family: var(--font-ui); font-size: 12px; font-weight: 700;
  letter-spacing: .03em; color: var(--slate-500);
}
.gw-q-opts { display: grid; gap: 8px; padding-left: 36px; }
.gw-q-opts.is-tf { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 360px; }
@media (max-width: 480px) { .gw-q-opts, .gw-q-hint { padding-left: 0; } }
.gw-opt {
  position: relative; display: flex; align-items: flex-start; gap: 11px; cursor: pointer;
  padding: 11px 14px; border: 1.5px solid var(--slate-200); border-radius: var(--r-md); background: #fff;
  font-family: var(--font-body); font-size: var(--text-base); line-height: 1.45; color: var(--slate-700);
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.gw-opt:hover { border-color: var(--blue-300); background: var(--blue-50); }
.gw-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.gw-opt-mark {
  flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%;
  border: 2px solid var(--slate-300); background: #fff; box-sizing: border-box;
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.gw-q[data-type="multiple"] .gw-opt-mark { border-radius: 5px; }
.gw-opt input:checked + .gw-opt-mark { border-color: var(--brand-blue); background: var(--brand-blue); box-shadow: inset 0 0 0 3px #fff; }
.gw-q[data-type="multiple"] .gw-opt input:checked + .gw-opt-mark { box-shadow: inset 0 0 0 2.5px #fff; }
.gw-opt:has(input:checked) { border-color: var(--blue-400); background: var(--blue-50); }
.gw-opt input:focus-visible + .gw-opt-mark { outline: 3px solid var(--blue-300); outline-offset: 2px; }
.gw-opt:has(input:focus-visible) { border-color: var(--blue-400); }
.gw-opt-text { min-width: 0; }
.gw-q.is-unanswered { box-shadow: 0 0 0 2px #f2c46b; background: #fffaf0; padding: 10px; margin-left: -10px; margin-right: -10px; }

/* graded state */
.gw-quiz.is-graded .gw-opt { cursor: default; }
.gw-quiz.is-graded .gw-opt:hover { border-color: var(--slate-200); background: #fff; }
.gw-opt.is-answer, .gw-quiz.is-graded .gw-opt.is-answer:hover { border-color: var(--green-500); background: var(--green-50); color: var(--ink); }
.gw-opt.is-answer .gw-opt-mark { border-color: var(--green-600); background: var(--green-600); box-shadow: inset 0 0 0 3px var(--green-50); }
.gw-opt.is-miss, .gw-quiz.is-graded .gw-opt.is-miss:hover { border-color: #f1a39c; background: #fef3f2; color: #7a271a; }
.gw-opt.is-miss .gw-opt-mark { border-color: #d92d20; background: #d92d20; box-shadow: inset 0 0 0 3px #fef3f2; }
.gw-opt.is-answer::after, .gw-opt.is-miss::after {
  margin-left: auto; padding-left: 10px; font-family: var(--font-ui); font-size: 12px; font-weight: 800; white-space: nowrap; align-self: center;
}
.gw-opt.is-answer::after { content: 'Correct'; color: var(--green-700); }
.gw-opt.is-miss::after { content: 'Your answer'; color: #b42318; }
.gw-q-feedback {
  margin: 10px 0 0 36px; padding: 10px 14px; border-radius: var(--r-md); border-left: 3px solid var(--slate-300);
  background: var(--surface-2, #f5f8fa); font-family: var(--font-body); font-size: var(--text-sm); line-height: 1.6; color: var(--slate-700);
}
@media (max-width: 480px) { .gw-q-feedback { margin-left: 0; } }
.gw-q.is-correct .gw-q-feedback { border-left-color: var(--green-500); background: var(--green-50); }
.gw-q.is-wrong .gw-q-feedback { border-left-color: #f04438; background: #fef3f2; }
.gw-q.is-correct .gw-q-verdict { color: var(--green-700); }
.gw-q.is-wrong .gw-q-verdict { color: #b42318; }
.gw-q.is-correct .gw-q-num { background: var(--green-600); }
.gw-q.is-wrong .gw-q-num { background: #d92d20; }

.gw-quiz-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 6px 0 0; padding-left: 36px; }
@media (max-width: 480px) { .gw-quiz-actions { padding-left: 0; } }
.gw-quiz-reset { background: #fff; color: var(--ink); border: 1.5px solid var(--slate-300); }
.gw-quiz-reset:hover { border-color: var(--slate-400); transform: translateY(-2px); }
.gw-quiz .btn:focus-visible { outline: 3px solid var(--blue-300); outline-offset: 2px; }
.gw-quiz-score { flex: 1 1 260px; margin: 0; font-family: var(--font-ui); font-size: 14.5px; font-weight: 700; color: var(--slate-600); }
.gw-quiz-score.is-good { color: var(--green-700); }
.gw-quiz-score.is-low { color: #b42318; }
.gw-quiz-score.is-warn { color: #9a6700; }

/* --- "Take the chapter exam" call-out (last subsection of each chapter) --- */
.gw-examcta {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; max-width: var(--gw-reading);
  margin: 22px 0 0; padding: 18px 22px; border: 1px solid var(--green-200); border-radius: var(--r-lg);
  background: linear-gradient(120deg, var(--green-50), #fff 75%); text-decoration: none;
  transition: border-color .18s, box-shadow .18s, transform .18s cubic-bezier(.22,1,.36,1);
}
.gw-examcta:hover { border-color: var(--green-400); box-shadow: 0 16px 36px -26px rgba(78,123,60,.6); transform: translateY(-2px); }
.gw-examcta:focus-visible { outline: 3px solid var(--green-300); outline-offset: 3px; }
.gw-examcta .gw-quiz-kicker { color: var(--green-700); }
.gw-examcta strong { display: block; font-family: var(--font-display); font-weight: 900; font-size: clamp(18px, 2.4vw, 22px); letter-spacing: -.015em; color: var(--ink); margin: 3px 0 2px; }
.gw-examcta .sub { display: block; font-family: var(--font-body); font-size: var(--text-sm); color: var(--slate-600); }
.gw-examcta .go {
  flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  font-family: var(--font-ui); font-size: 20px; font-weight: 800; color: #fff; background: var(--green-600);
}
.gw-exam-covers { margin-top: 18px; }

@media (prefers-reduced-motion: reduce) {
  .gw-opt, .gw-opt-mark, .gw-examcta, .gw-featured .gw-glosscard-cta { transition: none; }
}

/* ======================================================================== */
/* Intro to Biblical Language Linguistics Course (/linguistics-course/)     */
/* Reuses the wiki's tokens, layout, prose, quiz, and pager styles.          */
/* ======================================================================== */

/* --- progress bar (sidebar + course hero) --------------------------------- */
.gw-progress p { margin: 6px 0 0; font-family: var(--font-ui); font-size: 12px; font-weight: 700; color: var(--slate-500); }
.gw-progress-bar { height: 7px; border-radius: var(--r-pill); background: var(--slate-200); overflow: hidden; }
.gw-progress-bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--green-500); transition: width .4s cubic-bezier(.22,1,.36,1); }
.gw-progress.has-progress p { color: var(--green-700); }

/* --- course outline sidebar ------------------------------------------------ */
.gw-course-sidehead { padding: 14px; border: 1px solid var(--blue-100); border-radius: var(--r-md); background: var(--blue-50); }
.gw-course-home { display: block; font-family: var(--font-display); font-weight: 900; font-size: 15px; line-height: 1.25; letter-spacing: -.01em; color: var(--ink); margin-bottom: 10px; }
.gw-course-home:hover { color: var(--brand-blue); }
.gw-course-list a { display: flex; align-items: flex-start; gap: 8px; padding: 7px 10px; }
.gw-course-list .num { flex: none; min-width: 26px; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--slate-400); }
.gw-course-list a[aria-current="page"] .num { color: var(--blue-600); }
.gw-course-list .t { min-width: 0; }
.gw-course-list .is-exam a { font-weight: 700; color: var(--green-700); }
.gw-course-list .is-exam a:hover { color: var(--green-800); }

/* completion mark: an open ring that fills green with a check once passed */
.gw-course-list .st, .gw-module-list .st {
  flex: none; width: 16px; height: 16px; margin-top: 1px; border-radius: 50%;
  border: 2px solid var(--slate-300); box-sizing: border-box; position: relative;
}
[data-course-item].is-done .st { border-color: var(--green-600); background: var(--green-600); }
[data-course-item].is-done .st::after {
  content: ''; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* --- lesson meta row -------------------------------------------------------- */
.gw-lessonmeta { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.gw-lessonmeta > * {
  font-family: var(--font-ui); font-size: 12.5px; font-weight: 700; padding: 5px 11px; border-radius: var(--r-pill);
  color: var(--slate-600); background: var(--surface-2); border: 1px solid var(--slate-200); text-decoration: none;
}
.gw-lessonmeta a { color: var(--blue-700); background: var(--blue-50); border-color: var(--blue-100); }
.gw-lessonmeta a:hover { background: var(--blue-100); }
.gw-lessonmeta a:focus-visible { outline: 3px solid var(--blue-300); outline-offset: 2px; }

/* --- course home: hero ------------------------------------------------------ */
.gw-course-hero {
  margin: clamp(10px, 2vw, 22px) 0 0; padding: clamp(26px, 5vw, 52px) clamp(22px, 5vw, 56px);
  border: 1px solid var(--blue-100); border-radius: var(--r-xl);
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(11,98,134,.12), transparent 60%),
    linear-gradient(135deg, var(--blue-50), var(--surface) 75%);
}
.gw-course-hero h1 {
  font-family: var(--font-display); font-weight: 900; letter-spacing: -.03em; line-height: 1.05;
  font-size: clamp(32px, 5.4vw, 58px); color: var(--ink); margin: 4px 0 14px; max-width: 18ch;
}
.gw-course-lede { font-family: var(--font-body); font-size: clamp(17px, 2vw, 20px); line-height: 1.6; color: var(--slate-700); max-width: 62ch; margin: 0; }
.gw-course-byline { font-family: var(--font-ui); font-size: 14px; font-weight: 600; color: var(--slate-600); margin: 14px 0 0; }
.gw-course-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; }
.gw-course-chips li {
  font-family: var(--font-ui); font-size: 12.5px; font-weight: 700; color: var(--blue-700);
  background: #fff; border: 1px solid var(--blue-100); border-radius: var(--r-pill); padding: 5px 11px;
}
.gw-course-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin: 26px 0 0; }
.gw-course-cta .btn { white-space: normal; text-align: left; }
.gw-progress-lg { flex: 0 1 280px; min-width: 200px; }

/* --- course home: body (main + sticky "includes" card) ---------------------- */
.gw-course-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(24px, 4vw, 48px); align-items: start; margin: clamp(28px, 5vw, 48px) 0 0; }
@media (max-width: 900px) { .gw-course-body { grid-template-columns: 1fr; } .gw-course-aside { order: -1; } }
.gw-course-body h2 { font-family: var(--font-display); font-weight: 900; letter-spacing: -.02em; font-size: clamp(22px, 3vw, 28px); color: var(--ink); margin: 0 0 14px; }
.gw-learn { padding: clamp(20px, 3vw, 28px); border: 1px solid var(--slate-200); border-radius: var(--r-lg); background: var(--surface); }
.gw-learn-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px 24px; }
.gw-learn-list li { position: relative; padding-left: 28px; font-family: var(--font-body); font-size: var(--text-base); line-height: 1.55; color: var(--slate-700); }
.gw-learn-list li::before {
  content: ''; position: absolute; left: 4px; top: 4px; width: 6px; height: 11px;
  border: solid var(--green-600); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
.gw-curriculum { margin-top: clamp(28px, 5vw, 44px); }
.gw-curriculum-sum { font-family: var(--font-ui); font-size: 13.5px; font-weight: 600; color: var(--slate-500); margin: -6px 0 16px; }
.gw-course-aside { position: sticky; top: calc(var(--nav-h, 72px) + 16px); }
@media (max-width: 900px) { .gw-course-aside { position: static; } }
.gw-course-card { padding: 22px; border: 1px solid var(--blue-100); border-radius: var(--r-lg); background: #fff; box-shadow: 0 18px 40px -30px rgba(11,98,134,.45); }
.gw-course-card h3 { font-family: var(--font-display); font-weight: 900; font-size: 18px; color: var(--ink); margin: 0 0 12px; }
.gw-course-card ul { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.gw-course-card li { position: relative; padding-left: 26px; font-family: var(--font-ui); font-size: 14px; line-height: 1.4; color: var(--slate-700); }
.gw-course-card li::before {
  content: ''; position: absolute; left: 3px; top: 2px; width: 5px; height: 10px;
  border: solid var(--green-600); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
.gw-course-card .btn { width: 100%; justify-content: center; white-space: normal; text-align: center; box-sizing: border-box; }

/* --- curriculum modules (native <details> accordion) ------------------------ */
.gw-module { border: 1px solid var(--slate-200); border-radius: var(--r-lg); background: var(--surface); margin: 0 0 12px; overflow: hidden; scroll-margin-top: calc(var(--nav-h, 72px) + 20px); }
.gw-module > summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 4px 14px;
  padding: 16px 20px; background: var(--surface-2, #f5f8fa);
}
.gw-module > summary::-webkit-details-marker { display: none; }
.gw-module > summary::after {
  content: ''; width: 9px; height: 9px; border: solid var(--slate-500); border-width: 0 2px 2px 0;
  transform: rotate(45deg); transition: transform .2s cubic-bezier(.22,1,.36,1); margin-top: -4px;
}
.gw-module[open] > summary::after { transform: rotate(225deg); margin-top: 4px; }
.gw-module > summary:hover { background: var(--blue-50); }
.gw-module > summary:focus-visible { outline: 3px solid var(--blue-300); outline-offset: -3px; }
.gw-module-k { font-family: var(--font-ui); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--blue-700); white-space: nowrap; }
.gw-module-t { font-family: var(--font-display); font-weight: 900; font-size: 18px; letter-spacing: -.01em; color: var(--ink); }
.gw-module-m { font-family: var(--font-ui); font-size: 12.5px; font-weight: 600; color: var(--slate-500); white-space: nowrap; }
@media (max-width: 560px) {
  .gw-module > summary { grid-template-columns: 1fr auto; }
  .gw-module-k, .gw-module-m { grid-column: 1; }
  .gw-module-t { grid-column: 1; grid-row: 2; }
  .gw-module > summary::after { grid-column: 2; grid-row: 1 / span 3; }
}
.gw-module-body { padding: 14px 20px 18px; }
.gw-module-desc { font-family: var(--font-body); font-size: var(--text-base); line-height: 1.6; color: var(--slate-600); margin: 0 0 10px; }
.gw-module-lecture { display: inline-block; font-family: var(--font-ui); font-size: 13px; font-weight: 700; color: var(--brand-blue); margin: 0 0 10px; }
.gw-module-lecture:hover { color: var(--blue-700); text-decoration: underline; }
.gw-module-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--slate-200); }
.gw-module-list li { border-bottom: 1px solid var(--slate-200); }
.gw-module-list li:last-child { border-bottom: 0; }
.gw-module-list a {
  display: grid; grid-template-columns: auto minmax(44px, max-content) minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 11px 6px; font-family: var(--font-ui); font-size: 14.5px; color: var(--slate-700); text-decoration: none;
  transition: background-color .15s;
}
.gw-module-list a:hover { background: var(--blue-50); color: var(--ink); }
.gw-module-list a:focus-visible { outline: 3px solid var(--blue-300); outline-offset: -3px; }
.gw-module-list .st { margin-top: 0; }
.gw-module-list .num { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--slate-400); font-size: 13px; white-space: nowrap; }
.gw-module-list .t { font-weight: 600; color: var(--ink); }
.gw-module-list .meta { font-size: 12.5px; color: var(--slate-500); white-space: nowrap; }
.gw-module-list .is-exam .num { color: var(--green-700); text-transform: uppercase; font-size: 10.5px; letter-spacing: .06em; }
.gw-module-list .is-exam .t { color: var(--green-700); }
@media (max-width: 480px) {
  .gw-module-list a { grid-template-columns: auto minmax(38px, max-content) minmax(0, 1fr); }
  .gw-module-list .meta { grid-column: 3; }
}
@media (prefers-reduced-motion: reduce) { .gw-progress-bar span, .gw-module > summary::after { transition: none; } }

/* --- course lesson video --------------------------------------------------- */
.gw-lesson-video { margin: 20px 0 6px; max-width: var(--gw-reading); scroll-margin-top: calc(var(--nav-h, 72px) + 20px); }
.gw-video-frame {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden;
  background: #0d1b22; border: 1px solid var(--slate-200); box-shadow: 0 22px 44px -30px rgba(22,50,61,.55);
}
.gw-video-frame video, .gw-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; display: block; border: 0; background: #0d1b22; }
.gw-lesson-video figcaption { margin: 10px 2px 0; font-family: var(--font-ui); font-size: 12.5px; font-weight: 600; color: var(--slate-500); }

/* --- courses: sidebar tag + module groups ------------------------------------ */
.gw-nav-tag {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: var(--r-pill);
  font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; vertical-align: 1px;
  color: var(--green-700); background: var(--green-50, #eef6ea); border: 1px solid var(--green-200, #cfe3c5);
}
.gw-course-group > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 10px 4px 0; border-radius: var(--r-sm); }
.gw-course-group > summary::-webkit-details-marker { display: none; }
.gw-course-group > summary h4 { margin: 0; }
.gw-course-group > summary::after {
  content: ''; flex: none; width: 7px; height: 7px; border: solid var(--slate-400); border-width: 0 2px 2px 0;
  transform: rotate(45deg); margin-top: -3px; transition: transform .2s cubic-bezier(.22,1,.36,1);
}
.gw-course-group[open] > summary::after { transform: rotate(225deg); margin-top: 3px; }
.gw-course-group > summary:hover h4 { color: var(--brand-blue); }
.gw-course-group > summary:focus-visible { outline: 3px solid var(--blue-300); outline-offset: 2px; }
.gw-course-group[open] > summary { margin-bottom: 8px; }
.gw-course-group { margin-bottom: 14px; }
.gw-account { margin-top: 12px; font-family: var(--font-ui); font-size: 12.5px; line-height: 1.45; color: var(--slate-600); overflow-wrap: anywhere; }
.gw-course-account { font-family: var(--font-ui); font-size: 14px; color: var(--slate-600); margin: 14px 0 0; min-height: 1.4em; overflow-wrap: anywhere; }
.gw-link-btn {
  font: inherit; font-weight: 700; color: var(--brand-blue); background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px; transition: color .15s;
}
.gw-link-btn:hover { color: var(--blue-700); }
.gw-link-btn:focus-visible { outline: 3px solid var(--blue-300); outline-offset: 2px; border-radius: 4px; }
.gw-link-btn:active { color: var(--blue-800, #0b3d55); }
.gw-related-note { font-family: var(--font-ui); font-size: 11px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--slate-500); margin-left: 6px; }
.gw-pdf-btn { background: #fff; color: var(--ink); border: 1.5px solid var(--slate-300); }
.gw-pdf-btn:hover { border-color: var(--slate-400); transform: translateY(-2px); }
.gw-pdf-btn:active { transform: scale(.98); }
.gw-pdf-btn:focus-visible, .btn:focus-visible { outline: 3px solid var(--blue-300); outline-offset: 3px; }
.gw-coursecta { margin-top: clamp(24px, 4vw, 36px); }

/* --- courses hub --------------------------------------------------------------- */
.gw-courses-hero { margin: clamp(10px, 2vw, 22px) 0 0; padding: clamp(26px, 5vw, 52px) clamp(22px, 5vw, 56px); border: 1px solid var(--blue-100); border-radius: var(--r-xl);
  background: radial-gradient(80% 120% at 100% 0%, rgba(11,98,134,.12), transparent 60%), radial-gradient(60% 90% at 0% 100%, rgba(78,123,60,.08), transparent 60%), linear-gradient(135deg, var(--blue-50), var(--surface) 75%); }
.gw-courses-hero h1 { font-family: var(--font-display); font-weight: 900; letter-spacing: -.03em; line-height: 1.05; font-size: clamp(36px, 6vw, 64px); color: var(--ink); margin: 4px 0 14px; }
.gw-courses-list { display: grid; gap: clamp(16px, 3vw, 24px); margin: clamp(24px, 4vw, 40px) 0; }
.gw-course-panel {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(20px, 4vw, 44px); align-items: start;
  padding: clamp(22px, 4vw, 40px); border: 1px solid var(--slate-200); border-radius: var(--r-xl); background: var(--surface);
  box-shadow: 0 1px 2px rgba(22,50,61,.04), 0 22px 48px -36px rgba(11,98,134,.45);
}
@media (max-width: 860px) { .gw-course-panel { grid-template-columns: 1fr; } }
.gw-course-panel h2 { font-family: var(--font-display); font-weight: 900; letter-spacing: -.025em; line-height: 1.1; font-size: clamp(24px, 3.6vw, 36px); margin: 4px 0 12px; text-wrap: balance; }
.gw-course-panel h2 a { color: var(--ink); text-decoration: none; transition: color .15s; }
.gw-course-panel h2 a:hover { color: var(--brand-blue); }
.gw-course-panel h2 a:focus-visible { outline: 3px solid var(--blue-300); outline-offset: 3px; border-radius: 6px; }
.gw-course-panel-desc { font-family: var(--font-body); font-size: clamp(16px, 1.8vw, 18px); line-height: 1.65; color: var(--slate-700); margin: 0; max-width: 62ch; }
.gw-course-panel .gw-course-chips li { background: var(--surface-2); }
.gw-course-panel-main > .btn { margin-top: 24px; white-space: normal; }
.gw-course-panel-side { padding: 20px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--slate-200); }
.gw-course-panel-side h3 { font-family: var(--font-display); font-weight: 900; font-size: 17px; color: var(--ink); margin: 0 0 12px; }
.gw-course-panel-side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.gw-course-panel-side li { position: relative; padding-left: 26px; font-family: var(--font-ui); font-size: 14px; line-height: 1.4; color: var(--slate-700); }
.gw-course-panel-side li::before { content: ''; position: absolute; left: 3px; top: 2px; width: 5px; height: 10px; border: solid var(--green-600); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }

/* --- the gate: signed-out readers see the opening, the rest is blurred ------- */
.gw-gated { position: relative; }
.gw-gated.is-gated { overflow: hidden; overflow: clip; } /* clip: the region can never be scrolled from inside */
.gw-gate {
  position: absolute; left: -8px; right: -8px; bottom: 0; z-index: 3; pointer-events: none;
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 70px); mask-image: linear-gradient(to bottom, transparent, #000 70px);
  background: linear-gradient(to bottom, rgba(246,250,254,0) 0, rgba(246,250,254,.75) 60%, var(--bg, #f6fafe) 100%);
}
.gw-gate-panel {
  position: relative; z-index: 4; box-sizing: border-box; width: 100%; max-width: 560px; margin: -36px auto 8px;
  padding: clamp(22px, 4vw, 32px); border-radius: var(--r-xl);
  background: var(--surface); border: 1px solid var(--blue-100);
  box-shadow: 0 2px 4px rgba(22,50,61,.04), 0 30px 60px -32px rgba(11,98,134,.5);
}

/* --- sign-in form (gate panel, popup, opt-in page) ---------------------------- */
.gw-signin-h { font-family: var(--font-display); font-weight: 900; letter-spacing: -.02em; font-size: clamp(22px, 3vw, 28px); line-height: 1.15; color: var(--ink); margin: 0 0 8px; text-wrap: balance; }
.gw-signin-p { font-family: var(--font-body); font-size: 16px; line-height: 1.6; color: var(--slate-700); margin: 0 0 18px; }
.gw-signin-form { display: grid; gap: 12px; }
.gw-signin-label { font-family: var(--font-ui); font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: -6px; }
.gw-signin-input {
  width: 100%; box-sizing: border-box; font: 500 16px/1.3 var(--font-ui); color: var(--ink);
  padding: 13px 16px; border: 1.5px solid var(--slate-300); border-radius: var(--r-md); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.gw-signin-input:hover { border-color: var(--slate-400); }
.gw-signin-input:focus { outline: none; border-color: var(--brand-blue); box-shadow: 0 0 0 4px rgba(11,98,134,.15); }
.gw-signin-consent { display: flex; gap: 10px; align-items: flex-start; font-family: var(--font-ui); font-size: 13px; line-height: 1.45; color: var(--slate-600); cursor: pointer; }
.gw-signin-consent input { flex: none; width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--brand-blue); cursor: pointer; }
.gw-signin-btn { justify-content: center; width: 100%; }
.gw-signin-btn:disabled { opacity: .6; cursor: progress; transform: none; }
.gw-signin-msg { margin: 0; min-height: 1.2em; font-family: var(--font-ui); font-size: 13.5px; font-weight: 600; color: var(--slate-600); }
.gw-signin-msg:empty { display: none; }
.gw-signin-msg.is-error { color: #b42318; }
.gw-signin-fine { margin: 0; font-family: var(--font-ui); font-size: 12px; line-height: 1.5; color: var(--slate-500); }
.gw-signin-fine a { color: var(--slate-600); text-decoration: underline; }
.gw-signin-fine a:hover { color: var(--brand-blue); }
.gw-signin-sent .gw-signin-p { margin-bottom: 12px; }
.gw-signin-dev { font-family: var(--font-ui); font-size: 13px; padding: 10px 12px; border-radius: var(--r-sm); background: #fff7e6; border: 1px solid #f3d9a4; margin: 0 0 12px; }
.gw-signin-form .cf-turnstile { margin: 0 !important; min-height: 0; }

/* locked lecture video */
.is-locked .gw-video-frame video, .is-locked .gw-video-frame iframe { filter: blur(3px) brightness(.7); pointer-events: none; }
.gw-media-lock {
  position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  border: 0; background: rgba(13,27,34,.35); color: #fff; cursor: pointer;
  font-family: var(--font-ui); font-size: 15px; font-weight: 700; transition: background-color .2s;
}
.gw-media-lock:hover { background: rgba(13,27,34,.2); }
.gw-media-lock:focus-visible { outline: 3px solid #fff; outline-offset: -6px; }
.gw-media-lock-ic { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #fff; color: var(--brand-blue); font-size: 22px; padding-left: 4px; box-sizing: border-box; box-shadow: 0 12px 30px -10px rgba(0,0,0,.5); transition: transform .25s cubic-bezier(.34,1.56,.64,1); }
.gw-media-lock:hover .gw-media-lock-ic { transform: scale(1.08); }
.gw-media-lock:active .gw-media-lock-ic { transform: scale(.96); }

/* --- sign-up popup -------------------------------------------------------------- */
.gw-modal {
  width: min(480px, calc(100vw - 32px)); max-height: calc(100vh - 32px); box-sizing: border-box; overflow: auto;
  padding: clamp(24px, 4vw, 34px); border: 0; border-radius: var(--r-xl); background: var(--surface); color: var(--ink);
  box-shadow: 0 4px 10px rgba(22,50,61,.08), 0 40px 80px -30px rgba(11,40,60,.55);
}
.gw-modal[open] { animation: gw-pop .32s cubic-bezier(.34,1.56,.64,1); }
.gw-modal::backdrop { background: rgba(13,27,34,.5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.gw-modal .gw-signin-h { padding-right: 32px; }
.gw-modal-x {
  position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 0;
  font-size: 24px; line-height: 1; color: var(--slate-500); background: var(--surface-2); cursor: pointer; transition: transform .15s, color .15s;
}
.gw-modal-x:hover { color: var(--ink); transform: scale(1.06); }
.gw-modal-x:active { transform: scale(.94); }
.gw-modal-x:focus-visible { outline: 3px solid var(--blue-300); outline-offset: 2px; }
@keyframes gw-pop { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }

/* --- toast after a sign-in link ------------------------------------------------- */
.gw-toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 60; transform: translateX(-50%);
  max-width: calc(100vw - 32px); box-sizing: border-box; padding: 13px 20px; border-radius: var(--r-pill);
  font-family: var(--font-ui); font-size: 14px; font-weight: 700; color: #fff; background: var(--green-700);
  box-shadow: 0 18px 40px -16px rgba(22,50,61,.55); animation: gw-toast-in .35s cubic-bezier(.34,1.56,.64,1);
  transition: opacity .35s, transform .35s;
}
.gw-toast.is-error { background: #8a2a1c; }
.gw-toast.is-hiding { opacity: 0; transform: translate(-50%, 10px); }
@keyframes gw-toast-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translateX(-50%); } }

/* --- wiki: occasional textbook invitation ---------------------------------------- */
.gw-promo {
  position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 50;
  width: min(340px, calc(100vw - 32px)); box-sizing: border-box; padding: 22px 22px 20px;
  border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--blue-100);
  box-shadow: 0 2px 6px rgba(22,50,61,.06), 0 30px 60px -28px rgba(11,40,60,.5);
  opacity: 0; transform: translateY(16px); transition: opacity .35s cubic-bezier(.22,1,.36,1), transform .45s cubic-bezier(.34,1.56,.64,1);
}
.gw-promo.is-in { opacity: 1; transform: none; }
@media (max-width: 480px) { .gw-promo { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); } }
.gw-promo-k { margin: 0 0 6px; font-family: var(--font-ui); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--green-700); }
.gw-promo-h { margin: 0 32px 8px 0; font-family: var(--font-display); font-weight: 900; font-size: 21px; line-height: 1.15; letter-spacing: -.02em; color: var(--ink); }
.gw-promo-p { margin: 0 0 16px; font-family: var(--font-body); font-size: 14.5px; line-height: 1.55; color: var(--slate-700); }
.gw-promo-btn { width: 100%; justify-content: center; box-sizing: border-box; }
.gw-promo-x {
  position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 50%; border: 0;
  font-size: 21px; line-height: 1; color: var(--slate-500); background: var(--surface-2); cursor: pointer; transition: transform .15s, color .15s;
}
.gw-promo-x:hover { color: var(--ink); transform: scale(1.06); }
.gw-promo-x:active { transform: scale(.94); }
.gw-promo-x:focus-visible { outline: 3px solid var(--blue-300); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .gw-promo, .gw-toast, .gw-modal[open], .gw-media-lock-ic, .gw-course-group > summary::after { transition: none; animation: none; }
}
@media print { .gw-promo, .gw-modal, .gw-toast { display: none; } }

/* --- course prose from rich text (Biblical Sacrifices) ------------------------ */
.gw-prose > h3 { font-family: var(--font-display); font-weight: 900; letter-spacing: -.015em; font-size: clamp(17px, 2vw, 20px); color: var(--ink); margin: 1.6em 0 .5em; }
.gw-prose > h4 { font-family: var(--font-ui); font-weight: 800; font-size: 15.5px; color: var(--ink); margin: 1.5em 0 .45em; }
.gw-prose > h3:first-child, .gw-prose > h4:first-child { margin-top: 0; }
.gw-prose .gw-ol { max-width: var(--gw-reading); margin: 0 0 1.2em; padding-left: 1.5em; }
.gw-prose .gw-ol > li { font-family: var(--font-body); font-size: var(--text-md); line-height: 1.7; color: var(--slate-700); margin: 0 0 .7em; padding-left: .2em; }
.gw-prose .gw-ol > li::marker { color: var(--blue-600); font-family: var(--font-ui); font-weight: 800; }
.gw-prose .gw-ol .gw-ul { margin: .4em 0 0; }
.gw-reading h3 { font-family: var(--font-ui); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--slate-500); margin: 20px 0 8px; }
.gw-reading-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--slate-200); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.gw-reading-list li { padding: 12px 18px; border-bottom: 1px solid var(--slate-200); font-family: var(--font-body); font-size: 15.5px; line-height: 1.5; color: var(--slate-700); }
.gw-reading-list li:last-child { border-bottom: 0; }
.gw-reading-list a { font-weight: 600; color: var(--ink); text-decoration: underline; text-decoration-color: var(--blue-200, #b8d5e2); text-underline-offset: 3px; transition: color .15s; }
.gw-reading-list a:hover { color: var(--brand-blue); }
.gw-reading-list a:focus-visible { outline: 3px solid var(--blue-300); outline-offset: 2px; border-radius: 3px; }
.gw-reading-list span { font-family: var(--font-ui); font-size: 13px; color: var(--slate-500); }

/* --- courses hub: completion line (signed-in learners) ------------------------- */
.gw-panel-progress { margin: 20px 0 0; max-width: 460px; }
.gw-panel-progress .gw-progress-bar { height: 9px; }
.gw-panel-progress p { font-size: 12.5px; }
html:not(.bl-signed-in) .gw-panel-progress:not(.is-open) { display: none; }

/* --- "Last updated" line (beside the breadcrumbs / under the hub heroes) ----- */
.gw-crumbrow { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.gw-crumbrow .gw-crumbs { margin-bottom: 0; }
.gw-crumbrow { margin-bottom: var(--gw-crumbs-gap, 18px); }
.gw-updated { margin: 0; font-family: var(--font-ui); font-size: 12px; font-weight: 500; color: var(--slate-400); white-space: nowrap; }
.gw-updated.is-center { text-align: center; margin-top: 14px; }
.gw-courses-hero .gw-updated { margin-top: 10px; }

/* ---- Sidebar: a cue that the outline scrolls --------------------------------- */
/* The outline fades out at the bottom edge (a mask, so it works on any page
   background), with a "More" pill on top. The mask keeps a hole the exact
   shape of the pill (92×28, round ends), placed where greek-wiki.js measures
   the pill (--gw-more-x), so the pill stays solid whatever the scrollbar width. */
.gw-sidebar:not(.at-end) {
  /* layers: the fade, then a pill-shaped hole (a 64×28 middle + two 28px round ends) */
  --gw-hole-x: var(--gw-more-x, 86px);
  --gw-cap: radial-gradient(circle closest-side, #000 calc(100% - 1px), transparent);
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 84px), transparent calc(100% - 4px)), linear-gradient(#000, #000), var(--gw-cap), var(--gw-cap);
          mask-image: linear-gradient(to bottom, #000 calc(100% - 84px), transparent calc(100% - 4px)), linear-gradient(#000, #000), var(--gw-cap), var(--gw-cap);
  -webkit-mask-size: 100% 100%, 64px 28px, 28px 28px, 28px 28px;
          mask-size: 100% 100%, 64px 28px, 28px 28px, 28px 28px;
  -webkit-mask-position: 0 0, left calc(var(--gw-hole-x) + 14px) bottom 8px, left var(--gw-hole-x) bottom 8px, left calc(var(--gw-hole-x) + 64px) bottom 8px;
          mask-position: 0 0, left calc(var(--gw-hole-x) + 14px) bottom 8px, left var(--gw-hole-x) bottom 8px, left calc(var(--gw-hole-x) + 64px) bottom 8px;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
}
.gw-side-more {
  position: sticky; bottom: 0; z-index: 2; display: flex; justify-content: center; width: 100%;
  margin-top: -8px; padding: 0 0 8px;
  border: 0; background: none; cursor: pointer; transition: opacity .2s ease;
}
.gw-side-more span {
  display: inline-flex; align-items: center; justify-content: center; width: 92px; height: 28px; box-sizing: border-box;
  border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--blue-100);
  font-family: var(--font-ui); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--blue-700); transition: background-color .15s ease, transform .15s ease;
}
.gw-side-more:hover span { background: var(--blue-50); }
.gw-side-more:active span { transform: translateY(1px); }
.gw-side-more:focus-visible { outline: none; }
.gw-side-more:focus-visible span { outline: 3px solid var(--blue-300); outline-offset: 2px; }
.gw-sidebar.at-end .gw-side-more { opacity: 0; pointer-events: none; }
@media (max-width: 900px) { .gw-side-more { display: none; } }

/* ---- "Back to the lesson" after following a cross-reference -------------------- */
.gw-backlink {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 40;
  transform: translateX(-50%); display: inline-flex; align-items: stretch;
  border-radius: var(--r-pill); background: var(--brand-blue); color: #fff; max-width: calc(100vw - 32px);
  box-shadow: 0 16px 34px -14px rgba(6,41,58,.6), 0 2px 6px rgba(6,41,58,.18);
}
.gw-backlink a, .gw-backlink button {
  font-family: var(--font-ui); font-size: 15px; font-weight: 800; color: #fff; text-decoration: none;
  background: none; border: 0; cursor: pointer; border-radius: var(--r-pill);
  transition: background-color .15s ease;
}
.gw-backlink a { padding: 12px 14px 12px 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gw-backlink button { padding: 0 16px 0 12px; font-weight: 600; opacity: .85; border-left: 1px solid rgba(255,255,255,.3); border-radius: 0 var(--r-pill) var(--r-pill) 0; }
.gw-backlink a:hover, .gw-backlink button:hover { background: rgba(255,255,255,.12); }
.gw-backlink a:active, .gw-backlink button:active { background: rgba(255,255,255,.2); }
.gw-backlink a:focus-visible, .gw-backlink button:focus-visible { outline: 3px solid var(--blue-300); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .gw-backlink, .gw-side-more { transition: none; } }

/* ---- Bibliography ------------------------------------------------------------ */
.gw-bib { list-style: none; margin: 0; padding: 0; }
.gw-bib li {
  font-family: var(--font-body); font-size: var(--text-base); line-height: 1.6; color: var(--slate-700);
  padding: 12px 0 12px 1.6em; text-indent: -1.6em; border-bottom: 1px solid var(--slate-100);
  scroll-margin-top: calc(var(--nav-h) + 20px);
}
.gw-bib li:target { background: var(--blue-50); }
.gw-bib-find { font-family: var(--font-ui); font-size: 12px; font-weight: 700; color: var(--blue-700); white-space: nowrap; margin-left: 6px; text-indent: 0; }
.gw-bib-find:hover { color: var(--brand-blue); text-decoration: underline; }
.gw-bib-find:focus-visible { outline: 3px solid var(--blue-300); outline-offset: 2px; border-radius: 3px; }
a.gw-cite { color: inherit; text-decoration: underline dotted var(--blue-300); text-underline-offset: 3px; }
a.gw-cite:hover { color: var(--brand-blue); }

/* ---- New Testament references: the Greek text on hover (SBLGNT) --------------- */
.gw-verse { text-decoration-color: var(--blue-300); white-space: nowrap; }
.gw-verse::after { font-family: var(--font-greek); font-size: 15px; line-height: 1.55; max-width: min(400px, 86vw); white-space: pre-line; }
.gw-prose .gw-credit, .gw-credit { margin: 28px 0 0; font-family: var(--font-ui); font-size: 12px; line-height: 1.5; color: var(--slate-500); }
.gw-credit a { color: var(--slate-600); text-decoration: underline; }
.gw-credit a:hover { color: var(--brand-blue); }
