/* ============================================================
   Arcis Academy. Anthropic Academy look & feel
   Cream paper, serif display, color-block panels, dark footer
   ============================================================ */

:root {
  /* Arcis canvas family. from documents/arcis-brand.md */
  --bg: #e4e5e0;
  --bg-elev: #ebece7;
  --bg-card: #f2f3f0;
  --bg-warm: #dadbd5;
  --paper: #fafaf7;
  --ink: #141413;
  --ink-soft: #2e2e2c;
  --ink-mute: #6b6962;
  --ink-faint: #97938a;
  --line: #c8cac4;
  --line-strong: #b8bab3;

  /* Arcis emerald primary */
  --accent: #00996D;
  --accent-ink: #007a57;
  --accent-soft: rgba(0, 153, 109, 0.12);
  --accent-lime: #68D970;

  --panel-green:    #c9d8c3;
  --panel-lavender: #c8c4dc;
  --panel-blue:     #7aa3d1;
  --panel-blue-ink: #1e2a3a;

  --footer-bg: #141413;
  --footer-ink: #d8d6cf;
  --footer-mute: #8e8b84;

  --success: #00996D;

  --serif: "Newsreader", "Source Serif 4", "Tiempos Headline", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", "Menlo", Consolas, monospace;

  --container: 1440px;
  --container-narrow: 960px;
  --radius: 10px;
  --radius-lg: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: clip; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
a:hover { color: inherit; }
/* No focus rings on the dark pill or its inner controls (we restore them on form inputs only). */
button:focus, button:focus-visible { outline: 0; }

/* ----- Typography ----- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-variation-settings: "opsz" 32;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(56px, 9vw, 112px); line-height: 1.0; letter-spacing: -0.035em; }
h2 { font-size: clamp(36px, 4.4vw, 56px); line-height: 1.05; letter-spacing: -0.025em; }
h3 { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.2; }
h4 { font-size: 20px; line-height: 1.3; }

p { margin: 0 0 1em; color: var(--ink-soft); }

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-mute);
}

.lead {
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 660px;
}

/* ----- Layout ----- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 64px; }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 64px; }
@media (max-width: 900px) {
  .container, .container-narrow { padding: 0 28px; }
}
section { padding: 32px 0; }
@media (max-width: 720px) { section { padding: 24px 0; } }

/* ============================================================
   Top navigation. Anthropic-style wordmark + dropdowns
   ============================================================ */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(228, 229, 224, 0.92);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid transparent;
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 56px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
@media (max-width: 900px) { .nav-inner { padding: 16px 24px; } }
.nav .brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 14px;
  color: var(--ink);
  text-transform: uppercase;
}
.nav .brand:hover { color: var(--ink); }
/* Plain ink A logomark on transparent canvas. No brand-color fill. */
.brand-mark.svg-a {
  width: 22px; height: 22px;
  display: inline-block;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%23141413' d='M5 20 L11.2 5 h1.6 L19 20 h-2.6 l-1.55-4.3 h-3.7 L9.6 20 Z m5.05-6.5 h2.9 L11.5 8.8 Z'/></svg>");
  background-repeat: no-repeat;
  background-size: contain;
}
.wordmark {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 14px;
  color: var(--ink);
}
.wordmark .slash { color: var(--ink); margin: 0 1px; font-weight: 700; }

