/* Growth in a Bottle admin. Brand r12 from 29 Nov 2026 (was the Camillo Labs copper style of 24 Nov 2026).
   Warm cream canvas, a beige sidebar, hairline borders, one copper accent, Hanken Grotesk.
   Text colours are checked: --muted is 4.6:1 or better on every surface (the beige pill too), --accent-ink 4.8:1.
   --accent (copper) is for lines, fills and marks only, never for small text. */
@font-face {
  font-family: "Hanken Grotesk"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: local("Hanken Grotesk"), url("/admin/static/hanken-grotesk.ttf") format("truetype");
}
@font-face { font-family: "Camillo Grotesk Display"; src: url("/admin/static/camillo-grotesk-display.ttf") format("truetype"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/admin/static/instrument-sans.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/admin/static/instrument-sans-bold.ttf") format("truetype"); font-weight: 600 700; font-display: swap; }
:root {
  /* Brand r12 (Cam, 29 Nov 2026: the whole admin, not only the login). Mist ground, ink text, deep blue the main
     accent, copper the one rare accent. --muted is 4.5:1 or better on the ground, the sidebar and the pill. */
  --bg: #f0ede5; --side: #e8e4da; --fg: #11151a; --muted: #5c5854; --faint: #85807a; --line: #d9d3c8; --line-strong: #c9c3b8;
  --card: #f7f5f0; --sunk: #ebe7de;
  --accent: #2e6a87; --accent-ink: #245570; --accent-fg: #f7f5f0; --accent-soft: #dde6ea; --accent-pill: #d6e1e6;
  --navy: #11151a; --navy-fg: #ffffff; --navy-muted: #b9b4aa; --navy-accent: #8ecae7;
  --primary: #11151a; --primary-fg: #f7f5f0; --copper: #a8582e;
  --good: #2f6b45; --good-soft: #e3ebe3; --warn: #8a4a22; --warn-soft: #efe2d6; --bad: #9b2f1c; --bad-soft: #f5e1da;
  --info: #2e4a5a; --info-soft: #e2e6e6; --bar: #2e6a87; --bar-2: #cfdde4;
  --radius: 14px; --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(17, 21, 26, .04), 0 18px 40px -24px rgba(17, 21, 26, .2);
  --font: "Instrument Sans", "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Camillo Grotesk Display", "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  color-scheme: light;
}
/* One light theme, as in the reference, also when the computer is in dark mode. */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 14.5px/1.55 var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
a { color: var(--accent-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--fg); }
h1 { font-size: 34px; line-height: 1.15; margin: 0; letter-spacing: -0.022em; font-weight: 700; }
h2 { font-size: 18px; line-height: 1.3; margin: 0; font-weight: 650; letter-spacing: -0.01em; }
h3 { font-size: 15px; margin: 0 0 6px; font-weight: 650; }
p { margin: 0 0 8px; }
strong, b { font-weight: 650; }
code, pre, textarea.code { font: 12.5px/1.45 ui-monospace, "SF Mono", Menlo, monospace; }
pre { margin: 0; white-space: pre-wrap; word-break: break-word; background: var(--sunk); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; max-height: 320px; overflow: auto; }

/* ---------- Shell: a beige sidebar (header.top) beside the page (main) ---------- */
body:not(.solo) { background: linear-gradient(to right, var(--side) 0 263px, var(--line) 263px 264px, var(--bg) 264px); display: grid; grid-template-columns: 264px minmax(0, 1fr); grid-template-rows: auto 1fr; min-height: 100vh; }
body:not(.solo) > .top { grid-column: 1; grid-row: 1 / span 2; }
body:not(.solo) > main { grid-column: 2; grid-row: 2; }
/* The SAMPLE banner of a pitch instance and the store banner sit above the page, beside the sidebar. */
body:not(.solo) > #gib-sample-banner, body:not(.solo) > #gib-store-banner { grid-column: 2; grid-row: 1; }
#gib-sample-banner[data-sample] { background: transparent !important; color: var(--muted) !important; font: 500 13px/1.45 var(--font) !important; text-align: left !important; padding: 14px 56px 0 !important; }
.top { display: flex; flex-direction: column; gap: 4px; padding: 28px 16px 20px; background: var(--side); border-right: 1px solid var(--line); position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 5; }
.top .brand { display: flex; gap: 12px; align-items: center; color: var(--fg); text-decoration: none; padding: 0 8px 22px; }
.top .brand .mark { width: 28px; height: 28px; flex: none; color: var(--fg); }
.top .brand .mark-dot { fill: var(--accent); }
.brand-words { display: grid; line-height: 1.25; min-width: 0; }
.brand-org { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.brand-name { font-size: 15.5px; font-weight: 650; overflow-wrap: anywhere; }
.side-label { font-size: 13px; color: var(--muted); margin: 6px 8px 6px; }
.top .crumb { color: var(--muted); }
.top .crumb.switch { display: grid; gap: 4px; font-size: 13px; padding: 0 8px 14px; }
.top .crumb.switch select { width: 100%; max-width: none; }
nav.tabs { display: grid; gap: 2px; margin: 0; }
nav.tabs a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--radius-sm); color: #3a434b; text-decoration: none; font-size: 15.5px; font-weight: 500; white-space: nowrap; }
nav.tabs a::before { content: ""; width: 12px; height: 12px; border: 1.5px solid currentColor; border-radius: 3.5px; flex: none; opacity: .75; }
nav.tabs a:hover { background: rgba(168, 107, 60, .07); color: var(--fg); }
nav.tabs a[aria-current=page] { background: var(--accent-pill); color: var(--accent-ink); font-weight: 600; }
nav.tabs a[aria-current=page]::before { opacity: 1; }
.side-foot { margin-top: 18px; padding: 14px 12px 0; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: 14px; }
.side-foot a { color: var(--muted); text-decoration: none; }
.side-foot a:hover { color: var(--fg); text-decoration: underline; }
.top #gib-logout { margin-top: auto; align-self: flex-start; padding: 14px 12px 0; color: var(--muted); font-size: 14px; }
.top #gib-logout:hover { color: var(--fg); }
main { padding: 44px 56px 72px; max-width: 1240px; width: 100%; min-width: 0; }

/* Login, setup, reset and the Going live page: one calm column, the lockup above it. */
body.solo { display: block; min-height: 100vh; }
body.solo > .top { position: static; height: auto; flex-direction: row; justify-content: space-between; align-items: center; background: none; border: 0; padding: 40px 24px 0; max-width: 480px; margin: 0 auto; }
body.solo > .top .brand { padding: 0; }
body.solo > main { max-width: 480px; margin: 0 auto; padding: 36px 24px 72px; }
body.solo.wide > .top, body.solo.wide > main { max-width: 860px; }
body.solo .panel { grid-template-columns: minmax(0, 1fr); }
body.solo .card > .body { padding-top: 22px; }

/* ---------- Page header: large title, one grey sentence, the Example data tag on the right ---------- */
.site-head { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: flex-start; justify-content: space-between; margin-bottom: 32px; }
.site-head .head-text { display: grid; gap: 10px; min-width: 0; }
.site-head .head-sub, .site-head > p { color: var(--muted); font-size: 16px; margin: 0; }
.site-head > p { flex-basis: 100%; }
.site-head .head-aside { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding-top: 4px; }
.site-head a, .head-link { font-size: 14px; color: var(--muted); }
.site-head a:hover { color: var(--fg); }
.badge.tag, [data-sandbox] { background: transparent; border: 1px dashed var(--line-strong); color: var(--muted); border-radius: 8px; padding: 4px 11px; font-size: 13.5px; font-weight: 500; }

/* ---------- Cards ---------- */
.panel { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 22px; align-items: start; }
.panel > .wide, .panel > .full { grid-column: 1 / -1; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 22px 26px 0; flex-wrap: wrap; }
.card-head .actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card-head .actions:empty { display: none; }
.card > .body { padding: 16px 26px 24px; }
/* FX15 request 3 (review-5 R5-29), integration 8: a long word such as a key path wraps, so no card is wider than 390 px. */
.card .body { overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.stack { display: grid; gap: 12px; }
.split { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; align-items: start; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; align-items: start; }

/* ---------- Key numbers: plain figures, label under the number ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px 24px; }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 2px 0; min-width: 0; }
.kpi .v { order: -1; font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.15; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.kpi .k { color: var(--fg); font-size: 13.5px; font-weight: 500; }
.kpi .s { color: var(--muted); font-size: 12.5px; }
/* The Overview's This week figures: one dark navy band, white figures, grey labels, one figure in light copper. */
#this-week { background: none; border: 0; box-shadow: none; }
#this-week > .card-head { padding: 0 0 12px; }
#this-week > .body { padding: 0; }
#this-week .kpis { background: var(--navy); color: var(--navy-fg); border-radius: var(--radius); padding: 30px 32px 28px; gap: 22px 32px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin-bottom: 14px; }
#this-week .kpi .v { color: var(--navy-fg); font-size: 40px; }
#this-week .kpi .k { color: #dfe3e7; }
#this-week .kpi .s, #this-week .kpi .d { color: var(--navy-muted); }
#this-week .kpi .d.up { color: #9fd3ae; } #this-week .kpi .d.down { color: #f2ab9c; }
#this-week .kpi[data-kpi="Leads"] .v { color: var(--navy-accent); }
#this-week > .body > p { margin: 0 2px 6px; }

/* ---------- States ---------- */
.state { display: flex; gap: 6px 10px; align-items: baseline; flex-wrap: wrap; padding: 16px 18px; border-radius: 14px; background: var(--sunk); color: var(--muted); }
.state strong { color: var(--fg); }
.state.not-built { background: var(--sunk); }
.state.error { background: var(--bad-soft); color: var(--bad); }
.state.error strong { color: var(--bad); }
.state.loading { background: none; padding-left: 0; }
.spinner { width: 12px; height: 12px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; display: inline-block; animation: spin .8s linear infinite; align-self: center; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

/* ---------- Status pills: neutral grey, beige with copper text for "waits for you" ---------- */
.badge { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 500; line-height: 1.35; background: var(--info-soft); color: var(--muted); border: 0; white-space: nowrap; }
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--info-soft); color: var(--info); }

.read { padding: 12px 14px; border-radius: 12px; background: var(--sunk); }
.read.variant-better { background: var(--good-soft); }
.read.variant-worse { background: var(--bad-soft); }
.read.no-clear-difference { background: var(--accent-soft); }

/* ---------- Buttons and fields ---------- */
/* Integration 3 walk: the hidden attribute always hides, even on elements given a display below (buttons, rows). */
[hidden] { display: none !important; }
button, .button { font: inherit; font-size: 14px; font-weight: 600; padding: 8px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--card); color: var(--fg); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; line-height: 1.35; }
button:hover, .button:hover { border-color: var(--fg); }
button.primary, .button.primary { background: var(--primary); color: var(--primary-fg); border-color: var(--primary); }
button.primary:hover, .button.primary:hover { background: #2c3843; border-color: #2c3843; }
button.danger { color: var(--bad); }
button.link { border: 0; background: none; color: var(--accent-ink); padding: 0; font-weight: 500; }
button.link:hover { color: var(--fg); text-decoration: underline; }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
input, select, textarea { font: inherit; color: var(--fg); background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 8px 11px; min-width: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--faint); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--accent-ink); }
input[type=range] { padding: 0; accent-color: var(--accent); }
textarea { width: 100%; resize: vertical; }
.field { display: grid; gap: 6px; }
.field .label { font-size: 13.5px; color: var(--fg); font-weight: 600; }
.field .hint { font-size: 12.5px; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; }
.check { display: flex; gap: 8px; align-items: center; }
.errors { color: var(--bad); margin: 0; padding-left: 18px; }

