/* ============================================================
   Streamtb — shared design system (public site + user dashboard)
   Ported from design/Streamtb.dc.html
   ============================================================ */

:root {
  --bg: #07080c;
  --panel: #0f1117;
  --panel-2: #0b0c11;
  --text: #e6ebf5;
  --muted: #b8c0d0;
  --dim: #7b8499;
  --faint: #5b6478;
  --green: #3ddc9a;
  --blue: #5b7cff;
  --purple: #7b5fff;
  --cyan: #5fd4ff;
  --danger: #ff6b6b;
  --amber: #f5b544;
  --line: rgba(255, 255, 255, .06);
  --line-2: rgba(255, 255, 255, .1);
  --card-grad: linear-gradient(160deg, #0f1117, #0b0c11 60%, #07080c);
  --accent-grad: linear-gradient(135deg, #3ddc9a, #5fd4ff);
  --accent-grad-3: linear-gradient(120deg, #3ddc9a, #5b7cff 55%, #7b5fff);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(1100px 620px at 72% -12%, rgba(91, 124, 255, .13), transparent 60%),
    radial-gradient(880px 520px at 6% 4%, rgba(61, 220, 154, .10), transparent 55%),
    radial-gradient(700px 500px at 100% 100%, rgba(123, 95, 255, .09), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--blue); }
::selection { background: rgba(61, 220, 154, .3); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .09); border-radius: 9px; }
::-webkit-scrollbar-track { background: transparent; }
input, button, textarea, select { font-family: inherit; }
input:focus, textarea:focus { outline: none; }

@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes pulseSoft { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes riseIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

.font-display { font-family: 'Bricolage Grotesque', sans-serif; }
.font-mono { font-family: 'JetBrains Mono', monospace; }
.font-brand { font-family: 'Cinzel', serif; }

/* ---------- Layout helpers ---------- */
.container { max-width: 1320px; margin: 0 auto; width: 100%; }
.wide { max-width: 1500px; margin: 0 auto; }

/* ---------- Top nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  padding: .9rem clamp(1rem, 4vw, 2.6rem);
  background: rgba(7, 8, 12, .72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 1.5rem; max-width: 1320px; margin: 0 auto; width: 100%; }
/* Dashboard header spans the viewport, matching the full-width dashboard content. */
.nav-inner.full { max-width: none; }
.brand { display: flex; align-items: center; gap: .6rem; cursor: pointer; }
.brand-mark {
  width: 34px; height: 34px; border-radius: .6rem;
  background: var(--accent-grad-3);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px -6px rgba(61, 220, 154, .55);
}
.brand-mark .tri {
  width: 0; height: 0; border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent #07080c; margin-left: 2px;
}
.brand-name { font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.25rem; letter-spacing: .06em; color: var(--text); }
.nav-links { display: flex; gap: 1.4rem; margin-left: .6rem; font-size: .9rem; font-weight: 500; }
.nav-links a { color: var(--muted); transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-spacer { flex: 1; }
.nav-right { display: flex; align-items: center; gap: .8rem; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #7b5fff, #5b7cff);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem; color: #fff; cursor: pointer;
  box-shadow: 0 4px 14px -4px rgba(123, 95, 255, .6);
}

/* ---------- Buttons ---------- */
.btn {
  border-radius: .65rem; font-weight: 600; font-size: .85rem;
  cursor: pointer; transition: transform .2s, background .2s;
  border: none; display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  text-align: center;
}
.btn-accent { color: #07080c; background: var(--accent-grad); box-shadow: 0 8px 22px -8px rgba(61, 220, 154, .5); padding: .55rem 1.1rem; }
.btn-accent:hover { transform: translateY(-2px); color: #07080c; }
.btn-lg { padding: .9rem 1.6rem; font-size: .98rem; border-radius: .75rem; }
.btn-ghost { padding: .55rem 1rem; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .05); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); color: var(--text); }
.btn-link { background: transparent; border: none; color: var(--muted); padding: .55rem .9rem; }
.btn-link:hover { color: var(--text); }
.btn-purple { color: #fff; background: linear-gradient(135deg, #7b5fff, #5b7cff); }
.btn-block { width: 100%; }
.btn-danger-outline { padding: .65rem 1.2rem; border-radius: .7rem; border: 1px solid rgba(255, 107, 107, .4); background: transparent; color: var(--danger); }
.btn-danger-outline:hover { background: rgba(255, 107, 107, .12); }

/* ---------- Cards ---------- */
.card { padding: 1.6rem; border-radius: 1.1rem; background: var(--card-grad); border: 1px solid rgba(255, 255, 255, .07); }
.chip {
  font-family: 'JetBrains Mono', monospace; font-size: .75rem; color: var(--muted);
  padding: 3px 9px; border: 1px solid var(--line-2); border-radius: 6px; display: inline-flex; align-items: center; gap: .4rem;
}
.badge-status { padding: 3px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; }

/* ---------- Forms ---------- */
.field-label { display: block; font-size: .82rem; font-weight: 500; color: var(--muted); margin-bottom: .4rem; }
.field-input {
  width: 100%; padding: .75rem .9rem; border-radius: .7rem;
  background: rgba(7, 8, 12, .6); border: 1px solid var(--line-2);
  color: var(--text); font-size: .92rem;
}
.field-input:focus { border-color: rgba(61, 220, 154, .4); }

/* ---------- Toggle ---------- */
.toggle { width: 44px; height: 24px; border-radius: 14px; cursor: pointer; position: relative; transition: background .2s; flex-shrink: 0; background: rgba(255, 255, 255, .14); }
.toggle.on { background: var(--accent-grad); }
.toggle .knob { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .2s; }
.toggle.on .knob { left: 23px; }

/* ---------- Progress bars ----------
   NOTE: keep every property here, never in an inline style attribute.
   Alpine's :style string binding REPLACES the style attribute, so the
   bound element must only ever receive `width` from :style. */
.progress-track { height: 7px; border-radius: 7px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 7px; background: linear-gradient(90deg, #3ddc9a, #5b7cff); transition: width .12s linear; }

/* ---------- Upload dropzone ---------- */
.dropzone {
  border: 1.5px dashed rgba(255, 255, 255, .14); border-radius: 1rem;
  padding: 2.2rem 1.5rem; cursor: pointer; background: rgba(7, 8, 12, .4);
  transition: border-color .2s;
}
.dropzone:hover { border-color: rgba(61, 220, 154, .4); }

/* ---------- Subscription: plan cards + coin chips ---------- */
.plan-card {
  padding: 1.3rem 1.4rem; border-radius: 1rem; cursor: pointer;
  background: rgba(15, 17, 23, .6); border: 1px solid rgba(255, 255, 255, .08);
  transition: border-color .2s, background .2s;
}
.plan-card.sel { background: rgba(61, 220, 154, .08); border-color: rgba(61, 220, 154, .4); }
.plan-dot {
  width: 18px; height: 18px; border-radius: 50%; border: 2px solid #5b6478;
  display: flex; align-items: center; justify-content: center; transition: border-color .2s;
}
.plan-card.sel .plan-dot { border-color: var(--green); }
.plan-dot i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: block; }

.coin-chip {
  display: flex; align-items: center; gap: .5rem; padding: .55rem .9rem;
  border-radius: .7rem; cursor: pointer; font-weight: 600; font-size: .85rem;
  background: rgba(15, 17, 23, .6); border: 1px solid rgba(255, 255, 255, .08);
  color: var(--muted); transition: border-color .2s, background .2s, color .2s;
}
.coin-chip.sel { background: rgba(61, 220, 154, .1); border-color: rgba(61, 220, 154, .4); color: var(--text); }

/* Disabled accent button (upload CTA before a file is chosen) */
.btn-accent:disabled,
.btn-accent[disabled] {
  color: var(--faint); background: rgba(255, 255, 255, .06);
  cursor: not-allowed; box-shadow: none; transform: none;
}
.btn-accent:disabled:hover { transform: none; }

/* ---------- Auth pages ----------
   Matched to the reference sign-in layout: system font stack, diagonal page
   gradient, 448px gradient panel, 6px-radius compact inputs. */
body.auth {
  background: linear-gradient(to right bottom, #0b0c0f, #111827, #000) fixed;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
body.auth .nav { background: rgba(11, 12, 15, .72); }

.auth-main {
  display: flex; align-items: center; justify-content: center;
  padding: 48px 24px; min-height: calc(100vh - 66px);
}
.auth-wrap { width: 100%; max-width: 448px; animation: riseIn .5s ease both; }
.auth-head { text-align: center; margin-bottom: 1.5rem; }
.auth-title {
  font-family: inherit; font-weight: 700; font-size: 30px; line-height: 36px;
  margin: 0 0 4px; color: #fff; letter-spacing: normal;
}
.auth-sub { color: rgb(168, 175, 189); font-size: 16px; line-height: 24px; margin: 0; }

.auth-card {
  padding: 32px; border-radius: 12px;
  background: linear-gradient(145deg, rgba(39, 44, 52, .6), rgba(32, 36, 42, .6));
  border: 1px solid rgba(60, 65, 75, .4);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, .4), 0 3px 10px rgba(0, 0, 0, .3);
}

/* Compact form controls inside the auth panel */
.auth-card .field-label {
  font-family: inherit; font-size: 14px; line-height: 20px; font-weight: 500;
  color: rgb(229, 231, 235); margin-bottom: 4px;
}
.auth-card .field-input {
  font-family: inherit; font-size: 12.8px; line-height: 19.2px;
  padding: 8px 12px; border-radius: 6px;
  background: rgb(39, 44, 52); border: 1px solid rgb(75, 85, 99); color: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.auth-card .field-input::placeholder { color: rgb(140, 148, 162); }
.auth-card .field-input:focus {
  border-color: var(--green); box-shadow: 0 0 0 3px rgba(61, 220, 154, .15);
}
.auth-card .field-input:disabled { opacity: .6; }

/* Primary submit inside the auth panel */
.auth-card .btn-accent {
  font-family: inherit; font-size: 12.8px; line-height: 19.2px; font-weight: 600;
  padding: 8px 16px; border-radius: 6px; color: rgb(11, 12, 15);
  background: linear-gradient(135deg, #3ddc9a, rgba(61, 220, 154, .8));
  box-shadow: none;
}
.auth-card .btn-accent:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -8px rgba(61, 220, 154, .5); }

/* Field spacing: label→input 4px, group→group 16px */
.auth-field { margin-bottom: 16px; }
.auth-field:last-of-type { margin-bottom: 0; }

/* "Remember me" style checkbox row */
.auth-check { display: flex; align-items: flex-start; gap: .65rem; margin-top: 1.1rem; cursor: pointer; }
.auth-check input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 17px; height: 17px; flex-shrink: 0; margin: 2px 0 0;
  border: 1px solid rgba(255, 255, 255, .22); border-radius: 4px;
  background: rgba(7, 8, 12, .6); cursor: pointer; position: relative; transition: background .15s, border-color .15s;
}
.auth-check input[type="checkbox"]:checked { background: var(--green); border-color: var(--green); }
.auth-check input[type="checkbox"]:checked::after {
  content: ''; position: absolute; left: 5px; top: 1px;
  width: 4px; height: 9px; border: solid #07080c; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.auth-check-label { font-size: .86rem; font-weight: 500; color: var(--text); line-height: 1.3; }
.auth-check-hint { font-size: .78rem; color: var(--dim); margin-top: .15rem; }

/* Stacked links under the panel */
.auth-links { display: flex; flex-direction: column; align-items: center; gap: .6rem; margin-top: 1.5rem; }
.auth-links a { font-size: .86rem; color: rgba(168, 175, 189, .8); transition: color .2s; }
.auth-links a:hover { color: var(--green); }
.auth-error {
  color: #ff8a8a; font-size: 13px; line-height: 19px; margin-bottom: 16px;
  padding: 10px 12px; border-radius: 6px;
  background: rgba(255, 107, 107, .1); border: 1px solid rgba(255, 107, 107, .3);
}
.auth-ok {
  color: var(--green); font-size: 13px; line-height: 19px; margin-bottom: 16px;
  padding: 10px 12px; border-radius: 6px;
  background: rgba(61, 220, 154, .1); border: 1px solid rgba(61, 220, 154, .3);
}
.auth-divider { display: flex; align-items: center; gap: .8rem; margin: 1.2rem 0; color: var(--faint); font-size: .78rem; }
.auth-divider span { flex: 1; height: 1px; background: rgba(255, 255, 255, .08); }
.auth-icon {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 1rem;
  display: flex; align-items: center; justify-content: center; font-size: 24px;
  background: rgba(61, 220, 154, .12); border: 1px solid rgba(61, 220, 154, .3); color: var(--green);
}
.auth-field-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: .4rem; }
.auth-field-row a { font-size: .8rem; color: var(--dim); }
.auth-field-row a:hover { color: var(--green); }

/* ---------- Shared hover treatment for landing cards ----------
   A card sets --step to its own accent colour; the hover state is driven
   entirely from that, so a row of cards can glow green / blue / purple. */
.hover-card {
  position: relative; overflow: hidden; cursor: default;
  transition: transform .3s cubic-bezier(.2, .8, .3, 1), border-color .3s, box-shadow .3s, background .3s;
}
/* Accent line that wipes across the top edge on hover */
.hover-card::before {
  content: ''; position: absolute; left: 0; top: 0; height: 2px; width: 100%;
  background: linear-gradient(90deg, var(--step), transparent);
  transform: scaleX(0); transform-origin: left; transition: transform .45s cubic-bezier(.2, .8, .3, 1);
}
/* Soft glow that fades in behind the content */
.hover-card::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(420px 200px at 15% 0%, color-mix(in srgb, var(--step) 14%, transparent), transparent 70%);
  transition: opacity .35s;
}
.hover-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--step) 40%, transparent);
  box-shadow: 0 20px 44px -20px color-mix(in srgb, var(--step) 55%, transparent);
}
.hover-card:hover::before { transform: scaleX(1); }
.hover-card:hover::after { opacity: 1; }
.hover-card > * { position: relative; z-index: 1; }

/* Icon tile used by the three highlight cards — in CSS, not inline, so :hover can win. */
.feat-icon {
  width: 40px; height: 40px; border-radius: .6rem; margin-bottom: 1rem;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--step) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--step) 26%, transparent);
  transition: transform .3s cubic-bezier(.2, .8, .3, 1), background .3s, border-color .3s, box-shadow .3s;
}
.hover-card:hover .feat-icon {
  transform: scale(1.1) rotate(-4deg);
  background: color-mix(in srgb, var(--step) 22%, transparent);
  border-color: var(--step);
  box-shadow: 0 8px 22px -6px color-mix(in srgb, var(--step) 60%, transparent);
}
.hover-card h3 {
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 1.1rem;
  margin: 0 0 .5rem; color: var(--text); transition: color .3s;
}
.hover-card:hover h3 { color: var(--step-fg, var(--step)); }
.hover-card p { font-size: .9rem; line-height: 1.55; color: var(--muted); margin: 0; }

