/* Ad Intel. Light, readable, one accent. BEM blocks, custom properties for the palette. */
:root {
  --ink: #16181d;
  --ink-2: #3d424d;
  --ink-3: #5f6673;
  --line: #e3e5ea;
  --line-2: #cfd3da;
  --paper: #ffffff;
  --paper-2: #f6f7f9;
  --accent: #3b3fc4;
  --accent-soft: #ecedfb;
  --direct: #8a2f1a;
  --direct-soft: #fbece7;
  --indirect: #6a4a00;
  --indirect-soft: #fbf3df;
  --own: #2d3f8f;
  --own-soft: #e9eefb;
  --rising: #a8430d;
  --error: #b42318;
  --error-soft: #fdecea;
  --ok: #1f6f43;
  --radius: 6px;
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper-2); color: var(--ink); font: 400 16px/1.55 var(--font); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-3); }
.ok { color: var(--ok); font-weight: 500; }
.error-text { color: var(--error); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pre { white-space: pre-line; }

/* Shell */
.shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
.nav { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 2px; padding: 24px 14px; background: var(--paper); border-right: 1px solid var(--line); }
.nav__brand { display: block; padding: 0 10px 18px; font-weight: 600; font-size: 17px; color: var(--ink); }
.nav__logo { display: block; width: 168px; height: auto; }
.nav__brand:hover { text-decoration: none; }
.nav__link { padding: 8px 10px; border-radius: var(--radius); color: var(--ink-2); font-weight: 500; }
.nav__link:hover { background: var(--paper-2); text-decoration: none; }
.nav__link--active { background: var(--accent-soft); color: var(--accent); }
.nav__link--quiet { margin-top: 8px; color: var(--ink-3); font-weight: 400; font-size: 14px; }
.nav__jobs { margin-top: auto; }
.main { padding: 28px 40px 64px; min-width: 0; max-width: 1240px; }

.job-status { display: flex; gap: 10px; padding: 10px; border-radius: var(--radius); color: var(--ink-2); font-size: 13px; line-height: 1.4; }
.job-status--busy { background: var(--accent-soft); color: var(--ink); }
.job-status:hover { text-decoration: none; }
.job-status__dot { flex: none; width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--accent); animation: pulse 1.4s ease-in-out infinite; }
.job-status__text { min-width: 0; overflow-wrap: anywhere; }
@keyframes pulse { 50% { opacity: .3; } }

/* Page head */
.back { display: inline-block; margin-bottom: 10px; font-size: 14px; color: var(--ink-3); }
.back::before { content: "\2190\00a0"; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 16px 24px; margin-bottom: 22px; }
.page-head__title { margin: 0; font-size: 28px; line-height: 1.2; font-weight: 600; letter-spacing: -.01em; }
.page-head__sub { margin: 6px 0 0; color: var(--ink-2); max-width: 760px; }
.page-head__actions { display: flex; gap: 8px; flex: none; }
.page-head__product { display: flex; gap: 16px; align-items: center; flex: 1 1 380px; min-width: 0; }
.page-head__img { width: 72px; height: 72px; object-fit: contain; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); }

/* Buttons and inputs */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--paper); color: var(--ink); font-weight: 500; cursor: pointer; white-space: nowrap; }
.button:hover { border-color: var(--ink-3); text-decoration: none; }
.button:disabled { opacity: .45; cursor: default; }
.button--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.button--primary:hover { background: #2f33a8; border-color: #2f33a8; }
.button--quiet { border-color: transparent; background: transparent; color: var(--ink-2); }
.button--quiet:hover { background: var(--paper); border-color: var(--line); }
.button--small { padding: 4px 10px; font-size: 14px; }
.input { width: 100%; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--paper); }
.input:focus, .button:focus-visible, .check:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.input--wide { min-width: 280px; }
textarea.input { resize: vertical; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }

.check { width: 20px; height: 20px; border: 1.5px solid var(--line-2); border-radius: 4px; background: var(--paper); cursor: pointer; padding: 0; }
.check--on { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 3px var(--paper); }

.toolbar { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; flex-wrap: wrap; }
.toolbar__search { max-width: 280px; }
.toolbar__note { margin: 0 0 12px; color: var(--ink-3); font-size: 14px; }
.toolbar .toolbar__note { margin: 0; }

