/* =====================================================================
   iRawda Learning — customer portal styles
   Light, premium. Ivory ground, ink typography, gold used as accent only.
   ===================================================================== */

@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-var.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
}
@font-face {
  font-family: "Marcellus";
  src: url("../fonts/marcellus.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --ivory: #FAF9F6;
  --parchment: #F4EFE5;
  --sand: #EAE1CF;
  --white: #FFFFFF;
  --ink: #171717;
  --ink-2: #3B3731;
  --muted: #6F675B;
  --line: rgba(23, 23, 23, .08);
  --line-2: rgba(23, 23, 23, .14);
  --gold: #C99A2E;
  --gold-bright: #D4AF37;
  --gold-deep: #8F6A14;           /* gold that passes contrast on ivory for small text */
  --gold-soft: rgba(201, 154, 46, .12);
  --gold-grad: linear-gradient(135deg, #E2C46A 0%, #D4AF37 38%, #B8892A 100%);
  --danger: #A33A2C;
  --ok: #2F6B45;

  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Marcellus", "Cormorant Garamond", Georgia, serif;

  --r-xl: 28px;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;

  --shadow-1: 0 1px 2px rgba(64, 46, 12, .05), 0 2px 8px -2px rgba(64, 46, 12, .06);
  --shadow-2: 0 1px 2px rgba(64, 46, 12, .05), 0 18px 40px -18px rgba(64, 46, 12, .28);
  --shadow-3: 0 2px 4px rgba(64, 46, 12, .06), 0 30px 60px -24px rgba(64, 46, 12, .35);
  --ring-gold: 0 0 0 1px rgba(201, 154, 46, .55), 0 0 0 5px rgba(212, 175, 55, .14);

  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1320px;
  --header-h: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
svg { width: 1em; height: 1em; flex: none; }
h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 700; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(212, 175, 55, .3); }

.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; }
.skip-link:focus { top: 12px; }
.muted { color: var(--muted); }
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

/* --------------------------------------------------------------- buttons */
.btn {
  --h: 46px;
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: var(--h); padding: 0 22px;
  border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; font-size: .95rem; letter-spacing: .005em; line-height: 1;
  white-space: nowrap; transition: transform .2s var(--ease), box-shadow .25s var(--ease), background .2s, color .2s, border-color .2s;
  position: relative; isolation: isolate;
}
.btn svg { width: 1.05em; height: 1.05em; }
.btn--primary { background: var(--ink); color: #fff; box-shadow: 0 10px 24px -12px rgba(23, 23, 23, .6); }
.btn--primary::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; z-index: -1;
  background: var(--gold-grad); opacity: 0; transition: opacity .25s;
}
.btn--primary svg { color: var(--gold-bright); transition: color .2s; }
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -12px rgba(184, 137, 42, .65); color: var(--ink); }
.btn--primary:hover::after { opacity: 1; }
.btn--primary:hover svg { color: var(--ink); }
.btn--ghost { background: var(--white); border-color: var(--line-2); color: var(--ink); }
.btn--ghost:hover { border-color: var(--gold); box-shadow: var(--ring-gold); }
.btn--soft { background: var(--parchment); color: var(--ink); border-color: rgba(201, 154, 46, .25); }
.btn--soft svg { color: var(--gold-deep); }
.btn--text { background: none; color: var(--muted); padding-inline: 10px; }
.btn--text:hover { color: var(--ink); }
.btn--sm { --h: 38px; padding: 0 16px; font-size: .86rem; }
.btn--lg { --h: 54px; padding: 0 28px; font-size: 1rem; }
.btn--block { width: 100%; }
.btn[aria-busy="true"] { pointer-events: none; opacity: .85; }
.btn .spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.iconbtn {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border-radius: 12px; border: 1px solid transparent; background: transparent; color: var(--ink);
  transition: background .2s, border-color .2s, box-shadow .2s;
}
.iconbtn svg { width: 20px; height: 20px; }
.iconbtn:hover { background: var(--parchment); }
.iconbtn--round { border-radius: 50%; background: var(--white); border-color: var(--line-2); width: 40px; height: 40px; }
.iconbtn--round:hover { border-color: var(--gold); box-shadow: var(--ring-gold); background: var(--white); }
.iconbtn:disabled { opacity: .35; pointer-events: none; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 24px; padding: 0 10px; border-radius: 999px;
  font-size: .72rem; font-weight: 700; letter-spacing: .01em;
}
.badge--gold { background: var(--gold-grad); color: var(--ink); box-shadow: 0 4px 12px -4px rgba(184, 137, 42, .6); }
.badge--light { background: rgba(255, 255, 255, .92); color: var(--ink); backdrop-filter: blur(6px); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.chip {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--white); font-size: .9rem; font-weight: 600; color: var(--ink-2);
  transition: border-color .2s, background .2s, color .2s;
}
.chip:hover { border-color: var(--gold); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

.goldline { display: block; height: 2px; width: 120px; margin: 26px auto 0; background: linear-gradient(90deg, transparent, var(--gold-bright), transparent); background-size: 200% 100%; animation: shimmerline 3.5s ease-in-out infinite; }
@keyframes shimmerline { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }

/* --------------------------------------------------------------- top bar */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(250, 249, 246, .82);
  backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s, background .3s;
}
.topbar.is-scrolled { border-color: var(--line); box-shadow: 0 8px 30px -20px rgba(64, 46, 12, .25); background: rgba(250, 249, 246, .92); }
.topbar__inner { height: var(--header-h); display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand__logo { height: 50px; width: auto; }
.brand__product {
  font-family: var(--display); font-size: 1.12rem; color: var(--ink-2);
  padding-left: 12px; border-left: 1px solid var(--line-2); line-height: 1.1;
}
.mainnav { display: flex; gap: 4px; }
.mainnav a {
  position: relative; padding: 10px 14px; font-weight: 600; font-size: .95rem; color: var(--muted); border-radius: 10px;
  transition: color .2s;
}
.mainnav a:hover { color: var(--ink); }
.mainnav a.is-active { color: var(--ink); }
.mainnav a.is-active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--gold-grad);
}
.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.searchbox { position: relative; display: flex; align-items: center; }
.searchbox__icon { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.searchbox input {
  width: 300px; height: 44px; padding: 0 16px 0 42px;
  border-radius: 999px; border: 1px solid var(--line-2); background: var(--white);
  font-size: .92rem; transition: border-color .2s, box-shadow .2s, width .3s var(--ease);
}
.searchbox input:focus { outline: none; border-color: var(--gold); box-shadow: var(--ring-gold); width: 360px; }
.searchbox input::-webkit-search-cancel-button { display: none; }
.searchbox__close, .searchtoggle { display: none; }

.search-pop {
  position: absolute; top: calc(100% + 10px); right: 0; width: min(440px, 92vw);
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-3); padding: 8px; max-height: 70vh; overflow: auto;
  animation: pop .18s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.search-pop__label { padding: 10px 12px 6px; font-size: .75rem; font-weight: 700; color: var(--muted); }
.search-pop a { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; }
.search-pop a:hover, .search-pop a.is-focus { background: var(--parchment); }
.search-pop__code { flex: none; min-width: 52px; height: 30px; display: grid; place-items: center; padding: 0 8px; border-radius: 8px; background: var(--ink); color: var(--gold-bright); font-family: var(--display); font-size: .82rem; }
.search-pop__text { display: grid; min-width: 0; }
.search-pop__text strong { font-size: .92rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-pop__text small { color: var(--muted); font-size: .8rem; }
.search-pop__all { justify-content: center; font-weight: 700; font-size: .88rem; color: var(--gold-deep); border-top: 1px solid var(--line); margin-top: 6px; border-radius: 0 0 12px 12px !important; }
.search-pop__empty { padding: 18px 14px; color: var(--muted); font-size: .9rem; text-align: center; }
.skel { display: block; border-radius: 8px; background: linear-gradient(90deg, #F1ECE2 0%, #F8F5EF 50%, #F1ECE2 100%); background-size: 200% 100%; animation: skel 1.2s ease-in-out infinite; }
@keyframes skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.skel-row { display: flex; gap: 12px; align-items: center; padding: 10px 12px; }

.avatar {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: var(--ink); color: var(--gold-bright); border: none;
  font-weight: 700; font-size: .85rem; letter-spacing: .02em;
  box-shadow: 0 0 0 2px var(--ivory), 0 0 0 3px rgba(201, 154, 46, .55);
}
.avatar--lg { width: 56px; height: 56px; font-size: 1rem; }
.avatar--xl { width: 76px; height: 76px; font-size: 1.3rem; }
.usermenu { position: relative; }
.dropdown {
  position: absolute; right: 0; top: calc(100% + 12px); min-width: 240px; z-index: 50;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-3);
  padding: 8px; animation: pop .18s var(--ease);
}
.dropdown__head { padding: 12px 12px 14px; border-bottom: 1px solid var(--line); margin-bottom: 6px; display: grid; gap: 2px; }
.dropdown__head strong { font-size: .95rem; }
.dropdown__head span { font-size: .82rem; color: var(--muted); }
.dropdown a, .dropdown button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border-radius: 10px;
  border: 0; background: none; font-size: .92rem; font-weight: 600; text-align: left;
}
.dropdown a:hover, .dropdown button:hover { background: var(--parchment); }
.dropdown svg { width: 18px; height: 18px; color: var(--gold-deep); }
.dropdown form { margin: 0; }

/* ------------------------------------------------------------------ page */
.page { min-height: 60vh; animation: pagein .5s var(--ease) both; }
@keyframes pagein { from { opacity: 0; } }

/* ------------------------------------------------------------------ hero */
.hero { position: relative; overflow: hidden; padding: clamp(28px, 5vw, 64px) 0 clamp(36px, 5vw, 72px); }
.hero__bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(600px 420px at 78% 40%, rgba(212, 175, 55, .20), transparent 70%),
    radial-gradient(500px 300px at 10% 0%, rgba(244, 239, 229, 1), transparent 70%),
    linear-gradient(180deg, var(--parchment) 0%, var(--ivory) 100%);
}
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background: url("../images/pattern.svg") repeat; background-size: 96px;
  opacity: .07;
  mask-image: radial-gradient(ellipse at 75% 45%, #000 0%, transparent 65%);
  -webkit-mask-image: radial-gradient(ellipse at 75% 45%, #000 0%, transparent 65%);
}
.hero__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.hero__greet { font-size: .95rem; color: var(--muted); margin-bottom: 18px; font-weight: 500; }
.hero__eyebrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .9rem; color: var(--gold-deep); }
.hero__eyebrow svg { width: 18px; height: 18px; color: var(--gold); }
.hero__code {
  font-family: var(--display); font-size: clamp(1.1rem, 1.6vw, 1.3rem); letter-spacing: .14em;
  color: var(--gold-deep); margin-top: 18px;
}
.hero__code--sm { font-size: .95rem; margin: 0; letter-spacing: .08em; }
.hero__title {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(2rem, 4.2vw, 3.55rem); line-height: 1.08; letter-spacing: -.005em;
  margin-top: 8px; max-width: 16ch; text-wrap: balance;
}
.hero__tagline { margin-top: 16px; font-size: clamp(1.02rem, 1.4vw, 1.18rem); color: var(--ink-2); }
.hero__chips { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hero__chips li {
  display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .75); border: 1px solid rgba(201, 154, 46, .28); font-size: .86rem; font-weight: 600; color: var(--ink-2);
}
.hero__chips li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.hero__cta { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 20px; margin-top: 30px; }
.hero__count { font-size: .9rem; color: var(--muted); font-weight: 600; }

.hero__art { position: relative; padding: 19% 7% 9%; }
.hero__arch {
  position: absolute; left: 19%; top: 0; width: 62%; height: auto; aspect-ratio: 400 / 520;
  overflow: visible; pointer-events: none;
}
.hero__art::before {
  content: ""; position: absolute; left: 19%; top: 0; width: 62%; aspect-ratio: 400 / 520;
  border-radius: 999px 999px 0 0; background: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 70%);
}
.arch-line path {
  fill: none; stroke: var(--gold); stroke-width: 1.4; vector-effect: non-scaling-stroke;
  stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: drawarch 2.4s .25s var(--ease) forwards;
  opacity: .8;
}
@keyframes drawarch { to { stroke-dashoffset: 0; } }
.hero__frame {
  position: relative; display: block; border-radius: var(--r-xl); overflow: hidden;
  aspect-ratio: 16 / 9; background: var(--sand);
  box-shadow: var(--shadow-3), 0 0 0 1px rgba(201, 154, 46, .25);
  transform: translateY(12px); opacity: 0; animation: heroin .9s .15s var(--ease) forwards;
}
.hero__frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.hero__frame:hover img { transform: scale(1.03); }
.hero__frame::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(120deg, rgba(255, 255, 255, .18), transparent 40%);
}
@keyframes heroin { to { transform: none; opacity: 1; } }
.hero__copy > * { animation: rise .7s var(--ease) both; }
.hero__copy > :nth-child(2) { animation-delay: .05s; }
.hero__copy > :nth-child(3) { animation-delay: .1s; }
.hero__copy > :nth-child(4) { animation-delay: .15s; }
.hero__copy > :nth-child(5) { animation-delay: .2s; }
.hero__copy > :nth-child(n+6) { animation-delay: .25s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ------------------------------------------------------------- card rows */
.row { padding: clamp(20px, 3vw, 34px) 0; }
.row + .row { padding-top: 6px; }
.row__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.row__title { font-family: var(--display); font-weight: 400; font-size: clamp(1.4rem, 2.2vw, 1.85rem); letter-spacing: .005em; }
.row__title--spaced { margin: 34px 0 18px; }
.row__sub { margin-top: 4px; color: var(--muted); font-size: .92rem; }
.row__nav { display: flex; gap: 8px; }
.link-more { font-weight: 700; font-size: .9rem; color: var(--gold-deep); padding: 8px 2px; border-bottom: 1px solid rgba(201, 154, 46, .4); }
.link-more:hover { color: var(--ink); border-color: var(--ink); }

.row__track {
  --card-w: clamp(240px, 24vw, 310px);
  display: grid; grid-auto-flow: column; grid-auto-columns: var(--card-w); gap: 20px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  padding: 6px max(var(--gutter), calc((100vw - var(--maxw)) / 2 + var(--gutter))) 22px;
  scroll-padding-inline: max(var(--gutter), calc((100vw - var(--maxw)) / 2 + var(--gutter)));
  scrollbar-width: none;
}
.row__track::-webkit-scrollbar { display: none; }
.row__track > * { scroll-snap-align: start; }
.row__track--rec { --card-w: clamp(230px, 22vw, 290px); }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 24px 20px; padding-bottom: 24px; }

