/* LearNix Platform — inner pages (tokens from site.css) */

.page-shell {
  padding-top: 72px;
  min-height: 70vh;
  overflow-x: hidden;
}
.page-hero {
  padding: 40px 0 24px;
  border-bottom: 1px solid var(--ln-line);
  background:
    radial-gradient(ellipse at 10% 0%, rgba(255,107,0,.1), transparent 50%),
    var(--ln-bg);
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 10px;
  overflow-wrap: break-word;
}
.page-hero p {
  color: var(--ln-muted);
  max-width: 42rem;
  margin: 0;
  line-height: 1.6;
}
.about-prose { max-width: 760px; }
.about-prose h2 { margin: 2rem 0 .6rem; font-size: 1.35rem; }
.about-prose p,
.about-prose li { color: var(--ln-muted); line-height: 1.65; }
.about-prose ul,
.about-prose ol { padding-left: 1.2rem; }
.about-prose li { margin: .4rem 0; }
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.about-grid h3 { margin: 0 0 8px; font-size: 1.1rem; }
.about-grid p { color: var(--ln-muted); line-height: 1.55; margin: 0; }
.about-steps { margin: 0; }
.about-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
@media (max-width: 800px) {
  .about-grid { grid-template-columns: 1fr; }
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 0;
}
.filters select,
.filters input[type="search"] {
  border: 1px solid var(--ln-line);
  background: #fff;
  color: var(--ln-ink);
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  max-width: 100%;
  color-scheme: light;
}
.filters input[type="search"] {
  flex: 1 1 220px;
  min-width: 0;
}

.cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.cat-chip {
  border: 1px solid var(--ln-line);
  background: #fff;
  color: var(--ln-ink);
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-weight: 600;
  font-size: .88rem;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.cat-chip:hover {
  border-color: color-mix(in srgb, var(--ln-accent, #ff6b00) 45%, var(--ln-line));
}
.cat-chip.is-on {
  background: var(--ln-ink, #121212);
  color: #fff;
  border-color: transparent;
}
.cat-section {
  margin-top: 8px;
}
.cat-empty {
  color: var(--ln-muted);
  font-size: .9rem;
  background: var(--ln-soft, #faf6fa);
  border: 1px dashed var(--ln-line, #f1e7ee);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 0 0 8px;
}
.cat-grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.cat-grid-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--ln-line, #f1e7ee);
  border-radius: 16px;
  padding: 14px;
  color: #1A1A1A;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
}
.cat-grid-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(27, 14, 31, .08);
}
.cat-grid-card .category-acc-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  flex-shrink: 0;
}
.cat-grid-card strong {
  font-size: .92rem;
  display: block;
  letter-spacing: -0.01em;
  color: #1A1A1A;
}
.cat-grid-card small {
  color: #888888;
  font-size: .76rem;
}
.cat-section h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 14px;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
}
.cat-section h2 small {
  display: block;
  color: var(--ln-muted);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: 0;
}

.course-grid.platform {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.category-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}
.category-stack-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 4px;
}
.category-stack-toolbar button {
  border: 0;
  background: transparent;
  color: var(--ln-accent, #ff6b00);
  font: inherit;
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
}
.category-acc {
  border: 1px solid var(--ln-line);
  background: var(--ln-surface, #fff);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(12, 12, 13, 0.05);
}
.category-acc > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
}
.category-acc > summary::-webkit-details-marker { display: none; }
.category-acc-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.15rem;
  flex: 0 0 auto;
  box-shadow: 0 8px 16px rgba(0,0,0,.12);
}
.category-acc-copy { flex: 1; min-width: 0; }
.category-acc-copy strong {
  display: block;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}
.category-acc-copy small {
  color: var(--ln-muted);
}
.category-acc-chevron {
  color: var(--ln-muted);
  transition: transform .25s ease;
}
.category-acc[open] .category-acc-chevron { transform: rotate(180deg); }
.category-acc-body {
  padding: 0 14px 16px;
}
.category-acc-body .course-grid.platform {
  margin-top: 0;
}
.category-acc-empty {
  color: var(--ln-muted);
  font-size: .9rem;
  padding: 4px 2px 8px;
}
.course-card.platform {
  background: var(--ln-surface);
  border: 1px solid var(--ln-line);
  border-radius: 20px;
  overflow: hidden;
  text-align: left;
  color: inherit;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: transform .3s var(--ease-out), box-shadow .3s;
  text-decoration: none;
}
.course-card.platform:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(12,12,13,.1);
}
.course-card.platform .course-thumb {
  aspect-ratio: 16/10;
  background: #1a1a1c center/cover no-repeat;
}
.course-card.platform .course-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.course-card.platform h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .02em;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--ln-bg);
  color: var(--ln-ink-soft);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.badge.free { background: rgba(34,197,94,.12); color: #15803d; }
.badge.owned { background: rgba(255,107,0,.12); color: var(--ln-orange-deep); }

.progress-line { margin-top: 8px; min-width: 0; }
.progress-bar { height: 6px; border-radius: 99px; background: rgba(12,12,13,.08); overflow: hidden; }
.progress-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--ln-orange), var(--ln-orange-deep)); }