.step-card { /* numbered "how it works" cards reuse .hover-card */ }

/* These live in CSS (not inline style attributes) so the :hover rules below can
   actually override them — an inline style would always win. */
.step-num {
  width: 38px; height: 38px; border-radius: .6rem;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; margin-bottom: 1rem;
  background: color-mix(in srgb, var(--step) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--step) 26%, transparent);
  color: var(--step-fg, var(--step));
  transition: transform .3s cubic-bezier(.2, .8, .3, 1), background .3s, color .3s, box-shadow .3s, border-color .3s;
}
.step-card:hover .step-num {
  transform: scale(1.12) rotate(-4deg);
  background: var(--step); border-color: var(--step); color: #07080c;
  box-shadow: 0 8px 22px -6px color-mix(in srgb, var(--step) 70%, transparent);
}
.step-card h3 {
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 1.1rem;
  margin: 0 0 .5rem; color: var(--text); transition: color .3s;
}
/* Fallback for browsers without color-mix() */
@supports not (background: color-mix(in srgb, red 10%, transparent)) {
  .hover-card:hover { border-color: rgba(255, 255, 255, .22); box-shadow: 0 20px 44px -20px rgba(0, 0, 0, .8); }
  .hover-card:hover .step-num, .hover-card:hover .feat-icon { background: var(--step); }
  .step-num, .feat-icon { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); }
}

