/* ==========================================================================
   Samia Studios — client dashboard (dash site only), design system v3
   Paper ground, paper-2 panels with 2px ink borders and a hard shadow, KPI
   tiles in the tints, Archivo 900 numerals, plain-English notes. Loads after
   samia.css and uses only its tokens. Everything reads at 375px wide.
   ========================================================================== */

body.dash { background: var(--paper); min-height: 100vh; }

/* Top bar ----------------------------------------------------------------- */
.dash-top { position: sticky; top: 0; z-index: 60; padding-top: env(safe-area-inset-top, 0px); background: var(--paper); border-bottom: var(--bw) solid var(--ink); }
.dash-top .wrap { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s2) var(--s3); min-height: 72px; padding-block: 10px; }
.dash-top .brand .wordmark { font-size: .98rem; }
.dash-top .client { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dash-top .client .who { line-height: 1.15; min-width: 0; }
.dash-top .client .who b { display: block; color: var(--ink); font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-top .client .who span { font-size: .76rem; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.dash-top .tools { display: flex; align-items: center; gap: 10px; }
.avatar { width: 40px; height: 40px; border-radius: var(--r); border: var(--bw) solid var(--ink); box-shadow: 2px 2px 0 var(--ink); background: var(--sky); color: var(--ink); display: grid; place-items: center; font-family: var(--display); font-weight: 900; font-size: 1rem; letter-spacing: -.02em; font-variation-settings: "wdth" 80; flex: none; }
.avatar.sky { background: var(--sky); } .avatar.peach { background: var(--peach); } .avatar.mint { background: var(--mint); } .avatar.rose { background: var(--rose); } .avatar.lilac { background: var(--lilac); } .avatar.lemon { background: var(--lemon); } .avatar.sun { background: var(--sun); }

/* Marketing / Finance tabs: a segmented, ink-bordered control */
.tabs { display: inline-flex; border: var(--bw) solid var(--ink); border-radius: var(--r); background: var(--paper-2); box-shadow: 3px 3px 0 var(--ink); overflow: hidden; flex: none; }
.tabs a { padding: 8px 14px; font-size: .85rem; font-weight: 700; color: var(--ink); line-height: 1.2; border-right: var(--bw) solid var(--ink); white-space: nowrap; }
.tabs a:last-child { border-right: 0; }
.tabs a:hover { text-decoration: none; background: var(--sand); }
.tabs a[aria-current="page"] { background: var(--ink); color: var(--paper); }

/* Chips: range, sample-data flag, other-client link */
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: var(--pill); background: var(--paper-2); border: 1.5px solid var(--ink); font-size: .82rem; font-weight: 700; color: var(--ink); white-space: nowrap; line-height: 1.2; flex: none; }
.chip.sample { background: var(--sun); }
.chip.range { background: var(--paper-2); }
a.chip:hover { text-decoration: none; background: var(--sand); }

/* tools (tabs, range, chips) always sit on their own row under the brand and client */
.dash-top .wrap { grid-template-columns: auto minmax(0, 1fr); gap: 10px var(--s3); }
.dash-top .tools { grid-column: 1 / -1; flex-wrap: wrap; justify-content: space-between; gap: 10px 12px; padding-bottom: 2px; }
.dash-top .tools .tabs { order: 0; } .dash-top .tools .range-switch { order: 1; margin-left: auto; } .dash-top .tools .chip { order: 2; }
@media (max-width: 760px) {
  .dash-top { position: static; }
  .dash-top .wrap { gap: 10px var(--s2); min-height: 0; }
  .dash-top .tools { justify-content: flex-start; }
  .dash-top .tools .tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; background: var(--ink); width: 100%; }
  .dash-top .tools .tabs button, .dash-top .tools .tabs a { border-right: 0; background: var(--paper-2); text-align: center; padding: 10px 6px; }
  .dash-top .tools .tabs button[aria-current="page"], .dash-top .tools .tabs a[aria-current="page"] { background: var(--ink); }
  .dash-top .tools .range-switch { margin-left: 0; }
}
@media (max-width: 480px) {
  .dash-top .brand .wordmark { display: none; }
  .dash-top .client .who span { font-size: .72rem; }
}

/* Page layout: a 12-column grid, every block spans it unless told otherwise */
.dash-main { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s3); padding-block: var(--s4) var(--s6); }
.dash-main > * { grid-column: 1 / -1; min-width: 0; }
.row-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
.row-2-1 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--s3); }
.stack-cards { display: grid; gap: var(--s3); align-content: start; min-width: 0; }
@media (max-width: 1100px) { .row-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .row-3 > :last-child { grid-column: 1 / -1; } }
@media (max-width: 760px) { .row-2, .row-3, .row-2-1 { grid-template-columns: minmax(0, 1fr); } .row-3 > :last-child { grid-column: auto; } }

/* Title row */
.dash-title { display: flex; align-items: end; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; }
.dash-title h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 3rem); margin: 0 0 6px; }
.dash-title .sub { color: var(--muted); font-weight: 600; font-size: .92rem; }

/* Panels: the shared .card look (paper-2, ink border, hard shadow) with dashboard padding */
.dash-main .card { padding: clamp(16px, 2vw, 22px); display: flex; flex-direction: column; min-width: 0; }
.card .hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card .hd .icon-tile { width: 44px; height: 44px; box-shadow: 2px 2px 0 var(--ink); }
.card .hd .icon-tile .icon { width: 24px; height: 24px; }
.card h3 { font-size: 1.05rem; margin: 0 0 2px; }
.card .sub { font-size: .82rem; color: var(--muted); font-weight: 600; }
.card .note { font-size: .82rem; color: var(--muted); font-weight: 600; margin-top: 10px; }
.card [data-chart] { min-width: 0; }

/* Summary: lemon panel with a thick ink rule on the left */
.summary { background: var(--lemon); border: var(--bw) solid var(--ink); border-left-width: 10px; border-radius: var(--r); box-shadow: var(--shadow); padding: clamp(18px, 2.4vw, 28px); display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s3) var(--s4); }
.summary .label { margin-bottom: 8px; }
.summary .lede { font-size: clamp(1.02rem, .98rem + .3vw, 1.2rem); line-height: 1.55; color: var(--ink); }
.summary .next { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.summary .next li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; font-size: .94rem; color: var(--ink); }
.summary .next li i { width: 24px; height: 24px; border-radius: 2px; background: var(--paper-2); border: var(--bw) solid var(--ink); box-shadow: 2px 2px 0 var(--ink); display: grid; place-items: center; font-style: normal; font-family: var(--display); font-weight: 900; font-size: .8rem; color: var(--ink); }
@media (max-width: 860px) { .summary { grid-template-columns: minmax(0, 1fr); } }

