/* Ads Desk tracker. Tokens copied from dashboard/rr-ads-desk.html (system fonts, no remote requests). */
:root {
  --bg: #f4f5f2;
  --surface: #fcfcfb;
  --surface-2: #eef0ec;
  --ink: #14171c;
  --ink-2: #4f555c;
  --ink-3: #62686f;
  --rule: #dcdfd9;
  --accent: #2066c0;
  --pending: #b9bdb6;
  --good: #17703f;
  --good-bg: #e3f2e8;
  --warn: #8a5700;
  --warn-bg: #fbefd6;
  --bad: #b3372d;
  --bad-bg: #fbe4e1;
  --info-bg: #e4eefb;
  --display: "Arial Narrow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #111315;
    --surface: #1a1d20;
    --surface-2: #22262a;
    --ink: #eef0ec;
    --ink-2: #b9bec4;
    --ink-3: #9aa0a7;
    --rule: #2e3338;
    --accent: #5b9cec;
    --pending: #5b6066;
    --good: #6fd39b;
    --good-bg: #15301f;
    --warn: #f0bf5a;
    --warn-bg: #352812;
    --bad: #f08a80;
    --bad-bg: #3a1a17;
    --info-bg: #172a42;
  }
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 var(--body);
  padding-inline: 16px;
}
.wrap {
  max-width: 1120px;
  margin: 0 auto;
}
h1,
h2,
h3 {
  font-family: var(--display);
  margin: 0;
  line-height: 1.2;
  text-wrap: balance;
}
h1 {
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 700;
}
h2 {
  font-size: 20px;
  font-weight: 600;
}
h3 {
  font-size: 16px;
  font-weight: 600;
}
p {
  margin: 0;
}
a {
  color: var(--accent);
  text-underline-offset: 2px;
}
a:hover {
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
code {
  font-family: var(--mono);
  font-size: 0.92em;
  background: var(--surface-2);
  padding: 0 3px;
  border-radius: 3px;
  overflow-wrap: anywhere;
}
.mono,
time {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.muted {
  color: var(--ink-2);
}
.small {
  font-size: 13px;
}
.eyebrow {
  font: 600 11.5px/1.3 var(--body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  background: var(--surface);
  padding: 8px 12px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  z-index: 10;
}
.skip-link:focus {
  top: 8px;
}

/* Header and nav */
.site-header {
  border-bottom: 1px solid var(--rule);
  margin-inline: -16px;
  padding: 10px 16px;
  background: var(--surface);
}
.nav-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
}
.brand {
  font: 700 15px/1 var(--display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}
.nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-link {
  display: inline-block;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 500;
}
.nav-link:hover {
  background: var(--surface-2);
  color: var(--ink);
}
.nav-link[aria-current="page"] {
  background: var(--info-bg);
  color: var(--ink);
  font-weight: 600;
}
.who {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-2);
}
.inline-form {
  display: inline;
  margin: 0;
}

/* Layout */
.banners {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.main {
  display: grid;
  gap: 24px;
  padding-block: 20px 32px;
}
.main:focus {
  outline: none;
}
.footer {
  padding-block: 12px 32px;
  border-top: 1px solid var(--rule);
}
.page-head {
  display: grid;
  gap: 8px;
}
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: center;
  font-size: 13px;
  color: var(--ink-2);
}
.panel {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 16px;
  display: grid;
  gap: 12px;
  min-width: 0;
}
.two-col,
.waiting-grid {
  display: grid;
  gap: 16px;
}
@media (min-width: 768px) {
  .waiting-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}
@media (min-width: 1024px) {
  .two-col {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

/* Banners */
.banner,
.flash {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--rule);
}
.banner-stale {
  background: var(--warn-bg);
  color: var(--ink);
  border-color: var(--warn);
}
.flash {
  background: var(--info-bg);
  color: var(--ink);
}
.flash-check {
  color: var(--good);
  font-weight: 700;
}
.panel-error {
  border-color: var(--bad);
  border-left-width: 4px;
}
.panel-error h2 {
  color: var(--bad);
}
.panel-warn {
  border-color: var(--warn);
  border-left-width: 4px;
}

/* Chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 600 11.5px/1 var(--body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 8px;
  border-radius: 999px;
  white-space: nowrap;
  background: var(--surface-2);
  color: var(--ink-2);
}
.chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.chip.unknown::before,
.chip.other::before {
  content: "·";
  width: auto;
  height: auto;
  background: none;
}
.chip.proposed,
.chip.provisional {
  background: var(--warn-bg);
  color: var(--warn);
}
.chip.approved,
.chip.applied,
.chip.holds {
  background: var(--good-bg);
  color: var(--good);
}
.chip.held {
  background: var(--info-bg);
  color: var(--ink);
}
.chip.rejected,
.chip.wrong {
  background: var(--bad-bg);
  color: var(--bad);
}
.chip.judged {
  background: var(--surface-2);
  color: var(--ink-2);
}
.chip.other,
.chip.unknown {
  background: var(--surface-2);
  color: var(--ink-3);
}
.status-text {
  display: block;
  font-size: 13px;
  color: var(--ink-2);
  margin-top: 4px;
  overflow-wrap: anywhere;
}

/* Waiting-on */
.waiting-col {
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 0;
}
.waiting-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.waiting-item {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 12px 14px;
  display: grid;
  gap: 4px;
}
.waiting-title {
  overflow-wrap: anywhere;
}
.due-badge {
  font-size: 13px;
  color: var(--ink-2);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: center;
}
.overdue-word {
  color: var(--bad);
  font-weight: 700;
}
.unclear {
  color: var(--ink-3);
}
.open-link {
  justify-self: end;
  font-weight: 600;
}
.empty {
  color: var(--ink-2);
  background: var(--surface);
  border: 1px dashed var(--rule);
  border-radius: 8px;
  padding: 14px;
}

/* Milestones and agent card */
.milestones {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.milestones li {
  display: grid;
  grid-template-columns: minmax(118px, auto) minmax(0, 1fr);
  gap: 4px 12px;
}
.milestones li > * {
  min-width: 0;
  overflow-wrap: anywhere;
}
.agent-card h3 {
  margin-top: 4px;
}
.bad-text {
  color: var(--bad);
  font-weight: 700;
}
.warn-text {
  color: var(--warn);
  font-weight: 600;
}
.link-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--surface);
  max-width: 100%;
}
@media (max-width: 1023px) {
  /* Below 1024px the Changes/Plan/Proposals tables scroll inside .table-wrap, but a
     touch device hides its scrollbar until dragged, so nothing on screen said "there's
     more, scroll right" (found scanning the 375px screenshots). A right-edge fade does. */
  .table-wrap {
    -webkit-mask-image: linear-gradient(
      to right,
      #000 calc(100% - 20px),
      transparent 100%
    );
    mask-image: linear-gradient(
      to right,
      #000 calc(100% - 20px),
      transparent 100%
    );
  }
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 720px;
  font-size: 14px;
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 9px 12px;
  border-bottom: 1px solid var(--rule);
}
th {
  font: 600 12px/1.3 var(--body);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: var(--surface-2);
}
tbody tr:last-child td {
  border-bottom: 0;
}
td.wide {
  min-width: 260px;
}
.row-notes td {
  background: var(--bg);
  padding-top: 4px;
}
.parsed-date {
  display: block;
  font-size: 12px;
  color: var(--ink-2);
}
.row-cards {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 10px;
}
.row-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 12px 14px;
  display: grid;
  gap: 6px;
}
.row-card .row-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
@media (max-width: 639px) {
  .proposals-table {
    display: none;
  }
  .row-cards {
    display: grid;
  }
}

/* Rendered markdown */
.panel > *,
.prose > * {
  min-width: 0;
}
.prose {
  display: grid;
  min-width: 0;
  gap: 10px;
  overflow-wrap: anywhere;
}
.prose ul,
.prose ol {
  margin: 0;
  padding-left: 22px;
}
.prose table {
  display: block;
  width: max-content;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-wrap: normal;
}
.prose td,
.prose th {
  min-width: 72px;
}

/* Forms */
label {
  font-weight: 600;
  font-size: 14px;
}
input[type="text"],
textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 8px 10px;
}
textarea {
  resize: vertical;
  min-height: 72px;
}
input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--bad);
}
.field {
  display: grid;
  gap: 4px;
}
.field-error {
  color: var(--bad);
  font-weight: 600;
  font-size: 13px;
}
.btn {
  font: 600 14px/1 var(--body);
  padding: 10px 16px;
  border-radius: 6px;
  border: 1px solid var(--rule);
  background: var(--surface-2);
  color: var(--ink);
  cursor: pointer;
  min-height: 40px;
}
.btn:hover {
  border-color: var(--ink-3);
}
.btn-good {
  background: var(--good-bg);
  color: var(--good);
  border-color: var(--good);
}
.btn-bad {
  background: var(--bad-bg);
  color: var(--bad);
  border-color: var(--bad);
}
.btn-hold {
  background: var(--info-bg);
  color: var(--ink);
  border-color: var(--accent);
}
.btn-quiet {
  padding: 6px 10px;
  min-height: 32px;
  font-size: 13px;
}
.decide-form form,
.note-form {
  display: grid;
  gap: 10px;
}
.decide-rows {
  display: grid;
  gap: 8px;
}
.decide-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: center;
}
.decide-row .btn {
  min-width: 110px;
}
.decide-preview {
  font-size: 13px;
  color: var(--ink-2);
  font-style: italic;
}
details > summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent);
  padding: 4px 0;
}
.notes {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}
.conflict-panel {
  border-color: var(--warn);
  border-left-width: 4px;
}
.conflict-current {
  background: var(--surface-2);
  border-radius: 6px;
  padding: 10px 12px;
  overflow-wrap: anywhere;
  font-family: var(--mono);
  font-size: 13px;
}