.nav-links {
  display: flex; gap: 44px; align-items: center;
  position: relative;
}
.nav-links > a, .nav-links > .has-menu > button {
  background: none; border: 0; padding: 0;
  font-family: var(--sans);
  font-size: 15px; font-weight: 400;
  color: var(--ink);
  cursor: pointer;
  line-height: 1;
}
.nav-links > a:hover, .nav-links > .has-menu > button:hover { color: var(--ink); opacity: 0.65; }
.nav-links .caret {
  display: inline-block;
  margin-left: 6px;
  width: 12px;
  height: 12px;
  font-size: 0;
  vertical-align: middle;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23141413' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='2 4.5 6 8.5 10 4.5'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
.nav-links .has-menu > button {
  display: inline-flex; align-items: center;
}

/* Dropdown */
.has-menu { position: relative; }
/* Invisible hover bridge between trigger and menu so cursor can cross the gap */
.has-menu::after {
  content: "";
  position: absolute;
  left: -8px; right: -8px;
  top: 100%; height: 18px;
  display: none;
}
.has-menu:hover::after,
.has-menu[data-open="true"]::after { display: block; }

.menu-panel {
  position: absolute;
  top: 100%;
  margin-top: 14px;
  left: 50%; transform: translateX(-50%);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 16px 18px;
  min-width: 240px;
  box-shadow: 0 22px 60px -28px rgba(0, 0, 0, 0.18);
  z-index: 60;
}
.menu-panel .menu-group-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ink-mute); font-weight: 600;
  margin: 0 0 8px;
}
.menu-panel .menu-group + .menu-group { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.menu-panel a {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 6px 4px;
  font-size: 14px; color: var(--ink);
}
.menu-panel a:hover { color: var(--accent-ink); }
.menu-panel a .ext { font-size: 11px; color: var(--ink-faint); }

/* Try-button (right) */
.btn, .btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-size: 14px; font-weight: 500;
  border-radius: 10px; cursor: pointer; transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  padding: 8px 16px;
  border: 1px solid transparent;
  text-decoration: none;
}
.btn { background: var(--ink); color: var(--bg); }
.btn:hover { background: #2a2a28; color: var(--bg); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--bg-elev); }
.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { background: var(--accent-ink); color: white; }
.btn-lg { padding: 12px 22px; font-size: 15px; }
.btn-sm { padding: 6px 14px; font-size: 13px; }

/* Try-Arcis button — single rounded rectangle with internal divider
   between the main label and the chevron dropdown trigger. */
.try-pill {
  display: inline-flex; align-items: stretch;
  background-color: var(--ink) !important;
  color: #FAF9F5;
  border-radius: 10px;
  font-family: var(--sans); font-size: 14px; font-weight: 500;
  position: relative;
  line-height: 1;
  transition: background-color 0.12s ease;
  box-shadow: none;
}
.try-pill:hover { background-color: #2a2a28 !important; }
.try-pill > a,
.try-pill > button {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  color: #FAF9F5 !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  border-radius: 0;
  cursor: pointer;
  font: inherit;
  line-height: 1;
  appearance: none;
  -webkit-appearance: none;
}
.try-pill > a:hover,
.try-pill > a:focus,
.try-pill > a:focus-visible,
.try-pill > button:hover,
.try-pill > button:focus,
.try-pill > button:focus-visible,
.try-pill > button:active {
  background: transparent !important;
  background-color: transparent !important;
  color: #FAF9F5 !important;
  outline: 0 !important;
  box-shadow: none !important;
}
.nav-links .try-pill > a {
  display: inline-flex; align-items: center;
  padding: 11px 18px;
  text-decoration: none;
}
.try-pill > .sep {
  display: block;
  width: 1px;
  background: rgba(255, 255, 255, 0.28);
  flex: 0 0 1px;
  align-self: stretch;
  margin: 0;
}
.nav-links .try-pill > button {
  padding: 11px 14px;
  display: inline-flex; align-items: center; justify-content: center;
}
.try-pill > button svg { width: 10px; height: 10px; color: #FAF9F5; stroke: currentColor; }

.try-pill .menu-panel {
  top: 100%; right: 0; left: auto; transform: none;
  min-width: 260px;
  margin-top: 8px;
}
/* Open the install menu when hovering anywhere on the pill (matches the
   anthropic.com behaviour). Alpine still controls the click-toggle state,
   and !important is needed to beat x-show's inline display:none. */
.try-pill:hover .menu-panel,
.try-pill:focus-within .menu-panel {
  display: block !important;
}

@media (max-width: 820px) {
  .nav-links { display: none; }
}

/* ============================================================
   Landing. Anthropic Academy hero
   ============================================================ */

.hero-academy {
  text-align: center;
  padding: 80px 0 16px;
}
.hero-academy h1 {
  font-size: clamp(64px, 10vw, 132px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  margin: 0 auto;
  max-width: 14ch;
  font-weight: 400;
}
.hero-academy .lead {
  margin: 36px auto 0;
  text-align: center;
  font-size: clamp(18px, 1.6vw, 22px);
  max-width: 620px;
  color: var(--ink-soft);
}

/* ----- Featured / panel rows ----- */
.panel-stack { display: flex; flex-direction: column; gap: 28px; padding: 24px 0 24px; }
.panel {
  border-radius: 18px;
  padding: 56px 64px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
  min-height: 320px;
}
@media (max-width: 820px) {
  .panel { grid-template-columns: 1fr; padding: 36px 28px; min-height: 0; }
}
.panel h2 { font-size: clamp(36px, 3.6vw, 52px); margin: 0 0 16px; line-height: 1.0; letter-spacing: -0.025em; font-weight: 400; }
.panel p { color: var(--ink-soft); font-size: 17px; max-width: 44ch; margin: 0 0 28px; line-height: 1.5; }
.panel .panel-cta { display: inline-flex; align-items: center; }
.panel .pill-link {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 14px; font-weight: 500; color: var(--ink);
}
.panel .pill-link:hover { background: var(--paper); }

.panel-featured { background: #e2d6c1; }
.panel-featured .panel-right {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.feature-card {
  background: #d6c8af;
  border-radius: 14px;
  padding: 24px 26px 24px;
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 200px;
  border: 1px solid transparent;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
  color: var(--ink);
}
.feature-card:hover { background: #c8b894; transform: translateY(-1px); }
.feature-card .fc-eyebrow { font-size: 12px; color: var(--ink-mute); text-transform: none; letter-spacing: 0; font-weight: 400; }
.feature-card .fc-title {
  font-family: var(--serif);
  font-size: 28px; line-height: 1.1;
  letter-spacing: -0.015em;
  font-weight: 400;
  margin: 10px 0 0;
  color: var(--ink);
}
.feature-card .fc-arrow {
  margin-top: 24px;
  font-size: 22px; color: var(--ink);
}

.panel-green    { background: var(--panel-green); }
.panel-lavender { background: var(--panel-lavender); }
.panel-blue     { background: var(--panel-blue); }
.panel-blue h2, .panel-blue p { color: var(--panel-blue-ink); }
.panel-blue .pill-link { background: rgba(255,255,255,0.85); border-color: rgba(0,0,0,0.06); color: var(--panel-blue-ink); }

.panel .panel-illus {
  display: grid; place-items: center;
  min-height: 160px;
  font-size: 80px;
  color: var(--ink);
  line-height: 1;
}
.panel-blue .panel-illus { color: white; }
.panel .panel-illus svg { width: 200px; height: auto; }

/* ----- Catalog grid below panels ----- */
.catalog-head {
  display: flex; justify-content: space-between; align-items: end;
  gap: 24px; margin: 56px 0 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}
.catalog-head h2 { margin: 0; font-size: 32px; }

/* Single-row catalog controls: search + dropdown filters + clear */
.catalog-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
}
.catalog-search {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px 0 40px;
  flex: 1 1 320px;
  min-width: 240px;
  max-width: 480px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.catalog-search:focus-within {
  border-color: var(--ink);
  background: var(--paper);
}
.catalog-search .search-icon {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 15px; height: 15px;
  color: var(--ink-mute);
}
.catalog-search .search-input {
  flex: 1;
  border: 0; outline: 0;
  background: transparent;
  padding: 9px 4px;
  font: inherit; font-size: 14px;
  color: var(--ink);
  font-family: var(--sans);
  min-width: 0;
}
.catalog-search .search-input::placeholder { color: var(--ink-mute); }
.catalog-search .search-input::-webkit-search-cancel-button { display: none; }

.filter-dd { position: relative; }
.filter-dd-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  font: inherit;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.filter-dd-trigger:hover { border-color: var(--ink-soft); }
.filter-dd-trigger.has-value { border-color: var(--ink); background: var(--paper); }
.filter-dd-trigger .filter-dd-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  font-weight: 600;
}
.filter-dd-trigger .filter-dd-value { font-weight: 500; color: var(--ink); }
.filter-dd-trigger .filter-dd-caret { width: 10px; height: 10px; color: var(--ink-mute); }

.filter-dd-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 40;
  min-width: 220px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 22px 60px -28px rgba(0, 0, 0, 0.22);
}
.filter-dd-item {
  display: block; width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 8px 10px;
  font: inherit;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-soft);
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.12s ease, color 0.12s ease;
}
.filter-dd-item:hover { background: var(--bg-warm); color: var(--ink); }
.filter-dd-item.is-active { background: var(--ink); color: var(--bg); font-weight: 500; }

.filter-clear {
  background: transparent; border: 0;
  color: var(--ink-mute);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: color 0.12s ease, background 0.12s ease;
}
.filter-clear:hover { color: var(--ink); background: var(--bg-elev); }

.filter-bar {
  display: flex; gap: 6px; flex-wrap: wrap;
  align-items: center;
  margin: 0 0 10px;
}
.filter-bar:last-of-type { margin-bottom: 24px; }
.filter-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  font-weight: 600;
  margin-right: 8px;
  min-width: 52px;
}
.filter-pill {
  background: transparent; border: 1px solid var(--line);
  border-radius: 8px; padding: 5px 11px;
  font-size: 12.5px; font-weight: 500; color: var(--ink-mute);
  cursor: pointer; transition: all 0.12s ease;
}
.filter-pill:hover { border-color: var(--ink-soft); color: var(--ink); }
.filter-pill.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}
.course-card {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 26px 26px 22px;
  display: flex; flex-direction: column; gap: 12px;
  min-height: 240px;
  transition: transform 0.15s ease, background 0.15s ease;
  color: var(--ink);
  position: relative;
}
.course-card:hover { transform: translateY(-2px); background: var(--panel-green); color: var(--ink); }
.course-card:hover .card-arrow { transform: translateX(2px); }
.course-card .card-head { display: flex; justify-content: space-between; align-items: center; }
.course-card .fc-eyebrow { font-size: 11px; color: var(--ink-mute); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }
.course-card h3 {
  margin: 0; font-size: 24px; line-height: 1.15;
  font-family: var(--serif);
}
.course-card .card-desc { color: var(--ink-soft); font-size: 14px; line-height: 1.5; margin: 0; }
.course-card .meta {
  margin-top: auto;
  display: flex; gap: 8px; flex-wrap: wrap;
  font-size: 12px;
}
.course-card .card-arrow {
  position: absolute; right: 22px; bottom: 18px;
  font-size: 18px; color: var(--ink);
  transition: transform 0.15s ease;
}
.chip {
  display: inline-block;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 3px 10px;
  font-size: 12px;
  color: var(--ink-mute);
  background: rgba(255,255,255,0.55);
}
.chip-accent { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent-ink); }

/* ----- Learning paths ----- */
.paths {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}
.path-card {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 28px;
  display: flex; flex-direction: column; gap: 14px;
  min-height: 240px;
  transition: transform 0.15s ease;
  color: var(--ink);
}
.path-card:hover { transform: translateY(-2px); color: var(--ink); }
.path-card .path-illus {
  width: 56px; height: 56px;
  background: var(--bg);
  border-radius: 14px;
  display: grid; place-items: center;
  font-size: 26px;
  border: 1px solid var(--line);
}
.page-title {
  font-size: clamp(44px, 5.5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 6px 0 18px;
}
.breadcrumb-text {
  font-size: 13px; color: var(--ink-mute);
  margin: 0 0 0;
}
.breadcrumb-text a { color: var(--ink-mute); }
.breadcrumb-text a:hover { color: var(--ink); }
.path-card h3 { font-size: 23px; margin: 0; }
.path-card p { font-size: 14px; color: var(--ink-soft); margin: 0; }
.path-card .path-meta {
  margin-top: auto;
  font-size: 12px; color: var(--ink-mute);
}

/* ============================================================
   Newsletter row
   ============================================================ */

.newsletter {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 32px;
  margin: 56px 0 64px;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 36px;
  align-items: center;
}
@media (max-width: 820px) { .newsletter { grid-template-columns: 1fr; } }
.newsletter h2 { font-size: 28px; margin: 0 0 10px; }
.newsletter p { font-size: 14px; margin: 0; color: var(--ink-soft); }
.newsletter-form {
  display: flex; align-items: center;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 6px 6px 6px 18px;
  width: 100%;
  max-width: 460px;
}
.newsletter-form input {
  flex: 1; border: 0; outline: 0;
  background: transparent; font-size: 14px; color: var(--ink);
  font-family: var(--sans);
}
.newsletter-form input::placeholder { color: var(--ink-mute); }
.newsletter-form button {
  border: 0; cursor: pointer;
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--ink); color: var(--bg);
  display: grid; place-items: center;
  font-size: 14px;
}
.newsletter-form button:hover { background: #2a2a28; }
.newsletter .disclaim { color: var(--ink-mute); font-size: 12px; margin-top: 10px; max-width: 420px; }

/* ============================================================
   Footer. dark Anthropic-style mega grid
   ============================================================ */

footer {
  background: var(--footer-bg);
  color: var(--footer-ink);
  padding: 56px 0 28px;
  margin-top: 0;
}
footer a { color: var(--footer-ink); }
footer a:hover { color: white; }

.footer-inner { max-width: var(--container); margin: 0 auto; padding: 0 32px; }
.footer-top { display: grid; grid-template-columns: 1fr 4fr; gap: 48px; }
@media (max-width: 900px) { .footer-top { grid-template-columns: 1fr; } }
.footer-brand .brand-mark.svg-a {
  /* On dark footer the A is cream, no brand fill */
  background-color: transparent;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%23FAF9F5' d='M5 20 L11.2 5 h1.6 L19 20 h-2.6 l-1.55-4.3 h-3.7 L9.6 20 Z m5.05-6.5 h2.9 L11.5 8.8 Z'/></svg>");
  width: 28px; height: 28px;
  border-radius: 0;
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
@media (max-width: 900px) { .footer-cols { grid-template-columns: 1fr 1fr; } }
.footer-col h5 {
  font-family: var(--sans);
  font-size: 13px; font-weight: 600;
  color: white;
  margin: 0 0 14px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 13px; color: var(--footer-ink); }
.footer-col .col-subhead {
  margin-top: 22px;
  font-size: 13px; font-weight: 600; color: white;
  margin-bottom: 10px;
}
.footer-bottom {
  margin-top: 48px; padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; justify-content: space-between; flex-wrap: wrap;
  gap: 12px;
  font-size: 12px; color: var(--footer-mute);
}
.footer-socials { display: flex; gap: 14px; }
.footer-socials a { color: var(--footer-mute); font-size: 14px; }

/* ============================================================
   Course detail. "Claude 101" style
   ============================================================ */

.course-detail { padding: 40px 0 64px; }
.course-detail .container, .course-detail .container-narrow { max-width: 1440px; }
.course-detail .breadcrumb {
  font-size: 13px; color: var(--ink-mute);
  margin-bottom: 14px;
}
.course-detail .breadcrumb a { color: var(--ink-mute); }
.course-detail .breadcrumb a:hover { color: var(--ink); }

.course-detail-head {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 64px;
  align-items: start;
  padding: 32px 0 40px;
  position: relative;
}
.course-detail-head::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 1px;
  background: var(--line);
}
@media (max-width: 900px) { .course-detail-head { grid-template-columns: 1fr; padding: 32px 0 56px; } }

.course-detail-head h1 {
  font-size: clamp(56px, 7vw, 96px);
  letter-spacing: -0.035em;
  margin: 0;
  line-height: 1.0;
}
.course-detail-head .lead { margin-top: 24px; max-width: 38ch; }

.course-progress-card {
  display: flex; flex-direction: column; align-items: flex-end; gap: 14px;
}
.course-progress-card .course-mascot {
  width: 56px; height: 56px;
  color: var(--ink);
  display: grid; place-items: center;
}
.course-progress-card .course-mascot svg { width: 56px; height: 56px; }
.course-progress-card .progress-text {
  font-size: 13px; color: var(--ink-mute);
}
.course-progress-card .progress {
  width: 260px;
  height: 6px; background: var(--line); border-radius: 10px; overflow: hidden;
}
.course-progress-card .progress-fill { height: 100%; background: var(--ink); border-radius: 10px; transition: width 0.3s ease; }
.course-progress-card .progress-actions { display: flex; gap: 8px; }
.course-progress-card .bookmark-btn {
  width: 38px; height: 38px; display: grid; place-items: center;
  background: var(--bg);
  border: 1px solid var(--accent);
  color: var(--accent-ink);
  border-radius: 8px; cursor: pointer;
}
.course-progress-card .bookmark-btn:hover { background: var(--accent-soft); }
.course-progress-card .resume-btn {
  background: var(--ink); color: var(--bg);
  border-radius: 10px; padding: 9px 22px; font-size: 14px; font-weight: 500;
}
.course-progress-card .resume-btn:hover { background: #2a2a28; color: var(--bg); }

/* tabs */
.course-tabs {
  margin-top: 44px;
  border-bottom: 1px solid var(--line);
  display: flex; gap: 4px;
}
.course-tab {
  padding: 10px 18px;
  font-size: 14px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: var(--ink-mute);
  cursor: pointer;
  margin-bottom: -1px;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.course-tab:hover { color: var(--ink); }
.course-tab.is-active {
  background: var(--bg);
  border-color: var(--line);
  border-bottom: 1px solid var(--bg);
  color: var(--ink);
  font-weight: 500;
}

/* About-this-course tab content */
.about-course {
  margin-top: 36px;
}
.about-course h3 {
  font-size: 24px;
  margin: 0 0 12px;
}
.about-course p {
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.6;
  max-width: 60ch;
  margin: 0;
}
.course-meta {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  max-width: 720px;
}
.course-meta li {
  display: flex; flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.course-meta li span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  font-weight: 600;
}
.course-meta li strong {
  font-size: 18px;
  color: var(--ink);
  font-weight: 500;
}

/* Curriculum accordion */
.curriculum {
  margin-top: 36px;
}
.curriculum h3 {
  font-size: 24px;
  margin: 0 0 6px;
}
.curriculum .curriculum-sub {
  font-size: 13px; color: var(--ink-mute); margin: 0 0 16px;
}
.module {
  border-top: 1px solid var(--line);
  padding: 0;
}
.module:first-child { border-top: 1px solid var(--line); }
.module-header {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; user-select: none;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  padding: 14px 0;
  color: var(--ink);
}
.module-header .chev {
  display: inline-block;
  transition: transform 0.2s ease;
  color: var(--ink-mute); font-size: 10px;
  width: 14px;
}
.module-header[aria-expanded="true"] .chev { transform: rotate(90deg); }
.lesson-list { list-style: none; padding: 0 0 12px; margin: 0; }
.lesson-list li {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 0 10px 30px;
  border-top: 1px solid var(--line);
  font-size: 14px; color: var(--ink-soft);
}
.lesson-list li a { flex: 1; color: var(--ink-soft); }
.lesson-list li a:hover { color: var(--ink); }
.lesson-list .lesson-dot {
  width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px solid var(--ink-mute);
  background: transparent;
  flex-shrink: 0;
  display: grid; place-items: center;
}
.lesson-list .lesson-dot.done {
  background: var(--ink); border-color: var(--ink);
  color: white;
  font-size: 10px; font-weight: 700;
}
.lesson-list .lesson-dot.done::before { content: "✓"; }
.lesson-list .lesson-minutes { font-size: 12px; color: var(--ink-mute); }

/* Outcomes block (kept compact, used inside lessons too) */
.outcomes { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 10px; }
.outcomes li {
  position: relative; padding-left: 24px;
  color: var(--ink-soft); line-height: 1.55;
}
.outcomes li::before {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 10px; height: 10px;
  background: var(--accent);
  border-radius: 50%;
}

/* Data and Privacy FAQ */
.faq { margin-top: 80px; }
.faq h2 {
  font-size: 36px;
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0 0 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 28px 0;
}
.faq-q {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; cursor: pointer; user-select: none;
  font-size: 17px; color: var(--ink);
  font-weight: 400;
}
.faq-q .sign { font-size: 22px; color: var(--ink); font-weight: 300; line-height: 1; }
.faq-a { font-size: 14px; color: var(--ink-soft); padding: 16px 0 0 0; line-height: 1.6; }

/* ============================================================
   Lesson reader. Academy two-column
   ============================================================ */

.lesson-topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.lesson-topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
}
.lesson-topbar .back-arrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--sans); font-weight: 700; letter-spacing: 0.06em;
  font-size: 13px; color: var(--ink);
  text-transform: uppercase;
}
.lesson-topbar .back-arrow svg { width: 16px; height: 16px; }
.lesson-topbar .top-right {
  display: flex; gap: 24px; align-items: center;
  font-size: 14px;
}
.lesson-topbar .top-right a { color: var(--ink); }
.lesson-topbar .top-right .avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--line-strong);
  display: inline-grid; place-items: center;
  font-size: 13px; color: var(--ink-soft);
}

