/* Ad dashboard: artist screens (app.js) and office screens (admin.js).
   One typeface. A cool paper ground with white cards on it, one violet accent, and one dark panel per screen for what matters most. */

@font-face {
  font-family: "Commissioner";
  src: url("/fonts/commissioner-greek-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: "Commissioner";
  src: url("/fonts/commissioner-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- tokens ---------- */

:root {
  color-scheme: light dark;
  --bg: #f1f0f4;
  --surface: #ffffff;
  /* a quiet fill inside a card: a note, the other side's words, the head of a table */
  --soft: #f4f3f8;
  --ink: #16151b;
  --muted: #5d5a69;
  --faint: #8d8a99;
  --line: #e3e1ea;
  --line-strong: #cbc8d6;
  --rule: #16151b;
  --field-line: #8e8b99;
  --track: #e7e5ee;
  --fill: #16151b;
  --day-fill: #16151b;
  --on-day: #f4f3f8;
  --day-past: #e7e5ee;
  --accent: #4a3acb;
  --accent-fill: #4a3acb;
  --accent-soft: #eceafb;
  --on-accent: #ffffff;
  --ok: #1c7648;
  --ok-soft: #e4f3ea;
  --warn: #8f5300;
  --warn-soft: #faefd8;
  --bad: #b3261e;
  --bad-soft: #fbe8e6;
  --on-bad: #ffffff;
  /* the dark panel: the one place on a screen that says how things stand */
  --panel: #17161c;
  --panel-ink: #f4f3f8;
  --panel-muted: #b6b3c4;
  --panel-line: #312f3b;
  --panel-track: #383644;
  --panel-accent: #a9a1ff;
  --panel-ok: #7fd9a8;
  --panel-warn: #f0c27a;
  --panel-bad: #ff9a91;
  --toast-bg: #16151b;
  --toast-ink: #f4f3f8;
  --toast-line: #16151b;
  --here: var(--bg);
  --r: 10px;
  --r-s: 6px;
  --r-l: 16px;
  --gutter: 16px;
  --pad: 18px;
  --tabs-h: 60px;
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%235d5a69' stroke-width='1.5'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0d12;
    --surface: #18171e;
    --soft: #211f29;
    --ink: #edecf2;
    --muted: #a5a2b3;
    --faint: #74717f;
    --line: #2a2833;
    --line-strong: #3c3a48;
    --rule: #8f8c9b;
    --field-line: #7d7a8a;
    --track: #2c2a36;
    --fill: #edecf2;
    --day-fill: #6d6a79;
    --on-day: #ffffff;
    --day-past: #2c2a36;
    --accent: #aaa4f6;
    --accent-fill: #5f50e0;
    --accent-soft: #272347;
    --on-accent: #ffffff;
    --ok: #6fcf9b;
    --ok-soft: #15301f;
    --warn: #e9b25f;
    --warn-soft: #33260e;
    --bad: #ff8f85;
    --bad-soft: #3a1613;
    --on-bad: #2b0a07;
    --panel: #201e2e;
    --panel-ink: #f1f0f6;
    --panel-muted: #aeabc0;
    --panel-line: #35324a;
    --panel-track: #3a3752;
    --panel-accent: #b3adff;
    --toast-bg: #302e3a;
    --toast-ink: #edecf2;
    --toast-line: #7d7a8a;
    --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%23a5a2b3' stroke-width='1.5'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  }
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-bottom: calc(var(--tabs-h) + 96px);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/24px "Commissioner", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
h1, h2, h3, p, dl, dd, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1 { font-size: 26px; line-height: 32px; font-weight: 650; letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: 17px; line-height: 24px; font-weight: 650; letter-spacing: -0.005em; }
h3 { font-size: 16px; line-height: 24px; font-weight: 600; }
b, strong { font-weight: 600; }
em { font-style: normal; }
a { color: var(--accent); text-underline-offset: 3px; }
img, video { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[aria-busy="true"] { opacity: 0.6; }

/* ---------- helpers ---------- */

.small { font-size: 14px; line-height: 20px; }
.tiny { font-size: 12px; line-height: 16px; font-weight: 500; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.bad-text { color: var(--bad); }
.ok-text { color: var(--ok); }
.center { text-align: center; }
.cut { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* words typed with line breaks keep them */
.pre { white-space: pre-line; }

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

.shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--gutter) calc(var(--tabs-h) + 32px + env(safe-area-inset-bottom));
}

/* the bar on top: whose dashboard this is, and the way to one's own details */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding-top: env(safe-area-inset-top); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; min-height: 44px; color: var(--ink); font-weight: 650; letter-spacing: -0.01em; text-decoration: none; }
.brand > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the mark: a square of ink with the stencil's violet outline set on it a little off, as when a placement is being checked.
   The same two things run through the screens: a violet outline for what is planned, ink for what is done */
.brand-mark { position: relative; flex: none; width: 26px; height: 26px; }
.brand-mark::before { content: ""; position: absolute; right: 0; bottom: 0; width: 19px; height: 19px; border-radius: 6px; background: var(--ink); }
.brand-mark::after { content: ""; position: absolute; left: 0; top: 0; width: 19px; height: 19px; border: 2px solid var(--accent); border-radius: 6px; }
.tagline { margin-top: -10px; }
.me { flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin-right: -4px; border-radius: 50%; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 14px; line-height: 20px; font-weight: 650; }
.stack { display: grid; gap: 16px; align-content: start; }
.stack-s { display: grid; gap: 8px; align-content: start; }
.stack > *, .stack-s > * { min-width: 0; }
main.stack, main.stack > form.stack { gap: 16px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.between { justify-content: space-between; }
.grow { flex: 1 1 0; min-width: 0; }
/* a thumbnail beside its text */
.media { display: flex; align-items: center; gap: 12px; min-width: 0; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* page head: greeting or back link, title, one line of context */
.head { display: grid; gap: 4px; padding: 4px 2px 6px; }
.head > * { min-width: 0; }
.eyebrow { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--muted); }
.lede { color: var(--muted); }
.why { margin-top: 4px; }
.head-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.head-row.inline { justify-content: flex-start; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; justify-self: start; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--muted); text-decoration: none; }

/* a section: a white card on the paper */
.card { --here: var(--surface); padding: var(--pad); border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); }
a.card { display: grid; color: inherit; text-decoration: none; }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.sec-head > h2 { overflow-wrap: normal; }
.sec-head .meta { font-size: 14px; line-height: 20px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sec-head .sub { flex: 0 0 100%; }
.sub { font-size: 14px; line-height: 20px; color: var(--muted); }

/* folding section */
details.card > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; margin-bottom: 0; font-size: 17px; line-height: 24px; font-weight: 650; letter-spacing: -0.005em; cursor: pointer; list-style: none; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::after { content: ""; flex: none; width: 9px; height: 9px; margin: 0 4px 4px 0; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); }
details.card[open] > summary::after { margin-bottom: -4px; transform: rotate(225deg); }
details.card { padding-block: 6px; }
details.card[open] { padding-bottom: var(--pad); }
details.card[open] > summary { margin-bottom: 12px; }

/* a form that stays folded until asked for */
details.fold > summary { list-style: none; cursor: pointer; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold[open] > summary { margin-bottom: 12px; }

/* ---------- buttons and links ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 8px 20px;
  border: 1px solid var(--accent-fill); border-radius: var(--r);
  background: var(--accent-fill); color: var(--on-accent);
  font-weight: 600; text-align: center; text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.btn.ghost { border-color: var(--line-strong); background: var(--surface); color: var(--ink); }
.btn.line { border-color: var(--accent); background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.btn.danger { border-color: var(--line-strong); background: var(--surface); color: var(--bad); }
.btn.s { min-height: 44px; padding: 6px 16px; font-size: 14px; line-height: 20px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: default; }

.link, .quiet {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0;
  border: 0; background: none; color: var(--accent); font-weight: 500;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
  -webkit-tap-highlight-color: transparent;
}
.quiet { color: var(--muted); text-decoration: none; }
/* a link that may be cut with an ellipsis keeps its 44px height through padding */
.link.cut, .quiet.cut { display: block; min-height: 0; padding-block: 10px; }
.quiet.danger { color: var(--bad); }
/* a file name with no spaces still wraps inside its column */
a.link { overflow-wrap: anywhere; }

/* a full-width row that goes somewhere */
.rowlink { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; color: var(--ink); font-weight: 600; text-decoration: none; }
.rowlink svg { flex: none; color: var(--muted); }
/* in a list: the things only the artist can do, each a row to its tab */
.list > .rowlink { padding-block: 10px; border-top: 1px solid var(--line); font-weight: 500; }
.list > .rowlink:first-child { border-top: 0; }
/* a step of the start list: what it is, one line on where it stands, its state as a word */
.step > .grow { display: grid; gap: 2px; }
.step small { font-size: 14px; line-height: 20px; font-weight: 400; color: var(--muted); }
/* a section a link leads to stands clear of the top edge */
[id^="sec-"] { scroll-margin-top: 16px; }

/* ---------- fields ---------- */

.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-size: 14px; line-height: 20px; font-weight: 500; }
.field > em { font-size: 14px; line-height: 20px; color: var(--muted); }
input, select, textarea {
  width: 100%; min-width: 0; min-height: 48px; padding: 11px 14px;
  border: 1px solid var(--field-line); border-radius: var(--r);
  background: var(--surface); color: var(--ink);
  font-size: max(16px, 1rem); line-height: 24px;
}
input, select { height: 48px; }
textarea { display: block; min-height: 96px; resize: vertical; }
select { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: var(--chev); background-repeat: no-repeat; background-position: right 14px center; }
input[type="date"] { appearance: none; -webkit-appearance: none; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input[readonly] { background: transparent; color: var(--muted); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
/* the calendar button inside a date field is a tab stop of its own; the field keeps its ring there too */
input[type="date"]:focus-within { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
input[type="date"]::-webkit-calendar-picker-indicator { outline-color: var(--accent); }
select { text-overflow: ellipsis; }
input[type="checkbox"], input[type="radio"] { flex: none; width: 22px; height: 22px; min-height: 0; margin: 0; padding: 0; accent-color: var(--accent-fill); }
input[type="file"] { height: auto; padding: 9px 10px; }
input[type="file"]::file-selector-button { margin-right: 12px; padding: 4px 12px; border: 1px solid var(--field-line); border-radius: var(--r-s); background: transparent; color: var(--ink); font: inherit; font-weight: 600; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; align-items: end; }
.check { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.checks { display: flex; flex-wrap: wrap; gap: 0 24px; }
/* a country picker with nothing chosen yet: no empty row above its select, yet still there for screen readers to announce the first box added */
.checks:empty { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.copy { display: flex; gap: 8px; }
.copy input { flex: 1 1 0; }

/* choose one of a few: buttons with aria-pressed, or radios followed by a span */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; }
.seg label { position: relative; display: block; }
.seg input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.seg button, .seg span {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; padding: 4px 8px;
  border: 1px solid var(--field-line); border-radius: var(--r); background: transparent; color: var(--muted);
  font-size: 14px; line-height: 20px; font-weight: 500; text-align: center;
}
.seg button[aria-pressed="true"], .seg input:checked + span { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent); font-weight: 600; }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- lists, tables, facts ---------- */

.list { display: grid; }
.list > * { min-width: 0; }
.item { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 0; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; }
.list.ruled > .item:first-child { border-top: 1px solid var(--line); }
.item > :not(.btn):not(button) { padding-block: 6px; }
.item.col { display: grid; gap: 12px; padding: 16px 0; }
.item.col > *, .item.col > :not(.btn):not(button) { padding-block: 0; min-width: 0; }
/* a row that ends in a quiet way to change it */
.item.col > details.fold, .item.col > .req-more { margin-block: -8px -10px; }
.item > .val { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.empty { padding: 4px 0 8px; color: var(--muted); }

.scroll-x { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table th { padding: 0 12px 8px 0; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--muted); text-align: left; white-space: nowrap; }
.table td { height: 48px; padding: 8px 12px 8px 0; border-top: 1px solid var(--line); vertical-align: middle; }
.table th:last-child, .table td:last-child { padding-right: 0; }
.table .r { text-align: right; }
.table tfoot td { border-top: 1px solid var(--rule); font-weight: 600; }
/* a text button in a cell keeps its 44px target and reaches into the cell's padding, so the row stays 48px */
.table td .link, .table td .quiet { margin-block: -6px; }

dl.facts { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
dl.facts > dt, dl.facts > dd { padding: 12px 0; border-top: 1px solid var(--line); }
dl.facts > dt:first-of-type, dl.facts > dt:first-of-type + dd { border-top: 0; padding-top: 0; }
dl.facts > dt { padding-right: 16px; color: var(--muted); }
dl.facts > dd { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
dl.facts.text { grid-template-columns: 132px minmax(0, 1fr); }
dl.facts.text > dd { font-weight: 500; text-align: left; }
.facts-title { margin-top: 8px; font-size: 14px; line-height: 20px; font-weight: 600; }

/* ---------- figures ---------- */

.huge { font-size: 64px; line-height: 60px; font-weight: 600; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.big { font-size: 44px; line-height: 48px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.fig { font-size: 32px; line-height: 36px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.figline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; }
.figline > span { color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 20px; }
.stat { display: grid; align-content: start; min-width: 0; padding: 0 12px 0 16px; border-left: 1px solid var(--line); }
.stat > b { font-size: clamp(20px, 6.4vw, 24px); line-height: 28px; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat > span { font-size: 14px; line-height: 20px; color: var(--muted); }
.stat > small { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.stats > .stat:nth-child(2n + 1) { padding-left: 0; border-left: 0; }
.stats.three { grid-template-columns: repeat(3, minmax(min-content, 1fr)); }
.stats.three > .stat:nth-child(n) { padding: 0 0 0 14px; border-left: 1px solid var(--line); }
.stats.three > .stat:nth-child(3n + 1) { padding-left: 0; border-left: 0; }
.stats.lead > .stat > b { font-size: 32px; line-height: 36px; letter-spacing: -0.02em; }
.stats.minor > .stat > b { font-size: 18px; line-height: 24px; letter-spacing: 0; }

/* ---------- bars ---------- */

.meter, .progress { display: block; overflow: hidden; background: var(--track); box-shadow: inset 0 0 0 1px var(--line-strong); }
.meter { height: 8px; border-radius: 4px; }
.progress { height: 4px; border-radius: 2px; }
.meter > i, .progress > i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--fill); }

/* a meter with marks on its scale; mount() places .mark from data-x */
.gauge { position: relative; display: block; padding: 4px 0 24px; }
.gauge.bare { padding-bottom: 4px; }
/* a target on the scale is a guide line, drawn as a stencil is: violet and broken */
.mark { position: absolute; top: -2px; left: 0; width: 0; height: 20px; margin-left: -1px; border-left: 2px dashed var(--accent); }
.mark > span { position: absolute; top: 20px; right: -1px; font-size: 12px; line-height: 16px; font-weight: 500; font-style: normal; color: var(--muted); white-space: nowrap; }
.mark.start > span { right: auto; left: -1px; }
/* two marks: on a phone their labels sit in a row under the bar, from 560px under each mark */
.gauge.two { padding-bottom: 4px; }
.gauge.two .mark > span { display: none; }
.gauge-keys { display: flex; justify-content: space-between; gap: 12px; margin-top: 2px; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- status words, notes ---------- */

/* a word with a marker; the marker's shape, not its colour, tells the state */
.st, .pill { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; line-height: 20px; font-weight: 500; white-space: nowrap; }
.st::before, .pill::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.st.paused::before { width: 8px; height: 10px; border-radius: 0; border-left: 3px solid currentColor; border-right: 3px solid currentColor; background: none; }
.st.setup::before, .st.wait::before { width: 10px; height: 10px; border: 1.5px dashed currentColor; background: none; }
.st.wait::before { border-style: solid; }
.st.wrap { display: flex; align-items: flex-start; white-space: normal; }
.st.wrap::before { margin-top: 6px; }
.st.bad, .pill.bad { color: var(--bad); }
.st.ok::before, .pill.ok::before { background: var(--ok); }
.st.new::before, .pill.accent::before { background: var(--accent); }
.st.warn::before, .pill.warn::before { background: var(--warn); }
.count { font-variant-numeric: tabular-nums; }

/* the large marker above the status sentence */
.state::before { content: ""; display: block; width: 14px; height: 14px; margin-bottom: 14px; border-radius: 50%; background: currentColor; }
.state.paused::before { width: 14px; height: 16px; border-radius: 0; border-left: 5px solid currentColor; border-right: 5px solid currentColor; background: none; }
.state.setup::before { width: 16px; height: 16px; border: 2px dashed currentColor; background: none; }

.note { padding: 12px 14px; border-radius: var(--r); background: var(--soft); }
.note.warn { background: var(--warn-soft); }
.note.ok { background: var(--ok-soft); }
.note.bad { background: var(--bad-soft); color: var(--bad); }
/* on the paper itself, outside any card, a note is a card of its own */
main > .note, .login > .note { border: 1px solid var(--line); background: var(--surface); }
main > .note.warn, .login > .note.warn { border-color: transparent; background: var(--warn-soft); }
.note > .tiny { display: block; margin-bottom: 2px; }

/* ---------- status panel: the one dark surface on a screen ---------- */

/* inside it every colour is its panel counterpart, so whatever stands in it reads on the dark ground without rules of its own */
.status {
  --ink: var(--panel-ink); --muted: var(--panel-muted); --faint: var(--panel-muted); --line: var(--panel-line); --line-strong: var(--panel-line);
  --track: var(--panel-track); --fill: var(--panel-accent); --accent: var(--panel-accent); --here: var(--panel);
  --ok: var(--panel-ok); --warn: var(--panel-warn); --bad: var(--panel-bad);
  display: grid; border-radius: 20px; background: var(--panel); color: var(--panel-ink);
}
.status > * { min-width: 0; padding: 20px; border-top: 1px solid var(--line); }
.status .meter { box-shadow: none; }
/* ads that run carry the one green dot of the screen */
.status .state:not(.paused):not(.setup)::before { background: var(--ok); }
.status > :first-child { border-top: 0; }
.status-top { display: grid; gap: 6px; }
.status-top .why { margin-top: 6px; }
.status-fig { display: grid; gap: 14px; }
.fullness { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.fullness > .figline { display: grid; gap: 4px; }
.fullness .counts { flex: none; display: grid; gap: 2px; font-size: 14px; line-height: 20px; color: var(--muted); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fullness .counts b { color: var(--ink); }
.status > .rowlink { padding-block: 0; }
.status > .stats { row-gap: 20px; }
.decision { font-size: 22px; line-height: 28px; font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; }

/* ---------- the road to ads that run ---------- */

/* five stops in a row: the ones behind are inked, the one the artist is at is violet, the ones ahead are a stencil outline */
.track { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.track li { display: grid; justify-items: center; gap: 6px; min-width: 0; font-size: 12px; line-height: 16px; font-weight: 550; color: var(--muted); text-align: center; }
.track li > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track i { width: 16px; height: 16px; border: 2px dashed var(--accent); border-radius: 50%; }
.track .done { color: var(--ink); }
.track .done i { border: 0; background: var(--ink); }
.track .now { color: var(--accent); font-weight: 650; }
.track .now i { border: 0; background: var(--accent-fill); box-shadow: 0 0 0 4px var(--accent-soft); }

/* ---------- the ad as it will be seen ---------- */

.adprev { max-width: 400px; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.adprev-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.adprev-head .avatar { flex: none; width: 32px; height: 32px; font-size: 12px; line-height: 16px; }
.adprev-who { display: grid; min-width: 0; }
.adprev-who b { overflow: hidden; font-size: 14px; line-height: 18px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.adprev-who small { font-size: 12px; line-height: 16px; color: var(--muted); }
.adprev-shots { display: flex; gap: 2px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; background: var(--track); }
.adprev-shots::-webkit-scrollbar { display: none; }
.adprev-shots a { flex: 0 0 100%; aspect-ratio: 4 / 5; scroll-snap-align: start; }
/* with more than one, the next photo shows at the edge, so it is plain there is more to the side */
.adprev-shots.many a { flex-basis: 86%; }
.adprev-shots img { display: block; width: 100%; height: 100%; object-fit: cover; }
.adprev-cta { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 20px; font-weight: 650; color: var(--accent); }
.adprev-text { padding: 10px 12px 12px; font-size: 14px; line-height: 20px; }

/* what became of an approved plan at Meta: its state, its figures, a hand on it */
.run { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.run > .grow { min-width: 0; flex: 1 1 200px; }
.run-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.run-box { display: grid; gap: 8px; padding: 12px; border-radius: var(--r); background: var(--soft); }
table.plain { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
table.plain th, table.plain td { padding: 6px 8px 6px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
table.plain th { font-weight: 550; color: var(--muted); }
table.plain td.n, table.plain th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-right: 0; }

/* steps to follow, in order */
ol.steps { margin: 0; padding-left: 22px; display: grid; gap: 6px; font-size: 15px; line-height: 22px; }

/* the office picks the photos of a proposal */
fieldset.field { margin: 0; padding: 0; border: 0; }
fieldset.field > legend { padding: 0; margin-bottom: 6px; font-size: 14px; line-height: 20px; font-weight: 500; }
.picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; }
.picks.shown { grid-template-columns: repeat(auto-fill, 64px); }
.pick { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: 8px; background: var(--track); cursor: pointer; }
.pick img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pick input { position: absolute; top: 6px; left: 6px; z-index: 1; width: 20px; height: 20px; margin: 0; accent-color: var(--accent-fill); }
.pick:has(input:checked) { outline: 3px solid var(--accent); outline-offset: -3px; }
.pick:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: -3px; }

/* ---------- requests ---------- */

.req { display: grid; gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); }
.req:first-child, .sec-head + .req { border-top: 0; padding-top: 0; }
.req:last-child { padding-bottom: 0; }
.req-text { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.req-acts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.req-acts > .btn { padding-inline: 8px; }
.req-more { display: flex; flex-wrap: wrap; align-items: center; gap: 0 20px; }
/* a folded "change" at the start of the line opens under it and pushes the other actions down */
.req-more > details.fold[open] { flex-basis: 100%; margin-bottom: 12px; }
/* a plan that waits for the artist's yes stands in a stencil outline: nothing is inked before it is approved */
.req.stencil, .req.stencil:first-child, .sec-head + .req.stencil { margin-block: 4px 12px; padding: 14px; border: 1.5px dashed var(--accent); border-radius: var(--r); }
.req.stencil + .req { border-top: 0; }

/* ---------- conversation ---------- */

/* the newest messages, oldest first, in a box that scrolls by itself; one's own words stand on the right, the other side's on the left */
.chat { display: grid; gap: 10px; align-content: start; max-height: 420px; overflow-y: auto; overscroll-behavior: contain; padding: 2px 4px 2px 0; }
.msg { display: grid; gap: 4px; justify-self: start; min-width: 0; max-width: min(88%, 520px); padding: 10px 14px; border-radius: 16px 16px 16px 6px; background: var(--soft); }
.msg.mine { justify-self: end; border-radius: 16px 16px 6px 16px; background: var(--accent-soft); }
.msg b { color: var(--accent); }
/* its own scroll stays out of the way, and from a wider screen the button stands beside the box one writes in */
.chat { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
form[data-form="chat"] textarea { min-height: 56px; }
@media (min-width: 560px) {
  form[data-form="chat"] { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
}

/* ---------- where customers came from ---------- */

.src { display: grid; grid-template-columns: minmax(0, 1fr) 96px 28px; align-items: center; gap: 12px; min-height: 40px; border-top: 1px solid var(--line); }
.src:first-child { border-top: 0; }
.src > b { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- calendar ---------- */

.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-head { padding-bottom: 2px; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--muted); text-align: center; }
.day {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 48px; min-width: 0; padding: 0; border: 1px solid transparent; border-radius: var(--r);
  background: none; color: var(--ink);
  font-size: 16px; line-height: 20px; font-weight: 500; font-variant-numeric: tabular-nums;
  -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
}
.day small { display: block; font-size: 12px; line-height: 12px; font-weight: 500; }
.day.free { border: 2px solid var(--accent); background: var(--surface); color: var(--accent); }
.day.booked { background: var(--day-fill); color: var(--on-day); }
.day.off { border: 1px dashed var(--field-line); color: var(--muted); }
.day.today { font-weight: 600; }
.day.today::before { content: ""; position: absolute; top: 5px; left: 50%; width: 14px; height: 2px; margin-left: -7px; border-radius: 1px; background: currentColor; }
.day.past { color: var(--faint); cursor: default; }
.day.past.free { border-color: var(--line); background: none; }
.day.past.booked { background: var(--day-past); color: var(--muted); }
.day.past.off { border-color: var(--line); }
button.day:disabled { cursor: default; }
/* a month at a time: its name between two arrows; on a phone a sideways swipe turns it, so only up-and-down scrolling is left to the browser there */
.cal-box { display: grid; gap: 8px; }
.cal-nav { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 8px; }
.cal-nav h3 { text-align: center; }
.cal-step {
  display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--line); border-radius: var(--r); background: none; color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}
.cal-step:disabled { border-color: transparent; color: var(--faint); cursor: default; }
#cal-grid { touch-action: pan-y; }
.day.blank { visibility: hidden; }
.cal.compact { max-width: 420px; }
.cal.compact .day { height: 40px; font-size: 14px; }
.cal.compact .day small { display: none; }
.cal.compact .day.today::before { top: 4px; }

.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 14px; line-height: 20px; color: var(--muted); }
.legend > span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { position: relative; flex: none; width: 18px; height: 18px; border-radius: 5px; }
.legend i.free { border: 2px solid var(--accent); background: var(--surface); }
.legend i.booked { background: var(--day-fill); }
.legend i.off { border: 1px dashed var(--field-line); }
.legend i.today { border: 1px solid var(--line); }
.legend i.today::before { content: ""; position: absolute; top: 3px; left: 50%; width: 8px; height: 2px; margin-left: -4px; border-radius: 1px; background: var(--ink); }

.confirm { display: grid; gap: 8px; }
#days-status { text-align: center; }

.weekdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.weekdays button {
  min-height: 48px; padding: 0; border: 1px dashed var(--field-line); border-radius: var(--r);
  background: none; color: var(--muted); font-size: 14px; line-height: 20px; font-weight: 500;
  -webkit-tap-highlight-color: transparent;
}
.weekdays button[aria-pressed="true"] { border: 2px solid var(--accent); background: var(--surface); color: var(--accent); font-weight: 600; }

/* free dates written out, beside the office calendar */
.dates { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 4px 16px; font-size: 14px; line-height: 20px; font-variant-numeric: tabular-nums; }

/* ---------- files ---------- */

.files { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
.file { position: relative; display: grid; gap: 6px; align-content: start; min-width: 0; }
.file > a { position: relative; display: flex; align-items: center; align-items: safe center; justify-content: center; aspect-ratio: 1; overflow: hidden; padding: 40px 12px; border-radius: var(--r); background: var(--track); color: var(--ink); font-size: 14px; line-height: 20px; text-align: center; text-decoration: none; overflow-wrap: anywhere; }
.file > a > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.file > .st, .file > .pill { align-items: flex-start; white-space: normal; }
.file > .st::before, .file > .pill::before { margin-top: 6px; }
.file > button { position: absolute; top: 0; right: 0; z-index: 0; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; background: none; color: var(--ink); font-size: 18px; line-height: 1; }
.file > button::before { content: ""; position: absolute; inset: 8px; z-index: -1; border: 1px solid var(--field-line); border-radius: 50%; background: var(--surface); }
.thumb { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: var(--r); background: var(--track); object-fit: cover; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--muted); }

/* office: files to look at, large enough to judge */
.reviews { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 32px 20px; }
.review { display: grid; gap: 12px; align-content: start; min-width: 0; }
.review > .preview { display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--r); background: var(--track); color: var(--muted); font-weight: 600; text-decoration: none; }
.review > .preview > img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- tabs ---------- */

/* on a phone a bar at the bottom, each tab its sign over its name; the one that is open is in the accent */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; justify-content: space-around;
  padding: 0 max(4px, env(safe-area-inset-left)) env(safe-area-inset-bottom) max(4px, env(safe-area-inset-right));
  border-top: 1px solid var(--line); background: var(--surface);
}
.tabs a {
  position: relative; flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-width: 0; min-height: var(--tabs-h); padding: 6px 2px;
  color: var(--muted); font-size: 12px; line-height: 14px; font-weight: 550;
  text-decoration: none; white-space: nowrap; -webkit-tap-highlight-color: transparent;
}
.tabs a > span:not(.sr-only):not(.count) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.tabs a[aria-current="page"] { color: var(--accent); font-weight: 650; }
.ico { flex: none; display: block; }
/* something waits behind the tab: a dot or a number at the corner of its sign */
.tabs .dot { position: absolute; top: 9px; left: calc(50% + 7px); box-sizing: content-box; width: 8px; height: 8px; border: 2px solid var(--surface); border-radius: 50%; background: var(--accent-fill); }
.tabs .count { position: absolute; top: 5px; left: calc(50% + 5px); min-width: 18px; height: 18px; padding: 0 5px; border: 2px solid var(--surface); box-sizing: content-box; border-radius: 11px; background: var(--accent-fill); color: var(--on-accent); font-size: 11px; line-height: 18px; font-weight: 650; text-align: center; }

/* ---------- messages that come and go ---------- */

.toast {
  position: fixed; left: 16px; right: 16px; bottom: calc(var(--tabs-h) + 12px + env(safe-area-inset-bottom)); z-index: 30;
  max-width: 440px; margin: 0 auto; padding: 12px 16px;
  border: 1px solid var(--toast-line); border-radius: 12px;
  background: var(--toast-bg); color: var(--toast-ink);
  font-size: 14px; line-height: 20px; font-weight: 500; text-align: center;
  pointer-events: none;
}
.toast.bad { border-color: var(--bad); background: var(--bad); color: var(--on-bad); }

.savebar {
  position: sticky; bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom)); z-index: 10;
  display: flex; align-items: center; gap: 12px;
  margin: 0 calc(var(--gutter) * -1); padding: 12px var(--gutter);
  border-top: 1px solid var(--line); background: var(--bg);
}
.savebar > .btn { flex: 1 1 0; }

dialog.sheet { width: min(100% - 32px, 420px); padding: 24px; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); color: var(--ink); }
dialog.sheet::backdrop { background: rgb(0 0 0 / 0.5); }

/* ---------- login ---------- */

.login { display: grid; align-content: center; gap: 16px; max-width: 420px; min-height: 100vh; min-height: 100dvh; margin: 0 auto; padding: 32px var(--gutter); }
.login > h1 + p { margin-top: -8px; }
.login > .brand { justify-self: start; margin-bottom: 8px; }
.login form { margin-top: 8px; padding: var(--pad); border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); }
main.login.stack, main.login.stack > form.stack { gap: 16px; }
p.login { text-align: center; }

/* ---------- office ---------- */

.office > .head { margin-bottom: 16px; }
/* one artist in the office: who they are, then the four numbers that say where they stand, then the tabs */
.avatar.big { flex: none; width: 52px; height: 52px; font-size: 18px; line-height: 24px; }
.office > .head > .media { align-items: center; gap: 14px; }
.office > .key { margin-bottom: 16px; }
.split { display: grid; gap: 16px; align-content: start; }
.split > * { min-width: 0; }
.split > .stack { gap: 16px; }
.sched { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px 40px; align-items: start; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; align-items: end; }
.form-row > * { grid-column: 1 / -1; }
.form-row > .half { grid-column: auto; }

/* every artist a row of one card */
.roster { overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); }
.roster-head { display: none; }
.roster-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 14px var(--pad); border-top: 1px solid var(--line); color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.roster-head + .roster-row, .roster-row:first-child { border-top: 0; }
.who { display: grid; min-width: 0; }
.who > b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who > small { display: none; }
.roster-row > .st { justify-self: end; align-self: start; padding-top: 2px; }
.figs { grid-column: 1 / -1; font-size: 14px; line-height: 20px; color: var(--muted); font-variant-numeric: tabular-nums; }
.figs.none, .figs .cell.spend, .figs .gauge { display: none; }
.figs .cell + .cell::before { content: " · "; color: var(--muted); }
.figs .cell > b { color: var(--ink); font-weight: 600; }
.figs .cell > b.bad-text { color: var(--bad); }
.figs .cell > small { display: none; }
.todo { grid-column: 1 / -1; font-size: 14px; line-height: 20px; color: var(--muted); }
.todo > b { color: var(--ink); }
.todo.act::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 8px 2px 0; border-radius: 50%; background: var(--accent); }

/* ---------- layout: jumps within a long form, and two things side by side ---------- */

/* the sections of the details form: on a phone a row that scrolls sideways and stays in reach while the form scrolls under it */
.jump { position: sticky; top: 0; z-index: 5; display: flex; gap: 8px; overflow-x: auto; margin: 0 calc(var(--gutter) * -1); padding: 8px var(--gutter); background: var(--bg); scrollbar-width: none; }
.jump::-webkit-scrollbar { display: none; }
.jump a { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 22px; background: var(--surface); color: var(--ink); font-size: 14px; line-height: 20px; font-weight: 550; text-decoration: none; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
.view-profile [id^="sec-"] { scroll-margin-top: 72px; }
.duo { display: grid; gap: 16px; align-items: start; }
.duo > * { min-width: 0; }

/* ---------- narrow phones ---------- */

@media (max-width: 359px) {
  .stats.three > .stat:nth-child(n) { padding-left: 10px; }
  .stats.three > .stat:nth-child(3n + 1) { padding-left: 0; }
  .stats.three > .stat > span { font-size: 13px; }
  :root { --gutter: 12px; --pad: 14px; }
  h1 { font-size: 24px; line-height: 30px; }
  .huge { font-size: 56px; line-height: 54px; }
  .cal, .weekdays { gap: 3px; }
  .status > * { padding: 16px; }
  .status > .rowlink { padding-block: 0; }
  dl.facts.text { grid-template-columns: 112px minmax(0, 1fr); }
  /* a table of four columns still fits: headings may take two lines, cells sit closer */
  .table th { white-space: normal; }
  .table th, .table td { padding-right: 8px; }
}

/* a table that folds into rows on a phone: td[data-l] carries its own label */
@media (max-width: 559px) {
  .table.fold thead { display: none; }
  .table.fold tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 2px 12px; padding: 12px 0; border-top: 1px solid var(--line); }
  .table.fold tbody tr:first-child { border-top: 0; padding-top: 0; }
  .table.fold td { height: auto; padding: 0; border: 0; }
  .table.fold td, .table.fold td.r { text-align: left; }
  .table.fold td:nth-child(even) { text-align: right; }
  .table.fold td[data-l]::before { content: attr(data-l) " "; color: var(--muted); font-weight: 400; }
  .table.fold td.full { grid-column: 1 / -1; }
  .table.fold td .link, .table.fold td .quiet { margin-block: 0; }
  /* two buttons side by side that do not fit become two full rows */
  .row > .btn { flex: 1 1 auto; }
}

/* while typing on a phone the tab bar steps aside; without :has() it simply stays.
   Both come back a moment after the field loses focus, so a press that moved focus to a button
   (save, send) is released on that same button instead of on a tab that reappeared under the finger. */
@supports selector(:has(*)) {
  @media (max-width: 799px) {
    .tabs { transition: visibility 0s linear 400ms; }
    .savebar { transition: bottom 0s linear 400ms; }
    body:has(input:not([type="checkbox"], [type="radio"], [type="file"]):focus, textarea:focus) .tabs { visibility: hidden; transition: none; }
    body:has(input:not([type="checkbox"], [type="radio"], [type="file"]):focus, textarea:focus) .savebar { bottom: 0; transition: none; }
    /* the message after a save stands above the save bar, not over its button */
    body:has(.savebar) .toast { bottom: calc(var(--tabs-h) + 85px + env(safe-area-inset-bottom)); }
  }
}

@media (min-width: 560px) {
  .stats.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stats.four > .stat:nth-child(n) { padding-left: 16px; border-left: 1px solid var(--line); }
  .stats.four > .stat:nth-child(4n + 1) { padding-left: 0; border-left: 0; }
  .files { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .src { grid-template-columns: minmax(0, 1fr) 200px 28px; }
  .req-acts { grid-template-columns: repeat(2, max-content); }
  .req-acts > .btn { padding-inline: 20px; }
  .confirm { grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 16px; }
  .gauge.two { padding-bottom: 24px; }
  .gauge.two .mark > span { display: block; }
  .gauge.two + .gauge-keys { display: none; }
  #days-status { text-align: left; }
}

/* ---------- wide screens: tabs become a strip under the head ---------- */

@media (min-width: 800px) {
  html { scroll-padding-bottom: 96px; }
  :root { --gutter: 32px; --pad: 22px; }
  .shell { padding: 8px var(--gutter) 80px; }
  .shell.office { max-width: 1240px; padding: 8px 40px 96px; }
  .bar { min-height: 64px; }
  /* the tabs: a strip under the bar, each sign beside its name */
  .tabs { position: static; justify-content: flex-start; gap: 4px; margin: 0 0 24px; padding: 0; border-top: 0; border-bottom: 1px solid var(--line); background: none; }
  .tabs a { flex: none; flex-direction: row; gap: 8px; min-height: 48px; padding: 0 14px 0 12px; font-size: 15px; line-height: 24px; }
  .tabs a:first-child { margin-left: -12px; }
  .tabs .ico { width: 18px; height: 18px; }
  .tabs a[aria-current="page"] { color: var(--ink); }
  .tabs a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 14px; bottom: -1px; height: 2px; border-radius: 1px; background: var(--accent); }
  .tabs .dot { position: static; border: 0; }
  .tabs .count { position: static; border: 0; min-width: 20px; height: 20px; line-height: 20px; }
  .office > .head { margin-bottom: 12px; }
  /* the tabs of an artist stay in reach while the tab under them scrolls */
  .office > .tabs { position: sticky; top: 0; z-index: 6; background: var(--bg); }
  .day { height: 52px; }
  .cal.compact .day { height: 40px; }
  .toast { bottom: 24px; }
  .savebar { position: static; margin: 0; padding: 0; border-top: 0; background: none; }
  .savebar > .btn { flex: none; }
  .office .btn.wide, .savebar > .btn.wide { width: auto; min-width: 200px; justify-self: start; }
  .form-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .form-row > * { grid-column: span 2; }
  .form-row > .half { grid-column: span 1; }
  .form-row > .btn { grid-column: 1 / -1; }
  /* forms and columns of sentences keep a readable measure on a wide screen */
  .split > *, .office .measure { max-width: 760px; }
}

@media (min-width: 900px) {
  .roster-head, .roster-row { display: grid; grid-template-columns: minmax(0, 1.2fr) 148px 150px 132px 104px minmax(0, 1.5fr); column-gap: 24px; align-items: center; }
  .roster-head { padding: 12px var(--pad); background: var(--soft); font-size: 12px; line-height: 16px; font-weight: 550; color: var(--muted); }
  .roster-head > .r { text-align: right; }
  .roster-row { gap: 0 24px; padding: 12px var(--pad); min-height: 68px; }
  .roster-head + .roster-row { border-top: 1px solid var(--line); }
  .who > small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; line-height: 20px; color: var(--muted); }
  .roster-row > .st { justify-self: start; align-self: center; padding-top: 0; }
  .figs, .figs.none { display: contents; }
  .figs .cell, .figs .cell.spend { display: block; grid-column: auto; font-size: 16px; line-height: 24px; color: var(--ink); }
  .figs .cell + .cell::before { content: none; }
  .figs .cell .w { display: none; }
  .figs .cell.full { display: flex; align-items: center; gap: 12px; }
  .figs .cell.full > b { min-width: 44px; }
  .figs .gauge { display: block; flex: 1 1 0; max-width: 84px; padding: 4px 0; }
  .figs .gauge .meter { height: 6px; }
  .figs .gauge .mark { height: 14px; }
  .figs .cell.cost, .figs .cell.spend { text-align: right; }
  .figs .cell > small { display: block; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--muted); }
  .todo { grid-column: auto; }
}

/* ---------- a wide screen: the artist's screens in two columns ---------- */

@media (min-width: 1000px) {
  .shell { max-width: 1120px; }
  .duo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  main.view-home, main.view-days, main.view-bookings, main.view-files { grid-template-columns: minmax(0, 1fr) 380px; column-gap: 20px; }
  main.view-home > *, main.view-days > *, main.view-bookings > *, main.view-files > * { grid-column: 1; }
  main.view-days > .head, main.view-bookings > .head, main.view-files > .head { grid-column: 1 / -1; }
  /* home: the conversation, the report and the note stay beside whatever is scrolled */
  main.view-home > .side { grid-column: 2; grid-row: 1 / span 8; align-self: start; position: sticky; top: 16px; }
  /* days: the calendar on the left, the usual week and the guest spots beside it */
  main.view-days > .card:first-of-type { grid-row: 2 / span 3; }
  main.view-days > .card:nth-of-type(n + 2) { grid-column: 2; }
  /* bookings and material: the form stays beside the list it adds to */
  main.view-bookings > .card:first-of-type, main.view-files > .card:first-of-type { grid-column: 2; grid-row: 2 / span 8; align-self: start; position: sticky; top: 16px; }
  /* details: the jumps become a list on the left */
  main.view-profile { grid-template-columns: 220px minmax(0, 1fr); column-gap: 24px; }
  main.view-profile > * { grid-column: 2; }
  main.view-profile > .head { grid-column: 1 / -1; }
  main.view-profile > .jump { grid-column: 1; grid-row: 2 / span 4; align-self: start; top: 16px; flex-direction: column; gap: 2px; margin: 0; padding: 0; overflow: visible; background: none; }
  main.view-profile > .jump a { border-color: transparent; border-radius: var(--r); background: none; white-space: normal; }
  .view-profile [id^="sec-"] { scroll-margin-top: 16px; }
}

/* until the page is wide enough, the fixed columns give up some room so names and the to-do sentence stay readable */
@media (min-width: 900px) and (max-width: 1239px) {
  .roster-head, .roster-row { grid-template-columns: minmax(0, 1.2fr) 132px 120px 116px 96px minmax(0, 1.5fr); column-gap: 16px; }
}

@media (min-width: 1100px) {
  .split { grid-template-columns: minmax(0, 1fr) 380px; gap: 16px 20px; }
  .split > * { max-width: none; }
  /* what comes first on a phone can stand on the right here */
  .split.flip > :first-child { grid-column: 2; grid-row: 1; }
  .split.flip > :nth-child(2) { grid-column: 1; grid-row: 1; }
  .split > .savebar { grid-column: 1; }
}

/* ---------- pointer and motion ---------- */

@media (hover: hover) {
  .btn:hover:not(:disabled) { opacity: 0.88; }
  .btn.ghost:hover:not(:disabled), .btn.danger:hover:not(:disabled) { opacity: 1; border-color: var(--ink); }
  .link:hover { text-decoration-thickness: 2px; }
  .quiet:hover, .back:hover, .tabs a:hover { color: var(--ink); }
  .rowlink:hover svg { color: var(--ink); }
  .roster-row:hover { background: var(--soft); }
  .me:hover .avatar { background: var(--accent-fill); color: var(--on-accent); }
  button.day:not(:disabled):hover, .weekdays button:hover, .seg button:hover { opacity: 0.8; }
  .cal-step:not(:disabled):hover { border-color: var(--ink); }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, .link, .quiet, .tabs a, .day, .weekdays button, .seg button { transition: opacity 120ms ease-out, transform 120ms ease-out; }
  .btn:active:not(:disabled), button.day:active:not(:disabled), .weekdays button:active { transform: scale(0.97); }
  .toast { animation: toast-in 160ms ease-out; }
  @keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
  .cal-in.next { animation: cal-next 160ms ease-out; }
  .cal-in.prev { animation: cal-prev 160ms ease-out; }
  @keyframes cal-next { from { opacity: 0; transform: translateX(10px); } }
  @keyframes cal-prev { from { opacity: 0; transform: translateX(-10px); } }
}

@media print {
  .tabs, .toast, .savebar, .btn, .link, .quiet, form { display: none !important; }
  .shell, .shell.office { max-width: none; padding: 0; }
}
