/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.site-body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.site-container {
  width: min(var(--container), 100% - 2rem);
  margin-inline: auto;
}

.site-main { padding: 1.5rem 0 4rem; min-height: 50vh; }
.site-main--flush { padding-top: 0; }
.site-main--flush > .site-container { width: 100%; max-width: none; padding: 0; }
.site-main--with-ads { padding-top: 1rem; }

/* ===== AdSense layout (only rendered when ads enabled) ===== */
.ps-ads-shell {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 160px;
  gap: 1rem 1.25rem;
  width: min(1280px, 100% - 1.5rem);
  margin-inline: auto;
  align-items: start;
}
.ps-ads-center { min-width: 0; }
.ps-ads-center > .site-container--in-ads {
  width: 100%;
  max-width: none;
  margin: 0;
}
.ps-ads-rail {
  position: sticky;
  top: 5.75rem;
  z-index: 1;
}
.ps-ads-home-strip {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  width: 100%;
}
.ps-ads-home-strip > .site-container {
  width: min(var(--container), 100% - 2rem);
  margin-inline: auto;
}

.ps-ad { margin: 0 0 1rem; overflow: hidden; text-align: center; }
.ps-ad--sidebar { margin: 0; }
.ps-ad--top { margin-bottom: 1.25rem; }
.ps-ad--inContent { margin-top: 1.5rem; margin-bottom: 0; }
.ps-ad--test .ps-ad__test-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  padding: .85rem .6rem;
  border: 2px dashed #94a3b8;
  border-radius: 12px;
  background: repeating-linear-gradient(-45deg, #f8fafc, #f8fafc 10px, #eef2f7 10px, #eef2f7 20px);
  color: #64748b;
  font-size: .8rem;
  min-height: 90px;
}
.ps-ad--sidebar.ps-ad--test .ps-ad__test-inner { min-height: 420px; }
.ps-ad__test-badge { font-weight: 700; color: #334155; }
.ps-ad__test-size { font-size: .7rem; opacity: .75; }
.ps-ad__test-hint { opacity: .8; font-size: .7rem; line-height: 1.35; max-width: 11rem; }

@media (max-width: 1100px) {
  .ps-ads-shell { grid-template-columns: 1fr; width: min(var(--container), 100% - 2rem); }
  .ps-ads-rail { display: none; }
  .ps-ad--sidebar.ps-ad--test .ps-ad__test-inner { min-height: 90px; }
}

/* ===== Header ===== */
.site-header {
  --nav-ink: #f8fafc;
  --nav-muted: rgba(248, 250, 252, .72);
  --nav-soft: rgba(255, 255, 255, .12);
  --nav-line: rgba(255, 255, 255, .14);
  position: sticky;
  top: 0;
  z-index: 100;
  color: var(--nav-ink);
  background:
    linear-gradient(115deg, color-mix(in srgb, #fff 14%, transparent) 0%, transparent 42%),
    linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-bottom: 1px solid var(--nav-line);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--primary) 35%, transparent);
  backdrop-filter: blur(16px);
}
.site-header::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent);
  pointer-events: none;
}
.site-header__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(160px, 1.15fr) auto minmax(160px, 1.15fr);
  align-items: center;
  height: var(--header-h);
  gap: .75rem 1rem;
}
.site-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-weight: 800;
  font-size: .92rem;
  color: var(--nav-ink);
  flex-shrink: 0;
  max-width: 100%;
  grid-column: 1;
  justify-self: start;
  min-width: 0;
}
.site-brand__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: .35rem;
}
.site-brand__logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, .55);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .22);
  background: #fff;
  flex-shrink: 0;
}
.site-brand__logo--fallback {
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 1.125rem;
  flex-shrink: 0;
}
.site-brand__logo--fallback[hidden] { display: none; }
.site-brand__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -.01em;
  line-height: 1.25;
  font-size: .92rem;
}
.site-brand__slug {
  font-size: .68rem;
  font-weight: 600;
  color: rgba(248, 250, 252, .72);
  letter-spacing: .01em;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  max-width: 18rem;
}
.site-nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--nav-line);
  border-radius: var(--radius-sm);
  background: var(--nav-soft);
  color: var(--nav-ink);
  cursor: pointer;
  grid-column: 3;
  justify-self: end;
}
.site-nav {
  display: contents;
}
.site-nav__links {
  display: flex;
  align-items: center;
  gap: .2rem;
  grid-column: 2;
  justify-self: center;
}
.site-nav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .5rem 1.05rem;
  padding-inline: 1.15rem 1.05rem;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--nav-muted);
  transition: var(--transition);
}
.site-nav__link > i {
  display: inline-grid;
  place-items: center;
  width: 1.05em;
  font-size: .82rem;
  opacity: .88;
  line-height: 1;
  flex-shrink: 0;
}
.site-nav__link:hover {
  color: #fff;
  background: rgba(255, 255, 255, .08);
}
.site-nav__link:hover > i,
.site-nav__link.is-active > i {
  opacity: 1;
}
.site-nav__link.is-active {
  color: #fff;
  background: rgba(255, 255, 255, .16);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
}
.site-nav__actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  grid-column: 3;
  justify-self: end;
}
.site-nav__auth {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.site-lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: .4rem .85rem;
  border-radius: 999px;
  border: 1px solid var(--nav-line);
  background: var(--nav-soft);
  color: var(--nav-ink);
  font-size: .8125rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.site-lang-btn:hover {
  background: rgba(255, 255, 255, .18);
  color: #fff;
}
.site-header .btn--outline {
  color: #fff;
  border-color: rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .04);
}
.site-header .btn--outline:hover {
  border-color: rgba(255, 255, 255, .5);
  background: rgba(255, 255, 255, .1);
  color: #fff;
}
.site-header .btn--primary {
  background: #fff;
  color: var(--primary);
  border-color: transparent;
  font-weight: 700;
}
.site-header .btn--primary:hover {
  background: #fff;
  color: var(--primary-dark);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .25);
}
.site-nav__user { position: relative; }
.site-nav__user-btn {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding-block: .35rem;
  padding-inline-start: .35rem;
  padding-inline-end: .9rem;
  border: 1px solid var(--nav-line);
  border-radius: 999px;
  background: var(--nav-soft);
  color: var(--nav-ink);
  cursor: pointer;
}
.site-nav__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: .875rem;
  overflow: hidden;
  flex-shrink: 0;
}
.site-nav__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.site-nav__user-name {
  font-size: .875rem;
  font-weight: 600;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.site-nav__chev {
  font-size: .65rem;
  color: var(--nav-muted);
  margin-inline-end: .15rem;
  flex-shrink: 0;
}
.site-nav__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: .5rem;
  z-index: 200;
  color: var(--text);
}
.site-nav__dropdown a, .site-nav__dropdown button {
  display: flex;
  align-items: center;
  gap: .625rem;
  width: 100%;
  padding: .625rem .75rem;
  border: none;
  background: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text);
  font-size: .875rem;
  text-align: start;
}
.site-nav__dropdown a:hover, .site-nav__dropdown button:hover { background: var(--surface-2); }
.site-nav__dropdown hr { border: none; border-top: 1px solid var(--border); margin: .375rem 0; }

