/* Geodesix V0: the approvals platform's own stylesheet, one copy for all three V0 surfaces.

   Copied whole from v1-retailer/web/wireframe/style.css (the port plus the
   retailer's additions) with a V0 additions block at the end, and the same
   file sits in v0-retailer, v0-publisher and v0-admin. Drift between the
   three is corrected by copying again, never by editing one.

   This is a port of geodesix-approvals/src/app.css rather than a wireframe
   drawn to look like it. The approvals platform is built and live at
   geodesix.pages.dev, so the useful thing for this surface to show is what is
   actually on screen there: the same tokens, the same frame, the same card,
   table, badge, stat, form and login primitives. Nothing is shared between the
   two repos; drift is fine and is corrected by re-porting.

   Copied from v1-publisher/web/wireframe/style.css, which is the port itself:
   the two must stay in step, and drift between them is corrected by copying
   again rather than by editing both. docs/design-system.md records what the
   port contains and docs/ux-patterns.md the product decisions that come with
   it; those two files, not this one, are what a surface is brought onto the
   system from.

   Two local additions follow the port, at the end of the file: the V1 version
   banner, which every V1 page carries and the platform has no equivalent of,
   and the tab panel rule the wireframes' own tab controller needs. The fonts
   are named but not loaded, because a wireframe page opens from file:// with
   no remote assets; the stack falls back to the system face. */

/* Geodesix approvals. Ported from the main app's (app)/globals.css: the
   same tokens, the same frame (sidebar + topbar + content column), the
   same card, table, badge, stat, form and login primitives, so the two
   read as one product. Nothing is shared; drift is fine. */

:root {
  --pink-primary: #e91e8c;
  --pink-dark: #c4177a;
  --pink-press: #a51466;
  --pink-light: #f472b6;
  --red-accent: #e53935;
  --ink: #1a1a2e;
  --ink-2: #34344e;
  --muted: #5b626e;
  --faint: #69707d;
  --paper: #ffffff;
  --soft: #f9fafb;
  --soft-2: #f3f4f6;
  --pink-soft: #fdf2f8;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --control-border: #848b97;
  --on-dark: #ffffff;
  --on-dark-muted: #c7c8d6;
  --ok: #15803d;
  --warn: #b45309;
  --bad: #b91c1c;
  --radius: 10px;
  --sidebar-w: 232px;
  --topbar-h: 72px;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  color: var(--ink);
  background: var(--soft);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
h4 {
  font-weight: 700;
  letter-spacing: -0.4px;
  margin: 0;
}
p {
  margin: 0 0 10px;
}
:focus-visible {
  outline: 3px solid var(--pink-primary);
  outline-offset: 2px;
  border-radius: 4px;
}
.skiplink {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--on-dark);
  padding: 10px 16px;
  z-index: 100;
  border-radius: 0 0 8px 0;
}
.skiplink:focus {
  left: 0;
}
.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;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0.01ms !important;
    /* The logo's flicker is `infinite`, and a 0.01ms infinite animation
       is still an animation. Capping the count is what actually leaves
       the mark as static navy dots. */
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0.01ms !important;
  }
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 13px;
}
.nowrap {
  white-space: nowrap;
}
.link {
  color: var(--pink-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.link:hover {
  color: var(--pink-press);
}

/* ---------- App frame ---------- */

.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: calc(100vh - var(--bars-h, 0px));
}
.sidebar {
  background: var(--paper);
  border-right: 1px solid var(--line);
  padding: 0 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 0;
  /* Less whatever nav.js measures of the bars above the frame, so the
     sidebar's last item is on screen before the page scrolls. */
  height: calc(100vh - var(--bars-h, 0px));
  overflow-y: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  padding: 4px 8px 14px;
}
.sidebar .brand-row {
  flex: none;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin: 0 -14px 10px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
}
.sidebar .brand-row .brand {
  padding: 0;
  min-width: 0;
}
.brand .name {
  font-family: 'Sarabun', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 17px;
  line-height: 1.15;
}
.brand .name small {
  display: block;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.3px;
}
.nav-section h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--faint);
  margin: 14px 8px 4px;
  font-weight: 600;
}
.nav-section + .nav-section h4 {
  margin-top: 30px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink-2);
  font-size: 13.5px;
}
.nav-item:hover {
  background: var(--soft);
}
.nav-item.active {
  background: var(--pink-soft);
  color: var(--pink-dark);
  font-weight: 600;
}
.nav-item .nav-count {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  text-align: center;
  border-radius: 999px;
  background: var(--pink-dark);
  color: var(--on-dark);
}
.main-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  flex: none;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 28px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.topbar-start {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.topbar .title-wrap {
  min-width: 0;
}
.topbar .title-wrap h1 {
  font-size: 17px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-end {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.mobile-nav-toggle {
  display: none;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  cursor: pointer;
}
.mobile-nav-toggle:hover {
  background: var(--soft);
}
.mobile-nav-close {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}
.mobile-nav-close:hover {
  background: var(--soft);
  color: var(--ink);
}
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 30;
  border: 0;
  padding: 0;
  cursor: default;
  background: rgba(26, 26, 46, 0.35);
}
.content {
  padding: 24px 28px 48px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 1240px;
  width: 100%;
}

/* ---------- User chip ---------- */

.userchip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px 5px 6px;
  background: var(--paper);
  cursor: pointer;
  font-size: 13px;
}
.userchip .logo,
.userchip .logo-dots {
  flex: none;
}
.userchip .logo {
  border-radius: 50%;
  overflow: hidden;
}
.userchip .who {
  min-width: 0;
}
.entity-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}
.userchip .who b {
  display: block;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chipmenu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 240px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(26, 26, 46, 0.12);
  padding: 6px;
  z-index: 40;
}
.chipmenu a,
.chipmenu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  font: inherit;
  font-size: 13px;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}
.chipmenu a:hover,
.chipmenu button:hover {
  background: var(--soft);
}
.cm-sep {
  border-top: 1px solid var(--line);
  margin: 6px 4px;
}
.chipmenu .cm-pick {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  font: inherit;
  font-size: 13px;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
/* A light line between accounts, so the list reads as rows rather than
   one block. The set is what is separated, so the first row has none. */
.chipmenu .cm-accounts .cm-pick + .cm-pick {
  border-top: 1px solid var(--line);
}
.chipmenu .cm-pick:hover {
  background: var(--soft);
}
/* The account being shown is the largest thing in the list and sits on
   its own ground, which is the whole marking; there are no checkmarks
   (Evan, 2026-09-03). */
.chipmenu .cm-pick.current {
  background: var(--soft-2);
  font-weight: 700;
  font-size: 14px;
  padding: 11px 10px;
}
.chipmenu .cm-pick.current:hover {
  background: var(--line);
}
.cm-who {
  padding: 8px 10px;
  font-size: 13px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

/* ---------- Cards, stats, sections ---------- */

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.card > h3 {
  font-size: 15px;
  margin-bottom: 10px;
}
/* A second heading in the same card belongs to what follows it, not to
   the group above, so it opens a gap the heading's own 10px does not
   close (Evan, 2026-09-08). Notifications is three settings and one
   Save in one card. */
.card > .pickgroup + h3 {
  margin-top: 20px;
}
.card > h3 + p,
.card > .row-between + p,
.card > h3 + .muted,
.card > .row-between + .muted {
  margin-top: 0;
  margin-bottom: 14px;
}
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.row-between h3 {
  font-size: 15px;
}
.section-h {
  font-size: 15px;
  margin-bottom: 0;
}
.statgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}
.stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.stat .label {
  color: var(--muted);
  font-size: 12px;
}
.stat .value {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.stat .sub {
  color: var(--faint);
  font-size: 12px;
}
a.stat {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.12s ease, background 0.12s ease;
}
a.stat:hover,
a.stat:focus-visible {
  border-color: var(--control-border);
  background: var(--soft);
}
/* .stat.urgent no longer colors its figure: no number is red on any V1
   page (Evan, 2026-09-22). The class stays as a marker only. */
.cardcols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 18px;
}
.narrow {
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
/* A form that runs the width of the page: the same column of cards as
   .narrow without the ceiling, for a form with a table in it (Evan,
   2026-09-08). */
.wide {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ---------- Tables ---------- */

.tablewrap {
  overflow-x: auto;
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  background: var(--paper);
}
table.data th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  font-weight: 600;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
table.data th button.th-sort {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  color: inherit;
  cursor: pointer;
}
table.data th button.th-sort:hover {
  color: var(--ink);
}
table.data th .sort-ind {
  font-size: 9px;
  color: var(--faint);
}
table.data th .sort-ind.active {
  color: var(--pink-dark);
}
table.data td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
table.data tr[data-href] {
  cursor: pointer;
}
table.data tr[data-href]:hover td {
  background: var(--soft);
}
table.data td.actions {
  text-align: right;
  white-space: nowrap;
}
/* Inside an expansion row's own nested table, the Placement column lines up
   left under its own left-aligned header, rather than the page-level
   .actions right-alignment meant for a lone trailing button (Evan,
   2026-09-22). */
tr.expansion table.data td.actions {
  text-align: left;
}
table.data td.num {
  white-space: nowrap;
}
/* A figure that opens something is a link without an underline; the
   underline comes back on hover so it still reads as one (Evan,
   2026-09-22). */
table.data td.num a {
  text-decoration: none;
}
table.data td.num a:hover,
table.data td.num a:focus-visible {
  text-decoration: underline;
}
/* The amount reads as the figure, the unit as its label under it. */
table.data td.rate-cell {
  white-space: nowrap;
}
table.data td.rate-cell .unit {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
table.data .cell-empty {
  text-align: center;
  color: var(--muted);
  padding: 32px 12px;
}
/* The split under a status badge: "2 accepted, 1 waiting". */
.status-cell .split {
  display: block;
  margin-top: 3px;
  white-space: nowrap;
}
.row-between .status-cell {
  text-align: right;
}

/* ---------- Opening rows ----------
   The [+] column at the left of a table whose rows can open, and the
   full-width row that follows an opened one. The opened row loses its
   bottom rule so the two read as one. */
table.data th.expander,
table.data td.expander {
  width: 28px;
  padding-right: 0;
}
.card .tablewrap table.data td.expander + td,
.card .tablewrap table.data th.expander + th {
  padding-left: 8px;
}
.expand {
  appearance: none;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid var(--control-border);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}
.expand:hover,
.expand[aria-expanded='true'] {
  background: var(--soft-2);
}
table.data tr.opened td {
  border-bottom: 0;
}
/* The panel's own cell, and only it: a descendant selector here also
   caught every td of the table inside the panel, which left those cells
   indented 58px under headers that were not (Evan, 2026-09-08). */
table.data tr.expansion > td {
  background: var(--soft);
  padding: 4px 12px 14px 50px;
  cursor: default;
}
.card .tablewrap table.data tr.expansion > td {
  padding-left: 58px;
}

/* ---------- Citations ----------
   A request's citations: waiting first, then accepted, then declined.
   The same list opens under a table row (compact) and sits on the
   detail page. */
.citations {
  display: grid;
  gap: 14px;
}
.cite-heading {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 6px;
}
.cite-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.cite {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 14px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}
.cite.pending {
  border-color: var(--pink-light);
}
.cite-body {
  min-width: 0;
}
.cite-text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink);
}
.cite-article {
  margin-top: 3px;
}
.cite-when {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}
.cite-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.citations.compact .cite {
  padding: 8px 10px;
}
.citations.compact .cite-text {
  font-size: 13px;
}
table.data td.cite-cell {
  max-width: 520px;
}
table.data td.cite-cell .cite-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
table.data td.article-cell {
  min-width: 200px;
  max-width: 360px;
}
/* A whole article URL under a title or a passage. One line, cut with an
   ellipsis, because a real article URL is longer than any column it
   belongs in (Evan, 2026-09-08). */
.url-line {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: var(--muted);
}
.url-line a {
  color: inherit;
}

/* A citations table inside an opened row: the list primitive on the
   panel's own ground, without the card edges it would get inside a
   card. */
tr.expansion table.data {
  background: transparent;
}
/* The row rule of table.data is #e5e7eb, which all but vanishes on the
   panel's own #f9fafb ground, so the citations ran together as one
   block of text (Evan, 2026-09-08). The stronger token, the one the
   header rule already uses, is the separator here. */
tr.expansion table.data td {
  border-bottom-color: var(--line-strong);
}
/* The last citation keeps its rule, unlike the last row of a table in a
   card, where the card's own edge closes the list. The panel has no
   edge, so without this a panel holding one citation showed no
   separator at all and its rows ran into the request under them (Evan,
   2026-09-08). */
tr.expansion table.data tbody tr:last-child td {
  border-bottom: 1px solid var(--line-strong);
}
table.data td.cite-cell .url-line {
  margin-top: 2px;
}
table.data td.num .unit {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

/* The email preview: the message rendered by the sender's own template,
   in a frame so its styles and the app's cannot reach each other. */
.mailframe {
  display: block;
  width: calc(100% + 40px);
  margin: 4px -20px -18px;
  padding: 22px 20px;
  border: 0;
  border-top: 1px solid var(--line);
  background: var(--soft);
}
table.data td.article-cell .clamp {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card table.data {
  margin: 0 -20px -18px;
  width: calc(100% + 40px);
}
.card .tablewrap {
  margin: 0 -20px -18px;
}
.card .tablewrap table.data {
  margin: 0;
  width: 100%;
}
.card .tablewrap table.data th:first-child,
.card .tablewrap table.data td:first-child {
  padding-left: 20px;
}
.card .tablewrap table.data th:last-child,
.card .tablewrap table.data td:last-child {
  padding-right: 20px;
}
/* The outer table only: `>` all the way down, because the table inside
   an opened row is a `.card .tablewrap table.data` too, and this rule
   was taking the rule off its last citation as well (Evan,
   2026-09-08). */
.card > .tablewrap > table.data > tbody > tr:last-child > td {
  border-bottom: 0;
}
.entity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.entity .ent-name {
  font-weight: 600;
  display: block;
  line-height: 1.25;
  white-space: nowrap;
}
.entity .ent-sub {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.entity .ent-sub a {
  color: inherit;
}
.logo {
  flex: none;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--paper);
  object-fit: contain;
  display: inline-grid;
  place-items: center;
}
.logo.placeholder {
  background: var(--soft-2);
  color: var(--muted);
  font-weight: 700;
}
/* The widest free-text column, and the one that has to yield when a
   Publisher column joins the row. Capped low enough that the actions at
   the end of the row stay on screen at a laptop width. */
.usage-cell {
  min-width: 150px;
  max-width: 260px;
  color: var(--ink-2);
}
.usage-cell .clamp {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Badges ---------- */

.badge {
  display: inline-block;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 1px 9px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--paper);
  white-space: nowrap;
}
.badge.dim {
  color: var(--muted);
  background: var(--soft);
  border-color: var(--line);
}
.badge.solid {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-dark);
}
.badge.pink {
  background: var(--pink-soft);
  border-color: var(--pink-light);
  color: var(--pink-dark);
}
.badge.ok {
  border-color: var(--ok);
  color: var(--ok);
}
.badge.bad {
  border-color: var(--bad);
  color: var(--bad);
}
/* Mixed: a citation request answered both ways. */
.badge.warn {
  border-color: var(--warn);
  color: var(--warn);
}

/* ---------- Filter bar and tabs ---------- */

.filterbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.filterbar input[type='search'] {
  flex: 0 1 280px;
  padding: 8px 12px;
}
.filterbar select {
  padding: 8px 10px;
}
.filterbar .actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}
/* The Filters disclosure: one button that opens a panel of selects, so a
   list has a single control rather than a row of loose dropdowns. */
details.filters {
  position: relative;
}
details.filters > summary {
  list-style: none;
  cursor: pointer;
  border: 1px solid var(--control-border);
  border-radius: 8px;
  padding: 7px 12px;
  background: var(--paper);
  font-size: 13.5px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
details.filters > summary::-webkit-details-marker {
  display: none;
}
details.filters > summary::before {
  content: '';
  width: 14px;
  height: 14px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M22 3H2l8 9.46V19l4 2v-8.54L22 3z'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M22 3H2l8 9.46V19l4 2v-8.54L22 3z'/%3E%3C/svg%3E")
    center / contain no-repeat;
}
.filters-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  min-width: 320px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(26, 26, 46, 0.12);
  padding: 14px;
}
.filters-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 4px;
}
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}
.tabs button {
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 8px 12px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}
.tabs button:hover {
  color: var(--ink);
}
.tabs button.active {
  color: var(--pink-dark);
  border-bottom-color: var(--pink-dark);
}

/* ---------- Buttons ----------

   A button's color says what it does, so the same kind of action looks
   the same everywhere (Evan, 2026-09-03; made one rule 2026-09-25):

     .btn.primary    pink fill: commits, creates or sends (Accept, Save,
                     Send, Add, Request, Use, Implement, Apply)
     .btn.secondary  pink outline: opens or changes one thing without
                     committing (View, Respond, Edit, Review, Update rate,
                     Deactivate as a link to Settings, Decline, Express
                     interest, Resend)
     .btn            gray outline: goes elsewhere or copies (View all,
                     Earnings, Copy, Reveal, Clear)
     .btn.cancel     gray fill: backs out (Cancel, Back to), and a
                     pagination arrow with nowhere to go
     .btn.danger     red outline: removes, revokes, blocks or deletes

   Placement: a card's header holds its navigation (View all, gray) or its
   own action (Edit, pink outline); a table row's actions sit in its last
   column, the alternative before the commit (Decline, Accept) and a
   removal last; a form ends Cancel at the left, the primary at the right.
   .quiet is kept as the old name for .secondary. */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--control-border);
  background: var(--paper);
  color: var(--ink);
  border-radius: 8px;
  padding: 8px 16px;
  font: inherit;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover {
  background: var(--soft);
}
.btn.primary {
  border-color: var(--pink-dark);
  background: var(--pink-dark);
  color: #fff;
}
.btn.primary:hover {
  background: var(--pink-press);
  border-color: var(--pink-press);
}
.btn.secondary,
.btn.quiet {
  border-color: var(--pink-primary);
  background: var(--paper);
  color: var(--pink-dark);
}
.btn.secondary:hover,
.btn.quiet:hover {
  background: var(--pink-soft);
}
.btn.cancel {
  border-color: var(--line-strong);
  background: var(--soft-2);
  color: var(--muted);
}
.btn.cancel:hover {
  background: var(--line);
  color: var(--ink);
}
.btn.danger {
  background: var(--paper);
  color: var(--bad);
  border-color: var(--bad);
}
.btn.danger:hover {
  background: #fef2f2;
}
.btn.sm {
  padding: 5px 11px;
  font-size: 12.5px;
}
.btn:disabled {
  opacity: 0.6;
  cursor: default;
}
.btn-row {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
/* The confirm step asks a question and offers Cancel and Yes. The
   question sits above the two buttons so a longer one, "Accept the
   remaining 2?", does not widen the column it is in. */
.btn-row.confirming {
  flex-wrap: wrap;
  justify-content: flex-end;
  row-gap: 4px;
}
.btn-row.confirming .ask {
  flex-basis: 100%;
  text-align: right;
  white-space: nowrap;
}
.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 18px;
}
.form-actions .primary {
  margin-left: auto;
}

/* The admin's viewing-as bar, above the topbar and across the whole main
   column, the main app's .viewas (Evan, 2026-09-03). Ink, so there is no
   mistaking whose screen is on show. */
.viewas {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--ink);
  color: var(--on-dark);
  padding: 10px 28px;
  font-size: 13px;
}
.viewas > span span {
  color: var(--on-dark-muted);
  margin-left: 8px;
}

/* A way back that sits above the thing it leaves, rather than a button
   crowding the user chip in the topbar (Evan, 2026-09-03). */
.backlink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
}
.backlink:hover {
  color: var(--pink-dark);
}
.backlink .arrow {
  font-size: 15px;
  line-height: 1;
}

/* A page's own action, right aligned above its content. */
.pageactions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}

/* ---------- Forms ---------- */