.lesson-shell {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: calc(100vh - 60px);
}
@media (max-width: 1000px) { .lesson-shell { grid-template-columns: 1fr; } }

.lesson-sidebar {
  background: var(--bg);
  border-right: 1px solid var(--line);
  padding: 36px 28px 48px;
  overflow-y: auto;
  max-height: calc(100vh - 60px);
  position: sticky; top: 60px;
}
@media (max-width: 1000px) { .lesson-sidebar { position: static; max-height: none; border-right: 0; border-bottom: 1px solid var(--line); } }
.lesson-sidebar h2 {
  font-family: var(--serif);
  font-size: 30px; line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  font-weight: 400;
}
.lesson-sidebar .sidebar-link {
  display: inline-block;
  font-size: 14px; color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 1px;
  margin-bottom: 32px;
}
.lesson-sidebar .sidebar-link:hover { color: var(--ink-mute); border-bottom-color: var(--ink-mute); }

.lesson-sidebar .module-title {
  font-family: var(--sans);
  font-size: 14px; font-weight: 500;
  color: var(--ink);
  margin: 28px 0 8px;
}
.lesson-sidebar a.lesson-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 8px; border-radius: 6px;
  font-size: 14px; color: var(--ink-soft);
  line-height: 1.4;
  transition: color 0.12s ease, background 0.12s ease;
}
.lesson-sidebar a.lesson-link:hover { color: var(--ink); background: var(--bg-warm); }
.lesson-sidebar a.lesson-link.is-current { color: var(--ink); font-weight: 600; background: var(--bg-warm); }
.lesson-sidebar a.lesson-link.is-current .lesson-link-title { border-bottom: 0; }
.lesson-sidebar .lesson-dot {
  width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px solid var(--ink-mute);
  background: transparent;
  flex-shrink: 0;
  display: grid; place-items: center;
}
.lesson-sidebar .lesson-dot.done { background: var(--ink); border-color: var(--ink); color: white; }
.lesson-sidebar .lesson-dot.done::before { content: "✓"; font-size: 10px; font-weight: 700; }