/* Checklist */
.checklist {
  display: grid;
  gap: 10px;
}
.checklist h2 {
  margin-top: 18px;
  padding-top: 8px;
  border-top: 1px solid var(--rule);
}
.checklist h3 {
  margin-top: 8px;
}
.checklist-item {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 12px 14px;
}
.checklist-item.nested {
  margin-left: 24px;
}
.checklist-item form {
  display: grid;
  gap: 10px;
}
.item-label {
  display: flex;
  gap: 8px;
  align-items: baseline;
  overflow-wrap: anywhere;
}
.box,
.bullet {
  font-size: 18px;
  line-height: 1;
  flex: none;
}
.item-label .done {
  color: var(--good);
}
.slot-inline {
  display: inline-block;
  width: min(260px, 100%);
  margin: 2px 4px;
  padding: 4px 8px;
}
.slot-ref {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
}
.slot-stack {
  display: grid;
  gap: 8px;
}
.item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
}
.check {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.check input {
  width: 18px;
  height: 18px;
}
.para {
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
.para.nested {
  margin-left: 24px;
}

/* Login and error pages */
.center-card {
  max-width: 480px;
  margin: 24px auto;
}
.center-card .btn {
  justify-self: start;
}

@media (max-width: 639px) {
  .who {
    margin-left: 0;
    width: 100%;
  }
  .nav {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    /* Hints that Plan/Links sit off-screen to the right; no fade means no way
       to tell the row scrolls at all (found scanning the 375px screenshot). */
    -webkit-mask-image: linear-gradient(
      to right,
      #000 calc(100% - 28px),
      transparent 100%
    );
    mask-image: linear-gradient(
      to right,
      #000 calc(100% - 28px),
      transparent 100%
    );
  }
  .nav ul {
    flex-wrap: nowrap;
  }
  .decide-row {
    flex-direction: column;
    align-items: stretch;
  }
  .decide-row .btn,
  .item-actions .btn,
  .center-card .btn {
    width: 100%;
  }
  .slot-inline {
    display: block;
    width: 100%;
    margin: 6px 0;
  }
  .checklist-item.nested,
  .para.nested {
    margin-left: 12px;
  }
  .milestones li {
    grid-template-columns: minmax(0, 1fr);
  }
}
