:root {
  color-scheme: dark;
  --ink: #f5f5ee;
  --muted: #a3a8ae;
  --bg: #101316;
  --panel: #171b20;
  --line: #31363d;
  --accent: #d7fb65;
  font-family: Inter, system-ui, sans-serif;
  line-height: 1.5;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--bg); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .43; cursor: default; }
img, video { display: block; max-width: 100%; }
svg { width: 20px; height: 20px; flex: none; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
.shell { max-width: 1360px; width: calc(100% - 112px); margin-inline: auto; }
.header { border-bottom: 1px solid #272d33; background: #101316; }
.header-inner { display: flex; align-items: center; gap: 40px; min-height: 77px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 29px; line-height: 1; font-weight: 850; letter-spacing: -.08em; }
.brand-icon { display: grid; place-items: center; width: 31px; height: 31px; color: #131613; background: var(--accent); border-radius: 9px; }
.brand-icon svg { fill: currentColor; width: 21px; height: 21px; }
.dot { color: var(--accent); }
.header nav { display: flex; gap: 25px; font-size: 14px; font-weight: 650; color: var(--muted); }
.header nav a:hover, .header .nav-active { color: var(--ink); }
.search { margin-left: auto; width: min(27vw, 315px); display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 9px; padding: 8px 12px; background: #1b2025; color: var(--muted); }
.search span { display: flex; }
.search input { width: 100%; min-width: 0; padding: 0; border: 0; background: transparent; color: var(--ink); outline: none; font-size: 14px; }
.search:focus-within { border-color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.studio-link { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 740; white-space: nowrap; }
.studio-link span { color: var(--accent); }
#main { min-height: 74vh; padding-top: 29px; padding-bottom: 72px; }
.loading { margin-block: 40px; }
.hero { position: relative; isolation: isolate; overflow: hidden; border-radius: 15px; min-height: 405px; display: grid; align-items: center; border: 1px solid #353e43; background: radial-gradient(ellipse at 80% 40%, #204c64, #131d27 65%); }
.hero-art { position: absolute; width: 100%; height: 100%; inset: 0; object-fit: cover; object-position: 50% 45%; z-index: -2; }
.hero:after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg,#10171d 0%,#10171df2 24%,#10171d93 57%,#10171d15 100%), linear-gradient(0deg,#0a10165c,transparent 40%); }
.hero-content { padding: 42px 6%; max-width: 750px; }
.kicker { display: inline-flex; gap: 8px; align-items: center; font-size: 11px; line-height: 1.4; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; color: var(--accent); }
.kicker i { background: var(--accent); width: 7px; height: 7px; border-radius: 50%; box-shadow: 0 0 12px #d7fb6560; }
.hero h1 { font-size: clamp(43px, 6vw, 85px); line-height: .98; letter-spacing: -.085em; margin-top: 14px; font-weight: 850; overflow-wrap: anywhere; }
.hero h1 span { color: var(--accent); }
.hero.has-video h1 { font-size: clamp(35px, 5vw, 62px); }
.hero-content p { color: #d4d9dc; font-size: clamp(15px, 1.6vw, 19px); margin: 17px 0 24px; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow-wrap: anywhere; }
.hero-note { position: absolute; right: 19px; bottom: 15px; font-size: 9px; letter-spacing: .13em; color: #d4d9dc; background: #101316a8; padding: 5px 8px; border-radius: 4px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 9px 15px; border: 1px solid transparent; border-radius: 7px; font-size: 14px; font-weight: 740; transition: background .15s, color .15s, border-color .15s; }
.primary { color: #151814; background: var(--accent); }
.primary:hover { background: #e3ff97; }
.secondary, .empty .button { background: #20262c; border-color: var(--line); color: var(--ink); }
.secondary:hover, .empty .button:hover { border-color: var(--accent); }
.small { min-height: 33px; font-size: 12px; padding: 5px 8px; }
.topics { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 26px 0 28px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border: 1px solid var(--line); border-radius: 6px; background: #1a1f24; color: #d3d6d9; font-size: 13px; font-weight: 630; white-space: nowrap; }
.chip svg { width: 14px; height: 14px; }
.chip.selected { background: var(--accent); color: #141814; border-color: var(--accent); }
.chip:hover { border-color: var(--accent); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-block: 0 11px; }
.section-head h2 { font-size: clamp(24px, 4vw, 34px); letter-spacing: -.055em; overflow-wrap: anywhere; }
.section-head span, .section-note, .muted { color: var(--muted); }
.section-head span { white-space: nowrap; font-size: 13px; }
.section-note { font-size: 14px; margin: -4px 0 16px; }
.card-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.topic-card { position: relative; display: flex; justify-content: space-between; align-items: end; gap: 20px; min-height: 172px; overflow: hidden; isolation: isolate; border: 1px solid #343d46; border-radius: 11px; padding: 17px; background: #26394a; }
.topic-card img, .topic-card:after { position: absolute; width: 100%; height: 100%; inset: 0; }
.topic-card img { z-index: -2; object-fit: cover; transition: transform .25s; }
.topic-card:after { content: ''; z-index: -1; background: linear-gradient(0deg,#0e1318 0%,#0e131877 59%,#13161b19); }
.topic-card:hover { border-color: var(--accent); }
.topic-card:hover img { transform: scale(1.045); }
.topic-card h3 { font-size: 21px; letter-spacing: -.04em; }
.topic-card p { color: #cbd1d5; font-size: 13px; }
.topic-card span { padding: 6px; display: grid; place-items: center; border: 1px solid #ffffff4a; background: #151c23a0; border-radius: 50%; }
.cover { position: relative; display: grid; align-items: center; justify-items: center; aspect-ratio: 16/9; border-radius: 9px; overflow: hidden; background: radial-gradient(ellipse at 60% 35%,#344958,#17222c 70%); }
.cover img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.cover-play { position: relative; display: grid; place-items: center; padding: 9px; background: #15191caa; color: var(--ink); border: 1px solid #ffffff5c; border-radius: 50%; }
.cover:hover .cover-play { color: #111; background: var(--accent); }
.duration { position: absolute; right: 8px; bottom: 8px; padding: 2px 6px; border-radius: 4px; font-size: 12px; font-weight: 750; background: #0f1317e8; }
.card-meta, .watch-meta { display: flex; gap: 12px; align-items: center; color: var(--muted); margin: 8px 0 4px; font-size: 12px; }
.card-meta a, .watch-meta a { color: var(--accent); font-weight: 750; }
.video-card h3 { font-size: 18px; line-height: 1.3; overflow-wrap: anywhere; }
.video-card h3 a:hover { color: var(--accent); }
.video-card p { color: var(--muted); font-size: 12px; margin-top: 5px; }
.watch { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.watch:has(aside) { grid-template-columns: minmax(0, 1fr) minmax(220px, 28%); }
.watch video { width: 100%; max-height: 72vh; aspect-ratio: 16/9; background: #000; border-radius: 10px; }
.watch h1, .studio-head h1, .login h1 { font-size: clamp(28px, 4vw, 46px); line-height: 1.1; letter-spacing: -.045em; margin: 9px 0 15px; overflow-wrap: anywhere; }
.watch aside h2 { font-size: 21px; margin-bottom: 15px; }
.watch aside article + article { margin-top: 20px; }
.back { display: inline-block; margin-bottom: 16px; }
.tag { color: var(--accent); display: inline-block; border: 1px solid #74843e; border-radius: 5px; padding: 3px 7px; font-size: 11px; }
.description { white-space: pre-wrap; overflow-wrap: anywhere; margin: 12px 0; color: #cbd1d5; }
.footer { border-top: 1px solid #282d32; }
.footer .shell { display: flex; flex-wrap: wrap; align-items: center; gap: 15px 23px; justify-content: space-between; padding: 24px 0; color: var(--muted); font-size: 13px; }
.footer-brand { color: var(--ink); font-size: 20px; font-weight: 840; letter-spacing: -.06em; }
.panel, dialog { color: var(--ink); background: var(--panel); padding: 24px; border: 1px solid var(--line); border-radius: 12px; }
.empty { text-align: center; color: var(--muted); padding: 35px 20px; }
.empty a { color: var(--accent); }
.empty p { margin: 6px 0 12px; }
.login { max-width: 420px; margin: 8vh auto; }
.studio-head, .connection { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.connection > div { margin-right: auto; }
.studio-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 22px; }
.studio-grid h2, .connection h2, dialog h2 { font-size: 22px; letter-spacing: -.03em; margin-bottom: 8px; }
.connection h2 { margin-bottom: 1px; }
#studio-status { min-height: 24px; margin-block: 7px; color: var(--accent); }
.error, #form-status, [data-message] { color: #ffbc96; font-size: 13px; overflow-wrap: anywhere; }
#form-status, [data-message] { min-height: 20px; margin-bottom: 9px; }
label { display: grid; gap: 6px; margin: 12px 0; font-size: 13px; font-weight: 650; color: #dae0e4; }
label input:not([type=checkbox]), label textarea, label select { min-width: 0; width: 100%; border: 1px solid #3b434c; padding: 9px; background: #11161b; color: var(--ink); border-radius: 6px; }
label textarea { resize: vertical; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fields label { margin-top: 0; }
.check { display: flex; gap: 9px; align-items: center; font-weight: 500; }
.check input, progress { accent-color: var(--accent); }
.file { position: relative; display: flex; align-items: center; gap: 11px; padding: 13px; background: #1b2329; border: 1px dashed #61717b; border-radius: 7px; cursor: pointer; }
.file span { overflow-wrap: anywhere; min-width: 0; }
.file small { display: block; margin-top: 2px; color: var(--muted); font-weight: 500; }
.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file:focus-within { outline: 2px solid var(--accent); }
progress { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.admin-card { display: grid; grid-template-columns: 92px minmax(0,1fr); gap: 11px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.admin-card h3 { font-size: 16px; line-height: 1.25; margin-bottom: 2px; overflow-wrap: anywhere; }
.admin-card p { font-size: 12px; margin-bottom: 7px; }
.admin-thumb { width: 100%; height: fit-content; aspect-ratio: 16/10; display: grid; place-items: center; background: #232a32; border-radius: 5px; overflow: hidden; }
.admin-thumb img { width: 100%; height: 100%; object-fit: cover; }
dialog { width: min(450px, calc(100% - 24px)); }
dialog::backdrop { background: #07090be0; }
@media (max-width: 900px) {
  .shell { width: calc(100% - 50px); }
  .header-inner { gap: 24px; }
  .card-grid { gap: 14px; }
  .studio-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .shell { width: calc(100% - 28px); }
  .header-inner { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding-block: 12px; }
  .header nav { display: none; }
  .header-actions { grid-column: 2; grid-row: 1; }
  .search { grid-column: 1/-1; width: 100%; margin: 0; }
  #main { padding-top: 15px; }
  .hero { min-height: 335px; }
  .hero:after { background: linear-gradient(90deg,#10171df5,#10171d79 70%,#10171d4a); }
  .hero-content { padding: 29px 20px; }
  .hero-note { font-size: 7px; right: 10px; bottom: 8px; }
  .topics { margin-block: 17px; }
  .card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .topic-card { min-height: 135px; padding: 10px; gap: 6px; }
  .topic-card h3 { font-size: 16px; }
  .topic-card p { font-size: 11px; }
  .topic-card span { display: none; }
  .watch:has(aside) { grid-template-columns: 1fr; }
  .panel { padding: 15px; }
  .connection { flex-wrap: wrap; }
  .fields { grid-template-columns: 1fr; gap: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