/* ---------- Landing: Features grid ---------- */
.feat-head { margin-bottom: 2rem; }
.feat-eyebrow {
  font-family: 'JetBrains Mono', monospace; font-size: .64rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--green); display: block; margin-bottom: .8rem;
}
.feat-head h2 {
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700;
  font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; letter-spacing: -.035em;
  margin: 0; color: #fff;
}
.feat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.feat-card {
  background: linear-gradient(160deg, #0f1117 0%, #0b0c11 55%, #07080c 100%);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 1.05rem; padding: 1.45rem;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .05);
  transition: transform .28s cubic-bezier(.2, .8, .3, 1), border-color .28s, box-shadow .28s;
}
.feat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(61, 220, 154, .3);
  box-shadow: 0 18px 38px -20px rgba(61, 220, 154, .4), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.feat-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; height: 19px; padding: 0 .4rem; margin-bottom: 1rem;
  font-family: 'Bricolage Grotesque', sans-serif; font-size: .86rem; font-weight: 700;
  color: var(--green); background: linear-gradient(160deg, #0d0e14 0%, #0c0d12 100%);
  border: 1px solid rgba(255, 255, 255, .1); border-radius: 10px;
}
.feat-num {
  font-family: 'JetBrains Mono', monospace; font-size: .64rem; letter-spacing: .08em;
  color: var(--green); display: block; margin-bottom: .45rem;
}
.feat-card h3 {
  font-family: 'Bricolage Grotesque', sans-serif; font-size: 1rem; font-weight: 600;
  line-height: 1.3; color: #fff; margin: 0 0 .55rem;
}
.feat-card p { font-family: 'Inter', sans-serif; font-size: .82rem; line-height: 1.55; color: var(--text); margin: 0; }
@media (max-width: 1080px) { .feat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px)  { .feat-grid { grid-template-columns: 1fr; } }

/* ---------- Static content pages (terms / privacy / creators / support) ---------- */
.page-wrap { max-width: 1320px; margin: 0 auto; padding: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 5vw, 2.6rem) 4rem; }
.page-head { margin-bottom: 2.2rem; }
.page-head h1 {
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800;
  font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.05; letter-spacing: -.02em;
  margin: 0 0 .7rem; color: var(--text);
}
.page-head p { font-size: 1.02rem; line-height: 1.6; color: var(--muted); margin: 0; max-width: 44rem; }
.page-meta { font-family: 'JetBrains Mono', monospace; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 1rem; }