/* class card */
.ccard { min-width: 0; }
.ccard__link {
  display: flex; flex-direction: column; height: 100%;
  background: var(--white); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-1); border: 1px solid var(--line);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.ccard__link:hover, .ccard__link:focus-visible { transform: translateY(-5px); box-shadow: var(--shadow-2), var(--ring-gold); border-color: transparent; }
.ccard__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--parchment); }
.ccard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease), opacity .4s; }
.ccard__link:hover .ccard__media img { transform: scale(1.06); }
.ccard__badges { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.ccard__play {
  position: absolute; right: 12px; bottom: 12px; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255, 255, 255, .94); color: var(--ink);
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .5); transform: scale(.85); opacity: 0;
  transition: transform .35s var(--ease), opacity .3s, background .3s;
}
.ccard__play svg { width: 16px; height: 16px; margin-left: 2px; }
.ccard__link:hover .ccard__play { transform: none; opacity: 1; background: var(--gold-bright); }
.ccard__fallback {
  width: 100%; height: 100%; display: grid; place-items: center;
  background: radial-gradient(circle at 70% 30%, rgba(212, 175, 55, .35), transparent 60%), linear-gradient(135deg, #1d1b17, #3a3021);
}
.ccard__fallback span { font-family: var(--display); font-size: 2.4rem; color: var(--gold-bright); letter-spacing: .08em; }
.ccard__fallback--hero span { font-size: clamp(3rem, 7vw, 5rem); }
.ccard__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ccard__top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ccard__code { font-family: var(--display); font-size: .92rem; letter-spacing: .1em; color: var(--gold-deep); }
.ccard__cat { font-size: .74rem; font-weight: 600; color: var(--muted); padding-left: 8px; border-left: 1px solid var(--line-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ccard__title { font-size: 1rem; font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ccard__meta { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .82rem; color: var(--muted); }
.ccard__meta span { display: inline-flex; align-items: center; gap: 6px; }
.ccard__meta svg { width: 15px; height: 15px; color: var(--gold); }

/* recording card (continue watching / search) */
.rcard__link { display: block; }
.rcard__media { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-md); overflow: hidden; background: var(--parchment); box-shadow: var(--shadow-1); transition: box-shadow .3s, transform .3s var(--ease); }
.rcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.rcard__link:hover .rcard__media { box-shadow: var(--shadow-2), var(--ring-gold); transform: translateY(-3px); }
.rcard__link:hover .rcard__media img { transform: scale(1.05); }
.rcard__play { position: absolute; inset: 0; margin: auto; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .92); box-shadow: 0 8px 22px -8px rgba(0, 0, 0, .5); }
.rcard__play svg { width: 16px; height: 16px; margin-left: 2px; }
.rcard__dur { position: absolute; right: 10px; bottom: 10px; padding: 3px 8px; border-radius: 6px; background: rgba(23, 23, 23, .78); color: #fff; font-size: .72rem; font-weight: 700; }
.rcard__body { padding: 12px 2px 0; display: grid; gap: 3px; }
.rcard__class { font-size: .78rem; font-weight: 700; color: var(--gold-deep); }
.rcard__title { font-size: .95rem; font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rcard__meta { font-size: .82rem; color: var(--muted); }

img.js-fade { opacity: 0; }
img.js-fade.is-loaded { opacity: 1; }
.ccard__media:has(img.js-fade:not(.is-loaded)), .rcard__media:has(img.js-fade:not(.is-loaded)), .rec__thumb:has(img.js-fade:not(.is-loaded)) {
  background: linear-gradient(90deg, #F1ECE2 0%, #F8F5EF 50%, #F1ECE2 100%); background-size: 200% 100%; animation: skel 1.2s ease-in-out infinite;
}

/* -------------------------------------------------------------- page head */
.pagehead { padding: clamp(28px, 4vw, 48px) 0 24px; background: linear-gradient(180deg, var(--parchment), var(--ivory)); margin-bottom: 18px; }
.pagehead__title { font-family: var(--display); font-weight: 400; font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.pagehead__sub { margin-top: 8px; color: var(--muted); }

.bigsearch { position: relative; display: flex; gap: 10px; margin-top: 20px; max-width: 720px; }
.bigsearch > svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); }
.bigsearch input {
  flex: 1; min-width: 0; height: 56px; padding: 0 18px 0 50px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--white); font-size: 1rem; box-shadow: var(--shadow-1);
}
.bigsearch input:focus { outline: none; border-color: var(--gold); box-shadow: var(--ring-gold); }
.bigsearch .btn { --h: 56px; }

/* ------------------------------------------------------------ class page */
.classhero { position: relative; padding: 22px 0 clamp(28px, 4vw, 52px); overflow: hidden; }
.classhero__bg { position: absolute; inset: 0; z-index: -1; background: radial-gradient(700px 400px at 20% 30%, rgba(212, 175, 55, .16), transparent 70%), linear-gradient(180deg, var(--parchment), var(--ivory)); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .86rem; color: var(--muted); margin-bottom: 22px; }
.crumbs a:hover { color: var(--ink); }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }
.classhero__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.classhero__media { border-radius: var(--r-xl); overflow: hidden; aspect-ratio: 16 / 9; box-shadow: var(--shadow-3), 0 0 0 1px rgba(201, 154, 46, .25); background: var(--sand); }
.classhero__media img { width: 100%; height: 100%; object-fit: cover; }
.classhero__copy .hero__code { margin-top: 0; }
.classhero__title { font-family: var(--display); font-weight: 400; font-size: clamp(1.8rem, 3.4vw, 2.75rem); line-height: 1.12; margin-top: 8px; text-wrap: balance; }
.facts { display: flex; flex-wrap: wrap; gap: 14px 28px; margin: 24px 0 0; }
.facts > div { display: grid; gap: 2px; }
.facts dt { font-size: .78rem; font-weight: 600; color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; font-size: .98rem; }
.facts--stack { flex-direction: column; gap: 12px; margin-top: 14px; }

.classbody { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(24px, 3vw, 44px); padding-bottom: 56px; align-items: start; }
.sectionhead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.sectionhead__count { font-size: .88rem; font-weight: 600; color: var(--muted); }

.reclist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.rec__link {
  display: grid; grid-template-columns: 54px 168px minmax(0, 1fr) auto; align-items: center; gap: 18px;
  padding: 14px 18px 14px 14px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-1); transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.rec__link:hover { transform: translateY(-2px); box-shadow: var(--shadow-2), var(--ring-gold); border-color: transparent; }
.rec__num { font-family: var(--display); font-size: 1.9rem; color: var(--gold); text-align: center; line-height: 1; }
.rec__thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--parchment); }
.rec__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.rec__link:hover .rec__thumb img { transform: scale(1.06); }
.rec__playicon { position: absolute; inset: 0; margin: auto; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .92); opacity: 0; transform: scale(.85); transition: .3s var(--ease); }
.rec__playicon svg { width: 13px; height: 13px; margin-left: 2px; }
.rec__link:hover .rec__playicon { opacity: 1; transform: none; }
.rec__body { display: grid; gap: 4px; min-width: 0; }
.rec__session { display: flex; align-items: center; gap: 10px; font-size: .8rem; font-weight: 700; color: var(--gold-deep); }
.rec__seen { display: inline-flex; align-items: center; gap: 4px; font-style: normal; color: var(--ok); font-weight: 600; }
.rec__seen svg { width: 13px; height: 13px; }
.rec__title { font-size: 1.04rem; line-height: 1.35; }
.rec__meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .84rem; color: var(--muted); margin-top: 2px; }
.rec__meta span { display: inline-flex; align-items: center; gap: 6px; }
.rec__meta svg { width: 15px; height: 15px; color: var(--gold); }
.rec__meta--lg { font-size: .92rem; margin-top: 10px; }
.rec.is-watched .rec__num { color: rgba(201, 154, 46, .55); }

