/* =========================================================
   delhischoolofretail.com — design system
   Paper #F6F6F2, surface white, ink #15171C, lime #C5F82A.
   One family: Bricolage Grotesque. Lime is reserved for course
   tags, progress and the main action. Signature: shelf price tags.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400..800&display=swap');

:root {
  --bg: #F6F6F2;
  --surface: #FFFFFF;
  --sunken: #EEEEE8;
  --ink: #15171C;
  --ink-soft: #464852;
  --muted: #6A6C75;
  --muted-soft: #9A9CA3;
  --border: #E4E4DE;
  --border-strong: #D6D6CF;
  --accent: #C5F82A;
  --accent-deep: #A8DD15;
  --accent-soft: #EDFBC4;
  --danger: #D9412A;

  --radius-pill: 999px;
  --radius-card: 20px;
  --radius-sm: 12px;

  --font-body: 'Bricolage Grotesque', system-ui, -apple-system, sans-serif;
  /* Former monospace labels now use the body face */
  --font-mono: var(--font-body);

  --shadow-card: 0 1px 2px rgba(21,23,28,0.04);
  --shadow-lift: 0 2px 4px rgba(21,23,28,0.04), 0 20px 40px -20px rgba(21,23,28,0.28);

  --max-w: 1256px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-optical-sizing: auto;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ------------------------------------------------ shell */
.shell {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.page {
  min-height: 100vh;
  position: relative;
}

/* ------------------------------------------------ NAV */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  padding: 0 28px;
  position: relative;
  z-index: 50;
  max-width: var(--max-w);
  margin: 0 auto;
}

.brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand .tld { color: var(--muted); }

.brand-mark {
  width: 34px; height: 34px;
  background: url('/assets/logo.svg') center / cover no-repeat;
  border-radius: 0;
  flex-shrink: 0;
  font-size: 0; color: transparent;
}

.nav-links {
  display: flex; gap: 28px; align-items: center;
  font-size: 15px;
  list-style: none;
}
.nav-links a {
  padding: 6px 0;
  color: var(--ink-soft);
  transition: color .15s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.is-current, .nav-links a.active { color: var(--ink); font-weight: 600; }

.nav-cta {
  display: flex; align-items: center; gap: 8px;
}
.nav-cta .btn-ghost { border-color: transparent; background: none; }
.nav-cta .btn-ghost:hover { background: var(--sunken); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: 12px;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 5px;
}
.nav-toggle span {
  display: block; width: 20px; height: 2px;
  background: var(--ink); border-radius: 2px;
  transition: transform .25s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

@media (max-width: 880px) {
  .nav-links { display: none !important; }
  .nav-cta .btn { display: none; }
  .nav-toggle { display: flex; }
  .nav { height: 64px; padding: 0 16px 0 20px; }
  .brand { font-size: 17px; }
}

/* ------------------------------------------------ mobile menu (full-screen sheet) */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  color: var(--ink);
  z-index: 100;
  padding: 76px 20px calc(20px + env(safe-area-inset-bottom));
  flex-direction: column;
  overflow-y: auto;
}
.mobile-menu.open { display: flex; }

.mobile-identity {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 20px;
}
.mobile-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
  display: grid; place-items: center;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}
.mobile-avatar-img { width: 100%; height: 100%; object-fit: cover; }
.mobile-avatar-letter { font-size: 18px; }
.mobile-identity-text { min-width: 0; }
.mobile-identity-name {
  font-weight: 650; font-size: 16px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 220px;
}
.mobile-identity-meta { font-size: 13px; color: var(--muted); margin-top: 2px; }

