/* ==========================================================================
   Cineon26 Tutorial — Layout & Page Structure
   Apple Frosted Nav, Learning Hub Grid, 3-Column Doc Reader, Footer
   ========================================================================== */

/* Global Frosted Header */
.global-nav {
  position: sticky;
  top: 0;
  z-index: 90;
  height: var(--nav-h);
  background: var(--surface-glass);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-reader);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.nav-drawer-btn {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  display: grid;
  place-items: center;
}
.nav-drawer-btn:hover { background: var(--surface); }
.nav-drawer-btn[hidden] { display: none; }
@media (min-width: 901px) {
  .nav-drawer-btn { display: none; }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }

.brand-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  box-shadow: var(--shadow-xs);
}

.brand-wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
}
.brand-wordmark strong {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.brand-sub {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-tertiary);
  padding-left: 7px;
  border-left: 1px solid var(--border-strong);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-secondary);
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
  white-space: nowrap;
}
.nav-links a:hover {
  color: var(--ink);
  background: var(--surface);
  text-decoration: none;
}
.nav-links a.is-active {
  color: var(--ink);
  background: var(--surface);
  font-weight: 600;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 10px 0 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink-tertiary);
  font-size: 13px;
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}
.search-trigger:hover {
  border-color: var(--accent);
  color: var(--ink);
}
.search-placeholder {
  max-width: 196px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kbd-hint {
  height: 19px;
  font-size: 11px;
  padding: 0 5px;
  margin: 0;
  box-shadow: none;
}

.icon-pill {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-secondary);
  display: grid;
  place-items: center;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
}
.icon-pill:hover {
  background: var(--surface-hover);
  color: var(--ink);
}
.term-toggle {
  width: auto;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.term-toggle[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent);
}
[data-en-terms="off"] .en-term { display: none; }

[data-theme="light"] .icon-moon { display: block; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: block; }

.reading-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--film));
  transition: width 0.08s linear;
  pointer-events: none;
}

/* ==========================================================================
   Learning Hub Home (Capture One Structure × Apple Editorial Aesthetics)
   ========================================================================== */

.hub-wrap {
  max-width: var(--max-hub);
  margin: 0 auto;
  padding: 0 28px;
}

.hub-hero {
  padding: 76px 0 56px;
  text-align: center;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-secondary);
  margin-bottom: 22px;
}
.hero-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--film);
}

.hub-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5.2vw, 60px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.038em;
  margin: 0 auto 20px;
  max-width: 820px;
  color: var(--ink);
}

.hub-hero .hero-lead {
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.55;
  color: var(--ink-tertiary);
  max-width: 680px;
  margin: 0 auto 34px;
  font-weight: 400;
}

.hero-cta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 42px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  border: 0;
  background: var(--accent);
  color: #ffffff;
  font-size: 15px;
  font-weight: 500;
  transition: background-color 0.18s var(--ease), transform 0.15s var(--ease);
}
.btn-primary:hover {
  background: var(--accent-hover);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface-elevated);
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease), transform 0.15s var(--ease);
}
.btn-secondary:hover {
  border-color: var(--accent);
  background: var(--surface);
  text-decoration: none;
  transform: translateY(-1px);
}

/* Hub Search Bar (Apple Support style) */
.hero-search-bar {
  max-width: 620px;
  margin: 0 auto;
  position: relative;
}
.hero-search-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink-tertiary);
  font-size: 15px;
  text-align: left;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), background-color 0.18s var(--ease);
}
.hero-search-btn:hover {
  border-color: var(--accent);
  background: var(--surface-elevated);
  box-shadow: var(--shadow-sm);
}
.hero-search-btn .spacer { flex: 1; }

.hero-quick-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-muted);
}
.quick-tag {
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-secondary);
  font-size: 12px;
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.quick-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* Section Headers */
.hub-section {
  padding: 48px 0;
}
.hub-section + .hub-section {
  border-top: 1px solid var(--divider);
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.section-eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--film);
  margin-bottom: 6px;
}
.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0;
}
.section-header p {
  margin: 6px 0 0;
  font-size: 15px;
  color: var(--ink-tertiary);
  max-width: 560px;
}

/* Learning Paths Grid (Capture One style tracks) */
.paths-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.path-card {
  display: flex;
  flex-direction: column;
  padding: 24px 22px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.path-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-border);
  background: var(--surface-elevated);
  text-decoration: none;
}

.path-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 600;
}
.path-icon.blue { background: var(--accent-soft); color: var(--accent); }
.path-icon.amber { background: var(--film-soft); color: var(--film); }
.path-icon.green { background: var(--geo-green-soft); color: var(--geo-green); }
.path-icon.purple { background: rgba(175, 82, 222, 0.13); color: #af52de; }

.path-meta {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: 6px;
}
.path-card h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.path-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-tertiary);
  margin: 0 0 18px;
  flex: 1;
}
.path-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  padding-top: 14px;
  border-top: 1px solid var(--divider);
}