.sidecard { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-1); }
.sidecard + .sidecard { margin-top: 16px; }
.sidecard__title { font-size: 1rem; font-weight: 700; margin-bottom: 12px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.sidecard__title span { font-size: .82rem; color: var(--muted); font-weight: 600; }
.sidecard__label { display: block; font-size: .78rem; color: var(--muted); font-weight: 600; }
.sidecard--person { display: flex; gap: 16px; align-items: flex-start; }
.sidecard--person p { margin-top: 6px; font-size: .9rem; color: var(--ink-2); }
.classbody__side { position: sticky; top: calc(var(--header-h) + 20px); }
.prose { color: var(--ink-2); font-size: .96rem; line-height: 1.7; }

/* --------------------------------------------------------------- player */
.player { padding-top: 22px; padding-bottom: 56px; }
.player__grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.player__frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden; background: #0d0d0d; box-shadow: var(--shadow-3), 0 0 0 1px rgba(201, 154, 46, .3); }
.player__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player__info { padding: 22px 4px 0; }
.player__title { font-family: var(--display); font-weight: 400; font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin-top: 8px; }
.player__desc { margin-top: 16px; max-width: 70ch; }
.player__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.player__side { position: sticky; top: calc(var(--header-h) + 20px); }
.sidecard--list { padding: 18px 10px 10px; }
.sidecard--list .sidecard__title { padding: 0 10px; }
.minilist { list-style: none; padding: 0; margin: 0; max-height: 62vh; overflow: auto; }
.minilist a { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; transition: background .2s; }
.minilist a:hover { background: var(--parchment); }
.minilist__num { flex: none; min-width: 34px; height: 34px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center; background: var(--parchment); font-family: var(--display); color: var(--gold-deep); font-size: .9rem; }
.minilist__num svg { width: 12px; height: 12px; }
.minilist__text { display: grid; min-width: 0; }
.minilist__text strong { font-size: .9rem; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.minilist__text small { color: var(--muted); font-size: .78rem; }
.minilist li.is-current a { background: var(--ink); color: #fff; }
.minilist li.is-current .minilist__num { background: var(--gold-grad); color: var(--ink); }
.minilist li.is-current small { color: rgba(255, 255, 255, .65); }
.minilist--plain { max-height: none; }

/* --------------------------------------------------------- search results */
.resultlist { list-style: none; padding: 0; margin: 0 0 40px; display: grid; gap: 10px; }
.result { display: flex; align-items: center; gap: 16px; padding: 12px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); transition: box-shadow .25s, border-color .25s; }
.result:hover { box-shadow: var(--shadow-2), var(--ring-gold); border-color: transparent; }
.result__thumb { flex: none; width: 128px; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--parchment); }
.result__thumb img { width: 100%; height: 100%; object-fit: cover; }
.result__body { display: grid; gap: 2px; min-width: 0; flex: 1; }
.result__class { font-size: .78rem; font-weight: 700; color: var(--gold-deep); }
.result__body small { color: var(--muted); }

/* --------------------------------------------------------------- profile */
.profile { display: grid; gap: 16px; max-width: 760px; padding-bottom: 56px; }
.profile .sidecard + .sidecard { margin-top: 0; }
.profile__card { display: flex; gap: 22px; align-items: center; }
.profile__name { font-size: 1.25rem; }
.profile__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.pilllist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pilllist a { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--ivory); border: 1px solid var(--line); font-weight: 600; font-size: .92rem; }
.pilllist a:hover { border-color: var(--gold); }
.pilllist b { font-family: var(--display); font-weight: 400; color: var(--gold-deep); min-width: 64px; }

