@font-face {
  font-family: "Hanken Grotesk";
  src: url("/fonts/hanken-grotesk-v12-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

@font-face {
  font-family: "Khand";
  src: url("/fonts/khand-v22-600-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #080a09;
  --surface: #111512;
  --surface-raised: #171c18;
  --surface-active: #20261f;
  --border: #282e29;
  --border-strong: #3b433c;
  --text: #f2f5f0;
  --dim: #9fafa4;
  --faint: #718078;
  --brand: #ffe83e;
  --brand-ink: #111303;
  --positive: #35d07f;
  --negative: #ff5d5d;
  --warning: #ffb020;
  --info: #58c7e0;
  --focus: #fff17a;
  --radius-sm: 5px;
  --radius: 8px;
  --radius-lg: 10px;
  --sidebar: 208px;
  --topbar: 76px;
  --drawer: 380px;
  --font: "Hanken Grotesk", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Khand", "Arial Narrow", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --z-sticky: 20;
  --z-popover: 40;
  --z-modal: 60;
  --z-toast: 80;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  height: 100%;
  margin: 0;
  background: radial-gradient(circle at 74% -20%, rgba(255, 232, 62, .08), transparent 34rem), var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: .46;
}

a {
  color: inherit;
}

svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

h1,
h2,
h3,
p,
figure,
dl,
dd {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: .015em;
  text-transform: uppercase;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: var(--z-toast);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: var(--brand-ink);
  font-weight: 800;
  transform: translateY(-150%);
  transition: transform 160ms var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  display: grid;
  grid-template:
    "topbar topbar" var(--topbar)
    "sidebar main" minmax(0, 1fr)
    / var(--sidebar) minmax(0, 1fr);
  min-height: 100dvh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  grid-area: topbar;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(500px, 1fr) auto;
  align-items: stretch;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px 16px;
  border-right: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
}

.identity-mark {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--brand);
  border-radius: 50%;
  background: transparent;
  color: var(--brand);
  font-family: var(--display);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -.03em;
}

.identity strong,
.identity small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity strong {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.identity small {
  margin-top: 1px;
  color: var(--dim);
  font-size: 11px;
}

.launch-rail {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
  padding: 10px 18px;
}

.rail-title {
  flex: 0 0 142px;
}

.rail-title span,
.evidence-drawer header span,
.confirm-sheet header span {
  display: block;
  color: var(--dim);
  font-size: 11px;
}

.rail-title strong {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--warning);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.launch-rail ol {
  display: flex;
  flex: 1;
  align-items: center;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.launch-rail li {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--faint);
  font-size: 11px;
  white-space: nowrap;
}

.launch-rail li:not(:last-child)::after {
  content: "";
  flex: 1;
  min-width: 8px;
  height: 1px;
  margin: 0 7px;
  background: var(--border);
}

.launch-rail li span {
  display: grid;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
}

.launch-rail li.pass {
  color: var(--text);
}

.launch-rail li.pass span {
  border-color: var(--positive);
  background: rgba(53, 208, 127, .12);
  color: var(--positive);
}

.launch-rail li.blocked {
  color: var(--text);
}

.launch-rail li.blocked span {
  border-color: var(--negative);
  background: rgba(255, 93, 93, .12);
  color: var(--negative);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
}

.mode-chip,
.chain-state {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .01em;
}

.mode-chip.safe {
  border-color: rgba(53, 208, 127, .42);
  color: var(--positive);
}

.mode-chip.live {
  border-color: rgba(255, 176, 32, .54);
  color: var(--warning);
}

.icon-button,
.avatar-button {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--dim);
}

.icon-button:hover,
.avatar-button:hover {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}

.avatar-button {
  width: 36px;
  height: 36px;
  border-color: var(--border-strong);
  border-radius: 50%;
  background: var(--surface-raised);
  color: var(--brand);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
}

.auth-panel {
  position: fixed;
  top: calc(var(--topbar) - 4px);
  right: 12px;
  z-index: var(--z-popover);
  width: min(390px, calc(100vw - 24px));
  padding: 20px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
}

.auth-panel h2 {
  font-size: 16px;
}

.auth-panel p {
  margin-top: 6px;
  color: var(--dim);
  font-size: 12px;
}

.auth-submit,
.auth-signout {
  width: 100%;
  margin-top: 14px;
}

.advanced-auth {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.advanced-auth summary {
  color: var(--faint);
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.advanced-auth .button {
  width: 100%;
  margin-top: 10px;
}

label {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  color: var(--dim);
  font-size: 12px;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

input,
select {
  padding: 0 11px;
}

textarea {
  resize: vertical;
  padding: 10px 11px;
}

.sidebar {
  position: sticky;
  top: var(--topbar);
  grid-area: sidebar;
  display: flex;
  height: calc(100dvh - var(--topbar));
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--border);
  background: var(--surface);
}

.sidebar nav {
  display: grid;
  gap: 2px;
  padding: 10px;
}

.nav-item {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 11px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--dim);
  text-align: left;
}

.nav-item svg {
  width: 18px;
  height: 18px;
}

.nav-item:hover {
  background: var(--surface-raised);
  color: var(--text);
}

.nav-item.selected {
  border-color: var(--border-strong);
  background: var(--surface-active);
  color: var(--brand);
}

.nav-item.selected span {
  color: var(--text);
  font-weight: 700;
}

.sidebar-foot {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
}

.sidebar-foot strong,
.sidebar-foot small {
  display: block;
}

.sidebar-foot strong {
  font-size: 11px;
}

.sidebar-foot small {
  margin-top: 2px;
  color: var(--dim);
  font-size: 10px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--positive);
  box-shadow: 0 0 0 4px rgba(53, 208, 127, .12);
}

main {
  grid-area: main;
  min-width: 0;
  padding: 26px clamp(18px, 3vw, 38px) 64px;
}

.workspace-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  max-width: 1540px;
  margin: 0 auto 20px;
}

.workspace-header > div:first-child {
  min-width: 0;
}

.workspace-header > div:first-child > p:first-child {
  margin-bottom: 4px;
  color: var(--faint);
  font-size: 11px;
}

.workspace-header h1 {
  font-size: 34px;
  line-height: 1;
  letter-spacing: .01em;
}

.workspace-header h1 + p {
  max-width: 72ch;
  margin-top: 6px;
  color: var(--dim);
  font-size: 13px;
}

.workspace-actions,
.button-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.campaign-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.campaign-picker span {
  color: var(--dim);
  white-space: nowrap;
}

.campaign-picker select {
  width: min(260px, 30vw);
}

.button {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-raised);
  color: var(--text);
  font-family: var(--display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.button:hover:not(:disabled) {
  border-color: var(--dim);
  background: var(--surface-active);
}

.button.primary {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--brand-ink);
}

.button.primary:hover:not(:disabled) {
  background: #fff17a;
}

.button.secondary {
  border-color: rgba(198, 243, 46, .48);
  color: var(--brand);
}

.button.quiet {
  background: transparent;
}

.button.danger {
  border-color: var(--negative);
  background: var(--negative);
  color: #220000;
}

.text-button {
  min-height: 44px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: var(--brand);
  font-weight: 700;
}

.text-button:hover {
  color: #fff17a;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-warning,
.action-bar,
.scope-banner,
.policy-alert {
  display: flex;
  max-width: 1540px;
  min-height: 54px;
  align-items: center;
  gap: 8px;
  margin: 0 auto 18px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 176, 32, .42);
  border-radius: var(--radius);
  background: rgba(255, 176, 32, .07);
}

.auth-warning span,
.action-bar p,
.scope-banner span,
.policy-alert span {
  color: var(--dim);
  font-size: 12px;
}

.auth-warning .text-button,
.action-bar > :last-child {
  margin-left: auto;
}

.auth-warning[hidden] {
  display: none;
}

.view {
  display: none;
  max-width: 1540px;
  margin: 0 auto;
}

.view.active {
  display: block;
}

.verdict-strip {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  margin-bottom: 18px;
  padding: 11px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.verdict-symbol {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--warning);
  font-family: var(--mono);
  font-weight: 900;
}

.verdict-strip p {
  margin-top: 3px;
  color: var(--dim);
  font-size: 12px;
}

.verdict-strip[data-state="ready"] {
  border-color: rgba(53, 208, 127, .52);
}

.verdict-strip[data-state="ready"] .verdict-symbol {
  border-color: var(--positive);
  color: var(--positive);
}

.verdict-strip[data-state="blocked"] {
  border-color: rgba(255, 93, 93, .52);
}

.verdict-strip[data-state="blocked"] .verdict-symbol {
  border-color: var(--negative);
  color: var(--negative);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--border);
}