.lesson-main {
  padding: 56px 56px 96px;
  max-width: 1120px;
  margin: 0 auto;
  width: 100%;
}
@media (max-width: 720px) { .lesson-main { padding: 32px 22px 80px; } }

.lesson-main h1 {
  font-size: clamp(32px, 3.2vw, 40px);
  margin: 0 0 24px;
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.lesson-main .lesson-meta {
  font-size: 15px; color: var(--ink-mute);
  margin: 0 0 36px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
  font-style: normal;
}

/* Prose */
.prose { color: var(--ink-soft); font-size: 17.5px; line-height: 1.7; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: 26px; margin: 1.4em 0 0.4em; font-family: var(--serif); }
.prose h3 { font-size: 21px; margin: 1.2em 0 0.4em; font-family: var(--sans); font-weight: 600; }
.prose h4 { font-size: 17px; margin: 1.1em 0 0.3em; color: var(--ink); }
.prose p { margin: 0 0 0.9em; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose em { color: var(--ink); }
.prose code {
  font-family: var(--mono); font-size: 0.9em;
  background: var(--bg-elev); border: 1px solid var(--line);
  padding: 1px 6px; border-radius: 5px;
}
.prose pre {
  background: #1f1e1c; color: #f4ede0;
  border-radius: 10px; padding: 18px 22px;
  overflow-x: auto; font-family: var(--mono); font-size: 13.5px; line-height: 1.6;
  margin: 20px 0;
}
.prose pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.prose blockquote {
  border-left: 3px solid var(--accent);
  margin: 22px 0; padding: 6px 0 6px 18px;
  color: var(--ink-soft); font-style: italic;
}
.prose ul, .prose ol { padding-left: 22px; margin: 0.8em 0; }
.prose li { margin: 4px 0; }
.prose table {
  width: 100%; border-collapse: collapse; margin: 18px 0;
  border: 1px solid var(--line);
  font-size: 14px;
}
.prose th, .prose td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: var(--bg-elev); font-weight: 600; color: var(--ink); }
.prose tr:last-child td { border-bottom: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.prose a { color: var(--accent-ink); border-bottom: 1px solid var(--accent-soft); }
.prose a:hover { border-bottom-color: var(--accent); }

.callout {
  background: var(--bg-elev); border-left: 4px solid var(--accent);
  border-radius: 8px; padding: 14px 18px; margin: 22px 0;
}
.callout-title {
  font-family: var(--sans); font-weight: 600; color: var(--ink);
  text-transform: uppercase; letter-spacing: 0.08em; font-size: 11px;
  margin-bottom: 6px;
}

/* Roadmap step blocks (used in lesson) */
.roadmap-row {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin: 16px 0 0;
}
.roadmap-step {
  flex: 1 1 130px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 12px;
  color: var(--ink-soft);
  position: relative;
}
.roadmap-step .step-title {
  font-family: var(--sans);
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink); margin-bottom: 6px;
  display: block;
}
.roadmap-step + .roadmap-step::before {
  content: "→";
  position: absolute; left: -14px; top: 50%;
  transform: translateY(-50%);
  color: var(--ink-mute);
  font-size: 14px;
}

/* Lesson footer (Previous/Next) */
.lesson-bottom-bar {
  position: sticky; bottom: 0;
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 64px;
  font-size: 13px;
}
.lesson-bottom-bar .prev, .lesson-bottom-bar .next {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink); font-weight: 500;
}
.lesson-bottom-bar .next {
  background: var(--ink); color: var(--bg);
  border-radius: 10px; padding: 8px 22px;
}
.lesson-bottom-bar .next:hover { background: #2a2a28; color: var(--bg); }
.lesson-bottom-bar .prev:hover { color: var(--accent-ink); }
.lesson-bottom-bar .label-only { color: var(--ink-mute); }

/* Complete bar inside lesson body */
.complete-bar {
  display: flex; gap: 12px; align-items: center;
  margin-top: 40px; padding: 14px 18px;
  background: var(--bg-elev); border-radius: 10px; border: 1px solid var(--line);
}
.complete-bar .btn { margin-left: auto; }

/* Skeleton */
.skeleton { background: linear-gradient(90deg, var(--bg-elev) 0%, var(--line) 50%, var(--bg-elev) 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-radius: 6px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Utility */
.row { display: flex; gap: 16px; align-items: center; }
.row-between { display: flex; justify-content: space-between; align-items: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 40px; }
.muted { color: var(--ink-mute); }
.small { font-size: 13px; }
.center { text-align: center; }
.mono { font-family: var(--mono); }

/* ============================================================
   Certificate page
   ============================================================ */
.certificate-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 40px 80px;
}
.certificate-page .breadcrumb { margin: 0 0 24px; }
.cert-actions { margin-bottom: 32px; }
.cert-action-row {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin: 16px 0 8px;
}

.name-form {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-top: 24px;
}
.name-input {
  flex: 1 1 320px;
  font-family: var(--sans); font-size: 16px;
  background: var(--bg-card);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--ink);
}
.name-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* The certificate itself */
.certificate {
  background: var(--paper);
  border: 2px solid var(--accent);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 24px 60px rgba(20, 20, 19, 0.08);
  aspect-ratio: 1.414 / 1; /* roughly landscape A4 */
  max-width: 1040px;
  margin: 0 auto;
}
.cert-inner {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  height: 100%;
  padding: 48px 64px;
  display: flex;
  flex-direction: column;
  position: relative;
  text-align: center;
}
.cert-head {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-bottom: 28px;
}
.cert-head .brand-mark { width: 28px; height: 28px; }
.cert-wordmark {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 15px;
  color: var(--ink);
}
.cert-wordmark .slash { color: var(--accent); margin: 0 1px; }

.cert-eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin: 0 0 24px;
}
.cert-awarded {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--ink-mute);
  margin: 0;
}
.cert-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 56px;
  line-height: 1.1;
  margin: 12px 0 28px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.cert-course {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 28px;
  line-height: 1.2;
  margin: 12px 0 6px;
  color: var(--ink);
}
.cert-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0 auto 28px;
}

