/* ==========================================================================
   GuitarGurus - storefront styles (Udemy-inspired design system)
   ========================================================================== */

:root {
  --ink:        #1c1d1f;
  --ink-soft:   #2d2f31;
  --gray-900:   #3e4143;
  --gray-700:   #6a6f73;
  --gray-500:   #9194a1;
  --gray-300:   #d1d7dc;
  --gray-200:   #e3e7ea;
  --gray-100:   #f7f9fa;
  --white:      #ffffff;

  --purple:     #a435f0;
  --purple-700: #8710d8;
  --purple-900: #5624d0;
  --purple-50:  #f3e8ff;

  --gold:       #b4690e;
  --star:       #e59819;
  --green:      #197c3c;
  --red:        #b52016;
  --bestseller: #eceb98;

  --radius:     4px;
  --radius-lg:  8px;
  --shadow-sm:  0 2px 4px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.08);
  --shadow-md:  0 2px 4px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.08);
  --shadow-lg:  0 10px 20px rgba(0,0,0,.15);
  --header-h:   72px;

  --font: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
svg, video, iframe, canvas, table { max-width: 100%; }

/* Long course titles, emails and URLs must never push the layout sideways. */
h1, h2, h3, h4, h5, p, li, dd, td, th, .cc-title { overflow-wrap: break-word; }

a { color: var(--purple-900); text-decoration: none; }
a:hover { color: var(--purple-700); text-decoration: underline; }

h1, h2, h3, h4, h5 { margin: 0 0 .5em; line-height: 1.2; font-weight: 700; letter-spacing: -.02rem; }
h1 { font-size: 2.2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 1rem; }

hr { border: 0; border-top: 1px solid var(--gray-300); margin: 1.5rem 0; }

/* ---------------------------------------------------------------- layout */
.container { width: 100%; max-width: 1340px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 1000px; }
.container-tight  { max-width: 640px; }

.section { padding: 40px 0; }
.section-tight { padding: 24px 0; }
.bg-light { background: var(--gray-100); }
.bg-dark  { background: var(--ink); color: var(--white); }

.row { display: flex; gap: 32px; }
.row-wrap { flex-wrap: wrap; }
.col { flex: 1 1 0; min-width: 0; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }

.stack > * + * { margin-top: 16px; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.muted { color: var(--gray-700); }
.small { font-size: .8125rem; }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mt-1 { margin-top: 8px; }  .mb-1 { margin-bottom: 8px; }
.mt-2 { margin-top: 16px; } .mb-2 { margin-bottom: 16px; }
.mt-3 { margin-top: 24px; } .mb-3 { margin-bottom: 24px; }
.mt-4 { margin-top: 40px; } .mb-4 { margin-bottom: 40px; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.flex-center { display: flex; align-items: center; gap: 8px; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; } .gap-3 { gap: 24px; }
.w-100 { width: 100%; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--white);
  box-shadow: 0 2px 4px rgba(6,17,118,.08);
}
.header-inner {
  display: flex; align-items: center; gap: 16px;
  height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 8px;
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-900) 100%);
  color: #fff; display: grid; place-items: center; font-size: 18px; font-weight: 800;
}
.brand-name { font-size: 1.35rem; font-weight: 800; color: var(--ink); letter-spacing: -.04rem; }

.search-form { flex: 1 1 auto; position: relative; max-width: 780px; }
/* The attribute selector keeps this above the generic `input[type=search]`
   rule in the forms section further down, which would otherwise reset the
   left padding (icon overlaps the text) and the pill radius. */
