  :root {
    --bg:        #0D0D0F;   /* base */
    --bg-2:      #16161A;   /* surface */
    --panel:     #16161A;
    --panel-2:   #1d1d22;
    --border:    #2a2a31;
    --text:      #E8E6E3;
    --muted:     #8A8A93;
    --green:     #F2A93B;   /* primary — accent (amber) */
    --green-2:   #d98f22;   /* darker accent for button depth */
    --orange:    #f7c46e;   /* light accent for gradients/kickers */
    --orange-2:  #F2A93B;
    --silver:    #E8E6E3;   /* light tint for grad-text tail */
    --silver-2:  #8A8A93;
    --maxw:      1160px;
    --radius:    16px;
  }

  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
  }
  a { color: inherit; text-decoration: none; }
  h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
  p { margin: 0; }
  .wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

  .grad-text {
    background: linear-gradient(100deg, var(--green) 0%, var(--orange) 55%, var(--silver) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  /* ---------- Buttons ---------- */
  .btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 13px 24px; border-radius: 999px;
    font-weight: 600; font-size: 15px; cursor: pointer;
    border: 1px solid transparent; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  }
  .btn-primary {
    background: linear-gradient(100deg, var(--green) 0%, var(--green-2) 100%);
    color: #06130c; box-shadow: 0 8px 30px -8px rgba(242,169,59,.5);
  }
  .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 36px -8px rgba(242,169,59,.65); }
  .btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
  .btn-ghost:hover { border-color: var(--orange); color: var(--orange); transform: translateY(-2px); }

  /* ---------- Nav ---------- */
  header.nav {
    position: sticky; top: 0; z-index: 50;
    backdrop-filter: blur(12px);
    background: rgba(13,13,15,.72);
    border-bottom: 1px solid var(--border);
  }
  .nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
  .logo { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 20px; letter-spacing: -0.03em; }
  .logo .mark {
    width: 60px; height: 60px; object-fit: contain;
    filter: drop-shadow(0 6px 14px rgba(242,169,59,.35));
  }
  .nav-links { display: flex; align-items: center; gap: 8px; }
  .nav-links a { padding: 8px 14px; border-radius: 8px; color: var(--muted); font-weight: 500; font-size: 15px; transition: color .15s, background .15s; }
  .nav-links a:hover { color: var(--text); background: rgba(255,255,255,.05); }
  .nav-links a.active { color: var(--green); }
  .nav-cta { margin-left: 6px; }
  .nav-links a.nav-cta { color: #0a0d14; }  /* override muted nav-link color */
  .nav-links a.nav-cta:hover { color: #fff; }
  .burger { display: none; background: none; border: 0; color: var(--text); font-size: 26px; cursor: pointer; }

  /* ---------- Views ---------- */
  .view { display: none; }
  .view.active { display: block; animation: fade .4s ease; }
  @keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

  /* ---------- Hero ---------- */
  .hero { position: relative; min-height: 92vh; display: flex; align-items: center; overflow: hidden; }
  .hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
  .hero-scrim {
    position: absolute; inset: 0; z-index: 1;
    background:
      radial-gradient(120% 90% at 20% 20%, rgba(13,13,15,.55) 0%, rgba(13,13,15,.9) 70%, var(--bg) 100%),
      linear-gradient(180deg, rgba(13,13,15,.4) 0%, var(--bg) 100%);
  }
  .hero-content { position: relative; z-index: 2; width: 100%; }
  .eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
    color: var(--green); background: rgba(242,169,59,.1);
    border: 1px solid rgba(242,169,59,.25); padding: 6px 14px; border-radius: 999px; margin-bottom: 24px;
  }
  .eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
  .hero h1 { font-size: clamp(38px, 6vw, 68px); font-weight: 800; max-width: 15ch; }
  .hero .sub { margin-top: 24px; font-size: clamp(17px, 2vw, 21px); color: var(--muted); max-width: 56ch; }
  .hero .actions { margin-top: 40px; display: flex; gap: 14px; flex-wrap: wrap; }
  /* Hero lesson embed — .player carries the 16/9 frame, .split the two columns. */
  .hero-video-link { display: inline-block; margin-top: 14px; color: var(--muted); font-size: 15px; }
  .hero-video-link:hover { color: var(--orange); }

  /* ---------- Animated Claude Code terminal background ---------- */
  .term-pan {
    position: absolute; top: 50%; left: 50%;
    width: 150%; max-width: 1500px;
    transform: translate(-50%, -50%) scale(1.18);
    opacity: .5;
  }
  .term {
    background: #16161A; border: 1px solid var(--border); border-radius: 14px;
    box-shadow: 0 40px 120px -30px rgba(0,0,0,.7);
    font-family: 'JetBrains Mono', monospace; font-size: 13.5px; line-height: 1.85;
    overflow: hidden;
  }
  .term-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: #1d1d22; }
  .term-head .b { width: 12px; height: 12px; border-radius: 50%; }
  .term-head .b.r { background: #ff5f57; } .term-head .b.y { background: #febc2e; } .term-head .b.g { background: #28c840; }
  .term-head .t { margin-left: 10px; color: var(--muted); font-size: 12px; }
  .term-body { padding: 18px 22px; white-space: pre-wrap; }
  .term-scroll { animation: term-scroll 32s linear infinite; }
  @keyframes term-scroll { from { transform: translateY(0); } to { transform: translateY(-50%); } }
  @media (prefers-reduced-motion: reduce) { .term-scroll { animation: none; } }
  .term-body .line { opacity: 1; }
  .c-user  { color: var(--orange); }
  .c-agent { color: var(--green); }
  .c-tool  { color: #7cc4ff; }
  .c-ok    { color: var(--green); }
  .c-dim   { color: var(--muted); }
  .c-warn  { color: var(--orange); }
  .cursor { display: inline-block; width: 8px; height: 15px; background: var(--green); vertical-align: -2px; }

  /* ---------- Sections ---------- */
  section.block { padding: 96px 0; }
  .section-head { max-width: 640px; margin-bottom: 56px; }
  .section-head .kick { color: var(--orange); font-weight: 600; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
  .section-head h2 { font-size: clamp(30px, 4vw, 44px); margin-top: 12px; font-weight: 800; }
  .section-head p { color: var(--muted); margin-top: 16px; font-size: 18px; }

  /* metric strip */
  .metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .metric { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; }
  .metric .n { font-size: 44px; font-weight: 800; }
  .metric .l { color: var(--muted); margin-top: 6px; }

  /* offerings grid — two rows of three */
  .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
  .card {
    background: linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 100%);
    border: 1px solid var(--border); border-radius: var(--radius); padding: 30px;
    color: inherit; text-decoration: none; display: block;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
    display: block; color: inherit; text-decoration: none;
  }
  .card:hover { transform: translateY(-4px); border-color: var(--green); box-shadow: 0 20px 50px -24px rgba(242,169,59,.4); }
  .card .ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; margin-bottom: 18px; background: rgba(242,169,59,.12); border: 1px solid rgba(242,169,59,.25); }
  .card:nth-child(even) .ic { background: rgba(242,169,59,.12); border-color: rgba(242,169,59,.25); }
  /* Lucide icons: scale with the element's font-size instead of the fixed 24px attr */
  svg.lucide { width: 1em; height: 1em; }
  .ic svg.lucide { color: var(--orange); }
  .burger svg.lucide { width: 1.4em; height: 1.4em; vertical-align: middle; }
  .card h3 { font-size: 20px; font-weight: 700; }
  .card p { color: var(--muted); margin-top: 10px; font-size: 15px; }

  /* book / approach split */
  .split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
  .book-card {
    background: linear-gradient(150deg, var(--panel-2) 0%, var(--bg-2) 100%);
    border: 1px solid var(--border); border-radius: 20px; padding: 40px;
    position: relative; overflow: hidden;
  }
  .book-card::before { content:""; position:absolute; inset:0;
    background: radial-gradient(120% 100% at 50% 0%, rgba(242,169,59,.16), transparent 70%); }
  .book-card ul { list-style: none; padding: 0; margin: 22px 0 0; position: relative; }
  .book-card li { padding: 10px 0 10px 30px; position: relative; color: var(--text); border-top: 1px solid var(--border); }
  .book-card li:first-child { border-top: 0; }
  .book-card li::before { content: "→"; position: absolute; left: 0; color: var(--green); font-weight: 700; }

  /* CTA */
  .cta {
    text-align: center; padding: 80px 40px; border-radius: 24px; margin: 40px 0;
    background: linear-gradient(120deg, rgba(242,169,59,.14), rgba(242,169,59,.14) 55%, rgba(199,204,212,.12));
    border: 1px solid var(--border);
  }
  .cta h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
  .cta p { color: var(--muted); margin: 16px auto 32px; max-width: 46ch; font-size: 18px; }

  /* ---------- Events view ---------- */
  .page-hero { padding: 80px 0 40px; border-bottom: 1px solid var(--border); }
  .page-hero h1 { font-size: clamp(34px, 5vw, 52px); font-weight: 800; }
  .page-hero p { color: var(--muted); margin-top: 16px; font-size: 19px; max-width: 60ch; }
  .events-wrap { padding: 56px 0 96px; }
  .filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 36px; }
  .chip { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); font-size: 14px; font-weight: 500; cursor: pointer; background: transparent; transition: all .15s; }
  .chip.active, .chip:hover { color: var(--green); border-color: var(--green); background: rgba(242,169,59,.08); }
  .event-list { display: flex; flex-direction: column; gap: 18px; }
  .event {
    display: grid; grid-template-columns: 120px 1fr auto; gap: 28px; align-items: center;
    background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 30px;
    transition: border-color .2s, transform .2s;
  }
  .event:hover { border-color: var(--orange); transform: translateX(4px); }
  .event .date { text-align: center; border-right: 1px solid var(--border); padding-right: 20px; }
  .event .date .m { color: var(--orange); font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; }
  .event .date .d { font-size: 34px; font-weight: 800; line-height: 1; }
  .event .date .y { color: var(--muted); font-size: 13px; }
  .event .type, .resource .type { display: inline-block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--green); background: rgba(242,169,59,.1); border: 1px solid rgba(242,169,59,.25); padding: 3px 10px; border-radius: 999px; margin-bottom: 8px; }
  .event h3 { font-size: 21px; font-weight: 700; }
  .event .meta { color: var(--muted); font-size: 14px; margin-top: 6px; }
  .event .desc { color: var(--muted); font-size: 15px; margin-top: 8px; max-width: 60ch; }

  /* ---------- Resources view ---------- */
  .resource-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .resource { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: border-color .2s; }
  .resource:hover { border-color: var(--orange); }
  .resource-body { padding: 22px 26px 26px; }
  .resource-body h3 { font-size: 20px; font-weight: 700; }
  .resource-body .meta { color: var(--muted); font-size: 14px; margin-top: 6px; }
  .resource-body .desc { color: var(--muted); font-size: 15px; margin-top: 10px; }
  .resource-body .btn { margin-top: 18px; }
  .embed { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; }
  .resource .embed { border-radius: 0; }
  .embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

  .empty {
    text-align: center; padding: 90px 30px; border: 1px dashed var(--border); border-radius: 20px;
    background: var(--bg-2);
  }
  .empty .ic { font-size: 46px; margin-bottom: 18px; }
  .empty h3 { font-size: 24px; font-weight: 700; }
  .empty p { color: var(--muted); margin: 12px auto 28px; max-width: 46ch; font-size: 17px; }

  /* ---------- Workshops view ---------- */
  .ws-bundle {
    display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
    background: linear-gradient(120deg, rgba(242,169,59,.16), rgba(242,169,59,.14) 60%, rgba(199,204,212,.1));
    border: 1px solid var(--border); border-radius: 20px; padding: 32px 36px; margin-bottom: 20px;
  }
  .ws-bundle h3 { font-size: 24px; font-weight: 800; }
  .ws-bundle p { color: var(--muted); margin-top: 8px; max-width: 52ch; }
  .ws-bundle .price { font-size: 40px; font-weight: 800; }
  .ws-bundle .save { color: var(--orange); font-size: 14px; font-weight: 600; margin-top: 4px; }
  .ws-bundle .bundle-right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
  .ws-group { margin-top: 44px; }
  .ws-group > .lbl { color: var(--orange); font-weight: 600; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 20px; }
  .ws-card { display: flex; flex-direction: column; }
  .ws-card .tier { display: inline-block; align-self: flex-start; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--green); background: rgba(242,169,59,.1); border: 1px solid rgba(242,169,59,.25); padding: 3px 10px; border-radius: 999px; margin-bottom: 14px; }
  .ws-card .price-row { display: flex; align-items: baseline; gap: 10px; margin-top: 16px; }
  .ws-card .price-row .p { font-size: 28px; font-weight: 800; }
  .ws-card .price-row .dur { color: var(--muted); font-size: 14px; }
  .ws-card .ws-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
  .ws-card p { flex: 1; }

  /* ---------- Doc / workshop article ---------- */
  .doc { max-width: 880px; margin: 0 auto; padding: 8px 0 40px; }
  .doc .back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; font-weight: 500; margin-bottom: 28px; }
  .doc .back:hover { color: var(--green); }
  .doc h2 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; margin: 56px 0 8px; }
  .doc h2:first-of-type { margin-top: 8px; }
  .doc h3 { font-size: 21px; font-weight: 700; margin: 36px 0 6px; }
  .doc p { color: var(--text); margin: 16px 0; font-size: 17px; }
  .doc ul, .doc ol { color: var(--text); margin: 16px 0; padding-left: 22px; font-size: 17px; }
  .doc li { margin: 8px 0; }
  .doc li::marker { color: var(--green); }
  .doc a { color: var(--green); text-decoration: underline; text-underline-offset: 2px; }
  .doc a:hover { color: var(--orange); }
  .doc a.btn { text-decoration: none; }
  .doc a.btn-primary { color: #06130c; }
  .doc a.btn-primary:hover { color: #06130c; }
  .doc a.btn-ghost { color: var(--text); }
  .doc a.btn-ghost:hover { color: var(--orange); }
  .doc strong { color: var(--text); font-weight: 700; }
  .doc hr { border: 0; border-top: 1px solid var(--border); margin: 48px 0; }
  .doc code { font-family: 'JetBrains Mono', monospace; font-size: 13.5px; color: var(--orange); background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; }
  .doc pre { background: #16161A; border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; overflow-x: auto; margin: 20px 0; }
  .doc pre code { background: none; border: 0; padding: 0; font-size: 13px; line-height: 1.7; color: var(--orange); white-space: pre; }
  .doc blockquote { margin: 22px 0; padding: 14px 22px; border-left: 3px solid var(--green); background: var(--bg-2); border-radius: 0 12px 12px 0; color: var(--muted); }
  .doc blockquote p { color: var(--muted); }
  .doc blockquote strong { color: var(--text); }
  .doc .table-scroll { overflow-x: auto; margin: 22px 0; }
  .doc table { border-collapse: collapse; width: 100%; font-size: 15px; }
  .doc th, .doc td { border: 1px solid var(--border); padding: 10px 14px; text-align: left; vertical-align: top; }
  .doc th { background: var(--panel-2); font-weight: 700; }
  .doc .flow { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; margin: 28px 0; }
  .doc .flow-inputs { display: flex; flex-direction: column; gap: 10px; }
  .doc .flow-arrows { display: flex; flex-direction: column; justify-content: center; gap: 20px; align-self: stretch; color: var(--green); font-size: 20px; font-weight: 700; }
  .doc .flow .node { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; text-align: center; font-size: 14px; font-weight: 600; }
  .doc .flow .node span { display: block; color: var(--muted); font-weight: 400; font-size: 12px; margin-top: 2px; }
  .doc .flow .arrow { color: var(--green); font-size: 20px; font-weight: 700; }
  .doc .flow .band { background: linear-gradient(100deg, rgba(242,169,59,.16), rgba(242,169,59,.14)); border-color: var(--green); }

  /* ---------- Footer ---------- */
  footer { border-top: 1px solid var(--border); padding: 48px 0; margin-top: 40px; }
  .foot-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; color: var(--muted); font-size: 14px; }
  .foot-links { display: flex; gap: 22px; }
  .foot-links a:hover { color: var(--green); }

  /* ---------- Responsive ---------- */
  @media (max-width: 820px) {
    .nav-links { position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch;
      background: var(--bg-2); border-bottom: 1px solid var(--border); padding: 12px 24px 20px; display: none; }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 12px 14px; }
    .burger { display: block; }
    .split { grid-template-columns: 1fr; gap: 32px; }
    .metrics { grid-template-columns: 1fr; }
    .grid { grid-template-columns: 1fr; }
    .card:nth-child(n) { grid-column: 1 / -1; grid-row: auto; }
    .event { grid-template-columns: 90px 1fr; }
    .event .cta-col { grid-column: 1 / -1; }
    .event .date { padding-right: 14px; }
    .resource-list { grid-template-columns: 1fr; }
  }

/* ---- Auth forms + flash (Rails rebuild) ---- */
.auth-wrap { max-width: 460px; }
.auth-wrap .field { margin-bottom: 18px; }
.auth-wrap .field-inline { display: flex; align-items: center; gap: 8px; }
.auth-wrap label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--muted); }
.auth-wrap input[type="text"],
.auth-wrap input[type="email"],
.auth-wrap input[type="password"] {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg-2); color: var(--text);
  font-size: 16px;
}
.auth-wrap .actions { margin-top: 24px; }
.auth-wrap hr { border: none; border-top: 1px solid var(--border); margin: 28px 0; }
.auth-wrap a { color: var(--orange); }
.flash { max-width: 900px; margin: 90px auto 0; padding: 0 24px; }
.flash > div { padding: 12px 16px; border-radius: 10px; margin-bottom: 8px; border: 1px solid var(--border); }
.flash .notice { background: rgba(60,180,120,.12); color: #7fe0ac; }
.flash .alert  { background: rgba(220,80,80,.12);  color: #f2a1a1; }
.nav-links .cta-link { color: var(--orange); font-weight: 600; }

/* ============ Course catalog (Laracasts-inspired, Fulcorum palette) ============ */
.catalog .page-hero { padding-bottom: 8px; }

.track-row { padding: 26px 0; }
.track-head { margin-bottom: 16px; }
.track-head h2 { font-size: 24px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.track-icon { display: inline-grid; place-items: center; font-size: 22px; color: var(--orange); }
.track-head p { color: var(--muted); margin-top: 4px; max-width: 720px; }

.series-scroll {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(216px, 232px);
  gap: 18px; overflow-x: auto; padding: 6px 2px 18px; scroll-snap-type: x mandatory;
}
.series-scroll::-webkit-scrollbar { height: 8px; }
.series-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }

.series-card {
  display: block; text-decoration: none; color: inherit; scroll-snap-align: start;
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  background: var(--panel, var(--bg-2));
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.series-card:hover {
  transform: translateY(-6px);
  border-color: rgba(242,169,59,.55);
  box-shadow: 0 18px 44px -12px rgba(0,0,0,.6), 0 0 0 1px rgba(242,169,59,.12);
}

.series-poster {
  position: relative; aspect-ratio: 16/9; display: grid; place-items: center; overflow: hidden;
}
/* A soft highlight that blooms out from under the icon on hover — the poster is
   a flat gradient, so this is what gives it depth when the card is picked up. */
.series-poster::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 50% 42%, rgba(255,255,255,.22), rgba(255,255,255,0) 62%);
  opacity: 0; transition: opacity .22s ease;
}
.series-card:hover .series-poster::after { opacity: 1; }

/* Cards carry an icon, not artwork. svg.lucide is sized in em, so the font-size
   here is what scales it. */
.poster-icon {
  display: grid; place-items: center; font-size: 46px; color: rgba(255,255,255,.92);
  position: relative; z-index: 1;
  transition: transform .28s cubic-bezier(.2,.8,.3,1), color .22s ease, filter .22s ease;
}
.poster-icon svg.lucide { stroke-width: 1.5; filter: drop-shadow(0 2px 8px rgba(0,0,0,.25)); }
.series-card:hover .poster-icon {
  transform: scale(1.14) rotate(-4deg);
  color: #fff;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,.4));
}
.poster-grad-0 { background: linear-gradient(135deg, var(--orange), var(--orange-2)); }
.poster-grad-1 { background: linear-gradient(135deg, var(--green), var(--green-2)); }
.poster-grad-2 { background: linear-gradient(135deg, var(--silver), var(--silver-2)); }
.poster-grad-3 { background: linear-gradient(135deg, var(--orange-2), var(--green)); }

.series-card-body { padding: 12px 14px 14px; }
.series-card-body h3 { font-size: 16px; font-weight: 800; transition: color .18s ease; }
.series-card:hover .series-card-body h3 { color: var(--orange); }
.series-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--muted); font-size: 12.5px; margin-top: 4px; }
/* Pills live under the meta line, not over the poster: on a bright gradient
   they washed out, and down here they read as data about the course. */
