/* Tinsits-Nexus training website. One stylesheet for the sign-in pages, the training site and
   the admin console. Colours follow the Tinsits-Nexus product: ink, paper and gold. */

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans Condensed';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-sans-condensed-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans Condensed';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-sans-condensed-latin-600-normal.woff2') format('woff2');
}

:root {
  color-scheme: light;
  --paper: #fbfaf7;
  --surface: #ffffff;
  --surface-2: #f4f2ec;
  --surface-3: #ece9e0;
  --ink: #232638;
  --slate: #5b6072;
  --faint: #61657a;
  --line: #e2e0d8;
  --line-strong: #cfccc2;
  --gold: #c99a2e;
  --gold-deep: #8c6515;
  --gold-soft: rgba(201, 154, 46, 0.14);
  --gold-ink: #232638;
  --veld: #2e6b4a;
  --veld-soft: rgba(46, 107, 74, 0.12);
  --danger: #a3302a;
  --danger-soft: rgba(163, 48, 42, 0.1);
  --info-soft: rgba(35, 38, 56, 0.06);
  --stage: #232638;
  --stage-2: #2c3047;
  --stage-3: #363b55;
  --stage-ink: #fbfaf7;
  --stage-slate: #c5c7d2;
  --stage-line: #3c4159;
  --thumb: #c4c0b3;
  --thumb-hover: #8c6515;
  --track: #f0eee7;
  --focus: 0 0 0 3px rgba(201, 154, 46, 0.45);
  --shadow-sm: 0 1px 2px rgba(35, 38, 56, 0.06), 0 2px 8px rgba(35, 38, 56, 0.05);
  --shadow: 0 10px 30px rgba(35, 38, 56, 0.1), 0 2px 6px rgba(35, 38, 56, 0.05);
  --shadow-lg: 0 24px 60px rgba(35, 38, 56, 0.2);
  --radius: 14px;
  --radius-sm: 9px;
  --display: 'IBM Plex Sans Condensed', 'Arial Narrow', Arial, sans-serif;
  --body: 'IBM Plex Sans', 'Segoe UI', Arial, sans-serif;
  --mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --paper: #151826;
    --surface: #1d2132;
    --surface-2: #232839;
    --surface-3: #2b3044;
    --ink: #eceae4;
    --slate: #b6b9c7;
    --faint: #9a9eae;
    --line: #333849;
    --line-strong: #444a5e;
    --gold: #d4a63c;
    --gold-deep: #eac16b;
    --gold-soft: rgba(212, 166, 60, 0.16);
    --gold-ink: #151826;
    --veld: #7ac89a;
    --veld-soft: rgba(122, 200, 154, 0.14);
    --danger: #f08a80;
    --danger-soft: rgba(240, 138, 128, 0.12);
    --info-soft: rgba(236, 234, 228, 0.06);
    --stage: #0f121c;
    --stage-2: #191d2b;
    --stage-3: #232839;
    --stage-ink: #eceae4;
    --stage-slate: #b6b9c7;
    --stage-line: #2c3143;
    --thumb: #454b60;
    --thumb-hover: #d4a63c;
    --track: #191c29;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
  }
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --paper: #151826;
  --surface: #1d2132;
  --surface-2: #232839;
  --surface-3: #2b3044;
  --ink: #eceae4;
  --slate: #b6b9c7;
  --faint: #9a9eae;
  --line: #333849;
  --line-strong: #444a5e;
  --gold: #d4a63c;
  --gold-deep: #eac16b;
  --gold-soft: rgba(212, 166, 60, 0.16);
  --gold-ink: #151826;
  --veld: #7ac89a;
  --veld-soft: rgba(122, 200, 154, 0.14);
  --danger: #f08a80;
  --danger-soft: rgba(240, 138, 128, 0.12);
  --info-soft: rgba(236, 234, 228, 0.06);
  --stage: #0f121c;
  --stage-2: #191d2b;
  --stage-3: #232839;
  --stage-ink: #eceae4;
  --stage-slate: #b6b9c7;
  --stage-line: #2c3143;
  --thumb: #454b60;
  --thumb-hover: #d4a63c;
  --track: #191c29;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
}

/* Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scrollbar-color: var(--thumb) var(--track);
  scrollbar-width: thin;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}
::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}
::-webkit-scrollbar-track {
  background: var(--track);
}
::-webkit-scrollbar-thumb {
  background: var(--thumb);
  border-radius: 999px;
  border: 3px solid var(--track);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--thumb-hover);
}
::selection {
  background: var(--gold-soft);
}
h1,
h2,
h3,
h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.005em;
}
h1 {
  font-size: clamp(28px, 3.4vw, 40px);
}
h2 {
  font-size: 24px;
}
h3 {
  font-size: 18px;
}
p {
  margin: 0;
}
a {
  color: inherit;
}
img {
  max-width: 100%;
  display: block;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}
[hidden] {
  display: none !important;
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--gold);
  color: var(--gold-ink);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus {
  top: 12px;
}
.muted {
  color: var(--slate);
}
.faint {
  color: var(--faint);
}
.mono {
  font-family: var(--mono);
  font-size: 0.92em;
}
.nowrap {
  white-space: nowrap;
}
.spacer {
  flex: 1;
}

/* Brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  white-space: nowrap;
}
.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(201, 154, 46, 0.25);
}
.brand small {
  display: block;
  font-weight: 400;
  font-size: 12.5px;
  color: var(--stage-slate);
  line-height: 1.2;
}
.brand span {
  line-height: 1.2;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  font-size: 14.5px;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.18s var(--ease),
    border-color 0.18s var(--ease),
    transform 0.18s var(--ease),
    box-shadow 0.18s var(--ease);
  white-space: nowrap;
}
.btn:hover {
  border-color: var(--gold);
}
.btn:active {
  transform: translateY(1px);
}
.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.btn-primary {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--gold-ink);
  box-shadow: 0 6px 18px rgba(201, 154, 46, 0.28);
}
.btn-primary:hover {
  background: var(--gold-deep);
  border-color: var(--gold-deep);
  color: #fff;
}
:root[data-theme='dark'] .btn-primary:hover {
  color: var(--gold-ink);
}
.btn-dark {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.btn-ghost {
  background: transparent;
  border-color: transparent;
}
.btn-ghost:hover {
  background: var(--surface-2);
  border-color: transparent;
}
.btn-danger {
  color: var(--danger);
}
.btn-danger:hover {
  border-color: var(--danger);
}
.btn-sm {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13.5px;
  border-radius: 8px;
}
.btn-block {
  width: 100%;
}
.btn[disabled],
.btn[aria-disabled='true'] {
  opacity: 0.55;
  cursor: not-allowed;
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  color: inherit;
}
.icon-btn:hover {
  background: rgba(127, 127, 127, 0.14);
}
.icon-btn svg {
  width: 20px;
  height: 20px;
}

/* Theme toggle */
.theme-toggle {
  position: relative;
}
.theme-toggle .sun,
:root[data-theme='dark'] .theme-toggle .moon {
  display: none;
}
:root[data-theme='dark'] .theme-toggle .sun {
  display: block;
}