/* ---------------------------------------------------------------- empty */
.empty { text-align: center; padding: clamp(48px, 8vw, 96px) 20px; max-width: 520px; margin: 0 auto; }
.empty--inline { padding: 48px 24px; background: var(--white); border: 1px dashed rgba(201, 154, 46, .45); border-radius: var(--r-lg); max-width: none; }
.empty--page { padding-top: 80px; }
.empty__icon { width: 68px; height: 68px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; background: var(--parchment); color: var(--gold-deep); box-shadow: inset 0 0 0 1px rgba(201, 154, 46, .3); }
.empty__icon svg { width: 28px; height: 28px; }
.empty h1, .empty h2, .empty h3 { font-family: var(--display); font-weight: 400; font-size: 1.55rem; }
.empty p { margin-top: 10px; color: var(--muted); }
.empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 26px; }

/* --------------------------------------------------------------- footer */
.footer { margin-top: 40px; border-top: 1px solid var(--line); background: var(--white); }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding-block: 28px; }
.footer__brand { display: flex; align-items: center; gap: 14px; }
.footer__brand img { height: 56px; width: auto; }
.footer__brand strong { font-family: var(--display); font-weight: 400; font-size: 1.2rem; }
.footer__brand p { font-size: .9rem; color: var(--muted); }
.footer__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; font-size: .86rem; color: var(--muted); }
.footer__help { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); }
.footer__help svg { color: var(--gold-deep); width: 18px; height: 18px; }