.search-form input[type="search"] {
  width: 100%; height: 48px;
  margin: 0;
  padding: 0 18px 0 52px;
  border: 1px solid var(--ink); border-radius: 9999px;
  background: var(--gray-100); color: var(--ink);
  font-size: .9375rem; font-family: inherit; line-height: 48px;
  appearance: none; -webkit-appearance: none;
}
.search-form input[type="search"]::-webkit-search-cancel-button { margin-right: 4px; }
.search-form input[type="search"]:focus { outline: 2px solid var(--purple-900); outline-offset: -1px; }
.search-form button {
  position: absolute; left: 6px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border: 0; background: transparent;
  display: grid; place-items: center;
  cursor: pointer; color: var(--ink); font-size: 17px; line-height: 1; border-radius: 50%;
  padding: 0;
}
.search-form button:hover { background: rgba(28,29,31,.07); }
.header-nav { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.header-link {
  padding: 8px 12px; font-size: .875rem; font-weight: 700; color: var(--ink-soft);
  border-radius: var(--radius); white-space: nowrap;
}
.header-link:hover { color: var(--purple-900); background: var(--gray-100); text-decoration: none; }

.nav-toggle { display: none; background: none; border: 0; font-size: 22px; cursor: pointer; }

/* category strip */
.cat-strip { border-bottom: 1px solid var(--gray-200); background: var(--white); }
.cat-strip-inner { display: flex; gap: 4px; overflow-x: auto; padding: 8px 0; scrollbar-width: thin; }
.cat-pill {
  padding: 6px 14px; font-size: .8125rem; font-weight: 600; color: var(--gray-900);
  border: 1px solid var(--gray-300); border-radius: 9999px; white-space: nowrap; background: var(--white);
}
.cat-pill:hover, .cat-pill.active { background: var(--ink); color: #fff; border-color: var(--ink); text-decoration: none; }

/* ---------------------------------------------------------------- avatar */
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink); color: #fff; font-size: .8125rem; font-weight: 700;
  overflow: hidden; flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.25rem; }
.avatar-xl { width: 96px; height: 96px; font-size: 1.75rem; }