.cert-meta {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: flex;
  gap: 48px;
  justify-content: center;
}
.cert-meta li {
  display: flex; flex-direction: column; gap: 4px;
  font-family: var(--sans);
}
.cert-meta span {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.cert-meta strong {
  font-size: 15px;
  color: var(--ink);
  font-weight: 600;
}

.cert-foot {
  margin-top: auto;
  padding-top: 40px;
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  align-items: end;
  gap: 24px;
}
.cert-foot-col { display: flex; flex-direction: column; gap: 6px; }
.cert-foot-col.cert-foot-id { align-items: flex-end; text-align: right; }
.cert-foot-col.cert-foot-sig { align-items: center; }
.cert-foot-label {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.cert-foot-value {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
}
.cert-foot-value.mono { font-family: var(--mono); font-size: 13px; }
.cert-sig-line {
  width: 220px;
  height: 1px;
  background: var(--ink);
  margin-bottom: 4px;
}

.cert-note {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-faint);
  margin: 18px 0 0;
}

/* Learning path pages */
.path-section-title {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  margin: 48px 0 8px;
  color: var(--ink);
}
.path-courses {
  display: flex; flex-direction: column;
  gap: 14px;
  margin-top: 24px;
}
.path-course-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 22px 24px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.path-course-card:hover {
  background: var(--paper);
  border-color: var(--accent);
  transform: translateY(-1px);
}
.path-course-num {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 500;
  color: var(--accent);
  min-width: 48px;
}
.path-course-body h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 20px;
  margin: 0 0 6px;
  color: var(--ink);
}
.path-course-tagline {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0 0 10px;
  max-width: 70ch;
}
.path-course-meta {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.path-course-card .card-arrow {
  font-size: 22px;
  color: var(--ink-mute);
  transition: transform 0.2s ease, color 0.2s ease;
}
.path-course-card:hover .card-arrow {
  color: var(--accent);
  transform: translateX(4px);
}

@media (max-width: 720px) {
  .path-course-card { grid-template-columns: auto 1fr; }
  .path-course-card .card-arrow { display: none; }
}

/* Certificate as a final curriculum entry */
.module-cert .module-cert-header {
  cursor: default;
  display: flex; align-items: center; gap: 12px;
  padding: 16px 0;
}
.module-cert .cert-mod-icon {
  width: 20px; height: 20px;
  flex-shrink: 0;
  color: var(--ink-mute);
}
.module-cert.is-unlocked .cert-mod-icon { color: var(--accent); }
.module-cert .cert-mod-title {
  flex: 1;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
}
.module-cert .cert-mod-status {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 10px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: var(--ink-mute);
}
.module-cert.is-unlocked .cert-mod-status {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.cert-mod-body {
  padding: 4px 0 18px 32px;
  display: flex; flex-direction: column; gap: 10px;
}
.cert-mod-body p { margin: 0; font-size: 14px; color: var(--ink-soft); }
.cert-mod-body-unlocked .btn-accent {
  align-self: flex-start;
  font-size: 13px;
  padding: 8px 14px;
}
.cert-mod-body-locked .progress { max-width: 360px; }

/* Course detail celebration banner */
.cert-banner {
  display: flex; flex-direction: column; gap: 8px;
  margin: 16px 0 0;
  padding: 14px 16px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 10px;
}
.cert-banner-title {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-ink);
  letter-spacing: 0.02em;
}
.cert-banner-text {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-soft);
  margin: 0;
}
.cert-banner .btn-accent {
  align-self: flex-start;
  font-size: 13px;
  padding: 8px 14px;
}