input[type='text'],
input[type='url'],
input[type='email'],
input[type='number'],
input[type='search'],
input[type='date'],
input[type='file'],
input[type='password'],
input:not([type]),
select,
textarea {
  padding: 9px 12px;
  border: 1px solid var(--control-border);
  border-radius: 8px;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  max-width: 100%;
  min-width: 0;
  width: 100%;
}
/* A date input's calendar icon and a file input's own "Choose file" button
   stay native; the box around either one is styled to match so a form does
   not visibly switch systems partway down. */
input[type='date'] {
  color-scheme: light;
}
input[type='file'] {
  font-size: 13px;
}
/* A URL field paired with a fetch action, used when adding an article: the
   field takes the row, the button holds its width and never wraps under it. */
.inline-fetch {
  display: flex;
  gap: 8px;
  align-items: center;
}
.inline-fetch input {
  flex: 1;
  min-width: 0;
}
.inline-fetch .btn {
  flex: none;
  white-space: nowrap;
}
textarea {
  resize: vertical;
}
.formgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 0 12px;
}
@media (min-width: 520px) {
  .formgrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* An identity form (a person's own name, email, password) reads better as
   one field per row than as two across; a bulk data-entry form keeps the
   default two columns (Evan, 2026-09-22). */
.formgrid.stacked {
  grid-template-columns: 1fr;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
  min-width: 0;
}
.field label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
}
.field .hint {
  color: var(--muted);
  font-size: 12px;
}
.field.check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.field.check input {
  width: auto;
}
/* One field's complaint, under the control that caused it. */
.field-error {
  color: var(--bad);
  font-size: 12px;
  font-weight: 600;
}
.form-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--bad);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
}
.notice {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--ok);
  border-left-width: 4px;
  background: #f0fdf4;
  color: #14532d;
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 13.5px;
  font-weight: 600;
}
.notice.bad {
  border-color: var(--bad);
  background: #fef2f2;
  color: var(--bad);
}
.notice.info {
  border-color: var(--line-strong);
  background: var(--soft-2);
  color: var(--ink-2);
}
.notice span {
  flex: 1;
}
.notice a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.notice button {
  border: 0;
  background: none;
  font: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  padding: 0 2px;
}
.notice button:hover {
  color: var(--ink);
}

/* ---------- Publisher picker ----------
   The grant list on Access: publishers grouped by organization, each
   group with a whole-company shortcut. A fieldset per group, because
   that is what a group of related checkboxes is, and a screen reader
   then reads the company name before each title. */

.picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 14px;
  margin-top: 4px;
}
.pickgroup {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px 12px;
  margin: 0;
  min-width: 0;
}
.pickgroup + .pickgroup,
.pickgroup + .field {
  /* Stacked groups, and the field under them, sit apart rather than
     touching (2026-09-28, Evan: "These are too cramped together"). */
  margin-top: 16px;
}
.cardcols > .pickgroup + .pickgroup,
.digest > .pickgroup + .pickgroup,
.acctmail-body > .pickgroup + .pickgroup {
  /* A grid or flex column already spaces its children with its own gap. */
  margin-top: 0;
}
.pickgroup legend {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 0 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--faint);
}
.pickitem {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 5px 0;
  font-size: 13.5px;
  font-weight: 400;
  color: var(--ink);
  cursor: pointer;
}
.pickitem input {
  width: auto;
  flex: none;
  margin: 0;
}
/* One column, for a list read top to bottom: the citation picker on a
   request, and the notification choices. */
.picker.stack {
  grid-template-columns: 1fr;
}
.picker.stack .pickitem {
  align-items: flex-start;
}
.picker.stack .pickitem input {
  margin-top: 3px;
}
.pickitem .cite-text {
  font-size: 13.5px;
}
.pickgroup legend .badge {
  text-transform: none;
  letter-spacing: 0;
}

/* Two named choices with their price, standing in for a plain radio list
   where the price is the thing being decided between (select-citation.html,
   Evan, 2026-09-21). */
.pricepick {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 10px;
  margin-top: 4px;
}
.pricebtn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  cursor: pointer;
}
.pricebtn input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.pricebtn-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}
.pricebtn-price {
  font-size: 13px;
  color: var(--muted);
}
.pricebtn.active {
  border-color: var(--pink-dark);
  background: var(--soft);
}
.linkbtn {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--pink-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.linkbtn:hover {
  color: var(--pink-press);
}
/* Several small badges in one cell, wrapping rather than stretching the
   column: an editor with four titles is a normal row. */
.badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 320px;
}

/* ---------- Detail page ---------- */

/* A field list: one field per row, the label then its value, on every V1
   page. The wrapping div is flattened so each pair takes its own grid row
   rather than two pairs sitting side by side as stacked label over value.
   No rule between rows, tight spacing, and the label's colon comes from here
   rather than the markup, so no page can drop it (Evan, 2026-09-22).
   `.kv.rows` is the older name for the same thing and still works. */
.kv {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 16px;
  align-items: baseline;
  margin: 0;
  font-size: 13.5px;
}
.kv > div {
  display: contents;
}
.kv dt {
  color: var(--muted);
  font-weight: 600;
  font-size: 12.5px;
}
.kv dt::after {
  content: ':';
}
.kv dd {
  margin: 0;
  min-width: 0;
}
.kv dd.big {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.timeline li {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 13.5px;
}
.timeline li::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-strong);
  margin-top: 6px;
}
.timeline li.accepted::before {
  background: var(--ok);
}
.timeline li.declined::before {
  background: var(--bad);
}
.timeline li.reopened::before {
  background: var(--warn);
}
.timeline .when {
  color: var(--muted);
  font-size: 12px;
  display: block;
}
.confirm {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--soft-2);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13.5px;
}
.confirm span {
  flex: 1 1 200px;
}

/* ---------- Empty ---------- */

.empty {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 36px 24px;
  text-align: center;
  color: var(--muted);
  background: var(--paper);
}
.empty b {
  display: block;
  color: var(--ink-2);
  margin-bottom: 4px;
}

/* ---------- Login ---------- */

.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto;
  background:
    radial-gradient(60% 50% at 85% -10%, rgba(233, 30, 140, 0.08), transparent),
    var(--soft);
}
.login-center {
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px;
  box-shadow: 0 20px 50px rgba(26, 26, 46, 0.08);
}
/* The mark and the word Geodesix on one line, the same on all three V1
   logins, with no audience name after it (Evan, 2026-09-22). */
.login-card .auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 0 28px;
}
.login-card .auth-brand h1 {
  font-family: 'Sarabun', 'Inter', sans-serif;
  font-size: 24px;
  line-height: 1;
}
.login-card form > .btn {
  width: 100%;
  justify-content: center;
  padding: 11px 16px;
  margin-bottom: 4px;
}
.login-card .sent {
  text-align: center;
  font-size: 14px;
  color: var(--ink-2);
}
.login-card .sent b {
  display: block;
  margin-bottom: 4px;
}
.login-card .after {
  text-align: center;
  margin: 24px 0 0;
  font-size: 13.5px;
}
/* "Not someone@example.com?" over the link that changes it. The address
   wraps rather than pushing the card wide, since a long one is common. */
.login-card .after .muted {
  display: block;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.login-card .after .muted + br {
  display: none;
}
.login-card .after a,
.login-card .after button {
  display: inline-block;
  padding: 8px 12px;
  color: var(--pink-dark);
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- Footer ---------- */

.appfooter {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 24px;
  padding: 16px 28px 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.appfooter nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.appfooter a {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 0;
}
.appfooter a:hover,
.appfooter a:focus-visible {
  color: var(--ink);
  text-decoration: underline;
}


/* ---------- Logo flicker ----------
   Ported from the main app's globals.css. One 12 second cycle, four
   pairs lighting up in turn at 0, 16, 32 and 48 percent, each pair one
   red dot and one gray, so at most two of the eight are colored at any
   moment and the mark reads as itself throughout. */

.logo-dots {
  flex: none;
}
.logo-dot {
  transition: fill 0.2s ease;
}
.dot-a {
  animation: flickerA 12s infinite;
}
.dot-b {
  animation: flickerB 12s infinite;
}
.dot-c {
  animation: flickerC 12s infinite;
}
.dot-d {
  animation: flickerD 12s infinite;
}
.dot-e {
  animation: flickerE 12s infinite;
}
.dot-f {
  animation: flickerF 12s infinite;
}
.dot-g {
  animation: flickerG 12s infinite;
}
.dot-h {
  animation: flickerH 12s infinite;
}
@keyframes flickerA {
  0%,
  2% {
    fill: #1a1a2e;
  }
  4%,
  10% {
    fill: #e53935;
  }
  12%,
  100% {
    fill: #1a1a2e;
  }
}
@keyframes flickerE {
  0%,
  2% {
    fill: #1a1a2e;
  }
  4%,
  10% {
    fill: #9ca3af;
  }
  12%,
  100% {
    fill: #1a1a2e;
  }
}
@keyframes flickerC {
  0%,
  16% {
    fill: #1a1a2e;
  }
  18%,
  26% {
    fill: #9ca3af;
  }
  28%,
  100% {
    fill: #1a1a2e;
  }
}
@keyframes flickerF {
  0%,
  16% {
    fill: #1a1a2e;
  }
  18%,
  26% {
    fill: #e53935;
  }
  28%,
  100% {
    fill: #1a1a2e;
  }
}
@keyframes flickerB {
  0%,
  32% {
    fill: #1a1a2e;
  }
  34%,
  42% {
    fill: #e53935;
  }
  44%,
  100% {
    fill: #1a1a2e;
  }
}
@keyframes flickerG {
  0%,
  32% {
    fill: #1a1a2e;
  }
  34%,
  42% {
    fill: #9ca3af;
  }
  44%,
  100% {
    fill: #1a1a2e;
  }
}
@keyframes flickerD {
  0%,
  48% {
    fill: #1a1a2e;
  }
  50%,
  58% {
    fill: #9ca3af;
  }
  60%,
  100% {
    fill: #1a1a2e;
  }
}
@keyframes flickerH {
  0%,
  48% {
    fill: #1a1a2e;
  }
  50%,
  58% {
    fill: #e53935;
  }
  60%,
  100% {
    fill: #1a1a2e;
  }
}

/* ---------- Mobile ---------- */

@media (max-width: 880px) {
  .app {
    grid-template-columns: 1fr;
  }
  .mobile-nav-toggle {
    display: flex;
  }
  .nav-backdrop {
    display: block;
  }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    width: min(280px, 82vw);
    height: 100vh;
    height: 100dvh;
    padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-100%);
    visibility: hidden;
    transition:
      transform 0.2s ease,
      visibility 0s linear 0.2s;
  }
  .sidebar.open {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.2s ease;
  }
  .viewas {
    padding: 10px 16px;
  }
  .topbar {
    padding: 0 16px;
  }
  .userchip .who {
    display: none;
  }
  .userchip {
    padding: 4px;
  }
  .content {
    padding: 16px 16px 40px;
  }
  .appfooter {
    padding: 12px 16px 16px;
    font-size: 12px;
    gap: 4px 14px;
  }
  .appfooter nav {
    gap: 14px;
  }
  table.data tr.expansion > td,
  .card .tablewrap table.data tr.expansion > td {
    padding-left: 16px;
  }
  .cite {
    grid-template-columns: 1fr;
  }
  .cite-side {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
}


/* ---------- Responsive ----------

   What keeps a page inside the viewport at any width, and a control on one
   line wherever the row has room for it. A grid item's minimum size is its
   content unless told otherwise, so a table inside a card inside a grid used
   to push the card past the edge of the page instead of scrolling inside its
   own .tablewrap; the min-width rules are what let the scroll wrapper work. */

.content > *,
.tabpanel > *,
.grid > *,
.cardcols > *,
.statgrid > *,
.picker > *,
.formgrid > *,
.card {
  min-width: 0;
}
/* A detail page's main column beside a side column: the side column never
   drops under 280px, and the two stack once the row cannot hold both, which
   with the sidebar on screen is already the case under 1000px. */
.detail-cols {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 22px;
  align-items: start;
}
.detail-cols > * {
  min-width: 0;
}
@media (max-width: 1000px) {
  .detail-cols {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* The foot of a list wraps as a row before either half wraps inside. */
.pagination {
  flex-wrap: wrap;
}
.pagination > * {
  white-space: nowrap;
}
.pagination .pages {
  flex: none;
  margin-left: auto;
}
/* The search box gives way first, so the control beside it stays on the
   same line down to a phone; the controls themselves never shrink. */
.filterbar input[type='search'] {
  flex: 1 1 80px;
  min-width: 0;
  max-width: 280px;
}
/* A primary button on the bar can carry a short label for a phone
   (span.long and span.short, the date range's idiom), so the search box,
   Filters and the button share one row down to 360px. */
.filterbar .btn .short {
  display: none;
}
@media (max-width: 600px) {
  .filterbar .btn .long {
    display: none;
  }
  .filterbar .btn .short {
    display: inline;
  }
}
.filterbar select,
.filterbar .btn,
.filterbar details.filters > summary {
  flex: none;
}
.filters-panel {
  max-width: calc(100vw - 32px);
}
/* On a phone the panel drops under the whole bar rather than hanging off the
   Filters button, where it would run past the right edge. */
@media (max-width: 600px) {
  .filterbar {
    position: relative;
  }
  .filterbar details.filters {
    position: static;
  }
  .filterbar .filters-panel {
    left: 0;
    right: 0;
    min-width: 0;
    max-width: none;
  }
}
/* A key or a snippet written inline breaks rather than widening the page. */
code {
  overflow-wrap: anywhere;
}
/* A cell holding one link or one bold figure stays on a line: the table
   scrolls inside its wrapper before a name breaks across two lines. */
table.data td > a:only-child,
table.data td > b:only-child {
  white-space: nowrap;
}
/* The one line article URL under a quote takes the cell's width instead of
   setting it, so a quote column gives way to the columns beside it. */
table.data td .url-line {
  width: 0;
  min-width: 100%;
}
.viewas {
  flex-wrap: wrap;
}
/* The drawer's close button only exists while the nav is a drawer. */
.mobile-nav-close {
  display: none;
}
@media (max-width: 880px) {
  .mobile-nav-close {
    display: flex;
  }
  body.nav-open {
    overflow: hidden;
  }
}

/* ---------- Phone sizing ----------

   Under 720px every control meets the platform target sizes: Apple's Human
   Interface Guidelines ask for 44 by 44pt and Material for 48 by 48dp with
   8dp between targets, so the primary controls are 48px tall and the small
   ones 44px. Body text goes to 16px (Apple's minimum is 11pt, its body
   17pt; Material body is 14 to 16sp), and every field is 16px so iOS does
   not zoom the page when one is focused. Focus rings, contrast and reduced
   motion are the port's own and already meet WCAG AA. */

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }
  .btn {
    min-height: 48px;
    padding: 10px 18px;
    font-size: 15px;
  }
  .btn.sm {
    min-height: 44px;
    padding: 8px 14px;
    font-size: 14px;
  }
  .nav-item {
    min-height: 48px;
    padding: 12px 12px;
    font-size: 16px;
  }
  .nav-section h4 {
    font-size: 12.5px;
  }
  .mobile-nav-toggle,
  .mobile-nav-close {
    width: 48px;
    height: 48px;
    font-size: 16px;
  }
  .userchip {
    min-height: 44px;
    padding: 4px 8px;
  }
  .chipmenu a,
  .chipmenu button,
  .chipmenu .cm-pick {
    min-height: 48px;
    display: flex;
    align-items: center;
    font-size: 15px;
  }
  .tabs button {
    min-height: 48px;
    font-size: 15px;
  }
  .seg,
  .dr-opt {
    min-height: 44px;
    padding: 10px 8px;
    font-size: 14px;
    flex: 1 1 auto;
  }
  .segbar,
  .daterange {
    display: flex;
    width: 100%;
  }
  .daterange .dr-panel {
    left: 0;
    right: auto;
    max-width: 100%;
  }
  input[type='text'],
  input[type='url'],
  input[type='email'],
  input[type='number'],
  input[type='search'],
  input[type='date'],
  input[type='file'],
  input[type='password'],
  input:not([type]),
  select,
  textarea,
  .filterbar select,
  table.data select {
    font-size: 16px;
    min-height: 48px;
  }
  input[type='checkbox'],
  input[type='radio'] {
    width: 24px;
    height: 24px;
    min-height: 0;
  }
  .pickitem,
  .field.check,
  .switchrow,
  .selectcard {
    min-height: 48px;
  }
  .switch .track,
  .switchrow .sw {
    width: 52px;
    height: 32px;
  }
  .switch .track::after,
  .switchrow .sw::after {
    width: 26px;
    height: 26px;
    top: 3px;
    left: 3px;
  }
  .switch.on .track::after,
  .switchrow.on .sw::after {
    left: 23px;
  }
  .expand {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }
  table.data th.expander,
  table.data td.expander {
    width: 48px;
  }
  .backlink,
  .linkbtn,
  .appfooter a,
  .pagination .pages > * {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .field label {
    font-size: 14px;
  }
  .badge {
    font-size: 13px;
    padding: 3px 11px;
  }
  .stat .label,
  .stat .sub {
    font-size: 13px;
  }
  table.data {
    font-size: 15px;
  }
  table.data td {
    padding: 13px 12px;
  }
  .kv,
  .cite-text {
    font-size: 15px;
  }
  .url-line {
    font-size: 13px;
  }
  .kv dd {
    overflow-wrap: anywhere;
  }
  /* Selects keep their 48px even where the port resets them (filter bars and
     tables), which is why these are written from main.content. */
  main.content select,
  main.content .filterbar select,
  main.content table.data select {
    min-height: 48px;
  }
  /* A sortable header is a 44px target without the header growing: the
     button's padding is taken back by its margin. */
  table.data th {
    padding: 14px 12px;
  }
  table.data th button.th-sort {
    min-height: 44px;
    margin: -14px 0;
    align-items: center;
  }
  table.data th button.th-sort {
    min-width: 44px;
  }
  details.filters > summary {
    min-height: 48px;
  }
  /* Every text link in the content column (a name in a row, a count, a
     domain, an article URL, a link in running text) gets a 44px hit area
     from an invisible box drawn around it, so the line it sits on does not
     move and short links like a count of 2 are still a full target. */
  main.content a:not(.btn):not(.stat):not(.backlink):not(.nav-item):not(.seg):not(.dr-opt):not(.tab) {
    position: relative;
  }
  main.content a:not(.btn):not(.stat):not(.backlink):not(.nav-item):not(.seg):not(.dr-opt):not(.tab)::after {
    content: '';
    position: absolute;
    inset: -16px -18px;
  }
  .appfooter a {
    padding: 12px 10px;
    margin: 0 -10px;
  }
  .appfooter nav {
    gap: 28px;
  }
}

/* ---------- Tables on a phone and tablet ----------

   A table stays a table at every width. Under 880px it scrolls sideways
   inside its wrapper with the first column held in place (sticky), so the
   row's name stays readable while the figures scroll under it, headers
   included. At the left edge the table reads as it does on the desktop: the
   [+] column, the logo and the name. Once the table has scrolled (nav.js
   marks the wrapper scrolled) the held part collapses to stay narrow: the
   [+] column folds away and a tap on the row opens it instead, and where
   the first cell carries a logo, an avatar or a product thumbnail (an
   .entity; nav.js marks such a wrapper img-first) the name beside the image
   folds away too and the header over it blanks, so only the image is held.
   Scrolling back to the edge unfolds them. The folds are max-width and
   opacity transitions, so the columns slide rather than jump. A first cell
   with no image (a quote, an article, a placement name) is held whole.
   nav.js also marks the wrapper can-scroll and at-end, so the right edge
   fades while there is more to the right and the held column takes a
   shadow once the rest has moved. Nothing here scrolls the page. */

/* A table wider than its card scrolls at any width; the right edge fades
   while there is more to the right. */
.tablewrap.can-scroll:not(.at-end) {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
}

@media (max-width: 880px) {
  .tablewrap {
    position: relative;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }
  .tablewrap table.data th:first-child,
  .tablewrap table.data td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--paper);
  }
  /* The [+] column shows at the left edge and folds away once the table
     has scrolled; the row itself opens on a tap at any time (nav.js). */
  .tablewrap table.data th.expander,
  .tablewrap table.data td.expander {
    width: 48px;
    min-width: 48px;
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--paper);
    transition: min-width 0.25s, width 0.25s, padding 0.25s;
  }
  .tablewrap table.data td.expander .expand {
    overflow: hidden;
    transition: width 0.25s, opacity 0.25s, border-width 0.25s;
  }
  .tablewrap.scrolled table.data th.expander,
  .tablewrap.scrolled table.data td.expander {
    width: 0;
    min-width: 0;
    padding-left: 0;
    padding-right: 0;
  }
  .tablewrap.scrolled table.data td.expander .expand {
    width: 0;
    opacity: 0;
    border-width: 0;
  }
  .tablewrap table.data th.expander + th,
  .tablewrap table.data td.expander + td {
    position: sticky;
    left: 48px;
    z-index: 1;
    background: var(--paper);
    transition: left 0.25s, padding 0.25s;
  }
  .tablewrap.scrolled table.data th.expander + th,
  .tablewrap.scrolled table.data td.expander + td {
    left: 0;
    padding-left: 12px;
  }
  .tablewrap table.data tbody tr.opens {
    cursor: pointer;
  }
  .tablewrap table.data tr.expansion > td {
    position: static;
  }
  .tablewrap.scrolled table.data th:first-child:not(.expander),
  .tablewrap.scrolled table.data td:first-child:not(.expander),
  .tablewrap.scrolled table.data th.expander + th,
  .tablewrap.scrolled table.data td.expander + td {
    box-shadow: 6px 0 8px -6px rgba(26, 26, 46, 0.18);
  }
  .tablewrap table.data td:first-child .entity .ent-name,
  .tablewrap table.data td.expander + td .entity .ent-name {
    white-space: nowrap;
  }
  /* The held column keeps enough room to read: a quote or an article title
     gets 200px, anything else 120px. */
  .tablewrap table.data td.cite-cell:first-child,
  .tablewrap table.data td.article-cell:first-child,
  .tablewrap table.data td.expander + td.cite-cell {
    min-width: 200px;
  }
  .tablewrap table.data td:first-child:not(.expander):not(.cite-cell):not(.article-cell):not(.num),
  .tablewrap table.data td.expander + td:not(.cite-cell) {
    min-width: 120px;
  }
  /* A first cell with a logo, an avatar or a thumbnail: the name beside the
     image folds away once the table has scrolled, and the header over it
     with it, so the image alone is held. */
  .tablewrap.img-first.scrolled > table.data > tbody > tr > td:first-child:not(.expander):not(.cite-cell):not(.article-cell):not(.num),
  .tablewrap.img-first.scrolled > table.data > tbody > tr > td.expander + td:not(.cite-cell) {
    min-width: 0;
    width: 1%;
  }
  .tablewrap.img-first > table.data > tbody > tr > td:first-child .entity > :not(.logo):not(.imgph),
  .tablewrap.img-first > table.data > tbody > tr > td.expander + td .entity > :not(.logo):not(.imgph),
  .tablewrap.img-first > table.data > thead th:first-child .th-sort,
  .tablewrap.img-first > table.data > thead th.expander + th .th-sort {
    display: inline-block;
    vertical-align: middle;
    max-width: 240px;
    overflow: hidden;
    white-space: nowrap;
    transition: max-width 0.25s, opacity 0.2s;
  }
  .tablewrap.img-first.scrolled > table.data > tbody > tr > td:first-child .entity > :not(.logo):not(.imgph),
  .tablewrap.img-first.scrolled > table.data > tbody > tr > td.expander + td .entity > :not(.logo):not(.imgph),
  .tablewrap.img-first.scrolled > table.data > thead th:first-child .th-sort,
  .tablewrap.img-first.scrolled > table.data > thead th.expander + th .th-sort {
    max-width: 0;
    opacity: 0;
  }
  .tablewrap.img-first > table.data > tbody > tr > td:first-child .entity,
  .tablewrap.img-first > table.data > tbody > tr > td.expander + td .entity {
    transition: gap 0.25s;
  }
  .tablewrap.img-first.scrolled > table.data > tbody > tr > td:first-child .entity,
  .tablewrap.img-first.scrolled > table.data > tbody > tr > td.expander + td .entity {
    gap: 0;
  }
  /* An opened row's panel (the citations under a request) stays in view
     while the table behind it scrolls: it is held at the left edge and
     sized to the wrapper (nav.js keeps --wrapw current). Its table reads as
     a stack, one block per citation with the quote, what it refers to and
     its status in turn, since three columns do not fit beside a phone's
     held column. */
  .tablewrap table.data tr.expansion > td,
  .card .tablewrap table.data tr.expansion > td {
    padding: 4px 12px 12px;
  }
  .tablewrap table.data tr.expansion > td > * {
    position: sticky;
    left: 0;
    width: calc(var(--wrapw, 100vw) - 24px);
    max-width: 100%;
  }
  .tablewrap table.data tr.expansion table.data > thead {
    display: none;
  }
  .tablewrap table.data tr.expansion table.data {
    display: block;
  }
  .tablewrap table.data tr.expansion table.data > tbody,
  .tablewrap table.data tr.expansion table.data > tbody > tr,
  .tablewrap table.data tr.expansion table.data > tbody > tr > td {
    display: block;
    position: static;
    min-width: 0;
    box-shadow: none;
  }
  .tablewrap.scrolled table.data tr.expansion table.data > tbody > tr > td {
    box-shadow: none;
  }
  .tablewrap table.data tr.expansion table.data > tbody > tr {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
  }
  .tablewrap table.data tr.expansion table.data > tbody > tr:last-child {
    border-bottom: 0;
  }
  .tablewrap table.data tr.expansion table.data > tbody > tr > td {
    padding: 3px 0;
    border: 0;
    background: transparent;
    text-align: left;
    white-space: normal;
  }
  .tablewrap table.data tr.expansion table.data > tbody > tr > td.cite-cell {
    max-width: none;
  }
}