.mobile-links { display: flex; flex-direction: column; margin-bottom: 12px; }
.mobile-links a {
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.02em;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.mobile-links a.is-current::after {
  content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 1px rgba(21,23,28,0.15);
}

.mobile-secondary { display: flex; flex-direction: column; padding: 8px 0 24px; }
.mobile-secondary a { font-size: 16px; padding: 10px 0; color: var(--ink-soft); }
.mobile-secondary a.is-current { color: var(--ink); font-weight: 600; }

.mobile-actions { margin-top: auto; padding-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.mobile-menu .btn { width: 100%; justify-content: center; height: 54px; font-size: 16px; }
.mobile-menu .btn-accent { background: var(--ink); color: var(--surface); }
.mobile-menu .btn-ghost-light { background: var(--surface); color: var(--ink); border: 1px solid var(--border-strong); }

.mobile-close {
  position: absolute; top: 12px; right: 16px;
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  font-size: 16px;
}

/* ------------------------------------------------ buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background .15s, color .15s, border-color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; }

.btn-dark { background: var(--ink); color: var(--surface); }
.btn-dark:hover { background: #2A2D35; }

.btn-light { background: var(--surface); color: var(--ink); border-color: var(--border-strong); }
.btn-light:hover { border-color: var(--ink); }

.btn-accent { background: var(--accent); color: var(--ink); }
.btn-accent:hover { background: var(--accent-deep); }

.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--ink); }

.btn-lg { height: 54px; padding: 0 26px; font-size: 16px; border-radius: 14px; }
.btn-sm { height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; }

/* Arrow glyphs on buttons are retired */
.btn .arrow { display: none; }

.text-link {
  font-weight: 600; font-size: 15px;
  text-decoration: underline; text-underline-offset: 4px;
  text-decoration-color: var(--border-strong);
}
.text-link:hover { text-decoration-color: var(--ink); }

/* ------------------------------------------------ small labels */
.tag-pill {
  display: inline-flex; align-items: center;
  height: 26px;
  background: var(--sunken);
  color: var(--ink-soft);
  padding: 0 10px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 12px;
}
.tag-pill.dark { background: var(--ink); color: var(--surface); }
.tag-pill.outline { background: transparent; border: 1px solid var(--border-strong); }

/* Highlight spans are kept in markup but no longer painted */
.hl { background: none !important; padding: 0 !important; }

/* ------------------------------------------------ typography */
.eyebrow, .mono-line {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.display {
  font-weight: 700;
  font-size: clamp(42px, 6.4vw, 72px);
  line-height: 1.0;
  letter-spacing: -0.035em;
}

.h2 {
  font-weight: 700;
  font-size: clamp(26px, 3vw, 32px);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.h3 {
  font-weight: 650;
  font-size: 20px;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.lede {
  font-size: 17px;
  color: var(--ink-soft);
  line-height: 1.55;
  max-width: 52ch;
}

/* ------------------------------------------------ cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px;
  display: flex; flex-direction: column;
}
.card-dark { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.card-accent { background: var(--accent); border-color: var(--accent); }

/* ===== Signature: shelf price tag (course card) ===== */
.ptag {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  overflow: hidden;
  display: flex; flex-direction: column;
  color: var(--ink);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
a.ptag:hover { border-color: var(--ink); box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.ptag-head {
  height: 34px;
  background: var(--accent);
  display: flex; align-items: center; gap: 8px;
  padding: 0 14px 0 34px;
  font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ptag-hole {
  position: absolute; left: 12px; top: 11px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg);
  box-shadow: inset 0 0 0 1px rgba(21,23,28,0.2);
}
.ptag.ink .ptag-head { background: var(--ink); color: var(--surface); }
.ptag.ink .ptag-hole { box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35); }
.ptag.sand .ptag-head { background: var(--sunken); }
.ptag-img { aspect-ratio: 16 / 9; background: var(--sunken) center / cover no-repeat; border-bottom: 1px solid var(--border); }
.ptag-body { padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.ptag-title { font-size: 18px; font-weight: 650; letter-spacing: -0.015em; line-height: 1.25; }
.ptag-desc { font-size: 14px; line-height: 1.5; color: var(--ink-soft); }
.ptag-foot {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  margin-top: auto;
  border-top: 1px dashed var(--border-strong);
  padding-top: 12px;
}
.price { font-size: 30px; font-weight: 750; letter-spacing: -0.03em; line-height: 1; }
.price sup { font-size: 15px; font-weight: 600; vertical-align: top; position: relative; top: 3px; margin-right: 1px; }
.ptag-meta { font-size: 13px; color: var(--muted); text-align: right; line-height: 1.35; }

/* The shelf rail tags hang from */
.rail { height: 10px; border-radius: 5px; background: var(--ink); }
.hang { position: relative; padding-top: 26px; }
.hang::before {
  content: ''; position: absolute; left: 17px; top: 0;
  width: 2px; height: 38px; background: var(--muted-soft); z-index: 1;
}

.tag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}
@media (max-width: 600px) { .tag-grid { grid-template-columns: 1fr; gap: 14px; } }

/* progress bar */
.pbar { height: 8px; border-radius: 99px; background: var(--sunken); overflow: hidden; }
.pbar > span { display: block; height: 100%; background: var(--accent); border-radius: 99px; box-shadow: inset 0 0 0 1px rgba(21,23,28,0.08); }

/* ------------------------------------------------ section spacing */
section {
  padding: 56px 28px;
  max-width: var(--max-w);
  margin: 0 auto;
}
@media (max-width: 700px) { section { padding: 40px 20px; } }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.section-head .lede { flex: 1; min-width: 240px; max-width: 480px; }

/* ------------------------------------------------ forms */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field label { font-size: 14px; font-weight: 600; }
.input, .textarea, .select {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 16px;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 120px; padding: 12px 16px; resize: vertical; }
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field .hint { font-size: 13px; color: var(--muted); }
.field-error { color: var(--danger); font-size: 13px; margin-top: -10px; margin-bottom: 14px; }

/* ------------------------------------------------ toasts */
.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(140%);
  background: var(--ink);
  color: var(--surface);
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 500;
  font-size: 15px;
  z-index: 1000;
  transition: transform .3s cubic-bezier(0.2, 0.9, 0.3, 1.2);
  box-shadow: var(--shadow-lift);
  display: inline-flex; align-items: center; gap: 10px;
  max-width: calc(100vw - 32px);
}
/* Hidden until shown: an empty toast used to peek above the bottom edge */
.toast:not(.show) { visibility: hidden; opacity: 0; }
.toast.show { transform: translateX(-50%) translateY(0); visibility: visible; opacity: 1; }
body.has-tabbar .toast { bottom: calc(92px + env(safe-area-inset-bottom)); }
.toast-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
}
.toast.success .toast-icon { background: var(--accent); color: var(--ink); }
.toast.error { background: var(--danger); color: var(--surface); }
.toast.error .toast-icon { background: rgba(255,255,255,0.2); color: var(--surface); }
.toast.info .toast-icon { background: var(--accent); color: var(--ink); }

/* ------------------------------------------------ loaders */
.spinner {
  width: 22px; height: 22px;
  border: 2.5px solid var(--border);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
.page-loader { display: grid; place-items: center; padding: 80px 0; }

/* ------------------------------------------------ empty state */
.empty {
  text-align: center;
  padding: 56px 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-card);
  color: var(--muted);
  background: var(--surface);
}
.empty h3 { color: var(--ink); margin-bottom: 8px; font-size: 22px; font-weight: 650; letter-spacing: -0.015em; }

/* ------------------------------------------------ utilities */
.row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.spacer { flex: 1; }
.hidden { display: none !important; }
.text-muted { color: var(--muted); }

/* Entrance animations are retired; classes kept as no-ops */
.fade-up, .delay-1, .delay-2, .delay-3, .delay-4 { animation: none; }

/* ===========================================================
   SHARED PAGE PATTERNS
   =========================================================== */
.page-head {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 40px 28px 24px;
}
@media (max-width: 700px) { .page-head { padding: 20px 20px 16px; } }
.page-head h1 {
  font-weight: 700;
  font-size: clamp(34px, 4.6vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.032em;
  margin-bottom: 12px;
}
.page-head .lede { font-size: 17px; color: var(--ink-soft); max-width: 56ch; }
.page-head .eyebrow { display: inline-block; margin-bottom: 10px; }

/* footer: ink card when signed out, one slim line when signed in */
.site-footer {
  max-width: calc(var(--max-w) - 56px);
  margin: 64px auto 28px;
  background: var(--ink);
  color: var(--surface);
  border-radius: 28px;
  padding: 56px 56px 28px;
}
.site-footer:empty { display: none; }
.site-footer a { color: inherit; }
.sf-top {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: end;
  padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.12);
}
.sf-title { font-size: 44px; line-height: 1.02; letter-spacing: -.035em; font-weight: 700; max-width: 14ch; }
.sf-title span { color: var(--accent); }
.sf-cta { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.site-footer .btn-accent { color: var(--ink); }
.sf-btn-out { border: 1px solid rgba(255,255,255,.28); color: var(--surface); background: transparent; }
.sf-btn-out:hover { border-color: var(--surface); }
.sf-cols { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr 1fr; gap: 32px; padding: 36px 0; }
.sf-about .brand { color: var(--surface); }
.sf-about p { color: rgba(255,255,255,.6); font-size: 14px; max-width: 30ch; margin-top: 12px; }
.sf-cols h3 { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.5); margin-bottom: 12px; }
.sf-cols ul { list-style: none; }
.sf-cols li { font-size: 15px; margin-bottom: 9px; }
.sf-cols li a:hover, .sf-legal a:hover { color: var(--accent); }
.sf-bot {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 13px; color: rgba(255,255,255,.5);
  padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12);
}
.sf-legal { display: flex; flex-wrap: wrap; gap: 8px 18px; }
@media (min-width: 761px) and (max-width: 1080px) {
  .sf-cols { grid-template-columns: repeat(4, 1fr); }
  .sf-about { grid-column: 1 / -1; }
}
.sf-legal a { color: rgba(255,255,255,.72); }

.site-footer.is-slim {
  max-width: var(--max-w);
  margin: 48px auto 0;
  background: none; color: var(--muted);
  border-radius: 0;
  padding: 0 28px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 13px;
}
.site-footer.is-slim::before { content: ""; flex-basis: 100%; border-top: 1px solid var(--border); margin-bottom: 6px; }
.site-footer.is-slim { padding-bottom: 28px; }
.site-footer-slim-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.site-footer-slim-links a { color: var(--ink-soft); }
.site-footer-slim-links a:hover { color: var(--ink); }
body.has-tabbar .site-footer.is-slim { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }

@media (max-width: 760px) {
  .site-footer { margin: 48px 12px 16px; padding: 36px 22px 22px; border-radius: 24px; }
  .sf-top { grid-template-columns: 1fr; gap: 24px; }
  .sf-title { font-size: 34px; }
  .sf-cta { justify-content: flex-start; }
  .sf-cols { grid-template-columns: 1fr 1fr; }
  .sf-about { grid-column: 1 / -1; }
  .site-footer.is-slim { margin: 40px 0 0; padding-left: 20px; padding-right: 20px; }
}

/* legal links tucked into the signed-in menus */
.profile-legal, .mobile-legal { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.profile-legal { padding: 10px 12px 6px; border-top: 1px solid var(--border); }
.profile-menu .profile-legal a { padding: 0; font-size: 12px; font-weight: 500; color: var(--muted); }
.profile-menu .profile-legal a:hover { background: none; color: var(--ink); }
.mobile-legal { padding-top: 16px; font-size: 13px; }
.mobile-legal a { color: var(--muted); }

/* course card (image first) */
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 960px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
@media (max-width: 600px) { .card-grid { grid-template-columns: 1fr; } }
.ccard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 10px;
  display: flex; flex-direction: column;
  transition: box-shadow .2s, border-color .2s;
}
.ccard:hover { border-color: var(--border-strong); box-shadow: var(--shadow-lift); }
.ccard-cover {
  position: relative; display: block;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  background: var(--ink) center / cover no-repeat;
}
.ccard-cover.is-empty { background: var(--ink) url('/assets/logo.svg') center / 64px no-repeat; }
/* Labels sit under the image: course images often carry their own text */
.ccard-meta { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 22px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.ccard-cat { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ccard-time { flex-shrink: 0; }
.ccard-time::before { content: "·"; margin-right: 8px; }
.ccard-free { margin-left: auto; flex-shrink: 0; background: var(--accent); color: var(--ink); border-radius: 6px; padding: 3px 8px; font-size: 11.5px; font-weight: 750; }
.ccard-free.is-paid { background: var(--ink); color: var(--accent); }
.ccard-body { padding: 14px 8px 6px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.ccard-title { font-size: 18px; font-weight: 650; letter-spacing: -0.015em; line-height: 1.25; }
.ccard-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ccard-desc {
  font-size: 14px; line-height: 1.5; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ccard-who { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-soft); }
.ccard-av {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent); color: var(--ink);
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
}
.ccard-prog { height: 6px; border-radius: 99px; background: var(--sunken); overflow: hidden; }
.ccard-prog span { display: block; height: 100%; background: var(--ink); }
.ccard-actions { margin-top: auto; padding-top: 6px; display: flex; gap: 8px; }
.ccard-actions .btn { flex: 1; justify-content: center; }

/* lesson resources: instructor form + learner list */
.res-list { display: flex; flex-direction: column; gap: 8px; }
.res-list:not(:empty) { margin-bottom: 10px; }
.res-item, .lesson-resources a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
}
.res-icon {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px;
  background: var(--ink); color: var(--accent);
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
}
.res-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.res-meta strong { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-meta a, .res-meta span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-add { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; }
.res-pdf-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.res-pdf-row .is-busy { opacity: .6; pointer-events: none; }
@media (max-width: 600px) { .res-add { grid-template-columns: 1fr; } }
.lesson-resources { margin: 22px 0 0; padding: 18px 0 0; max-width: none; border-top: 1px solid var(--border); }
.lesson-resources h3 { font-size: 16px; font-weight: 650; margin-bottom: 10px; }
.lesson-resources ul { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.lesson-resources a { transition: border-color .15s; }
.lesson-resources a:hover { border-color: var(--ink); }
.res-go { color: var(--muted); font-size: 16px; }

/* tile */
.tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px;
  display: flex; flex-direction: column;
  text-align: left;
}
.tile.dark { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.tile.accent { background: var(--accent); border-color: var(--accent); }

/* category filters */
.chip-row {
  display: flex; gap: 8px;
  overflow-x: auto;
  padding: 2px 0 10px;
  scrollbar-width: none;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  white-space: nowrap;
  display: inline-flex; align-items: center;
  transition: background .15s, color .15s, border-color .15s;
}
.chip:hover { border-color: var(--ink); }
.chip.active { background: var(--ink); color: var(--surface); border-color: var(--ink); }

/* search */
.search {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  height: 52px;
  padding: 0 16px;
  width: 100%;
  max-width: 480px;
  transition: border-color .15s, box-shadow .15s;
}
.search:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px var(--accent-soft); }
.search input {
  flex: 1; min-width: 0;
  border: none; outline: none; background: transparent;
  font-size: 16px;
}
.search input::placeholder { color: var(--muted-soft); }
.search .icon { width: 20px; height: 20px; color: var(--muted); flex-shrink: 0; }

/* ================== INFO PAGES (about, contact, privacy, terms, refund) */
.legal-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 28px 80px;
}
@media (max-width: 700px) { .legal-wrap { padding: 20px 20px 56px; } }
.legal-wrap .eyebrow { display: inline-block; margin-bottom: 10px; }
.legal-wrap h1 {
  font-weight: 700;
  font-size: clamp(34px, 4.6vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.032em;
  margin-bottom: 14px;
}
.legal-wrap .lede { font-size: 18px; color: var(--ink-soft); margin-bottom: 36px; max-width: 60ch; }
.legal-wrap h2 { font-weight: 650; font-size: 22px; letter-spacing: -0.015em; margin: 40px 0 12px; }
.legal-wrap h3 { font-weight: 650; font-size: 17px; margin: 24px 0 8px; }
.legal-wrap p, .legal-wrap li { font-size: 16px; line-height: 1.65; color: var(--ink-soft); }
.legal-wrap p { margin-bottom: 14px; }
.legal-wrap ul, .legal-wrap ol { margin: 0 0 14px 22px; padding-left: 4px; }
.legal-wrap li { margin-bottom: 6px; }
.legal-wrap a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border-strong); border: 0; }
.legal-wrap a:hover { text-decoration-color: var(--ink); background: none; }
.legal-wrap a.btn { text-decoration: none; }
.legal-wrap a.btn-dark { color: var(--surface); }
.legal-wrap .last-updated { font-size: 14px; color: var(--muted); margin-top: -20px; margin-bottom: 36px; }

/* contact */
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px;
  margin-top: 32px;
}
@media (max-width: 600px) { .contact-card { padding: 20px; } }
.contact-card h3 { font-weight: 650; font-size: 20px; letter-spacing: -0.015em; margin-bottom: 6px; }
.contact-card .sub { color: var(--muted); font-size: 15px; margin-bottom: 20px; }
.contact-info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 24px; }
@media (max-width: 600px) { .contact-info-grid { grid-template-columns: 1fr; } }
.contact-info-item { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px 18px; }
.contact-info-item .label { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.contact-info-item .value { font-weight: 600; font-size: 15px; }

/* ================== SIGNED-IN NAV: streak chip, profile menu, tab bar */
.streak-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 14px; font-weight: 600;
  white-space: nowrap;
}
.streak-chip svg { color: #C2410C; }

.profile-wrap { position: relative; }
.profile-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px;
  padding: 0 10px 0 4px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 15px; font-weight: 600;
}
.profile-btn:hover { border-color: var(--border-strong); }
.nav-avatar {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--accent); color: var(--ink);
  display: grid; place-items: center;
  font-weight: 700; overflow: hidden;
}
.nav-avatar img, .mobile-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mobile-avatar > span { width: 100%; height: 100%; display: grid; place-items: center; }
.profile-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-menu {
  display: none;
  position: absolute; right: 0; top: calc(100% + 8px);
  width: 260px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lift);
  padding: 6px;
  flex-direction: column;
  z-index: 60;
}
.profile-menu.open { display: flex; }
.profile-menu-head {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.profile-menu-head strong { font-size: 15px; font-weight: 650; }
.profile-menu-head span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-menu a, .profile-signout {
  padding: 10px 12px; border-radius: 10px;
  font-size: 15px; font-weight: 500;
  text-align: left;
}
.profile-menu a:hover, .profile-signout:hover { background: var(--bg); }
.profile-signout { color: var(--muted); border-top: 1px solid var(--border); border-radius: 0 0 10px 10px; margin-top: 4px; }

.mobile-signout {
  align-self: flex-start;
  color: var(--muted);
  font-size: 15px;
  text-decoration: underline; text-underline-offset: 3px;
  padding: 12px 0;
}

.tabbar { display: none; }
@media (max-width: 880px) {
  .profile-wrap { display: none; }
  .streak-chip { height: 34px; padding: 0 10px; font-size: 13px; }
  /* Signed in: the Profile tab opens the menu, so drop the hamburger */
  body.has-tabbar .nav-toggle { display: none; }
  body.has-tabbar { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    position: fixed; left: 0; right: 0; bottom: 0;
    z-index: 90;
    background: rgba(255,255,255,0.9);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--border);
    padding: 6px 6px calc(8px + env(safe-area-inset-bottom));
  }
  .tab-item {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 4px 0;
    min-height: 56px;
    font-size: 12px;
    color: var(--muted);
  }
  .tab-icon { width: 56px; height: 30px; border-radius: 10px; display: grid; place-items: center; }
  .tab-item.is-current { color: var(--ink); font-weight: 600; }
  .tab-item.is-current .tab-icon { background: var(--accent); }
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }
.ptag-title, .ptag-desc, .ptag-meta { display: block; }
.price { display: inline-block; }