/* Responsive: stack the certificate vertically on narrow screens */
@media (max-width: 720px) {
  .certificate { aspect-ratio: auto; }
  .cert-inner { padding: 32px 24px; }
  .cert-name { font-size: 38px; }
  .cert-course { font-size: 22px; }
  .cert-meta { flex-direction: column; gap: 18px; align-items: center; }
  .cert-foot { grid-template-columns: 1fr; text-align: center; }
  .cert-foot-col, .cert-foot-col.cert-foot-id { align-items: center; text-align: center; }
  .cert-sig-line { margin: 0 auto 4px; }
}

/* Print: only the certificate appears on the page */
@media print {
  @page { size: landscape; margin: 0; }
  html, body { background: white !important; margin: 0 !important; padding: 0 !important; }
  .no-print, nav, footer { display: none !important; }
  .certificate-page { padding: 0 !important; max-width: none !important; margin: 0 !important; }
  .certificate {
    box-shadow: none !important;
    border-radius: 0 !important;
    border: 8px solid var(--accent) !important;
    margin: 0 !important;
    max-width: none !important;
    width: 100vw !important;
    height: 100vh !important;
    aspect-ratio: auto !important;
    padding: 18px !important;
  }
  .cert-inner {
    border-radius: 0 !important;
    height: 100% !important;
    padding: 48px 64px !important;
  }
  .cert-note { color: var(--ink-mute) !important; }
}