/* Seamless header → home hero */
body[data-page="home"] .site-header {
  border-bottom-color: transparent;
  box-shadow: none;
}
body[data-page="home"] .site-header::after { opacity: .55; }

/* ===== Page head (optional compact title — no full-width banner) ===== */
.page-head {
  padding: 1rem 0 .75rem;
  background: transparent;
  border-bottom: 1px solid var(--border-light);
}
.page-head__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
}
.page-head__sub {
  margin: .3rem 0 0;
  font-size: .875rem;
  color: var(--muted);
  max-width: 640px;
}

/* ===== Buttons ===== */
.btn--ghost-light {
  background: rgba(255,255,255,.08);
  color: #fff;
  border-color: rgba(255,255,255,.28);
}
.btn--ghost-light:hover {
  background: rgba(255,255,255,.16);
  color: #fff;
  border-color: rgba(255,255,255,.45);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem 1.375rem; border-radius: var(--radius-sm); font-weight: 600; font-size: .9375rem;
  border: 1px solid transparent; cursor: pointer; transition: var(--transition); white-space: nowrap;
}
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn--white { background: #fff; color: var(--primary); }
.btn--white:hover { background: #f8fafc; }
.btn--outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn--outline:hover { border-color: var(--primary); color: var(--primary); }
.btn--ghost { background: transparent; color: var(--text-secondary); border: none; }
.btn--ghost:hover { background: var(--surface-2); color: var(--primary); }
.btn--sm { padding: .5rem 1rem; font-size: .8125rem; }
.btn--icon { width: 40px; height: 40px; padding: 0; border-radius: var(--radius-sm); }
.btn--block { width: 100%; }

/* ===== Sections ===== */
.section { margin-bottom: 3rem; }
.section__head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem;
  margin-bottom: 1.25rem;
}
.section__title { margin: 0; font-size: 1.375rem; font-weight: 800; }
.section__desc { margin: .25rem 0 0; color: var(--muted); font-size: .9375rem; }
.section__link { font-size: .875rem; font-weight: 600; color: var(--primary); }
.section__link:hover { text-decoration: underline; }

/* ===== Carousel ===== */
.carousel {
  display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: .5rem; scrollbar-width: thin;
}
.carousel__slide {
  flex: 0 0 min(100%, 720px); scroll-snap-align: start;
  border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 21/8;
  box-shadow: var(--shadow);
}
.carousel__slide img { width: 100%; height: 100%; object-fit: cover; }

/* ===== Grids ===== */
.grid-courses {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem;
}
.grid-posts { display: grid; grid-template-columns: 1fr; gap: 1rem; max-width: 720px; }

/* ===== Course card ===== */
.course-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: var(--transition); display: flex; flex-direction: column;
}
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--primary) 25%, var(--border)); }
.course-card__media { aspect-ratio: 16/10; background: var(--surface-2); position: relative; overflow: hidden; }
.course-card__media img {
  width: 100%; height: 100%; object-fit: contain; object-position: center; background: #fff; transition: transform .35s ease;
}
.course-hero__cover img,
.carousel__slide img,
.home-hero__visual img,
.video-list-item__thumb img,
.post-card__gallery img {
  width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease;
}
.course-card:hover .course-card__media img { transform: scale(1.04); }

