:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --ink: #172033;
  --muted: #667085;
  --faint: #98a2b3;
  --line: #e5e9f0;
  --blue: #1769e0;
  --blue-soft: #eaf2ff;
  --green: #16805b;
  --green-soft: #e8f7f0;
  --amber: #a15c00;
  --red: #c43232;
  --shadow: 0 12px 32px rgb(16 24 40 / 0.06);
  --shell: 1240px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--bg); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, a { touch-action: manipulation; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid rgb(23 105 224 / 0.28); outline-offset: 3px; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 100; padding: 10px 14px; color: #fff; background: var(--ink); border-radius: 8px; transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
.topbar { position: sticky; top: 0; z-index: 20; background: rgb(245 247 251 / 0.9); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
.topbar-inner { width: min(calc(100% - 40px), var(--shell)); min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 0 auto; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; color: #fff; background: var(--ink); border-radius: 11px; font-size: 12px; font-weight: 800; letter-spacing: 0.05em; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 14px; letter-spacing: -0.01em; }
.brand small { color: var(--muted); font-size: 11px; }
.topbar-actions { display: flex; align-items: center; gap: 18px; }
.sync-state { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.status-dot { width: 7px; height: 7px; display: inline-block; background: var(--faint); border-radius: 50%; }
.sync-state.is-ok .status-dot { background: var(--green); }
.sync-state.is-loading .status-dot { background: var(--blue); }
.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 16px; border: 1px solid transparent; border-radius: 9px; font-size: 13px; font-weight: 700; text-decoration: none; }
.button-primary { color: #fff; background: var(--blue); box-shadow: 0 2px 5px rgb(23 105 224 / 0.2); }
.button-primary:hover { background: #0f57c3; }
.button-primary:disabled { opacity: 0.55; cursor: wait; }
.button-quiet { color: var(--ink); background: var(--surface); border-color: var(--line); }
.button-quiet:hover { border-color: #b7c0cf; background: var(--surface-soft); }
.auth-shell { width: min(calc(100% - 40px), 480px); margin: 0 auto; padding: 88px 0 120px; }
.auth-card { padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.auth-card h1 { max-width: 390px; font-size: clamp(34px, 6vw, 48px); }
.auth-copy { margin: 14px 0 28px; color: var(--muted); font-size: 14px; }
.auth-form { display: grid; gap: 9px; }
.auth-form label { margin-top: 7px; color: var(--ink); font-size: 13px; font-weight: 700; }
.auth-form input { width: 100%; min-height: 46px; padding: 0 13px; color: var(--ink); background: var(--surface); border: 1px solid #cbd3df; border-radius: 9px; font: inherit; font-size: 14px; }
.auth-form input::placeholder { color: var(--faint); }
.auth-form input:focus { border-color: var(--blue); outline: 3px solid rgb(23 105 224 / 0.16); outline-offset: 0; }
.password-field { position: relative; display: flex; align-items: center; }
.password-field input { padding-right: 82px; }
.password-toggle { position: absolute; right: 5px; min-height: 36px; padding: 0 10px; color: var(--blue); background: transparent; border: 0; border-radius: 7px; font-size: 12px; font-weight: 750; }
.password-toggle:hover { background: var(--blue-soft); }
.auth-submit { width: 100%; margin-top: 16px; }
.text-button { justify-self: center; padding: 8px 10px; color: var(--blue); background: transparent; border: 0; border-radius: 7px; font-size: 12px; font-weight: 700; }
.text-button:hover { background: var(--blue-soft); }
.auth-message { margin: 6px 0 0; padding: 11px 12px; color: var(--red); background: #fff1f1; border: 1px solid #f3cccc; border-radius: 8px; font-size: 12px; }
.auth-message.is-ok { color: var(--green); background: var(--green-soft); border-color: #c7ebdc; }
.page-shell { width: min(calc(100% - 40px), var(--shell)); margin: 0 auto; padding: 64px 0 72px; }
.intro-row { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 30px; }
.eyebrow { margin: 0 0 8px; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: 0.09em; line-height: 1.2; text-transform: uppercase; }
h1, h2, p { text-wrap: balance; }
h1 { max-width: 650px; margin: 0; font-size: clamp(34px, 4vw, 56px); letter-spacing: -0.055em; line-height: 1.02; }
h2 { margin: 0; font-size: 20px; letter-spacing: -0.025em; line-height: 1.2; }
.intro-copy { max-width: 620px; margin: 16px 0 0; color: var(--muted); font-size: 16px; }
.account-health { min-width: 260px; display: flex; align-items: center; gap: 12px; padding: 15px 16px; background: var(--green-soft); border: 1px solid #c7ebdc; border-radius: 12px; }
.health-icon { display: grid; place-items: center; width: 28px; height: 28px; color: #fff; background: var(--green); border-radius: 50%; font-size: 15px; font-weight: 800; }
.account-health strong, .account-health small { display: block; }
.account-health strong { color: #116245; font-size: 13px; }
.account-health small { margin-top: 2px; color: #4b806b; font-size: 11px; }
.profile-strip { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.profile-main { min-width: 0; display: flex; align-items: center; gap: 14px; }
.avatar { width: 56px; height: 56px; object-fit: cover; background: var(--blue-soft); border: 1px solid var(--line); border-radius: 50%; }
.profile-main h2 { margin-top: 1px; }
.profile-bio { max-width: 750px; overflow: hidden; margin: 5px 0 0; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.metric-card { padding: 18px 18px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.metric-card-accent { background: var(--blue-soft); border-color: #d5e4ff; }
.metric-card span, .metric-card small { display: block; }
.metric-card span { color: var(--muted); font-size: 12px; font-weight: 650; }
.metric-card strong { display: block; margin-top: 7px; font-size: 30px; font-variant-numeric: tabular-nums; letter-spacing: -0.04em; line-height: 1; }
.metric-card small { margin-top: 8px; color: var(--faint); font-size: 11px; }
.highlight-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.highlight-card { min-width: 0; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.highlight-card span, .highlight-card small { display: block; }
.highlight-card span { color: var(--blue); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.highlight-card strong { display: block; overflow: hidden; margin-top: 8px; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.highlight-card small { overflow: hidden; margin-top: 5px; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.8fr); gap: 16px; margin-top: 16px; }
.side-column { display: grid; align-content: start; gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.panel-videos { min-width: 0; padding: 22px; }
.panel-header { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.panel-note { color: var(--faint); font-size: 11px; text-align: right; }
.video-tools { display: grid; grid-template-columns: minmax(180px, 0.7fr) minmax(240px, 1.3fr); gap: 12px; margin-top: 20px; }
.video-tools label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 700; }
.video-tools select, .video-tools input { width: 100%; min-height: 42px; padding: 0 11px; color: var(--ink); background: var(--surface); border: 1px solid #cbd3df; border-radius: 8px; font: inherit; font-size: 13px; }
.video-tools select:focus, .video-tools input:focus { border-color: var(--blue); outline: 3px solid rgb(23 105 224 / 0.16); outline-offset: 0; }
.video-list { margin-top: 19px; border-top: 1px solid var(--line); }
.video-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.video-cover { width: 72px; height: 86px; object-fit: cover; background: #e9eef7; border-radius: 8px; }
.video-copy { min-width: 0; }
.video-title { display: -webkit-box; overflow: hidden; margin: 0; color: var(--ink); font-size: 13px; font-weight: 700; line-height: 1.3; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.video-date { margin: 5px 0 0; color: var(--faint); font-size: 11px; }
.video-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.video-stats strong { color: var(--ink); }
.video-signal { min-width: 116px; padding: 8px 10px; border-radius: 8px; text-align: right; }
.video-signal.blue { color: var(--blue); background: var(--blue-soft); }
.video-signal.green { color: var(--green); background: var(--green-soft); }
.video-signal.neutral { color: var(--muted); background: var(--surface-soft); }
.video-signal strong, .video-signal small { display: block; }
.video-signal strong { font-size: 11px; line-height: 1.25; }
.video-signal small { margin-top: 2px; font-size: 10px; line-height: 1.2; }
.video-link { display: inline-block; margin-top: 8px; color: var(--blue); font-size: 11px; font-weight: 700; text-decoration: none; }
.video-link:hover { text-decoration: underline; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; color: var(--muted); font-size: 12px; }
.pagination .button { min-height: 38px; padding: 0 12px; font-size: 12px; }
.pagination .button:disabled { cursor: not-allowed; opacity: 0.45; }
.loading-row { padding: 22px 0; color: var(--muted); font-size: 13px; }
.insight-panel, .scope-panel, .explanation-panel, .jev-panel { padding: 22px; }
.insight-panel > p:not(.eyebrow) { margin: 12px 0 20px; color: var(--muted); font-size: 13px; }
.insight-rule { display: grid; grid-template-columns: 28px 1fr; column-gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.insight-rule span { grid-row: span 2; color: var(--blue); font-size: 11px; font-weight: 800; }
.insight-rule strong { font-size: 13px; }
.insight-rule small { color: var(--muted); font-size: 11px; }
.scope-list { display: grid; gap: 9px; margin: 16px 0; padding: 0; list-style: none; color: var(--muted); font-size: 12px; }
.scope-list li { display: flex; align-items: center; gap: 8px; }
.scope-list li::before { content: "✓"; color: var(--green); font-weight: 800; }
.explanation-item { padding: 12px 0; border-top: 1px solid var(--line); }
.explanation-item:first-of-type { margin-top: 16px; }
.explanation-item strong, .explanation-item small { display: block; }
.explanation-item strong { font-size: 13px; }
.explanation-item small { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.jev-panel > p:not(.eyebrow) { margin: 12px 0 14px; color: var(--muted); font-size: 13px; }
.jev-cost { margin-bottom: 14px; padding: 11px 12px; color: var(--ink); background: var(--blue-soft); border: 1px solid #d5e4ff; border-radius: 8px; font-size: 12px; line-height: 1.4; }
.jev-panel .button { width: 100%; }
.jev-result { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.45; }
.jev-result strong { display: block; color: var(--ink); }
.jev-result p { margin: 8px 0 0; }
.muted-note { margin: 0; padding-top: 13px; color: var(--faint); border-top: 1px solid var(--line); font-size: 11px; }
.error-state { padding: 18px 0; color: var(--red); font-size: 13px; }
.footer { width: min(calc(100% - 40px), var(--shell)); display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 auto; padding: 22px 0 34px; color: var(--faint); border-top: 1px solid var(--line); font-size: 11px; }
.footer span, .footer small { display: block; }
.footer span { color: var(--muted); font-weight: 700; }
.footer small { margin-top: 3px; }
@media (max-width: 900px) { .intro-row, .panel-header { align-items: start; flex-direction: column; } .account-health { width: 100%; } .content-grid { grid-template-columns: 1fr; } .side-column { grid-template-columns: repeat(2, minmax(0, 1fr)); } .panel-note { text-align: left; } .highlight-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .topbar-inner, .page-shell, .footer { width: min(calc(100% - 24px), var(--shell)); } .topbar-inner { min-height: 68px; } .topbar-actions { gap: 0; } .sync-state { display: none; } .button { min-height: 44px; } .auth-shell { width: min(calc(100% - 24px), 480px); padding-top: 46px; } .auth-card { padding: 24px 20px; } .page-shell { padding-top: 38px; } h1 { font-size: 38px; } .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .highlight-grid { grid-template-columns: 1fr; } .profile-strip { align-items: start; flex-direction: column; } .profile-strip .button { width: 100%; } .profile-bio { white-space: normal; } .side-column { grid-template-columns: 1fr; } .video-tools { grid-template-columns: 1fr; } .video-row { grid-template-columns: 58px minmax(0, 1fr); } .video-cover { width: 58px; height: 72px; } .video-signal { grid-column: 2; min-width: 0; padding: 7px 9px; text-align: left; } .footer { align-items: start; flex-direction: column; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; } }