/* ============================================================
   Nav settings button + hover popover (used on every page)
   ============================================================ */
.nav-settings {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
}
.settings-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--ink);
  background: transparent;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.settings-btn:hover {
  background: var(--bg-card);
  border-color: var(--line);
  color: var(--accent-ink);
}
.nav-links .settings-btn,
.top-right .settings-btn { color: var(--ink); }

.settings-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 50;
  width: 280px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 14px 14px 12px;
  box-shadow: 0 12px 32px rgba(20, 20, 19, 0.10);
  display: flex; flex-direction: column;
  gap: 10px;
}
.popover-label {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0;
}
.popover-syncid {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  word-break: break-all;
  display: block;
  user-select: all;
}
.popover-actions {
  display: flex;
  gap: 8px;
}
.popover-btn {
  flex: 1;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--bg-card);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s ease;
}
.popover-btn:hover { background: var(--paper); }
.popover-btn:disabled { opacity: 0.5; cursor: default; }
.popover-btn-accent {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.popover-btn-accent:hover { background: var(--accent-ink); color: white; }
.popover-link {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-mute);
  text-decoration: none;
  padding-top: 4px;
  border-top: 1px solid var(--line);
  margin-top: 2px;
  text-align: center;
}
.popover-link:hover { color: var(--accent-ink); }

