/* Видеотека — оформление в духе НИУ ВШЭ: белый лист, синий #0050cf, квадратный знак-маркер. */

@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 400 900; font-display: swap; src: url(fonts/GolosText-400-900-cyrillic-ext.woff2) format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 400 900; font-display: swap; src: url(fonts/GolosText-400-900-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 400 900; font-display: swap; src: url(fonts/GolosText-400-900-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 400 900; font-display: swap; src: url(fonts/GolosText-400-900-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/IBMPlexMono-400-cyrillic-ext.woff2) format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/IBMPlexMono-400-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/IBMPlexMono-400-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/IBMPlexMono-400-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/IBMPlexMono-500-cyrillic-ext.woff2) format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/IBMPlexMono-500-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/IBMPlexMono-500-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/IBMPlexMono-500-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --blue: #0050cf;
  --blue-dark: #0041a8;
  --blue-soft: #e5eefc;
  --navy: #002d6e;
  --navy-deep: #021437;
  --ink: #0f0f14;
  --slate: #6b7a99;
  --mist: #edeff3;
  --haze: #f6f7fa;
  --paper: #ffffff;
  --line: #d3d8e6;
  --amber: #e9a42a;
  --amber-soft: #fdf3dc;
  --green: #067b71;
  --green-soft: #e3f3f1;
  --red: #d2270b;
  --red-soft: #fde9e5;
  --sans: "Golos Text", "HSE Sans", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --r: 4px;
  --wrap: 1120px;
  --focus: 0 0 0 3px rgba(0, 80, 207, .35);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--sans); font-feature-settings: "kern"; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r); }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.015em; }
