@font-face {
  font-family: Tomorrow;
  src: url('/assets/tomorrow-bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url('/assets/inter.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
:root {
  color-scheme: light;
  --ink: #100e0b;
  --paper: #f0eceb;
  --red: #e4002b;
  --burgundy: #6d0a0f;
  --base: var(--paper);
  --panel: #fffdfc;
  --raised: #f7f3f2;
  --line: #d9cfcb;
  --text: var(--ink);
  --muted: #635b56;
  --accent: var(--red);
  --accent-text: #fff;
  --tint: #f9e5e8;
  --success: #245c42;
  --danger: #a2132e;
  --display: 'TT Supermolot Neue Expanded', Tomorrow, Arial, sans-serif;
  --mono: ui-monospace, 'SFMono-Regular', Consolas, monospace;
  font: 16px/1.5 'Neue Haas Unica', Inter, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 315px; color: var(--text); background: var(--base); }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled, select:disabled { cursor: default; opacity: .48; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
svg { flex: 0 0 auto; vertical-align: middle; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 12px; z-index: 5; padding: 8px; background: var(--accent); color: var(--accent-text); }
.login { display: grid; min-height: 100svh; grid-template-columns: 5fr 6fr; }
.login-brand { display: flex; align-items: flex-end; padding: clamp(28px, 5vw, 80px);
  color: var(--paper); background: linear-gradient(0deg, #100e0be6, transparent 52%) center / cover,
    var(--ink) url('/assets/brand-pattern.webp') center / cover no-repeat; }
.login-lockup img { display: block; width: clamp(180px, 25vw, 360px); max-width: 100%; height: auto; }
.login-lockup p { margin-top: 12px; font-size: 13px; font-weight: 650; letter-spacing: .18em; text-transform: uppercase; }
.login-main { display: grid; align-items: center; justify-items: center; padding: clamp(28px, 7vw, 100px); }
.login-content { width: 100%; max-width: 400px; }
.login-symbol { display: block; margin-bottom: 34px; }
.login-content h1 { font: 700 clamp(2rem, 4vw, 3.5rem)/1.02 var(--display); letter-spacing: -.04em; }
.login-content p { max-width: 32ch; margin: 16px 0 30px; color: var(--muted); }
.login-content .login-button { display: flex; justify-content: space-between; width: 100%; min-height: 54px; padding-inline: 17px; text-align: left; white-space: normal; }
.login-button span { font-size: 22px; line-height: 1; }
@media (max-width: 740px) {
  .login { grid-template-columns: 1fr; grid-template-rows: minmax(170px, 28svh) 1fr; }
  .login-brand { background-position: center, center 59%; }
  .login-main { justify-items: start; }
  .login-symbol { width: 50px; height: 50px; margin-bottom: 24px; }
}
.shell { min-height: 100vh; display: grid; grid-template-columns: 234px minmax(0, 1fr); }
.sidebar { background: var(--sidebar-background); color: var(--sidebar-text); border-right: 1px solid var(--sidebar-divider); position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; padding: 25px 15px 16px; overflow-y: auto; color-scheme: dark; }
.identity { display: grid; justify-items: start; gap: 9px; margin: 0 9px 30px; padding: 7px 0 22px; border-bottom: 1px solid var(--sidebar-divider); }
.identity img { display: block; width: 168px; max-width: 100%; height: auto; }
.identity small { display: block; margin-left: 36px; color: var(--sidebar-muted); font-size: 10px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.nav-label { color: var(--sidebar-muted); font-size: 10px; font-weight: 700; letter-spacing: .14em; margin: 0 11px 8px; }
.nav-link + .nav-label { margin-top: 28px; }
.nav-link { display: flex; min-height: 43px; width: 100%; align-items: center; gap: 11px; padding: 7px 11px; color: var(--sidebar-link); font-size: 14px; text-align: left; font-weight: 550; border: 1px solid transparent; background: transparent; }
.nav-link + .nav-link { margin-top: 3px; }
.nav-link:hover { color: #fff; background: var(--sidebar-hover); }
.nav-link.active { color: var(--sidebar-text); background: var(--sidebar-active); border-color: var(--sidebar-active-border); }
.nav-link.active svg { color: var(--sidebar-active-icon); }
.sidebar :focus-visible { outline-color: var(--sidebar-focus); }
.sidebar-bottom { margin-top: auto; }
.account { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 16px 8px 2px; border-top: 1px solid var(--sidebar-divider); color: var(--sidebar-text); }
.avatar { display: grid; place-items: center; flex: 0 0 34px; height: 34px; background: var(--sidebar-avatar); color: var(--sidebar-avatar-text); font: 700 16px var(--display); clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }
.account strong, .account small { display: block; line-height: 1.35; }
.account strong { font-size: 13px; overflow-wrap: anywhere; }
.account small { color: var(--sidebar-muted); font-size: 12px; }
.workspace { min-width: 0; }
.topbar { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 36px; border-bottom: 1px solid var(--line); background: var(--panel); }
.crumbs, .top-actions { display: flex; align-items: center; gap: 11px; min-width: 0; }
.crumbs { font-size: 13px; color: var(--muted); }
.crumbs > svg { color: var(--muted); }
.crumbs > strong { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs a:hover { color: var(--text); }
.internal { display: flex; gap: 6px; align-items: center; padding: 5px 9px; border: 1px solid var(--line); border-radius: 3px; font-size: 12px; white-space: nowrap; color: var(--muted); }
#mobile-menu { display: none; }
.page { max-width: 1536px; margin: 0 auto; padding: 30px 36px 48px; }
.hero { display: flex; align-items: center; gap: 22px; justify-content: space-between; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.hero h1 { font: 700 clamp(27px, 3.05vw, 43px)/1.07 var(--display); letter-spacing: -.035em; text-transform: uppercase; overflow-wrap: anywhere; }
.hero p { color: var(--muted); margin-top: 9px; font-size: 14px; overflow-wrap: anywhere; }
.library > .hero {
  position: relative;
  isolation: isolate;
  min-height: 158px;
  padding: 25px 30px;
  overflow: hidden;
  border: 0;
  color: #fff;
  background: linear-gradient(110deg, var(--ink) 12%, #260b0e 55%, var(--burgundy) 100%);
  clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
}
.library > .hero::before {
  position: absolute;
  z-index: -1;
  inset: 0 0 0 auto;
  width: min(48%, 570px);
  content: '';
  background: linear-gradient(90deg, transparent, #100e0b24), url('/assets/brand-pattern.webp') center 47% / cover no-repeat;
  mask-image: linear-gradient(90deg, transparent, #000 50%);
}
.library > .hero h1 { max-width: 19ch; font-size: clamp(30px, 3.6vw, 46px); }
.library > .hero p { color: var(--paper); max-width: 46ch; }
.library > .hero .btn.primary { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.library > .hero .btn.primary:hover:not(:disabled) { background: #fff; border-color: #fff; color: var(--burgundy); }
.library > .hero .btn:focus-visible, .cover:focus-visible { outline-color: #fff; }
.cover:focus-visible { outline-offset: -4px; }
.hero-actions, .row-actions, .document-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 14px; min-height: 40px; border-radius: 4px; border: 1px solid var(--line); line-height: 1.25; font-size: 14px; font-weight: 640; white-space: nowrap; }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.btn.primary:hover:not(:disabled) { background: #ba0024; border-color: #ba0024; }
.btn.secondary { color: var(--text); background: var(--panel); }
.btn.secondary:hover:not(:disabled), .btn.selected { background: var(--tint); border-color: #d8adb6; color: var(--burgundy); }
.btn.danger { background: var(--tint); color: var(--danger); border-color: #dbadb7; }
.btn.danger:hover { background: #f3d0d7; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; background: transparent; border: 1px solid transparent; border-radius: 4px; color: var(--muted); }
.icon-btn:hover { background: var(--tint); color: var(--burgundy); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 29px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-top: 2px solid var(--burgundy); border-radius: 3px; min-height: 98px; padding: 11px 14px 10px; }
.stat-top { display: flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 600; line-height: 1.25; color: var(--muted); }
.stat-icon, .row-icon { display: inline-grid; flex: 0 0 auto; place-items: center; height: 32px; width: 32px; border-radius: 4px; }
.stat-icon, .row-icon { color: var(--burgundy); background: var(--tint); }
.stat strong { display: block; margin-top: 4px; font: 700 30px/1.12 var(--display); letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.collection-title { display: flex; align-items: center; gap: 11px; margin-bottom: 13px; }
.collection-title h2 { font: 700 21px/1.2 var(--display); letter-spacing: -.025em; text-transform: uppercase; }
.result-count { font-size: 12px; color: var(--burgundy); background: var(--tint); border: 1px solid #ecd2d7; padding: 1px 8px; border-radius: 3px; }
.toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 17px; }
.search { display: flex; align-items: center; gap: 9px; min-width: 180px; width: min(100%, 344px); padding: 0 10px 0 12px; min-height: 41px; background: var(--panel); color: var(--muted); border: 1px solid var(--line); border-radius: 4px; }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.search input { border: 0; outline: 0; color: var(--text); width: 100%; min-width: 0; background: transparent; font-size: 14px; }
.search input::placeholder, input::placeholder, textarea::placeholder { color: var(--muted); }
kbd { flex: 0 0 auto; font: 12px/1.4 var(--mono); border: 1px solid var(--line); border-radius: 4px; min-width: 21px; text-align: center; color: var(--muted); padding: 1px 4px; }
.filter-set { display: flex; align-items: center; gap: 9px; }
.select { position: relative; display: inline-flex; align-items: center; min-width: 0; }
.select select { appearance: none; width: 100%; min-height: 41px; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 4px; padding: 7px 31px 7px 11px; cursor: pointer; font-size: 14px; }
.select svg { position: absolute; right: 9px; pointer-events: none; color: var(--muted); }
.client-filter { max-width: 166px; }
.view-switch { display: flex; align-items: center; gap: 2px; padding: 3px; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; }
.view-switch .icon-btn { width: 31px; height: 32px; }
.view-switch [aria-pressed="true"] { background: var(--burgundy); border-color: var(--burgundy); color: #fff; border-radius: 3px; }
.brand-results { display: grid; gap: 17px; }
.brand-results.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.brand-card { min-width: 0; overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; transition: border-color .18s, box-shadow .18s; }
.brand-card:hover { border-color: #b5908f; box-shadow: 0 3px 12px #3a15120d; }
.cover { position: relative; display: grid; align-items: center; justify-items: center; isolation: isolate; background-color: var(--ink); background-size: cover; background-position: center; }
.cover-aurora { background-image: url('/assets/aurora.webp'); background-position: center 45%; }
.cover-verde { background-image: url('/assets/verde.webp'); }
.cover-forma { background-image: url('/assets/forma.webp'); }
.cover-marea { background-image: url('/assets/marea.webp'); background-position: center 44%; }
.brand-card .cover { height: clamp(130px, 11.8vw, 181px); }
.brand-card .cover::before { position: absolute; inset: 0; content: ''; background: linear-gradient(112deg, #0a09091e, #07070738); z-index: -1; }
.wordmark { max-width: 82%; text-align: center; color: #fff8ed; font-size: clamp(28px, 3.25vw, 48px); font-family: Georgia, serif; letter-spacing: .12em; line-height: 1.04; text-shadow: 0 1px 19px #000a; overflow-wrap: anywhere; }
.cover-verde .wordmark { font-family: Georgia, serif; letter-spacing: -.065em; font-style: italic; color: #edf5dd; }
.cover-forma .wordmark { font-family: 'Segoe UI', Arial, sans-serif; font-size: clamp(28px, 3.4vw, 51px); letter-spacing: -.085em; font-weight: 760; color: #fff0f8; }
.cover-marea .wordmark { letter-spacing: .22em; color: #ebf5fb; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 620; line-height: 1; padding: 6px 8px; border: 1px solid; border-radius: 6px; white-space: nowrap; }
.badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.published { background: #e7f3ec; border-color: #bdd8c9; color: #20553c; }
.badge.draft { background: #f7ebdb; border-color: #e4ceb3; color: #684520; }
.cover .badge { position: absolute; right: 11px; top: 11px; }
.card-info { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; padding: 11px 13px 10px 15px; }
.card-info > div { min-width: 0; }
.card-info h3 { font-size: 17px; letter-spacing: -.25px; line-height: 1.3; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.card-info h3 a:hover, .row-info h2 a:hover { color: var(--burgundy); }
.card-info p { color: var(--muted); font-size: 13px; margin-top: 2px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.card-footer { padding: 9px 15px; border-top: 1px solid var(--line); color: var(--muted); display: flex; justify-content: space-between; gap: 7px; font-size: 12px; }
.card-footer span, .mcp-status { display: inline-flex; gap: 6px; align-items: center; flex: 0 0 auto; }
.mcp-status { color: var(--muted); font-size: 12px; }
.mcp-status.connected { color: var(--success); }
.brand-results.list .brand-card { display: grid; align-items: stretch; grid-template-columns: 155px minmax(155px, 1fr) auto; }
.brand-results.list .cover { height: auto; min-height: 84px; }
.brand-results.list .wordmark { font-size: 19px; }
.brand-results.list .cover .badge { top: 4px; right: 4px; font-size: 10px; padding: 3px 4px; }
.brand-results.list .card-footer { align-items: center; gap: 15px; border-top: 0; border-left: 1px solid var(--line); }
.empty { grid-column: 1/-1; padding: 42px 18px; display: grid; justify-items: center; gap: 9px; border: 1px dashed #b4a39d; border-radius: 4px; text-align: center; color: var(--muted); background: var(--raised); }
.empty h3 { color: var(--text); font-size: 20px; }
.empty-icon { display: grid; place-items: center; background: var(--tint); color: var(--burgundy); border-radius: 4px; width: 49px; height: 49px; }
.empty .btn { margin-top: 8px; }
.loading { margin: 36px; color: var(--muted); }
.notice { display: flex; align-items: center; gap: 13px; padding: 14px 16px; color: var(--burgundy); background: var(--tint); border: 1px solid #ecd2d7; border-radius: 4px; margin-bottom: 19px; }
.notice p { color: var(--burgundy); font-size: 14px; }
.data-list { display: grid; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; }
.data-row { display: flex; gap: 13px; min-width: 0; min-height: 73px; padding: 12px 15px; align-items: center; }
.data-row + .data-row { border-top: 1px solid var(--line); }
.row-icon { width: 38px; height: 38px; }
.row-info { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.row-info h2, .row-info strong { font-size: 16px; display: block; }
.row-info p, .row-info small { color: var(--muted); font-size: 13px; display: block; }
.row-count { white-space: nowrap; color: var(--muted); font-size: 13px; }
code { font: .87em var(--mono); }
.document-footer code { color: var(--muted); overflow-wrap: anywhere; }
.detail-info { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin-bottom: 11px; }
.change-label { color: #684520; }
.detail-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 15px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs .secondary:not(:hover) { background: transparent; border-color: transparent; color: var(--muted); }
.editor { display: grid; grid-template-columns: 232px minmax(0, 1fr); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: var(--panel); }
.documents { padding: 12px 9px; border-right: 1px solid var(--line); background: var(--raised); }
.documents h2 { font-size: 13px; font-weight: 670; padding: 5px 9px 10px; }
.doc-button { display: flex; align-items: center; width: 100%; gap: 8px; min-height: 48px; padding: 6px 8px; border: 1px solid transparent; border-radius: 4px; color: var(--muted); background: transparent; text-align: left; font-size: 13px; }
.doc-button:hover { background: var(--raised); }
.doc-button span { min-width: 0; overflow-wrap: anywhere; }
.doc-button.current { color: var(--burgundy); background: var(--tint); border-color: #ecd2d7; }
.doc-button small { display: block; color: var(--muted); font: 10px/1.4 var(--mono); }
.document-panel { display: flex; flex-direction: column; min-width: 0; }
.document-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 13px 15px; border-bottom: 1px solid var(--line); }
.document-header h2 { font-size: 18px; }
.document-header p { color: var(--muted); font-size: 13px; }
.document-panel textarea { width: 100%; resize: vertical; padding: 18px 16px; min-height: 380px; border: 0; background: var(--panel); color: var(--text); font: 14px/1.65 var(--mono); }
.document-panel textarea:focus-visible { outline-offset: -2px; }
.markdown { background: var(--panel); padding: 18px 22px; min-height: 380px; overflow-wrap: anywhere; }
.markdown h2, .markdown h3, .markdown h4 { margin-bottom: 8px; }
.markdown h3, .markdown h4 { margin-top: 15px; }
.markdown a { color: var(--burgundy); text-decoration: underline; }
.markdown pre { white-space: pre-wrap; }
.document-footer { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 9px 15px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.document-footer span { margin-left: auto; }
dialog { color: var(--text); width: min(520px, calc(100% - 28px)); max-height: calc(100% - 28px); background: var(--panel); border: 1px solid var(--line); border-radius: 5px; padding: 21px; box-shadow: 0 22px 85px #0008; }
dialog::backdrop { background: #100e0ba8; backdrop-filter: blur(3px); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 17px; }
.dialog-head h2 { font-size: 23px; letter-spacing: -.55px; overflow-wrap: anywhere; }
.dialog-head p { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.dialog-head .icon-btn { flex-shrink: 0; }
form { display: grid; gap: 12px; }
form label, .display-field, legend { font-size: 14px; font-weight: 610; }
form label small { color: var(--muted); font-size: 12px; margin-left: 2px; font-weight: 400; }
form label > input, form label > textarea, form .select, .copy-field { display: flex; width: 100%; margin-top: 4px; }
form input:not([type="radio"]), form textarea, .copy-field { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 4px; padding: 8px 10px; }
form fieldset { border: 0; padding: 0; margin: 0; }
.access-scope { display: grid; gap: 8px; margin-bottom: 10px; }
form .access-scope { border: 1px solid var(--line); border-radius: 4px; padding: 10px; }
.access-scope select { display: block; width: 100%; margin-top: 4px; padding: 7px; }
.access-flags { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.access-flags label { display: flex; align-items: center; gap: 5px; }
.access-flags input[type="checkbox"] { width: auto; margin: 0; }
form textarea { resize: vertical; }
.cover-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.cover-choice { position: relative; display: block; cursor: pointer; }
.cover-choice input { position: absolute; opacity: 0; }
.cover-choice .cover { height: 42px; border: 2px solid transparent; border-radius: 6px; }
.cover-choice .cover svg { visibility: hidden; }
.cover-choice input:checked + .cover, .cover-choice input:focus-visible + .cover { border-color: var(--accent); }
.cover-choice input:checked + .cover svg { visibility: visible; color: #fff; filter: drop-shadow(0 1px 3px #100e0b); }
.dialog-actions { margin-top: 12px; display: flex; align-items: center; gap: 9px; }
.dialog-right { display: flex; gap: 8px; margin-left: auto; }
.form-error { color: var(--danger); font-size: 14px; }
.remote-source { display: grid; gap: 10px; }
.remote-source [hidden], .remote-source[hidden] { display: none; }
.remote-inventory { display: flex; flex-wrap: wrap; gap: 8px; }
.remote-inventory:empty { display: none; }
.remote-results { flex: 0 0 100%; max-height: 180px; overflow: auto; }
.remote-results label { display: flex; align-items: start; gap: 8px; padding: 3px 0; overflow-wrap: anywhere; }
.remote-results input[type="checkbox"] { flex: 0 0 auto; width: auto; margin-top: 3px; }
#asset-manifest { margin-top: 8px; font-family: var(--mono); }
.menu-items { display: grid; gap: 8px; }
.menu-items .btn { justify-content: flex-start; }
.connector-meta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.display-field { display: block; margin-bottom: 9px; }
.copy-field { align-items: center; gap: 4px; padding: 2px 4px 2px 8px; }
.copy-field input { width: 100%; min-width: 0; background: transparent; border: 0; color: var(--text); font: 13px var(--mono); }
.helper { color: var(--muted); font-size: 13px; margin: 7px 0; }
.help-steps { margin: 0; padding-left: 24px; color: var(--muted); }
.help-steps li { padding: 0 0 10px 4px; }
.help-steps strong { color: var(--text); }
#toast { position: fixed; right: 20px; bottom: 21px; z-index: 4; display: none; max-width: calc(100vw - 40px); align-items: center; gap: 9px; border: 1px solid #b6d4c2; border-radius: 4px; color: var(--success); background: #eff8f1; padding: 11px 14px; box-shadow: 0 7px 28px #0002; font-size: 14px; }
#toast.visible { display: flex; }
#toast.error { border-color: #dbadb7; color: var(--danger); background: var(--tint); }
@media (min-width: 1500px) {
  .brand-results.grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1090px) {
  .shell { grid-template-columns: 200px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .topbar { padding-inline: 24px; }
  .page { padding-inline: 24px; }
  .stat { padding-inline: 12px; }
  .stat-top { gap: 7px; }
}
@media (max-width: 850px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  #mobile-menu { display: inline-flex; margin-left: -5px; }
  .sidebar { display: none; }
  .sidebar.open { display: flex; position: fixed; top: 60px; bottom: 0; left: 0; z-index: 3; height: auto; width: 220px; box-shadow: 14px 0 35px #0006; }
  .topbar { height: 60px; min-height: 60px; }
  .page { padding-top: 26px; }
}
@media (max-width: 590px) {
  .topbar, .page { padding-left: 15px; padding-right: 15px; }
  .top-actions { gap: 3px; }
  .crumb-root, .crumb-root + svg { display: none; }
  .hero { align-items: flex-start; flex-direction: column; gap: 14px; margin-bottom: 20px; }
  .hero h1 { font-size: 28px; }
  .library > .hero { min-height: 0; padding: 22px 20px; }
  .library > .hero h1 { font-size: clamp(25px, 7vw, 32px); }
  .library > .hero::before { width: 65%; opacity: .4; }
  .hero p { margin-top: 6px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 25px; }
  .stat { min-height: 81px; padding: 8px 10px; }
  .stat strong { font-size: 23px; }
  .toolbar { flex-direction: column; align-items: stretch; gap: 8px; }
  .filter-set { flex-wrap: wrap; justify-content: space-between; gap: 5px; }
  .library .filter-set { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) auto; }
  .library .filter-set .select { max-width: none; }
  .library .filter-set select { font-size: 12px; padding-inline: 8px 24px; text-overflow: ellipsis; }
  .library .filter-set .select svg { right: 6px; }
  .search { width: 100%; }
  .brand-results.grid { grid-template-columns: 1fr; gap: 11px; }
  .brand-card .cover { height: 146px; }
  .brand-results.list .brand-card { grid-template-columns: 91px minmax(0, 1fr); }
  .brand-results.list .card-footer { border-left: 0; border-top: 1px solid var(--line); grid-column: 1/-1; }
  .data-row { flex-wrap: wrap; padding-inline: 10px; }
  .detail-bar { align-items: flex-start; flex-direction: column; }
  .editor { grid-template-columns: 1fr; }
  .documents { display: flex; align-items: center; overflow: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 7px; gap: 3px; }
  .documents h2 { display: none; }
  .doc-button { width: auto; flex: 0 0 auto; }
  .document-header { align-items: flex-start; flex-direction: column; }
  .dialog-actions { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

.team-access { margin-top: 26px; }
.team-access > h2 { margin-bottom: 10px; font-size: 21px; }
.asset-toolbar { justify-content: flex-start; flex-direction: row; flex-wrap: wrap; }
.asset-toolbar .select { min-width: min(172px, 100%); }
.asset-row .row-info h2 { overflow-wrap: anywhere; }
.asset-note { display: flex; align-items: center; gap: 8px; margin-top: 14px; color: var(--muted); font-size: 13px; }
.grant-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.grant-heading h3 { font-size: 15px; }
.inline-link { font-size: 13px; color: var(--burgundy); text-decoration: underline; text-underline-offset: 3px; }
.grant-list { margin: 8px 0; border: 1px solid var(--line); border-radius: 4px; }
.grant-row { display: flex; min-width: 0; gap: 7px; align-items: center; padding: 7px 9px; }
.grant-row + .grant-row { border-top: 1px solid var(--line); }
.grant-row .btn { min-height: 34px; padding: 5px 8px; font-size: 13px; }
.connector-meta .btn { margin-left: auto; }
.legacy-access { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--line); }
#upload-progress:empty { display: none; }
@media (max-width: 590px) {
  .grant-row { flex-wrap: wrap; }
  .asset-row .row-actions { flex-basis: 100%; }
}

.client-studio { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 325px), 1fr)); gap: 16px; }
.client-studio section { min-width: 0; padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; }
.client-studio h2 { margin-bottom: 12px; font-size: 16px; }
.client-studio form .btn { justify-self: start; }
.client-studio ul { display: grid; gap: 10px; list-style: none; margin: 0 0 12px; padding: 0; }
.client-studio li { padding: 9px 11px; border: 1px solid var(--line); overflow-wrap: anywhere; }
.client-studio li small { display: block; color: var(--muted); }
.client-studio li p { white-space: pre-wrap; }
.client-studio li form { margin-top: 7px; }
.studio-conversation { grid-column: 1 / -1; }

.member-brands legend { margin-bottom: 5px; }
.member-brands label { display: flex; align-items: center; gap: 9px; padding: 4px 0; }
.member-brands label > input { width: auto; margin: 0; }
.client-studio form select { display: block; width: 100%; margin-top: 4px; padding: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); }
.studio-work { grid-column: 1 / -1; }
.studio-balance { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 15px; }
.studio-balance div { padding: 8px; min-width: 0; background: var(--raised); }
.studio-balance dt { color: var(--muted); font-size: 11px; }
.studio-balance dd { margin: 0; font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.studio-balance .negative { color: var(--danger); }
.studio-section-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.studio-section-heading h2 { margin-bottom: 0; }
.studio-section-heading p, .studio-task small { display: block; color: var(--muted); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.studio-project { margin-top: 16px; border: 1px solid var(--line); padding: 12px; }
.studio-project h3 { font-size: 15px; }
.studio-task { margin-top: 10px; padding: 10px 0 0; border-top: 1px solid var(--line); }
.studio-live { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; font-size: 12px; }
.studio-live span { background: var(--tint); padding: 4px 7px; }
.studio-live time { font-family: var(--mono); }
.studio-task details { margin-top: 7px; }
.studio-task summary { cursor: pointer; font-size: 12px; color: var(--muted); }
.studio-task details ul { margin: 7px 0 0; }