.series-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  letter-spacing: .06em; text-transform: uppercase; line-height: 1.5;
  border: 1px solid transparent; transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.badge-free {
  background: rgba(242,169,59,.14); color: #f7c46e; border-color: rgba(242,169,59,.4);
}
.series-card:hover .badge-free { background: rgba(242,169,59,.24); border-color: rgba(242,169,59,.7); color: #fbd79a; }
/* A sample, not the whole course — the same amber, held back to an outline so
   it reads as a step below the solid Free pill. */
.badge-free-lessons {
  background: transparent; color: #d9a95f; border-color: rgba(242,169,59,.35);
  border-style: dashed;
}
.series-card:hover .badge-free-lessons { color: #f7c46e; border-color: rgba(242,169,59,.6); }

/* One amber accent, three strengths — the dot carries the level, so the label
   itself can stay legible instead of being dimmed into the background. */
.badge-level { background: rgba(255,255,255,.05); color: #b9b7b2; border-color: var(--border); }
.badge-level::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; opacity: .9;
}
.badge-level.level-beginner { color: #cfcdc8; }
.badge-level.level-beginner::before { background: #8fd6ad; }
.badge-level.level-intermediate::before { background: var(--green); }
.badge-level.level-advanced::before { background: #e0703c; }
.series-card:hover .badge-level { background: rgba(255,255,255,.09); border-color: #3a3a44; color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  .series-card, .series-card:hover,
  .poster-icon, .series-card:hover .poster-icon { transform: none; transition: none; }
  .series-poster::after { transition: none; }
}

/* Series detail */
.series-hero { border-bottom: 1px solid var(--border); background: var(--bg-2); }
.series-hero-inner { display: grid; grid-template-columns: 320px 1fr; gap: 32px; padding: 40px 0; align-items: center; }
.series-hero-poster { aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; display: grid; place-items: center; }
.series-hero-poster .poster-icon { font-size: 72px; }
.series-hero-body h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; margin: 8px 0; }
.crumbs { color: var(--muted); font-size: 14px; }
.crumbs a { color: var(--orange); }
.series-desc { color: var(--muted); font-size: 17px; margin: 14px 0 20px; max-width: 680px; }

/* Episode list */
/* An <ol>, so the browser's default padding-inline-start: 40px and 1em block
   margins apply unless they're cleared. Unset, they indent every row by 40px —
   which in the 340px watch sidebar swallows the title column and wraps short
   lesson names onto three lines. */
.episode-list { list-style: none; margin: 0; padding: 0; max-width: 860px; }
.episode { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; background: var(--panel, var(--bg-2)); }
.episode-link { display: flex; align-items: center; gap: 16px; padding: 14px 18px; text-decoration: none; color: inherit; }
.episode:hover { border-color: var(--orange); }
.episode-num { flex: 0 0 28px; text-align: center; font-weight: 800; color: var(--muted); }
.episode-title { flex: 1; font-weight: 700; }
.episode-title small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; margin-top: 2px; }
.episode-tags { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.episode.locked .episode-title { color: var(--muted); }

/* Watch / player */
.watch-grid { display: grid; grid-template-columns: 1fr 340px; gap: 28px; padding: 28px 24px; }
/* 16/9 is the fallback only. Lessons are screen recordings of varying shape, so
   the views set aspect-ratio inline from the ratio Mux reported — that reserves
   the right space at first paint, which is what keeps the page from jumping.
   grid-template-rows pins the row to the frame so mux-player's height:100% has
   something definite to resolve against; without it the player falls back to
   the media's ratio, outgrows the frame, and overflow:hidden clips the
   control bar. */
.player { aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: #000; display: grid; grid-template-rows: 100%; place-items: center; }

/* Mux fades the control bar out after ~2s of inactivity. Lessons get watched,
   not scrubbed, so keep the bar and the scrubber up the whole time. Both are
   exported as CSS parts, which is why a document rule can reach them.
   Do not set --controls here: it feeds straight into `display`, and any value
   that isn't a valid display (`auto`) collapses every control to inline. */
/* Control icons and timecode in the site's amber (--green is that token). */
mux-player { --media-primary-color: var(--green); }

mux-player::part(control-bar),
mux-player::part(time range) { opacity: 1; }

/* Mux only paints its backdrop while paused or while the pointer is moving, so
   pinned controls sit unscrimmed over the video. White icons on a bright frame
   (a terminal on a light theme) then read as no controls at all. */
mux-player::part(vertical-layer) {
  background: linear-gradient(to top, rgba(0,0,0,.72) 0, rgba(0,0,0,.42) 46px, rgba(0,0,0,0) 110px);
}

.player-placeholder, .paywall { text-align: center; padding: 24px; }
.pp-icon { font-size: 46px; }
.pp-title { font-size: 20px; font-weight: 800; margin-top: 8px; }
.pp-note { color: var(--muted); margin-top: 6px; }
.paywall .actions { justify-content: center; margin-top: 18px; display: flex; gap: 12px; flex-wrap: wrap; }
.watch-info { padding-top: 22px; }
.watch-info h1 { font-size: 26px; font-weight: 800; margin: 8px 0; }
.watch-sidebar { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; align-self: start; position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow-y: auto; background: var(--panel, var(--bg-2)); }
.ws-head { margin-bottom: 12px; }
.ws-head a { font-weight: 800; }
.ws-head small { display: block; color: var(--muted); margin-top: 2px; }
.episode-list.compact .episode { margin-bottom: 6px; border-radius: 10px; }
.episode-list.compact .episode-link { padding: 10px 12px; gap: 10px; font-size: 14px; }
.episode-list.compact .episode-title small { display: none; }
.episode.current { border-color: var(--orange); background: rgba(242,169,59,.08); }

/* ---- Lesson resources ---- */
/* Links the lesson refers to. Rendered under the description, so they read as
   part of the lesson rather than as another nav rail. */
.resources { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--border); }
.resources-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
}
.resources-head svg.lucide { width: 15px; height: 15px; }
.resources-count {
  font-size: 11px; letter-spacing: 0; color: var(--orange);
  background: rgba(242,169,59,.12); border: 1px solid rgba(242,169,59,.3);
  border-radius: 999px; padding: 1px 8px;
}
.resource-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; max-width: 680px; }
.resource-link {
  display: flex; align-items: center; gap: 13px;
  padding: 11px 14px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--panel, var(--bg-2));
  transition: border-color .18s ease, background .18s ease;
}
.resource-link:hover { border-color: var(--orange); background: rgba(242,169,59,.06); }
/* svg.lucide is sized in em, so the font-size on the tile is what scales it. */
.resource-icon {
  flex: 0 0 34px; height: 34px; display: grid; place-items: center; font-size: 17px;
  border-radius: 9px; background: rgba(242,169,59,.12); color: var(--orange);
  transition: background .18s ease;
}
.resource-link:hover .resource-icon { background: rgba(242,169,59,.2); }
/* min-width:0 is what lets the title actually ellipsize inside the flex row. */
.resource-body { flex: 1; min-width: 0; }
.resource-title, .resource-host { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resource-title { font-weight: 700; font-size: 15px; }
.resource-host { color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.resource-go { flex: 0 0 auto; color: var(--muted); display: grid; font-size: 16px; transition: color .18s ease, transform .18s ease; }
.resource-link:hover .resource-go { color: var(--orange); transform: translate(2px, -2px); }

@media (prefers-reduced-motion: reduce) {
  .resource-link, .resource-icon, .resource-go { transition: none; }
  .resource-link:hover .resource-go { transform: none; }
}

@media (max-width: 900px) {
  .watch-grid { grid-template-columns: 1fr; }
  .watch-sidebar { position: static; max-height: none; }
  .series-hero-inner { grid-template-columns: 1fr; }
}

/* ============ Admin ============ */
.admin-body { padding-top: 0; }
.admin-wrap { padding: 110px 24px 60px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.admin-head h1 { font-size: 28px; font-weight: 800; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.admin-table th { color: var(--muted); font-weight: 700; text-transform: uppercase; font-size: 12px; letter-spacing: .04em; }
.admin-table tr:hover td { background: var(--bg-2); }
.row-actions { display: flex; gap: 14px; white-space: nowrap; }
.row-actions a { color: var(--orange); }
.linklike { background: none; border: none; color: #f2a1a1; cursor: pointer; padding: 0; font: inherit; }
.admin-wrap form { max-width: 620px; }
.admin-wrap .field { margin-bottom: 16px; }
.admin-wrap .field-inline { display: flex; align-items: center; gap: 8px; }
.admin-wrap label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--muted); }
.admin-wrap .field-inline label { margin-bottom: 0; }
.admin-wrap input[type="text"], .admin-wrap input[type="number"], .admin-wrap input[type="url"], .admin-wrap textarea, .admin-wrap select {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg-2); color: var(--text); font-size: 15px; font-family: inherit;
}
.admin-wrap .actions { display: flex; gap: 12px; margin-top: 24px; }
.admin-errors { background: rgba(220,80,80,.12); color: #f2a1a1; padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; }

/* ============ Pricing ============ */
.pricing-grid { grid-template-columns: repeat(2, minmax(260px, 380px)); justify-content: center; align-items: stretch; }
.plan { display: flex; flex-direction: column; text-align: left; position: relative; }
.plan h3 { font-size: 20px; font-weight: 800; }
.plan .price { font-size: 40px; font-weight: 900; margin: 8px 0 2px; }
.plan .price span { font-size: 16px; font-weight: 600; color: var(--muted); }
.plan .plan-sub { color: var(--muted); margin-bottom: 14px; }
.plan ul { list-style: none; margin: 0 0 20px; padding: 0; flex: 1; }
.plan ul li { padding: 7px 0 7px 24px; position: relative; color: var(--muted); }
.plan ul li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }
.plan .btn { width: 100%; justify-content: center; text-align: center; }
.plan .btn + .btn { margin-top: 8px; }
.plan form { width: 100%; }
.plan-featured { border-color: var(--orange); box-shadow: 0 12px 40px rgba(242,169,59,.12); }
.plan-featured .tier { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; background: var(--orange); color: #1a1205; }
[aria-disabled="true"] { opacity: .6; pointer-events: none; }
.account-sub { border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; margin-bottom: 24px; background: var(--bg-2); }
.account-sub .status-on { color: var(--green); font-weight: 700; }
.account-sub .status-off { color: var(--muted); }
@media (max-width: 760px) { .pricing-grid { grid-template-columns: 1fr; } }

/* ---- Admin Mux upload widget ---- */
.mux-upload { border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; margin-bottom: 22px; background: var(--bg-2); max-width: 620px; }
.mux-upload-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.mux-upload-note { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.mux-progress { height: 8px; background: var(--border); border-radius: 999px; overflow: hidden; margin-top: 12px; }
.mux-progress-bar { height: 100%; width: 0; background: var(--orange); transition: width .2s ease; }
.mux-upload-status { color: var(--muted); font-size: 14px; margin-top: 8px; min-height: 18px; }

/* ---- Admin resource rows ---- */
.resources-fields { border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; margin-bottom: 22px; background: var(--bg-2); }
.resources-fields-head { margin-bottom: 12px; }
.resources-fields-head .mux-upload-note { display: block; margin: 4px 0 0; }
.resources-empty { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.resource-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
/* URL first and wider — it's the field that carries the record; the label is optional. */
.resource-row-fields { flex: 1; min-width: 0; display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; }
.admin-wrap .resource-row-fields input { margin: 0; }
.resource-row-actions { display: flex; gap: 4px; }
.resource-row-actions button {
  width: 30px; height: 34px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--border); background: var(--panel, var(--bg-2)); color: var(--muted);
  font: inherit; line-height: 1;
}
.resource-row-actions button:hover { border-color: var(--orange); color: var(--orange); }
.resource-row-actions button.danger:hover { border-color: #f2a1a1; color: #f2a1a1; }
.btn-sm { padding: 8px 16px; font-size: 14px; }

@media (max-width: 620px) {
  .resource-row-fields { grid-template-columns: 1fr; }
}

/* ---------- Progress: the Complete toggle and its bar ---------- */
/* The toggle is a form, so it has to sit flush inside the rows it appears in. */
.episode-done form, .lesson-actions form { display: inline-flex; margin: 0; }

.btn-done {
  background: rgba(242,169,59,.14); border-color: rgba(242,169,59,.55); color: var(--orange);
}
.btn-done:hover { background: rgba(242,169,59,.22); border-color: var(--orange); color: #fbd79a; }

.cp-bar { height: 8px; background: var(--border); border-radius: 999px; overflow: hidden; }
.cp-bar > span {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--green-2), var(--orange));
  transition: width .3s ease;
}
.cp-meta { color: var(--muted); font-size: 13px; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cp-meta strong { color: var(--text); font-weight: 700; }
.cp-locked { color: var(--muted); }

.series-progress { max-width: 420px; margin-top: 18px; }

.badge-done { background: rgba(242,169,59,.16); border-color: rgba(242,169,59,.55); color: var(--orange); }

/* Episode rows carry the toggle beside the link rather than inside it. */
.episode-row { display: flex; align-items: center; gap: 8px; }
.episode-row .episode-link { flex: 1; min-width: 0; }
.episode-done { padding-right: 14px; }
.episode.done { border-color: rgba(242,169,59,.4); }
.episode.done .episode-num { color: var(--orange); }
.episode-list.compact .episode-num svg.lucide { width: .95em; height: .95em; }

/* Watch page: the toggle, the course count, and the way onward. */
.lesson-actions {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin: 18px 0 4px; padding: 14px 0; border-block: 1px solid var(--border);
}
.lesson-progress { color: var(--muted); font-size: 14px; }
.lesson-next { color: var(--orange); font-size: 14px; font-weight: 600; margin-left: auto; }
.lesson-next:hover { color: #fbd79a; }
.ws-head .cp-bar { margin-top: 10px; }

/* ---------- Dashboard ---------- */
.dash-hero { padding-bottom: 34px; }
.dash-hero .kick { color: var(--orange); font-weight: 600; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
.dash-hero h1 { margin-top: 10px; font-size: clamp(30px, 4.4vw, 46px); }

.stat-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.stat {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 22px; min-width: 138px;
}
.stat-num { font-size: 30px; font-weight: 900; line-height: 1.1; }
.stat-label { color: var(--muted); font-size: 13px; margin-top: 2px; }

.dash-upgrade {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  background: linear-gradient(150deg, var(--panel-2) 0%, var(--bg-2) 100%);
  border: 1px solid rgba(242,169,59,.35); border-radius: var(--radius);
  padding: 24px 28px; margin-bottom: 46px;
}
.dash-upgrade h2 { font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.dash-upgrade h2 svg.lucide { color: var(--orange); }
.dash-upgrade p { color: var(--muted); margin-top: 8px; font-size: 15px; max-width: 62ch; }

.dash-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  margin: 46px 0 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.dashboard .dash-head:first-of-type { margin-top: 0; }
.dash-head h2 { font-size: 22px; font-weight: 800; }
.dash-head a { color: var(--orange); font-size: 14px; font-weight: 600; }
.dash-head-note { color: var(--muted); font-size: 13px; }

.course-progress-list { display: flex; flex-direction: column; gap: 14px; }
.course-progress {
  display: grid; grid-template-columns: 132px 1fr 210px; gap: 22px; align-items: center;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px;
  transition: border-color .2s ease;
}
.course-progress:hover { border-color: var(--orange); }
.course-progress.is-complete { border-color: rgba(242,169,59,.4); }
.cp-poster { aspect-ratio: 16/9; border-radius: 10px; display: grid; place-items: center; overflow: hidden; }
.cp-poster .poster-icon { font-size: 34px; }
.cp-body { min-width: 0; }
.cp-track { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.cp-body h3 { font-size: 18px; font-weight: 800; margin: 4px 0 12px; }
.cp-body h3 a:hover { color: var(--orange); }
.cp-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; text-align: right; }
.cp-next { color: var(--muted); font-size: 13px; }
.cp-actions .btn { white-space: nowrap; }

/* ---------- Awards ---------- */
.award-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.award {
  display: flex; gap: 14px; padding: 18px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
}
.award-ic {
  flex: 0 0 42px; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  font-size: 20px; background: rgba(255,255,255,.04); border: 1px solid var(--border); color: var(--muted);
}
.award-body h3 { font-size: 16px; font-weight: 800; }
.award-body p { color: var(--muted); font-size: 13.5px; margin-top: 6px; }
.award-foot { color: var(--muted); font-size: 12px; margin-top: 10px; display: flex; align-items: center; gap: 6px; }
.award.earned {
  border-color: rgba(242,169,59,.5);
  background: linear-gradient(180deg, rgba(242,169,59,.10) 0%, var(--panel) 100%);
}
.award.earned .award-ic { background: rgba(242,169,59,.16); border-color: rgba(242,169,59,.5); color: var(--orange); }
.award.earned .award-foot { color: var(--orange); }
.award.locked { border-style: dashed; }
.award.locked .award-body h3 { color: var(--muted); }

/* ---------- Recent activity ---------- */
.activity { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.activity li {
  display: flex; align-items: center; gap: 14px;
  border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; background: var(--bg-2);
}
.activity-ic { color: var(--orange); font-size: 18px; display: grid; place-items: center; }
.activity-body { flex: 1; min-width: 0; font-weight: 600; }
.activity-body a:hover { color: var(--orange); }
.activity-body small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.activity-when { color: var(--muted); font-size: 13px; white-space: nowrap; }

@media (max-width: 860px) {
  .course-progress { grid-template-columns: 96px 1fr; }
  .cp-actions { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; text-align: left; }
}

@media (max-width: 620px) {
  .stat { flex: 1; min-width: 108px; padding: 12px 16px; }
  .stat-num { font-size: 24px; }
  .lesson-next { margin-left: 0; }
  .episode-row { flex-wrap: wrap; }
  .episode-done { padding: 0 14px 14px 60px; }
}

@media (prefers-reduced-motion: reduce) {
  .cp-bar > span, .course-progress { transition: none; }
}

/* ---------- Plan banner (trial countdown / failed payment) ---------- */
.plan-banner {
  background: linear-gradient(90deg, rgba(242,169,59,.16) 0%, rgba(242,169,59,.06) 100%);
  border-bottom: 1px solid rgba(242,169,59,.35);
}
.plan-banner.is-warning {
  background: linear-gradient(90deg, rgba(224,112,60,.18) 0%, rgba(224,112,60,.06) 100%);
  border-bottom-color: rgba(224,112,60,.45);
}
.plan-banner-inner { display: flex; align-items: center; gap: 14px; padding: 12px 24px; flex-wrap: wrap; }
.plan-banner-ic { color: var(--orange); font-size: 18px; display: grid; place-items: center; }
.plan-banner.is-warning .plan-banner-ic { color: #e0703c; }
.plan-banner p { flex: 1; min-width: 220px; font-size: 14.5px; color: var(--text); }
.plan-banner p strong { font-weight: 700; }
.plan-banner form { margin: 0; display: inline-flex; }
.plan-banner-close {
  width: 30px; height: 30px; border-radius: 8px; cursor: pointer; flex: 0 0 30px;
  border: 1px solid transparent; background: transparent; color: var(--muted);
  font: inherit; font-size: 20px; line-height: 1; padding: 0;
}
.plan-banner-close:hover { border-color: var(--border); color: var(--text); background: rgba(255,255,255,.05); }

/* ---------- Account: subscription panel ---------- */
.account-plan { margin-bottom: 34px; }
.account-plan-head { font-size: 18px; font-weight: 800; margin-bottom: 14px; }
.plan-state {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 22px;
}
.plan-state.is-on { border-color: rgba(242,169,59,.4); }
.plan-state.needs-attention { border-color: rgba(224,112,60,.55); background: linear-gradient(180deg, rgba(224,112,60,.10) 0%, var(--panel) 100%); }
.plan-state-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.plan-state-name { font-size: 17px; font-weight: 800; }
.plan-state-name span { color: var(--muted); font-weight: 600; }
.plan-state-note { color: var(--muted); font-size: 14px; margin-top: 6px; max-width: 52ch; }

.badge-plan {
  background: rgba(242,169,59,.16); border-color: rgba(242,169,59,.5); color: var(--orange);
  white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
}
.badge-plan.is-active { background: rgba(143,214,173,.14); border-color: rgba(143,214,173,.45); color: #8fd6ad; }
.badge-plan.is-ending { background: rgba(224,112,60,.16); border-color: rgba(224,112,60,.5); color: #e0703c; }

.plan-facts { display: flex; flex-wrap: wrap; gap: 28px; margin: 18px 0 0; }
.plan-facts dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.plan-facts dd { margin: 4px 0 0; font-weight: 700; font-size: 15px; }
.plan-state .actions { margin-top: 20px; }
.plan-note { color: var(--muted); font-size: 13px; margin-top: 12px; max-width: 56ch; }

.plan-offer {
  margin-top: 14px; padding: 20px 22px;
  background: linear-gradient(150deg, var(--panel-2) 0%, var(--bg-2) 100%);
  border: 1px solid rgba(242,169,59,.35); border-radius: var(--radius);
}
.plan-offer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.plan-offer-head h3 { font-size: 17px; font-weight: 800; }
.plan-offer-price { font-size: 28px; font-weight: 900; white-space: nowrap; }
.plan-offer-price span { font-size: 14px; font-weight: 600; color: var(--muted); }
.plan-offer ul { list-style: none; margin: 16px 0 18px; padding: 0; }
.plan-offer ul li { padding: 5px 0 5px 24px; position: relative; color: var(--muted); font-size: 14.5px; }
.plan-offer ul li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }
.plan-offer form { margin: 0; }

@media (max-width: 620px) {
  .plan-banner-inner { padding: 12px 24px; gap: 10px; }
  .plan-banner p { min-width: 100%; order: 2; }
  .plan-banner-close { order: 1; margin-left: auto; }
  .plan-state-top, .plan-offer-head { flex-direction: column; }
}

/* ---------- Auth pages (Devise) ---------- */
.auth-links {
  display: flex; flex-wrap: wrap; gap: 6px 20px;
  margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border);
  font-size: 14.5px;
}
.auth-wrap .auth-links a { color: var(--orange); }
.auth-wrap .auth-links a:hover { color: #fbd79a; }
.auth-note { color: var(--muted); font-size: 14px; margin-top: 14px; }
.auth-wrap .field i { color: var(--muted); font-size: 13px; font-style: normal; }

/* Validation errors, rendered above the form they belong to. */
.form-errors {
  background: rgba(224,112,60,.10); border: 1px solid rgba(224,112,60,.45);
  border-radius: 12px; padding: 16px 18px; margin-bottom: 22px;
}
.form-errors h2 {
  font-size: 15px; font-weight: 700; color: #e0703c;
  display: flex; align-items: center; gap: 8px;
}
.form-errors ul { margin: 10px 0 0; padding-left: 20px; color: var(--text); font-size: 14px; }
.form-errors li { margin-top: 4px; }

/* ---------- Catalog: the free rows lead the page ---------- */
.free-row { border-bottom: 1px solid var(--border); }
.free-row .track-head h2 { color: var(--text); }
.free-row .track-icon { color: var(--orange); }

.free-lessons-row { border-bottom: 1px solid var(--border); }
.free-lessons-row .track-head h2 { color: var(--text); }
.free-lessons-row .track-icon { color: var(--orange); }

/* ---------- Focus ---------- */
/* Nothing defined a focus state, so every input fell back to the browser's
   blue ring — the one colour this palette doesn't contain. The outline is
   replaced rather than removed, so keyboard users still see where they are. */
.auth-wrap input[type="text"]:focus,
.auth-wrap input[type="email"]:focus,
.auth-wrap input[type="password"]:focus,
.admin-wrap input[type="text"]:focus,
.admin-wrap input[type="number"]:focus,
.admin-wrap input[type="url"]:focus,
.admin-wrap textarea:focus,
.admin-wrap select:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(242, 169, 59, .18);
}

/* Buttons and links keep a ring only for keyboard navigation, so a mouse click
   doesn't leave one behind. */
.btn:focus-visible,
.nav-links a:focus-visible,
.plan-banner-close:focus-visible,
.auth-links a:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* ---------- Pricing: one plan, one button ---------- */
.plan-head { max-width: 620px; margin-bottom: 36px; }

.plan-single {
  max-width: 560px; margin: 0 auto; padding: 30px 32px;
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 100%);
  border: 1px solid var(--orange); border-radius: var(--radius);
  box-shadow: 0 24px 60px -30px rgba(242, 169, 59, .45);
}
.plan-single-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.plan-single-top h3 { font-size: 20px; font-weight: 800; }
.plan-single-sub { color: var(--muted); font-size: 14.5px; margin-top: 6px; max-width: 34ch; }

.plan-flag {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 6px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  background: var(--orange); color: #1a1205;
}

/* The price is the point of the panel, so it gets the largest type on it. */
.plan-single-price { margin: 22px 0 4px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.plan-single-price .amount { font-size: 52px; font-weight: 900; line-height: 1; letter-spacing: -0.03em; }
.plan-single-price .per { font-size: 17px; font-weight: 700; color: var(--muted); }
.plan-single-price .after { flex: 1 0 100%; color: var(--orange); font-size: 14.5px; font-weight: 600; }

.plan-single-list { list-style: none; margin: 24px 0 0; padding: 0; border-top: 1px solid var(--border); }
.plan-single-list li { padding: 9px 0 9px 26px; position: relative; color: var(--text); font-size: 15px; }
.plan-single-list li:first-child { padding-top: 18px; }
.plan-single-list li::before {
  content: "\2713"; position: absolute; left: 0; top: 9px; color: var(--green); font-weight: 800;
}
.plan-single-list li:first-child::before { top: 18px; }

.plan-single-cta { margin-top: 26px; }
.plan-single-cta form { margin: 0; }
.plan-single-cta .btn { width: 100%; justify-content: center; }
.plan-single-cta .btn + .btn { margin-top: 10px; }
.btn-lg { padding: 16px 28px; font-size: 16.5px; }
.plan-single-cta .plan-note { text-align: center; margin-top: 14px; max-width: none; }

.plan-free-note {
  max-width: 560px; margin: 22px auto 0; padding: 14px 18px;
  border: 1px dashed var(--border); border-radius: 12px;
  color: var(--muted); font-size: 14px; text-align: center;
}
.plan-free-note strong { color: var(--text); }
.plan-free-note svg.lucide { color: var(--green); vertical-align: -2px; }
.plan-free-note a { color: var(--orange); font-weight: 600; }

@media (max-width: 620px) {
  .plan-single { padding: 24px 20px; }
  .plan-single-top { flex-direction: column-reverse; align-items: flex-start; }
  .plan-single-price .amount { font-size: 42px; }
}

/* ---------- Icon motion ----------
   lucide injects class="lucide lucide-<name>", so an icon can be animated by
   what it is rather than by where it sits. There is no lucide-animate package
   (the one on npm is React + Motion, which this stack doesn't have) — and it
   isn't needed: these are inline SVGs by the time they reach the page.

   EMBER is a still design, so this stays interaction-driven — motion on hover
   or when a state changes. The exceptions are the plan notices and the free
   row, where being noticed is the whole job, and those tick slowly with long
   pauses rather than looping tightly. */

@keyframes icon-spin { to { transform: rotate(360deg); } }

@keyframes icon-pop {
  0%   { transform: scale(.4); opacity: 0; }
  60%  { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes icon-twinkle {
  0%, 55%, 100% { transform: scale(1) rotate(0); }
  70%           { transform: scale(1.2) rotate(14deg); }
  85%           { transform: scale(1.06) rotate(-6deg); }
}

/* Mostly still, with a brief shake every few seconds — an alert that asks for
   attention without demanding it continuously. */
@keyframes icon-attention {
  0%, 68%, 100% { transform: rotate(0); }
  73%           { transform: rotate(-9deg); }
  78%           { transform: rotate(7deg); }
  83%           { transform: rotate(-4deg); }
  88%           { transform: rotate(0); }
}

svg.lucide { transition: transform .18s ease; }

/* --- Hover --- */
.btn:hover svg.lucide,
.nav-links a:hover svg.lucide,
.auth-links a:hover svg.lucide { transform: scale(1.12); }

.btn:hover svg.lucide-play { transform: translateX(2px) scale(1.12); }
.btn:hover svg.lucide-settings { animation: icon-spin 1.8s linear infinite; }
.btn:hover svg.lucide-sparkles,
.plan-free-note a:hover svg.lucide { animation: icon-twinkle 1.1s ease; }
.lesson-next:hover svg.lucide-arrow-up-right { transform: translate(2px, -2px) scale(1.1); }
.dash-head a:hover svg.lucide { transform: scale(1.12); }

/* --- On the state changing --- */
/* Ticked off, or an award just earned: one pop as the new state renders. */
.btn-done svg.lucide,
.episode.done .episode-num svg.lucide { animation: icon-pop .34s ease-out; }
.award.earned .award-ic svg.lucide { animation: icon-pop .42s ease-out; }
.award.earned:hover .award-ic svg.lucide { animation: icon-twinkle 1.1s ease; }
.form-errors h2 svg.lucide { animation: icon-attention 1.4s ease-out; }

/* --- Ambient, only where the point is to be seen --- */
.plan-banner .plan-banner-ic svg.lucide-sparkles,
.plan-flag svg.lucide-sparkles,
.free-row .track-icon svg.lucide-sparkles { animation: icon-twinkle 4.5s ease-in-out infinite; }

.plan-banner.is-warning .plan-banner-ic svg.lucide-shield-alert,
.plan-state.needs-attention .badge-plan svg.lucide { animation: icon-attention 5s ease-in-out infinite; }

/* The one rule that has to win: motion is off when the reader asks for it off.
   The hover and state selectors above are more specific than a plain reset
   would be, so this overrides rather than out-specifies them. */
@media (prefers-reduced-motion: reduce) {
  svg.lucide {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}