/* ---------- Tables: no boxes, no stripes, hairline rows ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 14px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
th { font-size: 13px; color: var(--muted); font-weight: 500; white-space: nowrap; padding-top: 6px; padding-bottom: 10px; }
td { font-size: 14.5px; }
td:first-child { white-space: nowrap; font-weight: 550; }
td .small, td .muted { font-weight: 400; }
td.num, th.num { text-align: right; }
tbody tr:last-child td { border-bottom: 0; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td, tr.selected td { background: var(--accent-soft); }

ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain > li { padding: 14px 0; border-bottom: 1px solid var(--line); }
ul.plain > li:last-child { border-bottom: 0; }

/* ---------- Charts: copper on a pale copper fill, no gridlines ---------- */
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 180px) 1fr auto; gap: 12px; align-items: center; }
.bar-track { height: 10px; background: var(--accent-soft); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--bar); border-radius: 999px; }
.chart { width: 100%; height: auto; display: block; max-height: 260px; }
.chart .b1 { fill: var(--bar-2); } .chart .b2 { fill: var(--bar); } .chart .a1 { fill: var(--bar-2); opacity: .6; } .chart .l2 { fill: none; stroke: var(--bar); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; } .chart .hit { fill: transparent; } .chart .axis { stroke: transparent; } .chart text { fill: var(--muted); font-size: 11px; }
.legend { display: flex; gap: 20px; font-size: 13.5px; color: var(--muted); margin-top: 10px; }
.legend > :last-child { color: var(--accent-ink); font-weight: 600; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; }