/* ================== Instructor uploads */
.uploader { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 4px; }
.uploader-btn { cursor: pointer; }
.uploader-btn:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.uploader.is-busy .uploader-btn, .uploader.is-busy .uploader-delete { opacity: .6; pointer-events: none; }
.uploader-file {
  flex-basis: 100%;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 10px 10px 10px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
}
.uploader-thumb, .uploader-icon {
  width: 56px; height: 42px; flex-shrink: 0;
  border-radius: 8px; object-fit: cover;
  background: var(--ink); color: var(--accent);
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700;
}
.uploader-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.uploader-meta strong { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uploader-meta a { font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.uploader-actions { display: flex; gap: 6px; flex-shrink: 0; }
.uploader-delete:hover { color: var(--danger); border-color: var(--danger); }
@media (max-width: 480px) {
  .uploader-file { flex-wrap: wrap; }
  .uploader-actions { flex-basis: 100%; }
  .uploader-actions > * { flex: 1; justify-content: center; }
}
.uploader-progress { flex-basis: 100%; height: 6px; border-radius: 99px; background: var(--sunken); overflow: hidden; }
.uploader-progress span { display: block; height: 100%; width: 0; background: var(--ink); transition: width .2s; }
.uploader-status { flex-basis: 100%; font-size: 13px; color: var(--ink-soft); }
.uploader-status:empty { display: none; }

/* ---------- gamification: badges, XP pop, level bar ---------- */
.gbadge {
  width: 56px; height: 56px; flex-shrink: 0; position: relative;
  border-radius: 16px; background: var(--ink); color: var(--accent);
  display: grid; place-items: center;
  font-size: 15px; font-weight: 800; letter-spacing: -.02em;
}
.gbadge::after { content: ""; position: absolute; inset: 5px; border: 1.5px dashed rgba(197,248,42,.5); border-radius: 11px; }
.gbadge.sm { width: 40px; height: 40px; border-radius: 12px; font-size: 12px; }
.gbadge.sm::after { inset: 4px; border-radius: 8px; }
.gbadge.is-locked { background: var(--sunken); color: var(--muted-soft); }
.gbadge.is-locked::after { border-color: var(--border-strong); }
.xp-pop {
  position: fixed; left: 50%; bottom: 96px; z-index: 1001;
  transform: translate(-50%, 12px) scale(.9); opacity: 0;
  background: var(--accent); color: var(--ink);
  font-weight: 800; font-size: 16px; letter-spacing: -.01em;
  padding: 10px 18px; border-radius: 999px;
  box-shadow: 0 10px 30px -10px rgba(21,23,28,.45);
  transition: transform .35s cubic-bezier(.2,.9,.3,1.3), opacity .25s;
  pointer-events: none;
}
.xp-pop.show { transform: translate(-50%, 0) scale(1); opacity: 1; }
body.has-tabbar .xp-pop { bottom: calc(150px + env(safe-area-inset-bottom)); }
.xp-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 12px; border-radius: 10px;
  background: var(--accent); color: var(--ink);
  font-size: 14px; font-weight: 700;
}
@media (max-width: 860px) { .xp-chip { display: none; } }
.lvl-bar { height: 8px; border-radius: 99px; background: var(--sunken); overflow: hidden; }
.lvl-bar span { display: block; height: 100%; background: var(--ink); border-radius: 99px; }
@media (prefers-reduced-motion: reduce) { .xp-pop { transition: none; } }

/* =========================================================
   Company and policy pages: campus hiring, sponsor, practice lab,
   contact, policies
   ========================================================= */
.mk { max-width: var(--max-w); margin: 0 auto; padding: 0 28px; }
@media (max-width: 700px) { .mk { padding: 0 20px; } }
.mk-subnav { display: flex; gap: 6px; flex-wrap: wrap; padding-top: 16px; }
.mk-subnav a { height: 36px; padding: 0 14px; border-radius: 999px; display: inline-flex; align-items: center; font-size: 14px; font-weight: 600; color: var(--ink-soft); border: 1px solid var(--border-strong); background: var(--surface); }
.mk-subnav a:hover { border-color: var(--ink); color: var(--ink); }
.mk-subnav a.is-current { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.mk-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding: 36px 0 48px; }
.mk-hero > * { min-width: 0; }
.mk-hero h1 { font-size: clamp(36px, 5vw, 60px); font-weight: 700; line-height: 1; letter-spacing: -.035em; text-wrap: balance; }
.mk-hero .lede { margin: 18px 0 24px; max-width: 34em; font-size: 17px; color: var(--ink-soft); }
.mk-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.mk-trust { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 22px; font-size: 14px; font-weight: 500; color: var(--ink-soft); }
.mk-trust span { display: inline-flex; align-items: center; gap: 8px; }
.mk-tick { width: 20px; height: 20px; flex-shrink: 0; border-radius: 50%; display: inline-grid; place-items: center; background: var(--accent); color: var(--ink); }
.mk-tick.ink { background: var(--ink); color: var(--accent); }
.mk-card { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 24px; }
.mk-dark { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.mk-lime { background: var(--accent); border-color: var(--accent); }
.mk-section { padding: 40px 0; }
.mk-h2 { font-size: clamp(26px, 3vw, 36px); font-weight: 700; letter-spacing: -.03em; line-height: 1.08; text-wrap: balance; }
.mk-sub { margin-top: 8px; max-width: 52ch; font-size: 16px; color: var(--ink-soft); }
.mk-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 24px; }
.mk-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mk-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mk-item { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 20px; }
.mk-item h3 { margin-top: 14px; font-size: 18px; font-weight: 650; letter-spacing: -.015em; }
.mk-item p { margin-top: 6px; font-size: 14.5px; line-height: 1.5; color: var(--ink-soft); }
.mk-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--accent); color: var(--ink); }
.mk-icon.soft { background: var(--sunken); }
.mk-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 24px; counter-reset: step; list-style: none; }
.mk-steps li { position: relative; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; }
.mk-steps li::before { counter-increment: step; content: counter(step); width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--accent); display: grid; place-items: center; font-size: 13px; font-weight: 700; margin-bottom: 12px; }
.mk-steps b { display: block; font-size: 16.5px; font-weight: 650; letter-spacing: -.01em; }
.mk-steps span { display: block; margin-top: 4px; font-size: 14px; line-height: 1.45; color: var(--ink-soft); }
.mk-band { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 22px 24px; border-radius: 22px; background: var(--ink); color: var(--surface); }
.mk-band b { font-size: 19px; font-weight: 650; letter-spacing: -.015em; }
.mk-band p { color: rgba(255,255,255,.65); font-size: 14.5px; margin-top: 2px; }
.mk-form-wrap { display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px; align-items: start; }
.mk-next { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; }
.mk-next div { display: grid; grid-template-columns: 28px 1fr; gap: 12px; font-size: 15px; color: var(--ink-soft); }
.mk-next div b { color: var(--ink); display: block; }
.mk-next i { width: 28px; height: 28px; border-radius: 50%; background: var(--sunken); display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 700; }
.mk-form { display: flex; flex-direction: column; gap: 0; }
.mk-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mk-form .field { margin-bottom: 16px; }
.mk-form .opt { font-weight: 400; color: var(--muted); }
.check-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.check-chips label { position: relative; display: inline-flex; align-items: center; height: 40px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface); font-size: 14px; font-weight: 500; cursor: pointer; }
.check-chips input { position: absolute; opacity: 0; pointer-events: none; }
.check-chips label:has(input:checked) { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.check-chips label:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.consent { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; font-size: 13.5px; line-height: 1.5; color: var(--ink-soft); margin: 4px 0 18px; }
.consent input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--ink); }
.consent a { text-decoration: underline; text-underline-offset: 2px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-done { text-align: left; padding: 8px 0; }
.form-done .mk-icon { margin-bottom: 14px; }
.form-done h3 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.form-done p { margin-top: 6px; color: var(--ink-soft); }
.mk-faq { margin-top: 20px; border-top: 1px solid var(--border); }
.mk-faq details { border-bottom: 1px solid var(--border); padding: 16px 0; }
.mk-faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; font-size: 16.5px; font-weight: 600; }
.mk-faq summary::-webkit-details-marker { display: none; }
.mk-faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--muted); }
.mk-faq details[open] summary::after { content: "–"; }
.mk-faq p { margin-top: 10px; max-width: 70ch; font-size: 15px; line-height: 1.6; color: var(--ink-soft); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 650; background: var(--sunken); color: var(--ink-soft); white-space: nowrap; }
.pill.lime { background: var(--accent); color: var(--ink); }
.pill.ink { background: var(--ink); color: var(--accent); }
@media (max-width: 960px) {
  .mk-grid.four, .mk-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .mk-hero { grid-template-columns: 1fr; gap: 28px; padding: 20px 0 32px; }
  .mk-grid, .mk-grid.two { grid-template-columns: 1fr; }
  .mk-form-wrap { grid-template-columns: 1fr; gap: 20px; }
  .mk-section { padding: 28px 0; }
}
@media (max-width: 560px) {
  .mk-grid.four, .mk-steps { grid-template-columns: 1fr; }
  .mk-form .row2 { grid-template-columns: 1fr; gap: 0; }
  .mk-actions .btn { flex: 1; }
}