.segmented { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; background: var(--paper); }
.segmented__opt { padding: 6px 14px; border: 0; background: transparent; cursor: pointer; color: var(--ink-2); text-transform: capitalize; }
.segmented__opt + .segmented__opt { border-left: 1px solid var(--line); }
.segmented__opt--on { background: var(--ink); color: #fff; }

/* Tags and states */
.tag { display: inline-block; margin-right: 4px; padding: 1px 7px; border-radius: 4px; background: var(--paper-2); border: 1px solid var(--line); color: var(--ink-2); font-size: 12.5px; font-weight: 500; line-height: 1.6; white-space: nowrap; text-transform: capitalize; }
.tag--link:hover { text-decoration: none; border-color: var(--line-2); }
.tag--direct { background: var(--direct-soft); border-color: transparent; color: var(--direct); }
.tag--indirect { background: var(--indirect-soft); border-color: transparent; color: var(--indirect); }
.tag--own { background: var(--own-soft); border-color: transparent; color: var(--own); }
.trend { font-size: 13px; font-weight: 500; color: var(--ink-3); white-space: nowrap; }
.trend--rising { color: var(--rising); }
.trend--steady { color: var(--ink-2); }
.trend--stalled, .trend--slowing { color: var(--ink-3); }
.health { font-weight: 500; text-transform: capitalize; }
.health--strong { color: var(--rising); }
.health--thin, .health--unknown { color: var(--ink-3); }
.status { font-size: 13px; font-weight: 500; text-transform: capitalize; }
.status--running { color: var(--accent); }
.status--failed { color: var(--error); }
.status--done { color: var(--ok); }
.status--queued, .status--cancelled { color: var(--ink-3); }
.claim { font-size: 13px; font-weight: 500; white-space: nowrap; text-transform: capitalize; }
.claim--likely_authorised { color: var(--ok); }
.claim--unclear { color: var(--indirect); }
.claim--likely_not_authorised, .claim--disease_claim { color: var(--error); }

.notice { margin: 0 0 16px; padding: 10px 14px; border-radius: var(--radius); background: var(--accent-soft); color: var(--ink); }
.notice--error { background: var(--error-soft); color: var(--error); }
.notice--live { display: flex; gap: 12px; align-items: flex-start; }
.notice__dot { flex: none; width: 9px; height: 9px; margin-top: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.4s ease-in-out infinite; }
.notice__line { margin: 0; font-weight: 500; }
.notice__next { margin: 2px 0 0; font-size: 14px; color: var(--ink-2); }
.toolbar__actions { display: flex; gap: 8px; margin-left: auto; align-items: center; }
.form-actions__right { display: flex; gap: 8px; }
.empty { padding: 28px; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--ink-2); background: var(--paper); }