/* Signature Spotlight Banner — Color Cast Troubleshooting Ladder */
.spotlight-card {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 32px;
  padding: 36px;
  border-radius: var(--radius-xl);
  background: var(--studio-bg);
  color: var(--studio-ink);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
}
.spotlight-card::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(255, 181, 111, 0.16), transparent 68%);
  pointer-events: none;
}

.spotlight-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
}
.spotlight-copy .section-eyebrow { color: var(--studio-amber); }
.spotlight-copy h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.18;
  margin: 0 0 14px;
  color: #ffffff;
}
.spotlight-copy p {
  font-size: 15px;
  line-height: 1.7;
  color: #b8bcc4;
  margin: 0 0 24px;
}

.ladder-mini {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  z-index: 1;
}
.ladder-mini-step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #f3f4f6;
  text-decoration: none;
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease), transform 0.18s var(--ease);
}
.ladder-mini-step:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 181, 111, 0.45);
  transform: translateX(3px);
  text-decoration: none;
}
.ladder-num {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 50%;
  background: rgba(255, 181, 111, 0.16);
  color: var(--studio-amber);
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.ladder-mini-step strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}
.ladder-mini-step span {
  display: block;
  font-size: 12px;
  color: #9ca3af;
}
.ladder-mini-step .kbd-dark {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  box-shadow: none;
}

/* Bento Grid of Interactive Highlights */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.bento-card {
  grid-column: span 4;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.bento-card.wide { grid-column: span 6; }
.bento-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-border);
  text-decoration: none;
}
.bento-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent);
}
.bento-tag.amber { background: var(--film-soft); color: var(--film); }
.bento-tag.green { background: var(--geo-green-soft); color: var(--geo-green); }
.bento-card h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0;
}
.bento-card p {
  font-size: 14px;
  line-height: 1.62;
  color: var(--ink-tertiary);
  margin: 0;
}
.bento-preview {
  margin-top: auto;
  padding-top: 12px;
}

/* Full 5-Stage Curriculum Catalog */
.stage-block {
  margin-bottom: 34px;
}
.stage-block:last-child { margin-bottom: 0; }
.stage-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.stage-heading h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.stage-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--film);
  background: var(--film-soft);
  padding: 2px 9px;
  border-radius: var(--radius-pill);
}
.stage-desc {
  font-size: 13px;
  color: var(--ink-tertiary);
}

.lesson-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.lesson-card {
  display: flex;
  flex-direction: column;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), transform 0.18s var(--ease);
}
.lesson-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
  text-decoration: none;
}
.lesson-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--ink-muted);
}
.lesson-card h4 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.38;
  margin: 0 0 6px;
  letter-spacing: -0.015em;
}
.lesson-card p {
  font-size: 13.5px;
  line-height: 1.58;
  color: var(--ink-tertiary);
  margin: 0 0 12px;
  flex: 1;
}
.lesson-card-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.mini-pill {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink-tertiary);
  border: 1px solid var(--divider);
}
.mini-pill.interactive {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent-border);
  font-weight: 500;
}
.done-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--success);
}

/* ==========================================================================
   3-Column Apple Documentation / Lesson Reader Layout
   ========================================================================== */

.reader-shell {
  max-width: var(--max-reader);
  margin: 0 auto;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--toc-w);
  gap: 32px;
  padding: 0 24px;
  align-items: start;
}

/* Left Curriculum Sidebar */
.reader-sidebar {
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  padding: 24px 12px 48px 0;
  border-right: 1px solid var(--divider);
  scrollbar-width: thin;
}

.sidebar-progress {
  margin-bottom: 20px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}
.sidebar-progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-secondary);
  margin-bottom: 8px;
}
.progress-track {
  height: 5px;
  border-radius: 99px;
  background: var(--border-strong);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--geo-green));
  border-radius: 99px;
  transition: width 0.3s var(--ease);
}

.sidebar-group {
  margin-bottom: 18px;
}
.sidebar-group-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 4px 10px 6px;
}

.sidebar-link {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 9px;
  font-size: 13.5px;
  line-height: 1.42;
  color: var(--ink-secondary);
  text-decoration: none;
  transition: background-color 0.14s var(--ease), color 0.14s var(--ease);
}
.sidebar-link:hover {
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}
.sidebar-link.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.sidebar-check {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin-top: 2px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  display: grid;
  place-items: center;
  font-size: 10px;
  color: transparent;
}
.sidebar-link.is-done .sidebar-check {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}
.sidebar-link.is-active .sidebar-check {
  border-color: var(--accent);
}

