:root {
    color-scheme: light;
    --bg: #f4f5f6;
    --white: #fff;
    --ink: #16171a;
    --muted: #5f6269;
    --line: #e3e5e8;
    --gold: #8b5e21;
    --gold-bg: #f9f1e2;
    --shadow: 0 2px 3px #15171804, 0 10px 28px #15171805;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.5; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(32px, 4.4vw, 48px); letter-spacing: -.06em; line-height: 1.08; }
h2 { font-size: 19px; line-height: 1.3; letter-spacing: -.035em; }
p + p { margin-top: 8px; }
small { display: block; }
small, .muted { color: var(--muted); }
a { color: var(--ink); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.sidebar {
    position: fixed; inset: 0 auto 0 0; width: 228px; z-index: 2;
    padding: 29px 17px 20px; display: flex; flex-direction: column;
    background: var(--white); border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 760; letter-spacing: -.025em; }
.brand-logo { display: block; width: 52px; height: 52px; flex-shrink: 0; object-fit: contain; border: 1px solid var(--line); border-radius: 11px; background: #fafafa; }
.brand small { font-size: 9px; letter-spacing: .11em; margin-top: 2px; }
.sidebar .brand { margin: 0 6px 34px; }
.sidebar nav { display: grid; gap: 5px; }
.sidebar nav a { padding: 10px 12px; border-radius: 8px; color: var(--muted); text-decoration: none; font-weight: 575; }
.sidebar nav a:hover { background: #f0f1f2; color: var(--ink); }
.sidebar nav .current, .sidebar nav .current:hover { background: #1b1c1f; color: var(--white); box-shadow: inset 3px 0 #c69a55; }
.sidebar > form { margin-top: auto; border-top: 1px solid var(--line); padding-top: 15px; }
.workspace { margin-left: 228px; max-width: 1730px; padding: 42px clamp(23px, 4.2vw, 68px); }
.top { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 29px; }
.eyebrow { color: var(--gold); font-size: 10px; font-weight: 775; letter-spacing: .15em; margin-bottom: 9px; }
.top-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.pill { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; background: #f6f6f7; font-size: 12px; font-weight: 650; white-space: nowrap; vertical-align: middle; }
.status { color: #76501d; background: var(--gold-bg); border-color: #ecd9b8; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #a8762f; }
.status-live { background: #e8f3ec; border-color: #cfdfd3; color: #27563b; }
.status-live::before { background: #347f51; }
.cards, .split, .stack, .overview-grid { display: grid; gap: 16px; margin-bottom: 16px; }
.cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { grid-template-columns: 1.06fr .94fr; align-items: start; }
.overview-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.card { min-width: 0; margin-bottom: 16px; padding: 23px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
:is(.cards,.split,.stack,.overview-grid) > .card { margin-bottom: 0; }
.card > h2 { margin-bottom: 13px; }
.card > p { margin-bottom: 12px; }
.metric { min-height: 127px; display: flex; flex-direction: column; justify-content: space-between; padding: 19px 21px; }
.metric p { margin: 0; color: var(--muted); font-weight: 570; }
.metric strong { font-size: clamp(28px, 3vw, 44px); line-height: 1; font-weight: 710; font-variant-numeric: tabular-nums; letter-spacing: -.07em; }
.panel-heading { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 23px; }
.panel-heading p { margin-top: 4px; font-size: 13px; }
.text-link { text-decoration: none; white-space: nowrap; font-size: 13px; font-weight: 660; }
.text-link:hover, .bar-row:hover > :first-child { text-decoration: underline; }
.bar-row { display: grid; grid-template-columns: 66px minmax(0,1fr) 34px; gap: 10px; align-items: center; padding: 11px 0; text-decoration: none; }
.bar-row strong { text-align: right; font-variant-numeric: tabular-nums; }
.bar-track { height: 12px; overflow: hidden; background: #eeeff1; border-radius: 5px; }
.bar-track span { display: block; height: 100%; background: linear-gradient(90deg, #ba8e50, #dbc39c); border-radius: inherit; }
.bar-row:nth-of-type(2) .bar-track span { background: linear-gradient(90deg, #27282b, #666971); }
.overview-panel .panel-note { margin: 15px 0 0; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.queue dl { margin: 0; }
.queue dl div { display: flex; align-items: center; justify-content: space-between; gap: 7px; padding: 7px 0; }
.queue dt { color: var(--muted); }
.queue dd { margin: 0; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.filters, .inline { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; }
.filters + form { margin-top: 15px; }
.filters label { flex: 1; min-width: 140px; }
.filters button { margin-bottom: 12px; }
label { display: block; font-weight: 650; font-size: 13px; margin-bottom: 12px; }
input, select, textarea { display: block; width: 100%; margin-top: 5px; padding: 9px 11px; border: 1px solid #d6d8de; border-radius: 8px; background: #fcfcfd; color: var(--ink); font: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid #a8793d; outline-offset: 1px; }
input[type=color] { min-height: 41px; padding: 4px; }
textarea { resize: vertical; }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 13px; background: #202124; color: var(--white); border: 1px solid transparent; border-radius: 8px; cursor: pointer; text-decoration: none; font: inherit; font-weight: 650; }
button:hover:not(:disabled), .button:hover { background: #383a40; }
.secondary, .quiet { color: var(--ink); background: #f1f2f4; border-color: #e7e8eb; }
.secondary:hover:not(:disabled), .quiet:hover:not(:disabled) { background: #e5e7eb; }
.quiet { padding: 6px 10px; }
.inline input:not([type=hidden]) { width: auto; max-width: 100%; margin: 0; }
button:disabled { opacity: .55; cursor: default; }
.notice { margin-bottom: 16px; padding: 12px 14px; border: 1px solid #e7d5b9; border-radius: 8px; background: var(--gold-bg); color: #654517; }
.login { width: min(100%, 440px); margin: 14vh auto 0; padding: 0 16px; }
.login .card { padding: 32px; }
.login h1 { margin: 26px 0 20px; font-size: 35px; }
.login button { width: 100%; margin-top: 5px; }
.table { overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { border-bottom: 1px solid var(--line); padding: 12px 10px; vertical-align: top; }
th { background: #f7f7f8; color: var(--muted); font-size: 12px; }
tbody tr:hover { background: #fafafb; }
.table > .button { margin-top: 14px; }
iframe { width: 100%; min-height: 390px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
details { margin: 12px 0; }
details p { margin-top: 10px; }
summary { cursor: pointer; font-weight: 650; }
@media(max-width: 1080px) {
    .cards { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .overview-grid { grid-template-columns: 1fr; }
}
@media(max-width: 760px) {
    .sidebar { position: static; width: auto; padding: 13px 13px 10px; gap: 9px; }
    .sidebar .brand { margin: 0; }
    .sidebar nav { display: flex; flex-wrap: wrap; gap: 4px; }
    .sidebar nav a { padding: 6px 8px; }
    .sidebar > form { margin-top: 0; padding-top: 8px; }
    .workspace { margin: 0; padding: 20px 13px; }
    .top { align-items: start; flex-wrap: wrap; margin-bottom: 17px; }
    .split { grid-template-columns: 1fr; }
    .card { padding: 15px; }
    .metric { min-height: 103px; }
}
@media(max-width: 360px) {
    .cards { gap: 8px; }
    .panel-heading { flex-wrap: wrap; }
}