.kpi-card {
  position: relative;
  min-width: 0;
  min-height: 116px;
  padding: 15px 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .018), transparent 65%), var(--surface);
}

.kpi-card.signal::before,
.kpi-card.value::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: var(--brand);
  content: "";
}

.kpi-card.value {
  background: linear-gradient(145deg, rgba(255, 232, 62, .1), transparent 70%), var(--surface);
}

.kpi-card > span,
.kpi-card > small {
  display: block;
  overflow: hidden;
  color: var(--dim);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kpi-card > span {
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.kpi-card > strong {
  display: block;
  overflow: hidden;
  margin: 10px 0 8px;
  font: 600 27px/.9 var(--display);
  letter-spacing: .01em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.kpi-card.value > strong {
  color: var(--brand);
}

.good { color: var(--positive) !important; }
.bad { color: var(--negative) !important; }

.campaign-plan-bar {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) repeat(3, minmax(120px, 150px)) auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 18px;
  padding: 15px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(110deg, rgba(255, 232, 62, .07), transparent 34%), var(--surface);
}

.campaign-plan-bar label {
  margin: 0;
}

.campaign-plan-copy {
  align-self: center;
}

.campaign-plan-copy strong,
.campaign-plan-copy span {
  display: block;
}

.campaign-plan-copy strong {
  font: 600 18px/1 var(--display);
  letter-spacing: .03em;
  text-transform: uppercase;
}

.campaign-plan-copy span {
  max-width: 54ch;
  margin-top: 5px;
  color: var(--dim);
  font-size: 11px;
}

.input-with-unit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg);
}