/* Tables */
.table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; }
.table th { padding: 10px 12px; text-align: left; font-size: 13px; font-weight: 500; color: var(--ink-3); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table th.num { text-align: right; }
.table__check { width: 44px; }
.table__row--on { background: #fafaff; }
.table__actions { text-align: right; }
.table--form td { vertical-align: top; }
.cell-wrap { white-space: normal !important; min-width: 260px; max-width: 520px; }
.product-cell { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 500; }
.product-cell__img { width: 36px; height: 36px; flex: none; object-fit: contain; border-radius: 4px; background: var(--paper-2); }

/* Product page */
.facts { display: flex; flex-wrap: wrap; gap: 0; margin: 0 0 18px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.facts__item { display: flex; flex-direction: column; padding: 12px 20px; border-right: 1px solid var(--line); min-width: 120px; }
.facts__item:last-child { border-right: 0; }
.facts__label { font-size: 13px; color: var(--ink-3); }
.facts__value { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.facts__value--small { font-size: 15px; font-weight: 500; line-height: 1.4; padding-top: 4px; }

/* Research status: one block, not a menu */
.research { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 16px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.research--running { border-color: var(--accent); background: var(--accent-soft); }
.research--failed { border-color: var(--error); background: var(--error-soft); }
.research__line { flex: 1 1 420px; margin: 0; display: flex; gap: 10px; align-items: baseline; }
.research__dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); align-self: center; animation: pulse 1.4s ease-in-out infinite; }
.research__actions { display: flex; gap: 8px; }
.research__track { flex: 1 0 100%; display: flex; flex-wrap: wrap; gap: 4px 0; margin: 2px 0 0; padding: 0; list-style: none; font-size: 13.5px; }
.research__step { display: flex; align-items: center; color: var(--ink-3); }
.research__step + .research__step::before { content: ""; width: 18px; height: 1px; margin: 0 8px; background: var(--line-2); }
.research__step--done { color: var(--ink-2); }
.research__step--now { color: var(--accent); font-weight: 600; }
.research__step--failed { color: var(--error); font-weight: 600; }

.tabs { display: flex; flex-wrap: wrap; gap: 0 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs__tab { padding: 10px 14px; color: var(--ink-2); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs__tab:hover { text-decoration: none; color: var(--ink); }
.tabs__tab--on { color: var(--ink); border-bottom-color: var(--ink); }
.tabs__count { color: var(--ink-3); font-weight: 400; }

.creatives { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.creative { display: grid; grid-template-columns: 28px 64px minmax(0, 1fr) auto 120px; gap: 16px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.creative:last-child { border-bottom: 0; }
.creative__rank { color: var(--ink-3); font-size: 14px; font-variant-numeric: tabular-nums; text-align: right; }
.creative__thumb { display: block; width: 64px; height: 96px; border-radius: 4px; overflow: hidden; background: var(--paper-2); }
.creative__thumb img { width: 100%; height: 100%; object-fit: cover; }
.creative__nothumb { display: grid; place-items: center; height: 100%; font-size: 11px; color: var(--ink-3); text-align: center; }
.creative__main { min-width: 0; }
.creative__who { margin: 0 0 2px; font-weight: 500; }
.creative__who a { color: var(--ink); }
.creative__copy { margin: 0; color: var(--ink-2); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.creative__meta { margin: 2px 0 0; font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.creative__nums { display: grid; grid-template-columns: repeat(4, 64px); gap: 4px; margin: 0; text-align: right; }
.creative__nums dt { font-size: 12px; color: var(--ink-3); }
.creative__nums dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; }
.creative__nums > div { cursor: help; }
.avg { margin-left: 3px; font-size: 11px; font-weight: 400; color: var(--ink-3); }
.creative__side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

.terms .input { min-width: 90px; }
.merge { margin-top: 32px; padding-top: 8px; border-top: 1px solid var(--line); }
.merge__select { max-width: 420px; }
.form-actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; }

.rows { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.rows__row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.rows__row:last-child { border-bottom: 0; }
.rows__item { border-bottom: 1px solid var(--line); padding: 0 16px; }
.rows__item:last-child { border-bottom: 0; }
.rows__item[open] { padding-bottom: 14px; }
.rows__summary { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; cursor: pointer; list-style: none; }
.rows__summary::-webkit-details-marker { display: none; }
.rows__n { flex: none; width: 26px; height: 26px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--paper-2); font-size: 13px; font-weight: 600; }
.rows__title { flex: 1; min-width: 0; font-weight: 500; }

/* Reading layouts */
.reading { max-width: 880px; }
.reading p, .reading li { color: var(--ink); }
.section { margin: 0 0 28px; }
.h1 { margin: 0 0 14px; font-size: 26px; line-height: 1.25; font-weight: 600; }
.h2 { margin: 0 0 10px; font-size: 19px; font-weight: 600; }
.h3 { margin: 20px 0 6px; font-size: 16px; font-weight: 600; }
.lead { font-size: 18px; margin: 0 0 14px; }
.list { margin: 0; padding-left: 20px; }
.list li { margin: 4px 0; }
.list--tight { padding-left: 18px; }
.list--tight li { margin: 2px 0; }
.list--quotes li { margin: 10px 0; }
.details summary { cursor: pointer; color: var(--accent); margin: 16px 0 6px; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.kv { margin: 0; }
.kv__row { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.kv__row dt { color: var(--ink-3); font-size: 14px; }
.kv__row dd { margin: 0; }
.block { padding: 16px 0; border-bottom: 1px solid var(--line); }
.evidence { margin: 8px 0 0; font-size: 14px; color: var(--ink-3); }

.frames { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.frames__frame { flex: none; margin: 0; width: 150px; }
.frames__frame img { width: 100%; border-radius: 4px; border: 1px solid var(--line); background: var(--paper); }
.frames__frame figcaption { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.frames__frame--hook figcaption { color: var(--accent); font-weight: 500; }
.frames__frame--image { width: 280px; }
.frames__frame--phone { width: 220px; }
.transcript { list-style: none; margin: 0; padding: 0; }
.transcript li { display: grid; grid-template-columns: 44px 1fr; gap: 8px; padding: 3px 0; }
.transcript__t { color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; padding-top: 2px; }

.report { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 28px; max-width: 1100px; }
.report__nav { position: sticky; top: 24px; align-self: start; display: flex; flex-direction: column; gap: 2px; }
.report__link { padding: 7px 10px; border-radius: var(--radius); color: var(--ink-2); }
.report__link:hover { background: var(--paper); text-decoration: none; }
.report__link--on { background: var(--paper); color: var(--ink); font-weight: 500; box-shadow: inset 2px 0 0 var(--ink); }
.report__meta { margin: 14px 10px 0; font-size: 13px; color: var(--ink-3); }
.report__body { min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 36px; }
.conclusions { margin: 0 0 22px; padding-left: 22px; }
.conclusions li { margin: 8px 0; padding-left: 4px; }
.start { padding: 16px 20px; background: var(--accent-soft); border-radius: var(--radius); margin-bottom: 18px; }
.start p { margin: 6px 0 0; }
.ice { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 0; flex: none; text-align: right; }
.ice__total { font-weight: 600; font-variant-numeric: tabular-nums; }
.ice__parts { max-width: 96px; font-size: 12px; line-height: 1.35; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.card__note--top { margin: -4px 0 8px; }
.todo__kind { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--ink-3); }
.todo__kind strong { font-weight: 600; color: var(--ink-2); }
.ice-meter__n { min-width: 34px; }

/* Overview: cards and charts. Series 1 blue, series 2 orange (dataviz palette, validated on white). */
:root { --series-1: #2a78d6; --series-2: #eb6834; --track: #eef0f3; }
.card { margin: 0 0 16px; padding: 18px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card__title { margin: 0; font-size: 17px; font-weight: 600; }
.card__meta { font-size: 13px; color: var(--ink-3); }
.card__actions { display: flex; gap: 8px; }
.card__sub { margin: 16px 0 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: .02em; }
.card__sub:first-of-type { margin-top: 4px; }
.card__note { margin: 12px 0 0; font-size: 13px; color: var(--ink-3); }
.ov-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ov-grid > .card { margin-bottom: 16px; }
@media (max-width: 1150px) {
  .ov-grid { grid-template-columns: 1fr; gap: 0; }
  /* Report and ad pages: the section menu goes above the text so the reading column keeps its width. */
  .report { grid-template-columns: 1fr; gap: 12px; }
  .report__nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .report__meta { margin: 0 0 0 auto; align-self: center; }
}
.ov-start { margin: 0 0 16px; padding: 16px 20px; border-radius: var(--radius); background: var(--accent-soft); }
.ov-start__title { margin: 0 0 6px; font-size: 15px; font-weight: 600; }
.ov-start__text { margin: 0; font-size: 16px; }
.ov-start__concept { margin: 8px 0 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); }

.bars { list-style: none; margin: 0; padding: 0; }
.bars__row { display: grid; grid-template-columns: minmax(120px, 34%) minmax(0, 1fr); gap: 12px; align-items: center; padding: 5px 0; }
.bars__label { min-width: 0; font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.bars__sub { display: block; font-size: 12px; color: var(--ink-3); }
.bars__track { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bars__bar { display: block; height: 12px; min-width: 2px; border-radius: 0 4px 4px 0; background: var(--series-1); cursor: default; }
.bars__bar--s2 { background: var(--series-2); }
.bars__bar:hover, .bars__bar:focus-visible { filter: brightness(1.12); outline: none; }
.bars__value { flex: none; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Bars that open to their ads */
.bars__open > summary { list-style: none; cursor: pointer; border-radius: 4px; }
.bars__open > summary::-webkit-details-marker { display: none; }
.bars__open > summary:hover { background: var(--paper-2); }
.bars__open > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.bars__row--open .bars__label::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px; border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3); transform: rotate(-45deg); vertical-align: 2px; transition: transform .15s; }
.bars__open[open] .bars__row--open .bars__label::after { transform: rotate(45deg); vertical-align: 4px; }
.bars__items { list-style: none; margin: 2px 0 10px; padding: 8px 12px; border-left: 2px solid var(--line-2); background: var(--paper-2); border-radius: 0 var(--radius) var(--radius) 0; }
.bars__items li { padding: 5px 0; font-size: 14px; }
.bars__items li + li { border-top: 1px solid var(--line); }
.bars__items a { font-weight: 500; }
.bars__itemtext { display: block; color: var(--ink-2); font-size: 13.5px; }
.bars__more > summary { margin: 4px 0 0; cursor: pointer; color: var(--accent); font-size: 14px; list-style: none; }
.bars__more > summary::-webkit-details-marker { display: none; }
.bars__more[open] > summary { display: none; }

.share__bar { display: flex; gap: 2px; height: 14px; }
.share__part { display: block; height: 100%; }
.share__part--1 { background: var(--series-1); border-radius: 4px 0 0 4px; }
.share__part--2 { background: #c9ced6; border-radius: 0 4px 4px 0; }
.share__labels { display: flex; justify-content: space-between; margin-top: 6px; font-size: 13px; color: var(--ink-2); }
.swatch { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 2px; vertical-align: -1px; background: var(--series-1); }
.swatch--2 { background: var(--series-2); }
.swatch--muted { background: #c9ced6; }
.legend { display: flex; gap: 14px; margin: 0; font-size: 13px; color: var(--ink-2); }

.cols { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; height: 130px; }
.cols__col { display: grid; grid-template-rows: 18px 1fr 18px; justify-items: center; min-width: 0; }
.cols__value { font-size: 12px; color: var(--ink-2); }
.cols__area { display: flex; align-items: flex-end; width: 100%; justify-content: center; border-bottom: 1px solid #c3c2b7; }
.cols__bar { display: block; width: min(24px, 70%); min-height: 2px; border-radius: 4px 4px 0 0; background: var(--series-1); }
.cols__bar:hover, .cols__bar:focus-visible { filter: brightness(1.12); outline: none; }
.cols__label { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }

.fit { margin: 0; }
.fit__row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.fit__row:last-child { border-bottom: 0; }
.fit__row dt { font-size: 13px; color: var(--ink-3); }
.fit__row dd { margin: 0; font-size: 14.5px; }

.todo { list-style: none; margin: 0; padding: 0; }
.todo__row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.todo__row:last-child { border-bottom: 0; }
.todo__title { font-weight: 500; min-width: 0; }
.todo__meta { font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.ice-meter { display: inline-flex; align-items: center; gap: 6px; }
.ice-meter__track { display: block; width: 56px; height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; }
.ice-meter__fill { display: block; height: 100%; background: var(--series-1); border-radius: 3px; }
.ice-meter__n { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 18px; }

.spark { display: block; }
.spark__line { stroke: var(--series-1); }
.spark__dot { fill: var(--series-1); stroke: var(--paper); stroke-width: 2; }
.spark--empty { display: inline-block; width: 96px; height: 26px; }
.table--movers td { vertical-align: middle; }
.cell-clip { max-width: 260px; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.tag--new { background: var(--accent-soft); border-color: transparent; color: var(--accent); }

.tip { position: fixed; z-index: 20; display: none; max-width: 320px; padding: 8px 10px; border-radius: var(--radius); background: var(--ink); color: #fff; font-size: 13px; line-height: 1.4; pointer-events: none; box-shadow: 0 4px 16px rgb(0 0 0 / .18); }
.tip strong { font-weight: 600; }

/* Ad page */
.ad-head__main { display: flex; gap: 16px; align-items: flex-start; }
.ad-head__thumb { width: 64px; height: 96px; flex: none; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); }
.ad-head__facts { margin: 6px 0 0; color: var(--ink-2); font-size: 15px; font-variant-numeric: tabular-nums; }
.report__count { display: inline-block; min-width: 20px; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--paper-2); font-size: 12px; font-weight: 600; text-align: center; }
.report__count--bad { background: var(--error-soft); color: var(--error); }
.kv--wide .kv__row { grid-template-columns: 170px minmax(0, 1fr); padding: 9px 0; }
.section-gap { margin-top: 26px; }
.frames--hook .frames__frame { width: 170px; }
.quote { margin: 12px 0 0; padding: 12px 16px; border-left: 3px solid var(--accent); background: var(--paper-2); border-radius: 0 var(--radius) var(--radius) 0; }
.quote__label { display: inline-block; min-width: 76px; font-size: 13px; color: var(--ink-3); }
.claims { list-style: none; margin: 16px 0 0; padding: 0; }
.claims__item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.claims__item:last-child { border-bottom: 0; }
.claims__text { margin: 4px 0 2px; }
.claims__note { margin: 0; font-size: 14px; }
.next-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); }
.next-links a { font-weight: 500; }

.prompt { margin-top: 8px; font-family: ui-monospace, Consolas, monospace; font-size: 13px; line-height: 1.5; resize: vertical; }

/* Keys in Settings */
.key { padding: 16px 20px; margin: 0 0 12px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.key__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.key__title { margin: 0; }
.key__state { margin: 0; }
.key__form { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; flex-wrap: wrap; }
.key__form .input { flex: 1 1 320px; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 4px; margin: 0 0 14px; }
.field__label { font-size: 14px; font-weight: 500; color: var(--ink-2); }
.field__hint { font-size: 13px; color: var(--ink-3); }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 16px; }

/* Sign-in page */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login__card { width: 100%; max-width: 380px; padding: 32px 28px 28px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.login__logo { width: 150px; height: auto; margin-bottom: 22px; }
.login__title { margin: 0; font-size: 24px; line-height: 1.25; font-weight: 600; letter-spacing: -.01em; }
.login__sub { margin: 4px 0 22px; color: var(--ink-3); font-size: 15px; }
.login__error { margin: 0 0 16px; padding: 10px 12px; border-radius: var(--radius); background: var(--error-soft); color: var(--error); font-size: 14px; font-weight: 500; }
.login__card .input { padding: 10px 12px; }
.login__submit { width: 100%; margin-top: 6px; padding: 10px 14px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: min(560px, calc(100vw - 32px)); padding: 10px 16px; border-radius: var(--radius); background: var(--ink); color: #fff; box-shadow: 0 6px 24px rgb(0 0 0 / .18); z-index: 10; }
.toast--error { background: var(--error); }
.toast__link { margin-left: 12px; color: #fff; font-weight: 600; text-decoration: underline; }

/* Feedback: the tab on the right edge, the selection overlay, the note form, the inbox */
.nav__count { display: inline-block; min-width: 20px; margin-left: 4px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 600; line-height: 18px; text-align: center; }
.nav__count[hidden] { display: none; }
.fb-trigger { position: fixed; right: 0; top: 50%; z-index: 40; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; width: 30px; padding: 14px 0; border: 0; border-radius: 10px 0 0 10px; background: var(--ink); color: #fff; font: 600 12px/1 var(--font); letter-spacing: .02em; writing-mode: vertical-rl; cursor: pointer; box-shadow: 0 6px 20px rgb(0 0 0 / .18); }
.fb-trigger:hover { background: #000; }
.fb-trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fb-trigger svg { transform: rotate(90deg); }
.fb-trigger[hidden] { display: none; }
body.fb-active { overflow: hidden; }
.fb-layer { position: fixed; inset: 0; z-index: 1000; }
.fb-select { position: absolute; inset: 0; cursor: crosshair; touch-action: none; user-select: none; outline: none; }
.fb-select__help { position: absolute; z-index: 2; top: 16px; left: 50%; transform: translateX(-50%); margin: 0; max-width: calc(100vw - 24px); padding: 8px 16px; border-radius: 20px; background: var(--paper); color: var(--ink); font-size: 14px; font-weight: 500; text-align: center; box-shadow: 0 6px 20px rgb(0 0 0 / .18); pointer-events: none; }
.fb-select__shade { position: absolute; inset: 0; background: rgb(20 24 33 / .45); pointer-events: none; }
.fb-select__box { position: absolute; border: 2px solid var(--accent); border-radius: 4px; box-shadow: 0 0 0 9999px rgb(20 24 33 / .45); pointer-events: none; }
.fb-select__size { position: absolute; top: 6px; right: 6px; padding: 1px 6px; border-radius: 4px; background: var(--paper); color: var(--ink-2); font-size: 11px; font-weight: 600; white-space: nowrap; }
.fb-backdrop { position: absolute; inset: 0; background: rgb(20 24 33 / .25); }
.fb-composer { position: absolute; display: flex; flex-direction: column; gap: 12px; padding: 18px; overflow-y: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 16px 48px rgb(0 0 0 / .22); outline: none; }
.fb-composer > * { flex-shrink: 0; }
.fb-composer .field { margin: 0; }
.fb-composer__head, .fb-composer__row, .fb-composer__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fb-composer__title { margin: 0; font-size: 17px; font-weight: 600; }
.fb-composer__preview { display: grid; place-items: center; min-height: 110px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-2); overflow: hidden; }
.fb-composer__img { max-width: 100%; max-height: 200px; object-fit: contain; }
.fb-composer__busy { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.fb-composer__hide { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.fb-composer__types { display: flex; }
.fb-composer__types .segmented__opt { flex: 1; padding: 6px 8px; }
.fb-composer__text { resize: vertical; min-height: 84px; }
.fb-composer__error { padding: 8px 10px; border-radius: var(--radius); background: var(--error-soft); color: var(--error); font-size: 14px; }
.fb-composer__error[hidden] { display: none; }
.fb-composer__hint { font-size: 12.5px; color: var(--ink-3); }
.fb-tag { margin: 0; text-transform: none; }
.fb-tag--bug { background: var(--error-soft); border-color: transparent; color: var(--error); }
.fb-tag--design, .fb-tag--open { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.fb-tag--data, .fb-tag--in_progress { background: var(--indirect-soft); border-color: transparent; color: var(--indirect); }
.fb-tag--idea, .fb-tag--fixed { background: #e8f4ec; border-color: transparent; color: var(--ok); }
.fb-tag--wont_fix { color: var(--ink-3); }
.fb-type { width: auto; }
.fb-table__row { cursor: pointer; }
.fb-table__row:hover { background: var(--paper-2); }
.fb-status-opt { text-transform: none; }
.fb-thumb { width: 64px; max-width: none; height: 40px; object-fit: cover; border: 1px solid var(--line); border-radius: 4px; background: var(--paper-2); }
.fb-table__id { font-weight: 600; color: var(--ink); }
.fb-table__text { max-width: 380px; overflow: hidden; text-overflow: ellipsis; }
.fb-drawer { position: fixed; inset: 0 0 0 auto; width: min(560px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; border-left: 1px solid var(--line); background: var(--paper); color: var(--ink); box-shadow: -12px 0 40px rgb(0 0 0 / .14); }
.fb-drawer[open] { display: flex; flex-direction: column; }
.fb-drawer::backdrop { background: rgb(20 24 33 / .3); }
.fb-drawer__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.fb-drawer__title { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 19px; font-weight: 600; }
.fb-drawer__body { flex: 1; overflow-y: auto; padding: 16px 20px 24px; }
.fb-drawer__body .card__sub { margin-top: 22px; }
.fb-drawer__meta { margin: 0 0 12px; font-size: 14px; }
.fb-drawer__shot { display: block; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-2); overflow: hidden; }
.fb-drawer__shot img { margin: 0 auto; max-height: 320px; object-fit: contain; }
.fb-drawer__status { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; font-size: 13px; }
.fb-drawer__text { margin: 14px 0 0; }
.fb-drawer__context { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); }
.fb-drawer__facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 14px 0 16px; font-size: 14px; }
.fb-drawer__facts dt { color: var(--ink-3); }
.fb-drawer__facts dd { margin: 0; overflow-wrap: anywhere; }
.fb-drawer__field { margin-top: 20px; }
.fb-drawer__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); }
.fb-drawer__foot .button--primary { margin-left: auto; }
.fb-drawer__delete { color: var(--error); }
.fb-drawer__confirm { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.fb-drawer__confirm[hidden] { display: none; }

@media (max-width: 900px) {
  /* align-content: a short page must not stretch the menu row. */
  .shell { grid-template-columns: 1fr; align-content: start; }
  .nav { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .nav__brand { padding: 0 10px 0 0; }
  .nav__logo { width: 120px; }
  .nav__link--quiet { margin: 0 0 0 auto; }
  .nav__jobs { order: 5; margin-top: 0; width: 100%; }
  .nav__jobs:empty { display: none; }
  .main { padding: 20px 16px 48px; }
  .page-head { flex-direction: column; }
  .creative { grid-template-columns: 56px minmax(0, 1fr); }
  .creative__rank { display: none; }
  .creative__thumb { width: 56px; height: 84px; }
  .creative__nums, .creative__side { grid-column: 2; justify-content: start; align-items: flex-start; text-align: left; }
  .creative__side { flex-direction: row; }
  .two-col, .report, .ov-grid { grid-template-columns: 1fr; }
  .bars__row { grid-template-columns: minmax(100px, 40%) minmax(0, 1fr); }
  .todo__meta { display: none; }  .report__nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .report__body { padding: 20px 16px; }
  .kv__row { grid-template-columns: 110px minmax(0, 1fr); }
}