/* KPIs: six tinted tiles, Archivo 900 numbers, a delta pill, a plain-English note */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s2); }
.kpi { background: var(--paper-2); border: var(--bw) solid var(--ink); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; display: grid; gap: 6px; align-content: start; min-width: 0; min-height: 150px; }
.kpi:nth-child(1) { background: var(--sky); } .kpi:nth-child(2) { background: var(--lemon); } .kpi:nth-child(3) { background: var(--mint); } .kpi:nth-child(4) { background: var(--rose); } .kpi:nth-child(5) { background: var(--lilac); } .kpi:nth-child(6) { background: var(--peach); }
.kpi.sky { background: var(--sky); } .kpi.lemon { background: var(--lemon); } .kpi.mint { background: var(--mint); } .kpi.rose { background: var(--rose); } .kpi.lilac { background: var(--lilac); } .kpi.peach { background: var(--peach); } .kpi.paper { background: var(--paper-2); }
.kpi .l { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.kpi .l .icon { width: 18px; height: 18px; color: var(--ink); }
.num { font-family: var(--display); font-weight: 900; font-size: clamp(1.7rem, 1.2rem + 1.4vw, 2.6rem); line-height: 1; color: var(--ink); letter-spacing: -.03em; font-variation-settings: "wdth" 80; }
.delta { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 800; padding: 3px 9px; border-radius: var(--pill); border: 1.5px solid var(--ink); background: var(--paper-2); color: var(--ink); width: max-content; max-width: 100%; }
.delta.up, .delta.good-down { background: var(--mint); }
.delta.down { background: var(--peach); }
.delta.flat { background: var(--sand); }
.kpi .why { font-size: .78rem; color: var(--ink-2); line-height: 1.4; margin-top: 2px; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .kpi { padding: 14px 12px; min-height: 0; } .num { font-size: 1.6rem; } }

/* Legends and colour swatches (no inline styles on the pages) */
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .8rem; font-weight: 700; color: var(--ink-2); margin-top: 8px; }
.legend i, .donut-wrap li i { width: 11px; height: 11px; border-radius: 2px; border: 1.5px solid var(--ink); display: inline-block; margin-right: 7px; vertical-align: middle; background: var(--paper-2); }
.sw-blue { background: var(--blue) !important; } .sw-red { background: var(--red) !important; } .sw-sun { background: var(--sun) !important; } .sw-green { background: var(--green) !important; } .sw-violet { background: var(--violet) !important; } .sw-pink { background: var(--pink) !important; } .sw-orange { background: var(--orange) !important; } .sw-ink { background: var(--ink) !important; } .sw-sky { background: var(--sky) !important; }

/* Horizontal bars (progress charts) */
.bars-h { display: grid; gap: 10px; }
.bars-h .r { display: grid; grid-template-columns: 112px 1fr 64px; gap: 10px; align-items: center; font-size: .88rem; }
.bars-h .r b { color: var(--ink); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bars-h .r .v { text-align: right; color: var(--ink-2); font-weight: 700; white-space: nowrap; }
.bar { height: 12px; border: 1.5px solid var(--ink); border-radius: 2px; background: var(--paper); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; transition: width 1.2s var(--ease); }
@media (max-width: 400px) { .bars-h .r { grid-template-columns: 92px 1fr 56px; font-size: .82rem; } }

/* Tables inside panels (base table.data lives in samia.css) */
.card table.data td b { color: var(--ink); }
.card table.data tr:last-child td { border-bottom: 0; }
.card table.data th, .card table.data td { padding: 9px 10px; white-space: nowrap; }
.card table.data td:first-child { white-space: normal; }

/* Reviews */
.rating { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.rating .num { font-size: 2.4rem; }
.rating .stars { color: var(--sun); font-size: 1.2rem; letter-spacing: 2px; -webkit-text-stroke: 1px var(--ink); }
.quote { background: var(--paper); border: 1.5px solid var(--ink); border-left: 6px solid var(--sun); border-radius: var(--r); padding: 12px 14px; font-size: .9rem; color: var(--ink); margin-top: 12px; }
.quote span { display: block; font-size: .76rem; color: var(--muted); margin-top: 6px; font-weight: 600; }

/* Donut with a key beside it */
.donut-wrap { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center; }
.donut-wrap ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .88rem; }
.donut-wrap li { display: flex; justify-content: space-between; gap: 10px; }
.donut-wrap li b { color: var(--ink); }
@media (max-width: 400px) { .donut-wrap { grid-template-columns: minmax(0, 1fr); } .donut-wrap [data-chart] { max-width: 150px; } }

/* Approvals list */
.todo { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.todo li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: var(--r); background: var(--paper); border: 1.5px solid var(--ink); font-size: .9rem; color: var(--ink); font-weight: 600; }
.todo li .btn { padding: .5em .9em; font-size: .78rem; box-shadow: 2px 2px 0 var(--ink); }

/* Explain toggles under charts */
details.explain { margin-top: 12px; font-size: .86rem; color: var(--ink-2); }
details.explain summary { cursor: pointer; list-style: none; font-weight: 700; color: var(--blue); display: inline-flex; align-items: center; gap: 8px; }
details.explain summary::-webkit-details-marker { display: none; }
details.explain summary::before { content: "?"; width: 20px; height: 20px; border-radius: 2px; border: 1.5px solid var(--ink); background: var(--sun); color: var(--ink); display: inline-grid; place-items: center; font-family: var(--display); font-weight: 900; font-size: .75rem; box-shadow: 1.5px 1.5px 0 var(--ink); }
details.explain[open] summary::before { background: var(--ink); color: var(--sun); }
details.explain p { margin: 10px 0 0; line-height: 1.5; max-width: 46em; }

/* Connected sources grid */
.conn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.conn-card { display: grid; gap: 4px; align-content: start; padding: 12px 14px; border-radius: var(--r); background: var(--paper); border: 1.5px solid var(--ink); font-size: .85rem; min-width: 0; }
.conn-card b { color: var(--ink); } .conn-card span { color: var(--muted); font-size: .76rem; }
.conn-card .ok { color: var(--green); font-weight: 700; font-size: .76rem; }
.conn-card.add { border-style: dashed; background: transparent; color: var(--blue); font-weight: 700; place-items: center; place-content: center; }

/* Status pills in tables */
.status-pill { display: inline-block; padding: 2px 9px; border-radius: var(--pill); border: 1.5px solid var(--ink); font-size: .72rem; font-weight: 800; color: var(--ink); white-space: nowrap; }
.status-pill.paid { background: var(--mint); } .status-pill.due { background: var(--lemon); } .status-pill.late { background: var(--peach); }

/* Sources line and footer line */
.sources { font-size: .8rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.sources b { color: var(--ink-2); }
.sources .conn { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--pill); background: var(--paper-2); border: 1.5px solid var(--ink); font-weight: 700; color: var(--ink); }
.sources .conn i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; }
.dash-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); padding-top: var(--s2); border-top: 1.5px solid var(--line); }
.dash-foot a { font-weight: 700; }