.detail-layout,
.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, .7fr);
  gap: 28px;
  padding: 36px 0 64px;
  min-width: 0;
}
.detail-main { min-width: 0; }
.detail-cover {
  aspect-ratio: 16/9;
  border-radius: 22px;
  background: #1a1a1c center/cover no-repeat;
  margin-bottom: 22px;
  max-width: 100%;
  box-shadow: 0 18px 40px rgba(12,12,13,.08);
}
.detail-cover.is-empty {
  background:
    radial-gradient(circle at 30% 20%, rgba(255,107,0,.28), transparent 46%),
    #16161a;
}
.detail-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.4vw, 2.7rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 8px;
  overflow-wrap: break-word;
}
.detail-teacher {
  margin: 0;
  color: var(--ln-muted);
  font-weight: 600;
}
.detail-desc {
  margin: 18px 0 0;
  line-height: 1.7;
  color: var(--ln-ink-soft);
  max-width: 42rem;
}
.detail-points {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.detail-points li {
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--ln-line);
}
.buy-card {
  position: sticky;
  top: 88px;
  background: #fff;
  border: 1px solid var(--ln-line);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 16px 40px rgba(12,12,13,.06);
  min-width: 0;
  height: fit-content;
}
.buy-card .eyebrow { margin-bottom: 6px; }
.buy-card .price {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin: 0 0 16px;
  overflow-wrap: break-word;
  letter-spacing: -0.03em;
}
.buy-perks {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  color: var(--ln-muted);
  font-size: .9rem;
  display: grid;
  gap: 8px;
}
.buy-perks li { padding-left: 0; }
.buy-note {
  color: var(--ln-muted);
  font-size: .85rem;
  margin: 12px 0 0;
  line-height: 1.5;
}
.buy-back {
  display: inline-block;
  margin-top: 16px;
  color: var(--ln-muted);
  font-size: .9rem;
}
.buy-back:hover { color: var(--ln-orange); }

