@font-face {
  font-family: Manrope;
  src: url('/static/fonts/manrope-latin-cyrillic-variable.woff2') format('woff2');
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: Murs;
  src: url('/static/fonts/murs-gothic-wide-dark.woff2') format('woff2');
  font-style: normal;
  font-weight: 900;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --bg: #121413;
  --panel: #1a1d1b;
  --raised: #202421;
  --lower: #151816;
  --text: #f4f6f2;
  --muted: #aab1aa;
  --quiet: #858e86;
  --line: #343b35;
  --focus: #cefd33;
  --on-focus: #151909;
  --danger: #ffa599;
  --radius: 12px;
  --display: Murs, Manrope, system-ui, sans-serif;
  font: 15px/1.55 Manrope, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
[id] { scroll-margin-top: 18px; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
svg { flex: 0 0 auto; vertical-align: middle; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
::selection { color: var(--on-focus); background: var(--focus); }
h1, h2, h3, p { margin: 0; }
h2 { font-size: 1.17rem; line-height: 1.3; font-weight: 800; }
h3 { font-size: 1rem; line-height: 1.35; font-weight: 800; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; z-index: 10; top: 10px; left: 10px; padding: 10px 18px; color: var(--on-focus); background: var(--focus); }
.accent { color: var(--focus); }
.muted { color: var(--muted); font-size: .87rem; }
.multiline { white-space: pre-wrap; overflow-wrap: anywhere; }

.app-shell { display: grid; grid-template-columns: 238px minmax(0,1fr); min-height: 100dvh; }
.sidebar { display: flex; flex-direction: column; align-self: start; position: sticky; top: 0; min-height: 100dvh; padding: 29px 16px 17px; background: #161917; border-right: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: .02em; line-height: 1; }
.sidebar .brand { margin: 0 8px 43px; }
.brand-mark { color: var(--focus); font: 900 1.78rem/1 var(--display); white-space: nowrap; letter-spacing: -.1em; padding-right: 3px; }
.brand-sub { display: block; margin-top: 5px; font-size: .67rem; color: var(--muted); letter-spacing: .18em; }
.navigation { display: grid; gap: 5px; }
.navigation a { display: flex; align-items: center; gap: 11px; min-height: 44px; padding: 8px 10px; border: 1px solid transparent; border-radius: 7px; color: var(--muted); font-size: .88rem; font-weight: 700; }
.navigation a:hover { color: var(--text); background: var(--raised); }
.navigation a[aria-current] { color: var(--focus); background: #242b1b; border-color: #45532c; }
.sidebar-bottom { margin-top: auto; padding-top: 24px; }
.profile { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 8px; text-align: left; color: var(--text); border: 1px solid var(--line); border-radius: 8px; background: var(--panel); font-size: .8rem; font-weight: 800; }
.profile:hover { border-color: var(--quiet); }
.profile small { display: block; color: var(--muted); font-size: .68rem; font-weight: 600; }
.profile svg:last-child { margin-left: auto; color: var(--muted); }
.profile-icon { display: grid; place-items: center; width: 34px; height: 34px; color: var(--focus); background: #2b351e; border-radius: 6px; flex: 0 0 auto; }
.profile-mobile { display: none; }
.topbar { min-height: 72px; border-bottom: 1px solid var(--line); display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 12px clamp(20px,3.3vw,52px); }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; font-size: .81rem; color: var(--muted); }
.breadcrumbs strong { color: var(--text); font-weight: 800; }
.crumb-divider { color: var(--quiet); }
.page { width: 100%; max-width: 1610px; min-width: 0; margin-inline: auto; padding: 32px clamp(20px,3.3vw,52px) 54px; display: grid; gap: 23px; align-content: start; }

.button { min-height: 42px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; border: 1px solid transparent; border-radius: 7px; padding: 9px 14px; font-size: .84rem; font-weight: 800; line-height: 1.3; text-align: center; }
.button-small { min-height: 37px; padding: 8px 12px; }
.button-full { width: 100%; }
.button-accent { color: var(--on-focus); border-color: var(--focus); background: var(--focus); }
.button-accent:hover { background: #ddff78; border-color: #ddff78; }
.button-ghost { color: var(--text); border-color: #505a50; background: var(--lower); }
.button-ghost:hover { background: var(--raised); border-color: var(--muted); }
.text-link { display: inline-flex; align-items: center; gap: 5px; color: var(--focus); font-size: .82rem; line-height: 1.4; font-weight: 800; }
.text-link:hover, .reference-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.section-title { display: flex; justify-content: space-between; align-items: end; gap: 20px; padding: 4px 0 10px; }
.section-title h1, .dashboard-hero h1, .login-wordmark { font: 900 clamp(2.15rem,4.5vw,4.35rem)/1.06 var(--display); letter-spacing: -.055em; }
.section-title h1 { overflow-wrap: anywhere; }
.section-title p { margin-top: 11px; color: var(--muted); }

.dashboard-hero, .login-graphic {
  background-color: #1a1e1a;
  background-image: radial-gradient(ellipse at 96% 95%, rgba(166,232,44,.15), transparent 53%), linear-gradient(rgba(181,210,151,.065) 1px,transparent 1px), linear-gradient(90deg,rgba(181,210,151,.065) 1px,transparent 1px);
  background-size: auto, 22px 22px, 22px 22px;
}
.dashboard-hero { position: relative; display: grid; grid-template-columns: minmax(0,1fr) minmax(150px,auto); min-height: 280px; gap: 16px; padding: clamp(25px,3.2vw,49px); border-radius: 15px; border: 1px solid #414a3b; overflow: hidden; isolation: isolate; }
.dashboard-hero::before { content: ''; position: absolute; width: 4px; height: 34px; left: 0; top: 34px; background: var(--focus); }
.dashboard-hero h1 { font-size: clamp(2.5rem,5.5vw,6rem); line-height: .98; position: relative; }
.hero-main { display: grid; gap: 16px; align-content: center; }
.kicker { color: #cbd6c5; font-size: .73rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.kicker i, .status i, .connection-status i, .cal-item i { display: inline-block; width: 7px; height: 7px; margin-right: 3px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.kicker i { color: var(--focus); margin-right: 8px; }
.hero-desc { max-width: 400px; color: #b9c4b7; }
.hero-side { align-self: end; position: relative; z-index: 0; }
.hero-index { display: block; position: absolute; z-index: -1; right: -.2ch; bottom: 88%; font: 900 clamp(5rem,12vw,11rem)/1 var(--display); letter-spacing: -.1em; color: transparent; -webkit-text-stroke: 1px #799045; opacity: .76; user-select: none; }
.hero-actions { display: grid; gap: 8px; }

.metrics { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 11px; }
.metric { display: grid; min-width: 0; min-height: 122px; grid-template-columns: 1fr auto; align-content: space-between; padding: 14px; gap: 5px; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; }
a.metric:hover { border-color: var(--quiet); background: var(--raised); }
.metric-symbol { grid-column: 2; grid-row: 1; color: var(--focus); }
.metric strong { grid-column: 1; grid-row: 1; font-size: clamp(1.55rem,2.4vw,2.2rem); line-height: 1.05; font-weight: 800; }
.metric > span:last-child { grid-column: 1 / -1; color: var(--muted); font-size: .79rem; font-weight: 700; overflow-wrap: anywhere; }
.analytics-metrics { grid-template-columns: repeat(4,minmax(0,1fr)); }
.grid, .column { display: grid; gap: 16px; align-content: start; align-items: start; min-width: 0; }
.grid-2 { grid-template-columns: repeat(2,minmax(0,1fr)); }
.grid-wide { grid-template-columns: minmax(0,1.72fr) minmax(270px,1fr); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.panel:target { border-color: var(--focus); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 62px; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.panel-body { padding: 17px 18px; }
.panel h2 { overflow-wrap: anywhere; }
.subtle-count { font: 700 .76rem/1.2 Manrope, system-ui, sans-serif; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 3px 6px; vertical-align: middle; }
.empty { display: grid; justify-items: center; align-content: center; text-align: center; min-height: 188px; gap: 8px; padding: 24px 16px; }
.empty p { max-width: 295px; color: var(--muted); font-size: .84rem; }
.empty-icon, .row-icon { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid #48543c; border-radius: 8px; background: #262f21; color: var(--focus); flex: 0 0 auto; }
.empty-icon { width: 42px; height: 42px; margin-bottom: 2px; }
.item-list { list-style: none; padding: 0; margin: 0; }
.item-list > li + li { border-top: 1px solid var(--line); }
.item-row { min-height: 66px; display: flex; align-items: center; gap: 11px; padding: 11px 16px; min-width: 0; }
a.item-row:hover { background: var(--raised); }
.item-list > li:last-child a.item-row { border-radius: 0 0 var(--radius) var(--radius); }
.row-main { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.row-main strong, .row-main .reference-link { font-weight: 800; }
.row-main small { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); }
.row-main p { margin-top: 5px; color: var(--muted); font-size: .83rem; }
.row-main .text-link { margin-top: 5px; }
.item-row time { flex: 0 0 auto; font-size: .76rem; color: var(--muted); }
.item-row > svg:last-child { color: var(--quiet); }
.research-row > .text-link { flex: 0 0 auto; }
.reference-link { color: var(--text); }
.reference-link svg { color: var(--focus); }
.status, .kind, .connection-status { display: inline-flex; align-items: center; gap: 5px; width: fit-content; padding: 4px 7px; border-radius: 5px; font-size: .72rem; line-height: 1.3; font-weight: 800; color: var(--muted); border: 1px solid #464f47; background: #242a25; }
.status i, .connection-status i { width: 6px; height: 6px; }
.status-review { color: #ffd394; background: #3b2d1d; border-color: #5b472c; }
.status-approved, .status-published, .connection-active { color: #d5f9ad; background: #2c3924; border-color: #4b613c; }
.status-scheduled, .status-planned, .status-production, .status-script { color: #cfddfb; background: #263042; border-color: #40506d; }
.status-error, .event-error { color: var(--danger); background: #3e2824; border-color: #65403a; }

.stack { display: grid; gap: 13px; }
label { display: grid; gap: 6px; font-size: .84rem; font-weight: 800; color: var(--text); }
label small { font-weight: 600; color: var(--muted); }
input:not([type='hidden']), select, textarea { display: block; width: 100%; min-width: 0; min-height: 42px; padding: 9px 10px; color: var(--text); background: #121513; border: 1px solid #465047; border-radius: 7px; font-size: .9rem; font-weight: 600; }
input::placeholder, textarea::placeholder { color: var(--quiet); opacity: 1; }
textarea { resize: vertical; }
input[type='file'] { font-size: .78rem; }
input[type='file']::file-selector-button { color: var(--text); border: 1px solid #4e5a4c; background: var(--raised); margin-right: 7px; padding: 5px 7px; border-radius: 5px; font: inherit; cursor: pointer; }
.filters { display: grid; grid-template-columns: minmax(95px,1.2fr) minmax(96px,1fr) minmax(96px,1fr) auto; gap: 8px; padding: 12px; border-bottom: 1px solid var(--line); }
.panel-disclosure { padding: 12px 18px; border-top: 1px solid var(--line); }
.panel-disclosure summary { display: flex; gap: 5px; align-items: center; min-height: 35px; color: var(--focus); font-size: .86rem; font-weight: 800; cursor: pointer; list-style: none; }
.panel-disclosure summary::-webkit-details-marker { display: none; }
.panel-disclosure[open] summary svg { transform: rotate(45deg); }
.panel-disclosure form { margin-block: 12px 5px; }
.message { display: flex; align-items: start; gap: 11px; padding: 12px 14px; border-radius: 7px; font-weight: 700; overflow-wrap: anywhere; }
.message-error { color: #ffd7d0; background: #422c27; border: 1px solid #86544a; }
.message-success { color: #e2fadb; background: #283927; border: 1px solid #567651; }

.back-link { width: fit-content; }
.detail-title { margin-top: -7px; }
.detail-title h1 { font-size: clamp(1.95rem,3.85vw,3.45rem); }
.material-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.prose-block { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .91rem; }
.editor { line-height: 1.75; min-height: 210px; }
.status-actions, .form-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.attachment-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.attachment { min-width: 0; display: grid; align-content: start; gap: 10px; padding: 11px; border-radius: 9px; border: 1px solid var(--line); }
.attachment img, .attachment video, .attachment-empty { display: block; width: 100%; aspect-ratio: 4/3; border-radius: 5px; background: #101210; object-fit: contain; }
.attachment-empty { display: grid; place-items: center; padding: 4px; font-size: .76rem; color: var(--muted); text-align: center; }
.attachment-empty svg { display: block; margin: 0 auto 6px; color: var(--quiet); }
.file-link { max-width: 100%; }
.file-link span { overflow-wrap: anywhere; min-width: 0; }
.version { padding: 11px 17px; }
.version + .version { border-top: 1px solid var(--line); }
.version summary { cursor: pointer; font-weight: 800; padding-block: 5px; }
.version time { margin-left: 9px; color: var(--muted); font-size: .73rem; font-weight: 600; }
.version[open] .prose-block { padding: 10px 11px; margin-top: 8px; background: var(--lower); border-radius: 6px; }

.calendar-nav { display: flex; gap: 6px; }
.calendar-nav .button { min-height: 37px; }
.icon-button { width: 37px; padding-inline: 5px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); }
.weekday, .cal-day { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.weekday:nth-child(7n), .cal-day:nth-child(7n) { border-right: 0; }
.weekday { padding: 8px; text-align: center; color: var(--muted); font-size: .75rem; font-weight: 800; }
.cal-day { display: grid; align-content: start; justify-items: start; gap: 4px; padding: 6px; min-width: 0; min-height: 74px; }
.cal-day:nth-last-child(-n+7) { border-bottom: 0; }
.cal-out { background: #171a17; color: var(--quiet); }
.day-number { display: grid; place-items: center; min-width: 23px; height: 23px; font-size: .76rem; font-weight: 800; }
.cal-today .day-number { color: var(--on-focus); background: var(--focus); border-radius: 5px; }
.cal-item { display: flex; align-items: center; gap: 5px; min-width: 0; max-width: 100%; border-radius: 4px; padding: 3px 5px; background: #2b3523; color: #e0edc5; font-size: .73rem; line-height: 1.2; font-weight: 700; }
.cal-item:hover { background: #39472e; }
.cal-item i { width: 6px; height: 6px; color: var(--focus); }
.cal-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.integration-card .panel-head { justify-content: start; }
.integration-card .connection-status { margin-left: auto; }
.integration-card .panel-body p { margin-block: 8px 14px; color: var(--muted); }
.setting-list { margin: 0; }
.setting-list > div { display: flex; justify-content: space-between; gap: 8px; padding-block: 8px; }
.setting-list > div + div { border-top: 1px solid var(--line); }
.setting-list dt { color: var(--muted); }
.setting-list dd { margin: 0; text-align: right; font-weight: 800; }

.login { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,1fr); min-height: 100dvh; }
.login-graphic { display: flex; flex-direction: column; justify-content: center; gap: 24px; min-width: 0; padding: clamp(27px,6vw,95px); border-right: 1px solid #424d3e; }
.login-graphic .brand { padding-bottom: 15px; border-bottom: 1px solid #4a5842; }
.login-wordmark { font-size: clamp(2.7rem,6.6vw,6.5rem); line-height: .91; }
.login-wordmark > span { display: block; }
.login-graphic p { color: #c6d1c4; }
.login-entry { display: grid; place-items: center; padding: 28px; }
.login-card { display: grid; gap: 16px; width: min(100%,400px); padding: clamp(20px,3vw,36px); border: 1px solid var(--line); border-radius: 13px; background: var(--panel); }
.login-card h1 { font-size: clamp(1.4rem,2vw,2rem); line-height: 1.15; font-weight: 800; }

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 194px minmax(0,1fr); }
  .sidebar { padding-inline: 12px; }
  .grid-wide { grid-template-columns: minmax(0,1.35fr) minmax(250px,1fr); }
  .filters { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .research-row { align-items: start; flex-wrap: wrap; }
  .research-row .row-main { flex-basis: 70%; }
  .research-row .text-link { margin-left: 47px; }
}
@media (max-width: 860px) {
  .app-shell { display: block; }
  .sidebar { position: static; min-height: 0; padding: 12px 16px; display: grid; grid-template-columns: 1fr auto; gap: 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .brand { margin: 0; width: fit-content; }
  .sidebar-bottom { padding-top: 0; grid-column: 2; grid-row: 1; }
  .profile { width: auto; min-height: 42px; padding: 7px 9px; }
  .profile-icon, .profile-desktop { display: none; }
  .profile-mobile { display: inline; }
  .profile svg:last-child { margin-left: 0; }
  .navigation { grid-column: 1 / -1; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 4px; }
  .navigation a { min-height: 39px; gap: 5px; padding: 4px 5px; font-size: .73rem; }
  .navigation a svg { width: 16px; height: 16px; }
  .topbar { min-height: 55px; padding: 8px 16px; }
  .page { padding: 21px 16px 35px; gap: 16px; }
}
@media (max-width: 620px) {
  .grid-2, .grid-wide { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .section-title { align-items: start; flex-direction: column; gap: 11px; padding-bottom: 2px; }
  .section-title h1 { font-size: clamp(1.75rem,7.4vw,3rem); }
  .section-title p { margin-top: 7px; font-size: .9rem; }
  .dashboard-hero { min-height: 0; grid-template-columns: minmax(0,1fr); padding: 22px 16px; gap: 18px; }
  .dashboard-hero h1 { font-size: clamp(2rem,8.75vw,4.5rem); }
  .hero-main { gap: 9px; }
  .hero-desc { max-width: 270px; font-size: .83rem; }
  .hero-index { right: 0; bottom: 0; font-size: clamp(4.35rem,18vw,7rem); opacity: .36; }
  .hero-actions { display: flex; flex-wrap: wrap; }
  .hero-actions .button { position: relative; }
  .metrics, .analytics-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
  .metric { min-height: 80px; padding: 10px; }
  .metric > span:last-child { font-size: .74rem; }
  .item-row { flex-wrap: wrap; gap: 7px; padding: 9px 12px; }
  .item-row time { min-width: 70px; }
  .item-row > svg:last-child { display: none; }
  .panel-head { min-height: 52px; padding: 10px 12px; }
  .panel-body { padding: 13px 12px; }
  .filters { padding: 10px; }
  .breadcrumbs > span { display: none; }
  .version time { margin-left: 5px; }
  .cal-day { min-height: 58px; padding: 4px; }
  .cal-item { gap: 3px; padding-inline: 3px; }
  .calendar-nav { gap: 4px; }
  .calendar-nav .button { min-height: 34px; padding: 5px; }
  .icon-button { width: 32px; }
  .login { display: flex; flex-direction: column; }
  .login-graphic { padding: 23px 19px; gap: 12px; border-right: 0; border-bottom: 1px solid #424d3e; }
  .login-wordmark { font-size: clamp(2.3rem,9.8vw,4.2rem); }
  .login-entry { padding: 20px 16px; }
  .login-card { margin-bottom: 12px; }
  input:not([type='hidden']), select, textarea { font-size: 16px; }
}
@media (max-width: 500px) {
  .navigation a { justify-content: center; flex-direction: column; min-height: 45px; gap: 4px; font-size: .657rem; padding: 3px 0; }
}
@media (max-width: 410px) {
  .attachment-grid { grid-template-columns: 1fr; }
  .hero-actions .button { padding-inline: 9px; }
}