/* Landing: client picker cards */
.client-card .avatar { width: 56px; height: 56px; font-size: 1.3rem; }
.client-card .kind { font-size: var(--fs-small); color: var(--muted); }
.client-card .links { display: flex; gap: 10px; flex-wrap: wrap; }

/* Interactive pieces (dash.js) --------------------------------------------- */
.tabs button { font: inherit; padding: 8px 14px; font-size: .85rem; font-weight: 700; color: var(--ink); line-height: 1.2; border: 0; border-right: var(--bw) solid var(--ink); background: transparent; cursor: pointer; white-space: nowrap; }
.tabs button:last-child { border-right: 0; }
.tabs button:hover { background: var(--sand); }
.tabs button[aria-current="page"] { background: var(--ink); color: var(--paper); }
.range-switch { display: inline-flex; border: 1.5px solid var(--ink); border-radius: var(--pill); overflow: hidden; background: var(--paper-2); flex: none; }
.range-switch button { font: inherit; font-size: .78rem; font-weight: 700; padding: 6px 11px; border: 0; background: transparent; color: var(--ink); cursor: pointer; }
.range-switch button + button { border-left: 1.5px solid var(--ink); }
.range-switch button[aria-pressed="true"] { background: var(--sun); }
.chart-tip { position: fixed; z-index: 90; pointer-events: none; background: var(--ink); color: var(--paper); font-size: .8rem; font-weight: 700; padding: 6px 10px; border-radius: var(--r); box-shadow: 3px 3px 0 var(--sun); white-space: nowrap; }
.chart-tip b { display: block; font-weight: 600; color: rgba(255,247,230,.7); font-size: .72rem; }
.chart-tip .t2 { color: var(--sun); margin-left: 6px; }
[data-chart="area"], [data-chart="bars"] { cursor: crosshair; }
.todo li.approved { background: var(--mint); }
.btn.done { background: var(--green); border-color: var(--green); color: var(--paper); box-shadow: none; transform: none; }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); border: 1.5px solid var(--ink); background: var(--peach); font-size: .9rem; }
.alert.good { background: var(--mint); } .alert.info { background: var(--sky); }
.alert b { color: var(--ink); display: block; }
.alert .ico { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--ink); display: grid; place-items: center; font-weight: 900; background: var(--paper-2); }
.sim { display: grid; gap: 10px; padding: 14px 16px; border-radius: var(--r); background: var(--lemon); border: 1.5px solid var(--ink); }
.sim label { font-size: .85rem; font-weight: 700; color: var(--ink); display: flex; justify-content: space-between; gap: 12px; }
.sim input[type="range"] { width: 100%; accent-color: var(--red); }
.sim output { font-family: var(--display); font-weight: 900; font-size: 1.6rem; color: var(--ink); font-variation-settings: "wdth" 80; }
.sim .result { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; font-size: .85rem; color: var(--ink-2); }
.heat { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.heat i { display: block; aspect-ratio: 1; border-radius: 3px; border: 1px solid rgba(21,19,26,.25); background: var(--sky); }
.heat i[data-l="1"] { background: var(--lemon); } .heat i[data-l="2"] { background: var(--sun); } .heat i[data-l="3"] { background: var(--orange); } .heat i[data-l="4"] { background: var(--red); }
.heat-labels { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); font-size: .7rem; font-weight: 700; color: var(--muted); text-align: center; margin-bottom: 4px; }
.rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rank li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: .9rem; }
.rank li i { font-family: var(--display); font-weight: 900; color: var(--red); font-style: normal; font-variation-settings: "wdth" 80; }
.rank li b { color: var(--ink); }
.rank li .bar { grid-column: 2 / -1; }


/* Long notes in delta pills wrap inside the KPI instead of pushing past it */
.delta { white-space: normal; line-height: 1.25; border-radius: 12px; }
.kpi > * { min-width: 0; max-width: 100%; }
.todo li { flex-wrap: wrap; }
.todo li > span:first-child { min-width: 0; flex: 1 1 12em; }
.kpi { grid-template-columns: minmax(0, 1fr); }
.delta { width: fit-content; }


/* ==========================================================================
   2026-11 additions (dash agent): campaign cards and ad previews, funnel,
   Finance (sparklines, cash, invoice cards, leaks), Billing, Deliverables,
   Approvals, Reports, hydration chip, tab cross-fade. Additive only: nothing
   above is renamed or removed. The team workspace reuses these classes.
   ========================================================================== */

/* Tabs: a compact row of many tabs; on a phone the row scrolls sideways */
.tabs.many button, .tabs.many a { padding: 8px 10px; font-size: .82rem; }
.tabs.scroll { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; max-width: 100%; }
.tabs.scroll::-webkit-scrollbar { display: none; }
@media (max-width: 760px) {
  .dash-top .tools .tabs.scroll { display: flex; width: 100%; background: var(--paper-2); gap: 0; scroll-snap-type: x proximity; }
  .dash-top .tools .tabs.scroll button { border-right: var(--bw) solid var(--ink); text-align: center; padding: 10px 14px; flex: none; scroll-snap-align: start; font-size: .84rem; }
  .dash-top .tools .tabs.scroll button:last-child { border-right: 0; }
  .dash-top .tools .tabs.scroll button[aria-current="page"] { background: var(--ink); color: var(--paper); }
}
.dash-top .tools .tour-btn { order: 3; padding: .55em .9em; font-size: .8rem; box-shadow: 2px 2px 0 var(--ink); }
.dash-top .tools .chip.live { order: 2; }