/* Forms */
.field {
  display: grid;
  gap: 7px;
}
.field + .field {
  margin-top: 16px;
}
.label {
  font-weight: 600;
  font-size: 13.5px;
}
.hint {
  font-size: 13px;
  color: var(--slate);
}
.input,
.select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  transition:
    border-color 0.18s var(--ease),
    box-shadow 0.18s var(--ease);
}
.input:hover,
.select:hover {
  border-color: var(--faint);
}
.input:focus,
.select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: var(--focus);
}
.input[aria-invalid='true'] {
  border-color: var(--danger);
}
.select {
  appearance: none;
  padding-right: 38px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--slate) 50%),
    linear-gradient(135deg, var(--slate) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 50%,
    calc(100% - 15px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.input-sm,
.select-sm {
  min-height: 38px;
  font-size: 14px;
}
.password-wrap {
  position: relative;
}
.password-wrap .input {
  padding-right: 52px;
}
.password-wrap .icon-btn {
  position: absolute;
  right: 4px;
  top: 3px;
  color: var(--slate);
}
.field-error {
  color: var(--danger);
  font-size: 13px;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  cursor: pointer;
  font-size: 14px;
}
.check input {
  width: 17px;
  height: 17px;
  accent-color: var(--gold);
  margin: 0;
}
.check .count {
  margin-left: auto;
  color: var(--faint);
  font-size: 12.5px;
}

/* Alerts and toasts */
.alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  background: var(--info-soft);
  border: 1px solid var(--line);
}
.alert svg {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 2px;
}
.alert-error {
  background: var(--danger-soft);
  border-color: transparent;
  color: var(--danger);
}
.alert-ok {
  background: var(--veld-soft);
  border-color: transparent;
  color: var(--veld);
}
.toasts {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  display: grid;
  gap: 10px;
  max-width: min(380px, calc(100vw - 36px));
}
.toast {
  padding: 13px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  animation: rise 0.28s var(--ease);
}
.toast.error {
  background: var(--danger);
  color: #fff;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* Sign-in pages */
.auth {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  min-height: 100vh;
}
.auth-stage {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 40px clamp(28px, 5vw, 72px);
  background: var(--stage);
  color: var(--stage-ink);
  isolation: isolate;
}
.auth-stage::before {
  content: '';
  position: absolute;
  inset: -20% -10% auto auto;
  width: 70%;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(201, 154, 46, 0.32), transparent 62%);
  filter: blur(10px);
  z-index: -1;
}
.auth-stage::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  z-index: -1;
}
.auth-copy {
  margin: auto 0;
  padding: 48px 0;
  max-width: 560px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(201, 154, 46, 0.45);
  color: #e6c47a;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.eyebrow::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(201, 154, 46, 0.2);
}
.auth-copy .display {
  max-width: none;
  margin: 22px 0 16px;
  font-family: var(--display);
  font-weight: 600;
  color: var(--stage-ink);
  letter-spacing: -0.005em;
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.04;
}
.auth-copy .display em {
  font-style: normal;
  color: var(--gold);
}
.auth-copy p {
  color: var(--stage-slate);
  font-size: 17px;
  max-width: 470px;
}
.auth-points {
  list-style: none;
  padding: 0;
  margin: 30px 0 0;
  display: grid;
  gap: 14px;
}
.auth-points li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--stage-slate);
}
.auth-points svg {
  width: 22px;
  height: 22px;
  flex: none;
  color: var(--gold);
}
.auth-points strong {
  color: var(--stage-ink);
  font-weight: 600;
}
.auth-stats {
  display: flex;
  gap: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--stage-line);
  margin-top: 36px;
}
.auth-stats b {
  display: block;
  font-family: var(--display);
  font-size: 30px;
  color: var(--stage-ink);
  line-height: 1;
}
.auth-stats span {
  font-size: 13px;
  color: var(--stage-slate);
}
.auth-credit {
  font-size: 13px;
  color: var(--stage-slate);
}
.auth-panel {
  display: flex;
  flex-direction: column;
  padding: 28px clamp(20px, 5vw, 64px);
}
.auth-panel-top {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  margin: auto;
  padding: 24px 0 40px;
}
.auth-card h1 {
  font-size: 32px;
}
.auth-card .lead {
  color: var(--slate);
  margin: 8px 0 28px;
}
.auth-card form {
  display: grid;
  gap: 0;
}
.auth-card .btn-block {
  margin-top: 24px;
  min-height: 50px;
  font-size: 15.5px;
}
.auth-card .alert {
  margin-bottom: 18px;
}
.auth-foot {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--slate);
  font-size: 13.5px;
}
.auth-foot a {
  color: var(--gold-deep);
  font-weight: 600;
  text-decoration: none;
}
.auth-mobile-brand {
  display: none;
}
.admin-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold-deep);
  font-size: 12px;
  font-weight: 600;
}
.auth.is-admin .auth-stage {
  background: linear-gradient(160deg, var(--stage) 0%, var(--stage-2) 100%);
}
@media (max-width: 900px) {
  .auth {
    grid-template-columns: 1fr;
  }
  .auth-stage {
    display: none;
  }
  .auth-mobile-brand {
    display: inline-flex;
    margin-right: auto;
  }
  .auth-mobile-brand small {
    color: var(--slate);
  }
}
.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Training site shell */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--stage);
  color: var(--stage-ink);
  border-bottom: 1px solid var(--stage-line);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 66px;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 24px;
}
.mainnav {
  display: flex;
  gap: 4px;
  margin-left: 18px;
}
.mainnav a {
  position: relative;
  padding: 9px 13px;
  border-radius: 9px;
  color: var(--stage-slate);
  text-decoration: none;
  font-weight: 600;
  font-size: 14.5px;
}
.mainnav a:hover {
  color: var(--stage-ink);
  background: var(--stage-2);
}
.mainnav a[aria-current='page'] {
  color: var(--stage-ink);
}
.mainnav a[aria-current='page']::after {
  content: '';
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: -12px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--gold);
}
.top-search {
  position: relative;
  width: min(300px, 28vw);
}
.top-search input {
  width: 100%;
  height: 40px;
  padding: 0 14px 0 38px;
  border-radius: 10px;
  border: 1px solid var(--stage-line);
  background: var(--stage-2);
  color: var(--stage-ink);
}
.top-search input::placeholder {
  color: var(--stage-slate);
}
.top-search input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: var(--focus);
}
.top-search svg {
  position: absolute;
  left: 12px;
  top: 11px;
  width: 18px;
  height: 18px;
  color: var(--stage-slate);
}
.topbar .icon-btn {
  color: var(--stage-slate);
}
.topbar .icon-btn:hover {
  color: var(--stage-ink);
  background: var(--stage-2);
}
.avatar {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d9b25a, #a87a1e);
  color: #1b1d2b;
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: 0.02em;
}
.menu-wrap {
  position: relative;
}
.menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 8px 3px 3px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  color: inherit;
}
.menu-btn:hover {
  background: var(--stage-2);
}
.menu-btn svg {
  width: 16px;
  height: 16px;
  color: var(--stage-slate);
}
.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 230px;
  padding: 6px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  z-index: 60;
}
.menu[hidden] {
  display: none;
}
.menu-head {
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}
.menu-head b {
  display: block;
}
.menu-head span {
  font-size: 13px;
  color: var(--slate);
}
.menu a,
.menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  font-size: 14.5px;
}
.menu a:hover,
.menu button:hover {
  background: var(--surface-2);
}
.menu svg {
  width: 17px;
  height: 17px;
  color: var(--slate);
}
.page {
  max-width: 1360px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}