/* ===== Media placeholders (missing / broken images) ===== */
.media-placeholder {
  width: 100%; height: 100%; min-height: 100%;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--primary-light) 0%, var(--surface-2) 100%);
  color: var(--primary);
}
.media-placeholder i { font-size: 2.75rem; opacity: .55; }
.media-placeholder--sm i { font-size: 1.125rem; }
.media-placeholder--cover i { font-size: 3.5rem; }
.media-placeholder--hero i { font-size: 3rem; }
.media-placeholder--on-dark {
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.7);
}
.media-placeholder--on-dark i { opacity: .85; }
.course-card__badge {
  position: absolute; top: .75rem; inset-inline-start: .75rem;
  padding: .25rem .625rem; border-radius: 999px; font-size: .6875rem; font-weight: 700;
  background: rgba(15,23,42,.75); color: #fff; backdrop-filter: blur(4px);
}
.course-card__badge--paid { background: var(--primary); }
.course-card__body { padding: 1rem 1.125rem 1.125rem; flex: 1; display: flex; flex-direction: column; }
.course-card__title {
  margin: 0 0 .5rem; font-size: 1rem; font-weight: 700; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.course-card__meta { font-size: .8125rem; color: var(--muted); margin-top: auto; display: flex; gap: .75rem; }

/* ===== PDF card ===== */
.resource-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem; display: flex; gap: 1rem; align-items: center; transition: var(--transition);
}
.resource-card:hover { box-shadow: var(--shadow-sm); border-color: color-mix(in srgb, var(--primary) 20%, var(--border)); }
.resource-card__icon {
  width: 52px; height: 52px; border-radius: var(--radius-sm); background: var(--primary-light);
  color: var(--primary); display: grid; place-items: center; font-size: 1.25rem; flex-shrink: 0;
}
.resource-card__body { flex: 1; min-width: 0; }
.resource-card__title { margin: 0; font-weight: 700; font-size: .9375rem; }
.resource-card__meta { margin: .25rem 0 0; font-size: .8125rem; color: var(--muted); }

/* ===== Post card ===== */
.post-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem; transition: var(--transition);
}
.post-card:hover { box-shadow: var(--shadow-sm); }
.post-card__text { margin: 0 0 1rem; line-height: 1.7; white-space: pre-wrap; }
.post-card__media {
  aspect-ratio: 16/9; margin: -1.5rem -1.5rem 1rem;
  border-radius: var(--radius) var(--radius) 0 0; overflow: hidden;
  background: var(--surface-2);
}
.post-card__media--detail { margin: 0 0 1rem; border-radius: var(--radius-sm); }
.post-card__gallery { display: grid; gap: .5rem; margin-bottom: 1rem; border-radius: var(--radius-sm); overflow: hidden; }
.post-card__gallery img { max-height: 400px; }
.post-card__footer { display: flex; gap: 1.25rem; padding-top: .75rem; border-top: 1px solid var(--border-light); }
.post-card__action {
  display: inline-flex; align-items: center; gap: .375rem; font-size: .875rem; color: var(--muted);
  background: none; border: none; cursor: pointer; padding: 0;
}
.post-card__action:hover { color: var(--primary); }

/* ===== Filters bar ===== */
.filters-bar {
  display: flex; flex-wrap: wrap; gap: .75rem; align-items: center;
  padding: 1rem 1.25rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 1.5rem;
}
.filters-bar .input { flex: 1; min-width: 200px; }
.chip-group { display: flex; flex-wrap: wrap; gap: .375rem; }
.chip {
  padding: .4375rem .875rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--border) 88%, #94a3b8);
  background: #eef1f5;
  color: var(--text);
  font-size: .8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.chip:hover {
  background: color-mix(in srgb, var(--primary) 12%, #eef1f5);
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
  color: var(--primary);
}
.chip.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.chip__count {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  opacity: .9;
  white-space: nowrap;
}

/* ===== Forms ===== */
.input, .textarea, .select {
  width: 100%;
  padding: .75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #eef1f5;
  color: var(--text);
  transition: var(--transition);
}
.select {
  -webkit-appearance: none;
  appearance: none;
  padding-inline-end: 2.5rem;
  background-color: #eef1f5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236b7280' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 1rem center;
  background-size: 12px 8px;
  cursor: pointer;
}
[dir="ltr"] .select {
  background-position: right 1rem center;
}
.input[dir="ltr"],
.textarea[dir="ltr"] {
  text-align: left;
  unicode-bidi: plaintext;
}
.input[dir="rtl"],
.textarea[dir="rtl"] {
  text-align: right;
  unicode-bidi: plaintext;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--primary);
  background-color: #f5f7fa;
  box-shadow: 0 0 0 3px var(--primary-light);
}
.select:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236b7280' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 1rem center;
  background-size: 12px 8px;
}
[dir="ltr"] .select:focus {
  background-position: right 1rem center;
}
.input::placeholder, .textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 88%, transparent);
}
.input--readonly {
  background: #e7ebf0;
  color: var(--text-secondary);
  cursor: not-allowed;
}
.form-group { margin-bottom: 1.125rem; }
.form-group label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: .375rem; }
.form-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 2rem; box-shadow: var(--shadow-sm); max-width: 440px; margin-inline: auto;
}
.form-card__title { margin: 0 0 1.5rem; font-size: 1.5rem; font-weight: 800; text-align: center; }

/* ===== Auth layout ===== */
.auth-page { min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; padding: 2rem 0; }
.auth-page--split {
  display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - var(--header-h));
  margin: -2.5rem calc(50% - 50vw) 0; width: 100vw;
}
.auth-page__panel {
  display: grid; place-items: center; padding: 3rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff;
}
.auth-page__panel h2 { font-size: 2rem; font-weight: 800; margin: 0 0 1rem; }
.auth-page__panel p { opacity: .85; max-width: 360px; line-height: 1.7; }
.auth-page__form { display: grid; place-items: center; padding: 3rem 2rem; background: var(--bg); }