/* Live/sample chip set by dash.js from the data document */
.chip.live { background: var(--mint); }
.chip .live-dot { width: 8px; height: 8px; }
.chip.sample .live-dot { background: var(--orange); box-shadow: 0 0 0 0 rgba(255,138,61,.5); }

/* Tab cross-fade */
[data-panel-id].panel-in { animation: panel-in .4s var(--ease) both; }
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Status words with a pulse dot instead of the default dot */
.status.has-dot::before { display: none; }
.status .live-dot { width: 8px; height: 8px; }
.status.paused { color: var(--orange); } .status.scheduled { color: var(--blue); } .status.ended { color: var(--muted); }
.status.paused .live-dot { background: var(--orange); animation: none; } .status.scheduled .live-dot { background: var(--blue); box-shadow: 0 0 0 0 rgba(42,91,255,.5); }

/* Campaign cards ----------------------------------------------------------- */
.camps { display: grid; gap: var(--s3); }
.camp { padding: clamp(16px, 2vw, 24px); }
.camp .camp-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s2) var(--s4); align-items: start; margin-bottom: var(--s2); }
.camp-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 8px; }
.camp h3 { font-size: clamp(1.25rem, 1rem + .9vw, 1.7rem); margin: 0 0 4px; }
.camp .objective { font-size: .92rem; color: var(--ink-2); margin: 0; max-width: 46em; }
.camp-cpr { display: grid; gap: 2px; justify-items: end; text-align: right; min-width: 150px; }
.camp-cpr .l { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.camp-cpr .num { font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.6rem); }
.camp-cpr .tc { font-size: .76rem; color: var(--muted); font-weight: 600; }
.camp-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: var(--s2) var(--s3); padding: 14px 16px; border: 1.5px solid var(--ink); border-radius: var(--r); background: var(--paper); margin-bottom: var(--s2); }
.camp-grid > div { min-width: 0; }
.camp-grid .l { font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.camp-grid .v { font-family: var(--display); font-weight: 900; font-size: 1.3rem; color: var(--ink); font-variation-settings: "wdth" 80; line-height: 1; }
.camp-grid .v small { font-family: var(--sans); font-weight: 600; font-size: .76rem; color: var(--muted); margin-left: 4px; letter-spacing: 0; text-transform: none; }
.camp-grid .d { font-size: .76rem; color: var(--muted); font-weight: 600; margin-top: 4px; }
.camp-budget .bar { margin-top: 8px; height: 12px; }
.camp-budget .bar i { height: 100%; }
.meter { position: relative; height: 14px; border: 1.5px solid var(--ink); border-radius: 2px; background: var(--paper); margin: 8px 0 6px; }
.meter > i { position: absolute; left: 0; top: 0; bottom: 0; display: block; background: var(--green); }
.meter.near > i { background: var(--sun); } .meter.over > i { background: var(--red); } .meter.none > i { background: var(--line); }
.meter .tick { position: absolute; top: -6px; bottom: -6px; left: 0; border-right: 2px dotted var(--ink); pointer-events: none; }
.meter .tick.cap { border-right: 2px solid var(--red); }
.meter-labels { display: flex; justify-content: space-between; gap: 8px; font-size: .72rem; color: var(--muted); font-weight: 600; flex-wrap: wrap; }
.meter-labels b { color: var(--ink); }
.camp-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--s2); align-items: center; }
.camp-links .chip { font-size: .78rem; }
.camp-links .chip .arrow { color: var(--red); }
.camp-landing { font-size: .8rem; color: var(--muted); flex-basis: 100%; }
.camp-landing b { color: var(--ink-2); font-weight: 600; }
.camp details.explain ul { margin: 10px 0 0; padding-left: 1.2em; display: grid; gap: 4px; line-height: 1.45; }
@media (max-width: 760px) {
  .camp .camp-top { grid-template-columns: minmax(0, 1fr); }
  .camp-cpr { justify-items: start; text-align: left; }
  .camp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
  .camp-grid .camp-budget { grid-column: 1 / -1; }
}

