/* ==========================================================================
   ByteMart Product Hub
   Palette and type follow the mastery portals (paper / ink / violet, Manrope
   + Inter) so the hub and the portals read as one product family. Colour on
   the page comes from the product artwork; the interface itself stays quiet.
   ========================================================================== */

:root {
  --paper: #F5F6FA;
  --card: #FFFFFF;
  --ink: #101629;
  --ink-2: #3A4359;
  --muted: #5B6478;
  --faint: #727C98;
  --line: #E6E8F0;
  --line-2: #D3D8E6;

  --violet: #6D42D6;
  --violet-deep: #5632B8;
  --violet-soft: #F1ECFD;
  --cyan: #0BA5C6;
  --green: #0B7A53;
  --green-soft: #E3F6EE;

  --display: "Manrope", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --shadow-rest: 0 1px 2px rgba(16, 22, 41, .04), 0 1px 1px rgba(16, 22, 41, .03);
  --shadow-lift: 0 26px 44px -26px rgba(38, 28, 96, .34), 0 6px 14px -8px rgba(16, 22, 41, .10);
  --ease: cubic-bezier(.2, .7, .2, 1);

  --nav-h: 68px;
  --gutter: 24px;
}

/* ---------- base ------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, dl, dd { margin: 0; }
svg, img { display: block; }

:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }

.wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  transition: top .15s;
}
.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- top navigation -------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s;
}
.nav.is-scrolled { box-shadow: 0 10px 24px -22px rgba(16, 22, 41, .55); }

.nav-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--nav-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 800 1.1875rem/1 var(--display);
  letter-spacing: -.02em;
  border-radius: 10px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(150deg, var(--violet) 0%, #4B2BA6 55%, var(--cyan) 140%);
  box-shadow: 0 6px 14px -8px rgba(109, 66, 214, .9);
}
.brand-mark svg { width: 22px; height: 22px; fill: currentColor; }

/* links sit in the true centre of the bar */
.nav-links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: 9px;
  font-size: .9375rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--ink); background: var(--paper); }
.nav-links a[aria-current="true"] { color: var(--ink); font-weight: 600; background: var(--paper); }

.nav-tools {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 248px;
  min-width: 150px;
  height: 40px;
  padding: 0 8px 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.search:focus-within {
  background: #fff;
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(109, 66, 214, .14);
}
.search-icon { width: 16px; height: 16px; flex: none; color: var(--faint); }
.search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: .9375rem;
  color: var(--ink);
}
.search-input::placeholder { color: var(--faint); }
.search-key {
  font: 500 .75rem/1 var(--sans);
  color: var(--faint);
  border: 1px solid var(--line-2);
  border-radius: 5px;
  padding: 3px 6px;
  background: #fff;
}
.search:focus-within .search-key,
.search.has-value .search-key { display: none; }
.search-clear {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  color: var(--muted);
}
.search-clear:hover { background: var(--line); color: var(--ink); }
.search-clear svg { width: 14px; height: 14px; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: var(--ink-2);
}
.icon-btn:hover { background: var(--paper); }
.icon-btn svg { width: 19px; height: 19px; }
.search-toggle { display: none; }

.account { position: relative; }
.account[hidden] { display: none; }
/* not signed in: the avatar/menu button is only needed on phones, where
   the section links live inside it (see the 919px rules) */
.account.is-guest { display: none; }
.account.is-guest .avatar { border-radius: 12px; }
.btn-signin { min-height: 40px; padding: 0 16px; border-radius: 999px; font-size: .9063rem; }
.btn-signin[hidden] { display: none; }
.menu-signin {
  display: flex;
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  font: 600 .9375rem/1.4 var(--sans);
  color: var(--violet);
  text-align: left;
}
.menu-signin:hover { background: var(--paper); }
.menu-signout {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 12px;
  font: 500 .9375rem/1.3 var(--sans);
  color: var(--ink-2);
  text-align: left;
}
.menu-signout:hover { background: #FFF1F2; color: #9F1239; }
.menu-signout:hover small { color: #BE123C; }
.menu-signout:disabled { opacity: .6; }
.menu-group.menu-guest { padding-bottom: 6px; }
.menu-group.menu-guest[hidden], .menu-group#menuAccount[hidden] { display: none; }
.avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  font: 700 .8125rem/1 var(--display);
  transition: border-color .15s, box-shadow .15s;
}
.avatar:hover, .avatar[aria-expanded="true"] {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(109, 66, 214, .12);
}
.avatar svg { width: 19px; height: 19px; }

.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 300px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 28px 50px -22px rgba(16, 22, 41, .36), 0 2px 8px rgba(16, 22, 41, .06);
  transform-origin: top right;
  animation: menu-in .14s var(--ease);
}
/* who is signed in: gradient initials, name, email, and an "owned" chip
   that jumps to My Products */