.auth-page {
  min-height: calc(100vh - 120px);
  display: grid;
  place-items: center;
  padding: 96px 16px 48px;
  background:
    radial-gradient(ellipse at 80% 0%, rgba(255,107,0,.12), transparent 45%),
    var(--ln-bg);
}
.auth-card {
  width: min(480px, 100%);
  background: #fff;
  border: 1px solid var(--ln-line);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 18px 50px rgba(12,12,13,.06);
}
.auth-card h1 {
  font-family: var(--font-display);
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 4vw, 1.9rem);
  letter-spacing: -0.03em;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--ln-muted);
  font-size: .85rem;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--ln-line);
}
.field { margin-bottom: 12px; min-width: 0; }
.field label {
  display: block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 6px;
  color: var(--ln-muted);
}
.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--ln-line);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  background: #fff;
  color: var(--ln-ink);
  color-scheme: light;
  box-sizing: border-box;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.err { color: #b42318; margin-top: 10px; font-size: .9rem; }
.ok { color: #027a48; margin-top: 10px; font-size: .9rem; }

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr);
  gap: 22px;
  padding: 28px 0 64px;
}
.dash-card {
  background: #fff;
  border: 1px solid var(--ln-line);
  border-radius: 20px;
  padding: 20px;
  min-width: 0;
  overflow: hidden;
}
.dash-card h2 {
  font-size: 1.15rem;
  margin: 0 0 14px;
}
.dash-card .course-grid.platform {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 8px;
}
.stat-tile {
  background: #fff;
  border: 1px solid var(--ln-line);
  border-radius: 16px;
  padding: 16px;
  min-width: 0;
}
.stat-tile b {
  display: block;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat-tile span { color: var(--ln-muted); font-size: .82rem; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap table { width: 100%; min-width: 420px; }

.learn-layout {
  display: grid;
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
  min-height: calc(100vh - 72px);
  background: #0f0f12;
  color: #fff;
}
.learn-sidebar {
  background: #16161a;
  border-right: 1px solid rgba(255,255,255,.08);
  padding: 18px;
  overflow: auto;
}
.learn-sidebar a {
  color: rgba(255,255,255,.75);
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.learn-sidebar a.active,
.learn-sidebar a:hover { background: rgba(255,107,0,.18); color: #fff; }
.learn-main { padding: 18px; min-width: 0; }
.learn-main h1 { overflow-wrap: break-word; font-size: clamp(1.1rem, 2.4vw, 1.35rem); }
.learn-main video { width: 100%; max-height: 70vh; background: #000; border-radius: 14px; }

.watch-page {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(255,107,0,.16), transparent 42%),
    #0b0b0e;
  color: #fff;
}
.watch-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.watch-top a { color: rgba(255,255,255,.78); text-decoration: none; font-weight: 600; }
.watch-top a:hover { color: #fff; }
.watch-brand { display: inline-flex; align-items: center; gap: 8px; }
.watch-brand img { width: 28px; height: 28px; border-radius: 8px; }
.watch-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 22px;
  padding: 22px;
  max-width: 1280px;
  margin: 0 auto;
}
.watch-stage {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 28px 80px rgba(0,0,0,.45);
  aspect-ratio: 16 / 9;
}
.watch-stage video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  max-height: none;
  border-radius: 0;
}
.watch-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 12px;
}
.watch-toolbar .btn-ghost {
  color: #fff;
  border-color: rgba(255,255,255,.16);
  background: rgba(255,255,255,.04);
}
.watch-meta { margin-top: 18px; max-width: 72ch; }
.watch-meta h1 { margin: 0 0 8px; font-size: clamp(1.25rem, 3vw, 1.8rem); letter-spacing: -.03em; }
.watch-kicker { color: #ffb37a; font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px; }
.watch-meta p { color: rgba(255,255,255,.68); line-height: 1.55; }
.watch-rail {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  padding: 16px;
  min-width: 0;
}
.watch-rail h3 { margin: 0 0 12px; font-size: 1rem; }
.watch-lesson {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 11px 10px;
  border-radius: 14px;
  cursor: pointer;
}
.watch-lesson:hover { background: rgba(255,255,255,.06); }
.watch-lesson.active { background: rgba(255,107,0,.2); }
.watch-lesson .n {
  width: 32px; height: 32px; flex-shrink: 0;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.08);
  font-weight: 700; font-size: .85rem;
}
.watch-lesson.active .n { background: #ff6b00; color: #fff; }
.watch-lesson .t { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.watch-lesson .s { color: #ffb37a; font-size: .75rem; font-weight: 700; }
.watch-play {
  position: absolute;
  left: 12px; bottom: 12px;
  background: #ff6b00;
  color: #fff;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: .78rem;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(255,107,0,.35);
}
.course-card.platform { position: relative; }
.course-card.platform .course-thumb { position: relative; }
.course-card.platform .watch-play { pointer-events: none; }
.resume-banner {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 3;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  background: rgba(12,12,16,.92);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding: 10px 12px;
  color: #fff;
}
.resume-banner[hidden] { display: none !important; }
.resume-banner span { flex: 1; font-weight: 600; min-width: 140px; }

@media (max-width: 900px) {
  .watch-grid { grid-template-columns: 1fr; padding: 14px; }
}

.empty-state {
  text-align: center;
  padding: 56px 20px;
  color: var(--ln-muted);
}
.empty-state h3 {
  color: var(--ln-ink);
  font-family: var(--font-display);
  margin-bottom: 8px;
}

.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 90;
}
.cookie-inner {
  max-width: 920px;
  margin: 0 auto;
  background: #121214;
  color: #fff;
  border-radius: 18px;
  padding: 16px 18px;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
}
.cookie-inner p {
  margin: 0;
  font-size: .9rem;
  max-width: 48ch;
  color: rgba(255,255,255,.85);
  line-height: 1.45;
}
.cookie-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cookie-actions .btn-ghost {
  color: #fff;
  border-color: rgba(255,255,255,.28);
  background: transparent;
}

.nav-search {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--ln-line);
  background: #fff;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.nav-links a.is-active { color: var(--ln-ink); }
.nav-links a.is-active::after { right: 0; }

.footer-tag {
  color: var(--ln-muted);
  margin: 12px 0 0;
  max-width: 36ch;
  line-height: 1.5;
}
.platform-footer .footer-grid a { display: block; margin: 6px 0; color: var(--ln-muted); }
.platform-footer h4 {
  margin: 0 0 10px;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.skeleton {
  background: linear-gradient(90deg, #eee, #f7f7f7, #eee);
  background-size: 200% 100%;
  animation: sk 1.2s ease infinite;
  border-radius: 14px;
  min-height: 180px;
}
@keyframes sk { to { background-position: -200% 0; } }

@media (max-width: 960px) {
  .course-grid.platform { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-card .course-grid.platform { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-layout,
  .split-layout,
  .dashboard-grid,
  .learn-layout { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .buy-card { position: static; }
}
@media (max-width: 640px) {
  .course-grid.platform,
  .dash-card .course-grid.platform { grid-template-columns: 1fr; }
  .auth-card { padding: 22px 18px; }
  .cookie-inner { flex-direction: column; align-items: stretch; }
  .cookie-inner p { max-width: none; }
  .cookie-actions { width: 100%; }
  .cookie-actions .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