/* ===== Course detail ===== */
.course-hero {
  display: grid; grid-template-columns: 1fr 320px; gap: 2rem; margin-bottom: 2rem;
}
.course-hero__cover {
  border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16/9;
  background: var(--surface-2); box-shadow: var(--shadow);
}
.course-hero__cover img { width: 100%; height: 100%; object-fit: cover; }
.course-hero__sidebar {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem; height: fit-content; position: sticky; top: calc(var(--header-h) + 1rem);
}
.course-hero__sidebar h1 { margin: 0 0 .75rem; font-size: 1.375rem; font-weight: 800; }
.stat-row { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1rem 0; }
.stat { font-size: .8125rem; color: var(--muted); }
.stat strong { display: block; color: var(--text); font-size: 1rem; }

.accordion { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.accordion__item + .accordion__item { border-top: 1px solid var(--border); }
.accordion__head {
  width: 100%; padding: 1rem 1.25rem; border: none; background: var(--surface);
  font-weight: 700; font-size: .9375rem; cursor: pointer; display: flex; justify-content: space-between;
  text-align: start;
}
.accordion__head:hover { background: var(--surface-2); }
.accordion__body { border-top: 1px solid var(--border-light); }
.video-list-item {
  display: flex; gap: 1rem; padding: .875rem 1.25rem; align-items: center;
  border-top: 1px solid var(--border-light); transition: var(--transition);
  width: 100%; border-inline: 0; border-bottom: 0; background: transparent;
  color: inherit; font: inherit; text-align: start; cursor: pointer;
}
.video-list-item:first-child { border-top: none; }
.video-list-item:hover { background: var(--primary-light); }
.video-list-item__thumb { width: 120px; height: 68px; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; background: var(--surface-2); }
.video-list-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-list-item__title { font-weight: 600; font-size: .9375rem; margin: 0; }
.video-list-item__meta { font-size: .8125rem; color: var(--muted); margin-top: .25rem; }

.video-player-wrap {
  border-radius: var(--radius-lg); overflow: hidden; background: #000;
  box-shadow: var(--shadow-lg); margin-bottom: 1.5rem;
  position: relative;
}
.video-player-wrap iframe, .video-player-wrap video {
  width: 100%; height: 100%; border: 0; aspect-ratio: 16 / 9; display: block;
}

/* Locked YouTube lesson player — custom controls, no outbound YouTube UI */
.ps-yt-lock {
  display: flex; flex-direction: column; background: #000; width: 100%;
}
.ps-yt-lock__stage {
  position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; overflow: hidden;
}
.ps-yt-lock__mount {
  position: absolute; inset: 0; overflow: hidden;
}
.ps-yt-lock__holder,
.ps-yt-lock__holder iframe,
.ps-yt-lock__iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
  pointer-events: none;
}
/* Crop bottom/top chrome so "Watch on YouTube" stays outside the visible frame */
.ps-yt-lock__holder iframe,
.ps-yt-lock__iframe {
  top: -8%; left: 0; width: 100%; height: 116%;
}
.ps-yt-lock__catch {
  position: absolute; inset: 0; z-index: 3;
  border: 0; padding: 0; margin: 0; cursor: pointer;
  background: transparent; color: transparent;
}
.ps-yt-lock__ended {
  position: absolute; inset: 0; z-index: 4;
  display: grid; place-content: center; gap: .65rem; justify-items: center;
  border: 0; cursor: pointer; color: #fff;
  background: rgba(0,0,0,.72);
  font: inherit; font-weight: 700;
}
.ps-yt-lock__ended[hidden] { display: none !important; }
.ps-yt-lock__ended i { font-size: 1.6rem; }
.ps-yt-lock__bar {
  height: 46px;
  flex: 0 0 46px;
  display: flex; align-items: center; gap: .45rem;
  padding: 0 .55rem; background: #0b1220; color: #fff;
  border-top: 1px solid rgba(255,255,255,.08);
  position: relative; z-index: 5;
}
.ps-yt-lock__btn {
  width: 34px; height: 34px; border: 0; border-radius: 8px;
  background: transparent; color: #fff; cursor: pointer;
  display: grid; place-items: center; flex-shrink: 0;
}
.ps-yt-lock__btn:hover { background: rgba(255,255,255,.1); }
.ps-yt-lock__progress-wrap { flex: 1; min-width: 0; display: flex; align-items: center; }
.ps-yt-lock__progress {
  width: 100%; accent-color: var(--primary, #c62828); cursor: pointer;
}
.ps-yt-lock__time {
  font-size: .75rem; opacity: .9; white-space: nowrap; font-variant-numeric: tabular-nums;
  min-width: 5.5rem; text-align: center;
}

/* Checkpoint (pause) exam overlay — mirrors app «امتحانات التوقف» */
.ps-yt-checkpoint {
  position: absolute; inset: 0; z-index: 8;
  display: grid; place-items: center;
  padding: 1rem;
  background: rgba(0, 0, 0, .88);
}
.ps-yt-checkpoint[hidden] { display: none !important; }
.ps-yt-checkpoint__card {
  width: min(100%, 380px);
  padding: 1.35rem 1.25rem;
  border-radius: 18px;
  background: rgba(10, 12, 18, .96);
  border: 3px solid color-mix(in srgb, var(--primary, #c62828) 65%, transparent);
  color: #fff;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .45);
}
.ps-yt-checkpoint__icon {
  width: 64px; height: 64px; margin: 0 auto .9rem;
  border-radius: 50%;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--primary, #c62828) 18%, transparent);
  color: var(--primary, #c62828);
  font-size: 1.6rem;
}
.ps-yt-checkpoint__title {
  margin: 0 0 .85rem;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.35;
}
.ps-yt-checkpoint__meta {
  margin: 0 0 1.1rem;
  padding: .85rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .18);
  text-align: start;
}
.ps-yt-checkpoint__meta p {
  margin: 0;
  font-size: .875rem;
  line-height: 1.45;
}
.ps-yt-checkpoint__meta p + p { margin-top: .35rem; opacity: .92; }
.ps-yt-checkpoint__actions {
  display: flex; flex-direction: column; gap: .55rem;
}
.ps-yt-checkpoint__btn-light {
  color: #fff !important;
  border-color: rgba(255, 255, 255, .35) !important;
  background: transparent !important;
}
.ps-yt-checkpoint__btn-light:hover {
  background: rgba(255, 255, 255, .08) !important;
}
.ps-yt-post-exam {
  position: absolute; z-index: 7;
  inset-inline-end: .75rem; bottom: .75rem;
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .55rem .9rem;
  border: 0; border-radius: 999px;
  background: var(--primary, #c62828);
  color: #fff;
  font: inherit; font-weight: 700; font-size: .875rem;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
}
.ps-yt-post-exam[hidden] { display: none !important; }
.ps-yt-post-countdown {
  position: absolute; z-index: 6;
  inset-inline-start: .75rem; bottom: .75rem;
  padding: .4rem .7rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, .72);
  color: #fff;
  font-size: .75rem; font-weight: 700;
}
.ps-yt-post-countdown[hidden] { display: none !important; }

/* Best-effort screen / copy protection */
body.ps-screen-secure {
  -webkit-user-select: none;
  user-select: none;
}
body.ps-screen-secure input,
body.ps-screen-secure textarea {
  -webkit-user-select: text;
  user-select: text;
}
.ps-secure-watermark {
  pointer-events: none;
  position: fixed;
  inset: -20%;
  z-index: 2147483000;
  overflow: hidden;
  opacity: .11;
  transform: rotate(-22deg);
  color: #111;
  font-weight: 700;
  font-size: .85rem;
  line-height: 3.2;
  mix-blend-mode: multiply;
}
body.ps-screen-secure[data-secure-mode="exam"] .ps-secure-watermark,
body.ps-screen-secure[data-secure-mode="video"] .ps-secure-watermark {
  color: #fff;
  opacity: .14;
  mix-blend-mode: soft-light;
}
.ps-secure-watermark[hidden] { display: none !important; }
.ps-secure-watermark__row {
  display: flex; flex-wrap: nowrap; gap: 3.5rem; white-space: nowrap;
}
.ps-secure-blur {
  position: fixed; inset: 0; z-index: 2147483646;
  display: grid; place-items: center;
  background: rgba(8, 10, 14, .94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: #fff;
  padding: 1.5rem;
}
.ps-secure-blur[hidden] { display: none !important; }
.ps-secure-blur__card {
  text-align: center;
  max-width: 22rem;
}
.ps-secure-blur__card i {
  font-size: 2rem;
  color: var(--primary, #c62828);
  margin-bottom: .75rem;
}
.ps-secure-blur__card p {
  margin: 0;
  font-weight: 700;
  line-height: 1.45;
}
@media print {
  body.ps-screen-secure * { visibility: hidden !important; }
}

/* ===== Account / menu cards ===== */
.dashboard-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem;
}
.dash-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem; display: flex; gap: 1rem; align-items: flex-start; transition: var(--transition);
}
.dash-card:hover { box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--primary) 25%, var(--border)); transform: translateY(-2px); }
.dash-card__icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm); background: var(--primary-light);
  color: var(--primary); display: grid; place-items: center; flex-shrink: 0;
}
.dash-card__title { margin: 0; font-weight: 700; font-size: .9375rem; }
.dash-card__desc { margin: .25rem 0 0; font-size: .8125rem; color: var(--muted); }