/* Center Editorial Article */
.reader-article {
  min-width: 0;
  max-width: 780px;
  width: 100%;
  margin: 0 auto;
  padding: 36px 0 80px;
}

.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-muted);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.article-breadcrumb a { color: var(--ink-tertiary); }
.article-breadcrumb a:hover { color: var(--accent); }

.article-header {
  padding-bottom: 26px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--divider);
}
.article-header h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 700;
  letter-spacing: -0.032em;
  line-height: 1.18;
  margin: 0 0 14px;
}
.article-lead {
  font-size: 17.5px;
  line-height: 1.65;
  color: var(--ink-tertiary);
  margin: 0 0 18px;
}
.article-meta-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--ink-tertiary);
}
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
}

/* Article Prose Typography */
.prose h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.28;
  margin: 44px 0 16px;
  padding-top: 24px;
  border-top: 1px solid var(--divider);
}
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

.prose h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.38;
  margin: 28px 0 10px;
}
.prose p { margin: 0 0 16px; color: var(--ink); }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose li > strong { color: var(--ink); }

.en-term {
  font-size: 0.88em;
  color: var(--ink-tertiary);
  font-weight: 400;
}

/* Right Sticky TOC */
.reader-toc {
  position: sticky;
  top: calc(var(--nav-h) + 28px);
  max-height: calc(100vh - var(--nav-h) - 56px);
  overflow-y: auto;
  padding-left: 16px;
  border-left: 1px solid var(--divider);
}
.toc-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 10px;
}
.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.toc-list li { margin-bottom: 4px; }
.toc-list a {
  display: block;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-tertiary);
  text-decoration: none;
  transition: color 0.14s var(--ease), background-color 0.14s var(--ease);
}
.toc-list a:hover { color: var(--ink); background: var(--surface); }
.toc-list a.is-active {
  color: var(--accent);
  font-weight: 600;
  background: var(--accent-soft);
}

.toc-shortcuts-box {
  margin-top: 22px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}
.toc-shortcuts-box h4 {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 650;
  color: var(--ink-secondary);
}
.toc-shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-tertiary);
  padding: 4px 0;
}

/* Lesson Completion + Prev / Next Footer */
.lesson-end-bar {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.complete-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}
.complete-row p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-secondary);
}
.complete-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface-elevated);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  transition: all 0.16s var(--ease);
}
.complete-btn:hover { border-color: var(--success); color: var(--success); }
.complete-btn.is-done {
  background: var(--success);
  border-color: var(--success);
  color: #ffffff;
}

.prev-next-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.pn-card {
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
.pn-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}
.pn-card.next { text-align: right; }
.pn-label {
  font-size: 12px;
  color: var(--ink-muted);
  margin-bottom: 4px;
}
.pn-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
}

/* Global Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 48px 0 40px;
  font-size: 13px;
  color: var(--ink-tertiary);
}
.footer-inner {
  max-width: var(--max-hub);
  margin: 0 auto;
  padding: 0 28px;
}
.footer-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 24px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--divider);
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 14px;
}
.footer-meta { margin: 0; font-size: 12.5px; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}
.footer-grid h4 {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--ink);
  margin: 0 0 12px;
}
.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--ink-tertiary); }
.footer-grid a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--divider);
  font-size: 12px;
  color: var(--ink-muted);
}

/* Mobile Drawer Backdrop */
.drawer-backdrop {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  z-index: 84;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
}
.drawer-backdrop[hidden] { display: none; }

/* Responsive Breakpoints */
@media (max-width: 1120px) {
  .reader-shell {
    grid-template-columns: 248px minmax(0, 1fr);
  }
  .reader-toc { display: none; }
  .paths-grid { grid-template-columns: repeat(2, 1fr); }
  .lesson-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .search-placeholder { display: none; }
  .spotlight-card { grid-template-columns: 1fr; padding: 26px; }
  .bento-card, .bento-card.wide { grid-column: span 12; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }

  .reader-shell {
    grid-template-columns: 1fr;
    padding: 0 20px;
  }
  .reader-sidebar {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    bottom: 0;
    width: min(310px, 86vw);
    z-index: 85;
    background: var(--bg);
    padding: 20px 16px 48px;
    border-right: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transform: translateX(-105%);
    transition: transform 0.24s var(--ease);
  }
  .reader-sidebar.is-open { transform: translateX(0); }
}

@media (max-width: 640px) {
  .nav-inner { padding: 0 14px; }
  .hub-wrap { padding: 0 18px; }
  .hub-hero { padding: 48px 0 36px; }
  .paths-grid { grid-template-columns: 1fr; }
  .lesson-cards { grid-template-columns: 1fr; }
  .prev-next-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .brand-sub { display: none; }
}