/* Ad previews drawn from the campaign copy ---------------------------------- */
.ads { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); margin: var(--s2) 0 var(--s1); align-items: flex-start; }
.ad { flex: 1 1 140px; max-width: 250px; min-width: 0; display: grid; gap: 8px; align-content: start; }
.ad.ad-search, .ad.ad-email, .ad.ad-profile { flex-basis: 250px; max-width: 350px; }
.ad.ad-carousel { flex-basis: 180px; max-width: 310px; }
.ad .ad-kind { font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.ad .ad-copy { font-size: .8rem; color: var(--ink-2); line-height: 1.45; margin: 0; }
.ad .ad-copy b { color: var(--ink); display: block; font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 2px; }
.phone { position: relative; aspect-ratio: 9 / 17; border: 2px solid var(--ink); border-radius: 18px; background: var(--ink); box-shadow: 4px 4px 0 var(--ink); overflow: hidden; }
.phone::before { content: ""; position: absolute; top: 5px; left: 50%; transform: translateX(-50%); width: 34%; height: 9px; background: var(--ink); border-radius: 0 0 8px 8px; z-index: 3; }
.phone .screen { position: absolute; inset: 5px; border-radius: 13px; overflow: hidden; background: var(--night); }
.phone .scene { position: absolute; inset: 0; }
.phone .scene svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.phone .cap { position: absolute; left: 10px; right: 10px; top: 38%; font-family: var(--display); font-weight: 900; text-transform: uppercase; color: var(--paper); font-size: clamp(.86rem, .4rem + 1vw, 1.1rem); line-height: .95; letter-spacing: -.01em; text-shadow: 2px 2px 0 var(--ink); font-variation-settings: "wdth" 78; z-index: 2; }
.phone .ui { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 10px 10px; background: linear-gradient(180deg, transparent, rgba(21,19,26,.82)); color: var(--paper); font-size: .6rem; display: grid; gap: 4px; z-index: 2; }
.phone .ui b { font-size: .64rem; }
.phone .ui span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phone .ui .cta { display: inline-block; background: var(--paper); color: var(--ink); font-weight: 700; padding: 3px 8px; border-radius: 3px; font-size: .6rem; width: max-content; margin-top: 2px; }
.phone .side { position: absolute; right: 8px; bottom: 60px; display: grid; gap: 10px; z-index: 2; }
.phone .side i { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--paper); display: block; opacity: .9; }
.ad-static .frame { aspect-ratio: 1; border: 2px solid var(--ink); border-radius: var(--r); box-shadow: 4px 4px 0 var(--ink); overflow: hidden; position: relative; background: var(--sun); display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.ad-static .frame .scene { position: relative; min-height: 0; }
.ad-static .frame .scene svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ad-static .frame .txt { background: var(--paper-2); border-top: 2px solid var(--ink); padding: 8px 10px 9px; display: grid; gap: 3px; }
.ad-static .frame h4 { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: .95rem; line-height: .95; margin: 0; color: var(--ink); font-variation-settings: "wdth" 78; letter-spacing: -.01em; }
.ad-static .frame ul { list-style: none; margin: 0; padding: 0; font-size: .62rem; font-weight: 600; color: var(--ink-2); display: grid; gap: 1px; }
.ad-static .frame .cta { font-size: .6rem; font-weight: 700; color: var(--paper); background: var(--ink); padding: 3px 8px; border-radius: 3px; width: max-content; margin-top: 3px; }
.ad-carousel .slides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ad-carousel .slide { aspect-ratio: 4 / 5; border: 2px solid var(--ink); border-radius: var(--r); overflow: hidden; background: var(--sky); display: grid; grid-template-rows: minmax(0, 1fr) auto; box-shadow: 3px 3px 0 var(--ink); min-width: 0; }
.ad-carousel .slide .scene { position: relative; min-height: 0; }
.ad-carousel .slide .scene svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ad-carousel .slide .txt { background: var(--paper-2); border-top: 2px solid var(--ink); padding: 5px 7px 6px; min-width: 0; }
.ad-carousel .slide b { display: block; font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: .66rem; line-height: 1; color: var(--ink); font-variation-settings: "wdth" 80; }
.ad-carousel .slide span { font-size: .56rem; color: var(--muted); font-weight: 600; display: block; }
.ad-carousel .dots { display: flex; justify-content: center; gap: 4px; }
.ad-carousel .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); border: 1px solid var(--ink); }
.ad-carousel .dots i:first-child { background: var(--ink); }
.ad-search .frame { border: 2px solid var(--ink); border-radius: var(--r); box-shadow: 4px 4px 0 var(--ink); background: #fff; padding: 12px 14px 13px; display: grid; gap: 4px; min-width: 0; }
.ad-search .sp { font-size: .62rem; font-weight: 700; color: var(--ink); }
.ad-search .u { font-size: .66rem; color: var(--ink-2); display: flex; align-items: center; gap: 6px; min-width: 0; }
.ad-search .u i { width: 16px; height: 16px; border-radius: 50%; background: var(--sun); border: 1.5px solid var(--ink); display: inline-block; flex: none; }
.ad-search .u span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-search .h { font-size: .95rem; color: var(--blue); line-height: 1.3; margin: 0; font-weight: 500; font-family: var(--sans); text-transform: none; letter-spacing: 0; }
.ad-search .d { font-size: .7rem; color: var(--ink-2); line-height: 1.45; margin: 0; }
.ad-search .sl { display: flex; flex-wrap: wrap; gap: 3px 12px; font-size: .68rem; color: var(--blue); margin-top: 2px; }
.ad-sms .phone .screen { background: var(--paper-2); }
.ad-sms .thread { position: absolute; inset: 0; padding: 30px 9px 10px; display: grid; gap: 6px; align-content: start; }
.ad-sms .from { font-size: .58rem; font-weight: 700; color: var(--muted); text-align: center; letter-spacing: .06em; text-transform: uppercase; }
.ad-sms .bubble { background: var(--sky); border: 1.5px solid var(--ink); border-radius: 12px 12px 12px 3px; padding: 7px 9px; font-size: .64rem; line-height: 1.4; color: var(--ink); justify-self: start; max-width: 94%; }
.ad-sms .bubble.me { background: var(--lemon); border-radius: 12px 12px 3px 12px; justify-self: end; }
.ad-email .frame { border: 2px solid var(--ink); border-radius: var(--r); box-shadow: 4px 4px 0 var(--ink); background: var(--paper-2); overflow: hidden; min-width: 0; }
.ad-email .row { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; padding: 9px 10px; border-bottom: 1.5px solid var(--line); font-size: .64rem; color: var(--muted); align-items: start; min-width: 0; }
.ad-email .row:last-child { border-bottom: 0; }
.ad-email .row.hi { background: var(--lemon); color: var(--ink); }
.ad-email .av { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--sky); display: grid; place-items: center; font-weight: 900; font-size: .6rem; font-family: var(--display); color: var(--ink); }
.ad-email .row b { display: block; color: var(--ink); font-size: .7rem; }
.ad-email .row .s { display: block; font-weight: 700; color: var(--ink); }
.ad-email .row .p { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-profile .frame { border: 2px solid var(--ink); border-radius: var(--r); box-shadow: 4px 4px 0 var(--ink); background: var(--paper-2); padding: 12px 14px 13px; display: grid; gap: 5px; min-width: 0; }
.ad-profile .badge { display: inline-flex; align-items: center; gap: 6px; font-size: .6rem; font-weight: 700; color: var(--green); text-transform: uppercase; letter-spacing: .06em; }
.ad-profile .badge::before { content: "✓"; width: 14px; height: 14px; border-radius: 50%; background: var(--green); color: #fff; display: inline-grid; place-items: center; font-size: .55rem; }
.ad-profile .nm { font-weight: 800; color: var(--ink); font-size: .95rem; }
.ad-profile .rt { font-size: .7rem; color: var(--ink-2); }
.ad-profile .rt .stars { color: var(--sun); -webkit-text-stroke: .6px var(--ink); letter-spacing: 1px; }
.ad-profile ul { list-style: none; margin: 0; padding: 0; font-size: .68rem; color: var(--ink-2); display: grid; gap: 2px; }
.ad-profile .cta { margin-top: 4px; background: var(--blue); color: #fff; border-radius: var(--pill); padding: 5px 12px; font-size: .66rem; font-weight: 700; width: max-content; }

/* Funnel and platform split ------------------------------------------------ */
.funnel { display: grid; gap: 12px; }
.funnel .step { display: grid; grid-template-columns: 160px minmax(0, 1fr) 96px; gap: 10px; align-items: center; font-size: .88rem; }
.funnel .step b { color: var(--ink); display: block; line-height: 1.2; }
.funnel .step small { display: block; color: var(--muted); font-size: .74rem; font-weight: 600; margin-top: 2px; }
.funnel .step .v { text-align: right; font-family: var(--display); font-weight: 900; font-size: 1.2rem; color: var(--ink); font-variation-settings: "wdth" 80; white-space: nowrap; }
.funnel .bar { height: 18px; }
.funnel .bar i { height: 100%; }
@media (max-width: 520px) { .funnel .step { grid-template-columns: minmax(0, 1fr) 84px; } .funnel .step .bar { grid-column: 1 / -1; } }
.split { display: grid; gap: 12px; }
.split .r { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; align-items: center; font-size: .88rem; }
.split .r b { color: var(--ink); display: block; line-height: 1.2; }
.split .r small { color: var(--muted); font-weight: 600; font-size: .76rem; display: block; margin-top: 2px; }
.split .r .v { text-align: right; font-weight: 800; color: var(--ink); white-space: nowrap; }
.split .r .bar { grid-column: 1 / -1; height: 12px; }
.split .r .bar i { height: 100%; }
.bars-h.wide .r { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 76px; }
.bars-h.wide .r b { white-space: normal; line-height: 1.2; }
.bars-h .bar i { height: 100%; }

/* Connected sources: last sync ------------------------------------------- */
.conn-card .sync { color: var(--muted); font-size: .72rem; font-weight: 600; }
.conn-card .ok .live-dot { width: 7px; height: 7px; margin-right: 5px; vertical-align: 1px; }
.conn-card .ok.err { color: var(--red); }
.conn-card.err { border-color: var(--red); background: var(--rose); }

/* Finance: sparklines, cash, invoices, costs, leaks ----------------------- */
.spark-card .spark-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.spark-card .num { font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.8rem); }
.spark-card [data-chart="spark"] { margin-top: 4px; }
.spark-card .spark-labels { display: flex; justify-content: space-between; font-size: .7rem; color: var(--muted); font-weight: 600; margin-top: 2px; }
.cash { display: grid; gap: 12px; }
.cash .r { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; font-size: .88rem; align-items: baseline; }
.cash .r b { color: var(--ink); }
.cash .r small { display: block; color: var(--muted); font-size: .74rem; font-weight: 600; }
.cash .r .v { font-family: var(--display); font-weight: 900; font-size: 1.25rem; color: var(--ink); font-variation-settings: "wdth" 80; white-space: nowrap; }
.cash .r .bar { grid-column: 1 / -1; height: 10px; }
.cash .r .bar i { height: 100%; }
.cash .weeks { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1.5px solid var(--ink); border-radius: var(--r); background: var(--lemon); font-size: .85rem; color: var(--ink); line-height: 1.35; }
.cash .weeks .num { font-size: 1.7rem; flex: none; }
.inv-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: var(--s2); }
.inv-card { border: var(--bw) solid var(--ink); border-radius: var(--r); padding: 14px 14px 12px; display: grid; gap: 4px; align-content: start; box-shadow: 3px 3px 0 var(--ink); min-width: 0; }
.inv-card.paid { background: var(--mint); } .inv-card.open { background: var(--lemon); } .inv-card.overdue { background: var(--peach); }
.inv-card .l { font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.inv-card .num { font-size: clamp(1.2rem, .9rem + 1.3vw, 2rem); }
.inv-card .c { font-size: .76rem; color: var(--ink-2); font-weight: 600; }
@media (max-width: 420px) { .inv-cards { gap: 8px; } .inv-card { padding: 10px 9px 9px; } .inv-card .num { font-size: 1.1rem; } .inv-card .l { font-size: .62rem; letter-spacing: .03em; } }
.status-pill.open { background: var(--lemon); } .status-pill.overdue { background: var(--peach); } .status-pill.scheduled { background: var(--sky); } .status-pill.done { background: var(--mint); } .status-pill.review { background: var(--lemon); } .status-pill.plugged { background: var(--mint); } .status-pill.fixing { background: var(--lemon); } .status-pill.waiting { background: var(--lemon); } .status-pill.changed { background: var(--rose); }
.bills { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bills li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 12px; border: 1.5px solid var(--ink); border-radius: var(--r); background: var(--paper); font-size: .88rem; }
.bills li b { color: var(--ink); white-space: nowrap; }
.bills li small { display: block; color: var(--muted); font-size: .74rem; font-weight: 600; }
.leak-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
@media (max-width: 1100px) { .leak-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .leak-grid { grid-template-columns: minmax(0, 1fr); } }
.leak { border: var(--bw) solid var(--ink); border-radius: var(--r); background: var(--paper); padding: 14px 16px 16px; display: grid; gap: 8px; align-content: start; box-shadow: 3px 3px 0 var(--ink); min-width: 0; }
.leak[data-status="open"] { background: var(--peach); } .leak[data-status="fixing"] { background: var(--lemon); } .leak[data-status="plugged"] { background: var(--mint); }
.leak-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.leak-top .owner { font-size: .72rem; font-weight: 700; color: var(--ink-2); }
.leak h4 { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 1.05rem; line-height: 1.05; margin: 0; letter-spacing: -.01em; font-variation-settings: "wdth" 86; color: var(--ink); }
.leak-amt { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.leak-amt .num { font-size: 1.75rem; }
.leak-amt span { font-size: .76rem; color: var(--ink-2); font-weight: 600; }
.leak p { font-size: .82rem; line-height: 1.45; margin: 0; color: var(--ink-2); }
.leak p b { color: var(--ink); display: block; font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 1px; }
.leak-sum { display: flex; gap: 8px 16px; flex-wrap: wrap; font-size: .82rem; font-weight: 700; color: var(--ink-2); margin-top: var(--s2); }
.leak-sum i { width: 11px; height: 11px; border-radius: 2px; border: 1.5px solid var(--ink); display: inline-block; margin-right: 6px; vertical-align: middle; }
.sw-peach { background: var(--peach) !important; } .sw-lemon { background: var(--lemon) !important; } .sw-mint { background: var(--mint) !important; } .sw-line { background: var(--line) !important; }

/* Billing ------------------------------------------------------------------ */
.bill-plan .plan-name { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.6rem); line-height: .95; color: var(--ink); font-variation-settings: "wdth" 78; letter-spacing: -.02em; }
.bill-plan .plan-name small { display: block; font-family: var(--sans); font-weight: 600; font-size: .85rem; letter-spacing: 0; text-transform: none; color: var(--muted); margin-top: 6px; }
.bill-lines { list-style: none; margin: var(--s2) 0; padding: 0; display: grid; }
.bill-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1.5px solid var(--line); font-size: .9rem; color: var(--ink-2); }
.bill-lines li b { color: var(--ink); white-space: nowrap; }
.bill-lines li.total { border-bottom: 0; border-top: var(--bw) solid var(--ink); font-weight: 800; color: var(--ink); }
.bill-next { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 16px; align-items: center; padding: 14px 16px; border: var(--bw) solid var(--ink); border-radius: var(--r); background: var(--lemon); box-shadow: 3px 3px 0 var(--ink); }
.bill-next .date { font-family: var(--display); font-weight: 900; font-size: 1.15rem; text-transform: uppercase; color: var(--ink); line-height: 1; text-align: center; border: var(--bw) solid var(--ink); border-radius: var(--r); background: var(--paper-2); padding: 8px 10px; min-width: 66px; font-variation-settings: "wdth" 80; }
.bill-next .date small { display: block; font-size: .58rem; letter-spacing: .12em; margin-bottom: 3px; color: var(--red); }
.bill-next .num { font-size: 1.6rem; }
.bill-next .sub { font-size: .8rem; }
.bill-terms { font-size: .85rem; color: var(--ink-2); }
.bill-terms p { margin: 0 0 .6em; }

/* Deliverables ------------------------------------------------------------- */
.deliv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 760px) { .deliv { grid-template-columns: minmax(0, 1fr); } }
.deliv-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 14px; border: 1.5px solid var(--ink); border-radius: var(--r); background: var(--paper-2); align-items: start; min-width: 0; }
.deliv-item[data-status="review"] { background: var(--lemon); } .deliv-item[data-status="scheduled"] { background: var(--sky); }
.deliv-item b { grid-column: 1; grid-row: 1; color: var(--ink); font-size: .92rem; line-height: 1.3; }
.deliv-item .meta { grid-column: 1; grid-row: 2; font-size: .76rem; color: var(--muted); font-weight: 600; }
.deliv-item .status-pill { grid-column: 2; grid-row: 1 / span 2; align-self: start; }
.deliv-sum { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--s2); }