/* Bridge the gap between button and popover so the hover doesn't drop. */
.nav-settings::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 0;
  width: 100%;
  height: 6px;
}

/* Responsive: don't run off the screen on narrow viewports. */
@media (max-width: 540px) {
  .settings-popover {
    right: -8px;
    width: 92vw;
    max-width: 320px;
  }
}

/* ============================================================
   Settings page
   ============================================================ */
.settings-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.settings-page .breadcrumb { margin: 0 0 16px; }
.settings-page h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 38px;
  margin: 0 0 10px;
  color: var(--ink);
}

.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  margin-top: 28px;
}
.settings-card h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  margin: 0 0 6px;
  color: var(--ink);
}
.settings-card > .muted.small {
  margin-bottom: 14px;
}

.sync-id-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.sync-id {
  flex: 1;
  font-family: var(--mono);
  font-size: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  word-break: break-all;
  user-select: all;
}
.settings-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.settings-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.settings-input {
  flex: 1 1 240px;
  font-family: var(--mono);
  font-size: 14px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
}
.settings-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.btn-ghost.danger,
.popover-btn.danger {
  border-color: rgba(180, 50, 50, 0.4);
  color: rgb(160, 40, 40);
}
.btn-ghost.danger:hover { background: rgba(180, 50, 50, 0.06); }
.danger-text { color: rgb(160, 40, 40); }