.menu-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "avatar who" "owned owned";
  align-items: center;
  gap: 10px 12px;
  padding: 10px 10px 12px;
  border-radius: 12px;
  background:
    radial-gradient(260px 120px at 100% 0%, rgba(31, 182, 220, .14), transparent 70%),
    linear-gradient(135deg, #F4F0FF 0%, #F7F9FF 100%);
}
.menu-avatar {
  grid-area: avatar;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet) 0%, #A531D8 100%);
  color: #fff;
  font: 700 .9375rem/1 var(--display);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 10px 16px -10px rgba(109, 66, 214, .9);
}
.menu-avatar[hidden] { display: none; }
.menu-who { grid-area: who; display: grid; gap: 1px; min-width: 0; }
.menu-who strong { font: 700 .9688rem/1.3 var(--display); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-email { font-size: .8125rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-email[hidden] { display: none; }
.menu-owned {
  grid-area: owned;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px 5px 9px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(109, 66, 214, .16);
  font-size: .8125rem;
  font-weight: 600;
  color: var(--violet-deep);
}
.menu-owned::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(22, 163, 74, .15); }
.menu-owned:hover { background: var(--violet-soft); }
.menu-owned[hidden] { display: none; }
.menu-head:has(.menu-avatar[hidden]) { grid-template-columns: minmax(0, 1fr); grid-template-areas: "who" "owned"; }

.menu-group { display: grid; gap: 2px; padding: 8px 0 0; margin-top: 8px; border-top: 1px solid var(--line); }
.menu-group a,
.menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: .9375rem;
  color: var(--ink-2);
}
.menu-group a:hover, .menu-link:hover { background: var(--paper); color: var(--ink); }
.menu-group a > svg { width: 14px; height: 14px; margin-left: auto; color: var(--faint); }
.menu-ic {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--ic-bg, var(--violet-soft));
  color: var(--ic-fg, var(--violet));
}
.menu-ic svg { width: 18px; height: 18px; }
.menu-ic-violet { --ic-bg: #EFE9FF; --ic-fg: #6D42D6; }
.menu-ic-blue { --ic-bg: #E6F0FF; --ic-fg: #1557D6; }
.menu-ic-sky { --ic-bg: #E3F5FF; --ic-fg: #1B8FE3; }
.menu-ic-rose { --ic-bg: #FFE9F3; --ic-fg: #D42C7C; }
.menu-ic-out { --ic-bg: #FFF1F2; --ic-fg: #BE123C; }
.menu-link[hidden] { display: none; }
.menu-link-text, .menu-signout-text { display: grid; gap: 1px; min-width: 0; }
.menu-link-text strong, .menu-signout-text strong { font-weight: 600; font-size: .9375rem; line-height: 1.3; }
.menu-link-text small, .menu-signout-text small { font-size: .78rem; line-height: 1.3; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-group.menu-sections { display: none; }
.menu-group.menu-sections a { padding: 9px 12px; }

/* ---------- welcome ---------------------------------------------------- */
/* A branded banner in the product artwork's studio look: copy and actions
   on the left, a floating illustration on the right. */

/* top of the page: lavender fading to white, with a cyan glow top right */
.hero {
  padding: 28px 0 40px;
  background:
    radial-gradient(720px 420px at 100% 0%, rgba(31, 182, 220, .20), transparent 70%),
    radial-gradient(640px 380px at 0% 10%, rgba(124, 77, 255, .16), transparent 70%),
    linear-gradient(180deg, #F1EBFF 0%, #F8F5FF 55%, #fff 100%);
}

.hero-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 530px);
  gap: 24px;
  align-items: center;
  padding: 36px 28px 36px 56px;
  border-radius: 30px;
  background: #2A1578 linear-gradient(120deg, #120937 0%, #37209A 55%, #4E3ACB 100%) center / cover no-repeat;
  color: #fff;
  box-shadow: 0 34px 60px -42px rgba(42, 21, 120, .9);
}
.hero-panel::after { /* deepens the left side so the copy stays readable */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(12, 6, 42, .5) 0%, rgba(12, 6, 42, .14) 50%, transparent 74%);
}

/* two soft lights that drift slowly behind everything */
.hero-glow {
  position: absolute;
  z-index: -1;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  pointer-events: none;
  animation: hero-drift 16s ease-in-out infinite alternate;
}
.hero-glow-a { top: -260px; right: 4%; background: radial-gradient(closest-side, rgba(31, 182, 220, .5), transparent); }
.hero-glow-b { bottom: -330px; left: 34%; background: radial-gradient(closest-side, rgba(238, 95, 191, .42), transparent); animation-delay: -8s; }
@keyframes hero-drift {
  from { transform: translate3d(-36px, 0, 0) scale(1); }
  to { transform: translate3d(44px, 24px, 0) scale(1.12); }
}

.hero-title {
  font: 800 clamp(1.875rem, 1.2rem + 2.4vw, 3rem)/1.06 var(--display);
  letter-spacing: -.032em;
}
.hero-lead {
  margin-top: 16px;
  font: 700 clamp(1.0625rem, .98rem + .5vw, 1.3125rem)/1.35 var(--display);
  letter-spacing: -.012em;
  color: rgba(255, 255, 255, .95);
}
.hero-text {
  margin-top: 8px;
  max-width: 48ch;
  color: rgba(255, 255, 255, .74);
  line-height: 1.6;
}

/* pill above the heading: a live count, and a shortcut to that section */
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 36px;
  margin-bottom: 20px;
  padding: 0 14px 0 13px;
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: .8438rem;
  font-weight: 600;
  color: #fff;
  transition: background .2s, border-color .2s;
}
.hero-pill svg { width: 14px; height: 14px; opacity: .8; transition: transform .22s var(--ease); }
.hero-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ADE80;
  box-shadow: 0 0 0 4px rgba(74, 222, 128, .22);
}
.hero-pill:focus-visible { outline-color: #fff; }

/* search box in the banner */
.hero-search {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 520px;
  margin-top: 26px;
  padding: 6px 6px 6px 16px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 30px -18px rgba(6, 3, 26, .85);
  transition: box-shadow .2s;
}
.hero-search:focus-within { box-shadow: 0 0 0 4px rgba(255, 255, 255, .28), 0 18px 30px -18px rgba(6, 3, 26, .85); }
.hero-search-icon { flex: none; width: 19px; height: 19px; color: var(--faint); }
.hero-search-input {
  flex: 1;
  min-width: 0;
  height: 44px;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
}
.hero-search-input::placeholder { color: var(--faint); }
.hero-search .btn { flex: none; min-height: 44px; padding: 0 22px; border-radius: 11px; }
.hero-search .btn:focus-visible { outline-color: var(--violet); }

/* shortcut searches */
.hero-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.hero-chips-label { margin-right: 2px; font-size: .8438rem; color: rgba(255, 255, 255, .7); }
.hero-chip {
  height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  font-size: .875rem;
  font-weight: 500;
  color: #fff;
  transition: background .18s, color .18s, border-color .18s;
}
.hero-chip[aria-pressed="true"] { background: #fff; border-color: #fff; color: var(--ink); font-weight: 600; }
.hero-chip:focus-visible { outline-color: #fff; }

/* stats strip under the banner */
.stats {
  display: grid;
  grid-template-columns: repeat(var(--stat-cols, 4), minmax(0, 1fr)); /* one row; count set by app.js */
  gap: 1px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--line); /* shows through the 1px gaps as dividers */
  overflow: hidden;
  box-shadow: var(--shadow-rest);
}
.stat {
  --tint: var(--violet-soft);
  --tone: var(--violet);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 14px;
  padding: 20px 24px;
  background: #fff;
}
.stat-green { --tint: #E3F6EE; --tone: #0B7A53; }
.stat-blue { --tint: #E4EDFD; --tone: #1557D6; }
.stat-orange { --tint: #FDEDE0; --tone: #C45011; }
.stat-icon {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 15px;
  background: var(--tint);
  color: var(--tone);
}
.stat-icon svg { width: 24px; height: 24px; }
.stat-value {
  align-self: end;
  font: 800 1.5rem/1.15 var(--display);
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.stat-label { align-self: start; margin-top: 2px; font-size: .875rem; color: var(--muted); }

/* the illustration */
.hero-visual { min-width: 0; margin: -8px 0; }
.hero-art { display: block; width: 100%; height: auto; overflow: visible; }
.hero-art .float {
  animation: hero-bob 7s ease-in-out infinite;
  animation-delay: var(--d, 0s);
  filter: drop-shadow(0 12px 10px rgba(8, 4, 34, .4));
}
.hero-art .float-core { animation-duration: 9s; filter: drop-shadow(0 22px 18px rgba(8, 4, 34, .5)); }
@keyframes hero-bob {
  0%, 100% { transform: translateY(calc(var(--amp, 7px) * -1)); }
  50% { transform: translateY(var(--amp, 7px)); }
}
.hero-art .twinkle {
  transform-box: fill-box;
  transform-origin: center;
  animation: hero-twinkle 3.8s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}
@keyframes hero-twinkle {
  0%, 100% { opacity: .2; transform: scale(.6); }
  50% { opacity: 1; transform: scale(1); }
}

/* ---------- filter bar ------------------------------------------------- */

.library { scroll-margin-top: var(--nav-h); }

/* Each section is a full-width band with its own background, so it is
   obvious where one ends and the next begins. */
/* Each section has its own background. The tinted ones are light "mesh"
   gradients (violet, cyan and a touch of pink glowing on a near-white
   base); white sections sit between them. */
.band {
  padding: 48px 0 56px;
  border-top: 1px solid rgba(109, 66, 214, .09);
  background: #fff;
  scroll-margin-top: var(--nav-h);
}
.band-cats {
  padding: 40px 0 38px;
  background:
    radial-gradient(560px 300px at 0% 0%, rgba(124, 77, 255, .17), transparent 72%),
    radial-gradient(620px 320px at 100% 100%, rgba(31, 182, 220, .20), transparent 72%),
    radial-gradient(460px 240px at 62% 0%, rgba(238, 95, 191, .10), transparent 72%),
    linear-gradient(120deg, #F8F5FF 0%, #F4FAFF 100%);
}
/* Sections alternate white and tinted all the way down:
   categories (tint), My Products (white), Mastery Portals (tint),
   Courses & Bundles (white), then Reviews / FAQ. */
.band-owned { background: #fff; }
.band-portals {
  background:
    radial-gradient(760px 420px at 100% 0%, rgba(124, 77, 255, .17), transparent 72%),
    radial-gradient(760px 460px at 0% 100%, rgba(31, 182, 220, .18), transparent 72%),
    radial-gradient(620px 360px at 34% 0%, rgba(238, 95, 191, .10), transparent 72%),
    linear-gradient(180deg, #F3F7FF 0%, #F7F4FF 100%);
}
.band-explore { background: #fff; }

/* "Browse by category": centred heading with a centred row of round
   category buttons under it */
.toolbar { min-width: 0; text-align: center; }
.toolbar-head { min-width: 0; }
.toolbar-title { font: 800 1.75rem/1.15 var(--display); letter-spacing: -.028em; }
.result-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px 12px;
  flex-wrap: wrap;
  margin-top: 6px;
  color: var(--muted);
}
.result-line strong { color: var(--ink); font-weight: 600; }
.link-btn { flex: none; font-size: .875rem; font-weight: 600; color: var(--violet-deep); border-radius: 6px; padding: 2px; }
.link-btn:hover { text-decoration: underline; }

/* category buttons: a glossy sphere each, in its own colour (--c-* set
   inline by app.js). The selected one gets a ring. */
.cats { display: flex; align-items: flex-start; justify-content: center; gap: 10px; min-width: 0; margin-top: 26px; }

.cat {
  --c-button: var(--violet);
  --c-strong: var(--violet-deep);
  --c-glow: 109 66 214;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: none;
  width: 140px;
  padding: 8px 2px 4px;
  border-radius: 16px;
  text-align: center;
}
.cat-orb {
  display: block;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  box-shadow: 0 16px 20px -12px rgb(var(--c-glow) / .95);
  transition: transform .32s var(--ease), box-shadow .22s;
}
.cat-orb img { width: 100%; height: 100%; }
.cat-name {
  margin-top: 14px;
  font: 700 .9375rem/1.2 var(--display);
  letter-spacing: -.008em;
  color: var(--ink);
  transition: color .2s;
}
.cat-count { margin-top: 3px; font-size: .8125rem; color: var(--faint); font-variant-numeric: tabular-nums; }

.cat[aria-pressed="true"] .cat-orb {
  box-shadow: 0 0 0 4px #fff, 0 0 0 6.5px var(--c-button), 0 18px 22px -12px rgb(var(--c-glow) / 1);
}
.cat[aria-pressed="true"] .cat-name { color: var(--c-strong); }
.cat:focus-visible { outline: 2px solid var(--c-strong); outline-offset: 0; }

@media (hover: hover) {
  .cat:hover .cat-orb { transform: translateY(-5px) scale(1.06); }
  .cat:hover .cat-name { color: var(--c-strong); }
}

.grid { display: grid; gap: 20px; }
/* three wider cards per row on a desktop, so titles and the included
   lines stay on one line and the card stays short */
.grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }

/* section heading: title with one word in the brand gradient, a line of
   text under it, and a rule that fades out to the right */
.shelf-head { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.shelf-head::after {
  content: "";
  flex: 1;
  min-width: 24px;
  height: 1px;
  margin-left: 6px;
  background: linear-gradient(90deg, var(--line-2), rgba(211, 216, 230, 0));
}
.shelf-text { min-width: 0; }
.shelf-title { font: 800 1.75rem/1.15 var(--display); letter-spacing: -.028em; }
.toolbar-title .accent, .shelf-title .accent {
  background: linear-gradient(90deg, var(--violet) 0%, #0E8FB5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.shelf-sub { margin-top: 4px; color: var(--muted); }


/* ---------- product card ---------------------------------------------- */
/* One compact card for every product. Each takes its colours from its
   artwork's theme: the --c-* values are set inline per card by app.js
   (see palette() in covers.js). */

.card {
  --c-strong: var(--violet-deep);
  --c-button: var(--violet);
  --c-button-end: var(--violet-deep);
  --c-on-button: #fff;
  --c-soft: var(--violet-soft);
  --c-tint: #F5F2FD;
  --c-line: #E3DBF8;
  --c-edge: #B6A0EA;
  --c-glow: 109 66 214;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 8px;
  /* white card with a border that fades from the theme colour */
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(155deg, var(--c-edge) 0%, var(--c-line) 38%, var(--line) 100%) border-box;
  border: 1px solid transparent;
  border-radius: 22px;
  box-shadow: 0 1px 2px rgba(16, 22, 41, .04), 0 16px 26px -22px rgb(var(--c-glow) / .65);
  transition: transform .28s var(--ease), box-shadow .28s var(--ease);
}

.thumb {
  position: relative;
  flex: none;
  aspect-ratio: 2 / 1;
  border-radius: 15px;
  overflow: hidden;
  background: var(--c-soft);
  isolation: isolate;
}
.thumb::after { /* soft inner edge so the artwork sits in the card */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), inset 0 -28px 30px -24px rgba(0, 0, 0, .28);
  pointer-events: none;
}
.thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
.thumb-tags {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
}
.thumb-tags-end { display: flex; gap: 6px; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 25px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}
.tag svg { width: 12px; height: 12px; }
.tag-glass {
  background: rgba(8, 12, 28, .36);
  border: 1px solid rgba(255, 255, 255, .26);
  color: #fff;
  -webkit-backdrop-filter: blur(10px) saturate(1.5);
  backdrop-filter: blur(10px) saturate(1.5);
}
.tag-light {
  background: rgba(255, 255, 255, .96);
  color: var(--ink);
  box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .4);
}
.tag-owned { color: var(--green); }
/* Bestseller: gold. New: brand violet to magenta. Both get a light rim so
   they stay clear on artwork of a similar colour. */
.tag-best {
  background: linear-gradient(135deg, #FFE9A6 0%, #FFC44D 48%, #FF9F1C 100%);
  color: #4A2600;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 0 0 1px rgba(255, 255, 255, .5), 0 6px 14px -5px rgba(60, 28, 0, .65);
}
.tag-new {
  background: linear-gradient(135deg, #6D42D6 0%, #A531D8 55%, #C026D3 100%);
  color: #fff;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 0 0 1px rgba(255, 255, 255, .6), 0 6px 14px -5px rgba(40, 10, 80, .7);
}
.tag-best svg, .tag-new svg { width: 11px; height: 11px; margin-left: -2px; }

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  padding: 14px 8px 6px;
}
.card-title { font: 700 1.0625rem/1.3 var(--display); letter-spacing: -.014em; }
/* what's included: a small label and ticked lines under the description */
.card-facts { margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--c-line); }
.card-facts-label {
  margin-bottom: 6px;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--c-strong);
}
.card-facts ul { display: grid; gap: 4px; padding: 0; list-style: none; }
.card-facts li { display: flex; align-items: flex-start; gap: 8px; min-width: 0; font-size: .8125rem; line-height: 1.35; color: var(--ink-2); }
.card-facts li span { min-width: 0; overflow-wrap: anywhere; }
.card-facts svg {
  flex: none;
  width: 15px;
  height: 15px;
  margin-top: 1px;
  padding: 3px;
  border-radius: 50%;
  background: var(--c-soft);
  color: var(--c-strong);
}

.card-desc {
  margin-top: 6px;
  font-size: .875rem;
  line-height: 1.5;
  color: var(--muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.card-social {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 8px;
  font-size: .8125rem;
  color: var(--ink-2);
}
.card-social svg { display: inline; width: 13px; height: 13px; vertical-align: -1px; color: #E0A422; }

.card-foot { margin-top: auto; padding-top: 12px; }
.card-foot .btn { width: 100%; }

.own-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  margin-bottom: 10px;
  font-size: .8125rem;
}
.own-status { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; color: var(--green); }
.own-status svg { width: 14px; height: 14px; }
.own-meta { color: var(--muted); }

/* Owned card: the button's hit area covers the whole card.
   Unowned card: an invisible .card-link covers the card (product page) and
   the Get access button sits above it (checkout). */
.card-cta::after,
.card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 22px;
}
.card-buy { position: relative; z-index: 3; }
.card:has(.card-cta:focus-visible),
.card:has(.card-link:focus-visible) { outline: 2px solid var(--c-button); outline-offset: 3px; }
.card .card-cta:focus-visible,
.card .card-link:focus-visible { outline: none; }

/* "Show all" under Courses & Bundles (phone only, see app.js) */
.more-row { display: flex; justify-content: center; margin-top: 18px; }
.more-row[hidden] { display: none; }
.more-row .btn { min-width: 220px; }

/* Owned portals inside Mastery Portals: a compact row instead of repeating
   the full cards from My Products. */
.owned-row { margin-top: 18px; }
.owned-row[hidden] { display: none; }
#portalGrid[hidden] + .owned-row { margin-top: 0; }
.owned-row-label { margin-bottom: 10px; font-size: .8125rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.owned-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; padding: 0; list-style: none; }
.mini {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 10px 12px 10px 10px;
  border-radius: 18px;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(155deg, var(--c-edge) 0%, var(--c-line) 38%, var(--line) 100%) border-box;
  border: 1px solid transparent;
  box-shadow: 0 1px 2px rgba(16, 22, 41, .04), 0 14px 24px -22px rgb(var(--c-glow) / .65);
}
.mini[hidden] { display: none; }
.mini-thumb { flex: none; width: 88px; aspect-ratio: 16 / 10; border-radius: 11px; overflow: hidden; background: var(--c-soft); }
.mini-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mini-text { flex: 1; min-width: 0; display: grid; gap: 3px; }
.mini-name { font: 700 .9375rem/1.25 var(--display); letter-spacing: -.01em; color: var(--ink); }
.mini-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: .78rem; }
.mini-meta .own-meta { flex-basis: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.btn-sm { min-height: 38px; padding: 0 14px; border-radius: 11px; font-size: .875rem; }
.mini-cta { flex: none; }

/* ---------- buttons ---------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  font: 600 .9063rem/1 var(--sans);
  white-space: nowrap;
  transition: background .2s, color .2s, box-shadow .22s;
}
.btn-arrow { width: 16px; height: 16px; transition: transform .22s var(--ease); }
.btn-primary {
  background: var(--violet);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 10px 18px -12px rgba(109, 66, 214, .95);
}
/* solid, in the card's own colour: the main action (Open portal) */
.btn-theme {
  background: linear-gradient(135deg, var(--c-button) 0%, var(--c-button-end) 100%);
  color: var(--c-on-button);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 10px 18px -12px rgb(var(--c-glow) / .95);
}
/* tinted, fills with the card's colour on hover: Get access */
.btn-tonal { background: var(--c-soft); color: var(--c-strong); }
/* price inside "Get access": same colour, a shade heavier, with a soft dot */
.btn-price { display: inline-flex; align-items: baseline; gap: 6px; font-weight: 700; font-variant-numeric: tabular-nums; }
.btn-dot { margin-right: 1px; opacity: .55; font-weight: 400; }
.btn-was { font-weight: 500; font-size: .8125rem; opacity: .62; text-decoration-thickness: 1.5px; }
.btn-tonal .btn-price { margin-left: -2px; }
.btn-plain { background: #fff; color: var(--ink-2); border: 1px solid var(--line-2); }
.btn:focus-visible { outline-color: var(--c-button, var(--violet)); outline-offset: 3px; }

@media (hover: hover) {
  .card:hover {
    transform: translateY(-4px);
    background:
      linear-gradient(#fff, #fff) padding-box,
      linear-gradient(155deg, var(--c-button) 0%, var(--c-edge) 60%, var(--c-line) 100%) border-box;
    box-shadow: 0 1px 2px rgba(16, 22, 41, .04), 0 28px 40px -24px rgb(var(--c-glow) / .9);
  }
  .card:hover .thumb-img { transform: scale(1.06); }
  .card:hover .btn-tonal {
    background: linear-gradient(135deg, var(--c-button) 0%, var(--c-button-end) 100%);
    color: var(--c-on-button);
  }
  /* brightened with an inset shadow, not `filter`: a filter on the button
     would shrink the card-wide hit area (.card-cta::after) to the button */
  .card:hover .btn-theme,
  .btn-theme:hover {
    box-shadow: inset 0 0 0 99px rgba(255, 255, 255, .13), 0 14px 22px -12px rgb(var(--c-glow) / 1);
  }
  .card:hover .btn-arrow,
  .btn:hover .btn-arrow { transform: translateX(4px); }
  .hero-pill:hover { background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .4); }
  .hero-pill:hover svg { transform: translateX(3px); }
  .hero-chip:hover { background: rgba(255, 255, 255, .22); }
  .hero-chip[aria-pressed="true"]:hover { background: #fff; }
  .btn-primary:hover { background: var(--violet-deep); }

}

/* ---------- empty + loading ------------------------------------------- */

.empty {
  padding: 32px 24px;
  border: 1px dashed var(--line-2);
  border-radius: 20px;
  text-align: center;
  color: var(--muted);
  font-size: .9375rem;
}
.empty strong { display: block; margin-bottom: 4px; font: 700 1.0625rem/1.3 var(--display); color: var(--ink); }
.empty .btn, .empty .link-btn { margin-top: 14px; }

.skeleton {
  border-radius: 8px;
  background: linear-gradient(90deg, #E9ECF4 25%, #F3F5FA 45%, #E9ECF4 65%);
  background-size: 300% 100%;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.skeleton-num { width: 44px; height: 32px; }
.skeleton-line { height: 12px; margin-bottom: 12px; }
.skeleton-btn { height: 44px; border-radius: 11px; }
.skeleton-thumb { aspect-ratio: 16 / 10; border-radius: 15px; }
.card-skeleton { background: #fff; border-color: var(--line); box-shadow: var(--shadow-rest); }
.card-skeleton { pointer-events: none; }
.card-skeleton .card-body { justify-content: center; }
.card-skeleton .skeleton-line:last-child { margin-bottom: 0; }

/* one entrance on first load; filtering never replays it */
.rise { animation: rise .55s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

/* ---------- Telegram community strip ---------------------------------- */
/* A slim dark panel between the catalogue and the FAQ. */
.band-community { padding: 8px 0 44px; border-top: 0; background: #fff; }
.community {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 22px 26px 22px 22px;
  border-radius: 24px;
  background: #2A1578 linear-gradient(150deg, #1B0F52 0%, #3B22A6 60%, #4E3ACB 100%) center / cover no-repeat;
  color: #fff;
  box-shadow: 0 30px 50px -30px rgba(42, 21, 120, .9);
}
.community::before,
.community::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}
.community::before { right: -80px; top: -120px; width: 320px; height: 320px; background: radial-gradient(circle, rgba(240, 107, 196, .55), transparent 68%); }
.community::after { left: 28%; bottom: -160px; width: 360px; height: 300px; background: radial-gradient(circle, rgba(56, 189, 248, .4), transparent 68%); }
.community-art { flex: none; width: 76px; height: 76px; filter: drop-shadow(0 14px 14px rgba(6, 3, 26, .55)); animation: hero-bob 7s ease-in-out infinite; }
.community-text { flex: 1; min-width: 0; }
.community-eyebrow { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .72); }
.community-title { margin-top: 4px; font: 800 1.375rem/1.2 var(--display); letter-spacing: -.016em; }
.community-sub { margin-top: 6px; max-width: 60ch; font-size: .9375rem; line-height: 1.5; color: rgba(255, 255, 255, .84); }
.community-cta { flex: none; min-width: 190px; }

/* ---------- reviews ---------------------------------------------------- */
/* Hidden until js/content.js has reviews. Cards flow in columns so reviews
   of different lengths sit together without gaps; each takes the colour of
   the product it is about (--c-* set inline by app.js). */

.band-reviews {
  background:
    radial-gradient(720px 420px at 0% 0%, rgba(238, 95, 191, .10), transparent 72%),
    radial-gradient(760px 460px at 100% 100%, rgba(124, 77, 255, .15), transparent 72%),
    linear-gradient(180deg, #F8F5FF 0%, #F4FAFF 100%);
}
/* keep the white / tinted rhythm: the (white) community strip normally
   sits between Reviews and FAQ; without it, FAQ turns white after Reviews */
.band-reviews:not([hidden]) + .band-community[hidden] + .band-faq { background: #fff; }

.reviews {
  columns: var(--review-cols, 3) 280px;
  column-gap: 20px;
  max-width: calc(var(--review-cols, 3) * 420px);
}
.review {
  --c-strong: var(--violet-deep);
  --c-button: var(--violet);
  --c-button-end: var(--violet-deep);
  --c-on-button: #fff;
  --c-soft: var(--violet-soft);
  --c-line: #E3DBF8;
  position: relative;
  break-inside: avoid;
  margin: 0 0 20px;
  padding: 24px 24px 22px;
  overflow: hidden;
  border: 1px solid var(--c-line);
  border-radius: 20px;
  background: linear-gradient(165deg, var(--c-soft) -12%, #fff 64%);
}
.review::before { /* large closing quote mark in the card's colour */
  content: "\201D";
  position: absolute;
  top: 2px;
  right: 18px;
  font: 800 5.75rem/1 var(--display);
  color: var(--c-button);
  opacity: .16;
  pointer-events: none;
}
/* the top row is always there, so the quote mark never sits on the text */
.review-top { display: flex; align-items: center; min-height: 20px; margin-bottom: 12px; }
.review-stars { display: inline-flex; gap: 3px; color: #E8A317; }
.review-stars .star svg { width: 17px; height: 17px; }
.review-stars .star-off { color: var(--line-2); }
.review-text {
  position: relative;
  margin: 0;
  font-size: .9688rem;
  line-height: 1.62;
  color: var(--ink-2);
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.review-by { display: flex; align-items: center; gap: 12px; margin-top: 20px; }
.review-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-button) 0%, var(--c-button-end) 100%);
  color: var(--c-on-button);
  font: 700 .875rem/1 var(--display);
  letter-spacing: .01em;
}
.review-who { display: grid; gap: 1px; min-width: 0; }
.review-name { font: 700 .9375rem/1.3 var(--display); letter-spacing: -.008em; color: var(--ink); }
.review-role { font-size: .8125rem; color: var(--muted); }
.review-product { font-size: .8125rem; font-weight: 600; color: var(--c-strong); }
.review-date { align-self: flex-start; margin-left: auto; padding-top: 2px; font-size: .78rem; color: var(--faint); white-space: nowrap; }
.reviews-more { margin-top: 8px; text-align: center; }

/* ---------- FAQ -------------------------------------------------------- */
/* The questions sit in one white panel, divided by hairlines; beside them a
   violet support card in the welcome banner's style. Each question is a
   native <details>, so it works without JavaScript. */

.band-faq {
  padding-bottom: 84px;
  background:
    radial-gradient(720px 460px at 0% 0%, rgba(124, 77, 255, .20), transparent 72%),
    radial-gradient(760px 480px at 100% 100%, rgba(31, 182, 220, .22), transparent 72%),
    radial-gradient(520px 360px at 70% 0%, rgba(238, 95, 191, .10), transparent 72%),
    linear-gradient(135deg, #F1EBFF 0%, #F6F4FF 45%, #EAF6FF 100%);
}

.faq {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 372px);
  gap: 28px;
  align-items: start;
}

.faq-list {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(109, 66, 214, .14);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 30px 50px -36px rgba(64, 44, 150, .5), var(--shadow-rest);
  interpolate-size: allow-keywords; /* lets the answers slide open (see below) */
}
.faq-item { position: relative; border-top: 1px solid var(--line); transition: background .25s; }
.faq-item:first-child { border-top: 0; }
.faq-item::before { /* accent bar on the open question */
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--violet) 0%, #1FB6DC 100%);
  opacity: 0;
  transition: opacity .25s;
}
.faq-item[open] { background: linear-gradient(90deg, #F6F2FF 0%, #F1F9FF 100%); }
.faq-item[open]::before { opacity: 1; }

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px 20px 28px;
  cursor: pointer;
  list-style: none;
  font: 700 1.0313rem/1.35 var(--display);
  letter-spacing: -.01em;
  color: var(--ink);
  transition: color .2s;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q:focus-visible { outline: 2px solid var(--violet); outline-offset: -4px; border-radius: 14px; }
.faq-toggle {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--violet-soft);
  color: var(--violet-deep);
  transition: background .25s, color .25s, transform .32s var(--ease);
}
.faq-plus { width: 16px; height: 16px; }
.faq-item[open] .faq-q { color: var(--violet-deep); }
.faq-item[open] .faq-toggle { background: var(--violet); color: #fff; transform: rotate(45deg); }

.faq-a { max-width: 68ch; padding: 0 72px 24px 28px; font-size: .9688rem; line-height: 1.65; color: var(--ink-2); }
.faq-a p + p { margin-top: 10px; }
.faq-a a { color: var(--violet-deep); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }

/* answers slide open and closed in browsers that support it; elsewhere
   they simply appear */
.faq-item::details-content {
  block-size: 0;
  overflow: clip;
  transition: block-size .32s var(--ease), content-visibility .32s allow-discrete;
}
.faq-item[open]::details-content { block-size: auto; }

@media (hover: hover) {
  .faq-item:not([open]) .faq-q:hover { color: var(--violet-deep); }
  .faq-item:not([open]) .faq-q:hover .faq-toggle { background: #E3D9FB; }
}

/* support card */
.faq-help {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  isolation: isolate;
  overflow: hidden;
  padding: 30px 28px 26px;
  border-radius: 24px;
  background: #2A1578 linear-gradient(150deg, #1B0F52 0%, #3B22A6 60%, #4E3ACB 100%) center / cover no-repeat;
  color: #fff;
  box-shadow: 0 30px 50px -30px rgba(42, 21, 120, .9);
}
.faq-help::before { /* cyan and pink glows, and a shade so the text stays readable */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(75% 50% at 100% 0%, rgba(31, 182, 220, .55), transparent 70%),
    radial-gradient(75% 50% at 0% 100%, rgba(238, 95, 191, .34), transparent 70%),
    linear-gradient(180deg, rgba(12, 6, 42, .18) 0%, rgba(12, 6, 42, .42) 100%);
}
.faq-help-art {
  --amp: 4px;
  width: 84px;
  height: 84px;
  margin: -6px 0 12px -6px;
  filter: drop-shadow(0 14px 12px rgba(8, 4, 34, .45));
  animation: hero-bob 7s ease-in-out infinite;
}
.faq-help-title { font: 800 1.5rem/1.2 var(--display); letter-spacing: -.022em; }
.faq-help-text { margin-top: 8px; line-height: 1.55; color: rgba(255, 255, 255, .8); }
.faq-help-points {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid rgba(255, 255, 255, .2);
  list-style: none;
}
.faq-help-points li { display: flex; align-items: flex-start; gap: 10px; font-size: .9063rem; line-height: 1.4; color: rgba(255, 255, 255, .92); }
.faq-help-points svg { flex: none; width: 16px; height: 16px; margin-top: 2px; color: #7EF0B5; }
.faq-help .btn { width: 100%; margin-top: 22px; }
.btn-white { min-height: 46px; background: #fff; color: var(--ink); box-shadow: 0 14px 24px -14px rgba(6, 3, 26, .85); }
.btn-white:focus-visible { outline-color: #fff; }
.faq-help-mail { margin-top: 12px; text-align: center; font-size: .8438rem; color: rgba(255, 255, 255, .74); overflow-wrap: anywhere; }

@media (hover: hover) {
  .btn-white:hover { background: #F1ECFD; }
}

/* ---------- footer ----------------------------------------------------- */

.footer { border-top: 1px solid rgba(109, 66, 214, .09); background: #fff; padding: 24px 0 calc(24px + env(safe-area-inset-bottom, 0px)); }
.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
  font-size: .8125rem;
  color: var(--muted);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }

.noscript { max-width: 520px; margin: 40px auto; padding: 0 24px; text-align: center; color: var(--muted); }

/* ---------- tablet ----------------------------------------------------- */

/* with up to six links, the centred nav would run into the search box sooner */
@media (max-width: 1259px) {
  .nav-links { position: static; transform: none; gap: 0; }
  .nav-links a { padding: 8px 11px; }
}

@media (max-width: 1079px) {
  .hero-panel { grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 20px; padding: 36px 24px 36px 40px; }
  .faq { grid-template-columns: minmax(0, 1fr) minmax(0, 320px); gap: 22px; }

  .cats { gap: 4px; }
  .cat { width: 122px; }
  .cat-orb { width: 70px; height: 70px; }
  .cat-name { font-size: .8438rem; }
}

@media (max-width: 919px) {
  /* the section links move into the account menu before they get cramped */
  .nav-links { display: none; }
  .menu-group.menu-sections { display: grid; }
  .menu { width: min(300px, calc(100vw - 32px)); max-height: calc(100svh - var(--nav-h) - 20px); overflow-y: auto; }
  .menu-group.menu-sections { gap: 0; }
  .menu-group.menu-sections a { padding: 8px 12px; }
  .account.is-guest { display: block; }
  /* FAQ: the support card moves under the questions and lies flat */
  .faq { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .faq-help {
    position: relative;
    top: auto;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 20px;
    padding: 24px 26px;
  }
  .faq-help-art { grid-row: 1 / 4; width: 72px; height: 72px; margin: 0; }
  .faq-help-title, .faq-help-text, .faq-help-points { grid-column: 2; }
  .faq-help-points { margin-top: 12px; padding-top: 12px; }
  .faq-help .btn { grid-column: 3; grid-row: 1 / 3; align-self: center; width: auto; margin-top: 0; }
  .faq-help-mail { grid-column: 3; grid-row: 3; margin-top: 0; }
  .hero-panel { grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: 12px; padding: 30px 16px 30px 30px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ---------- phone ------------------------------------------------------ */

@media (max-width: 759px) {
  .band-community { padding: 4px 0 32px; }
  .community { flex-wrap: wrap; gap: 14px; padding: 20px 18px 18px; border-radius: 20px; }
  .community-art { width: 56px; height: 56px; }
  .community-text { flex-basis: calc(100% - 70px); }
  .community-title { font-size: 1.1875rem; }
  .community-sub { font-size: .9063rem; }
  .community-cta { flex: 1 1 100%; }

  :root { --nav-h: 58px; --gutter: 16px; }

  .nav-row { gap: 12px; }
  .btn-signin { min-height: 36px; padding: 0 12px; font-size: .875rem; }
  .search-toggle { display: grid; }
  .nav-tools { gap: 4px; }

  .search { display: none; }
  .nav.is-searching .search {
    display: flex;
    position: absolute;
    inset: 8px 0;
    z-index: 2;
    flex: none;
    width: auto;
    height: auto;
    background: #fff;
  }
  .nav.is-searching .brand,
  .nav.is-searching .search-toggle,
  .nav.is-searching .account { visibility: hidden; }
  .search-input { font-size: 1rem; } /* 16px stops iOS zooming the page on focus */
  .search-key { display: none; }
  .search-clear { width: 34px; height: 34px; }

  .hero { padding: 14px 0 0; }
  /* phone: illustration on top, then the copy */
  .hero-panel { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 14px 20px 24px; border-radius: 24px; }
  .hero-panel::after { background: linear-gradient(180deg, rgba(12, 6, 42, .1) 0%, rgba(12, 6, 42, .5) 62%); }
  .hero-visual { order: -1; width: min(100%, 300px); margin: 0 auto; }
  .hero-title { font-size: 1.625rem; }
  .hero-text { font-size: .9375rem; }
  .hero-pill { margin-bottom: 14px; }
  .hero-search { margin-top: 20px; padding-left: 14px; }
  .hero-search .btn { padding: 0 16px; }
  .hero-chips { margin-top: 14px; gap: 6px; }
  .hero-chip { height: 36px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 12px; border-radius: 18px; }
  .stat { column-gap: 10px; padding: 14px 12px; }
  .stat-icon { width: 40px; height: 40px; border-radius: 12px; }
  .stat-icon svg { width: 20px; height: 20px; }
  .stat-value { font-size: 1.125rem; }
  .stat-label { font-size: .78rem; line-height: 1.3; }

  .band { padding: 32px 0 38px; }
  .band-faq { padding-bottom: 52px; }
  .reviews { column-gap: 14px; }
  .review { margin-bottom: 14px; padding: 20px 18px 18px; border-radius: 18px; }
  .faq-list { border-radius: 20px; }
  .faq-q { gap: 14px; padding: 17px 16px 17px 20px; font-size: .9688rem; }
  .faq-toggle { width: 30px; height: 30px; }
  .faq-a { padding: 0 20px 20px 20px; font-size: .9375rem; }
  /* support card stacks again on a phone */
  .faq-help { display: block; padding: 24px 20px 22px; border-radius: 20px; }
  .faq-help-art { width: 68px; height: 68px; margin: -4px 0 10px -4px; }
  .faq-help-title { font-size: 1.3125rem; }
  .faq-help .btn { width: 100%; margin-top: 20px; }
  .faq-help-mail { margin-top: 12px; }
  .band-cats { padding: 28px 0 24px; }
  .hero { padding-bottom: 26px; }
  .toolbar-title { font-size: 1.4375rem; }
  /* phone: categories are one compact row of chips (orb + name) that
     scrolls sideways, so the first product is one swipe away */
  .band-cats { padding: 22px 0 20px; }
  .toolbar-title { font-size: 1.25rem; }
  .result-line { margin-top: 4px; font-size: .875rem; }
  .cats {
    justify-content: flex-start;
    gap: 8px;
    margin-top: 14px;
    margin-inline: calc(var(--gutter) * -1);
    padding: 4px var(--gutter) 6px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .cats::-webkit-scrollbar { display: none; }
  .cat {
    flex-direction: row;
    gap: 8px;
    width: auto;
    padding: 4px 14px 4px 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 0 0 1px rgba(109, 66, 214, .12), 0 6px 14px -10px rgb(var(--c-glow) / .6);
    scroll-snap-align: start;
    text-align: left;
  }
  .cat[aria-pressed="true"] {
    background: #fff;
    box-shadow: 0 0 0 2px var(--c-button), 0 10px 18px -12px rgb(var(--c-glow) / .9);
  }
  .cat-orb { width: 34px; height: 34px; box-shadow: none; }
  .cat[aria-pressed="true"] .cat-orb { box-shadow: none; }
  .cat-name { margin-top: 0; font-size: .875rem; white-space: nowrap; }
  .cat-count { display: none; }

  .owned-list { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .mini { gap: 10px; padding: 8px 10px 8px 8px; border-radius: 16px; }
  .mini-thumb { width: 72px; }
  .mini-name { font-size: .875rem; }
  .mini-meta .own-meta { display: none; }
  .mini .btn-sm { min-height: 36px; padding: 0 12px; font-size: .8125rem; }
  .mini .btn-arrow { display: none; }

  /* phone: two compact cards per row (artwork, title, button) */
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card { padding: 6px; border-radius: 16px; }
  .thumb { border-radius: 11px; }
  .thumb-tags { top: 6px; left: 6px; right: 6px; }
  .thumb-tags .tag-glass { display: none; } /* the category is in the filter row */
  .thumb-tags-end { margin-left: auto; }
  .tag { height: 22px; padding: 0 8px; font-size: .6875rem; }
  .tag svg { width: 10px; height: 10px; }
  .card-body { padding: 10px 4px 2px; }
  .card-title { font-size: .9375rem; line-height: 1.25; }
  .card-desc, .card-facts, .card-social { display: none; }
  .card-foot { padding-top: 10px; }
  .card-foot .btn { min-height: 40px; padding: 0 8px; font-size: .8438rem; gap: 5px; }
  .btn-price { gap: 3px; }
  .btn-dot { display: none; }
  .btn-price::before { content: "\00B7"; margin: 0 2px 0 1px; opacity: .55; font-weight: 400; }
  .card-foot .btn-arrow { display: none; }
  .btn-was { display: none; } /* no room for the struck price on a compact card */
  .own-line { margin-bottom: 8px; font-size: .75rem; gap: 0 6px; }
  .own-meta { display: none; }
  .more-row { margin-top: 14px; }
  .more-row .btn { width: 100%; }
  .shelf-head { margin-bottom: 16px; }
  .shelf-head::after { display: none; }
  .shelf-title { font-size: 1.4375rem; }
  .shelf-sub { font-size: .9375rem; }
  .grid { gap: 16px; }

  .card-body { padding: 14px 8px 6px; }
  .btn { min-height: 46px; font-size: .9375rem; }

  .footer-row { flex-direction: column; align-items: flex-start; }
}

/* ---------- motion preferences ---------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-delay: 0s !important;
    transition-duration: .001ms !important;
  }
  .card:hover { transform: none; }
  .card:hover .thumb-img { transform: none; }
  .hero-art .float, .hero-art .twinkle, .hero-glow { animation: none !important; }
  .faq-help-art { animation: none; }
}

/* customers only: the hub stays blank while a visitor without a session is
   being sent to the sign-in page (class set by a tiny script in <head>;
   app.js removes it when the visitor may stay) */
html.maybe-guest:not(.may-stay) body { visibility: hidden; }
html.is-redirecting body { visibility: hidden; }

/* ---------- sign-in page (login.html) --------------------------------- */
.login-body {
  min-height: 100svh;
  background:
    radial-gradient(720px 420px at 100% 0%, rgba(31, 182, 220, .20), transparent 70%),
    radial-gradient(640px 380px at 0% 10%, rgba(124, 77, 255, .16), transparent 70%),
    linear-gradient(180deg, #F1EBFF 0%, #F8F5FF 55%, #fff 100%);
}
.login {
  width: min(100% - var(--gutter) * 2, 1040px);
  margin: 0 auto;
  padding: 22px 0 40px;
}
.login-brand { display: inline-flex; margin-bottom: 22px; }
.login-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
  overflow: hidden;
  border-radius: 28px;
  background: #fff;
  border: 1px solid rgba(109, 66, 214, .14);
  box-shadow: 0 1px 2px rgba(16, 22, 41, .04), 0 40px 70px -40px rgba(42, 21, 120, .5);
}
.login-form-side { padding: 44px 48px 36px; }
.login-eyebrow { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--violet); }
.login-title { margin-top: 8px; font: 800 1.875rem/1.15 var(--display); letter-spacing: -.02em; color: var(--ink); }
.login-sub { margin-top: 8px; font-size: .9688rem; line-height: 1.5; color: var(--muted); }
.login-form { display: grid; gap: 16px; margin-top: 26px; }
.login-form[hidden] { display: none; }
.login-form.is-shaking { animation: form-shake .35s var(--ease); }
@keyframes form-shake { 0%, 100% { transform: none; } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

.form-error {
  padding: 11px 14px;
  border-radius: 12px;
  background: #FFF1F2;
  border: 1px solid #FECDD3;
  font-size: .9063rem;
  line-height: 1.45;
  color: #9F1239;
}
.form-error[hidden] { display: none; }
.form-notice {
  padding: 11px 14px;
  border-radius: 12px;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  font-size: .9063rem;
  line-height: 1.45;
  color: #065F46;
}
.form-notice[hidden] { display: none; }
.form-notice.is-warn { background: #FFFBEB; border-color: #FDE68A; color: #92400E; }

/* sign-in: waiting for the emailed link to be checked */
.login-wait { display: flex; align-items: center; gap: 12px; margin-top: 26px; font-size: .9688rem; color: var(--ink-2); }
.login-wait[hidden] { display: none; }
.login-spin { width: 20px; height: 20px; flex: none; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--violet); animation: login-spin .7s linear infinite; }
@keyframes login-spin { to { transform: rotate(360deg); } }

/* sign-in: link sent */
.login-sent { margin-top: 26px; }
.login-sent[hidden] { display: none; }
.login-sent-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--violet-soft); color: var(--violet); }
.login-sent-icon svg { width: 26px; height: 26px; }
.login-sent-title { margin-top: 16px; font: 800 1.25rem/1.25 var(--display); letter-spacing: -.012em; color: var(--ink); outline: none; }
.login-title:focus { outline: none; }
.login-sent-text { margin-top: 16px; font-size: .9688rem; line-height: 1.55; color: var(--ink-2); }
.login-sent-text b { color: var(--ink); font-weight: 700; word-break: break-all; }
.login-sent-hint { margin-top: 8px; font-size: .875rem; line-height: 1.5; color: var(--muted); }
.login-sent .form-error { margin-top: 14px; }
.login-sent-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.login-sent-actions .btn:disabled { opacity: .6; cursor: default; }
@media (prefers-reduced-motion: reduce) { .login-spin { animation-duration: 2.4s; } }

.field { display: grid; gap: 6px; }
.field-label { font-size: .875rem; font-weight: 600; color: var(--ink-2); }
.field-label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.field-link { font-size: .8438rem; font-weight: 600; color: var(--violet-deep); }
.field-link:hover { text-decoration: underline; }
.field-input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: #fff;
  font: 400 1rem/1.3 var(--sans);
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.field-input::placeholder { color: var(--faint); }
.field-input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(109, 66, 214, .14); }
.field-password { position: relative; display: block; }
.field-password .field-input { padding-right: 48px; }
.field-eye {
  position: absolute;
  top: 50%;
  right: 6px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  color: var(--muted);
  transform: translateY(-50%);
}
.field-eye:hover { background: var(--paper); color: var(--ink); }
.field-eye svg { width: 20px; height: 20px; }
.field-eye .eye-closed { display: none; }
.field-eye.is-on .eye-open { display: none; }
.field-eye.is-on .eye-closed { display: block; }

.check { display: flex; align-items: center; gap: 10px; font-size: .9063rem; color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--violet); }

.login-submit { width: 100%; min-height: 50px; margin-top: 4px; font-size: 1rem; border-radius: 13px; }
.login-submit:disabled { opacity: .7; cursor: default; }
.login-alt { font-size: .9063rem; color: var(--muted); text-align: center; }
.login-alt a { font-weight: 600; color: var(--violet-deep); }
.login-alt a:hover { text-decoration: underline; }

.login-off { display: grid; gap: 8px; justify-items: start; margin-top: 26px; padding: 18px 20px; border-radius: 16px; background: var(--paper); border: 1px dashed var(--line-2); font-size: .9375rem; color: var(--ink-2); }
.login-off[hidden] { display: none; }
.login-off code { padding: 1px 6px; border-radius: 6px; background: #fff; border: 1px solid var(--line); font-size: .85em; }
.login-off .btn { margin-top: 8px; }

.login-demo {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin-top: 22px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #FFFBEB;
  border: 1px dashed #FCD34D;
  font-size: .8438rem;
  color: #78350F;
}
.login-demo[hidden] { display: none; }
.login-demo strong { font-weight: 700; }
.login-demo span { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.login-demo .link-btn { margin-left: auto; color: #92400E; }

.login-art {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 32px 32px 30px;
  background: #2A1578 linear-gradient(150deg, #1B0F52 0%, #3B22A6 60%, #4E3ACB 100%) center / cover no-repeat;
  color: #fff;
}
.login-art::before,
.login-art::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}
.login-art::before { right: -90px; top: -120px; width: 340px; height: 340px; background: radial-gradient(circle, rgba(240, 107, 196, .5), transparent 68%); }
.login-art::after { left: -120px; bottom: -140px; width: 360px; height: 360px; background: radial-gradient(circle, rgba(56, 189, 248, .38), transparent 68%); }
/* illustration first, centred in whatever height the form needs, on a soft
   halo so it reads as the focus of the panel rather than a leftover */
.login-art-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  width: 100%;
}
.login-art-visual::before {
  content: "";
  position: absolute;
  width: min(78%, 330px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, .05) 45%, transparent 70%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.login-art-visual svg { position: relative; display: block; width: min(100%, 380px); height: auto; max-height: 100%; }
.login-art-copy { position: relative; }
.login-art-title { font: 800 1.3125rem/1.2 var(--display); letter-spacing: -.016em; }
.login-art-points { display: grid; gap: 9px; margin-top: 14px; padding: 0; list-style: none; font-size: .9063rem; color: rgba(255, 255, 255, .88); }
.login-art-points li { display: flex; align-items: center; gap: 10px; }
.login-art-points svg { flex: none; width: 18px; height: 18px; padding: 3px; border-radius: 50%; background: rgba(255, 255, 255, .18); color: #9CF2D1; }

.login-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; font-size: .875rem; color: var(--muted); }
.login-foot a { color: var(--ink-2); }
.login-foot a:hover { color: var(--ink); text-decoration: underline; }

@media (max-width: 919px) {
  .login-card { grid-template-columns: minmax(0, 1fr); }
  .login-art { display: none; }
  .login-form-side { padding: 32px 28px 28px; }
}
@media (max-width: 759px) {
  .login { padding-top: 14px; }
  .login-card { border-radius: 22px; }
  .login-form-side { padding: 26px 20px 22px; }
  .login-title { font-size: 1.5rem; }
}