/* Approvals ---------------------------------------------------------------- */
.appr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.appr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; padding: 14px 16px; border: var(--bw) solid var(--ink); border-radius: var(--r); background: var(--paper); align-items: start; min-width: 0; }
.appr.approved { background: var(--mint); } .appr.changed { background: var(--rose); }
.appr-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-bottom: 6px; }
.appr-meta .due { font-size: .74rem; font-weight: 700; color: var(--red); }
.pill.creative { background: var(--lilac); } .pill.budget { background: var(--lemon); } .pill.audience { background: var(--sky); } .pill.claim { background: var(--rose); }
.appr b.t { color: var(--ink); font-size: 1rem; display: block; margin-bottom: 4px; line-height: 1.3; }
.appr p { font-size: .88rem; margin: 0 0 6px; color: var(--ink-2); line-height: 1.5; }
.appr .rule { font-size: .76rem; color: var(--muted); font-weight: 600; margin: 0; }
.appr .rule b { color: var(--ink); }
.appr-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.appr-actions .btn { padding: .55em .9em; font-size: .8rem; box-shadow: 2px 2px 0 var(--ink); }
.appr .changes-form { grid-column: 1 / -1; display: grid; gap: 8px; padding: 12px; border: 1.5px dashed var(--ink); border-radius: var(--r); background: var(--paper-2); }
.appr .changes-form label { font-size: .82rem; font-weight: 700; color: var(--ink); }
.appr .changes-form textarea { font: inherit; font-size: .9rem; padding: 10px 12px; border: 1.5px solid var(--ink); border-radius: var(--r); min-height: 72px; resize: vertical; background: #fff; width: 100%; }
.appr .changes-form .row { display: flex; gap: 8px; flex-wrap: wrap; }
.appr .result { grid-column: 1 / -1; font-size: .82rem; font-weight: 700; color: var(--ink); margin: 0; }
@media (max-width: 640px) { .appr { grid-template-columns: minmax(0, 1fr); } .appr-actions { flex-direction: row; flex-wrap: wrap; } }

/* Reports ------------------------------------------------------------------ */
.report-card { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: var(--s3) var(--s4); align-items: start; }
.report-cover { aspect-ratio: 3 / 4; border: var(--bw) solid var(--ink); border-radius: var(--r); box-shadow: 5px 5px 0 var(--ink); background: var(--sun); overflow: hidden; position: relative; transform: rotate(-1.5deg); }
.report-cover svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.report-cover .t { position: absolute; left: 10px; right: 10px; bottom: 10px; font-family: var(--display); font-weight: 900; text-transform: uppercase; color: var(--ink); line-height: .95; font-size: 1.05rem; font-variation-settings: "wdth" 78; }
.report-cover .t small { display: block; font-size: .58rem; letter-spacing: .12em; margin-bottom: 4px; color: var(--red); }
.report-meta { font-size: .8rem; color: var(--muted); font-weight: 600; }
.report-next { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px dashed var(--ink); border-radius: var(--r); font-size: .88rem; color: var(--ink-2); }
@media (max-width: 560px) { .report-card { grid-template-columns: minmax(0, 1fr); } .report-cover { max-width: 150px; } }

/* The report page (sites/dash/public/reports/*) ---------------------------- */
.report-page .section { padding-block: clamp(40px, 6vw, 72px); }
.report-page .hero { padding-block: clamp(40px, 6vw, 72px) clamp(36px, 5vw, 64px); }
.report-numbers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
@media (max-width: 640px) { .report-numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.report-numbers > div { border: var(--bw) solid var(--ink); border-radius: var(--r); padding: 16px; background: var(--paper-2); box-shadow: 3px 3px 0 var(--ink); min-width: 0; }
.report-numbers > div:nth-child(1) { background: var(--sky); } .report-numbers > div:nth-child(2) { background: var(--lemon); } .report-numbers > div:nth-child(3) { background: var(--mint); } .report-numbers > div:nth-child(4) { background: var(--rose); } .report-numbers > div:nth-child(5) { background: var(--lilac); } .report-numbers > div:nth-child(6) { background: var(--peach); }
.report-numbers .l { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.report-numbers .num { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.4rem); margin: 6px 0 4px; }
.report-numbers .n { font-size: .78rem; color: var(--muted); font-weight: 600; }
.report-prose { max-width: 40em; font-size: 1.05rem; line-height: 1.65; }
.report-prose h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); margin-bottom: .5em; }
.report-sig { display: flex; align-items: center; gap: 14px; margin-top: var(--s3); font-size: .9rem; color: var(--ink-2); }
.report-sig .arabic { font-size: 1.9rem; color: var(--blue); line-height: 1; }
.report-page .dash-main { padding-block: 0; }