.input-with-unit input {
  border: 0;
}

.input-with-unit b {
  padding: 0 12px;
  color: var(--brand);
  font: 600 12px/1 var(--display);
  letter-spacing: .04em;
}

.value-sheet .button-row {
  margin-top: 20px;
  justify-content: flex-end;
}

.control-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 18px;
}

.primary-column,
.signal-column,
.dossier-main {
  display: grid;
  align-content: start;
  gap: 18px;
  min-width: 0;
}

.section-block,
.signal-list,
.scope-ledger,
.creative-contract,
.document-intake,
.settings-section {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.section-heading {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--border);
}

.section-heading > div {
  min-width: 0;
}

.section-heading h2,
.signal-list h2,
.scope-ledger h2,
.creative-contract h2,
.document-intake h2,
.settings-section h2 {
  font-size: 14px;
  letter-spacing: -.01em;
}

.section-heading p {
  margin-top: 3px;
  color: var(--dim);
  font-size: 11px;
}

.table-frame {
  width: 100%;
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

th,
td {
  min-width: 96px;
  padding: 11px 13px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

th {
  color: var(--dim);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .02em;
  white-space: nowrap;
}

td {
  max-width: 290px;
  color: var(--text);
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover:not(.loading-row) {
  background: var(--surface-raised);
}

.loading-row td,
.empty-row td {
  height: 68px;
  color: var(--dim);
  text-align: center;
}

.cell-primary,
.cell-secondary,
.cell-mono {
  display: block;
}

.cell-secondary {
  overflow: hidden;
  margin-top: 2px;
  color: var(--dim);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-mono,
.hash {
  font-family: var(--mono);
  font-size: 10px;
}

.hash {
  display: inline-block;
  max-width: 130px;
  overflow: hidden;
  color: var(--dim);
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.status {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--surface-active);
  color: var(--dim);
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status.positive {
  color: var(--positive);
}

.status.negative {
  color: var(--negative);
}

.status.warning {
  color: var(--warning);
}

.status.info {
  color: var(--info);
}

.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}

.row-button {
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
}

.row-button:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.signal-list,
.scope-ledger {
  padding: 15px;
}

.signal-list h2,
.scope-ledger h2 {
  margin-bottom: 11px;
}

.signal-row {
  display: flex;
  min-height: 37px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  color: var(--dim);
  font-size: 11px;
}

.signal-row:last-child {
  border-bottom: 0;
}

.signal-row strong {
  color: var(--warning);
  font-family: var(--mono);
  font-size: 10px;
}

.signal-row strong.good {
  color: var(--positive);
}

.signal-row strong.bad {
  color: var(--negative);
}

.scope-ledger dl,
.creative-contract dl,
.settings-section dl {
  display: grid;
  gap: 0;
}

.scope-ledger dl > div,
.creative-contract dl > div,
.settings-section dl > div {
  display: grid;
  grid-template-columns: minmax(92px, 1fr) minmax(0, 1.4fr);
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}

.scope-ledger dl > div:last-child,
.creative-contract dl > div:last-child,
.settings-section dl > div:last-child {
  border-bottom: 0;
}

dt {
  color: var(--dim);
  font-size: 11px;
}

dd {
  overflow-wrap: anywhere;
  font-size: 11px;
  font-weight: 700;
  text-align: right;
}

.action-bar {
  justify-content: space-between;
  border-color: var(--border);
  background: var(--surface);
}

.action-bar p {
  max-width: 90ch;
}

.scope-banner {
  border-color: rgba(88, 199, 224, .42);
  background: rgba(88, 199, 224, .07);
}

.scope-banner strong,
.scope-banner span,
.policy-alert strong,
.policy-alert span {
  display: block;
}

.scope-banner strong,
.policy-alert strong {
  font-size: 12px;
}

.scope-banner span,
.policy-alert span {
  margin-top: 2px;
}

.placement-ledger {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.placement-entry {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 78px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.app-glyph {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: var(--surface-active);
  color: var(--brand);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 900;
}

.placement-entry strong,
.placement-entry small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.placement-entry small {
  margin-top: 3px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 9px;
}

.creative-layout {
  display: grid;
  grid-template-columns: minmax(420px, 1.5fr) minmax(280px, .7fr);
  gap: 18px;
  margin-bottom: 18px;
}

.banner-proof {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.banner-proof figcaption {
  margin-bottom: 12px;
  color: var(--dim);
  font-size: 11px;
}

.banner-canvas {
  position: relative;
  display: grid;
  min-height: 220px;
  grid-template-columns: minmax(0, 1fr) 120px;
  align-items: end;
  overflow: hidden;
  padding: 34px;
  border-radius: var(--radius);
  background: #182911;
  isolation: isolate;
}

.banner-canvas::before,
.banner-canvas::after {
  content: "";
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(198, 243, 46, .2);
  border-radius: 50%;
}

.banner-canvas::before {
  top: -120px;
  right: 40px;
  width: 300px;
  height: 300px;
}

.banner-canvas::after {
  top: -70px;
  right: 90px;
  width: 180px;
  height: 180px;
}

.banner-canvas strong {
  display: block;
  color: var(--brand);
  font-size: 27px;
  letter-spacing: -.035em;
}

.banner-canvas p {
  margin-top: 6px;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.08;
}

.banner-canvas button {
  min-height: 44px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: var(--brand-ink);
  font-size: 11px;
  font-weight: 900;
}

.live-badge {
  position: absolute;
  top: 20px;
  left: 34px;
  padding: 4px 7px;
  border-radius: 4px;
  background: var(--negative);
  color: #260000;
  font-size: 9px;
  font-weight: 900;
}

.score-mark {
  position: absolute;
  top: -26px;
  right: 155px;
  color: rgba(198, 243, 46, .1);
  font-size: 210px;
  font-weight: 900;
  line-height: 1;
}

.creative-contract {
  padding: 16px;
}

.creative-contract dl {
  margin-top: 10px;
}

.creative-contract > p {
  margin: 14px 0;
  color: var(--warning);
  font-size: 11px;
}

.metric-line,
.crawler-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--border);
}

.metric-item,
.crawler-summary-item {
  flex: 1 1 150px;
  min-height: 72px;
  padding: 12px 14px;
  background: var(--surface);
}

.metric-item span,
.crawler-summary-item span {
  display: block;
  color: var(--dim);
  font-size: 10px;
}

.metric-item strong,
.crawler-summary-item strong {
  display: block;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 18px;
  letter-spacing: -.02em;
}

.dossier-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
}

.policy-alert {
  margin: 0;
  border-color: rgba(255, 93, 93, .45);
  background: rgba(255, 93, 93, .07);
}

.document-intake {
  align-self: start;
  padding: 16px;
}

.document-intake form {
  display: grid;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.document-intake h3 {
  font-size: 12px;
}

.document-intake label {
  margin-top: 10px;
  font-size: 10px;
}

.document-intake input,
.document-intake select {
  min-height: 40px;
  font-size: 12px;
}

.document-intake .button {
  margin-top: 14px;
}

.check-label,
.confirm-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.check-label input,
.confirm-check input {
  width: 18px;
  min-height: 18px;
  margin: 0;
}

.settings-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.settings-section {
  padding: 16px;
}

.settings-section > p {
  margin-top: 6px;
  color: var(--dim);
  font-size: 12px;
}

.settings-section dl {
  margin-top: 10px;
}

.accounts-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.account-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.account-row strong,
.account-row span {
  display: block;
}

.account-row span {
  margin-top: 2px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 9px;
}

.evidence-drawer {
  position: fixed;
  top: var(--topbar);
  right: 0;
  bottom: 0;
  z-index: var(--z-popover);
  width: min(var(--drawer), 100vw);
  overflow: auto;
  border-left: 1px solid var(--border-strong);
  background: var(--surface-raised);
}

.evidence-drawer[hidden] {
  display: none;
}

.evidence-drawer > header,
.confirm-sheet > header {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.evidence-drawer h2,
.confirm-sheet h2 {
  margin-top: 2px;
  font-size: 16px;
}

#evidence-content {
  padding: 16px;
}

.evidence-group {
  margin-bottom: 18px;
}

.evidence-group h3 {
  margin-bottom: 8px;
  color: var(--dim);
  font-size: 11px;
}

.evidence-group dl {
  display: grid;
}

.evidence-group dl div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.evidence-group dd {
  font-family: var(--mono);
  font-size: 10px;
}

.reason-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.reason-list li {
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--dim);
  font-size: 11px;
}

.reason-list strong {
  display: block;
  margin-bottom: 3px;
  color: var(--negative);
  font-family: var(--mono);
  font-size: 10px;
}

dialog {
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
  color: var(--text);
}

dialog::backdrop {
  background: rgba(2, 5, 3, .82);
}

.confirm-sheet {
  max-height: calc(100dvh - 24px);
  overflow: auto;
}

.confirm-sheet > p,
.confirm-sheet > label,
.confirm-sheet > textarea,
.confirm-sheet > .button-row,
.confirm-facts {
  margin-right: 18px;
  margin-left: 18px;
}

.confirm-sheet > p {
  margin-top: 16px;
  color: var(--dim);
  font-size: 12px;
}

.confirm-facts {
  display: grid;
  margin-top: 14px;
  margin-bottom: 14px;
}

.confirm-facts div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.confirm-facts dd {
  font-family: var(--mono);
  font-size: 10px;
}

.confirm-sheet > .button-row {
  justify-content: flex-end;
  margin-top: 18px;
  margin-bottom: 18px;
}

.toast-region {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: var(--z-toast);
  display: grid;
  width: min(390px, calc(100vw - 32px));
  gap: 8px;
}

.toast {
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-raised);
  color: var(--text);
  font-size: 12px;
  animation: toast-in 180ms var(--ease);
}

.toast.error {
  border-color: var(--negative);
}

.toast.success {
  border-color: var(--positive);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1180px) {
  :root {
    --sidebar: 72px;
  }

  .identity {
    justify-content: center;
    padding: 10px;
  }

  .identity > span:last-child,
  .nav-item span,
  .sidebar-foot span:last-child {
    display: none;
  }

  .nav-item {
    justify-content: center;
    padding: 0;
  }

  .sidebar-foot {
    justify-content: center;
  }

  .rail-title {
    flex-basis: 120px;
  }

  .launch-rail li {
    font-size: 0;
  }

  .launch-rail li span {
    font-size: 10px;
  }

  .settings-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .campaign-plan-bar {
    grid-template-columns: repeat(3, minmax(120px, 1fr)) auto;
  }

  .campaign-plan-copy {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  :root {
    --topbar: 64px;
  }

  .topbar {
    grid-template-columns: 64px minmax(0, 1fr) auto;
  }

  .identity-mark {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .launch-rail {
    padding: 8px 12px;
  }

  .rail-title {
    flex-basis: auto;
  }

  .rail-title span {
    display: none;
  }

  .launch-rail ol {
    display: none;
  }

  .top-actions {
    padding: 0 8px;
  }

  .top-actions .mode-chip {
    display: none;
  }

  .control-layout,
  .dossier-layout,
  .creative-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .signal-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .document-intake {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .document-intake > h2 {
    grid-column: 1 / -1;
  }

  .document-intake form {
    margin: 0;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .campaign-plan-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .campaign-plan-bar .button {
    align-self: end;
  }
}

@media (max-width: 700px) {
  :root {
    --sidebar: 0px;
  }

  .app-shell {
    grid-template:
      "topbar" var(--topbar)
      "main" minmax(0, 1fr)
      / minmax(0, 1fr);
  }

  .topbar {
    grid-template-columns: 56px minmax(0, 1fr) auto;
  }

  .sidebar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    top: auto;
    z-index: var(--z-sticky);
    display: block;
    width: 100%;
    height: 110px;
    border-top: 1px solid var(--border);
    border-right: 0;
  }

  .sidebar nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(44px, 1fr));
    grid-template-rows: repeat(2, 48px);
    overflow: hidden;
    gap: 2px;
    padding: 6px 8px;
  }

  .nav-item {
    flex-direction: column;
    width: 100%;
    min-height: 44px;
    justify-content: center;
    gap: 3px;
    padding: 0;
  }

  .nav-item svg {
    width: 16px;
    height: 16px;
  }

  .nav-item span {
    display: block;
    width: 100%;
    overflow: hidden;
    font-size: 10px;
    line-height: 1;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sidebar-foot {
    display: none;
  }

  main {
    padding: 18px 12px 136px;
  }

  .workspace-header {
    display: grid;
    align-items: start;
  }

  .workspace-actions {
    width: 100%;
  }

  .campaign-picker {
    flex: 1;
  }

  .campaign-picker span {
    display: none;
  }

  .campaign-picker select {
    width: 100%;
  }

  .auth-warning,
  .action-bar,
  .policy-alert {
    align-items: flex-start;
    flex-direction: column;
  }

  .auth-warning .text-button,
  .action-bar > :last-child {
    margin-left: 0;
  }

  .section-heading p,
  .signal-row,
  .scope-ledger dt,
  .scope-ledger dd {
    font-size: 12px;
  }

  .table-frame {
    overflow: visible;
  }

  .table-frame table,
  .table-frame tbody,
  .table-frame tr {
    display: block;
    width: 100%;
  }

  .table-frame thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    border: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .table-frame tbody tr {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
  }

  .table-frame tbody tr:last-child {
    border-bottom: 0;
  }

  .table-frame td {
    position: relative;
    display: block;
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: 34px;
    padding: 7px 0 7px 42%;
    overflow-wrap: anywhere;
    border-bottom: 1px solid rgba(40, 46, 41, .72);
    text-align: right;
  }

  .table-frame td:last-child {
    border-bottom: 0;
  }

  .table-frame td::before {
    position: absolute;
    top: 7px;
    left: 0;
    width: 38%;
    color: var(--dim);
    content: attr(data-label);
    font-size: 12px;
    font-weight: 750;
    text-align: left;
  }

  .table-frame td[data-mobile-span="true"] {
    height: auto;
    min-height: 56px;
    padding: 18px 0;
    text-align: center;
  }

  .table-frame td[data-mobile-span="true"]::before {
    content: none;
  }

  .table-frame .row-actions {
    justify-content: flex-end;
  }

  .verdict-strip {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .verdict-strip .button {
    grid-column: 1 / -1;
  }

  .signal-column,
  .placement-ledger,
  .settings-layout,
  .document-intake {
    grid-template-columns: minmax(0, 1fr);
  }

  .creative-layout {
    display: block;
  }

  .kpi-card {
    min-height: 104px;
  }

  .campaign-plan-bar {
    grid-template-columns: minmax(0, 1fr);
  }

  .banner-proof {
    margin-bottom: 14px;
  }

  .banner-canvas {
    min-height: 250px;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding: 48px 22px 22px;
  }

  .banner-canvas strong {
    font-size: 23px;
  }

  .banner-canvas p {
    font-size: 17px;
  }

  .live-badge {
    left: 22px;
  }

  .score-mark {
    right: -12px;
  }

  .document-intake > h2 {
    grid-column: auto;
  }

  .evidence-drawer {
    top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