.site-foot {
  border-top: 1px solid var(--line);
  color: var(--slate);
  font-size: 13.5px;
}
.site-foot .page {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding-top: 22px;
  padding-bottom: 28px;
}
.mobile-nav {
  display: none;
}
@media (max-width: 980px) {
  .top-search {
    display: none;
  }
}
@media (max-width: 760px) {
  .mainnav {
    display: none;
  }
  .topbar-inner {
    padding: 0 16px;
    gap: 8px;
  }
  .brand small {
    display: none;
  }
  .page {
    padding: 22px 16px 96px;
  }
  .mobile-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: var(--stage);
    border-top: 1px solid var(--stage-line);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mobile-nav a {
    display: grid;
    justify-items: center;
    gap: 3px;
    padding: 9px 0 8px;
    color: var(--stage-slate);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
  }
  .mobile-nav a[aria-current='page'] {
    color: var(--gold);
  }
  .mobile-nav svg {
    width: 21px;
    height: 21px;
  }
}

/* Section headings */
.section {
  margin-top: 44px;
}
.section-head {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 18px;
}
.section-head p {
  color: var(--slate);
  margin-top: 4px;
}
.section-head a {
  margin-left: auto;
  color: var(--gold-deep);
  font-weight: 600;
  text-decoration: none;
  font-size: 14.5px;
  white-space: nowrap;
}
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 26px;
}
.page-head p {
  color: var(--slate);
  margin-top: 6px;
  max-width: 640px;
}