.tree a, .tree button.node { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 7px 10px; border-radius: 8px; color: var(--fg); font-weight: 500; }
.tree button.node:hover { background: var(--sunk); }
.tree button.node[aria-current=true] { background: var(--accent-pill); color: var(--accent-ink); font-weight: 600; }
.tree .page { font-weight: 650; margin-top: 10px; }
.tree .slots { padding-left: 10px; border-left: 1px solid var(--line); margin-left: 8px; }
.frame { width: 100%; height: 420px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }

.group { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: grid; gap: 8px; background: var(--card); }
.group .group { background: var(--sunk); }
.rule { display: grid; grid-template-columns: minmax(120px, 1.2fr) minmax(90px, .8fr) minmax(100px, 1.2fr) auto; gap: 6px; align-items: center; }
.rule input, .rule select { width: 100%; }

.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.shot { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--sunk); display: grid; }
.shot .cap { padding: 12px 14px; display: grid; gap: 4px; background: var(--card); border-bottom: 1px solid var(--line); }
.shot .imgs { display: grid; grid-template-columns: 3fr 1fr; gap: 8px; padding: 8px; align-items: start; }
.shot img { width: 100%; height: auto; display: block; border-radius: 6px; border: 1px solid var(--line); background: var(--card); }
.shot .ph { aspect-ratio: 3 / 4; display: grid; place-items: center; color: var(--muted); font-size: 12px; border: 1px dashed var(--line-strong); border-radius: 6px; text-align: center; padding: 6px; }
.shot .foot { padding: 10px 14px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; align-self: end; background: var(--card); border-top: 1px solid var(--line); }