/* ---------- Wireframe additions ----------

   Everything above is the port. Everything below exists because this is a
   wireframe rather than the running app, and should be left behind when the
   port is taken anywhere else. */

/* The V1 banner, drawn by nav.js on every page of the surface. */
.versionbar {
  padding: 9px 28px;
  background: var(--soft-2);
  border-bottom: 1px solid var(--line);
}
.versionbar .vb-txt b {
  display: block;
  font-size: 13px;
}
.versionbar .vb-txt span {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
}

/* A tabbed page draws one panel at a time. The bar is .tabs[data-tabs] and each
   panel is .tabpanel[data-tab]; nav.js switches them by setting the hidden
   attribute, which the [hidden] rule near the top of the port already handles.
   The platform's own tabs are <button> children of .tabs, so these pages use
   buttons too rather than the spans the grayscale surfaces use. */
.tabpanel {
  display: grid;
  gap: 18px;
}

/* The email preview's own column. The platform's .mailframe is an iframe that
   renders the sender's template, so the centered white message comes from
   inside it; a static page has no iframe, and this is that column drawn
   directly on the frame's ground. */
.mailcard {
  max-width: 560px;
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}

/* A line chart. The approvals platform has none, so this is a wireframe
   addition rather than part of the port: the same primitive the grayscale
   surfaces use, drawn on the ported tokens. */
.linechart {
  height: 180px;
  position: relative;
  border-left: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}
.linechart svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.chart-axis {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

/* ---------- Date range ----------

   The segmented control the main app uses on stag.geodesix.com/admin, beside
   a section heading: the fixed windows as links, then Select date range, which
   opens a panel holding a start, an end and a month. The active window is the
   one pink fill on the row.

   Each option carries its long label and its short one, and the breakpoint
   swaps which is shown: below 1100px the row reads 30d, 90d, Select date range,
   because a type filter and the date range share one row and the sidebar
   takes 232px of the viewport above the drawer breakpoint. */
/* The type filter beside a date range wears the same segmented control: two
   of them on one row, the filter at the left and the window at the right. */
.segbar,
.daterange {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  padding: 3px;
  flex: none;
}
.seg,
.dr-opt {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.seg:hover,
.dr-opt:hover {
  color: var(--ink);
}
.seg.active,
.dr-opt.active {
  background: var(--pink-dark);
  color: var(--on-dark);
}
.dr-opt .short {
  display: none;
}
.dr-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  width: 300px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(26, 26, 46, 0.12);
  padding: 16px;
  text-align: left;
}
.dr-cal {
  margin-top: 14px;
}
.dr-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 13.5px;
  margin-bottom: 8px;
}
.dr-head span {
  cursor: pointer;
  color: var(--muted);
  padding: 0 6px;
}
.dr-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}
.dr-dow {
  font-size: 11px;
  color: var(--faint);
  font-weight: 600;
  padding: 4px 0;
}
.dr-day {
  font-size: 12.5px;
  padding: 6px 0;
  border-radius: 6px;
  cursor: pointer;
}
.dr-day:hover {
  background: var(--soft-2);
}
.dr-day.in {
  background: var(--pink-soft);
  color: var(--pink-dark);
}
.dr-day.edge {
  background: var(--pink-dark);
  color: var(--on-dark);
}
.dr-day.out {
  color: var(--line-strong);
}

@media (max-width: 1100px) {
  .dr-opt .long {
    display: none;
  }
  .dr-opt .short {
    display: inline;
  }
  .dr-opt.dr-wide {
    display: none;
  }
}

/* Code and placeholders. The approvals platform shows no code and no product
   imagery, so these are wireframe additions rather than part of the port. A
   retailer's surface hands over a snippet, a tracked link and a loader tag,
   and its catalog pages stand in for product photography. */
.codebox {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--ink-2);
  overflow-x: auto;
}
.codebox.prose {
  font-family: inherit;
  font-size: 13px;
  word-break: normal;
}
.imgph {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--soft);
  color: var(--faint);
  font-size: 10px;
}
/* A product's photo in the image slot (V0, 2026-10-08): the same box as the
   placeholder, filled. The photos are static AVIFs under img/products/, named
   by the product URL's slug. */
.imgph.photo {
  overflow: hidden;
  border: 0;
  background: var(--soft);
}
.imgph.photo > img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: cover;
}

/* A list's foot: the range shown and the way to the next page. A table
   bleeds to the card's edge with a negative bottom margin (table.data or
   .tablewrap, both pulled up 18px so the last row sits flush with the
   card's own border), which is right when the table is the card's last
   child but pulls a following pagination row up into that same edge,
   crossing over the table's bottom line. Give that space back here
   instead of undoing the bleed (Evan, 2026-09-21). */
.card table.data + .pagination,
.card .tablewrap + .pagination {
  margin-top: 18px;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 2px 0;
  font-size: 12.5px;
  color: var(--muted);
}
.pagination .pages {
  display: flex;
  gap: 8px;
}

/* The ladder a placement climbs, and the one a grounding key climbs: the rungs
   in order with the one it has reached filled. */
.ladder {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ladder .arrow {
  color: var(--faint);
  font-size: 11px;
}
.ladder-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 6px;
}

/* The product page stand-in on Install styles, and the five snippet styles it
   shows inside it. These are a wireframe addition and deliberately are not
   built from the tokens above: they are a retailer's own page, drawn in a
   retailer's own neutral palette, so the sample CSS beside each one is the
   same CSS a retailer would paste. */
.pdp {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 16px;
  max-width: 340px;
}
.pdp .shot {
  height: 110px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--soft);
  color: var(--faint);
  display: grid;
  place-items: center;
  font-size: 11px;
  margin-bottom: 12px;
}
.pdp .title {
  font-weight: 700;
  font-size: 14px;
}
.pdp .price {
  font-size: 15px;
  margin: 2px 0 8px;
}
.pdp .desc {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0 0 12px;
}
.pdp .buy {
  display: block;
  text-align: center;
  background: #2b2b2b;
  color: #fff;
  border-radius: 6px;
  padding: 8px 0;
  font-size: 12.5px;
  font-weight: 600;
  margin-top: 12px;
}
.gdx-plain {
  font-size: 13px;
  line-height: 1.6;
}
.gdx-plain .quote {
  font-style: italic;
}
.gdx-plain .source {
  color: #6b6b6b;
}
.gdx-card {
  border: 1px solid #c9c9c9;
  border-radius: 8px;
  padding: 12px 14px;
  background: #f4f4f4;
}
.gdx-card .quote {
  display: block;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 8px;
}
.gdx-card .source {
  font-size: 11px;
  color: #6b6b6b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.gdx-rule {
  border-top: 1px solid #c9c9c9;
  border-bottom: 1px solid #c9c9c9;
  padding: 10px 0;
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.gdx-rule .quote {
  font-size: 13px;
  line-height: 1.5;
  flex: 1;
}
.gdx-rule .source {
  font-size: 11.5px;
  color: #6b6b6b;
  white-space: nowrap;
}
.gdx-pull {
  border-left: 3px solid #2b2b2b;
  padding-left: 14px;
}
.gdx-pull .quote {
  display: block;
  font-size: 17px;
  line-height: 1.45;
  margin-bottom: 6px;
}
.gdx-pull .source {
  font-size: 12px;
  color: #6b6b6b;
}
.gdx-inline {
  font-size: 12.5px;
  line-height: 1.6;
  color: #6b6b6b;
}
.gdx-inline .quote {
  color: #2b2b2b;
}
.gdx-inline .source {
  font-size: 11px;
  border: 1px solid #c9c9c9;
  border-radius: 10px;
  padding: 1px 7px;
  white-space: nowrap;
}

/* The bot check on the login card. A static placeholder: the real one is a
   Cloudflare Turnstile widget, which a file:// page cannot load. */
.turnstile {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 10px 12px;
  font-size: 12px;
  color: var(--muted);
}
.turnstile .tsbox {
  flex: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--control-border);
  border-radius: 4px;
  background: var(--paper);
}

/* The account chip menu, and the account switcher inside it.

   A person can be given access to several publishers or several retailers
   through an organization, so the chip is where they move between them. The
   menu is the platform's own panel with three parts added: the signed in
   address, a list of the accounts reachable from this login, and All accounts,
   which is a rollup rather than a place.

   The rollup is drawn rather than described: nav.js sets data-account="all" on
   <body>, which reveals the Account column every list keeps hidden while one
   account is selected, and swaps any figure carrying a data-all value. */
.chipmenu-who {
  display: block;
  padding: 9px 12px 8px;
  font-size: 12px;
  color: var(--faint);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.chipmenu-head {
  margin: 0;
  padding: 10px 12px 4px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--faint);
}
.chipmenu .acct {
  display: flex;
  align-items: center;
  gap: 9px;
}
.chipmenu .acct .logo {
  width: 22px;
  height: 22px;
  font-size: 9px;
  flex: none;
}
.chipmenu .acct .tick {
  margin-left: auto;
  color: var(--pink-primary);
  font-weight: 700;
}
.chipmenu .acct.current {
  font-weight: 600;
}
.chipmenu .acct.all {
  border-top: 1px solid var(--line);
}
.chipmenu .acct.all .logo {
  background: var(--soft-2);
  color: var(--faint);
  letter-spacing: -0.2px;
}

/* An account column is dead weight while one account is selected, so every
   list carries it hidden and the rollup is what reveals it. */
.acct-col {
  display: none;
}
body[data-account="all"] .acct-col {
  display: table-cell;
}

/* A rollup adds rows as well as a column: the other accounts' work is not on
   the page while one account is selected, so those rows are carried hidden the
   same way the Account column is. */
tr.acct-row {
  display: none;
}
body[data-account="all"] tr.acct-row {
  display: table-row;
}

/* An account's mark.

   Admin uploads a 50 by 50 logo for each publisher and retailer and that is what
   the directory lists and the account switcher show. A wireframe has no uploads,
   so it stands one in from Google's favicon service and keeps the initials
   underneath: a real domain resolves to the publication's own mark, a domain
   that does not exist resolves to a generic globe, which is what an account with
   no logo uploaded looks like, and a page opened from file:// with no network
   falls back to the initials.

   This is the one remote asset in the repo. Every other rule holds: no CDN
   scripts, no remote stylesheets, no web fonts. The page renders correctly with
   the image missing, which is why the exception is affordable. */
.logo {
  position: relative;
  overflow: hidden;
}
.logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--paper);
  border-radius: inherit;
  /* Transparent until it has actually loaded, so a pending or blocked request
     shows the initials underneath rather than a white square. The onload in the
     markup is what reveals it. */
  opacity: 0;
}

/* The figure a chart ends on, shown once beside the title rather than as a label
   on every point. */
.chart-latest {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.chart-latest .unit {
  font-size: 11px;
  font-weight: 500;
  color: var(--faint);
}

/* A chart you can read by pointing (V1 batch 17). The readout sits where
   .chart-latest did: one figure per line, each with its key, and the window
   under them, which becomes the date pointed at. The dot is HTML over the SVG
   because the SVG stretches to the card and would draw a circle as an oval. */
.chart-readout {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 2px 20px;
  text-align: right;
}
.chart-readout .chart-when {
  flex-basis: 100%;
  font-size: 11px;
  font-weight: 500;
  color: var(--faint);
}
.chart-latest .val {
  font-variant-numeric: tabular-nums;
}
.chart-key {
  display: inline-block;
  width: 12px;
  height: 3px;
  border-radius: 2px;
  background: var(--pink-dark);
  vertical-align: middle;
  margin-right: 5px;
}
.chart-key.s2 {
  background: var(--pink-light);
}
.linechart.live {
  cursor: crosshair;
  touch-action: pan-y;
}
.linechart.live:focus-visible {
  outline: 2px solid var(--pink-dark);
  outline-offset: 4px;
}
.linechart polyline.s2 {
  stroke: var(--pink-light);
  stroke-dasharray: 3 2;
}
.chart-guide {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line-strong);
  pointer-events: none;
}
.chart-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--pink-dark);
  box-shadow: 0 0 0 2px #fff;
  pointer-events: none;
}
.chart-dot.s2 {
  background: var(--pink-light);
}
.chart-guide[hidden],
.chart-dot[hidden] {
  display: none;
}
.linechart.live polyline {
  vector-effect: non-scaling-stroke;
  stroke-width: 2px;
}

/* The stacked area chart (2026-09-25; bars until Evan: "The spend should
   be a stacked area chart"): one layer per series, bottom up, in three pinks
   from deep to light (Evan: "change the colors to be versions of pink, so it
   more closely matches our style"; blue and green were drawn first). Direct
   is the deepest, Paid ads the brand pink, Grounding the lightest, so the
   layers step in lightness and read apart without hue. A 1px surface line
   separates layers, and each tile above the chart carries its key. */
:root {
  --viz-1: #8c1156;
  --viz-2: #e0418f;
  --viz-3: #f8b4d7;
}
.linechart.stack polygon {
  stroke: var(--paper);
  stroke-width: 1px;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.linechart.stack polygon.s1 { fill: var(--viz-1); }
.linechart.stack polygon.s2 { fill: var(--viz-2); }
.linechart.stack polygon.s3 { fill: var(--viz-3); }
.chart-dot.v1 { background: var(--viz-1); }
.chart-dot.v2 { background: var(--viz-2); }
.chart-dot.v3 { background: var(--viz-3); }
.chart-key.c1 { background: var(--viz-1); }
.chart-key.c2 { background: var(--viz-2); }
.chart-key.c3 { background: var(--viz-3); }
/* A dashboard tile that stands for the chosen option is marked. */
a.stat.active,
a.stat.active:hover {
  border-color: var(--pink-dark);
  box-shadow: inset 0 0 0 1px var(--pink-dark);
  background: var(--paper);
}

/* Retailer addition: the carousel preview on carousel-detail.html, drawn
   on the .pdp mock beside the snippet styles above it, and the draft state
   that ?new=1 puts the same page into (Evan, 2026-09-22). */
.gdx-carousel .quote,
.gdx-carousel .source {
  display: block;
}
.gdx-carousel .gdx-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}
.gdx-carousel .gdx-arrow {
  font-size: 16px;
  line-height: 1;
  color: #6b6b6b;
}
.gdx-carousel .gdx-dots {
  display: flex;
  gap: 6px;
}
.gdx-carousel .gdx-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c9c9c9;
}
.gdx-carousel .gdx-dots .on {
  background: #2b2b2b;
}
body[data-draft] .if-saved {
  display: none !important;
}