.prose h2 {
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 1.25rem;
  margin: 2.2rem 0 .7rem; color: var(--text);
}
.prose h3 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 1.02rem; margin: 1.5rem 0 .5rem; color: var(--text); }
.prose p, .prose li { font-size: .95rem; line-height: 1.7; color: var(--muted); }
.prose p { margin: 0 0 .9rem; }
.prose ul { margin: 0 0 1rem; padding-left: 1.2rem; }
.prose li { margin-bottom: .45rem; }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--green); }
.prose hr { border: none; border-top: 1px solid var(--line); margin: 2rem 0; }

.page-section { padding: 1.5rem 1.6rem; border-radius: 1.1rem; background: var(--card-grad); border: 1px solid rgba(255, 255, 255, .07); margin-bottom: 1rem; }
.page-cta {
  margin-top: 2.4rem; padding: clamp(1.6rem, 4vw, 2.4rem); border-radius: 1.3rem;
  border: 1px solid rgba(255, 255, 255, .08); background: linear-gradient(150deg, #0f1117, #0b0c11);
  position: relative; overflow: hidden;
}
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer; list-style: none; padding: 1rem 0; font-weight: 600;
  font-size: .95rem; color: var(--text); display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: var(--green); font-size: 1.2rem; line-height: 1; flex-shrink: 0; }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { font-size: .92rem; line-height: 1.65; color: var(--muted); margin: 0 0 1rem; }