.tabbar { display: none; }

/* ------------------------------------------------------------- auth page */
.authpage { min-height: 100vh; background: var(--ivory); }
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.login__stage {
  position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px; gap: 36px;
  background: radial-gradient(520px 420px at 50% 42%, rgba(212, 175, 55, .22), transparent 70%), linear-gradient(160deg, var(--parchment) 0%, #EFE6D3 100%);
  border-right: 1px solid rgba(201, 154, 46, .2);
}
.login__pattern { position: absolute; inset: 0; background: url("../images/pattern.svg") repeat; background-size: 96px; opacity: .08; mask-image: radial-gradient(ellipse at center, #000 0%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse at center, #000 0%, transparent 70%); }
.login__arch { position: relative; width: min(320px, 70%); aspect-ratio: 320 / 420; display: grid; place-items: center; padding: 22% 0 6%; }
.login__arch .arch-line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.login__arch .arch-line path { stroke-width: 1.6; }
.login__arch::before { content: ""; position: absolute; inset: 0; border-radius: 160px 160px 0 0; background: rgba(255, 255, 255, .45); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6); }
.login__logo { position: relative; width: 74%; height: auto; filter: drop-shadow(0 18px 24px rgba(120, 86, 20, .22)); animation: heroin 1s .2s var(--ease) both; transform: translateY(12px); }
.login__tagline { position: relative; font-family: var(--display); font-size: 1.3rem; color: var(--ink-2); text-align: center; max-width: 26ch; }
.login__panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px var(--gutter); }
.login__card { width: 100%; max-width: 440px; }
.login__mobilelogo { display: none; }
.login__kicker { font-size: 1rem; font-weight: 600; color: var(--muted); }
.login__title { font-family: var(--display); font-weight: 400; font-size: clamp(2.2rem, 4vw, 3rem); line-height: 1.05; margin-top: 6px; }
.login__sub { margin-top: 14px; color: var(--ink-2); font-size: 1.02rem; }
.login__form { margin-top: 32px; display: grid; gap: 20px; }
.login__help { margin-top: 22px; font-size: .9rem; color: var(--muted); }
.login__help a { color: var(--ink); font-weight: 700; border-bottom: 1px solid rgba(201, 154, 46, .5); }
.login__foot { margin-top: 40px; font-size: .8rem; color: var(--muted); }

.field { display: grid; gap: 8px; }
.field label { font-weight: 700; font-size: .92rem; }
.field__control { position: relative; }
.field__control--icon > svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--gold-deep); pointer-events: none; }
.field__control input {
  width: 100%; height: 58px; padding: 0 18px; border-radius: var(--r-md);
  border: 1px solid var(--line-2); background: var(--white); font-size: 1.08rem; font-weight: 600; letter-spacing: .02em;
  box-shadow: var(--shadow-1); transition: border-color .2s, box-shadow .2s;
}
.field__control--icon input { padding-left: 48px; }
.field__control input::placeholder { color: #A39A8C; font-weight: 500; letter-spacing: 0; }
.field__control input:focus { outline: none; border-color: var(--gold); box-shadow: var(--ring-gold); }
.field__help { font-size: .85rem; color: var(--muted); }
.field__error { font-size: .86rem; color: var(--danger); font-weight: 600; }
.field.has-error input { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(163, 58, 44, .1); }

.check { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-size: .92rem; font-weight: 600; color: var(--ink-2); min-height: 44px; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check__box { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--line-2); background: var(--white); display: grid; place-items: center; transition: .2s; }
.check__box svg { width: 14px; height: 14px; color: var(--ink); opacity: 0; transform: scale(.6); transition: .2s var(--ease); }
.check input:checked + .check__box { background: var(--gold-grad); border-color: var(--gold); }
.check input:checked + .check__box svg { opacity: 1; transform: none; }
.check input:focus-visible + .check__box { box-shadow: var(--ring-gold); }

.alert { padding: 14px 16px; border-radius: var(--r-md); font-size: .92rem; margin-top: 22px; }
.alert--warn { background: #FBF3E1; border: 1px solid rgba(201, 154, 46, .4); color: #6E5210; }
.alert--error { background: #FBECE9; border: 1px solid rgba(163, 58, 44, .3); color: var(--danger); }

.notice-state { text-align: center; animation: rise .5s var(--ease) both; }
.notice-state__icon { width: 72px; height: 72px; margin: 26px auto 20px; border-radius: 50%; display: grid; place-items: center; background: var(--parchment); color: var(--gold-deep); box-shadow: inset 0 0 0 1px rgba(201, 154, 46, .35), 0 12px 30px -16px rgba(184, 137, 42, .6); }
.notice-state__icon svg { width: 30px; height: 30px; }
.notice-state__title { font-family: var(--display); font-weight: 400; font-size: 1.9rem; margin-bottom: 12px; }
.notice-state p { color: var(--ink-2); }
.notice-state p.muted { color: var(--muted); margin-top: 8px; font-size: .94rem; }
.notice-state__actions { display: grid; gap: 10px; margin-top: 30px; }

.simple-state { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(600px 400px at 50% 30%, rgba(212, 175, 55, .18), transparent 70%), var(--ivory); }
.simple-state__card { width: 100%; max-width: 480px; text-align: center; background: var(--white); border-radius: var(--r-xl); padding: 44px 32px; border: 1px solid var(--line); box-shadow: var(--shadow-3); }
.simple-state__logo { height: 110px; width: auto; margin: 0 auto 22px; }
.simple-state__code { font-family: var(--display); color: var(--gold-deep); letter-spacing: .2em; margin-bottom: 6px; }
.simple-state h1 { font-family: var(--display); font-weight: 400; font-size: 1.75rem; }
.simple-state p { color: var(--muted); margin-top: 12px; }
.simple-state__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 26px; }

/* --------------------------------------------------------------- toasts */
.toast-stack { position: fixed; z-index: 90; right: 20px; bottom: 20px; display: grid; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; gap: 12px; align-items: flex-start;
  background: var(--ink); color: #fff; padding: 14px 16px; border-radius: 16px;
  box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .55); font-size: .92rem; font-weight: 500;
  animation: toastin .35s var(--ease) both;
}
.toast.is-leaving { animation: toastout .3s var(--ease) forwards; }
.toast__dot { flex: none; width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; background: var(--gold-bright); box-shadow: 0 0 0 4px rgba(212, 175, 55, .2); }
.toast--error .toast__dot { background: #E36B5A; box-shadow: 0 0 0 4px rgba(227, 107, 90, .2); }
.toast--success .toast__dot { background: #7BC796; box-shadow: 0 0 0 4px rgba(123, 199, 150, .2); }
.toast__close { margin-left: auto; background: none; border: 0; color: rgba(255, 255, 255, .6); padding: 2px; }
@keyframes toastin { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes toastout { to { opacity: 0; transform: translateY(8px); } }

/* ============================================================ responsive */
@media (max-width: 1100px) {
  .classbody { grid-template-columns: 1fr; }
  .classbody__side { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .classbody__side .sidecard + .sidecard { margin-top: 0; }
  .player__grid { grid-template-columns: 1fr; }
  .player__side { position: static; }
}

@media (max-width: 900px) {
  :root { --header-h: 62px; }
  .mainnav { display: none; }
  .brand__logo { height: 42px; }
  .searchtoggle { display: inline-grid; }
  .searchbox { display: none; }
  .topbar.is-searching .searchbox {
    display: flex; position: absolute; inset: 0; padding: 9px var(--gutter); background: var(--ivory); z-index: 2;
  }
  .topbar.is-searching .searchbox input, .topbar.is-searching .searchbox input:focus { width: 100%; }
  .topbar.is-searching .searchbox__icon { left: calc(var(--gutter) + 14px); }
  .topbar.is-searching .searchbox__close { display: inline-grid; place-items: center; width: 44px; height: 44px; margin-left: 6px; border: 0; background: none; flex: none; }
  .topbar.is-searching .searchbox__close svg { width: 20px; height: 20px; }
  .search-pop { left: var(--gutter); right: var(--gutter); width: auto; }

  .tabbar {
    display: grid; grid-template-columns: repeat(4, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
  }
  .tabbar a { display: grid; justify-items: center; gap: 3px; padding: 7px 0; font-size: .72rem; font-weight: 700; color: var(--muted); border-radius: 12px; }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar a.is-active { color: var(--ink); }
  .tabbar a.is-active svg { color: var(--gold-deep); }
  body.portal { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .toast-stack { bottom: calc(84px + env(safe-area-inset-bottom)); right: 16px; }

  .hero { padding-top: 18px; }
  .hero__inner { grid-template-columns: 1fr; gap: 22px; }
  .hero__art { order: -1; padding: 0; }
  .hero__arch { display: none; }
  .hero__frame { border-radius: var(--r-lg); }
  .hero__greet { margin-bottom: 10px; }
  .hero__code { margin-top: 12px; }
  .hero__title { font-size: clamp(1.75rem, 7vw, 2.3rem); max-width: none; }
  .hero__cta { margin-top: 22px; }
  .hero__cta .btn { flex: 1 1 auto; }

  .classhero__grid { grid-template-columns: 1fr; }
  .row__nav { display: none; }
  .row__track { --card-w: 72vw; gap: 14px; }
  .row__track--rec { --card-w: 66vw; }

  .login { grid-template-columns: 1fr; }
  .login__stage { display: none; }
  .login__panel { justify-content: flex-start; padding-top: 36px; background: radial-gradient(420px 300px at 50% 0%, rgba(212, 175, 55, .18), transparent 70%); }
  .login__mobilelogo { display: block; height: 108px; width: auto; margin: 0 auto 26px; }
  .login__card { text-align: left; }
}

@media (max-width: 640px) {
  .rec__link { grid-template-columns: 112px minmax(0, 1fr); gap: 14px; padding: 12px; align-items: start; }
  .rec__num { display: none; }
  .rec__cta { grid-column: 1 / -1; }
  .rec__cta .btn { width: 100%; --h: 44px; }
  .rec__title { font-size: .98rem; }
  .rec__meta span:nth-child(3) { display: none; }
  .classbody__side { grid-template-columns: 1fr; }
  .grid-cards { grid-template-columns: 1fr; gap: 16px; }
  .bigsearch .btn { display: none; }
  .result__thumb { width: 96px; }
  .result .btn { display: none; }
  .profile__card { flex-direction: column; align-items: flex-start; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
  .brand__product { font-size: 1rem; }
}

@media (min-width: 641px) and (max-width: 900px) {
  .grid-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .arch-line path { stroke-dashoffset: 0; }
}

/* Compact hero on phones (keeps first screen focused) */
@media (max-width: 640px) {
  .hero__greet, .hero__count { display: none; }
  .hero__eyebrow { font-size: .82rem; }
  .hero__chips li:nth-child(n+3) { display: none; }
  .hero__chips { margin-top: 16px; }
  .hero__tagline { margin-top: 10px; }
  .hero__code { margin-top: 8px; }
}

/* Subscription expiry reminder */
.expirybar { background: linear-gradient(90deg, #FBF3E1, #F6E7C1); border-bottom: 1px solid rgba(201, 154, 46, .35); }
.expirybar__inner { display: flex; align-items: center; gap: 14px; padding-block: 12px; }
.expirybar__inner > svg { width: 22px; height: 22px; color: var(--gold-deep); flex: none; }
.expirybar p { flex: 1; font-size: .92rem; color: #5E4610; display: flex; flex-wrap: wrap; gap: 2px 8px; }
.expirybar strong { color: var(--ink); }
@media (max-width: 640px) {
  .expirybar__inner { flex-wrap: wrap; }
  .expirybar .btn { width: 100%; }
}