h1 { font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.5rem); font-weight: 800; letter-spacing: -.025em; }
h2 { font-size: 1.35rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 .9em; }
code { font-family: var(--mono); font-size: .9em; background: var(--mist); padding: .1em .35em; border-radius: 3px; }
.mono { font-family: var(--mono); font-weight: 500; font-size: .82rem; letter-spacing: .01em; }
.muted { color: var(--slate); }
.hint { color: var(--slate); font-size: .88rem; }
.eyebrow { display: block; font-size: .74rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--slate); margin-bottom: 12px; }
.eyebrow::before { content: ""; display: inline-block; width: 8px; height: 8px; background: var(--blue); margin-right: 8px; vertical-align: 1px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.center { text-align: center; }
.inline { display: inline; margin: 0; }
.nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- шапка зрителя ---------- */
.top { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top-inner { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); min-width: 0; }
.brand:hover { text-decoration: none; }
.brand-mark { flex: none; width: 34px; height: 34px; background: var(--blue); display: grid; place-items: center; }
.brand-mark svg { width: 16px; height: 16px; fill: #fff; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 800; letter-spacing: -.02em; font-size: 1.1rem; }
.brand-sub { font-size: .72rem; color: var(--slate); font-weight: 500; letter-spacing: .02em; }
.search { flex: 1; max-width: 420px; margin-left: auto; position: relative; }
.search input[type=search] { width: 100%; margin: 0; padding: 9px 12px 9px 38px; border: 1px solid var(--line); border-radius: var(--r); background: var(--haze); font: inherit; font-size: .95rem; }
.search input[type=search]:focus { background: #fff; border-color: var(--blue); box-shadow: none; }
.search svg { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); fill: none; stroke: var(--slate); stroke-width: 2; }
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav a, .nav button { color: var(--ink); font: inherit; font-size: .95rem; padding: 7px 10px; border-radius: var(--r); background: none; border: 0; cursor: pointer; }
.nav a:hover, .nav button:hover { background: var(--mist); text-decoration: none; }
.nav .nav-admin { color: var(--blue); font-weight: 600; }
.main { padding: 28px 0 56px; min-height: 60vh; }
.foot { border-top: 1px solid var(--line); padding: 18px 0 32px; color: var(--slate); font-size: .85rem; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- сообщения ---------- */
.flash { padding: 12px 16px; border-left: 4px solid var(--blue); background: var(--blue-soft); margin: 0 0 20px; border-radius: 0 var(--r) var(--r) 0; }
.flash-err { border-color: var(--red); background: var(--red-soft); }
.flash-ok { border-color: var(--green); background: var(--green-soft); }

/* ---------- кнопки, значки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; font-size: .95rem; font-weight: 600; cursor: pointer; line-height: 1.2; white-space: nowrap; }
.btn:hover { background: var(--mist); text-decoration: none; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: var(--red-soft); border-color: #f2b8ad; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--mist); }
.btn-sm { padding: 6px 11px; font-size: .86rem; }
.btn-xs { padding: 3px 8px; font-size: .78rem; font-weight: 500; }
.btn-wide { width: 100%; }
.btn[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.badge { display: inline-block; font-size: .7rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; padding: 2px 7px; background: var(--mist); color: var(--slate); border-radius: 3px; vertical-align: middle; white-space: nowrap; }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-ok { background: var(--green-soft); color: var(--green); }
.badge-warn { background: var(--amber-soft); color: #9a6a10; }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-new { background: var(--blue); color: #fff; }

/* ---------- квадратный маркер прогресса ---------- */
.mark { position: relative; flex: none; width: 40px; height: 40px; background: var(--mist); color: var(--slate); display: grid; place-items: center; font-family: var(--mono); font-weight: 500; font-size: .85rem; overflow: hidden; }
.mark::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: var(--p, 0%); background: var(--amber); transition: height .35s ease; }
.mark > span { position: relative; }
.mark.is-done { background: var(--blue); color: #fff; }
.mark.is-done::before { display: none; }
.mark.is-done > span::before { content: "✓"; font-family: var(--sans); font-weight: 700; }
.mark.is-done > span { font-size: 0; }
.mark.is-done > span::before { font-size: 1rem; }
.mark-sm { width: 28px; height: 28px; font-size: .72rem; }
.mark-lg { width: 96px; height: 96px; font-size: 1.4rem; font-weight: 500; }
.mark-lg.is-done > span::before { font-size: 2rem; }

/* ---------- главная ---------- */
.hero { background: var(--navy); color: #fff; margin: 0 0 36px; padding: 24px 26px 26px; border-radius: var(--r); }
.hero .eyebrow { color: #a9bce0; }
.hero .eyebrow::before { background: var(--amber); }
.hero-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.cont { display: flex; gap: 18px; align-items: center; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); padding: 16px; color: #fff; min-width: 0; }
.cont:hover { background: rgba(255, 255, 255, .11); text-decoration: none; }
.cont .mark { background: rgba(255, 255, 255, .12); color: #fff; }
.cont-body { min-width: 0; flex: 1; }
.cont-title { font-weight: 700; font-size: 1.05rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cont-meta { color: #a9bce0; font-size: .86rem; margin-top: 6px; }
.cont-go { flex: none; color: #fff; border-color: rgba(255, 255, 255, .35); background: transparent; }
.cont-go:hover { background: var(--blue); border-color: var(--blue); }
.section + .section { margin-top: 40px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.tile { display: flex; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); background: var(--paper); min-width: 0; position: relative; }
.tile:hover { border-color: var(--blue); text-decoration: none; }
.tile-body { min-width: 0; }
.tile-title { font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.tile-meta { color: var(--slate); font-size: .86rem; margin-top: 4px; }
.tile-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--mist); }
.tile-bar i { display: block; height: 100%; width: var(--p, 0%); background: var(--blue); }
.hidden-item { opacity: .6; }
.empty { border: 1px dashed var(--line); padding: 36px 20px; text-align: center; color: var(--slate); border-radius: var(--r); }

/* ---------- список лекций ---------- */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; border-bottom: 1px solid var(--line); padding: 12px 6px 12px 0; }
.row-link { display: contents; color: inherit; }
.row:hover { background: var(--haze); }
.row-body { min-width: 0; }
.row-title { font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.row-title a { color: var(--ink); }
.row-title a::after { content: ""; position: absolute; inset: 0; }
.row { position: relative; }
.row-sub { color: var(--slate); font-size: .86rem; margin-top: 2px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row-data { text-align: right; color: var(--slate); display: flex; flex-direction: column; gap: 3px; align-items: flex-end; }
.row-thumb { width: 96px; aspect-ratio: 16/9; object-fit: cover; background: var(--mist); border-radius: 3px; display: block; }
.row-actions { position: relative; z-index: 1; display: flex; gap: 6px; }
.compact .row { padding: 8px 6px 8px 0; }

/* ---------- страница видео ---------- */
.crumbs { color: var(--slate); font-size: .88rem; margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crumbs a { color: var(--slate); }
.crumbs .sep { opacity: .5; }
.crumbs .cur { color: var(--ink); }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.lead { color: var(--ink); max-width: 760px; margin-bottom: 20px; }
.progress-line { display: flex; align-items: center; gap: 14px; margin: 6px 0 22px; color: var(--slate); font-size: .9rem; flex-wrap: wrap; }
.bar { flex: 1; min-width: 120px; max-width: 320px; height: 6px; background: var(--mist); border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; width: var(--p, 0%); background: var(--blue); }
.player { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; overflow: hidden; border-radius: var(--r); }
.player video, .player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #000; }
.player-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 10px; color: var(--slate); font-size: .86rem; }
.speed { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.speed button { border: 0; background: var(--paper); font: inherit; font-family: var(--mono); font-size: .8rem; padding: 5px 9px; cursor: pointer; color: var(--ink); }
.speed button + button { border-left: 1px solid var(--line); }
.speed button[aria-pressed="true"] { background: var(--blue); color: #fff; }
.keys { display: none; }
@media (hover: hover) and (min-width: 900px) { .keys { display: inline; } }
kbd { font-family: var(--mono); font-size: .75rem; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 3px; padding: 0 5px; background: var(--haze); }
.vtitle-h1 { font-size: clamp(1.35rem, 1.05rem + 1vw, 1.9rem); letter-spacing: -.02em; }
.vmeta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; color: var(--slate); margin: 14px 0 6px; font-size: .9rem; }
.vmeta .mono { color: var(--ink); }
.vbody { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; margin-top: 22px; align-items: start; }
.vbody .desc p { margin-bottom: .8em; }
.chapters { border: 1px solid var(--line); border-radius: var(--r); position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow: auto; }
.chapters ol { list-style: none; margin: 0; padding: 0; }
.chapters li a { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 9px 12px; color: var(--ink); border-top: 1px solid var(--line); font-size: .92rem; }
.chapters li:first-child a { border-top: 0; }
.chapters li a:hover { background: var(--haze); text-decoration: none; }
.chapters li.is-active a { background: var(--blue-soft); }
.chapters .mono { color: var(--blue); }
.materials { list-style: none; margin: 0; padding: 0; }
.materials li { padding: 8px 0; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: baseline; }
.materials li:first-child { border-top: 0; }
.materials li::before { content: "↗"; color: var(--blue); font-family: var(--mono); }
.ts { font-family: var(--mono); font-size: .88em; font-weight: 500; }
.pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; margin-top: 34px; border-top: 1px solid var(--line); padding-top: 18px; }
.pager a { color: var(--ink); font-weight: 600; min-width: 0; }
.pager .next { text-align: right; }
.pager .pos { color: var(--slate); font-size: .86rem; white-space: nowrap; }
.pager small { display: block; color: var(--slate); font-weight: 400; font-size: .8rem; }

/* ---------- формы ---------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 24px; }
.card + .card { margin-top: 16px; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
label { display: block; margin-bottom: 14px; font-weight: 600; font-size: .92rem; }
label .hint { font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=date], input[type=search], textarea, select {
  display: block; width: 100%; margin-top: 6px; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--r); font: inherit; background: var(--paper); color: var(--ink);
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--blue); box-shadow: var(--focus); }
textarea { resize: vertical; min-height: 90px; }
.check-label { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; }
.check-label input { margin: 4px 0 0; }
.form-actions { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.auth { max-width: 440px; margin: 24px auto 0; }
.auth h1 { margin-bottom: 6px; }
.auth .lead { margin-bottom: 20px; color: var(--slate); }
.auth-wide { max-width: 720px; }

/* ---------- таблицы ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.table thead th { border-top: 0; background: var(--haze); color: var(--slate); font-weight: 600; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.table td.num, .table th.num { text-align: right; font-family: var(--mono); font-size: .84rem; }
.cell-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.small-input { display: inline-block; width: 150px; margin: 0; padding: 4px 8px; font-size: .84rem; }

/* ---------- админка ---------- */
.adm { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.adm-side { background: var(--navy); color: #fff; padding: 22px 16px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 22px; }
.adm-side .brand { color: #fff; }
.adm-side .brand-sub { color: #a9bce0; }
.adm-side .brand-mark { background: #fff; }
.adm-side .brand-mark svg { fill: var(--navy); }
.adm-nav { display: flex; flex-direction: column; gap: 2px; }
.adm-nav a { display: flex; align-items: center; gap: 10px; color: #dfe7f5; padding: 9px 12px; border-radius: var(--r); font-size: .95rem; font-weight: 500; }
.adm-nav a:hover { background: rgba(255, 255, 255, .08); text-decoration: none; }
.adm-nav a.is-active { background: var(--blue); color: #fff; }
.adm-nav .count { margin-left: auto; font-family: var(--mono); font-size: .75rem; background: var(--amber); color: var(--navy-deep); padding: 1px 6px; border-radius: 3px; }
.adm-nav hr { border: 0; border-top: 1px solid rgba(255, 255, 255, .15); margin: 10px 0; }
.adm-foot { margin-top: auto; font-size: .82rem; color: #a9bce0; }
.adm-foot a { color: #fff; }
.adm-main { padding: 28px 36px 60px; min-width: 0; }
.adm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.adm-head h1 { font-size: 1.7rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 30px; }
.stat { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.stat b { display: block; font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.stat span { color: var(--slate); font-size: .84rem; }
.stat.warn b { color: #9a6a10; }
.stat.bad b { color: var(--red); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 16px; }
.filters label { margin: 0; font-size: .82rem; }
.filters input, .filters select { margin-top: 4px; padding: 7px 10px; font-size: .92rem; width: auto; min-width: 160px; }
.bulk { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; padding: 10px 12px; background: var(--haze); border: 1px solid var(--line); border-radius: var(--r); }
.bulk select { margin: 0; width: auto; padding: 6px 10px; }
.thumb { width: 72px; aspect-ratio: 16/9; object-fit: cover; background: var(--mist); border-radius: 3px; display: block; }
.thumb-empty { width: 72px; aspect-ratio: 16/9; background: var(--mist); border-radius: 3px; display: grid; place-items: center; color: var(--slate); font-size: .7rem; }
.dropzone { border: 2px dashed var(--line); border-radius: var(--r); padding: 44px 20px; text-align: center; color: var(--slate); background: var(--haze); cursor: pointer; transition: border-color .2s, background .2s; }
.dropzone.is-over { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }
.dropzone strong { color: var(--ink); display: block; font-size: 1.05rem; margin-bottom: 4px; }
.queue { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.queue li { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; }
.queue .q-name { font-weight: 600; overflow-wrap: anywhere; }
.queue .q-status { color: var(--slate); font-size: .86rem; font-family: var(--mono); }
.queue .bar { grid-column: 1 / -1; max-width: none; }
.queue .q-done .bar i { background: var(--green); }
.queue .q-error { border-color: #f2b8ad; }
.queue .q-error .q-status { color: var(--red); font-family: var(--sans); }
.tree { list-style: none; margin: 0; padding: 0; }
.tree li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tree li:hover { background: var(--haze); }
.tree .t-title { font-weight: 600; flex: 1; min-width: 0; }
.tree .t-title a { color: var(--ink); }
.tree .t-meta { color: var(--slate); font-size: .84rem; }
.mailbody { white-space: pre-wrap; font-size: .85rem; color: var(--slate); max-height: 80px; overflow: hidden; }
details summary { cursor: pointer; color: var(--blue); font-size: .88rem; }

@media (max-width: 960px) {
  .adm { grid-template-columns: 1fr; }
  .adm-side { position: static; height: auto; padding: 14px 16px; gap: 12px; }
  .adm-nav { flex-direction: row; flex-wrap: wrap; }
  .adm-nav hr { display: none; }
  .adm-foot { display: none; }
  .adm-main { padding: 20px 18px 50px; }
  .vbody { grid-template-columns: 1fr; }
  .chapters { position: static; max-height: none; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .top-inner { gap: 12px; }
  .brand-sub { display: none; }
  .search { max-width: none; order: 3; flex-basis: 100%; margin: 0 0 10px; }
  .top-inner { flex-wrap: wrap; padding-top: 10px; }
  .row { grid-template-columns: auto 1fr; }
  .row-data { grid-column: 2; flex-direction: row; gap: 10px; align-items: center; justify-content: flex-start; }
  .row-thumb { display: none; }
  .cont { flex-wrap: wrap; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { text-align: left; }
  .stats { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mark::before, .dropzone { transition: none; }
}