/* ---------- Dashboard shell ---------- */
.dash { display: grid; grid-template-columns: 240px 1fr; gap: 0; min-height: calc(100vh - 66px); }
.dash-aside { border-right: 1px solid var(--line); padding: 1.8rem 1.1rem; display: flex; flex-direction: column; }
.dash-menu-title { font-family: 'JetBrains Mono', monospace; font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); padding: 0 .5rem .9rem; }
.dash-nav { display: flex; flex-direction: column; gap: .25rem; }
.dash-nav a {
  display: flex; align-items: center; gap: .7rem; padding: .7rem .9rem; border-radius: .7rem;
  font-size: .9rem; font-weight: 500; color: var(--muted);
  border-left: 2px solid transparent; transition: background .2s;
}
.dash-nav a:hover { background: rgba(255, 255, 255, .05); color: var(--text); }
.dash-nav a.active { color: var(--text); background: rgba(61, 220, 154, .1); border-left-color: var(--green); }
.dash-main { padding: clamp(1.4rem, 3vw, 2.4rem); }
.dash-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1.6rem; gap: 1rem; flex-wrap: wrap; }
.dash-head h1 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 1.7rem; margin: 0; color: var(--text); }
.dash-head p { color: var(--dim); font-size: .9rem; margin: .3rem 0 0; }