.profile-banner {
  background: linear-gradient(135deg, var(--primary-light), var(--surface));
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; margin-bottom: 2rem;
}

/* ===== Static / FAQ ===== */
.prose {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.6rem 1.7rem;
  line-height: 1.85;
  white-space: pre-wrap;
  box-shadow: var(--shadow-sm);
  color: var(--text);
  font-size: .975rem;
}
.faq-list { display: flex; flex-direction: column; gap: .75rem; }
.faq-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-xs);
}
.faq-item summary {
  padding: 1rem 1.25rem; font-weight: 700; cursor: pointer; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item[open] summary { border-bottom: 1px solid var(--border-light); background: var(--surface-2); }
.faq-item__body { padding: 1rem 1.25rem; color: var(--text-secondary); line-height: 1.7; }

/* ===== Footer ===== */
.site-footer {
  background: var(--text); color: #cbd5e1; margin-top: 2rem;
}
.site-footer__grid {
  display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 2rem;
  padding: 3rem 0 2rem;
}
.site-footer__brand-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: #fff;
  margin-bottom: .75rem;
  max-width: 100%;
}
.site-footer__brand-link:hover { color: #fff; }
.site-footer__logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, .2);
  background: #fff;
}
.site-footer__brand strong {
  color: #fff;
  font-size: 1.05rem;
  display: block;
  margin: 0;
  line-height: 1.35;
}
.site-footer__slug {
  margin: 0;
  font-size: .8125rem;
  line-height: 1.55;
  max-width: 280px;
  color: #94a3b8;
  white-space: pre-line;
}
.site-footer h4 { color: #fff; font-size: .875rem; margin: 0 0 1rem; text-transform: uppercase; letter-spacing: .04em; }
.site-footer a {
  display: block; font-size: .875rem; padding: .25rem 0; color: #94a3b8; transition: var(--transition);
}
.site-footer a:hover { color: #fff; }
.site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.08); padding: 1.25rem 0; font-size: .8125rem; color: #64748b;
}