/* policy pages: links between them, business details */
.policy-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 28px; padding: 0; list-style: none; }
.legal-wrap .policy-nav li { margin: 0; font-size: 14px; }
.legal-wrap .policy-nav a { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); text-decoration: none; font-weight: 600; color: var(--ink-soft); }
.legal-wrap .policy-nav a:hover { border-color: var(--ink); color: var(--ink); }
.legal-wrap .policy-nav a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.biz-card { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 8px 0 20px; }
.biz-card > div { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; }
.biz-card .label { font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.biz-card .value { font-weight: 600; font-size: 15px; color: var(--ink); word-break: break-word; }
@media (max-width: 600px) { .biz-card { grid-template-columns: 1fr; } }
.legal-wrap .note { background: var(--accent-soft); border-radius: 14px; padding: 14px 16px; font-size: 15px; color: var(--ink); margin-bottom: 18px; }
.legal-wrap table { width: 100%; border-collapse: collapse; margin: 6px 0 18px; font-size: 15px; }
.legal-wrap th, .legal-wrap td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); color: var(--ink-soft); }
.legal-wrap th { color: var(--ink); font-weight: 650; background: var(--sunken); }
@media (max-width: 600px) { .legal-wrap table { font-size: 14px; } .legal-wrap th, .legal-wrap td { padding: 8px; } }