/* dropdown */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 260px; background: var(--white);
  border: 1px solid var(--gray-300); box-shadow: var(--shadow-md);
  border-radius: var(--radius); padding: 8px 0; display: none; z-index: 80;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a, .dropdown-menu button {
  display: block; width: 100%; text-align: left;
  padding: 10px 16px; font-size: .875rem; color: var(--ink-soft);
  background: none; border: 0; cursor: pointer; font-family: inherit;
}
.dropdown-menu a:hover, .dropdown-menu button:hover { color: var(--purple-900); text-decoration: none; background: var(--gray-100); }
.dropdown-head { padding: 12px 16px; border-bottom: 1px solid var(--gray-200); display: flex; gap: 12px; align-items: center; }
.dropdown-divider { height: 1px; background: var(--gray-200); margin: 8px 0; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border: 1px solid transparent; border-radius: var(--radius);
  font-family: inherit; font-size: .9375rem; font-weight: 700; line-height: 1.2;
  cursor: pointer; text-decoration: none; transition: background .15s, color .15s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:hover { background: var(--purple-700); color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; color: #fff; }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: rgba(28,29,31,.06); color: var(--ink); }
.btn-outline-purple { background: transparent; color: var(--purple-900); border-color: var(--purple-900); }
.btn-outline-purple:hover { background: var(--purple-50); color: var(--purple-900); }
.btn-light { background: var(--white); color: var(--ink); border-color: var(--gray-300); }
.btn-light:hover { background: var(--gray-100); color: var(--ink); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #8e1811; color: #fff; }
.btn-success { background: var(--green); color: #fff; }
.btn-link { background: none; border: 0; color: var(--purple-900); padding: 4px; font-weight: 700; cursor: pointer; }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 24px; font-size: 1rem; }
.btn-sm { padding: 7px 12px; font-size: .8125rem; }
.btn-xs { padding: 4px 9px; font-size: .75rem; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }

/* ---------------------------------------------------------------- badges */
.badge {
  display: inline-block; padding: 3px 8px; font-size: .6875rem; font-weight: 700;
  border-radius: 2px; text-transform: none; letter-spacing: .02em;
}
.badge-bestseller { background: var(--bestseller); color: #3d3c0a; }
.badge-new    { background: var(--purple-50); color: var(--purple-900); }
.badge-hot    { background: #fdeae8; color: var(--red); }
.badge-ok     { background: #e4f4e8; color: var(--green); }
.badge-warn   { background: #fdf3e2; color: var(--gold); }
.badge-bad    { background: #fdeae8; color: var(--red); }
.badge-muted  { background: var(--gray-200); color: var(--gray-900); }
.badge-dark   { background: var(--ink); color: #fff; }

/* ---------------------------------------------------------------- stars */
.stars { display: inline-flex; gap: 1px; font-size: .875rem; line-height: 1; }
.star.full  { color: var(--star); }
.star.half  { color: var(--star); opacity: .55; }
.star.empty { color: var(--gray-300); }
.rating-num { color: var(--gold); font-weight: 700; font-size: .8125rem; }

/* ---------------------------------------------------------------- hero */
.hero { background: var(--gray-100); border-bottom: 1px solid var(--gray-200); }
.hero-inner { display: flex; align-items: center; gap: 48px; padding: 56px 0; }
.hero-copy { flex: 1 1 52%; }
.hero-art  { flex: 1 1 48%; }
.hero h1 { font-size: 3rem; letter-spacing: -.06rem; }
.hero p.lead { font-size: 1.125rem; color: var(--gray-900); max-width: 46ch; }
.hero-card {
  background: var(--white); box-shadow: var(--shadow-lg); border-radius: var(--radius);
  padding: 28px;
}
.hero-visual {
  aspect-ratio: 16/10; border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 78% 22%, rgba(164,53,240,.35), transparent 55%),
    radial-gradient(circle at 18% 78%, rgba(86,36,208,.45), transparent 55%),
    linear-gradient(140deg, #1c1d1f 0%, #34215e 100%);
  display: grid; place-items: center; color: #fff; position: relative; overflow: hidden;
}
.hero-visual .glyph { font-size: 120px; opacity: .92; filter: drop-shadow(0 8px 24px rgba(0,0,0,.4)); }
.hero-visual.has-image { background: var(--ink); }
.hero-visual.has-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-stats { display: flex; gap: 32px; flex-wrap: wrap; margin-top: 28px; }
.hero-stat b { display: block; font-size: 1.6rem; letter-spacing: -.03rem; }
.hero-stat span { font-size: .8125rem; color: var(--gray-700); }

/* ---------------------------------------------------------------- course card */
.course-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--gray-300); background: var(--white);
  transition: box-shadow .15s ease, transform .15s ease;
  height: 100%; color: inherit;
}
.course-card:hover { box-shadow: var(--shadow-md); text-decoration: none; color: inherit; }
.course-card:hover .cc-title { color: var(--purple-900); }
.cc-thumb {
  aspect-ratio: 16/9; background: var(--ink); position: relative; overflow: hidden;
  display: grid; place-items: center;
}
.cc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cc-thumb .cc-glyph { font-size: 44px; color: rgba(255,255,255,.9); }
.cc-thumb .cc-level {
  position: absolute; bottom: 8px; left: 8px;
  background: rgba(0,0,0,.72); color: #fff; font-size: .6875rem; font-weight: 600;
  padding: 3px 7px; border-radius: 2px;
}
.cc-body { padding: 10px 12px 14px; display: flex; flex-direction: column; flex: 1; }
.cc-title { font-size: 1rem; font-weight: 700; line-height: 1.3; margin: 0 0 4px; }
.cc-meta { font-size: .75rem; color: var(--gray-700); margin-bottom: 4px; }
.cc-rating { display: flex; align-items: center; gap: 5px; margin-bottom: 4px; }
.cc-facts { font-size: .6875rem; color: var(--gray-700); margin-bottom: 6px; }
.cc-price { margin-top: auto; display: flex; align-items: baseline; gap: 8px; }
.cc-price .now { font-size: 1rem; font-weight: 700; }
.cc-price .was { font-size: .8125rem; color: var(--gray-700); text-decoration: line-through; }
.cc-badges { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }

.progress {
  height: 6px; background: var(--gray-200); border-radius: 9999px; overflow: hidden;
}
.progress > span { display: block; height: 100%; background: var(--purple-900); }
.progress-lg { height: 10px; }

/* ---------------------------------------------------------------- course hero */
.course-hero { background: var(--ink); color: #fff; padding: 32px 0 40px; }
.course-hero h1 { color: #fff; font-size: 2.25rem; }
.course-hero .subtitle { font-size: 1.125rem; color: #d1d7dc; max-width: 68ch; }
.course-hero a { color: #cec0fc; }
.course-hero-grid { display: flex; gap: 32px; align-items: flex-start; }
.course-hero-main { flex: 1 1 auto; max-width: 720px; }
.crumbs { font-size: .8125rem; margin-bottom: 12px; color: #cec0fc; }
.crumbs a { color: #cec0fc; font-weight: 600; }
.course-meta-row { display: flex; gap: 16px; flex-wrap: wrap; font-size: .8125rem; color: #d1d7dc; margin-top: 12px; }

/* sticky purchase card */
.buy-card {
  width: 340px; flex: 0 0 340px;
  background: var(--white); color: var(--ink);
  box-shadow: var(--shadow-lg); position: relative; z-index: 5;
}
.buy-card .preview {
  aspect-ratio: 16/9; background: #000; position: relative; overflow: hidden;
  display: grid; place-items: center; cursor: pointer;
}
.buy-card .preview img { width: 100%; height: 100%; object-fit: cover; opacity: .75; }
.buy-card .preview .play {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: #fff; font-size: 14px; font-weight: 700; text-shadow: 0 1px 6px rgba(0,0,0,.6);
}
.buy-card .preview .play-circle {
  width: 56px; height: 56px; border-radius: 50%; background: var(--white); color: var(--ink);
  display: grid; place-items: center; font-size: 20px; margin: 0 auto 8px;
}
.buy-card-body { padding: 20px 24px 24px; }
.price-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.price-now { font-size: 2rem; font-weight: 700; letter-spacing: -.04rem; }
.price-was { font-size: 1rem; color: var(--gray-700); text-decoration: line-through; }
.price-off { font-size: .8125rem; color: var(--gray-900); }
.includes { list-style: none; padding: 0; margin: 16px 0 0; font-size: .875rem; }
.includes li { display: flex; gap: 10px; padding: 5px 0; align-items: flex-start; }
.includes li .ic { width: 18px; text-align: center; flex-shrink: 0; }

@media (min-width: 1000px) {
  .buy-card-sticky { position: sticky; top: calc(var(--header-h) + 16px); }
  .buy-card-float { margin-bottom: -180px; }
}

/* ---------------------------------------------------------------- content blocks */
.panel { border: 1px solid var(--gray-300); padding: 24px; background: var(--white); }
.panel + .panel { margin-top: 24px; }
.panel-head { font-size: 1.375rem; font-weight: 700; margin-bottom: 16px; }

.check-list { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 32px; }
.check-list li { display: flex; gap: 10px; margin-bottom: 10px; font-size: .875rem; break-inside: avoid; }
.check-list li::before { content: "✓"; color: var(--gray-900); font-weight: 700; }
.bullet-list { margin: 0; padding-left: 20px; font-size: .9375rem; }
.bullet-list li { margin-bottom: 8px; }

.rich-text { font-size: .9375rem; color: var(--gray-900); }
.rich-text h2, .rich-text h3 { color: var(--ink); }
.rich-text ul, .rich-text ol { padding-left: 22px; }

/* accordion curriculum */
.accordion { border: 1px solid var(--gray-300); }
.acc-item + .acc-item { border-top: 1px solid var(--gray-300); }
.acc-head {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; background: var(--gray-100); border: 0;
  font-family: inherit; font-size: .9375rem; font-weight: 700; text-align: left; cursor: pointer;
}
.acc-head:hover { background: var(--gray-200); }
.acc-head .chev { transition: transform .2s; font-size: .75rem; }
.acc-item.open .acc-head .chev { transform: rotate(180deg); }
.acc-head .acc-meta { margin-left: auto; font-size: .75rem; font-weight: 400; color: var(--gray-700); white-space: nowrap; }
.acc-body { display: none; padding: 0; }
.acc-item.open .acc-body { display: block; }
.lesson-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; font-size: .875rem; border-top: 1px solid var(--gray-200);
}
.lesson-row .ltitle { flex: 1; min-width: 0; }
.lesson-row .ltitle a { text-decoration: underline; }
.lesson-row .ldur { color: var(--gray-700); font-size: .8125rem; white-space: nowrap; }
.lesson-row .lic { color: var(--gray-700); width: 16px; text-align: center; }

/* review */
.review { border-top: 1px solid var(--gray-200); padding: 20px 0; display: flex; gap: 16px; }
.review:first-child { border-top: 0; }

/* ---------------------------------------------------------------- forms */
.field { margin-bottom: 16px; }
.field > label, .label {
  display: block; font-size: .875rem; font-weight: 700; margin-bottom: 6px; color: var(--ink);
}
.field .hint { font-size: .75rem; color: var(--gray-700); margin-top: 5px; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=url], input[type=date], input[type=search], input[type=tel], select, textarea {
  width: 100%; padding: 11px 12px;
  border: 1px solid var(--gray-500); border-radius: var(--radius);
  font-family: inherit; font-size: .9375rem; color: var(--ink); background: var(--white);
}
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--purple-900); outline-offset: -1px; border-color: var(--purple-900); }
input[type=file] { width: 100%; font-size: .875rem; padding: 8px; border: 1px dashed var(--gray-500); border-radius: var(--radius); background: var(--gray-100); }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: .875rem; }
.check input { width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0; accent-color: var(--purple-900); }
.field-error { color: var(--red); font-size: .8125rem; margin-top: 5px; }
.inline-form { display: inline; }
fieldset { border: 1px solid var(--gray-300); border-radius: var(--radius); padding: 20px; margin: 0 0 24px; }
legend { font-weight: 700; font-size: .9375rem; padding: 0 8px; }

/* auth card */
.auth-wrap { min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; padding: 40px 16px; background: var(--gray-100); }
.auth-card { width: 100%; max-width: 440px; background: var(--white); border: 1px solid var(--gray-300); padding: 32px; }
.auth-card h1 { font-size: 1.5rem; text-align: center; }
.auth-sep { display: flex; align-items: center; gap: 12px; color: var(--gray-700); font-size: .8125rem; margin: 20px 0; }
.auth-sep::before, .auth-sep::after { content: ""; flex: 1; height: 1px; background: var(--gray-300); }

/* ---------------------------------------------------------------- alerts */
.alert {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border: 1px solid; border-radius: var(--radius);
  font-size: .875rem; margin-bottom: 16px;
}
.alert-success { background: #e4f4e8; border-color: #a6d9b6; color: #14502a; }
.alert-error   { background: #fdeae8; border-color: #f0b4ae; color: #7d1a13; }
.alert-info    { background: #eef3ff; border-color: #b9c9f5; color: #1c3f8f; }
.alert-warning { background: #fdf3e2; border-color: #f0d6a4; color: #6d4906; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }

/* ---------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--gray-300); background: var(--white); }
table.data { width: 100%; border-collapse: collapse; font-size: .875rem; }
table.data th, table.data td { padding: 12px 14px; text-align: left; vertical-align: middle; }
table.data thead th {
  background: var(--gray-100); font-size: .75rem; text-transform: uppercase;
  letter-spacing: .04em; color: var(--gray-700); border-bottom: 1px solid var(--gray-300); white-space: nowrap;
}
table.data tbody tr + tr td { border-top: 1px solid var(--gray-200); }
table.data tbody tr:hover { background: #fbfcfd; }
table.data td.actions { white-space: nowrap; text-align: right; }
.empty-state { padding: 56px 24px; text-align: center; color: var(--gray-700); }
.empty-state .glyph { font-size: 44px; margin-bottom: 12px; opacity: .5; }

/* pagination */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--gray-300); font-size: .875rem; font-weight: 700; color: var(--ink);
  border-radius: var(--radius); padding: 0 10px;
}
.pagination a:hover { background: var(--gray-100); text-decoration: none; }
.pagination .current { background: var(--ink); color: #fff; border-color: var(--ink); }
.pagination .disabled { color: var(--gray-500); }

/* ---------------------------------------------------------------- filters */
.filter-bar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 24px; }
.filter-bar select, .filter-bar input { width: auto; min-width: 160px; }

/* ---------------------------------------------------------------- player */
.player-shell { min-height: 100vh; display: flex; flex-direction: column; background: var(--white); }
.player-top {
  background: var(--ink); color: #fff; display: flex; align-items: center; gap: 16px;
  padding: 10px 16px; position: sticky; top: 0; z-index: 40;
}
.player-top a { color: #fff; }
.player-top .ptitle { font-weight: 700; font-size: .9375rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-body { display: flex; flex: 1; align-items: stretch; }
.player-main { flex: 1; min-width: 0; }
.player-stage { background: #000; aspect-ratio: 16/9; width: 100%; position: relative; }
.player-stage video, .player-stage iframe { width: 100%; height: 100%; border: 0; display: block; background: #000; }
.player-stage .no-video { position: absolute; inset: 0; display: grid; place-items: center; color: #d1d7dc; text-align: center; padding: 24px; }
.player-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--gray-300); padding: 0 24px; overflow-x: auto; }
.player-tab {
  padding: 14px 12px; font-size: .9375rem; font-weight: 700; color: var(--gray-900);
  border: 0; border-bottom: 2px solid transparent; background: none; cursor: pointer; font-family: inherit; white-space: nowrap;
}
.player-tab.active { color: var(--ink); border-bottom-color: var(--ink); }
.player-pane { padding: 24px; display: none; }
.player-pane.active { display: block; }
.player-side {
  width: 340px; flex: 0 0 340px; border-left: 1px solid var(--gray-300);
  max-height: calc(100vh - 56px); overflow-y: auto; position: sticky; top: 56px;
}
.player-side h3 { font-size: 1rem; padding: 16px; margin: 0; border-bottom: 1px solid var(--gray-300); }
.side-section-title { padding: 12px 16px; background: var(--gray-100); font-size: .8125rem; font-weight: 700; border-bottom: 1px solid var(--gray-200); }
.side-lesson {
  display: flex; gap: 10px; padding: 12px 16px; font-size: .8125rem;
  border-bottom: 1px solid var(--gray-200); color: var(--ink-soft); align-items: flex-start;
}
.side-lesson:hover { background: var(--gray-100); text-decoration: none; }
.side-lesson.active { background: #e8e9eb; font-weight: 700; }
.side-lesson .sl-check { width: 16px; height: 16px; border: 1px solid var(--gray-500); flex-shrink: 0; margin-top: 2px; display: grid; place-items: center; font-size: 10px; }
.side-lesson .sl-check.done { background: var(--ink); border-color: var(--ink); color: #fff; }
.side-lesson .sl-dur { display: block; color: var(--gray-700); font-weight: 400; font-size: .75rem; margin-top: 2px; }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--ink); color: #d1d7dc; padding: 48px 0 24px; margin-top: 64px; }
.site-footer a { color: #d1d7dc; font-size: .875rem; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 32px; }
.footer-grid h4 { color: #fff; font-size: .9375rem; margin-bottom: 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid #3e4143; margin-top: 32px; padding-top: 20px; font-size: .8125rem;
}

/* ---------------------------------------------------------------- misc */
.tile {
  border: 1px solid var(--gray-300); padding: 20px; background: var(--white);
}
.tile b { display: block; font-size: 1.75rem; letter-spacing: -.03rem; }
.tile span { font-size: .8125rem; color: var(--gray-700); }

.cat-card {
  display: block; border: 1px solid var(--gray-300); padding: 20px; background: var(--white); color: inherit;
}
.cat-card:hover { box-shadow: var(--shadow-sm); text-decoration: none; color: inherit; }
.cat-card .glyph { font-size: 26px; margin-bottom: 8px; }
.cat-card b { display: block; font-size: .9375rem; }
.cat-card span { font-size: .75rem; color: var(--gray-700); }

.kv { display: grid; grid-template-columns: 190px 1fr; gap: 10px 16px; font-size: .875rem; }
.kv dt { color: var(--gray-700); }
.kv dd { margin: 0; font-weight: 600; word-break: break-word; }

.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .8125rem; background: var(--gray-100); border: 1px solid var(--gray-300);
  padding: 2px 6px; border-radius: 3px; word-break: break-all;
}
pre.code { padding: 14px; overflow-x: auto; white-space: pre-wrap; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--gray-300); margin-bottom: 24px; overflow-x: auto; }
.tabs a { padding: 12px 16px; font-size: .875rem; font-weight: 700; color: var(--gray-900); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.active { color: var(--ink); border-bottom-color: var(--ink); }
.tabs a:hover { text-decoration: none; color: var(--purple-900); }

/* ---------------------------------------------------------------- responsive */

/* ---- large tablets / small laptops ---- */
@media (max-width: 1100px) {
  .container { padding: 0 20px; }
  .grid-4 { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .buy-card { width: 300px; flex-basis: 300px; }
}

/* ---- tablets ---- */
@media (max-width: 900px) {
  :root { --header-h: 64px; }

  .section { padding: 32px 0; }

  .hero-inner { flex-direction: column; padding: 36px 0; }
  .hero h1 { font-size: 2.25rem; }
  .hero p.lead { max-width: none; }
  .hero-art { width: 100%; }

  .course-hero { padding: 24px 0 28px; }
  .course-hero-grid { flex-direction: column; }
  .course-hero h1 { font-size: 1.85rem; }
  .buy-card { width: 100%; flex-basis: auto; }
  .buy-card-float { margin-bottom: 0; }

  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }

  .player-body { flex-direction: column; }
  .player-side {
    width: 100%; flex-basis: auto; max-height: none; position: static;
    border-left: 0; border-top: 1px solid var(--gray-300);
  }
  .player-pane, .player-tabs { padding-left: 16px; padding-right: 16px; }

  /* Stack every two-column row.
     Several sidebars carry an inline `flex: 0 0 320px`. Once the container is
     a COLUMN that basis becomes a fixed HEIGHT and clips the panel, so the
     basis has to be reset - and !important is required to beat inline styles. */
  .row { flex-direction: column; gap: 20px; }
  .row > * { flex: 1 1 auto !important; width: 100% !important; max-width: 100% !important; }

  .check-list { columns: 1; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 10px; }
}

/* ---- phones ---- */
@media (max-width: 720px) {
  .container { padding: 0 16px; }

  /* Search stays available: it moves to its own full-width row
     instead of being hidden behind a menu. */
  .header-inner { flex-wrap: wrap; height: auto; padding: 10px 0; gap: 8px 10px; }
  .brand { order: 1; }
  .header-nav { order: 2; margin-left: auto; }
  .search-form { order: 3; flex: 1 0 100%; max-width: none; }
  .search-form input[type="search"] { height: 44px; line-height: 44px; font-size: 16px; padding: 0 14px 0 46px; }
  .search-form button { width: 36px; height: 36px; left: 5px; font-size: 15px; }
  /* Global utility: it was previously scoped to .header-nav, so the "Courses"
     link, the player progress bar and the admin username never actually hid. */
  .hide-sm { display: none !important; }
  .header-link { padding: 8px; }
  .brand-name { font-size: 1.2rem; }

  .cat-strip-inner { padding: 6px 0; }
  .cat-pill { font-size: .75rem; padding: 5px 12px; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

  h1 { font-size: 1.75rem; }
  .hero h1 { font-size: 2rem; }
  .hero p.lead { font-size: 1rem; }
  .hero-stats { gap: 20px; margin-top: 22px; }
  .hero-stat b { font-size: 1.35rem; }

  .panel { padding: 16px; }
  .panel + .panel { margin-top: 16px; }
  .panel-head { font-size: 1.15rem; }
  .buy-card-body { padding: 16px; }

  /* 16px keeps iOS Safari from zooming in when a field receives focus. */
  input[type=text], input[type=email], input[type=password], input[type=number],
  input[type=url], input[type=date], input[type=search], input[type=tel], select, textarea {
    font-size: 16px;
  }

  .btn { padding: 11px 16px; }
  .btn-lg { padding: 13px 20px; font-size: .9375rem; }

  .table-wrap { -webkit-overflow-scrolling: touch; }
  .dropdown-menu { min-width: min(280px, calc(100vw - 32px)); }

  .acc-head { flex-wrap: wrap; }
  .acc-head .acc-meta { width: 100%; margin: 4px 0 0 26px; }
  .lesson-row { flex-wrap: wrap; }
  .lesson-row .ldur { margin-left: auto; }

  .player-top { flex-wrap: wrap; padding: 10px 14px; }
  .player-top .ptitle { font-size: .875rem; }

  .review { gap: 12px; }
  .site-footer { padding: 36px 0 20px; margin-top: 40px; }
}

/* ---- small phones ---- */
@media (max-width: 560px) {
  .flex { flex-wrap: wrap; }

  .hero h1 { font-size: 1.7rem; }
  .hero-visual .glyph { font-size: 80px; }
  .course-hero h1 { font-size: 1.5rem; }
  .course-hero .subtitle { font-size: 1rem; }

  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .price-now { font-size: 1.6rem; }
  .tile b { font-size: 1.4rem; }
  .avatar-xl { width: 72px; height: 72px; font-size: 1.4rem; }
  .auth-card { padding: 22px 18px; }

  .pagination a, .pagination span { min-width: 34px; height: 34px; font-size: .8125rem; padding: 0 8px; }
  .filter-bar { gap: 8px; }
  .filter-bar select, .filter-bar input { min-width: 0; width: auto; flex: 1 1 140px; }
}