dialog { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--fg); padding: 0; width: min(460px, calc(100vw - 32px)); box-shadow: 0 30px 80px -30px rgba(23, 33, 42, .45); }
dialog::backdrop { background: rgba(23, 33, 42, .32); }
dialog .card-head { padding-bottom: 4px; }
dialog form { padding: 16px 26px 24px; display: grid; gap: 14px; }

.toasts { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 8px; z-index: 20; }
.toast { padding: 12px 16px; border-radius: 12px; background: var(--navy); color: #fff; max-width: 380px; box-shadow: 0 12px 30px -12px rgba(23, 33, 42, .5); }
.toast.error { background: var(--bad); color: #fff; }

.site-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 24px; align-items: center; padding: 18px 0; }
.site-list li strong { font-size: 17px; }
.site-list li a strong { color: var(--fg); }
.site-list .stat { text-align: right; min-width: 90px; }
.site-list .stat b { display: block; font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Phone and narrow screens: the sidebar becomes a top bar with a scrolling row of sections ---------- */
@media (max-width: 900px) {
  body:not(.solo) { display: block; background: var(--bg); }
  .top { position: sticky; top: 0; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 16px 10px; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .top .brand { padding: 0; margin-right: auto; }
  .top .brand .mark { width: 24px; height: 24px; }
  .brand-name { font-size: 14.5px; }
  .side-label, .side-foot { display: none; }
  .top .crumb.switch { display: flex; align-items: center; gap: 6px; padding: 0; order: 3; flex-basis: 100%; }
  .top .crumb.switch select { width: auto; flex: 1; }
  .top #gib-logout { margin: 0; padding: 0; order: 2; }
  nav.tabs { order: 4; flex-basis: 100%; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 2px; }
  nav.tabs::-webkit-scrollbar { display: none; }
  nav.tabs a { font-size: 14.5px; padding: 7px 12px; gap: 8px; }
  nav.tabs a::before { width: 10px; height: 10px; border-radius: 3px; }
  main { padding: 28px 16px 56px; }
  #gib-sample-banner[data-sample] { padding: 12px 16px 0 !important; }
  h1 { font-size: 28px; }
  .site-head { margin-bottom: 22px; }
  .site-head .head-sub { font-size: 15px; }
}
@media (max-width: 760px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .panel { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .card-head { padding: 18px 18px 0; }
  .card > .body { padding: 14px 18px 20px; }
  .rule { grid-template-columns: 1fr 1fr; }
  .bar-row { grid-template-columns: 90px 1fr auto; }
  .site-list li { grid-template-columns: 1fr 1fr; }
  .site-list li > :first-child { grid-column: 1 / -1; }
  .site-list .stat { text-align: left; }
  #this-week .kpis { padding: 22px 20px; gap: 18px 16px; }
  #this-week .kpi .v { font-size: 30px; }
  body.solo > .top { padding-top: 28px; }
}

.line { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: baseline; }
.seg { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr) auto auto; gap: 6px 16px; align-items: center; }
.seg .rules { color: var(--muted); font-size: 12.5px; }
@media (max-width: 900px) { .seg { grid-template-columns: 1fr; } }

/* ---------- FX3: lead sentence, what needs you, wider previews, editors ---------- */
.lead { grid-column: 1 / -1; padding: 0 2px 4px; display: grid; gap: 12px; }
.lead-text { font-size: 18px; line-height: 1.5; margin: 0; max-width: 68ch; color: var(--fg); letter-spacing: -0.005em; }
.lead-actions { display: flex; gap: 8px 14px; flex-wrap: wrap; align-items: center; }
.lead-actions:empty { display: none; }

ul.todos { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.todo { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.todo:last-child { border-bottom: 0; }
.todo-action { margin-top: 4px; font-size: 13.5px; font-weight: 500; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--info); display: inline-block; }
.dot.good { background: var(--good); } .dot.warn { background: var(--accent); } .dot.bad { background: var(--bad); } .dot.info { background: var(--line-strong); }
.kpi .d { font-size: 12.5px; color: var(--muted); }
.kpi .d.up { color: var(--good); } .kpi .d.down { color: var(--bad); }

.stack.tight { gap: 4px; }
.note { padding: 12px 14px; border-radius: 12px; background: var(--sunk); border: 0; font-size: 13.5px; }
.note.warn { background: var(--warn-soft); border-color: transparent; color: var(--fg); }
.note.good { background: var(--good-soft); border-color: transparent; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px 16px; margin: 0; }
.facts div { display: grid; gap: 2px; }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
button.danger-fill { background: var(--bad); border-color: var(--bad); color: #fff; }
.dialog-body { padding: 16px 26px 24px; display: grid; gap: 12px; }
dialog.wide { width: min(960px, calc(100vw - 32px)); }
dialog.zoom { width: min(1200px, calc(100vw - 24px)); max-height: calc(100vh - 24px); }
dialog.zoom .zoom-body { overflow: auto; max-height: calc(100vh - 110px); padding: 10px; display: grid; gap: 12px; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); align-items: start; }
dialog.zoom img { width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: 8px; }
@media (max-width: 760px) { dialog.zoom .zoom-body { grid-template-columns: minmax(0, 1fr); } }

/* Idea previews: one proposal per row, desktop and phone side by side at readable sizes. */
.shots.big { grid-template-columns: minmax(0, 1fr); }
.shots.big .imgs { grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); max-height: 640px; overflow: auto; }
.shot .imgs figure { margin: 0; display: grid; gap: 4px; }
.shot .imgs figcaption { font-size: 12px; color: var(--muted); }
.shot .changed { padding: 12px 14px; display: grid; gap: 6px; background: var(--card); border-top: 1px solid var(--line); }
.shot .changed iframe { width: 100%; height: 240px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.stage { display: inline-flex; gap: 6px; align-items: center; }

/* Content editor: preview frame with a side panel. */
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.content-grid .frame { height: 70vh; min-height: 420px; }
.frame.phone { width: 390px; max-width: 100%; margin: 0 auto; display: block; }
.side { display: grid; gap: 12px; position: sticky; top: 24px; }
.link-row { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.seg-tabs { display: inline-flex; gap: 2px; padding: 3px; background: var(--sunk); border: 1px solid var(--line); border-radius: 12px; }
.seg-tabs button { border: 0; border-radius: 9px; background: none; font-weight: 500; padding: 6px 12px; }
.seg-tabs button[aria-pressed=true] { background: var(--accent-pill); color: var(--accent-ink); font-weight: 600; }

/* Funnel: product and form cards that never overlap. */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.item { border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: grid; gap: 10px; background: var(--card); min-width: 0; }
.item .grid2 { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.field-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(90px, .8fr) auto auto; gap: 6px; align-items: center; }
.step-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 6px; align-items: center; }

/* Personalisation as one block per slot, so it wraps at any width. */
.pgrid { display: grid; gap: 14px; }
.pgrid .slot-block { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: grid; gap: 8px; }
.pgrid .cells { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 8px 12px; }

@media (max-width: 900px) {
  .content-grid { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; }
  .shots.big .imgs { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .lead-text { font-size: 16px; }
  .field-row { grid-template-columns: 1fr 1fr; }
  .step-row { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: minmax(0, 1fr) auto; }
  .bar-row > .bar-track { grid-column: 1 / -1; grid-row: 2; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi .v { font-size: 24px; }
}

/* FX6 (Minor 20): on a phone, tables keep readable columns and scroll sideways inside their card. */
.table-wrap { max-width: 100%; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
@media (max-width: 760px) {
  .table-wrap { margin: 0 -18px; padding: 0 18px; background: linear-gradient(to left, var(--card) 0, transparent 24px) right / 24px 100% no-repeat local, linear-gradient(to left, rgba(0,0,0,.12), transparent) right / 10px 100% no-repeat scroll; }
  .table-wrap > table { min-width: 560px; }
  .table-wrap td { overflow-wrap: anywhere; }
  .field-row, .step-row { grid-template-columns: minmax(0, 1fr); }
}
.tabs a .badge { font-size: 11.5px; padding: 1px 7px; margin-left: auto; }
[data-insert-tools] .row { flex-wrap: wrap; }

/* ---------- FX9: owner editing, segments, phone tables, accessibility ---------- */
/* Minor 25: on a phone a table keeps its natural width and scrolls inside its card. Words wrap at spaces only, so an
   email address is never broken letter by letter. */
@media (max-width: 760px) {
  .table-wrap > table { width: max-content; min-width: 100%; }
  .table-wrap td { overflow-wrap: normal; word-break: normal; max-width: 15rem; }
  .table-wrap td a[href^="mailto:"], .table-wrap td.num { white-space: nowrap; }
  .table-wrap td select { min-width: 7rem; }
  .content-grid .frame { height: 60vh; min-height: 360px; }
  .seg { gap: 8px; }
  .seg > .row:last-child { gap: 6px; }
}
/* Hints and small print use the muted colour, which reads at 4.5:1 or better on cards in both themes. */
.field .hint, .kpi .s, .shot .ph { color: var(--muted); }
summary { cursor: pointer; }
summary:focus-visible, [tabindex]:focus-visible, .seg-tabs button:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: -2px; }
a.button { color: var(--fg); }
.cmp-words { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.cmp-words > div, .pre-words { background: var(--sunk); border-radius: 10px; padding: 10px 12px; font-size: 13px; overflow-wrap: anywhere; white-space: pre-line; margin: 0; }
.cmp-words b { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
[data-slot-lock] { line-height: 1.45; }
[data-slot-lock] button.link { white-space: normal; text-align: left; }
@media (max-width: 700px) { .cmp-words { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
[data-write-draft] select { flex: 1 1 14rem; max-width: 100%; min-width: 0; }
.field .label, .field .hint { overflow-wrap: anywhere; }
.field code { overflow-wrap: anywhere; word-break: break-word; }
.stack { grid-template-columns: minmax(0, 1fr); }
/* FX12 (review 4): long action labels in the lead wrap on a phone, the test estimate warns when slow,
   and the lasting "versions still say" notice on the Content tab. */
.lead-actions > * { min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; text-align: left; }
p.est-slow { background: var(--warn-soft); color: var(--fg); border-radius: 10px; padding: 8px 12px; }
.stale-versions { background: var(--warn-soft); border-radius: 12px; padding: 12px 14px; margin: 8px 0; display: grid; gap: 6px; }
.stale-versions ul { margin: 0; padding-left: 18px; }
.sentence-search { display: grid; gap: 8px; }
.sentence-search .hits { display: grid; gap: 6px; }
@media (max-width: 760px) { .sentence-search .row { flex-wrap: wrap; } }
/* Integration 7: the Reach tab in four parts, with a short menu in the top card. */
.reach-group { grid-column: 1 / -1; display: grid; gap: 16px; min-width: 0; scroll-margin-top: 24px; }
.reach-group-head { display: grid; gap: 4px; padding: 26px 2px 0; border-top: 1px solid var(--line); margin-top: 8px; }
.reach-group-head h2 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.015em; }
.reach-group-head p { margin: 0; color: var(--muted); }
.reach-group-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 22px; align-items: start; min-width: 0; }
.reach-group-grid > .wide { grid-column: 1 / -1; }
.reach-group-grid:empty { display: none; }
.reach-menu { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 0 0 10px; }
.reach-menu a { padding: 6px 14px; border: 0; border-radius: 999px; text-decoration: none; color: var(--fg); background: var(--sunk); font-weight: 500; }
.reach-menu a.current { background: var(--accent-pill); color: var(--accent-ink); font-weight: 600; }
@media (max-width: 760px) { .reach-group-grid { grid-template-columns: minmax(0, 1fr); } }
body.solo > #gib-sample-banner[data-sample] { max-width: 480px; margin: 0 auto; padding: 16px 24px 0 !important; }
body.solo.wide > #gib-sample-banner[data-sample] { max-width: 860px; }
body.solo .card .body > form + p, body.solo .card .body > p:last-child { margin: 16px 0 0; }

/* ---------- Full demo: the studio sidebar groups and the studio pages ---------- */
nav.tabs.studio .side-label { margin: 0 8px 4px; }
nav.tabs.studio .side-label ~ .side-label { margin-top: 18px; }
@media (max-width: 900px) { nav.tabs.studio .side-label { display: none; } }
.band-card { background: none; border: 0; box-shadow: none; }
.band-card > .card-head { padding: 0 0 12px; }
.band-card > .body { padding: 0; }
.band-card .kpis { background: var(--navy); color: var(--navy-fg); border-radius: var(--radius); padding: 30px 32px 28px; gap: 22px 32px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin-bottom: 12px; }
.band-card .kpi .v { color: var(--navy-fg); font-size: 40px; }
.band-card .kpi .k { color: #dfe3e7; }
.band-card .kpi .s, .band-card .kpi .d { color: var(--navy-muted); font-size: 12.5px; }
.band-card .kpi .d.up { color: #9fd3ae; } .band-card .kpi .d.down { color: #f2ab9c; }
.band-card .kpi[data-kpi="Leads"] .v, .band-card .kpi[data-kpi="Revenue"] .v { color: var(--navy-accent); }
.chart .dot { fill: var(--card); stroke: var(--bar); stroke-width: 2; }
.pills { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.studio-table td:first-child { white-space: normal; }
@media (max-width: 760px) {
  .band-card .kpis { padding: 22px 20px; gap: 18px 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .band-card .kpi .v { font-size: 28px; }
  .studio-table th:nth-child(n+4), .studio-table td:nth-child(n+4) { display: none; }
  #leads .studio-table th:nth-child(n+3), #leads .studio-table td:nth-child(n+3), #sales .studio-table th:nth-child(n+4), #sales .studio-table td:nth-child(n+4) { display: none; }
  #leads .studio-table th:last-child, #leads .studio-table td:last-child, #sales .studio-table th:last-child, #sales .studio-table td:last-child, #tests .studio-table th:last-child, #tests .studio-table td:last-child { display: table-cell; }
}
@media (max-width: 760px) { .table-wrap > table.studio-table { min-width: 0; width: 100%; } }

/* ---------- Clarity (24 Nov 2026): where am I, what is next ---------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 14px; color: var(--muted); margin: 0 0 14px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--fg); text-decoration: underline; }
.crumbs > span:last-child { color: var(--fg); font-weight: 500; }
.top .side-back { display: block; padding: 0 8px 16px; font-size: 14px; color: var(--muted); text-decoration: none; }
.top .side-back:hover { color: var(--fg); text-decoration: underline; }
nav.tabs[data-grouped] .side-label { margin: 0 8px 4px; }
nav.tabs[data-grouped] .side-label ~ .side-label { margin-top: 16px; }
/* The Overview's next step: one calm box at the top, the first thing to read. */
.panel[data-tab="overview"] > .lead { background: var(--accent-pill); border-radius: var(--radius); padding: 20px 24px; }
.panel[data-tab="overview"] > .lead::before { content: "Next step"; font-size: 13px; font-weight: 600; color: var(--accent-ink); }
/* Home: the next step list */
.next-list { list-style: none; margin: 0; padding: 0; display: grid; }
.next-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 18px; padding: 12px 0; border-top: 1px solid var(--line); }
.next-list li:first-child { border-top: 0; padding-top: 0; }
.next-list li.first span { font-size: 18px; color: var(--fg); }
.next-list li a { white-space: nowrap; font-weight: 500; }
a.badge { text-decoration: none; }
a.badge:hover { text-decoration: underline; }
@media (max-width: 900px) {
  .top .side-back { display: none; }
  .crumbs { font-size: 13px; margin-bottom: 10px; }
  .panel[data-tab="overview"] > .lead { padding: 16px 18px; }
}

/* ---------- Brand r12 (Cam, 29 Nov 2026: "this login needs the new branding") ----------
   The login, setup and reset pages. Tokens from the Camillo decks' brand r12, light mode:
   mist ground, ink text, deep blue the main accent, copper the one rare accent. Display type is Camillo Grotesk,
   body type is Instrument Sans. The rest of the admin keeps its own look until Cam asks. */
body.r12 > .top { padding-top: 56px; }
body.r12 .r12-brand { display: grid; gap: 14px; justify-items: start; }
body.r12 .r12-brand img { display: block; width: 168px; height: auto; }
body.r12 .r12-label { font: 500 12px/1.3 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .04em; color: var(--muted); }
h1, h2, .kpi .v { font-family: var(--display); font-weight: 460; letter-spacing: -0.02em; }
body.r12 h1 { font-size: 40px; }
body.r12 h1 em { font-style: normal; color: var(--accent); }
body.r12 .site-head { position: relative; padding-top: 18px; margin-bottom: 26px; }
body.r12 .site-head::before { content: ""; position: absolute; top: 0; left: 0; width: 44px; height: 2px; background: var(--accent); }
body.r12 .card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
body.r12 .card-head h2 { font-size: 19px; }
input[type=password], input[type=text], input[type=email], input[type=search], input[type=number], select, textarea { background: #fbfaf7; border-color: var(--line); border-radius: var(--radius-sm); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
button.primary { background: var(--primary); color: var(--primary-fg); border-radius: 999px; padding-inline: 22px; }
button.primary:hover { background: var(--accent); }
body.r12 a { color: var(--accent); }
body.r12 a:hover { color: var(--copper); }

/* Brand r12 lockup in the sidebar and top bar: the Camillo lockup image and the site or product as a small mono label. */
.top .brand.r12-side { display: grid; gap: 10px; justify-items: start; padding: 2px 8px 24px; }
.top .brand.r12-side img { display: block; width: 132px; height: auto; }
.top .brand.r12-side .r12-label { font: 500 11.5px/1.35 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .03em; color: var(--muted); overflow-wrap: anywhere; }

/* A figure a connected site's connectors cannot give: a quiet note in the tile, never a big number. */
.kpi .v.na, #this-week .kpi .v.na, .band-card .kpi .v.na { font: 500 15px/1.4 var(--font); letter-spacing: 0; color: var(--muted); padding: 10px 0 6px; }
#this-week .kpi .v.na, .band-card .kpi .v.na { color: var(--navy-muted); }
/* Rename a site: the inline form under the page header. */
.head-aside { display: flex; gap: 18px; align-items: baseline; }
.rename-form { display: grid; gap: 12px; padding: 18px 20px; margin: -14px 0 28px; max-width: 520px; }

/* Editing pages (2 Dec 2026): tablet preview, the floating text toolbar, section tools, the block library, site styles
   and the search result preview. */
.frame.tablet { width: 820px; max-width: 100%; margin: 0 auto; display: block; }
.text-toolbar { position: absolute; z-index: 60; display: grid; gap: 4px; padding: 4px; max-width: min(560px, calc(100vw - 8px)); background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); box-shadow: 0 8px 24px rgba(17, 21, 26, .18); }
.text-toolbar[hidden] { display: none; }
.text-toolbar .tb-row { display: flex; flex-wrap: wrap; gap: 2px; }
.text-toolbar button { min-width: 32px; min-height: 32px; padding: 2px 8px; font-size: 13px; }
.text-toolbar [data-tool="bold"] { font-weight: 700; }
.text-toolbar [data-tool="italic"] { font-style: italic; }
.text-toolbar .tb-link { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.text-toolbar .tb-link[hidden] { display: none; }
.text-toolbar .tb-link input { flex: 1 1 200px; min-width: 0; }
.section-tools { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px 10px; }
.section-tools .row .field { flex: 1 1 120px; }
.block-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin: 10px 0; }
.block-card { display: grid; gap: 4px; text-align: left; padding: 10px 12px; min-height: 84px; white-space: normal; }
.style-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 16px; align-items: end; margin: 8px 0; }
.style-colour { justify-content: space-between; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px 10px; }
.style-colour input[type=color] { width: 44px; height: 32px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: none; }
.seo-preview { max-width: 600px; padding: 12px 14px; margin: 8px 0 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: Arial, sans-serif; }
.seo-preview .seo-title { color: #1a0dab; font-size: 19px; line-height: 1.3; }
.seo-preview .seo-url { color: #006621; font-size: 13px; margin: 2px 0; overflow-wrap: anywhere; }
.seo-preview .seo-desc { color: #4d5156; font-size: 14px; line-height: 1.5; }
.seo-image { width: 120px; height: 63px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
@media (max-width: 640px) { .frame.tablet { width: 100%; } }