/* ===== States ===== */
.site-toast {
  position: fixed; top: calc(var(--header-h) + 12px); left: 50%; transform: translateX(-50%);
  z-index: 300; background: var(--text); color: #fff; padding: .75rem 1.25rem;
  border-radius: 999px; font-size: .875rem; box-shadow: var(--shadow-lg);
}
.site-toast.is-show { display: block !important; }
.state-box { text-align: center; padding: 4rem 1.5rem; color: var(--muted); }
.spinner {
  width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--primary);
  border-radius: 50%; animation: spin .7s linear infinite; margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .home-hero__inner { grid-template-columns: 1fr; text-align: center; }
  .home-hero__desc { margin-inline: auto; }
  .home-hero__actions { justify-content: center; }
  .home-hero__visual { max-width: 400px; margin-inline: auto; }
  .course-hero { grid-template-columns: 1fr; }
  .course-hero__sidebar { position: static; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .auth-page--split { grid-template-columns: 1fr; }
  .auth-page__panel { display: none; }
}
/* ===== List cards (library, exams, notifications) ===== */
.list-stack { display: flex; flex-direction: column; gap: .75rem; }
.list-card {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.25rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); transition: var(--transition);
  width: 100%; color: inherit; font: inherit; text-align: start; cursor: pointer;
}
.list-card:hover { border-color: color-mix(in srgb, var(--primary) 25%, var(--border)); box-shadow: var(--shadow-sm); }
.list-card__body { min-width: 0; flex: 1; }
.list-card__title { margin: 0; font-weight: 700; font-size: .9375rem; }
.list-card__meta { margin: .25rem 0 0; font-size: .8125rem; color: var(--muted); }
.list-card__icon { color: var(--muted); flex-shrink: 0; }

/* ===== Tabs ===== */
.tabs { display: flex; flex-wrap: wrap; gap: .375rem; margin-bottom: 1.5rem; }
.tab {
  padding: .5rem 1rem; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); font-size: .8125rem; font-weight: 600; cursor: pointer; transition: var(--transition);
}
.tab.is-active, .tab:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }

/* ===== Data table (grades, fees) ===== */
.data-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.data-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.data-table th, .data-table td { padding: .75rem 1rem; text-align: start; border-bottom: 1px solid var(--border-light); }
.data-table th { background: var(--surface-2); font-weight: 700; font-size: .8125rem; color: var(--muted); }
.data-table tr:last-child td { border-bottom: none; }

/* ===== Planet teacher page styles live in pages/planet/page.css ===== */