/* ---------- Pagination ----------
   Windowed pager: a fixed handful of controls regardless of page count, so a
   library with hundreds of pages never overflows its frame. Wraps on narrow
   screens; the numbered window collapses on mobile, leaving prev/next + info. */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .4rem; margin-top: 1.5rem; }
.pager-item {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 .6rem; box-sizing: border-box;
  border-radius: .6rem; border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .04); color: var(--muted);
  font-size: .86rem; font-weight: 600; font-variant-numeric: tabular-nums;
  cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.pager-item:hover { background: rgba(255, 255, 255, .09); color: var(--text); }
.pager-item.active {
  color: #07080c; background: var(--accent-grad); border-color: transparent; cursor: default;
}
.pager-item.disabled { opacity: .4; pointer-events: none; }
.pager-gap { color: var(--faint); padding: 0 .1rem; user-select: none; }
/* Wrapper is layout-transparent so its page items are flex children of .pager. */
.pager-num { display: contents; }
.pager-info {
  display: none; min-width: 0; padding: 0 .9rem; height: 38px; align-items: center;
  color: var(--dim); font-size: .84rem; font-variant-numeric: tabular-nums;
}
/* Mobile: swap the numbered window for a compact "Page X of Y" between arrows. */
@media (max-width: 560px) {
  .pager-num { display: none; }
  .pager-info { display: inline-flex; }
}

/* ---------- Video rows ---------- */
.vrow { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.3rem; border-bottom: 1px solid rgba(255, 255, 255, .04); cursor: pointer; transition: background .2s; }
.vrow:hover { background: rgba(255, 255, 255, .03); }
.vthumb { flex-shrink: 0; aspect-ratio: 16/9; border-radius: .6rem; border: 1px solid rgba(255, 255, 255, .06); background: repeating-linear-gradient(135deg, #101218, #101218 8px, #0c0d12 8px, #0c0d12 16px); background-size: cover; background-position: center; }
.vtitle { font-weight: 600; font-size: .95rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vmeta { font-size: .8rem; color: var(--dim); margin-top: .25rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .dash { grid-template-columns: 1fr; }
  .dash-aside { flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--line); padding: 1rem; }
  .dash-aside .dash-menu-title { display: none; }
  .dash-nav { flex-direction: row; }
}
@media (max-width: 820px) {
  .nav-links { display: none; }
}