/* Home hero */
.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
  padding: clamp(24px, 4vw, 44px);
  border-radius: 20px;
  background: var(--stage);
  color: var(--stage-ink);
  isolation: isolate;
  box-shadow: var(--shadow);
}
.hero::before {
  content: '';
  position: absolute;
  right: -8%;
  top: -60%;
  width: 55%;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(201, 154, 46, 0.3), transparent 62%);
  z-index: -1;
}
.hero h1 {
  font-size: clamp(28px, 3.6vw, 44px);
}
.hero p {
  color: var(--stage-slate);
  margin-top: 10px;
  max-width: 560px;
  font-size: 16px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.hero .btn:not(.btn-primary) {
  background: var(--stage-2);
  border-color: var(--stage-line);
  color: var(--stage-ink);
}
.hero-stats {
  display: flex;
  gap: 28px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.hero-stats b {
  display: block;
  font-family: var(--display);
  font-size: 26px;
  line-height: 1.1;
}
.hero-stats span {
  font-size: 13px;
  color: var(--stage-slate);
}
.ring {
  --p: 0;
  position: relative;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: conic-gradient(var(--gold) calc(var(--p) * 1%), var(--stage-3) 0);
  display: grid;
  place-items: center;
}
.ring::before {
  content: '';
  position: absolute;
  inset: 13px;
  border-radius: 50%;
  background: var(--stage);
}
.ring div {
  position: relative;
  text-align: center;
}
.ring b {
  display: block;
  font-family: var(--display);
  font-size: 40px;
  line-height: 1;
}
.ring span {
  font-size: 13px;
  color: var(--stage-slate);
}
@media (max-width: 700px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .ring {
    width: 130px;
    height: 130px;
  }
  .ring b {
    font-size: 30px;
  }
}

/* Episode cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}
.row-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(270px, 300px);
  gap: 20px;
  overflow-x: auto;
  padding: 4px 4px 14px;
  margin: -4px -4px 0;
  scroll-snap-type: x proximity;
}
.row-scroll > * {
  scroll-snap-align: start;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  text-decoration: none;
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    border-color 0.25s var(--ease);
}
a.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: rgba(201, 154, 46, 0.55);
}
.thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--stage);
  overflow: hidden;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
  -webkit-user-drag: none;
  user-select: none;
}
a.card:hover .thumb img {
  transform: scale(1.035);
}
.thumb .play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  background: rgba(15, 18, 28, 0.35);
  transition: opacity 0.25s var(--ease);
}
.thumb .play span {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gold);
  color: #1b1d2b;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.thumb .play svg {
  width: 22px;
  height: 22px;
  margin-left: 3px;
}
a.card:hover .thumb .play,
a.card:focus-visible .thumb .play {
  opacity: 1;
}
.badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 7px;
  background: rgba(15, 18, 28, 0.82);
  color: #fbfaf7;
  font-size: 12px;
  font-weight: 600;
  backdrop-filter: blur(4px);
}
.badge svg {
  width: 13px;
  height: 13px;
}
.badge.time {
  right: 10px;
  bottom: 10px;
}
.badge.num {
  left: 10px;
  bottom: 10px;
}
.badge.done {
  right: 10px;
  top: 10px;
  background: var(--veld);
  color: #fff;
}
:root[data-theme='dark'] .badge.done {
  color: #0f121c;
}
.thumb-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.22);
}
.thumb-progress i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--gold);
}
.soon-art {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  background:
    radial-gradient(circle at 70% 20%, rgba(201, 154, 46, 0.22), transparent 55%),
    linear-gradient(160deg, var(--stage-2), var(--stage));
  color: var(--stage-slate);
  font-size: 13px;
  font-weight: 600;
}
.soon-art img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  opacity: 0.85;
}
.card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 15px 16px 17px;
  flex: 1;
}
.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--faint);
  font-size: 12.5px;
  font-weight: 600;
}
.card-meta span {
  white-space: nowrap;
}
.card-meta span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-meta .dot {
  flex: none;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}
.card h3 {
  font-size: 17.5px;
  line-height: 1.25;
}
.card .summary {
  color: var(--slate);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--slate);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
button.chip {
  cursor: pointer;
}
button.chip:hover {
  border-color: var(--gold);
}
.chip.active {
  background: var(--gold-soft);
  border-color: rgba(201, 154, 46, 0.5);
  color: var(--gold-deep);
}
.chip svg {
  width: 13px;
  height: 13px;
}
.card.soon {
  opacity: 0.86;
}
.card.soon h3 {
  color: var(--slate);
}

/* List view */
.list {
  display: grid;
  gap: 10px;
}
.list-item {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 10px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
  transition:
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}
a.list-item:hover {
  border-color: rgba(201, 154, 46, 0.55);
  box-shadow: var(--shadow-sm);
}
.list-item .thumb {
  border-radius: 9px;
}
.list-item h3 {
  font-size: 17px;
}
.list-item .summary {
  color: var(--slate);
  font-size: 14px;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.list-item .side {
  display: grid;
  justify-items: end;
  gap: 6px;
  padding-right: 8px;
  font-size: 13px;
  color: var(--slate);
}
@media (max-width: 640px) {
  .list-item {
    grid-template-columns: 110px minmax(0, 1fr);
  }
  .list-item .side {
    display: none;
  }
}

/* Status pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--surface-2);
  color: var(--slate);
}
.pill::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.pill.ok {
  background: var(--veld-soft);
  color: var(--veld);
}
.pill.live {
  background: var(--veld-soft);
  color: var(--veld);
}
.pill.live::before {
  animation: pulse 1.6s ease-in-out infinite;
}
.pill.warn {
  background: var(--gold-soft);
  color: var(--gold-deep);
}
.pill.bad {
  background: var(--danger-soft);
  color: var(--danger);
}
.pill.plain::before {
  display: none;
}
@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

/* Library */
.library {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}
.filters {
  position: sticky;
  top: 90px;
  display: grid;
  gap: 4px;
  max-height: calc(100vh - 110px);
  overflow: auto;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}
.filters h2 {
  font-size: 18px;
  margin-bottom: 8px;
}
.filter-group {
  border-top: 1px solid var(--line);
  padding: 14px 0 8px;
}
.filter-group:first-of-type {
  border-top: 0;
  padding-top: 4px;
}
.filter-group h2 {
  font-family: var(--body);
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 6px;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.toolbar .select {
  width: auto;
}
.toolbar .count {
  color: var(--slate);
  font-size: 14px;
}
.segmented {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.segmented button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--slate);
}
.segmented button[aria-pressed='true'] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.segmented svg {
  width: 16px;
  height: 16px;
}
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.filters-toggle {
  display: none;
}
.empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 60px 20px;
  text-align: center;
  color: var(--slate);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}
.empty svg {
  width: 40px;
  height: 40px;
  color: var(--gold);
}
@media (max-width: 980px) {
  .library {
    grid-template-columns: 1fr;
  }
  .filters {
    position: static;
    max-height: none;
    display: none;
  }
  .filters.open {
    display: grid;
  }
  .filters-toggle {
    display: inline-flex;
  }
}

/* Paths */
.part-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}
.part-tile {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
  transition:
    border-color 0.2s var(--ease),
    transform 0.2s var(--ease);
}
.part-tile:hover {
  border-color: rgba(201, 154, 46, 0.55);
  transform: translateY(-2px);
}
.part-tile .n {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gold-deep);
}
.part-tile h3 {
  font-size: 18px;
}
.part-tile .meta {
  font-size: 13px;
  color: var(--slate);
}
.bar {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), #e2bb5d);
  transition: width 0.6s var(--ease);
}
.bar.veld i {
  background: var(--veld);
}
.path {
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}
.path + .path {
  margin-top: 18px;
}
.path-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 200px;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
}
.path-head .num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--stage);
  color: var(--gold);
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
}
.path-head .num svg {
  width: 22px;
  height: 22px;
}
.path-head .meta {
  font-size: 13px;
  color: var(--slate);
}
.path-head .prog {
  display: grid;
  gap: 6px;
  font-size: 12.5px;
  color: var(--slate);
  text-align: right;
}
.steps {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}
.step a,
.step > div {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 11px 20px;
  text-decoration: none;
}
.step a:hover {
  background: var(--surface-2);
}
.step-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  color: var(--faint);
  font-size: 12.5px;
  font-weight: 600;
}
.step-icon svg {
  width: 15px;
  height: 15px;
}
.step.done .step-icon {
  background: var(--veld);
  border-color: var(--veld);
  color: #fff;
}
:root[data-theme='dark'] .step.done .step-icon {
  color: #0f121c;
}
.step.started .step-icon {
  border-color: var(--gold);
  color: var(--gold-deep);
}
.step .title {
  font-weight: 600;
}
.step .sub {
  font-size: 13px;
  color: var(--slate);
}
.step.soon {
  color: var(--faint);
}
.step .time {
  font-size: 13px;
  color: var(--slate);
}
@media (max-width: 700px) {
  .path-head {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .path-head .prog {
    grid-column: 1 / -1;
    text-align: left;
  }
}

/* Watch page */
.theatre {
  background: var(--stage);
  border-bottom: 1px solid var(--stage-line);
}
.theatre-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 24px 26px;
}
.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--stage-slate);
  font-size: 13.5px;
  margin-bottom: 14px;
}
.crumbs a {
  color: var(--stage-slate);
  text-decoration: none;
}
.crumbs a:hover {
  color: var(--stage-ink);
}
.crumbs svg {
  width: 14px;
  height: 14px;
}
.watch {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 34px;
  align-items: start;
}
.watch-title {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: flex-start;
}
.watch-title h1 {
  font-size: clamp(26px, 3vw, 36px);
}
.watch-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.watch-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.panel {
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 20px;
}
.panel + .panel {
  margin-top: 18px;
}
.panel h2 {
  font-size: 18px;
  margin-bottom: 12px;
}
.learn {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.learn li {
  display: flex;
  gap: 10px;
}
.learn svg {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--veld);
  margin-top: 1px;
}
.chapters {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.chapters button {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  background: none;
  text-align: left;
  cursor: pointer;
}
.chapters button:hover {
  background: var(--surface-2);
}
.chapters button[aria-current='true'] {
  background: var(--gold-soft);
}
.chapters button[aria-current='true'] .t {
  color: var(--gold-deep);
}
.chapters .t {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--slate);
}
.up-next {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  text-decoration: none;
  padding: 8px;
  margin: 0 -8px;
  border-radius: 10px;
}
.up-next:hover {
  background: var(--surface-2);
}
.up-next .thumb {
  border-radius: 8px;
}
.up-next b {
  display: block;
  font-size: 14.5px;
  line-height: 1.3;
}
.up-next span {
  font-size: 12.5px;
  color: var(--slate);
}
@media (max-width: 1080px) {
  .watch {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .theatre-inner {
    padding: 12px 0 0;
  }
  .crumbs {
    padding: 0 16px;
  }
}

/* Player */
.player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.player video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  pointer-events: none;
}
.player:fullscreen {
  border-radius: 0;
  aspect-ratio: auto;
}
@media (max-width: 760px) {
  .player {
    border-radius: 0;
  }
}
.player-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.4s var(--ease);
}
.player.started .player-poster {
  opacity: 0;
  pointer-events: none;
}
.player-hit {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.player-big {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 0;
  background: var(--gold);
  color: #1b1d2b;
  cursor: pointer;
  box-shadow:
    0 0 0 10px rgba(201, 154, 46, 0.22),
    0 18px 50px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s var(--ease);
}
.player-big:hover {
  transform: translate(-50%, -50%) scale(1.06);
}
.player-big svg {
  width: 32px;
  height: 32px;
  margin-left: 4px;
}
.player.playing .player-big,
.player.started.paused .player-big {
  display: none;
}
.player-loading {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: var(--gold);
  animation: spin 0.8s linear infinite;
  display: none;
}
.player.waiting .player-loading {
  display: block;
}
.watermark {
  position: absolute;
  z-index: 4;
  padding: 4px 8px;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.5);
  font:
    600 12px/1.3 var(--body),
    sans-serif;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  transition:
    left 1.2s var(--ease),
    top 1.2s var(--ease);
  white-space: nowrap;
}
.controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  padding: 40px 14px 10px;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(8, 10, 16, 0.82) 45%,
    rgba(8, 10, 16, 0.96)
  );
  color: #fff;
  transition: opacity 0.25s var(--ease);
}
.player.playing.idle .controls {
  opacity: 0;
}
.player.playing.idle {
  cursor: none;
}
.scrub {
  position: relative;
  height: 18px;
  cursor: pointer;
  touch-action: none;
}
.scrub-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 7px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.22);
  transition:
    height 0.15s,
    top 0.15s;
}
.scrub:hover .scrub-track {
  top: 6px;
  height: 6px;
}
.scrub-buffer,
.scrub-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  border-radius: inherit;
}
.scrub-buffer {
  background: rgba(255, 255, 255, 0.3);
}
.scrub-fill {
  background: var(--gold);
}
.scrub-mark {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  margin-left: -1px;
  background: rgba(8, 10, 16, 0.75);
}
.scrub-knob {
  position: absolute;
  top: 2px;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(201, 154, 46, 0.3);
  transform: scale(0);
  transition: transform 0.15s;
}
.scrub:hover .scrub-knob,
.scrub:focus-visible .scrub-knob {
  transform: scale(1);
}
.scrub-tip {
  position: absolute;
  bottom: 26px;
  padding: 5px 9px;
  border-radius: 7px;
  background: rgba(8, 10, 16, 0.92);
  font-size: 12.5px;
  white-space: nowrap;
  transform: translateX(-50%);
  pointer-events: none;
  display: none;
}
.scrub:hover .scrub-tip {
  display: block;
}
.ctrl-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}
.ctrl {
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  padding: 0 8px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  font-size: 13.5px;
}
.ctrl:hover {
  background: rgba(255, 255, 255, 0.12);
}
.ctrl svg {
  width: 22px;
  height: 22px;
}
.ctrl-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.ctrl-label svg {
  width: 19px;
  height: 19px;
}
.time {
  font-variant-numeric: tabular-nums;
  font-size: 13.5px;
  padding: 0 8px;
  color: rgba(255, 255, 255, 0.88);
  white-space: nowrap;
}
.volume {
  width: 0;
  opacity: 0;
  transition:
    width 0.2s,
    opacity 0.2s;
  accent-color: var(--gold);
}
.vol-wrap:hover .volume,
.volume:focus-visible {
  width: 80px;
  opacity: 1;
}
.vol-wrap {
  display: inline-flex;
  align-items: center;
}
.pop {
  position: absolute;
  right: 12px;
  bottom: 70px;
  z-index: 6;
  min-width: 220px;
  max-height: 70%;
  overflow: auto;
  padding: 6px;
  border-radius: 12px;
  background: rgba(16, 19, 30, 0.96);
  color: #fff;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.pop[hidden] {
  display: none;
}
.pop h4 {
  font-family: var(--body);
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  padding: 8px 10px 6px;
}
.pop button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: #fff;
  cursor: pointer;
  text-align: left;
  font-size: 14px;
}
.pop button:hover {
  background: rgba(255, 255, 255, 0.1);
}
.pop button small {
  margin-left: auto;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
}
.pop button[aria-checked='true'] {
  color: #e6c47a;
}
.pop button .tick {
  width: 16px;
  height: 16px;
  opacity: 0;
}
.pop button[aria-checked='true'] .tick {
  opacity: 1;
}
.player-notice {
  position: absolute;
  left: 50%;
  top: 18px;
  z-index: 6;
  transform: translateX(-50%);
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(16, 19, 30, 0.9);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}
.player-notice.show {
  opacity: 1;
}
.player-error {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 20px;
  text-align: center;
  background: rgba(8, 10, 16, 0.86);
  color: #fff;
}
.player-error[hidden] {
  display: none;
}
@media (max-width: 640px) {
  .player-big {
    width: 62px;
    height: 62px;
    box-shadow:
      0 0 0 7px rgba(201, 154, 46, 0.22),
      0 12px 30px rgba(0, 0, 0, 0.5);
  }
  .player-big svg {
    width: 24px;
    height: 24px;
  }
  .controls {
    padding: 24px 8px 4px;
  }
  .watermark {
    font-size: 10.5px;
  }
  .ctrl.hide-sm,
  .vol-wrap {
    display: none;
  }
  .ctrl-label span {
    display: none;
  }
}