/* Portal index ------------------------------------------------------------- */
.portal-art { width: 100%; max-width: 440px; margin-inline: auto; }
.portal-art svg { width: 100%; height: auto; display: block; overflow: visible; }
.portal-steps { counter-reset: ps; display: grid; gap: var(--s2); }
.portal-steps > div { position: relative; padding: 18px 20px 18px 64px; border: var(--bw) solid var(--ink); border-radius: var(--r); background: var(--paper-2); box-shadow: 3px 3px 0 var(--ink); counter-increment: ps; }
.portal-steps > div::before { content: counter(ps); position: absolute; left: 16px; top: 16px; width: 32px; height: 32px; border: var(--bw) solid var(--ink); border-radius: 2px; background: var(--sun); box-shadow: 2px 2px 0 var(--ink); display: grid; place-items: center; font-family: var(--display); font-weight: 900; color: var(--ink); }
.portal-steps h3 { margin: 0 0 4px; font-size: 1.05rem; }
.portal-steps p { margin: 0; font-size: .95rem; }
.tab-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
@media (max-width: 900px) { .tab-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tab-list { grid-template-columns: minmax(0, 1fr); } }
.tab-list .tile { padding: 18px 20px; gap: 8px; }
.tab-list .tile h3 { font-size: 1rem; }
.tab-list .tile p { font-size: .9rem; }