/* Password requirements under a New password field: an open circle per rule
   that becomes a green check once the typed password meets it (V1 batch 12;
   the checking lives in nav.js). */
ul.pwreq {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: grid;
  gap: 3px;
  font-size: 12.5px;
  color: var(--muted);
}
ul.pwreq li {
  display: flex;
  align-items: center;
  gap: 8px;
}
ul.pwreq li::before {
  content: '';
  flex: none;
  width: 12px;
  height: 12px;
  box-sizing: border-box;
  border: 1.5px solid var(--control-border);
  border-radius: 50%;
}
ul.pwreq li.met {
  color: var(--ok);
}
ul.pwreq li.met::before {
  content: '\2713';
  border: 0;
  font-size: 12px;
  line-height: 12px;
  text-align: center;
  font-weight: 700;
}

/* ---------- Older wireframe controls, as on admin ----------

   The same block v1-admin carries, for the seven retailer pages first drawn
   on the grayscale retailer (request-detail, select-citation, invite-user,
   verify-installation, and three superseded pages). V1 batch 12 moved them
   onto the port's frame, stat row, tables, fields and tabs; these are the
   controls left with no port component. */
q {
  quotes: none;
}
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.page-head .ph-text {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}
.page-head .ph-text:empty {
  display: none;
}
.page-head > div:last-child:not(.ph-text) {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.grid {
  display: grid;
  gap: 16px;
}
.grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 1040px) {
  .grid.cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .grid.cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .grid.cols-2,
  .grid.cols-3 {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 520px) {
  .grid.cols-4 {
    grid-template-columns: 1fr;
  }
}
.label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 5px;
}
.grid > .field {
  margin-bottom: 0;
}
table.data tr.clickable {
  cursor: pointer;
}
table.data tr.clickable:hover td {
  background: var(--soft);
}
.btn.disabled {
  opacity: 0.45;
  pointer-events: none;
}
.typeahead {
  display: block;
  position: relative;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border: 1px solid var(--control-border);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--paper);
  cursor: pointer;
}
.chip.active {
  border-color: var(--pink-primary);
  color: var(--pink-dark);
  background: var(--pink-soft, #fdf0f7);
}
.selectcard {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--control-border);
  border-radius: 10px;
  background: var(--paper);
  cursor: pointer;
  font-size: 13.5px;
}
.selectcard.sel {
  border-color: var(--pink-primary);
  box-shadow: 0 0 0 1px var(--pink-primary) inset;
}
.selectcard .ic {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border: 1.5px solid var(--control-border);
  border-radius: 50%;
}
.selectcard.sel .ic {
  border: 5px solid var(--pink-primary);
}
.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  cursor: pointer;
}
.switch .track,
.switchrow .sw {
  flex: none;
  position: relative;
  width: 32px;
  height: 18px;
  border-radius: 999px;
  background: var(--line-strong);
}
.switch .track::after,
.switchrow .sw::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--paper);
}
.switch.on .track,
.switchrow.on .sw {
  background: var(--pink-primary);
}
.switch.on .track::after,
.switchrow.on .sw::after {
  left: 16px;
}
.switchrow {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  cursor: pointer;
}
.switchrow:first-child {
  border-top: 0;
}
.switchrow .swtext b,
.switchrow .swtext span {
  display: block;
}
.switchrow .swtext span {
  color: var(--muted);
  font-size: 12.5px;
}
.publogo {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--soft-2);
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  vertical-align: middle;
}
.bodytext {
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-2);
}
.bodytext .hl,
.hl {
  background: var(--pink-soft, #fdf0f7);
  border-bottom: 2px solid var(--pink-primary);
}
.ph {
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--soft);
  color: var(--faint);
  font-size: 12px;
}
.listrow {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
}
.listrow:first-child {
  border-top: 0;
}
.listrow .meta {
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
}

.selectcard b {
  display: block;
  margin-bottom: 2px;
}

/* The back link and the page's own action (View as, Edit, a status) on one
   row, the link at the left and the action at the right (V1 batch 13). */
.backrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.backrow .backlink {
  margin: 0;
}
.backrow-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* A select is as tall as a text field beside it. The native control draws
   its box a few pixels shorter from the same padding, so the height is set
   rather than left to the padding (V1 batch 13). Filter bar and table
   selects keep their smaller padding and height. */
select {
  box-sizing: border-box;
  min-height: calc(1.55em + 20px);
}
.filterbar select,
table.data select {
  min-height: 0;
}

/* A tab bar wider than its column scrolls sideways instead of wrapping,
   so a detail page with many tabs keeps them on one row (V1 batch 13). */
.tabs {
  overflow-x: auto;
  scrollbar-width: thin;
}
.tabs button {
  flex: none;
  white-space: nowrap;
}
.tabs {
  gap: 0;
}
.tabs button {
  padding: 8px 10px;
}

/* An input whose unit is joined to its right edge (V1 batch 16): the unit is
   part of the control, drawn like it, on a tinted ground so it reads as fixed
   rather than typed. Used for the grounding rate ceiling. */
.inputaffix {
  display: flex;
  align-items: stretch;
  max-width: 260px;
}
.inputaffix input {
  flex: 1;
  min-width: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.inputaffix .affix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--control-border);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  background: var(--soft-2);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

/* The weekly email on Your profile (V1 batch 16, Evan: "a much clearer
   breakdown ... then it should list out the first 3 citations, products,
   publishers"): one row per implementation type with what it counted and
   what it cost, a total, then short lists with product images and logos. */