/* buy sheet (paid courses) */
.buy-sheet { margin: auto; width: min(460px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow: auto; border: 0; border-radius: 24px; padding: 0; background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(21,23,28,.5); }
.buy-sheet::backdrop { background: rgba(21,23,28,.55); }
.buy-sheet form, .buy-sheet > div { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.buy-sheet h2 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; padding-right: 32px; }
.buy-price { display: flex; align-items: baseline; gap: 10px; }
.buy-price b { font-size: 36px; letter-spacing: -.03em; }
.buy-price span { font-size: 14px; color: var(--muted); }
.buy-incl { list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; color: var(--ink-soft); }
.buy-incl li { display: flex; gap: 8px; align-items: center; }
.buy-note { background: var(--accent-soft); border-radius: 14px; padding: 12px 14px; font-size: 14px; }
.buy-actions { display: flex; flex-direction: column; gap: 8px; }
.buy-actions .btn { width: 100%; justify-content: center; }
.buy-fine { font-size: 12.5px; color: var(--muted); }
.buy-fine a { text-decoration: underline; text-underline-offset: 2px; }
.buy-close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; background: var(--sunken); display: grid; place-items: center; font-size: 16px; }

/* The menu shows once we know who's signed in, so the wrong menu never
   flashes. If scripts fail to load it appears anyway after a moment. */
.nav-links, .nav-cta { opacity: 0; animation: nav-reveal 0s linear 1.5s forwards; }
.nav.is-ready .nav-links, .nav.is-ready .nav-cta { opacity: 1; animation: none; transition: opacity .12s ease-out; }
@keyframes nav-reveal { to { opacity: 1; } }