@media (prefers-reduced-motion: reduce) {
  [data-panel-id].panel-in { animation: none !important; }
  .meter > i, .bar i { transition: none !important; }
}

/* Panels: the single implicit column of a stack must never grow past the page (a wide table inside .table-wrap scrolls instead) */
.stack-cards { grid-template-columns: minmax(0, 1fr); }
.stack-cards > * { min-width: 0; }

/* A text thread needs a shorter frame than a reel */
.ad-sms .phone { aspect-ratio: 9 / 11; }
.ad-sms .thread { padding-top: 26px; }

/* ==========================================================================
   2026-11 round-1 fixes (dash agent). Additive only.
   ========================================================================== */
/* The Marketing summary card holds three tiles, not six: three across, two-up with a full-width third on a phone */
.camp-summary .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 600px) { .camp-summary .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .camp-summary .kpi:last-child { grid-column: 1 / -1; } }
/* Two-up rows: each card takes its own height instead of stretching to a taller neighbour with a blank lower half */
.row-2 { align-items: start; }
/* Title row: a long sub line wraps inside the title block, so the two buttons stay on the right */
.dash-title > div:first-child { flex: 1 1 480px; min-width: 0; }
/* Any button in the top-bar tools (the portal index's "Get a dashboard") sits like the Tour button */
.dash-top .tools .btn { order: 3; padding: .55em .9em; font-size: .8rem; box-shadow: 2px 2px 0 var(--ink); }
/* The portal index has no range switch, so its sample chip carries the auto margin that groups chip and button on the right */
.dash-top .portal-tools .chip { margin-left: auto; }
/* Link tabs (the portal index) scroll sideways on a phone exactly like the button tabs */
@media (max-width: 760px) {
  .dash-top .tools .tabs.scroll a { border-right: var(--bw) solid var(--ink); text-align: center; padding: 10px 14px; flex: none; scroll-snap-align: start; font-size: .84rem; }
  .dash-top .tools .tabs.scroll a:last-child { border-right: 0; }
}
/* The family of sites, as a row of chips on the portal index (private pages carry no public footer) */
.dash-family { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 10px; }
.dash-family li { margin: 0; }

/* ==========================================================================
   2026-11 round-2 fixes (dash agent). Additive only.
   ========================================================================== */
/* Tables: a short table (two to four short columns) fits a phone instead of hiding columns behind a 640px scroll */
.table-wrap table.data.fit { min-width: 0; }
.card table.data.fit th, .card table.data.fit td { white-space: normal; }
.card table.data.fit td.num { white-space: nowrap; }
/* Ledgers (invoice lists) and calendars: the number or date never breaks; the long words wrap instead of widening the row */
.card table.data.cal td { white-space: normal; }
.card table.data.cal td:nth-child(2) { min-width: 18em; }
.card table.data td.wide { white-space: normal; min-width: 13em; }
.card table.data.ledger td:first-child, .card table.data.cal td:first-child { white-space: nowrap; }
.card table.data .status-pill { white-space: nowrap; }
/* The note under a sampled invoice list */
.invoices .note { margin-top: 12px; }
/* "+ Add a source" is a link to the people who add one */
a.conn-card.add { text-decoration: none; min-height: 64px; }
a.conn-card.add:hover { background: var(--paper); }
/* Report card: the cover title sits on its own paper label, clear of the drawing; the live dot keeps its size */
.report-cover .t { background: var(--paper-2); border: 1.5px solid var(--ink); border-radius: 6px; padding: 6px 8px; left: 8px; right: 8px; bottom: 8px; }
.report-next .live-dot { flex: none; }
/* Bar rows: a long label wraps onto a second line instead of being cut off with an ellipsis */
.bars-h .r b { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.2; overflow-wrap: break-word; }
/* A number cell in a table reads at table size: the display-size .num is for tiles, not for amounts in a row */
table.data td.num { font-family: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; letter-spacing: normal; font-variation-settings: normal; color: inherit; }
table.data th.num { font-family: inherit; font-weight: 700; font-size: .72rem; line-height: inherit; letter-spacing: .1em; font-variation-settings: normal; }
table.data td.num b { font-weight: 800; }
/* Reel captions sit on a dark band so the words read over any drawing behind them */
.phone .cap { background: rgba(21, 19, 26, .72); padding: 5px 7px 6px; border-radius: 6px; left: 8px; right: 8px; }
@media (max-width: 480px) { .card table.data.fit th, .card table.data.fit td { padding: 8px 5px; } .card table.data.fit th { letter-spacing: .04em; } .card table.data.fit td:first-child, .card table.data.fit th:first-child { padding-left: 0; } }