/* Account */
.settings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  align-items: start;
}
.profile {
  display: flex;
  gap: 16px;
  align-items: center;
}
.profile .avatar {
  width: 56px;
  height: 56px;
  font-size: 19px;
}
.voice-list {
  display: grid;
  gap: 8px;
}
.voice-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 11px;
  border: 1px solid var(--line);
  cursor: pointer;
}
.voice-option:hover {
  border-color: var(--faint);
}
.voice-option:has(input:checked) {
  border-color: var(--gold);
  background: var(--gold-soft);
}
.voice-option input {
  accent-color: var(--gold);
  width: 17px;
  height: 17px;
  margin: 0;
}
.voice-option small {
  margin-left: auto;
  color: var(--slate);
}

/* Admin console */
.console {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 14px;
  background: var(--stage);
  color: var(--stage-ink);
  border-right: 1px solid var(--stage-line);
}
.sidebar .brand {
  padding: 4px 8px 18px;
}
.side-nav {
  display: grid;
  gap: 3px;
}
.side-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--stage-slate);
  text-decoration: none;
  font-weight: 600;
  font-size: 14.5px;
}
.side-nav a:hover {
  background: var(--stage-2);
  color: var(--stage-ink);
}
.side-nav a[aria-current='page'] {
  background: var(--stage-2);
  color: var(--stage-ink);
  box-shadow: inset 3px 0 0 var(--gold);
}
.side-nav svg {
  width: 19px;
  height: 19px;
}
.side-label {
  padding: 16px 12px 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--stage-slate);
}
.side-foot {
  margin-top: auto;
  padding: 14px 10px 0;
  border-top: 1px solid var(--stage-line);
  font-size: 12.5px;
  color: var(--stage-slate);
}
.console-main {
  min-width: 0;
}
.console-top {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 66px;
  padding: 0 28px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.console-top h1 {
  font-size: 22px;
}
.console-top .menu-btn:hover {
  background: var(--surface-2);
}
.console-top .menu-btn svg {
  color: var(--slate);
}
.console-body {
  padding: 28px;
  max-width: 1400px;
}
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}
.kpi {
  position: relative;
  overflow: hidden;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.kpi .k-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--slate);
}
.kpi .k-label svg {
  width: 17px;
  height: 17px;
  color: var(--gold-deep);
}
.kpi .k-value {
  font-family: var(--display);
  font-size: 36px;
  font-weight: 600;
  line-height: 1.1;
  margin-top: 10px;
}
.kpi .k-note {
  font-size: 13px;
  color: var(--faint);
  margin-top: 2px;
}
.kpi.accent {
  background: var(--stage);
  color: var(--stage-ink);
  border-color: var(--stage-line);
}
.kpi.accent .k-label {
  color: var(--stage-slate);
}
.kpi.accent .k-note {
  color: var(--stage-slate);
}
.kpi.accent .k-label svg {
  color: var(--gold);
}
.cols {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 20px;
  margin-top: 20px;
}
@media (max-width: 1100px) {
  .cols {
    grid-template-columns: 1fr;
  }
}
.box {
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  min-width: 0;
}
.box-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.box-head h2 {
  font-size: 17px;
}
.box-head a {
  margin-left: auto;
  color: var(--gold-deep);
  font-weight: 600;
  font-size: 13.5px;
  text-decoration: none;
}
.box-body {
  padding: 18px 20px;
}
.chart {
  width: 100%;
  height: 220px;
  display: block;
}
.chart .bar-rect {
  fill: var(--gold);
  transition: opacity 0.2s;
}
.chart .bar-rect:hover {
  opacity: 0.75;
}
.chart .today {
  fill: var(--gold-deep);
}
.chart .axis {
  fill: var(--faint);
  font-size: 11px;
  font-family: var(--body);
}
.chart .grid-line {
  stroke: var(--line);
  stroke-dasharray: 3 4;
}
.chart .val {
  fill: var(--slate);
  font-size: 11px;
  font-weight: 600;
  font-family: var(--body);
}
.mini-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mini-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
}
.mini-list li:first-child {
  border-top: 0;
}
.mini-list .sub {
  font-size: 13px;
  color: var(--slate);
}
.mini-list .bar {
  grid-column: 1 / -1;
}
.table-wrap {
  overflow-x: auto;
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.data th {
  position: sticky;
  top: 0;
  padding: 11px 14px;
  text-align: left;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--slate);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.data td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.data tbody tr:hover td {
  background: color-mix(in srgb, var(--surface-2) 60%, transparent);
}
.data tbody tr:last-child td {
  border-bottom: 0;
}
.data .person b {
  display: block;
  font-weight: 600;
}
.data .person span {
  font-size: 12.5px;
  color: var(--slate);
}
.data .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.data button.link {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
}
.data button.link:hover b {
  color: var(--gold-deep);
}
.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.filters-row .field {
  gap: 5px;
}
.filters-row .field + .field {
  margin-top: 0;
}
.filters-row .label {
  font-size: 12.5px;
  color: var(--slate);
}
.filters-row .grow {
  flex: 1 1 220px;
}
.pager {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  color: var(--slate);
  font-size: 13.5px;
}
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.tabs button,
.tabs a {
  position: relative;
  padding: 10px 14px 12px;
  border: 0;
  background: none;
  cursor: pointer;
  font-weight: 600;
  color: var(--slate);
  text-decoration: none;
  font-size: 14.5px;
}
.tabs [aria-selected='true'] {
  color: var(--ink);
}
.tabs [aria-selected='true']::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -1px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--gold);
}
.row-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}
.progress-cell {
  display: grid;
  gap: 5px;
  min-width: 120px;
  font-size: 12.5px;
  color: var(--slate);
}
@media (max-width: 900px) {
  .console {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 12px 16px;
  }
  .sidebar .brand {
    padding: 0;
  }
  .side-nav {
    grid-auto-flow: column;
    overflow-x: auto;
    width: 100%;
  }
  .side-label,
  .side-foot {
    display: none;
  }
  .console-top {
    padding: 0 16px;
  }
  .console-body {
    padding: 18px 16px 40px;
  }
}

