:root {
  --ink: #222841; --muted: #545e75; --accent: #3f49b6; --deep: #262e74;
  --paper: #f5f5fa; --line: #dedfeb; --tint: #e8eaff; --white: #fff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px; color: var(--ink); background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; line-height: 1.55; }
main { padding: clamp(28px, 6vw, 68px) 0 72px; }
.shell { width: min(1100px, calc(100% - 44px)); margin-inline: auto; }
.top { background: var(--white); border-bottom: 1px solid var(--line); }
.mast { display: flex; align-items: center; gap: 18px; min-height: 66px; }
.wordmark { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--ink); text-decoration: none; font-size: 1.2rem; }
.mark { background: var(--accent); color: #fff; border-radius: 7px; display: grid; place-items: center; width: 31px; height: 31px; font-weight: 750; font-style: italic; }
.top-label { color: var(--muted); font-size: .84rem; border-left: 1px solid var(--line); padding-left: 18px; }
nav { margin-left: auto; display: flex; gap: 20px; align-items: center; }
nav a, .nav-button { color: var(--muted); font-size: .89rem; }
.nav-button { font-family: inherit; background: none; border: 0; padding: 8px 0; text-decoration: underline; cursor: pointer; }
.skip { position: absolute; left: 12px; top: -100px; background: var(--white); padding: 12px; }
.skip:focus { top: 8px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2.15rem, 5.4vw, 4rem); letter-spacing: -.06em; line-height: 1.04; font-weight: 720; overflow-wrap: anywhere; }
h2 { font-size: 1.4rem; letter-spacing: -.025em; }
h3 { font-size: 1rem; }
p + p, h1 + p, h2 + p, h1 + a { margin-top: 10px; }
a { color: var(--accent); overflow-wrap: anywhere; }
:focus-visible { outline: 3px solid #5966d5; outline-offset: 4px; }
.page-heading { display: flex; gap: 18px; justify-content: space-between; align-items: flex-end; margin-bottom: 28px; }
.eyebrow { color: var(--deep); font-weight: 650; font-size: .84rem; margin-bottom: 7px; }
.button { background: var(--accent); color: var(--white); border: 1px solid transparent; border-radius: 8px; padding: 10px 15px; min-height: 42px; display: inline-flex; justify-content: center; align-items: center; align-self: start; text-decoration: none; font: inherit; font-weight: 640; cursor: pointer; }
.page-heading > .button { align-self: flex-end; }
.button:hover { background: var(--deep); }
.secondary { background: var(--white); border-color: var(--line); color: var(--deep); }
.secondary:hover { background: var(--tint); }
.back { display: inline-block; margin-bottom: 20px; font-weight: 620; }
.quota { padding: clamp(18px, 4vw, 30px); border-radius: 16px; border: 1px solid #d8dcfc; background: linear-gradient(125deg, #e7e9ff, #f0effd); }
.quota-head { display: flex; justify-content: space-between; flex-wrap: wrap; column-gap: 20px; }
.quota-head span, .fine { color: var(--muted); font-size: .88rem; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: 19px 0 14px; }
.metrics div + div { border-left: 1px solid #d3d7f6; padding-left: 20px; }
.metrics dt { font-size: .85rem; font-weight: 600; }
.metrics dd { margin: 3px 0; color: var(--deep); font-variant-numeric: tabular-nums; }
.metrics dd strong { font-size: 1.7rem; }
progress { width: 100%; height: 5px; display: block; border: 0; background: #d1d6f8; border-radius: 8px; overflow: hidden; }
progress::-webkit-progress-bar { background: #d1d6f8; }
progress::-webkit-progress-value { background: var(--accent); }
progress::-moz-progress-bar { background: var(--accent); }
.portfolio { margin-top: 32px; }
.portfolio h2 { margin-bottom: 10px; }
.project-row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr) 20px; align-items: center; gap: 16px; padding: 13px 16px; }
.table-head { color: var(--muted); font-size: .83rem; padding-bottom: 7px; }
.project-link { border: 1px solid var(--line); border-radius: 10px; background: var(--white); text-decoration: none; color: var(--ink); margin-bottom: 8px; }
.project-link:hover { border-color: #9ba4e4; background: #fbfbff; }
.project-name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.monogram { width: 38px; height: 38px; flex-shrink: 0; display: grid; place-items: center; background: var(--tint); color: var(--deep); border-radius: 8px; font-weight: 750; }
.project-row small { display: block; color: var(--muted); font-size: .82rem; }
.table-date small { display: none; }
.arrow { justify-self: end; color: var(--accent); }
.panel, .empty { margin: 16px 0; background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: clamp(16px, 3vw, 26px); }
.empty { color: var(--muted); border-style: dashed; }
.auth { max-width: 490px; margin: clamp(20px, 8vw, 90px) auto; }
.auth h1 { font-size: clamp(2rem, 5vw, 3rem); }
.auth .form-grid, .auth label { margin-top: 15px; }
.wide { max-width: 850px; }
.form-grid, .columns { display: grid; gap: 15px; }
.form-grid { justify-items: start; }
.form-grid label, .columns { width: 100%; }
.form-inline { display: flex; align-items: end; flex-wrap: wrap; }
.form-inline label { width: min(100%, 330px); }
.columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
label { display: block; font-size: .92rem; font-weight: 620; }
input, textarea { display: block; margin: 5px 0 0; width: 100%; border: 1px solid #b9bfd1; border-radius: 6px; padding: 9px 10px; color: var(--ink); background: var(--white); font: inherit; font-weight: 400; }
textarea { resize: vertical; }
.agency-card > * + * { margin-top: 13px; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 15px; }
.notice { background: var(--tint); border-left: 4px solid var(--accent); padding: 13px 16px; margin: 12px 0; }
.pill { display: inline-block; justify-self: start; padding: 3px 9px; border-radius: 100px; background: var(--tint); color: var(--deep); font-size: .79rem; font-weight: 650; }
.pill.partial, .pill.awaiting_import { background: #fff1d6; color: #633d07; }
.pill.complete { background: #dbf1e8; color: #1c5b43; }
.pill.failed { background: #fae1e4; color: #842739; }
.surface .fine { margin-bottom: 9px; }
.observation { border-top: 1px solid var(--line); padding: 9px 0; }
summary { cursor: pointer; font-weight: 600; }
.observation summary span, .observation summary strong { margin-left: 7px; overflow-wrap: anywhere; }
.observation summary strong { color: var(--deep); }
.detail { padding: 9px 16px; }
pre { margin: 5px 0; padding: 10px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); background: var(--paper); }
.brand-logo { max-width: min(100%, 200px); max-height: 110px; margin-bottom: 12px; }
@media (max-width: 660px) {
  .shell { width: calc(100% - 30px); }
  .top-label { display: none; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .page-heading > .button { align-self: flex-start; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
  .metrics div + div { border: 0; padding-left: 0; }
  .columns { grid-template-columns: 1fr; }
  .table-head { display: none; }
  .project-link { grid-template-columns: repeat(2, minmax(0, 1fr)) 14px; gap: 8px; }
  .project-link > :first-child { grid-column: 1 / 3; }
  .project-link .arrow { grid-column: 3; grid-row: 1; }
  .table-date small { display: block; }
}