.mailsum {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 18px;
  font-size: 13.5px;
}
.mailsum td {
  padding: 8px 0;
  border-top: 1px solid var(--line);
  vertical-align: top;
}
.mailsum td + td {
  padding-left: 12px;
}
.mailsum td .muted {
  display: block;
  font-size: 12px;
}
.mailsum td.num {
  text-align: right;
  white-space: nowrap;
}
.mailsum tr.total td {
  border-top: 2px solid var(--ink);
  font-weight: 700;
}
.maillist {
  margin: 6px 0 18px;
}
.maillist:last-child {
  margin-bottom: 0;
}
.mailrow {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.mailrow:first-child {
  border-top: 0;
}
.mailrow > .imgph,
.mailrow > .logo {
  flex: none;
  width: 48px;
  height: 48px;
}
.mailrow .body {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
}
.mailrow .body > b {
  display: block;
}
.mailrow .q {
  margin: 2px 0 4px;
  color: var(--ink-2);
}
.mailrow .by {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

/* A part of a card that used to be a card of its own: the Get started tabs
   hold a type's install pieces and its verify checks one under another
   (V1 batch 16), each a rule and a small heading rather than a nested card. */
.subpart {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.subpart > .row-between h4,
.tabpanel > .row-between h4 {
  font-size: 15px;
}
/* The first subpart under a tab's own heading needs no rule above it (Evan,
   2026-09-24: "Too much white space above and below this"). */
.subpart.first {
  margin-top: 6px;
  padding-top: 0;
  border-top: 0;
}
/* A section of an email preview sits in its own box rather than floating
   (Evan, 2026-09-24: "Put each section in boxes so that they aren't just
   floating"): the weekly summary, then each list with its heading. */
.mailbox {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.mailbox > .mailsum {
  margin: 0;
}
.mailbox > .mailhead {
  margin-bottom: 4px;
}
/* The weekly email's usage and cost: a row per implementation type, three
   tiles in each (a figure, its label, and the change from last week, up in
   green and down in red), and the total under them (Evan, 2026-09-24).
   "vs." is said once, in the box's heading, rather than under every tile. */
.mailtype {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.mailhead + .mailtype {
  border-top: 0;
  padding-top: 6px;
}
.mailtype .name {
  margin: 0 0 6px;
  font-size: 13.5px;
  font-weight: 700;
}
.mailtiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.mailtile {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}
.mailtile .label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mailtile b {
  display: block;
  font-size: 17px;
  line-height: 1.3;
  white-space: nowrap;
}
.mailtile .delta,
.mailtotal .delta {
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.delta.good {
  color: var(--ok);
}
.delta.bad {
  color: var(--bad);
}
.delta.flat {
  color: var(--muted);
  font-weight: 500;
}
.mailtotal {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-top: 10px;
  border-top: 2px solid var(--ink);
  font-size: 13.5px;
}
.mailtotal b {
  margin-left: auto;
}
/* The grounding alert: queries by day as a month of squares, the darker the
   busier (Evan, 2026-09-24: "squares that give some indication of usage,
   similar to how GitHub works"), and spend as a bar against the alert and
   the cap. */
.heatmap {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}
/* The calendar takes the full width of the email (Evan, 2026-09-24: "This
   should take up the full width of the email"): seven equal columns, each
   day a square of whatever width its column gets. */
.heatmap .day {
  width: auto;
  height: auto;
  aspect-ratio: 1;
  border-radius: 6px;
}
/* Each day carries its date at the top left, the way a calendar does (V1
   batch 17). White on the darkest pink, ink on the rest, which is the pair
   that keeps each above 4.5:1. */
.heatmap .day {
  padding: 4px 0 0 5px;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.heatmap .day.l4 {
  color: #fff;
}
.heatmap .day.future {
  color: var(--faint);
  font-weight: 500;
}
.heatmap .dow {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}
.day {
  display: inline-block;
  width: 26px;
  height: 26px;
  border-radius: 5px;
  background: var(--soft-2);
}
.day.blank {
  visibility: hidden;
}
.day.future {
  background: transparent;
  border: 1px dashed var(--line-strong);
}
.day.l1 {
  background: #fce7f3;
}
.day.l2 {
  background: #f9a8d4;
}
.day.l3 {
  background: var(--pink-light);
}
.day.l4 {
  background: var(--pink-dark);
}
.heatkey {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.heatkey .day {
  width: 11px;
  height: 11px;
  border-radius: 3px;
}
.heatkey .day:first-child {
  margin-left: 4px;
}
.heatkey .day:last-child {
  margin-right: 4px;
}
.usebar {
  position: relative;
  height: 12px;
  margin: 12px 0 10px;
  border-radius: 999px;
  background: var(--soft-2);
}
.usebar .fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 999px;
  background: var(--pink-primary);
}
.usebar .mark {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 2px;
  margin-left: -1px;
  background: var(--ink);
}
.usekey {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 12px;
  color: var(--ink-2);
}
.usekey span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.usekey .k {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
.usekey .k.fill {
  background: var(--pink-primary);
}
.usekey .k.mark {
  width: 2px;
  height: 14px;
  border-radius: 0;
  background: var(--ink);
}
.usekey .k.cap {
  background: var(--soft-2);
  border: 1px solid var(--line-strong);
}
@media (max-width: 720px) {
  .mailframe {
    padding: 12px 10px;
  }
  .mailcard {
    padding: 16px 14px;
  }
  .mailbox {
    padding: 10px;
  }
  .mailtiles {
    gap: 6px;
  }
  .mailtile {
    padding: 6px;
  }
  .mailtile b {
    font-size: 16px;
  }
}
/* Get started's tabs sit outside the cards, as on Grounding (Evan,
   2026-09-24). The wrapper only scopes the tabs for nav.js; its children
   are laid out as the page's own. */
.gs-steps {
  display: contents;
}
.mailsum td.num:not(:last-child) {
  white-space: normal;
}
.mailhead {
  flex-wrap: nowrap;
  gap: 10px;
  margin-bottom: 0;
}
.mailhead .cite-heading {
  margin: 0;
}

/* The summary email's settings (profile.html, Notifications; Evan,
   2026-09-24: "they should be able to indicate what is included in the
   email and whether they want one email for all their accounts or
   separate emails"), modeled on the live app's Email digest. Delivery
   picks one email for every account or one per account; one email has a
   single How often, Accounts and What it covers, one per account has a
   card for each account holding its own. The preview beside it follows
   the choices with no script: the rules under this comment read the
   inputs through :has(), so the account blocks, the totals, the name
   under the title and each section of the summary show or hide as the
   boxes change. The preview in per account mode is Ulta Beauty's email. */
.cardstack {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}
.digest {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.pickitem .logo {
  width: 22px;
  height: 22px;
  font-size: 9px;
  flex: none;
}
details.acctmail {
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
details.acctmail > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 14px;
  cursor: pointer;
  list-style: none;
}
details.acctmail > summary::-webkit-details-marker {
  display: none;
}
details.acctmail > summary::after {
  content: '';
  flex: none;
  margin-left: auto;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s;
}
details.acctmail[open] > summary::after {
  transform: rotate(-135deg);
}
details.acctmail > summary .logo {
  width: 32px;
  height: 32px;
  font-size: 12px;
  flex: none;
}
details.acctmail .acctname {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.35;
}
.acctmail-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 14px 14px;
}
.mailacct {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 0;
  font-size: 15px;
  font-weight: 700;
}
.mailacct .logo {
  width: 22px;
  height: 22px;
  font-size: 9px;
  flex: none;
}
.mailacct + .mailtype {
  border-top: 0;
  padding-top: 6px;
}
.mailacctblock + .mailacctblock {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}
.notif:has(#d-one:checked) .if-each,
.notif:has(#d-each:checked) .if-one,
.notif:has(#d-each:checked) [data-acct="target"],
.notif:has(#d-one:checked):has(#a1-ulta:not(:checked)) [data-acct="ulta"],
.notif:has(#d-one:checked):has(#a1-target:not(:checked)) [data-acct="target"],
.notif:has(#d-each:checked) [data-for="all"],
.notif:has(#d-each:checked) [data-for="target"],
.notif:has(#d-one:checked):has(#a1-ulta:not(:checked)) [data-for="all"],
.notif:has(#d-one:checked):has(#a1-target:not(:checked)) [data-for="all"],
.notif:has(#d-one:checked):has(#a1-target:checked) [data-for="ulta"],
.notif:has(#d-one:checked):has(#a1-ulta:not(:checked)) [data-for="ulta"],
.notif:has(#d-one:checked):has(#a1-ulta:checked) [data-for="target"],
.notif:has(#d-one:checked):has(#a1-target:not(:checked)) [data-for="target"],
.notif:has(#d-one:checked):has(#c1-usage:not(:checked)) [data-covers="usage"],
.notif:has(#d-each:checked):has(#cu-usage:not(:checked)) [data-covers="usage"],
.notif:has(#d-one:checked):has(#c1-cites:not(:checked)) [data-covers="cites"],
.notif:has(#d-each:checked):has(#cu-cites:not(:checked)) [data-covers="cites"],
.notif:has(#d-one:checked):has(#c1-products:not(:checked)) [data-covers="products"],
.notif:has(#d-each:checked):has(#cu-products:not(:checked)) [data-covers="products"],
.notif:has(#d-one:checked):has(#c1-pubs:not(:checked)) [data-covers="pubs"],
.notif:has(#d-each:checked):has(#cu-pubs:not(:checked)) [data-covers="pubs"] {
  display: none;
}
.notif:has(#d-one:checked):has(#a1-ulta:not(:checked)) .mailacctblock + .mailacctblock {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

/* IP filtering on the profile (2026-09-25): a list of single addresses whose
   traffic is not counted or billed, and a form to add one. .inlinerow puts
   the address and Use my IP address side by side at the input's height, as
   on admin; hr.rule is admin's divider inside a card. */
hr.rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 24px -20px 18px;
}
.inlinerow {
  display: flex;
  gap: 10px;
  align-items: stretch;
  flex-wrap: wrap;
}
.inlinerow input,
.inlinerow select {
  flex: 1 1 180px;
  min-width: 0;
  width: auto;
}
.inlinerow .btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 0;
}
/* An address, its note and its date stay on one line each; on a phone the
   table scrolls inside its .tablewrap rather than breaking an address. */
[data-ip] table.data td {
  white-space: nowrap;
}

/* ------------------------------------------------------------------------
   V0 additions. This stylesheet is v1-retailer/web/wireframe/style.css in
   whole (the port plus the retailer's additions), and the same file serves
   all three V0 surfaces, so nothing below is surface specific. What follows
   is the handful of rules the V1 admin and publisher stylesheets carried
   that the retailer's did not, copied verbatim so a page ported from either
   surface still renders: .inlineform (admin's one row settings), .mail-ent
   (the email preview's logo column) and .scopelist (a checkbox list under
   an Only these choice).
   ------------------------------------------------------------------------ */
/* A setting that is one field and one button, side by side on one row
   (V1 batch 17): the organization's name and Save, the delete confirmation
   and Delete. The input and the button share .inlinerow, which stretches
   the button to the input's height at every size (V1 batch 18, Evan: "Make
   the save button the same height as the input box"). */
.inlineform {
  max-width: 620px;
  margin-bottom: 0;
}
.mail-ent {
  display: grid;
  grid-template-columns: var(--mail-logo, 56px) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}
.mail-ent > div {
  min-width: 0;
}
/* The new request's logo is the larger one, 72px (96px until V1 batch 17,
   Evan: "Make the image a little less tall"). */
.mail-ent.lg {
  --mail-logo: 72px;
}
.mail-ent > .logo {
  width: 100%;
  height: auto;
  min-height: var(--mail-logo, 44px);
  border-radius: 10px;
  font-size: 13px;
}
.mail-ent > .logo img {
  object-fit: contain;
  padding: 18%;
  box-sizing: border-box;
}
.mail-ent > div > .url-line,
.mail-ent > div > .cite-when {
  display: block;
  white-space: normal;
  overflow: visible;
}
.scopelist {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0 0 26px;
}
.scopelist input[type=search] {
  width: 100%;
}
.pickgroup:has(input[value="all"]:checked) .scopelist {
  display: none;
}
.mailempty {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* The one month calendar on a page (V0): the email's .heatmap squares drawn
   inside a card, full width. A card is far wider than an email, so a day is
   a short wide cell rather than a square, the shape a calendar month has,
   and it never drops under 40px tall, which is what keeps it a target on a
   phone. The figures are read by pointing, as on a chart. */
.heatmap[data-calendar] {
  gap: 8px;
  margin-top: 12px;
}
.heatmap[data-calendar] .day {
  aspect-ratio: 2.4 / 1;
  min-height: 40px;
  font-size: 12px;
  padding: 6px 0 0 8px;
  cursor: default;
}
.heatmap[data-calendar] .day:focus-visible {
  outline: 2px solid var(--pink-primary);
  outline-offset: 2px;
}
.heatmap[data-calendar] .day.blank {
  visibility: hidden;
}
@media (max-width: 720px) {
  .heatmap[data-calendar] { gap: 5px; }
  .heatmap[data-calendar] .day { aspect-ratio: 1; padding: 4px 0 0 5px; font-size: 10.5px; }
}

/* The summary email preview follows What it covers (V0). V1 keyed these on
   the Delivery radio, which V0 dropped, so the sections hide on the boxes
   alone; the retailer's and the publisher's box ids are both listed since
   the stylesheet is shared. */
.notif:has(#c1-usage:not(:checked)) [data-covers="usage"],
.notif:has(#c1-cites:not(:checked)) [data-covers="cites"],
.notif:has(#c1-products:not(:checked)) [data-covers="products"],
.notif:has(#c1-pubs:not(:checked)) [data-covers="pubs"],
.notif:has(#c1-placements:not(:checked)) [data-covers="placements"],
.notif:has(#c1-retailers:not(:checked)) [data-covers="retailers"] {
  display: none;
}

/* Dashboard notifications (V0 batch 3): the bell before the chip, its
   unread count, and its rows inside the chip's own menu shell. Drawn by
   nav.js from that surface's NOTES. */
.notifbell {
  position: relative;
}
.bellbtn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-2);
  cursor: pointer;
}
.bellbtn:hover {
  background: var(--soft);
}
.bellbtn .bell-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--pink-dark);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
.notifbell .chipmenu {
  width: min(340px, calc(100vw - 32px));
}
.notifbell .chipmenu a.note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 0;
}
.notifbell .note .note-ico {
  flex: none;
  width: 32px;
  height: 32px;
  font-size: 11px;
  margin-top: 1px;
}
.notifbell .note .note-body {
  flex: 1;
  min-width: 0;
}
.notifbell .note-body b {
  display: block;
  font-size: 13px;
}
.notifbell .note-body span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
@media (max-width: 720px) {
  .bellbtn {
    width: 44px;
    height: 44px;
  }
  /* On a phone the menu hangs from the topbar, not the bell, so it spans
     the screen instead of running off its left edge. */
  .topbar {
    position: relative;
  }
  .notifbell {
    position: static;
  }
  .notifbell .chipmenu {
    left: 16px;
    right: 16px;
    width: auto;
    top: calc(100% + 4px);
  }
}

/* Definition (V0, 2026-10-08; Evan: "give the borders of the boxes and the
   nav bars (top and left) a little more definition ... pop a little more,
   without looking cheesy"). The page ground is a step deeper, and the frame
   (cards, stat tiles, the sidebar's edge, the topbar's and brand row's
   bottom edge) takes its own line color a step stronger than --line, so
   table rules and dividers inside a card stay as light as they were. Cards
   and tiles get a lift shadow too soft to read as a shadow on its own. */
:root {
  --frame: #d4d7dd;
  --lift: 0 1px 2px rgba(26, 26, 46, 0.06), 0 2px 8px -2px rgba(26, 26, 46, 0.06);
}
body {
  background: #f2f3f5;
}
.card,
.stat {
  border-color: var(--frame);
  box-shadow: var(--lift);
}
a.stat:hover {
  box-shadow: 0 1px 2px rgba(26, 26, 46, 0.08), 0 4px 12px -2px rgba(26, 26, 46, 0.1);
}
.sidebar {
  border-right-color: var(--frame);
}
.sidebar .brand-row,
.topbar {
  border-bottom-color: var(--frame);
}
.topbar {
  box-shadow: 0 1px 3px rgba(26, 26, 46, 0.05);
}
.versionbar {
  border-bottom-color: var(--frame);
}

/* Readability (V0, 2026-10-08; Evan: "Do an audit of the pages to make
   sure that everything is very readable", and the bell and chip borders
   "need it more defined (plus similar boxes)"). Every text color clears
   WCAG AA already; the goal here is that nothing is gray on gray. Muted
   and faint text are a step darker (muted at least 7.3:1 and faint 6.4:1
   on every ground V0 uses), an unselected tab reads in ink, the info
   notice and Cancel no longer share the page ground's gray, and the
   controls that sit on the topbar or page ground (bell, chip, date
   range, price choices, the phone menu button) take --edge, a line
   between --frame and --control-border. */
:root {
  --muted: #4a505b;
  --faint: #525965;
  --edge: #aab0ba;
}
.tabs {
  border-bottom-color: var(--frame);
}
.tabs button {
  color: var(--ink-2);
}
.notice.info {
  border-color: var(--frame);
  border-left-color: var(--control-border);
  background: var(--paper);
  color: var(--ink);
}
.btn.cancel {
  border-color: var(--edge);
  background: #e8eaed;
  color: var(--ink);
}
.btn.cancel:hover {
  background: #dfe2e6;
}
.bellbtn,
.userchip,
.daterange,
.pricebtn,
.mobile-nav-toggle {
  border-color: var(--edge);
}
.bellbtn {
  color: var(--ink);
}
.pagination .btn.cancel {
  color: var(--muted);
}
.day.l3 {
  color: var(--ink);
}


/* A page's one primary link (V0, 2026-10-08; Evan: "Make that link
   slightly bigger, and make it red with red underline (using our standard
   colors)"): the product page on product detail, an article's source, a
   publisher's website. The brand's red is its pink, so it is --pink-dark,
   the primary button's color, underlined in the same. */
a.primary-link {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--pink-dark);
  text-decoration: underline;
  text-decoration-color: var(--pink-dark);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
a.primary-link:hover {
  color: var(--pink-press);
  text-decoration-color: var(--pink-press);
}

/* A line of labeled switches (V0, 2026-10-08; Evan: "have them in one row
   with the labels"): the On-site and Paid ads switches for a retailer not
   on Geodesix on the publisher's Retailers page, and admin's Defaults
   under a publisher's Retailers tab. Wraps on a narrow screen. */
.switchline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 28px;
}
.switchline > .lead {
  margin-right: 12px;
}

/* ====================================================================
   Ads build additions (2026-10-29). Everything above is v0-retailer's
   stylesheet in whole, copied, so the two surfaces share every component;
   drift is corrected by copying again. What follows is the analytics
   dashboard idiom Evan asked for ("closer to Triple Whale, Northbeam,
   Hyros"): a dark sidebar, a KPI strip whose tiles carry the change
   against the previous period and a sparkline, a metric picker on the
   chart with the previous period as a dashed second line, creative cards
   with their metrics on them, and metric cells colored on a scale from
   best to worst. The scale uses the port's two state colors (--ok and
   --bad) as tints, so no new hue enters the palette; the change figure
   is green when it moved the right way and red when it moved the wrong way
   (a lower cost per purchase is green), the one place a number is colored,
   as in the summary email (Evan, 2026-09-24).
   ==================================================================== */

/* The sidebar is dark, as the analytics dashboards draw it: the frame
   recedes and the figures carry the page. The mark's dots are white here
   (the SVG's fill attribute loses to this rule). Every text on it clears
   7:1 against the ground (Ads batch 1, Evan: "Make sure all the text is
   very readable and has enough contrast"): items 13.7:1, headings 8.6:1,
   a Soon item 7.6:1. */
.sidebar {
  background: var(--ink);
  border-right-color: #2a2a44;
}
.sidebar .brand-row {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}
.sidebar .brand .name {
  color: #fff;
}
.sidebar .brand .name small {
  color: var(--on-dark-muted);
}
.sidebar .logo-dots circle {
  fill: #fff;
}
.sidebar .nav-section h4 {
  color: #b4b7cc;
}
.sidebar .nav-item {
  color: #e4e6f0;
}
.sidebar .nav-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}
.sidebar .nav-item.active {
  background: rgba(233, 30, 140, 0.18);
  color: #fbb6dc;
}
/* A nav item whose page is not drawn yet: not a link, so it cannot be a
   dead one (the entity link rule). It reads as part of the nav so the
   surface's shape is reviewable before every page exists. */
.sidebar .nav-item.soon {
  color: #a9acc2;
  cursor: default;
}
.sidebar .nav-item.soon:hover {
  background: none;
}
.sidebar .nav-item.soon .nav-tag {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #a9acc2;
  border: 1px solid #5a5d7a;
  border-radius: 999px;
  padding: 1px 6px;
}
.sidebar .btn.sm {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}
.sidebar .btn.sm:hover {
  background: rgba(255, 255, 255, 0.08);
}
.sidebar .mobile-nav-close {
  color: #fff;
}
.sidebar .mobile-nav-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* The row above the figures: the channels at the left, one chip per ad
   platform (Ads batch 1, Evan: "How does this work if we want to expand to
   TikTok, Google, or others?"): a connected channel carries its sync time
   and the one the figures are read for is marked; a channel not connected
   is dashed and reads Connect. The date range sits at the right. */
.dashrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.dashrow .when {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.dashrow .compare {
  font-size: 11.5px;
  color: var(--muted);
}
.channels {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.channels .lead {
  font-size: 12.5px;
  color: var(--muted);
  margin-right: 2px;
}
.conn.off {
  color: var(--muted);
  font-weight: 500;
  border-style: dashed;
}
.conn.off .dot {
  background: var(--line-strong);
}
.conn.active {
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
}
.conn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--edge, var(--line));
  border-radius: 999px;
  background: var(--paper);
  padding: 6px 12px 6px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.conn .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  flex: none;
}
.conn .muted {
  font-weight: 500;
}

/* The KPI strip. Six tiles in one row, each the figure for the window,
   the change against the previous period and a sparkline of the days. A
   tile that stands for a chart metric carries data-seg and lights when
   its metric is charted. */
.kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.kpi {
  position: relative;
  display: block;
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--frame, var(--line));
  border-radius: var(--radius);
  box-shadow: var(--lift, none);
  padding: 12px 14px 10px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
a.kpi:hover,
a.kpi:focus-visible {
  border-color: var(--control-border);
}
.kpi.active {
  border-color: var(--pink-dark);
  box-shadow: 0 0 0 1px var(--pink-dark), var(--lift, 0 0 0 0 transparent);
}
.kpi .label {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kpi .value {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.kpi .sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kpi .spark {
  display: block;
  width: 100%;
  height: 26px;
  margin-top: 8px;
}
.kpi .spark polyline {
  fill: none;
  stroke: var(--pink-dark);
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
}
.kpi .spark polygon {
  fill: var(--pink-soft);
}
.delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 999px;
  padding: 1px 7px;
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}
.delta.good {
  color: var(--ok);
  background: #e7f6ec;
}
.delta.bad {
  color: var(--bad);
  background: #fbe9e9;
}
.delta.flat {
  color: var(--muted);
  background: var(--soft-2);
}
.kpi .value .delta {
  margin-left: 6px;
  position: relative;
  top: -3px;
}

/* The chart card's head: the heading and the metric picker at the left,
   the readout at the right. The second line is the previous period,
   dashed, in the port's light pink. */
.charthead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.charthead .lead {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.charthead h3 {
  margin: 0;
}
.chart-key.prev {
  background: none;
  border-top: 2px dashed var(--pink-light);
  height: 0;
}

/* Metric cells on a scale (Northbeam colors each metric from best to
   worst). Five steps from --ok to --bad as tints, ranked within a column:
   h1 is the best in its column and h5 the worst. Ink stays dark on every
   step (the readability rule: no gray text on a gray fill, and no number
   is colored but the change). */
.heat {
  font-variant-numeric: tabular-nums;
}
.heat.h1 { background: #d7efdf; }
.heat.h2 { background: #e9f6ee; }
.heat.h3 { background: var(--soft-2); }
.heat.h4 { background: #fbe9e9; }
.heat.h5 { background: #f6d2d2; }
td.heat {
  text-align: right;
  font-weight: 600;
}

/* Creative cards: the rendered variation (the quote on the chosen media,
   the publisher's mark under it), its badge, then its figures in a row of
   cells colored on the scale. */
.creatives {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.creative {
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--frame, var(--line));
  border-radius: 10px;
  box-shadow: var(--lift, none);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.creative .preview {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--soft-2);
  overflow: hidden;
}
.creative .preview > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.creative .preview.ph::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(45deg, #e9ebef, #e9ebef 10px, #f3f4f6 10px, #f3f4f6 20px);
}
.creative .preview .ph-label {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  padding: 2px 8px;
}
.creative .preview .badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--paper);
}
.creative .overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 36px 12px 12px;
  background: linear-gradient(to top, rgba(26, 26, 46, 0.86), rgba(26, 26, 46, 0));
  color: #fff;
}
.creative .overlay q {
  display: block;
  font-size: 13.5px;
  line-height: 1.3;
  font-weight: 600;
}
.creative .overlay .src {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 11.5px;
  color: #e6e7f0;
}
.creative .overlay .src .logo {
  width: 18px;
  height: 18px;
  font-size: 8px;
  flex: none;
}
.creative .meta {
  padding: 10px 12px 8px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.creative .meta b {
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.creative .meta span {
  white-space: nowrap;
}
.creative .metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  margin-top: auto;
}
.creative .metric {
  padding: 8px 6px 7px;
  text-align: center;
  border-right: 1px solid var(--line);
}
.creative .metric:last-child {
  border-right: 0;
}
.creative .metric .k {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--muted);
}
.creative .metric .v {
  display: block;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
}

/* The group-by control (Triple Whale groups a creative report by ad,
   image, video or copy): the segmented control's look, its own class so
   the chart's type filter and it never touch each other's panels. One
   [data-group-panel] draws at a time. */
.groupbar {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  padding: 3px;
}
.groupbar .grp {
  appearance: none;
  border: 0;
  background: none;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  border-radius: 999px;
  padding: 5px 11px;
  cursor: pointer;
  line-height: 1.2;
}
.groupbar .grp:hover {
  color: var(--ink);
}
.groupbar .grp.active {
  background: var(--ink);
  color: var(--on-dark);
}
.groupbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.groupbar-row .muted {
  font-size: 12px;
}

/* A quote in a table cell with the media it ran on beside it. */
.var-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.var-cell .thumb {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  flex: none;
  overflow: hidden;
  background: var(--soft-2);
  border: 1px solid var(--line);
}
.var-cell .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.var-cell .thumb.ph {
  background: repeating-linear-gradient(45deg, #e9ebef, #e9ebef 6px, #f3f4f6 6px, #f3f4f6 12px);
}
.var-cell .txt {
  min-width: 0;
}
.var-cell .txt q {
  display: block;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
/* A two word header may wrap on this surface, so a wide table keeps its
   last column on a laptop. */
.content table.data th {
  white-space: normal;
}
/* The Campaigns table's last column is narrower, so the rest fit a laptop. */
#campaigns table.campaigns .var-cell .txt q,
#campaigns table.campaigns .var-cell .txt .muted {
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#campaigns table.campaigns th,
#campaigns table.campaigns td {
  padding-left: 10px;
  padding-right: 10px;
}
#campaigns table.campaigns th {
  white-space: normal;
}
.var-cell .txt .muted {
  font-size: 11.5px;
  display: block;
}

@media (max-width: 1240px) {
  .kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .kpi .value {
    font-size: 19px;
  }
  .dashrow .when {
    align-items: flex-start;
    width: 100%;
  }
}
@media (max-width: 720px) {
  .charthead .lead {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .charthead .lead .segbar {
    display: flex;
    width: 100%;
  }
  .charthead .lead .seg {
    flex: 1 1 0;
    min-width: 0;
    padding-left: 6px;
    padding-right: 6px;
    font-size: 12px;
  }
  .groupbar {
    display: flex;
    width: 100%;
  }
  .groupbar .grp {
    flex: 1 1 0;
    min-width: 0;
    padding-left: 6px;
    padding-right: 6px;
    font-size: 12px;
  }
}

/* The plan card (2026-10-29, Evan: "need to make it clear how much of their
   monthly budget with us they have spent and their overages (which is just
   based on clicks and is incremental to their media budget)"). It sits
   above the KPI strip so what the advertiser owes Geodesix is never read
   as part of what they spend on Meta: the plan and its allowance at the
   left, four figures at the right, the port's .usebar for the month, and
   one line of keys under it. */
.plancard {
  margin-bottom: 18px;
}
.plan-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
}
.plan-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.plan-title h3 {
  margin: 0;
}
.plan-title .muted {
  font-size: 12.5px;
}
.plan-figs {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
.plan-fig {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.plan-fig .k {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
}
.plan-fig .v {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.plan-fig .v small {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}
.plancard .usebar {
  margin-top: 14px;
}
.plancard .usekey span {
  white-space: nowrap;
}
@media (max-width: 720px) {
  .plan-figs {
    gap: 14px 20px;
  }
  .plan-fig .v {
    font-size: 16px;
  }
  .plancard .usekey span {
    white-space: normal;
  }
}

/* Ads batch 2 (2026-10-29): the rest of the advertiser surface, and the
   dashboard's Campaigns card holding the campaigns, the quotes and the
   publishers as one group-by. */

/* A destination URL under a name, one line, cut short (Ads batch 2, Evan:
   "Replace this with the URL of the destination, which can be truncated.
   Shouldn't wrap"). */
.entity .ent-sub.url {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 190px;
}

/* Confidence, Marpipe's three colors: gray under 55%, yellow to 79%, green
   from 80%. A badge, since it is a state a person acts on. */
.conf {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 9px;
  font-variant-numeric: tabular-nums;
}
.conf.low { background: var(--soft-2); color: var(--muted); }
.conf.mid { background: #fdf0d8; color: var(--warn); }
.conf.high { background: #d7efdf; color: var(--ok); }

/* The pick grid on Create campaign: quotes down the side, media across the
   top, every cell a rendered preview with a checkbox; checking cells is
   choosing the variations. */
.pickgrid {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}
.pickgrid th,
.pickgrid td {
  padding: 8px;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.pickgrid th {
  text-align: left;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.pickgrid th.media {
  width: 150px;
  text-align: center;
}
.pickgrid th.media .thumb {
  display: block;
  width: 64px;
  height: 64px;
  margin: 0 auto 4px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--soft-2);
  border: 1px solid var(--line);
}
.pickgrid th.media .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pickgrid th.media .thumb.ph {
  background: repeating-linear-gradient(45deg, #e9ebef, #e9ebef 6px, #f3f4f6 6px, #f3f4f6 12px);
}
.pickgrid td.quotecol {
  width: 34%;
}
.pickgrid td.quotecol q {
  display: block;
  font-weight: 600;
}
.pickgrid td.quotecol .muted {
  font-size: 12px;
  display: block;
}
.pickcell {
  display: block;
  position: relative;
  cursor: pointer;
}
.pickcell input {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--pink-dark);
}
.pickcell .mini {
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background: var(--soft-2);
  border: 2px solid transparent;
}
.pickcell input:checked + .mini {
  border-color: var(--pink-dark);
}
.pickcell .mini img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pickcell .mini.ph {
  background: repeating-linear-gradient(45deg, #e9ebef, #e9ebef 8px, #f3f4f6 8px, #f3f4f6 16px);
}
.pickcell .mini .q {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 8px 8px;
  background: linear-gradient(to top, rgba(26, 26, 46, 0.86), rgba(26, 26, 46, 0));
  color: #fff;
  font-size: 10.5px;
  line-height: 1.25;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.picksum {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 13px;
}
.picksum b {
  font-variant-numeric: tabular-nums;
}

/* A list of the media uploaded for a campaign or a product. */
.mediagrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.mediatile {
  min-width: 0;
  border: 1px solid var(--frame, var(--line));
  border-radius: 10px;
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--lift, none);
}
.mediatile .thumb {
  aspect-ratio: 1 / 1;
  background: var(--soft-2);
  position: relative;
}
.mediatile .thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mediatile .thumb.ph {
  background: repeating-linear-gradient(45deg, #e9ebef, #e9ebef 10px, #f3f4f6 10px, #f3f4f6 20px);
}
.mediatile .thumb .tag {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 10.5px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  padding: 2px 7px;
  color: var(--ink-2);
}
.mediatile .meta {
  padding: 8px 10px 9px;
  font-size: 12px;
}
.mediatile .meta b {
  display: block;
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mediatile .meta .muted {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mediatile.upload {
  border-style: dashed;
  box-shadow: none;
  display: grid;
  place-items: center;
  min-height: 150px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* An asset row on a campaign's Assets tab: the preview beside the fields
   the advertiser pastes into Ads Manager, each with Copy. */
.asset {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 18px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.asset:first-of-type {
  border-top: 0;
  padding-top: 4px;
}
.asset .creative {
  box-shadow: none;
}
.asset .fields {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.asset .fields .field {
  margin: 0;
}
.asset .ratios {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.asset .ratios .chip {
  cursor: default;
}
.copyrow {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.copyrow .codebox {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.copyrow .btn {
  flex: none;
}
@media (max-width: 720px) {
  .asset {
    grid-template-columns: 1fr;
  }
  .asset .creative {
    max-width: 240px;
  }
}

/* The three plans on Billing, choice cards. */
.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.plan {
  border: 1px solid var(--frame, var(--line));
  border-radius: 10px;
  padding: 16px;
  background: var(--paper);
  position: relative;
}
.plan.current {
  border-color: var(--pink-dark);
  box-shadow: 0 0 0 1px var(--pink-dark);
}
.plan h4 {
  margin: 0 0 4px;
  font-size: 15px;
}
.plan .price {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.4px;
}
.plan .price small {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}
.plan dl.kv {
  margin-top: 10px;
  font-size: 13px;
}
.plan .badge {
  position: absolute;
  top: 12px;
  right: 12px;
}
.plan .btn {
  margin-top: 14px;
  width: 100%;
  justify-content: center;
}

/* A connection row: the platform, its state and its facts, the action at
   the right. */
.connrow {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.connrow:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.connrow .who {
  flex: 1 1 auto;
  min-width: 0;
}
.connrow .who b {
  display: block;
  font-size: 14px;
}
.connrow .who .muted {
  font-size: 12.5px;
}
.connrow .mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--soft);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  color: var(--ink-2);
  flex: none;
}
.connrow .act {
  flex: none;
  display: flex;
  gap: 8px;
}
@media (max-width: 600px) {
  .connrow {
    flex-wrap: wrap;
  }
  .connrow .act {
    width: 100%;
  }
}

/* The campaign's own checklist on its Setup tab, a table of what the
   advertiser builds in Ads Manager. */
.checklist td:first-child {
  width: 220px;
  color: var(--muted);
  font-weight: 600;
}

/* Ads batch 3 (2026-10-30): the campaigns table opens into its variations,
   the create flow is one image and several citations with a placement page
   after it, Performance is a page, and the plan card is four figures. */

/* A card's foot link, where a list on the dashboard points at its page
   (Evan: "a way to view more campaigns if there are more. Maybe with a link
   at the bottom"). The table's bleed is taken back the way pagination does. */
.card .tablewrap + .cardfoot,
.card table.data + .cardfoot {
  margin-top: 18px;
}
.cardfoot {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
}
.card [data-group-panel] .cardfoot {
  margin-top: 18px;
}

/* The winner's row in an opened campaign, and on a campaign's own page. */
table.data tr.winner > td {
  background: var(--pink-soft);
}
tr.expansion table.data tr.winner > td {
  background: var(--pink-soft);
}
table.data tr.winner .badge {
  vertical-align: middle;
  margin-left: 6px;
}

/* A search bar in a card's title row (the Campaigns list, Evan: "put the
   search box in its place, so there is not a big white space"). */
.groupbar-row > .filterbar {
  margin: 0;
  flex: 1 1 320px;
  min-width: 0;
}

/* A form field across both columns. */
.formgrid .field.full {
  grid-column: 1 / -1;
}

/* An upload tile's label wraps (Ads batch 3). */
.mediatile.upload {
  text-align: center;
  padding: 12px;
  white-space: normal;
}

/* New campaign: the one image, chosen, beside Choose from library (which
   opens the library in place) and Upload. */
.imagepick {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.imagepick .mediatile.chosen {
  width: 170px;
  flex: none;
  border-color: var(--pink-dark);
  box-shadow: 0 0 0 1px var(--pink-dark);
}
.imagepick-actions {
  flex: 1 1 320px;
  min-width: 0;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  flex-wrap: wrap;
}
details.libpick {
  flex: 1 1 100%;
  display: contents;
}
details.libpick > summary {
  list-style: none;
  display: inline-flex;
}
details.libpick > summary::-webkit-details-marker {
  display: none;
}
details.libpick[open] > .mediagrid {
  flex: 1 1 100%;
  width: 100%;
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
details.libpick > .mediagrid {
  order: 10;
}
details.libpick > .mediagrid .mediatile {
  cursor: pointer;
}

/* New campaign: the citations, one checkbox row each. */
.picklist {
  display: grid;
}
.pickrow {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  cursor: pointer;
}
.pickrow:first-child {
  border-top: 0;
  padding-top: 0;
}
.pickrow input {
  width: 18px;
  height: 18px;
  margin: 0;
  flex: none;
  accent-color: var(--pink-dark);
}
.pickrow .var-cell .txt q {
  max-width: none;
  white-space: normal;
}

/* Place the citations: the preview at the left, the controls at the right. */
.designer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 18px;
  align-items: start;
}
.designer .controls {
  display: grid;
  gap: 18px;
}
.designer .canvas .ratios {
  display: flex;
  gap: 6px;
}
.designer .canvas .ratios .chip {
  cursor: pointer;
}
.stage {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 520px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--soft-2);
  border: 1px solid var(--line);
}
.stage > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.plate {
  position: absolute;
  left: 6%;
  right: 6%;
  cursor: move;
}
.plate.bottom {
  bottom: 6%;
}
.plate-bg {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: rgba(196, 60, 110, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.35);
}
.plate-text {
  position: relative;
  padding: 16px 18px 14px;
  color: #fff;
  font-family: 'Inter', sans-serif;
}
.plate-text q {
  display: block;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.2px;
}
.plate-text .src {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
}
.plate-text .src .logo {
  background: #fff;
}
.plate .handle {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: #fff;
  border: 2px solid var(--pink-dark);
  cursor: nwse-resize;
}
.templates {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.tpl {
  display: grid;
  gap: 6px;
  justify-items: center;
  font-size: 11.5px;
  color: var(--ink-2);
  cursor: pointer;
  text-align: center;
}
.tpl input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.tpl-pic {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  border: 2px solid var(--line);
  background: var(--soft-2);
}
.tpl.sel .tpl-pic {
  border-color: var(--pink-dark);
}
.tpl-pic i {
  position: absolute;
  background: var(--pink-dark);
  opacity: 0.75;
  border-radius: 3px;
}
.tpl-pic.bottom i { left: 10%; right: 10%; bottom: 10%; height: 28%; }
.tpl-pic.top i { left: 10%; right: 10%; top: 10%; height: 28%; }
.tpl-pic.center i { left: 15%; right: 15%; top: 32%; height: 36%; }
.tpl-pic.corner i { left: 8%; bottom: 8%; width: 50%; height: 22%; }
.swatchrow {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.swatchrow .swatch {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  flex: none;
}
.swatchrow input {
  width: 100px;
}
.swatchrow .muted {
  font-size: 11.5px;
}
.sliderrow {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sliderrow input[type=range] {
  flex: 1 1 auto;
  accent-color: var(--pink-dark);
}
.sliderrow b {
  min-width: 40px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.logopick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.logoopt {
  display: grid;
  gap: 6px;
  justify-items: center;
  align-content: center;
  padding: 10px 6px;
  border: 2px solid var(--line);
  border-radius: 8px;
  font-size: 11.5px;
  color: var(--ink-2);
  cursor: pointer;
  text-align: center;
  min-height: 78px;
}
.logoopt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.logoopt.sel {
  border-color: var(--pink-dark);
}
.logoopt .wordmark {
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
}
.logoopt .wordmark.light {
  color: #fff;
  background: var(--ink);
  padding: 2px 6px;
  border-radius: 4px;
}
@media (max-width: 1000px) {
  .designer {
    grid-template-columns: 1fr;
  }
}
/* The placement page's controls read one field per row; a citation in an
   opened campaign has the room to read in full. */
.designer .controls .formgrid {
  grid-template-columns: 1fr;
}
#campaigns table.campaigns tr.expansion table.data .var-cell .txt q,
#campaigns table.campaigns tr.expansion table.data .var-cell .txt .muted,
tr.expansion table.data .var-cell .txt q,
tr.expansion table.data .var-cell .txt .muted {
  max-width: 340px;
}
.var-cell .txt .muted .badge {
  margin-left: 6px;
  vertical-align: middle;
}

/* ====================================================================
   Ads batch 4 (2026-10-30): the shell moves toward Ads Manager (Evan:
   "Since this is relying on Meta Ad Manager, let's get the flow to be a
   little closer to that ... I like the simplicity of the tables and the
   left navigation"). The sidebar is an icon rail that expands on hover
   and stays open on a click; Campaigns is the home page and reads like
   Ads Manager's table (a Delivery circle, Results with the result's kind
   beside the figure, a totals row); Billing & payments and Settings were
   two column pages with a sub nav at the left (tabs above since Ads
   batch 27); the
   create flow ends on an Assets page with the Meta walkthrough.
   ==================================================================== */

/* The rail. 60px of icons; hovering widens it to 224px over the content
   (the grid column stays 60px, the rail overflows it and sits above the
   page), and the pin at its foot keeps it open, which widens the column
   instead so the page reflows beside it. Under 880px it is the drawer as
   before, full width with every label showing. */
.app {
  --sidebar-w: 60px;
}
body.nav-pinned .app {
  --sidebar-w: 224px;
}
.sidebar {
  width: 60px;
  padding: 0 10px 12px;
  gap: 2px;
  overflow: hidden;
  z-index: 30;
  transition: width 0.15s ease;
}
.sidebar:hover,
body.nav-pinned .sidebar {
  width: 224px;
}
.sidebar:hover {
  box-shadow: 10px 0 28px -10px rgba(26, 26, 46, 0.45);
}
body.nav-pinned .sidebar {
  box-shadow: none;
}
.sidebar .brand-row {
  margin: 0 -10px 8px;
  padding: 0 14px;
  justify-content: flex-start;
}
.sidebar .brand-row .brand {
  gap: 12px;
}
.sidebar .brand .logo-dots {
  flex: none;
  width: 32px;
  height: 32px;
}
.sidebar .brand .name,
.sidebar .nav-item .lbl {
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.1s ease;
}
.sidebar:hover .brand .name,
.sidebar:hover .nav-item .lbl,
body.nav-pinned .sidebar .brand .name,
body.nav-pinned .sidebar .nav-item .lbl {
  opacity: 1;
  transition-delay: 0.05s;
}
.sidebar .nav-section h4 {
  display: none;
}
.sidebar .nav-item {
  padding: 9px;
  gap: 14px;
  border-radius: 9px;
}
.sidebar .nav-item .ic {
  flex: none;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sidebar .nav-item .ic svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sidebar .nav-bottom {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar .nav-item.pin {
  color: #b4b7cc;
  background: none;
  border: 0;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.sidebar .nav-item.pin:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}
body.nav-pinned .sidebar .nav-item.pin .ic svg {
  transform: rotate(180deg);
}
@media (max-width: 880px) {
  .sidebar,
  .sidebar:hover,
  body.nav-pinned .sidebar {
    width: min(280px, 82vw);
    box-shadow: none;
  }
  .sidebar .brand .name,
  .sidebar .nav-item .lbl {
    opacity: 1;
  }
  .sidebar .nav-item.pin {
    display: none;
  }
}

/* Delivery, as Ads Manager draws it: a circle before the word. In draft
   is hollow; Active is green; Off is gray; Completed is ink. A campaign
   is In draft from the moment its assets are made until the first
   clicks arrive carrying its ad id, when it turns Active on its own. */
.deliv {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.deliv::before {
  content: '';
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--faint);
}
.deliv.active::before {
  background: var(--ok);
  border-color: var(--ok);
}
.deliv.off::before {
  background: #8b919e;
  border-color: #8b919e;
}
.deliv.done::before {
  background: var(--ink-2);
  border-color: var(--ink-2);
}

/* A result reads as the figure then its kind in gray on the same line
   ("131 Purchases", "$14.05 Per purchase"), as the demo's table does. */
table.data td .rt {
  color: var(--muted);
  font-weight: 400;
  margin-left: 5px;
}
table.data tr.totals td {
  background: var(--soft);
  border-top: 2px solid var(--line-strong);
  font-weight: 600;
  color: var(--ink-2);
}
table.data tr.totals td .rt {
  font-weight: 400;
}
table.data td.cname b {
  display: block;
}
table.data td.cname .url-line {
  display: block;
  margin-top: 2px;
}

/* The toolbar above the Campaigns table: search and Filters at the left,
   the date range at the right, Create first. */
.tableactions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.tableactions .filterbar {
  flex: 1 1 320px;
  margin: 0;
}
.tableactions .daterange {
  margin-left: auto;
}

/* The setup strip on Campaigns: the steps an account needs before its
   first campaign, in place of Ads Manager's Account overview page. It is
   dismissable and goes on its own once every step is done. */
.setup {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  padding: 12px 16px;
}
.setup .lead {
  font-weight: 600;
}
.setup .step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
}
.setup .step .ck {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}
.setup .step.done {
  color: var(--muted);
}
.setup .step.done .ck {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
}
.setup .dismiss {
  margin-left: auto;
}

/* Billing & payments and Settings: several pages under one heading, moved
   between by the link tabs above the page (nav.tabs, Ads batch 27). */
.subpage > .subcontent > .card:first-child {
  margin-top: 0;
}

/* A big figure in a billing card (the balance, the next charge). */
.bigfig {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.1;
  margin: 4px 0 6px;
}
.bigfig small {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
  margin-left: 8px;
}

/* The Meta walkthrough on the Assets page: numbered steps, each a line
   of instruction with nothing explained. */
ol.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: s;
  display: grid;
  gap: 12px;
}
ol.steps li {
  position: relative;
  padding-left: 40px;
  counter-increment: s;
  line-height: 1.45;
}
ol.steps li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: -1px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
ol.steps li b {
  display: block;
}
ol.steps li code {
  font-size: 12px;
  background: var(--soft-2);
  padding: 1px 5px;
  border-radius: 4px;
}

/* The ready bar at the top of the Assets page: the delivery circle, the
   line, and the two buttons. */
.readybar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.readybar .txt {
  flex: 1 1 320px;
}
.readybar .txt b {
  display: block;
}
.readybar .acts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Notification preferences: one row per event, a switch at the right. */
.prefrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.prefrow:first-of-type {
  border-top: 0;
}
.prefrow .txt b {
  display: block;
}
.prefrow .txt .muted {
  font-size: 12.5px;
}
.prefrow .switch {
  flex: none;
  margin: 0;
}

/* ====================================================================
   Ads batch 5 (2026-10-30). Ads Manager's table lines, the draft row's
   tint, the one line image picker, the citation picker as the demo's
   table, the plate that hugs its text and the eyedropper, the tiles and
   table toggle on Media, the summary pages' heads, and two badges that
   sat high in their rows.
   ==================================================================== */

/* A lined table (Evan: "give the table vertical lines to separate
   columns ... give the header a different background color"). */
table.data.lined {
  border: 1px solid var(--line);
}
table.data.lined th {
  background: var(--soft-2);
  color: var(--ink-2);
}
table.data.lined th + th,
table.data.lined td + td {
  border-left: 1px solid var(--line);
}
/* A draft row is tinted, as Ads Manager tints a campaign with changes
   not yet published: here, a campaign whose ads are not in Meta yet. */
table.data tr.draft td {
  background: #ecfdf3;
}
table.data tr.draft td:first-child {
  box-shadow: inset 3px 0 0 var(--ok);
}

/* Badges in a row of buttons sat at the top of the row's height. */
.connrow .act {
  align-items: center;
}
.badge {
  line-height: 18px;
}

/* The image picker on one line: the chosen image, its name, then the
   two ways to change it. The library opens under the line. */
.imgline {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.imgline .thumb {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--soft-2);
}
.imgline .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.imgline .txt {
  flex: 1 1 200px;
  min-width: 0;
}
.imgline .txt b {
  display: block;
}
.imgline .acts {
  display: flex;
  gap: 8px;
}
.imgline + details.libpick[open] .mediagrid,
details.libpick.under .mediagrid {
  margin-top: 12px;
}

/* The citation picker, the demo's table: search and the type chips over
   rows of publisher, quote and what it refers to, each with Add. */
.picktools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.picktools input[type="search"] {
  flex: 1 1 260px;
}
.picktools .count {
  margin-left: 6px;
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
}
.ref {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ref .rthumb {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--soft-2);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--muted);
}
.ref .rthumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ref b {
  display: block;
  font-size: 12.5px;
}
.ref .muted {
  font-size: 12.5px;
}
a.ext::after {
  content: ' \2197';
}
.btn.added {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
}
tr.controlrow td {
  background: var(--soft);
}
.checkline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  white-space: nowrap;
}

/* The plate hugs its text (Evan: "The border of the box should be able
   to go right around the text and doesn't need to be a fixed box"). */
.plate {
  right: auto;
  max-width: 88%;
}
.plate-text q {
  font-size: 20px;
}
/* The eyedropper: while it is on, the plate is hidden so the color is
   picked from the bare image, and the cursor is a crosshair. */
.stage.picking .plate {
  display: none;
}
.stage.picking {
  cursor: crosshair;
  box-shadow: 0 0 0 3px var(--pink-dark);
}
.btn.dropper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn.dropper svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.btn.dropper.on {
  background: var(--pink-dark);
  border-color: var(--pink-dark);
  color: #fff;
}

/* Media as tiles: each tile is a link to the item's page. */
a.mediatile {
  text-decoration: none;
  color: inherit;
}
a.mediatile:hover .thumb {
  box-shadow: 0 0 0 2px var(--pink-dark);
}
.mthumb {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--soft-2);
  flex: none;
  display: block;
}
.mthumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mthumb.ph,
.summary .feature.ph,
.summary .bigmedia.ph {
  background: repeating-linear-gradient(45deg, var(--soft-2), var(--soft-2) 8px, #e9ebef 8px, #e9ebef 16px);
}

/* A summary page's head: the image at the left, the facts at the right. */
.summary {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.summary .feature,
.summary .bigmedia {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--soft-2);
}
.summary .bigmedia {
  aspect-ratio: 1 / 1;
}
.summary .feature img,
.summary .bigmedia img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.summary .bigq {
  font-size: 22px;
  line-height: 1.3;
  font-weight: 700;
  margin: 0 0 12px;
}
.summary .acts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}
@media (max-width: 700px) {
  .summary {
    grid-template-columns: minmax(0, 1fr);
  }
  .summary .feature,
  .summary .bigmedia {
    max-width: 260px;
  }
}

/* The plan card's one line: the plan at the left, the month's spend
   against the plan at the right. */
.planline + .usebar {
  margin-top: 12px;
}
.planline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.planline .p {
  font-size: 16px;
}
.planline .amt {
  font-size: 22px;
  font-weight: 700;
}
.planline .amt small {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}
.planline .over {
  color: var(--bad);
  font-size: 14px;
  font-weight: 600;
  margin-left: 6px;
}
/* A setting on one line: the switch, its name, its figure. */
.oneline {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.oneline .switch {
  margin: 0;
}
.oneline b {
  font-size: 14px;
}
.oneline input {
  max-width: 140px;
}
/* The URL parameters cell: the variation's value and Copy. */
.paramcell {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.paramcell code {
  font-size: 12px;
  background: var(--soft-2);
  padding: 3px 7px;
  border-radius: 5px;
}
/* Cards stacked under a section page's tabs keep the gap the plan card has. */
.subcontent > .card + .card {
  margin-top: 18px;
}

/* ====================================================================
   Ads batch 6 (2026-10-30): the content column takes the full width, a
   campaign's creative beside its name, the status pill and the rename
   control in the top bar, Add variation, and the platforms' icons.
   ==================================================================== */

/* The content pane always takes the full width available (Evan: "The
   content pane should always take up the full width that is available"). */
.content {
  max-width: none;
}
/* A campaign's creative at the left of its name. */
td.cname .cline {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mthumb.sm {
  width: 32px;
  height: 32px;
  border-radius: 5px;
}
/* The status in a white pill (Ads batch 6; in the campaign summary since Ads batch 7). */
.topbar .title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.titlestatus {
  flex: none;
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper);
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(26, 26, 46, 0.06);
}
/* An integration's own icon in its row's mark. */
.connrow .mark {
  position: relative;
  overflow: hidden;
}
.connrow .mark img {
  position: absolute;
  inset: 7px;
  width: calc(100% - 14px);
  height: calc(100% - 14px);
  object-fit: contain;
  background: var(--soft);
}

/* ====================================================================
   Ads batch 7 (2026-10-30): the campaign summary card, the placement
   page on one screen, and the media view toggle as icons.
   ==================================================================== */

/* A campaign's head: the creative once, the name and status, the facts,
   Edit campaign (Evan: "a section at the top that shows the creative,
   the name, date it was created, the status, etc"). */
.campsum {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: start;
}
.campsum .cimg {
  width: 112px;
  height: 112px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--soft-2);
}
.campsum .cimg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.campsum .ctitle {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.campsum .ctitle h2 {
  margin: 0;
  font-size: 19px;
}
.campsum dl.kv {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 8px 24px;
}
.campsum dl.kv > div {
  display: block;
}
.campsum dl.kv dt {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 2px;
}
.campsum dl.kv dd {
  margin: 0;
}
@media (max-width: 700px) {
  .campsum {
    grid-template-columns: 72px minmax(0, 1fr);
  }
  .campsum .cimg {
    width: 72px;
    height: 72px;
  }
  .campsum .cacts {
    grid-column: 1 / -1;
  }
}

/* Place the citations on one screen (Evan: "the right column goes down
   way past the image"): one card, the variation tabs across its top, the
   preview at the left and one column of labeled rows at the right, no
   taller than the preview. */
.designer.compact {
  display: block;
}
.designer.compact .dhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.designer.compact .dbody {
  display: grid;
  grid-template-columns: minmax(260px, 440px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.designer.compact .stage {
  max-width: 440px;
}
.designer.compact .ctrls {
  display: grid;
}
.ctrls .crow {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
}
.ctrls .crow:first-child {
  border-top: 0;
  padding-top: 0;
}
.ctrls .crow .k {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
}
.ctrls .crow select {
  max-width: 260px;
}
.ctrls .swatchrow input[type="text"] {
  max-width: 110px;
}
.ctrls .switch {
  margin: 0;
}
.templates.mini {
  grid-template-columns: repeat(4, 52px);
  gap: 8px;
}
.templates.mini .tpl-pic {
  width: 52px;
}
.logopick.mini {
  grid-template-columns: repeat(3, auto);
  justify-content: start;
}
.logopick.mini .logoopt {
  min-height: 40px;
  padding: 6px 10px;
  grid-auto-flow: column;
  gap: 6px;
}
.btn.dropper.icon {
  width: 32px;
  height: 32px;
  padding: 0;
  justify-content: center;
}
@media (max-width: 880px) {
  .designer.compact .dbody {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* A view toggle drawn as icons (Media: tiles, list). */
.groupbar .grp.ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
}
.groupbar .grp.ic svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}
.logopick.mini {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ctrls .crow > * {
  min-width: 0;
}

/* ====================================================================
   Ads batch 8 (2026-10-30): the campaign summary as three rows with the
   status under them, a checkbox on each variation with Edit, Download
   and Remove over the table, and the Setup steps as actions.
   ==================================================================== */

.campsum .cbody h2 {
  margin: 0 0 8px;
  font-size: 19px;
}
.campsum dl.kv.facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 4px 14px;
  margin: 0 0 10px;
}
.campsum dl.kv.facts > div {
  display: contents;
}
.campsum dl.kv.facts dt {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.campsum dl.kv.facts dt::after {
  content: ':';
}
.campsum .titlestatus {
  display: inline-flex;
}

/* Rows checked, then the actions for them. */
.bulkbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.bulkbar .muted {
  font-size: 12.5px;
  margin-right: 4px;
}
table.data th.sel,
table.data td.sel {
  width: 36px;
  padding-right: 0;
}
table.data .sel input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--pink-dark);
}

/* Setup: each step one line, its action at the right. */
ol.todo {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: t;
}
ol.todo > li {
  counter-increment: t;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
ol.todo > li:first-child {
  border-top: 0;
  padding-top: 0;
}
ol.todo > li::before {
  content: counter(t);
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
ol.todo .tbody {
  flex: 1 1 auto;
  min-width: 0;
  padding-top: 3px;
}
ol.todo .tbody b {
  display: block;
  font-size: 14px;
}
ol.todo .tbody > span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}
ol.todo > li > .btn {
  flex: none;
}
.tagline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.tagline .tq {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
}
.tagline code {
  flex: none;
  font-size: 12px;
  background: var(--soft-2);
  padding: 3px 7px;
  border-radius: 5px;
}
/* The upload tile's label wraps inside the tile. */
.mediatile.upload {
  white-space: normal;
  text-align: center;
  padding: 10px;
}
@media (max-width: 600px) {
  .tagline {
    flex-wrap: wrap;
  }
  .tagline .tq {
    flex-basis: 100%;
  }
}

/* ====================================================================
   Ads batch 9 (2026-10-30): the campaign image as tall as the text beside
   it, the bulk actions at the right, the checkboxes centered.
   ==================================================================== */
.campsum {
  align-items: stretch;
  grid-template-columns: 152px minmax(0, 1fr) auto;
}
.campsum .cimg {
  width: 152px;
  height: 152px;
  align-self: start;
}
.campsum .cacts {
  align-self: start;
}
/* The table's toolbar, as the AWS console draws one: what is checked at
   the left, the actions at the right. */
.bulkbar {
  justify-content: space-between;
}
.bulkbar .bulkacts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
table.data th.sel,
table.data td.sel {
  vertical-align: middle;
}
table.data .sel input {
  display: block;
}

/* ====================================================================
   Ads batch 10 (2026-10-31): a checked row is highlighted, and an action
   that needs a selection reads disabled until it has one.
   ==================================================================== */
table.data tr.checked td,
table.data tr.controlrow.checked td {
  background: var(--pink-soft);
}
table.data tr.checked td.sel {
  box-shadow: inset 3px 0 0 var(--pink-dark);
}
.bulkbar .btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ====================================================================
   Ads batch 11 (2026-10-31): the media library as a modal, and a summary
   card with no image.
   ==================================================================== */
dialog.medialib {
  width: min(880px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 24px 60px -12px rgba(26, 26, 46, 0.35);
  color: var(--ink);
  background: var(--paper);
}
dialog.medialib[open] {
  display: flex;
  flex-direction: column;
}
dialog.medialib::backdrop {
  background: rgba(26, 26, 46, 0.45);
}
.medialib .ml-head,
.medialib .ml-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  flex: none;
}
.medialib .ml-head {
  border-bottom: 1px solid var(--line);
}
.medialib .ml-head h3 {
  margin: 0;
}
.medialib .ml-foot {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
}
.medialib .ml-close {
  width: 32px;
  height: 32px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 15px;
}
.medialib .ml-close:hover {
  border-color: var(--line);
  color: var(--ink);
}
.medialib .ml-tools {
  display: flex;
  gap: 8px;
  padding: 14px 18px 0;
  flex: none;
  flex-wrap: wrap;
}
.medialib .ml-tools input[type="search"] {
  flex: 1 1 240px;
  width: auto;
}
.medialib .ml-tools select {
  width: auto;
  flex: 0 0 auto;
}
.medialib .ml-grid {
  padding: 14px 18px 18px;
  overflow-y: auto;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
button.mediatile.pick {
  appearance: none;
  padding: 0;
  font: inherit;
  text-align: left;
  color: inherit;
  cursor: pointer;
  background: var(--paper);
}
button.mediatile.pick.chosen {
  outline: 2px solid var(--pink-dark);
  outline-offset: 1px;
}
button.mediatile.pick .meta .muted {
  display: block;
  font-size: 12px;
}
.imgline .thumb.ph {
  background: repeating-linear-gradient(45deg, var(--soft-2), var(--soft-2) 8px, #e9ebef 8px, #e9ebef 16px);
}

/* A summary with no image (a category; a citation or product with none):
   the name on one line, the facts on the next. */
.summary.noimg {
  display: block;
}
.summary.noimg h2 {
  margin: 0 0 8px;
  font-size: 19px;
}
dl.kvline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 26px;
  margin: 0;
}
dl.kvline > div {
  display: flex;
  gap: 6px;
}
dl.kvline dt {
  color: var(--muted);
}
dl.kvline dt::after {
  content: ':';
}
dl.kvline dd {
  margin: 0;
  font-weight: 600;
}

/* ====================================================================
   Ads batch 12 (2026-10-31): one table style across the surface, the
   Campaigns table's (Evan: "Utilize this same style of table throughout
   the ad platform so it is consistent"): the header on --soft-2 in ink,
   the columns divided by a line. A table that opens its card sits flush
   with the card's top edge (Evan: "Remove the white area from the top of
   the chart"), the card's border standing in for the table's.
   ==================================================================== */
.content .tablewrap table.data th,
.content .tablewrap table.data th:first-child {
  background: var(--soft-2);
  color: var(--ink-2);
}
.content table.data th + th,
.content table.data td + td {
  border-left: 1px solid var(--line);
}
.card table.data.lined {
  border: 0;
}
.card > .tablewrap:first-child {
  margin-top: -18px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.card > .tablewrap:only-child {
  border-radius: var(--radius);
}
/* The checkbox column belongs to its row's first column: no line between. */
.content table.data th.sel + th,
.content table.data td.sel + td {
  border-left: 0;
}

/* ====================================================================
   Ads batch 13 (2026-10-31): a table header that reads apart from the
   page (Evan: "The background of this header too closely matches the
   background color of the page ... apply consistently throughout") and a
   short search on the variation picker.
   ==================================================================== */
:root {
  /* A cool slate tint: the page ground is #f2f3f5 and rows are white, so
     the header sits clearly between them; ink-2 on it is 10.6:1. */
  --thead: #e3e7f0;
}
.content .tablewrap table.data th,
.content .tablewrap table.data th:first-child {
  background: var(--thead);
  color: var(--ink-2);
  border-bottom-color: #cfd5e1;
}
.content table.data th + th {
  border-left-color: #d3d8e3;
}
.picktools input[type="search"] {
  flex: 0 1 360px;
  max-width: 360px;
}

/* ====================================================================
   Ads batch 15 (2026-10-31): Create campaign at the right of a summary's
   name (a product, a category, the brand).
   ==================================================================== */
.summary .sumhead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.summary .sumhead h2 {
  margin: 0;
}
.summary.noimg .sumhead {
  align-items: center;
}

/* ====================================================================
   Ads batch 16 (2026-10-31): a summary's Create campaign sits under its
   facts at the left, and its image is only as tall as the name, facts
   and button beside it (Evan: "image should only be as tall as
   text/button ... with no excess white space below image or
   text/button").
   ==================================================================== */
.summary h2.sumname {
  margin: 0 0 10px;
  font-size: 19px;
}
.summary .acts {
  margin-top: 14px;
}
.summary.noimg .acts {
  margin-top: 14px;
}
/* The image matches the text column: the name, three facts and the
   button come to 167px. */
.summary.fit {
  grid-template-columns: 167px minmax(0, 1fr);
}
.summary.fit .bigmedia {
  width: 167px;
  height: 167px;
  aspect-ratio: auto;
}
@media (max-width: 700px) {
  .summary.fit {
    grid-template-columns: 96px minmax(0, 1fr);
  }
  .summary.fit .bigmedia {
    width: 96px;
    height: 96px;
  }
}

/* ====================================================================
   Ads batch 17 (2026-10-31): the mobile review (Evan: "Reevaluate the
   whole site to ensure that text that is kept displays without being
   squished. That can mean allow scrolling or preferably reorganizing the
   layout", and "Anything that wraps should be questioned whether it is
   needed"). Sizes follow Apple's 44pt and Material's 48dp targets, and
   every field is 16px on a phone so iOS does not zoom when it takes focus.
   ==================================================================== */

/* Create campaign's short label shows on a phone only. */
.btn.newcamp .short {
  display: none;
}

/* A campaign's thumbnail is a column of its own, drawn as one cell with
   the name beside it: no line between them. */
table.data th.cthumb,
table.data td.cthumb {
  width: 1%;
  padding-right: 0;
  vertical-align: middle;
}
.content table.data th.cthumb + th,
.content table.data td.cthumb + td {
  border-left: 0;
}
table.data td.cthumb .mthumb {
  display: block;
}

@media (max-width: 880px) {
  /* The build's explanation is for a reviewer at a desk; on a phone it
     takes the first screen. */
  .versionbar {
    display: none;
  }

  /* The drawer sits above its backdrop (Ads batch 4's rail z-index had
     put it under), so its labels read at full strength on the dark rail. */
  .sidebar,
  .sidebar:hover,
  body.nav-pinned .sidebar {
    z-index: 50;
  }
  .sidebar .nav-item,
  .sidebar .nav-item .lbl,
  .sidebar .nav-item .ic {
    color: #f4f5fa;
  }
  .sidebar .nav-item.active,
  .sidebar .nav-item.active .lbl,
  .sidebar .nav-item.active .ic {
    color: #ffd0ea;
  }
  .sidebar .brand {
    min-height: 44px;
  }

  /* Headers stay on one line; the table scrolls instead. */
  .tablewrap table.data th {
    white-space: nowrap;
  }

  /* Campaigns: only the thumbnail is held; the name scrolls on one line.
     (The :not chain matches the held column's 120px minimum above, so
     this one outranks it.) */
  .tablewrap table.data th.cthumb,
  .tablewrap table.data td.cthumb:first-child:not(.expander):not(.cite-cell):not(.article-cell):not(.num) {
    min-width: 0;
    width: 1%;
    padding-right: 10px;
  }
  .tablewrap table.data td.cname,
  .tablewrap table.data td.cname a {
    white-space: nowrap;
  }
  .tablewrap table.data td.cthumb + td {
    padding-left: 4px;
  }
  table.data tr.totals .tlabel {
    display: none;
  }

  /* A checkbox column is never held and stays narrow (Ads batch 18 holds
     only an image; see below). */
  .tablewrap table.data th.sel,
  .tablewrap table.data td.sel:first-child:not(.expander):not(.cite-cell):not(.article-cell):not(.num) {
    position: static;
    min-width: 0;
    width: 44px;
    padding-left: 12px;
    padding-right: 4px;
  }
  /* A quote has room to read wherever it sits in a row, and what a
     citation refers to stays on one line. */
  .tablewrap table.data td.cite-cell {
    min-width: 220px;
  }
  .tablewrap table.data .ref {
    white-space: nowrap;
  }
}

@media (max-width: 720px) {
  /* Campaigns: Create campaign reads New and ends the search row, the date
     range under them, rather than a button on a row of its own. */
  .tableactions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: 'bar new' 'range range';
    gap: 10px 8px;
  }
  .tableactions .filterbar {
    grid-area: bar;
  }
  .tableactions .newcamp {
    grid-area: new;
    align-self: center;
  }
  .tableactions .daterange {
    grid-area: range;
    margin-left: 0;
  }
  .btn.newcamp .long {
    display: none;
  }
  .btn.newcamp .short {
    display: inline;
  }
  .btn.newcamp .short::before {
    content: '+ ';
  }

  /* A summary on a phone: the image small beside the name, then the
     facts across the full width, one line each, then the status and the
     action. Long values (a URL) end in an ellipsis rather than breaking a
     letter at a time. */
  .campsum,
  .summary.fit {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px 14px;
    align-items: center;
  }
  .campsum .cimg,
  .summary.fit .bigmedia {
    width: 64px;
    height: 64px;
    border-radius: 8px;
  }
  .campsum .cbody,
  .summary.fit > div {
    display: contents;
  }
  .campsum .cbody h2,
  .summary.fit h2.sumname {
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
  }
  .campsum dl.kv.facts,
  .summary.fit dl.kv,
  .campsum .titlestatus,
  .campsum .cacts,
  .summary.fit .acts {
    grid-column: 1 / -1;
  }
  .campsum dl.kv.facts,
  .summary.fit dl.kv {
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 6px 12px;
    margin: 0;
  }
  .campsum dl.kv.facts dd,
  .summary.fit dl.kv dd {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .campsum .titlestatus {
    justify-self: start;
  }
  .campsum .cacts,
  .summary.fit .acts {
    margin: 0;
  }
  .campsum .cacts .btn,
  .summary.fit .acts .btn {
    width: 100%;
    justify-content: center;
  }

  /* Setup steps: the action under the step's text, not squeezed beside it. */
  ol.todo > li {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    column-gap: 14px;
    row-gap: 10px;
  }
  ol.todo > li > .btn {
    grid-column: 2;
    justify-self: start;
  }

  /* A pill bar keeps each label on one line, scrolls sideways when it is
     wider than the screen, and every pill is a full target. */
  .groupbar {
    display: flex;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .groupbar::-webkit-scrollbar {
    display: none;
  }
  .groupbar .grp {
    flex: 1 0 auto;
    min-height: 44px;
    padding: 0 10px;
    white-space: nowrap;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Place the citations: sliders, the eyedropper and the swatch fields
     are full targets, and the four templates fit the row. */
  .content input[type='range'] {
    min-height: 44px;
  }
  .content input:not([type='checkbox']):not([type='radio']):not([type='range']),
  .content select,
  .content textarea {
    font-size: 16px;
  }
  .btn.dropper.icon {
    width: 44px;
    height: 44px;
  }
  .templates.mini {
    grid-template-columns: repeat(4, minmax(0, 52px));
  }
  .templates.mini .tpl-pic {
    width: 100%;
  }
}

/* ====================================================================
   Ads batch 18 (2026-10-31): hold images or nothing (Evan: "Never hold
   text on scroll. Always only hold images or nothing", "If there is no
   icon to hold on scroll on mobile, don't hold any column. Apply this to
   all tables", and "have the text scroll with the other columns but keep
   the icon fixed"). nav.js moves a leading image into a column of its
   own (th.hold, td.hold); on a phone that column alone is held and every
   other column, the name beside the image included, scrolls. A short key
   identifier may be held as text when its header carries data-hold (the
   Activity table's Date: "a good column to hold because it is critical to
   the row ... and there is a limited amount of content"). An odd row of
   tiles is a table on a phone, and an empty publisher is a box with an x.
   ==================================================================== */

/* The image column reads as part of the cell beside it. */
table.data th.hold:not(.hold-text),
table.data td.hold:not(.hold-text) {
  width: 1%;
  padding-right: 0;
  vertical-align: middle;
}
.content table.data th.hold:not(.hold-text) + th,
.content table.data td.hold:not(.hold-text) + td {
  border-left: 0;
}
table.data td.hold:not(.hold-text) + td {
  padding-left: 10px;
}

/* No publisher: an empty box with an x where the logo would be. */
.logo.none {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px dashed var(--line-strong);
  background: var(--paper);
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
}

@media (max-width: 880px) {
  /* Nothing is held by default... */
  .tablewrap table.data th:first-child,
  .tablewrap table.data td:first-child {
    position: static;
    box-shadow: none;
  }
  .content .tablewrap table.data td:first-child:not(.expander):not(.cite-cell):not(.article-cell):not(.num):not(.hold) {
    min-width: 0;
  }
  /* ...but the image column, or a header's data-hold column. */
  .tablewrap table.data th.hold,
  .tablewrap table.data td.hold {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--paper);
  }
  .content .tablewrap table.data th.hold {
    background: var(--thead);
  }
  .content .tablewrap table.data td.hold:not(.hold-text):first-child:not(.expander):not(.cite-cell):not(.article-cell):not(.num),
  .content .tablewrap table.data td.hold:not(.hold-text) {
    min-width: 0;
    width: 1%;
    padding-right: 10px;
  }
  .tablewrap table.data td.hold:not(.hold-text) + td {
    padding-left: 2px;
  }
  .tablewrap table.data tr.draft td.hold {
    background: #ecfdf3;
  }
  .tablewrap table.data tr.checked td.hold {
    background: var(--pink-soft);
  }
  .tablewrap table.data tr.totals td.hold {
    background: var(--soft);
  }
  .tablewrap.scrolled table.data th.hold,
  .tablewrap.scrolled table.data td.hold {
    box-shadow: 6px 0 8px -6px rgba(26, 26, 46, 0.18);
  }
  /* A header never wraps, sort button included (Ads batch 17's rule set
     the cell but not the button inside it). */
  .tablewrap table.data th .th-sort {
    white-space: nowrap;
  }
  /* The name beside a held image stays on one line and scrolls. */
  .tablewrap table.data td.hold + td .ent-name,
  .tablewrap table.data td.hold + td .ent-sub,
  .tablewrap table.data td.hold + td .var-cell,
  .tablewrap table.data td.hold + td b {
    white-space: nowrap;
  }
}

/* An odd row of tiles is repeated as a table (nav.js); a phone shows the
   table, a desk the tiles. */
.tiletable {
  display: none;
}
@media (max-width: 720px) {
  .statgrid.has-tiletable,
  .kpis.has-tiletable {
    display: none;
  }
  .tiletable {
    display: block;
  }
  .tiletable table.data td.num {
    font-weight: 700;
  }
}

/* ====================================================================
   Ads batch 19 (2026-10-31): a held header row on a phone, the control
   row's held cell in the row's own gray, and a payment method's mark
   beside its text.
   ==================================================================== */

/* The copy of a table's header row that nav.js holds at the top of the
   screen while the table scrolls under it (under 880px only). */
.tablewrap.fhead {
  position: fixed;
  top: 0;
  z-index: 20;
  margin: 0;
  overflow: hidden;
  border-radius: 0;
  box-shadow: 0 6px 10px -8px rgba(26, 26, 46, 0.35);
  -webkit-mask-image: none;
  mask-image: none;
  background: var(--thead);
}
.tablewrap.fhead[hidden] {
  display: none;
}
.tablewrap.fhead > table.data {
  table-layout: fixed;
  margin: 0;
  border: 0;
}
.tablewrap.fhead th {
  position: relative !important;
  box-sizing: border-box;
  overflow: hidden;
}
.tablewrap.fhead th.hold {
  z-index: 2;
}
@media (min-width: 881px) {
  .tablewrap.fhead {
    display: none;
  }
}

/* The control row is gray across, its held cell included. */
table.data tr.controlrow td.hold,
.tablewrap table.data tr.controlrow td.hold {
  background: var(--soft);
}
.tablewrap table.data tr.controlrow.checked td.hold {
  background: var(--pink-soft);
}

/* A payment method or connection on a phone: the mark beside the name,
   the actions under the name. */
@media (max-width: 600px) {
  .connrow {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    column-gap: 14px;
    row-gap: 10px;
    align-items: center;
  }
  .connrow .act {
    grid-column: 2;
    width: auto;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}
.connrow .mark.card {
  background: #fff;
}
.connrow .mark.card img {
  inset: 5px;
  width: calc(100% - 10px);
  height: calc(100% - 10px);
  background: #fff;
}

/* ====================================================================
   Ads batch 20 (2026-10-31): the control row reads as an empty row (no
   bold, No citation), its checkbox cell in the row's gray, and a chart's
   figures on one compact line on a phone.
   ==================================================================== */
.ent-name.muted {
  font-weight: 400;
}
tr.controlrow td .ctl {
  font-weight: 400;
  color: var(--muted);
}
/* Under 880px every first cell was drawn on white for the held column;
   a tinted row keeps its tint across, the checkbox cell included. */
@media (max-width: 880px) {
  .tablewrap table.data tr.controlrow td:first-child {
    background: var(--soft);
  }
  .tablewrap table.data tr.draft td:first-child {
    background: #ecfdf3;
  }
  .tablewrap table.data tr.totals td:first-child {
    background: var(--soft);
  }
  .tablewrap table.data tr.checked td:first-child,
  .tablewrap table.data tr.controlrow.checked td:first-child {
    background: var(--pink-soft);
  }
}
/* A chart's figures on a phone (Evan: "These numbers are hanging on
   mobile ... display them in a more compact version"): one line under the
   heading, each figure with its key and label beside it, the window at
   the end of the line. */
@media (max-width: 720px) {
  .charthead {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .charthead .chart-readout {
    width: 100%;
    justify-content: flex-start;
    align-items: baseline;
    text-align: left;
    gap: 4px 14px;
  }
  .charthead .chart-latest {
    flex-direction: row;
    align-items: baseline;
    gap: 5px;
    font-size: 14px;
  }
  .charthead .chart-latest .unit {
    font-size: 12px;
    white-space: nowrap;
  }
  .charthead .chart-readout .chart-when {
    flex-basis: auto;
    margin-left: auto;
    font-size: 12px;
  }
}

/* ====================================================================
   Ads batch 21 (2026-10-31): Place the citations' variation as a
   dropdown with Apply to all as a checkbox beside it, and the logo
   options on one line that scrolls.
   ==================================================================== */
.designer.compact .dhead {
  align-items: flex-end;
}
.varpick {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 360px;
  min-width: 0;
  max-width: 480px;
}
.varpick label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
}
.varpick select {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  text-overflow: ellipsis;
}
.checkline.applyall {
  font-weight: 500;
  min-height: 44px;
  cursor: pointer;
}
.checkline.applyall input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--pink-dark);
}
.logopick.mini {
  position: relative;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 100%;
}
.logopick.mini::-webkit-scrollbar {
  display: none;
}
.logopick.mini .logoopt {
  flex: none;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .designer.compact .dhead {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .varpick {
    flex: none;
    max-width: none;
  }
  .checkline.applyall {
    white-space: normal;
  }
}

/* ====================================================================
   Ads batch 22 (2026-10-31): no window name beside a chart's figures at
   rest (nav.js leaves .chart-when empty until a day is pointed at), and
   Place the citations without its Variation label or drag hint.
   ==================================================================== */
.chart-readout .chart-when:empty {
  display: none;
}

/* ====================================================================
   Ads batch 23 (2026-10-31): a chart's head on a phone. The title and the
   window (Last 30 days, or the day pointed at) share the first line, the
   window at the right; the figures stack under them, one per line, at
   the left. Ads batch 22's window removal is undone.
   ==================================================================== */
@media (max-width: 720px) {
  .charthead {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 4px 12px;
  }
  .charthead .lead {
    grid-column: 1;
    grid-row: 1;
    width: auto;
  }
  .charthead .chart-readout {
    display: contents;
  }
  .charthead .chart-readout .chart-when {
    grid-column: 2;
    grid-row: 1;
    margin-left: 0;
    text-align: right;
    white-space: nowrap;
  }
  .charthead .chart-latest {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

/* ====================================================================
   Ads batch 24 (2026-10-31): modals (a shared .modal dialog, the receipt,
   the example emails and the lightbox), the media library's close button
   and even tiles, the citation image, and the date panel on a phone.
   ==================================================================== */

/* A modal: a head with its title and a 44px close, a scrolling body, a
   foot with its actions. The media library predates it and keeps its
   own classes. */
dialog.modal {
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 24px 60px -12px rgba(26, 26, 46, 0.35);
  color: var(--ink);
  background: var(--paper);
}
dialog.modal[open] {
  display: flex;
  flex-direction: column;
}
dialog.modal::backdrop,
dialog.lightbox::backdrop {
  background: rgba(26, 26, 46, 0.55);
}
.md-head,
.md-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px 10px 18px;
  flex: none;
}
.md-head {
  border-bottom: 1px solid var(--line);
}
.md-head h3 {
  margin: 0;
}
.md-foot {
  justify-content: flex-end;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
}
.md-body {
  padding: 18px;
  overflow-y: auto;
  min-height: 0;
}
.md-close,
.medialib .ml-close {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink-2);
  font-size: 18px;
  cursor: pointer;
}
.md-close:hover,
.medialib .ml-close:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

/* The receipt. */
.receipt .rc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.brandmark {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.2px;
  color: var(--ink);
}
.receipt dl.kv {
  margin-bottom: 16px;
}
table.rc-lines {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.rc-lines th,
table.rc-lines td {
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
table.rc-lines th {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--muted);
}
table.rc-lines .num {
  text-align: right;
  white-space: nowrap;
  padding-left: 12px;
}
table.rc-lines tr.totals td {
  border-bottom: 0;
  font-weight: 700;
}
table.rc-lines tr[hidden] {
  display: none;
}

/* An example email: its envelope, then the email as it arrives. */
.mailhdr {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 4px 12px;
  margin: 0 0 14px;
  font-size: 13px;
}
.mailhdr > div {
  display: contents;
}
.mailhdr dt {
  color: var(--muted);
}
.mailhdr dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.mailsheet {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
  padding: 20px;
}
.mailsheet h4 {
  margin: 14px 0 6px;
  font-size: 18px;
  line-height: 1.3;
}
.mailsheet > p {
  margin: 0 0 14px;
  color: var(--ink-2);
}
.mailsheet dl.kv {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 0 0 16px;
}
.mailsheet .mailfoot {
  margin: 16px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.prefrow .btn.sm {
  flex: none;
  margin-left: auto;
}
.prefrow .txt {
  min-width: 0;
}

/* The lightbox: the whole image on a dark ground, the close at its top
   right; a click on the image or the ground closes it. */
dialog.lightbox {
  padding: 0;
  border: 0;
  background: transparent;
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  overflow: visible;
}
dialog.lightbox img {
  display: block;
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 88px);
  border-radius: 10px;
  cursor: zoom-out;
}
dialog.lightbox .md-close {
  margin: 0 0 8px auto;
}

/* The media library: every tile the same size in every row. */
.medialib .ml-grid {
  flex: 1 1 auto;
  min-height: 0;
  grid-auto-rows: max-content;
  align-content: start;
}
.medialib .ml-grid > .mediatile {
  align-self: start;
}
@media (max-width: 600px) {
  .medialib .ml-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  dialog.medialib {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }
}

/* The citation's image: a fixed width at the height of the facts beside
   it (cropped, no white space under it), full width and 16:9 on a phone,
   and a button that opens it whole. */
button.feature {
  appearance: none;
  padding: 0;
  font: inherit;
  cursor: zoom-in;
}
.summary:not(.fit):not(.noimg) {
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: stretch;
}
.summary:not(.fit):not(.noimg) > .feature {
  aspect-ratio: auto;
  height: 100%;
  min-height: 180px;
}
@media (max-width: 700px) {
  .summary:not(.fit):not(.noimg) {
    grid-template-columns: minmax(0, 1fr);
  }
  .summary:not(.fit):not(.noimg) > .feature {
    max-width: none;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
}

/* The date panel on a phone: the width of the date range, its fields
   inside it. */
@media (max-width: 720px) {
  .daterange {
    position: relative;
  }
  .daterange .dr-panel {
    left: 0;
    right: 0;
    width: auto;
    max-width: none;
    box-sizing: border-box;
  }
  .daterange .dr-panel .field {
    min-width: 0;
  }
  .daterange .dr-panel input[type='date'] {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
  }
  .daterange .dr-panel .dr-grid {
    width: 100%;
  }
}
/* A notification row on a phone: the name and description beside the
   switch, Preview under them, so the name stays on one line. */
@media (max-width: 600px) {
  .prefrow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 14px;
    row-gap: 8px;
  }
  .prefrow .txt {
    grid-column: 1;
    grid-row: 1;
  }
  .prefrow .switch {
    grid-column: 2;
    grid-row: 1;
  }
  .prefrow .btn.sm {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
    margin-left: 0;
  }
}

/* ====================================================================
   Ads batch 25 (2026-11-01): touch screens wider than a phone (a phone in
   landscape, a tablet) get the phone's target sizes (Evan: "Do an audit of
   the marketplace in landscape mode and tablet to see if anything needs to
   be changed to follow our other requirements"). The Phone sizing block's
   sizes are repeated here for (pointer: coarse) above 720px, without its
   layout rules (the full width date range and segmented bars stay a phone
   layout). Also: the date panel's calendar and month arrows as 44px
   targets, its fields inside it at every width, and a checkbox column's
   header lined up with its rows.
   ==================================================================== */
@media (pointer: coarse) and (min-width: 721px) {
  body {
    font-size: 16px;
  }
  .btn {
    min-height: 48px;
    padding: 10px 18px;
    font-size: 15px;
  }
  .btn.sm {
    min-height: 44px;
    padding: 8px 14px;
    font-size: 14px;
  }
  .nav-item {
    min-height: 48px;
    padding: 12px 12px;
    font-size: 16px;
  }
  .nav-section h4 {
    font-size: 12.5px;
  }
  .mobile-nav-toggle,
  .mobile-nav-close {
    width: 48px;
    height: 48px;
    font-size: 16px;
  }
  .userchip {
    min-height: 44px;
    padding: 4px 8px;
  }
  .chipmenu a,
  .chipmenu button,
  .chipmenu .cm-pick {
    min-height: 48px;
    display: flex;
    align-items: center;
    font-size: 15px;
  }
  .tabs button {
    min-height: 48px;
    font-size: 15px;
  }
  .seg,
  .dr-opt {
    min-height: 44px;
    padding: 10px 8px;
    font-size: 14px;
  }
  input[type='text'],
  input[type='url'],
  input[type='email'],
  input[type='number'],
  input[type='search'],
  input[type='date'],
  input[type='file'],
  input[type='password'],
  input:not([type]),
  select,
  textarea,
  .filterbar select,
  table.data select {
    font-size: 16px;
    min-height: 48px;
  }
  input[type='checkbox'],
  input[type='radio'] {
    width: 24px;
    height: 24px;
    min-height: 0;
  }
  .pickitem,
  .field.check,
  .switchrow,
  .selectcard {
    min-height: 48px;
  }
  .switch .track,
  .switchrow .sw {
    width: 52px;
    height: 32px;
  }
  .switch .track::after,
  .switchrow .sw::after {
    width: 26px;
    height: 26px;
    top: 3px;
    left: 3px;
  }
  .switch.on .track::after,
  .switchrow.on .sw::after {
    left: 23px;
  }
  .expand {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }
  table.data th.expander,
  table.data td.expander {
    width: 48px;
  }
  .backlink,
  .linkbtn,
  .appfooter a,
  .pagination .pages > * {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .field label {
    font-size: 14px;
  }
  .badge {
    font-size: 13px;
    padding: 3px 11px;
  }
  .stat .label,
  .stat .sub {
    font-size: 13px;
  }
  table.data {
    font-size: 15px;
  }
  table.data td {
    padding: 13px 12px;
  }
  .kv,
  .cite-text {
    font-size: 15px;
  }
  .url-line {
    font-size: 13px;
  }
  .kv dd {
    overflow-wrap: anywhere;
  }
  /* Selects keep their 48px even where the port resets them (filter bars and
     tables), which is why these are written from main.content. */
  main.content select,
  main.content .filterbar select,
  main.content table.data select {
    min-height: 48px;
  }
  /* A sortable header is a 44px target without the header growing: the
     button's padding is taken back by its margin. */
  table.data th {
    padding: 14px 12px;
  }
  table.data th button.th-sort {
    min-height: 44px;
    margin: -14px 0;
    align-items: center;
  }
  table.data th button.th-sort {
    min-width: 44px;
  }
  details.filters > summary {
    min-height: 48px;
  }
  /* Every text link in the content column (a name in a row, a count, a
     domain, an article URL, a link in running text) gets a 44px hit area
     from an invisible box drawn around it, so the line it sits on does not
     move and short links like a count of 2 are still a full target. */
  main.content a:not(.btn):not(.stat):not(.backlink):not(.nav-item):not(.seg):not(.dr-opt):not(.tab) {
    position: relative;
  }
  main.content a:not(.btn):not(.stat):not(.backlink):not(.nav-item):not(.seg):not(.dr-opt):not(.tab)::after {
    content: '';
    position: absolute;
    inset: -16px -18px;
  }
  .appfooter a {
    padding: 12px 10px;
    margin: 0 -10px;
  }
  .appfooter nav {
    gap: 28px;
  }
  .groupbar .grp {
    min-height: 44px;
  }
  .btn.dropper.icon {
    width: 44px;
    height: 44px;
  }
  .content input[type='range'] {
    min-height: 44px;
  }
  .content input:not([type='checkbox']):not([type='radio']):not([type='range']),
  .content select,
  .content textarea {
    font-size: 16px;
  }
}

/* The date panel: its fields never wider than the panel, at any width. */
.dr-panel .field {
  min-width: 0;
}
.dr-panel input[type='date'] {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
/* On a touch screen: the days and the month arrows are 44px targets, the
   two dates side by side, and the panel as wide as the screen allows up to
   360px (a phone in portrait keeps the full width date range's panel). */
@media (max-width: 720px), (pointer: coarse) {
  .dr-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
  }
  .dr-panel[hidden] {
    display: none;
  }
  .dr-panel .field {
    margin: 0;
  }
  .dr-panel .dr-cal {
    grid-column: 1 / -1;
    margin-top: 4px;
  }
  .dr-panel input[type='date'] {
    -webkit-appearance: none;
    appearance: none;
    padding-left: 10px;
    padding-right: 6px;
  }
  .dr-head span {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 10px;
    font-size: 22px;
    color: var(--ink-2);
  }
  .dr-day {
    min-height: 44px;
    display: grid;
    place-items: center;
    padding: 0;
    font-size: 15px;
    border-radius: 8px;
  }
  .dr-dow {
    font-size: 12px;
  }
}
@media (pointer: coarse) and (min-width: 721px) {
  .dr-panel {
    width: min(360px, calc(100vw - 24px));
    box-sizing: border-box;
  }
}

/* A checkbox column: the header's box over the rows' boxes. */
.content table.data th.sel,
.content table.data td.sel,
.content .tablewrap table.data th.sel:first-child,
.content .tablewrap table.data td.sel:first-child:not(.expander):not(.cite-cell):not(.article-cell):not(.num) {
  padding-left: 16px;
  padding-right: 4px;
  text-align: left;
}
.content table.data .sel input {
  margin: 0;
}
@media (max-width: 720px), (pointer: coarse) {
  .content table.data .sel input {
    width: 22px;
    height: 22px;
  }
  .content table.data th.sel,
  .content table.data td.sel {
    width: 48px;
  }
}
/* Under 880px (a phone either way up, a tablet in portrait) the date range
   spans the content's width, as it does on a phone in portrait, and its
   panel spans the date range (Evan: "In landscape mode, the date selector
   only takes up a portion of the width of the page"). */
@media (max-width: 880px) {
  .daterange {
    display: flex;
    width: 100%;
    position: relative;
    margin-left: 0;
  }
  .daterange .dr-opt {
    flex: 1 1 auto;
  }
  .daterange .dr-panel {
    left: 0;
    right: 0;
    width: auto;
    max-width: none;
    box-sizing: border-box;
  }
  .tableactions .daterange,
  .pageactions .daterange {
    flex: 1 1 100%;
  }
}
/* A tablet in landscape keeps the icon rail: on touch it is 64px so each
   icon is a 44px target, and the mark is a 44px link. */
@media (pointer: coarse) and (min-width: 881px) {
  .app {
    --sidebar-w: 64px;
  }
  body.nav-pinned .app {
    --sidebar-w: 224px;
  }
  .sidebar {
    width: 64px;
  }
  .sidebar .nav-item {
    min-width: 44px;
    min-height: 48px;
  }
  .sidebar .brand-row {
    padding: 0 10px;
  }
  .sidebar .brand {
    min-height: 44px;
    min-width: 44px;
  }
  .dr-opt {
    min-width: 44px;
  }
}

/* ====================================================================
   Ads batch 26 (2026-11-02): Place the citations' head on the body's
   columns, the category summary's button to the right on a desktop,
   and the plan card as Spend this month over the bar with the month's
   dates and Overage under it.
   ==================================================================== */
/* The head takes the body's two columns, so the variation dropdown is
   exactly as wide as the preview under it and the checkbox starts where
   the control rows start (Evan: "Make the width of the input box the
   same width as the image"; "Have the checkbox directly to the right of
   the input box, but left aligned with the other form items"). */
.designer.compact .dhead {
  display: grid;
  grid-template-columns: minmax(260px, 440px) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  justify-content: normal;
}
.varpick {
  flex: none;
  max-width: none;
  min-width: 0;
}
.checkline.applyall {
  justify-self: start;
  min-width: 0;
}
@media (max-width: 880px) {
  .designer.compact .dhead {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
}
/* A summary with no image: the name and facts at the left, the button at
   the right on a desktop; under the facts, at the left, on a tablet or a
   phone (Evan: "This should only go below the text on mobile and tablet.
   On desktop, the botton can still be to the right"). */
.summary.noimg {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 24px;
  align-items: center;
}
.summary.noimg h2.sumname,
.summary.noimg dl.kvline {
  grid-column: 1;
}
.summary.noimg .acts {
  grid-column: 2;
  grid-row: 1 / 3;
  margin: 0;
}
@media (max-width: 1024px) {
  .summary.noimg {
    display: block;
  }
  .summary.noimg .acts {
    margin-top: 14px;
  }
}
/* The plan card: Spend this month over the bar, the month's dates and
   Overage under it in smaller print; the figure is capped at the plan's
   fee, so the overage is read on its own line and never beside it. */
.planfoot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  flex-wrap: wrap;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}
.planfoot b {
  font-weight: 600;
  color: var(--ink-2);
}
.planfoot .overage.over b {
  color: var(--bad);
}

/* ====================================================================
   Ads batch 27 (2026-11-03): the Billing & payments and Settings pages
   move between their sections with tabs above the page rather than a sub
   nav at the left (Evan: "move the Plan / Activity / Billing navigation
   to be a more standard tabs ... above the page, like it is on other
   pages"). Each tab is a link to its own page, drawn exactly as the
   platform's button tabs, so the two kinds of tab bar read as one.
   ==================================================================== */
.tabs a.tab {
  flex: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 8px 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
}
.tabs a.tab:hover {
  color: var(--ink);
}
.tabs a.tab.active {
  color: var(--pink-dark);
  border-bottom-color: var(--pink-dark);
}
@media (max-width: 720px), (pointer: coarse) {
  .tabs a.tab {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    font-size: 15px;
  }
}