/* Dialogs */
dialog {
  width: min(520px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
}
dialog::backdrop {
  background: rgba(15, 18, 28, 0.55);
  backdrop-filter: blur(3px);
}
.dialog-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 22px 0;
}
.dialog-head h2 {
  font-size: 21px;
}
.dialog-head .icon-btn {
  margin-left: auto;
  color: var(--slate);
}
.dialog-body {
  padding: 18px 22px;
}
.dialog-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px 20px;
  border-top: 1px solid var(--line);
}
.secret {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  margin: 14px 0;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px dashed var(--gold);
  font-family: var(--mono);
  font-size: 20px;
  letter-spacing: 0.04em;
}
.secret .btn {
  margin-left: auto;
  font-family: var(--body);
  letter-spacing: 0;
}
.drawer {
  margin: 0 0 0 auto;
  height: 100vh;
  max-height: 100vh;
  width: min(560px, 100vw);
  border-radius: 0;
  border-width: 0 0 0 1px;
}
.drawer .dialog-body {
  overflow: auto;
  max-height: calc(100vh - 80px);
}

/* Loading skeletons */
.skeleton {
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2));
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}
.sk-card {
  height: 290px;
}
.sk-kpi {
  height: 128px;
}
.sk-hero {
  height: 260px;
  border-radius: 20px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