/* ===== Exam room ===== */
.exam-room { max-width: 820px; margin-inline: auto; }
.exam-room__header {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem;
  margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border);
}
.exam-room__timer {
  display: inline-flex; align-items: center; gap: .5rem; padding: .5rem 1rem;
  background: var(--primary-light); color: var(--primary); border-radius: 999px; font-weight: 700;
}
.exam-room__progress { font-size: .875rem; color: var(--muted); margin-bottom: 1rem; }
.exam-question {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.75rem; margin-bottom: 1.5rem;
}
.exam-question__text { margin: 0 0 1.25rem; font-size: 1.0625rem; font-weight: 600; line-height: 1.6; }
.exam-choices { display: flex; flex-direction: column; gap: .625rem; }
.exam-choice {
  display: flex; align-items: flex-start; gap: .75rem; padding: .875rem 1rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition);
}
.exam-choice:hover { border-color: var(--primary); background: var(--primary-light); }
.exam-choice.is-selected { border-color: var(--primary); background: var(--primary-light); }
.exam-choice input { margin-top: .2rem; accent-color: var(--primary); }
.exam-room__actions { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.exam-result {
  text-align: center; padding: 3rem 1.5rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.exam-result__score { font-size: 3rem; font-weight: 800; color: var(--primary); margin: 0; }
.exam-result__label { color: var(--muted); margin: .5rem 0 1.5rem; }

/* ===== Alert box ===== */
.alert-box {
  padding: 1rem 1.25rem; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface-2); margin-bottom: 1.5rem;
}

/* ===== Educational process tracking ===== */
.edu-tabs {
  display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem;
  padding: .5rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.edu-tab {
  flex: 1; min-width: 120px; display: flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem 1rem; border: none; border-radius: var(--radius-sm); background: transparent;
  font-weight: 600; font-size: .875rem; color: var(--text-secondary); cursor: pointer; transition: var(--transition);
}
.edu-tab.is-active, .edu-tab:hover { background: var(--primary-light); color: var(--primary); }
.edu-alert, .edu-empty { text-align: center; padding: 3rem 1.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.edu-alert i, .edu-empty i { font-size: 2.5rem; color: var(--primary); margin-bottom: 1rem; display: block; opacity: .7; }
.edu-section-head { display: flex; align-items: center; justify-content: space-between; margin: 1.5rem 0 1rem; }
.edu-section-head h2 { margin: 0; font-size: 1.125rem; font-weight: 800; }
.edu-carousel { margin-bottom: 1rem; }
.edu-subjects { display: flex; flex-direction: column; gap: .75rem; }
.edu-subject-card {
  display: flex; align-items: flex-start; gap: 1rem; padding: 1rem 1.25rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: var(--transition);
}
.edu-subject-card:hover { border-color: color-mix(in srgb, var(--primary) 30%, var(--border)); box-shadow: var(--shadow-sm); }
.edu-subject-card__avatar { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; flex-shrink: 0; border: 2px solid var(--primary-light); }
.edu-subject-card__avatar img, .edu-subject-card__avatar .media-placeholder { width: 100%; height: 100%; object-fit: cover; }
.edu-subject-card__body { flex: 1; min-width: 0; }
.edu-subject-card__body h3 { margin: 0 0 .25rem; font-size: 1rem; font-weight: 800; color: var(--primary); }
.edu-subject-card__teacher { margin: 0 0 .5rem; font-size: .875rem; font-weight: 600; }
.edu-subject-card__chips { display: flex; flex-wrap: wrap; gap: .375rem; }
.edu-subject-card__chips .chip { font-size: .6875rem; padding: .25rem .625rem; }
.edu-subject-card__arrow { color: var(--muted); margin-top: .5rem; flex-shrink: 0; }
.edu-detail-head { margin-bottom: 1rem; }
.edu-detail-hero { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; padding: 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.edu-detail-hero__avatar { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.edu-detail-hero h1 { margin: 0; font-size: 1.25rem; font-weight: 800; }
.edu-detail-hero p { margin: .25rem 0 0; color: var(--muted); font-size: .875rem; }
.edu-detail-tabs {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: .375rem;
  padding: .5rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 1.25rem;
}
.edu-detail-tab {
  display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: .625rem .25rem;
  border: none; border-radius: var(--radius-sm); background: transparent; cursor: pointer; font-size: .6875rem; font-weight: 600; color: var(--muted); transition: var(--transition);
}
.edu-detail-tab i { font-size: 1rem; }
.edu-detail-tab.is-active, .edu-detail-tab:hover { background: var(--primary-light); color: var(--primary); }
.edu-section { margin-bottom: 1.25rem; }
.edu-section__title { margin: 0 0 .75rem; font-size: .9375rem; font-weight: 800; }
.edu-section__body { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; }
.edu-stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.edu-stat { text-align: center; padding: .875rem .5rem; background: var(--surface-2); border-radius: var(--radius-sm); }
.edu-stat strong { display: block; font-size: 1.125rem; }
.edu-stat span { font-size: .75rem; color: var(--muted); }
.edu-details { display: flex; flex-direction: column; }
.edu-detail-row { display: flex; justify-content: space-between; gap: 1rem; padding: .625rem 0; border-bottom: 1px solid var(--border-light); font-size: .875rem; }
.edu-detail-row:last-child { border-bottom: none; }
.edu-detail-row span { color: var(--muted); }
.edu-contact { display: flex; align-items: center; gap: .5rem; padding: .75rem; margin-bottom: .5rem; background: rgba(37,211,102,.08); border-radius: var(--radius-sm); color: #128C7E; font-weight: 600; font-size: .875rem; }
.edu-contact:last-child { margin-bottom: 0; }
.edu-qr { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.edu-qr p { margin: 0; font-family: monospace; color: var(--muted); }
.edu-points { padding: 1rem; background: var(--primary-light); border-radius: var(--radius-sm); font-weight: 600; }
.list-card--highlight { border-color: var(--primary); background: var(--primary-light); }

@media (max-width: 768px) {
  .edu-tabs { flex-direction: column; }
  .edu-tab { min-width: 0; }
  .edu-stats-row { grid-template-columns: 1fr; }
}

/* ===== Home banners & planet ratings ===== */
.section--flush-top { padding-top: 0; }
.home-banners .carousel__slide { border-radius: var(--radius-lg); overflow: hidden; }

.planet-ratings__head {
  display: flex; align-items: center; gap: .625rem; margin-bottom: 1rem;
}
.planet-ratings__icon {
  width: 32px; height: 32px; border-radius: 10px; background: var(--primary-light);
  color: var(--primary); display: grid; place-items: center; font-size: .875rem;
}
.planet-ratings__title { margin: 0; font-size: 1rem; font-weight: 700; }
.planet-ratings__track {
  display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: .5rem; -webkit-overflow-scrolling: touch;
}
.planet-rating-card {
  flex: 0 0 min(90%, 420px); scroll-snap-align: start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.25rem; display: flex; flex-direction: column; gap: .75rem; transition: var(--transition);
}
.planet-rating-card:hover { border-color: color-mix(in srgb, var(--primary) 30%, var(--border)); box-shadow: var(--shadow); }
.planet-rating-card__top { display: flex; justify-content: space-between; gap: .75rem; }
.planet-rating-card__teacher { display: flex; gap: .75rem; align-items: center; min-width: 0; }
.planet-rating-card__teacher img, .planet-rating-card__teacher .media-placeholder { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; }
.planet-rating-card__teacher strong { display: block; font-size: .9375rem; }
.planet-rating-card__teacher span { font-size: .75rem; color: var(--muted); }
.planet-rating-card__quote { color: var(--primary-light); font-size: 1.25rem; opacity: .8; }
.planet-rating-card__text {
  margin: 0; font-size: .875rem; line-height: 1.65; color: var(--text-secondary);
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.planet-rating-card__footer {
  display: flex; align-items: center; gap: .5rem; margin-top: auto; font-size: .8125rem;
}
.planet-rating-card__footer img, .planet-rating-card__footer .media-placeholder { width: 28px; height: 28px; border-radius: 50%; }
.planet-rating-card__stats { margin-inline-start: auto; color: var(--muted); }

/* ===== Account page — superseded by more/page.css ===== */
.account-page { max-width: none; margin: 0; }
.account-profile-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.25rem; box-shadow: var(--shadow-sm);
}
.account-profile-card__main { display: flex; gap: 1rem; }
.account-profile-card__avatar {
  width: 60px; height: 60px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: var(--primary-light); color: var(--primary); display: grid; place-items: center;
}
.account-profile-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-profile-card__name { margin: 0 0 .5rem; font-size: 1.125rem; font-weight: 800; }
.account-profile-card__line { margin: .25rem 0; font-size: .8125rem; color: var(--text-secondary); display: flex; gap: .5rem; align-items: center; }
.account-profile-card__line i { color: var(--primary); width: 14px; }
.account-profile-card__actions { display: grid; grid-template-columns: 1fr 1fr; gap: .625rem; margin-top: 1rem; }
.account-profile-card__btn {
  display: flex; align-items: center; justify-content: center; gap: .375rem;
  padding: .625rem; border-radius: var(--radius-sm); font-size: .8125rem; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--border); transition: var(--transition);
}
.account-profile-card__btn--primary { background: var(--primary-light); color: var(--primary); border-color: transparent; }
.account-profile-card__btn:hover { border-color: var(--primary); }

.account-guest-card {
  text-align: center; padding: 2rem 1.5rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.account-guest-card i { font-size: 2.5rem; color: var(--primary); margin-bottom: .75rem; }
.account-guest-card p { margin: 0 0 1rem; color: var(--text-secondary); }

.account-tracking-tile {
  display: flex; align-items: center; gap: .875rem; padding: 1rem 1.125rem;
  background: color-mix(in srgb, var(--primary) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--border));
  border-radius: 14px; font-weight: 700; color: var(--primary); transition: var(--transition);
}
.account-tracking-tile:hover { background: color-mix(in srgb, var(--primary) 18%, var(--surface)); }
.account-tracking-tile__icon {
  width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,.65);
  display: grid; place-items: center; flex-shrink: 0;
}
.account-tracking-tile__label { flex: 1; }
.account-tracking-tile__arrow { opacity: .7; }

.account-quick-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
.account-quick-item {
  display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: 1rem .75rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  text-align: center; font-size: .8125rem; font-weight: 600; transition: var(--transition);
}
.account-quick-item:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.account-quick-item img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.account-quick-item i { font-size: 1.25rem; color: var(--primary); }

.account-menu-section__title {
  margin: 0 0 .625rem; font-size: .75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--muted);
}
.account-menu-list {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
}
.account-menu-item {
  display: flex; align-items: center; gap: .75rem; width: 100%; padding: .875rem 1rem;
  border: none; background: none; text-align: start; cursor: pointer; transition: var(--transition);
  border-bottom: 1px solid var(--border-light);
}
.account-menu-item:last-child { border-bottom: none; }
.account-menu-item:hover { background: var(--surface-2); }
.account-menu-item__icon { width: 20px; color: var(--primary); text-align: center; }
.account-menu-item__label { flex: 1; font-size: .9375rem; font-weight: 500; }
.account-menu-item__meta { font-size: .8125rem; color: var(--muted); }

.account-auth-actions { display: flex; flex-direction: column; gap: .75rem; align-items: center; margin-top: .5rem; }
.account-logout-btn { width: 100%; }
.account-delete-btn {
  display: inline-flex; align-items: center; gap: .375rem; padding: .5rem .75rem;
  border: none; background: none; color: #b91c1c; font-size: .875rem; font-weight: 600; cursor: pointer;
}
.account-delete-btn:hover { text-decoration: underline; }

.account-social {
  display: flex; justify-content: center; flex-wrap: wrap; gap: .875rem; padding-top: .5rem;
}
.account-social__link {
  width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2);
  border: 1px solid var(--border); display: grid; place-items: center;
  color: var(--primary); font-size: 1.125rem; transition: var(--transition);
}
.account-social__link:hover { background: var(--primary-light); border-color: var(--primary); }

@media (max-width: 960px) {
  .site-header__inner {
    grid-template-columns: 1fr auto;
  }
  .site-brand { max-width: calc(100vw - 7rem); }
  .site-nav__toggle { display: grid; place-items: center; }
  .site-nav {
    display: flex;
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    gap: 1rem;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    box-shadow: 0 18px 40px rgba(2, 8, 23, .35);
    z-index: 99;
  }
  .site-nav.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .site-nav__links {
    flex-direction: column;
    align-items: stretch;
    grid-column: auto;
    justify-self: stretch;
  }
  .site-nav__link { border-radius: var(--radius-sm); }
  .site-nav__actions {
    flex-direction: column;
    align-items: stretch;
    grid-column: auto;
    justify-self: stretch;
  }
  .site-nav__auth { flex-direction: column; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .grid-courses { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .site-footer__grid { grid-template-columns: 1fr; }
  .grid-courses { grid-template-columns: 1fr; }
}
