#sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font-family);
  font-size: var(--font-sm);
  line-height: var(--line-body);
  color: var(--text);
  background: var(--bg);
  font-variant-numeric: tabular-nums;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
a { color: var(--blueprint); }
:focus-visible {
  outline: var(--focus-width) solid var(--focus-ring, var(--blueprint));
  outline-offset: var(--focus-offset);
}
.skip {
  position: absolute;
  left: var(--space-16);
  top: -80px;
  z-index: 60;
}
.skip:focus { top: var(--space-8); background: var(--surface); color: var(--blueprint); padding: var(--space-8) var(--space-16); border-radius: var(--radius-button); box-shadow: var(--shadow-float); }

.icon { width: 20px; height: 20px; flex: none; }
.icon.sm { width: 16px; height: 16px; }
.row { display: flex; align-items: center; gap: var(--space-8); }
.spread { display: flex; justify-content: space-between; align-items: center; gap: var(--space-12); }
.stack { display: flex; flex-direction: column; gap: var(--space-12); }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
h1, .h1 { font-size: var(--font-xl); line-height: var(--line-heading); font-weight: 700; letter-spacing: -0.02em; }
h2, .h2 { font-size: var(--font-lg); line-height: var(--line-heading); font-weight: 650; letter-spacing: -0.015em; }
.prose { max-width: 72ch; }

.workspace { min-height: 100vh; display: grid; grid-template-columns: 248px 1fr; }
.workspace.rail { grid-template-columns: 72px 1fr; }
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  box-shadow: var(--shadow-rest);
  padding: var(--space-16) var(--space-12);
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
  min-height: 100vh;
  position: sticky;
  top: 0;
  z-index: 2;
}
.brand { display: flex; align-items: center; gap: var(--space-8); font-weight: 700; font-size: var(--font-md); color: var(--text); background: none; border: 0; padding: 0; letter-spacing: -0.02em; }
.brand-mark { width: 28px; height: 28px; border-radius: 7px; display: block; }
.nav-group { display: flex; flex-direction: column; gap: var(--space-4); }
.nav-label { color: var(--muted); font-size: var(--font-xs); font-weight: 600; padding: var(--space-8) var(--space-8) var(--space-4); }
.nav-item {
  display: flex; align-items: center; gap: var(--space-12);
  width: 100%; text-align: left; border: 0; background: transparent;
  color: var(--text); border-radius: var(--radius-input); padding: 10px var(--space-8);
  min-height: 44px; position: relative;
}
.nav-item:hover { background: color-mix(in srgb, var(--sky) 12%, transparent); }
.nav-item.active { color: var(--blueprint); background: color-mix(in srgb, var(--sky) 18%, var(--surface)); }
.nav-item.active::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--sky);
}
.nav-item .count {
  margin-left: auto; background: var(--sky); color: var(--night); border-radius: 99px;
  min-width: 22px; padding: 0 6px; font-size: var(--font-xs); text-align: center;
}
.dot { width: 8px; height: 8px; border-radius: 99px; background: var(--amber); }
.meter { margin-top: auto; display: flex; flex-direction: column; gap: var(--space-8); }
.meter progress { width: 100%; height: 8px; accent-color: var(--blueprint); }
.rail .nav-label, .rail .nav-item span, .rail .meter span, .rail .brand span, .rail .count { display: none; }
.main-col { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  display: grid; grid-template-columns: 1fr minmax(220px, 420px) auto;
  gap: var(--space-16); align-items: center;
  padding: var(--space-12) var(--space-24);
  background: var(--surface); border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-rest);
  position: sticky; top: 0; z-index: 5;
}
.content { padding: var(--space-24); position: relative; flex: 1; }
.content::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.4;
  background-image:
    radial-gradient(circle at 90% 0%, color-mix(in srgb, var(--sky) 30%, transparent), transparent 36%),
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: auto, 24px 24px, 24px 24px;
}
.content > * { position: relative; }
.menu-btn { display: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-8);
  min-height: 44px; padding: 0 var(--space-16); border-radius: var(--radius-button);
  border: 1px solid transparent; background: var(--primary); color: var(--on-primary); font-weight: 600;
  text-decoration: none;
}
.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn.ghost { background: transparent; color: var(--blueprint); }
.btn.danger { background: var(--bad); color: var(--on-bad); }
.btn.money { background: var(--amber); color: var(--light-ink); }
.btn.icon { width: 44px; padding: 0; background: transparent; color: var(--text); border-color: transparent; }
.btn:hover { filter: brightness(1.05); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.loading { color: transparent; position: relative; }
.btn.loading::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.8s linear infinite;
  color: var(--on-primary);
}
/* Spec 041: Apple's and Google's sign-in buttons as their guidelines draw them. The sign-in screen is always light
   (.auth sets color-scheme: light), so these are the light variants: Apple black with the white mark, Google white with
   the #747775 stroke and the four-colour G. Same size, Apple first. */
.btn.apple, .btn.google {
  width: 100%; min-height: 48px; padding: 0 var(--space-16); gap: 10px; border-radius: 8px; border-width: 1px;
  font-family: Roboto, system-ui, -apple-system, "Segoe UI", sans-serif; font-weight: 500; font-size: 16px; letter-spacing: 0.25px;
}
.btn.apple .icon { width: 16px; height: 20px; }
.btn.google .icon { width: 20px; height: 20px; }
.btn.apple { background: var(--brand-apple-black); color: var(--brand-apple-white); border-color: var(--brand-apple-black); }
.btn.google { background: var(--brand-google-light-fill); color: var(--brand-google-light-text); border-color: var(--brand-google-light-stroke); }
.btn.apple:hover, .btn.google:hover { filter: none; }
.btn.google:hover { background: color-mix(in srgb, var(--brand-google-light-text) 8%, var(--brand-google-light-fill)); }
.btn.apple:hover { background: #1F1F1F; }

.field { display: flex; flex-direction: column; gap: var(--space-4); text-align: left; }
.field span { font-size: var(--font-sm); }
.control, .area {
  width: 100%; min-height: 44px; border-radius: var(--radius-input);
  border: 1px solid var(--line); background: var(--surface); padding: 0 var(--space-12);
}
.area { min-height: 96px; padding: var(--space-12); resize: vertical; }
.control-wrap { position: relative; }
.control-wrap .btn.icon { position: absolute; right: 0; top: 0; }
.choice { display: flex; align-items: center; gap: var(--space-8); min-height: 44px; }
.choice-check { display: flex; align-items: center; }
.choice-copy { line-height: 1.35; }
.terms-link { color: var(--blueprint); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.segmented { display: flex; border: 1px solid var(--line); border-radius: var(--radius-input); overflow: hidden; }
.segmented button { flex: 1; min-height: 44px; border: 0; background: transparent; }
.segmented button[aria-pressed="true"] { background: color-mix(in srgb, var(--sky) 25%, var(--surface)); color: var(--blueprint); }
/* Spec 079: the Plans section: the tier switch (radios), the rows, and the bar that stays in view while it scrolls. */
.segmented button[aria-checked="true"] { background: color-mix(in srgb, var(--sky) 25%, var(--surface)); color: var(--blueprint); font-weight: 600; }
.plan-row { display: flex; justify-content: space-between; align-items: center; gap: var(--space-12); min-height: 44px; padding: var(--space-12); border: 1px solid var(--line); border-radius: var(--radius-input); background: var(--surface); color: inherit; text-align: start; }
.plan-row.on { border: 2px solid var(--blueprint); }
.plans-bar { position: sticky; bottom: 0; background: var(--surface); padding-block: var(--space-12); border-top: 1px solid var(--line); }
.plans-bar .small { font-size: 0.8125rem; }
.plans-bar .links { display: flex; gap: var(--space-12); }
/* Spec 006 and 042: the selected mode is a raised tab on a tinted track. */
.auth-modes { width: 100%; padding: var(--space-4); gap: var(--space-4); background: var(--mist); border-radius: var(--radius-button); }
.auth-modes button { min-height: 44px; border-radius: 7px; font-weight: 600; color: var(--muted); }
.auth-modes button:hover { color: var(--text); }
.auth-modes button[aria-pressed="true"] { background: var(--surface); color: var(--blueprint); box-shadow: 0 0 0 1px var(--line), var(--shadow-rest); }
.menu, .sheet, .modal, .palette {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sheet);
  box-shadow: var(--shadow-float);
}
.menu { position: absolute; min-width: 220px; padding: var(--space-8); z-index: 20; }
.menu button, .palette button { width: 100%; text-align: left; background: none; border: 0; min-height: 44px; border-radius: var(--radius-input); padding: 0 var(--space-12); }
.menu button:hover, .palette button:hover, .menu button[aria-selected="true"] { background: color-mix(in srgb, var(--sky) 16%, transparent); }
.popover-wrap { position: relative; }
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-panel); padding: var(--space-16);
  box-shadow: var(--shadow-rest);
}
.kpi { text-align: left; width: 100%; box-shadow: var(--shadow-raised); }
.kpi strong { display: block; font-size: var(--font-2xl); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.pill, .badge {
  display: inline-flex; align-items: center; gap: 6px; border-radius: 99px;
  padding: 2px 8px; font-size: var(--font-xs); border: 1px solid var(--line); background: var(--surface);
}
.badge.voice { color: var(--channel-voice); }
.badge.whatsapp { color: var(--channel-whatsapp); }
.badge.sms { color: var(--channel-sms); }
.badge.web { color: var(--channel-web); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--sky) 22%, var(--surface)); color: var(--text); font-weight: 600;
}
.table-wrap { overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-panel); box-shadow: var(--shadow-rest); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th button { background: none; border: 0; font-weight: 600; padding: 0; }
tr.selected { background: color-mix(in srgb, var(--sky) 12%, transparent); }
.list-row {
  display: grid; grid-template-columns: 12px 1fr auto; gap: var(--space-8);
  width: 100%; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--line);
  padding: var(--space-12); min-height: 64px;
}
.list-row.active { background: color-mix(in srgb, var(--sky) 14%, var(--surface)); }
.unread-dot { width: 8px; height: 8px; border-radius: 50%; background: transparent; margin-top: 6px; }
.list-row.unread .unread-dot { background: var(--sky); }
.bubble { max-width: 70%; padding: var(--space-12); border-radius: var(--radius-panel); }
.bubble.agent { background: color-mix(in srgb, var(--sky) 16%, var(--surface)); color: var(--text); }
.bubble.customer { background: var(--surface); border: 1px solid var(--line); margin-left: auto; }
.bubble.owner { background: var(--primary); color: var(--on-primary); }
.system { text-align: center; color: var(--muted); font-size: var(--font-xs); }
.audio { display: flex; align-items: center; gap: var(--space-8); }
.audio input { flex: 1; }
.inbox {
  display: grid; grid-template-columns: 320px 1fr 300px; min-height: calc(100vh - 92px);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-panel); overflow: hidden;
  box-shadow: var(--shadow-raised);
}
.inbox > * { min-width: 0; border-right: 1px solid var(--line); }
.inbox > :last-child { border-right: 0; }
.thread, .details { padding: var(--space-16); display: flex; flex-direction: column; gap: var(--space-12); }
.composer { display: flex; gap: var(--space-8); margin-top: auto; }
.dash { display: grid; grid-template-columns: 1fr 360px; gap: var(--space-16); }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-12); }
.chart { display: flex; align-items: end; gap: 4px; height: 160px; }
.chart i { display: block; flex: 1; background: var(--sky); border-radius: 4px 4px 0 0; min-height: 4px; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: var(--space-8); }
.day { min-height: 220px; box-shadow: var(--shadow-rest); }
.block { border-radius: var(--radius-input); padding: var(--space-8); margin-bottom: var(--space-8); background: color-mix(in srgb, var(--sky) 25%, var(--surface)); }
.block.travel {
  background: repeating-linear-gradient(-45deg, transparent, transparent 4px, var(--grid-line) 4px, var(--grid-line) 8px);
  color: var(--muted);
}
.channels { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-12); }
.studio { display: grid; grid-template-columns: minmax(0, 720px) 1fr; gap: var(--space-16); align-items: start; }
.sticky-bar {
  position: sticky; bottom: var(--space-16); display: flex; justify-content: space-between; align-items: center;
  gap: var(--space-12); padding: var(--space-12) var(--space-16); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-panel); box-shadow: var(--shadow-float);
}
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-16); }
/* The quote preview is paper in every appearance; the account card (spec 041 and 042) is light so
   Apple's and Google's buttons keep their light variants on a dark page. */
.paper-preview { min-height: 420px; box-shadow: var(--shadow-raised); background: var(--paper); color: var(--ink); }
.auth {
  color-scheme: light;
}
.auth, .paper-preview {
  color: var(--light-ink);
  --bg: var(--light-mist);
  --surface: var(--light-paper);
  --text: var(--light-ink);
  --muted: var(--light-slate);
  --line: var(--light-hairline);
  --grid-line: var(--light-grid);
  --blueprint: var(--light-blueprint);
  --ink: var(--light-ink);
  --paper: var(--light-paper);
  --mist: var(--light-mist);
  --ok: var(--light-success);
  --bad: var(--light-danger);
  --warn: var(--light-warning);
  --primary: var(--light-blueprint);
  --on-primary: var(--light-paper);
  --on-bad: var(--light-paper);
}
.langs { display: flex; gap: var(--space-12); justify-content: center; }
.langs button { background: none; border: 0; color: var(--blueprint); min-height: 44px; }
.error { color: var(--bad); }
.banner { border: 1px solid var(--bad); color: var(--bad); border-radius: var(--radius-panel); padding: var(--space-12); }
.empty { text-align: center; padding: var(--space-48) var(--space-16); display: flex; flex-direction: column; gap: var(--space-12); align-items: center; }
.drop { border: 1px dashed var(--line); border-radius: var(--radius-panel); padding: var(--space-32); text-align: center; }
.stepper { display: flex; gap: var(--space-8); }
.stepper span { padding: 6px 10px; border-radius: 99px; border: 1px solid var(--line); }
.stepper .now { background: var(--primary); color: var(--on-primary); }
.sheet-host, .modal-host { position: fixed; inset: 0; background: rgba(11, 37, 69, 0.35); display: grid; z-index: 30; }
.sheet-host { justify-content: end; }
.sheet { width: min(420px, 100%); height: 100%; border-radius: 0; padding: var(--space-24); overflow: auto; }
.modal-host { place-items: center; padding: var(--space-16); }
.modal { width: min(480px, 100%); padding: var(--space-24); }
.palette { width: min(560px, 100%); padding: var(--space-12); }
.toasts { position: fixed; right: var(--space-16); bottom: var(--space-16); display: flex; flex-direction: column; gap: var(--space-8); z-index: 40; }
.toast { background: var(--text); color: var(--surface); padding: var(--space-12) var(--space-16); border-radius: var(--radius-panel); box-shadow: var(--shadow-float); }
.gallery { display: flex; flex-direction: column; gap: var(--space-24); }
.gallery section { display: flex; flex-wrap: wrap; gap: var(--space-12); align-items: center; }
.scrim-note { font-size: var(--font-xs); color: var(--muted); }

@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .btn.loading::after { animation: none; }
}

/* Spec 054: a screen's or a panel's skeleton while its first read is out (js/skeleton.js). Bones are the hairline
   tone on the page's surfaces; a lighter tone sweeps across them, mixed from the appearance's own colours (a browser
   without color-mix keeps plain bones). Reduced motion: still bones, and content that appears without fading. */
:root { --sk-shine: color-mix(in srgb, var(--line), var(--surface) 70%); }
:root[data-theme="dark"] { --sk-shine: color-mix(in srgb, var(--line), var(--muted) 25%); }
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] { --sk-shine: color-mix(in srgb, var(--line), var(--muted) 25%); }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sk-shapes { display: flex; flex-direction: column; gap: var(--space-12); }
.sk-bone {
  display: block; background-color: var(--line); border-radius: 6px;
  background-image: linear-gradient(90deg, transparent 30%, var(--sk-shine) 50%, transparent 70%);
  background-size: 300% 100%; background-repeat: no-repeat;
  animation: sk-sweep 1.5s linear infinite;
}
@keyframes sk-sweep { from { background-position: 100% 0; } to { background-position: 0% 0; } }
.sk-line { height: 12px; border-radius: 6px; }
.sk-line.sk-small { height: 10px; border-radius: 5px; }
.sk-line.sk-head { height: 16px; border-radius: 8px; }
.sk-line.sk-title { height: 26px; border-radius: 8px; }
.sk-w-30 { width: 30%; }
.sk-w-45 { width: 45%; }
.sk-w-60 { width: 60%; }
.sk-w-70 { width: 70%; }
.sk-w-80 { width: 80%; }
.sk-w-90 { width: 90%; }
.sk-row { display: grid; grid-template-columns: 12px 1fr 32px; gap: var(--space-8); align-items: center; padding: var(--space-12); min-height: 64px; border-bottom: 1px solid var(--line); }
.sk-col { display: flex; flex-direction: column; gap: var(--space-8); }
.sk-dot { width: 10px; height: 10px; border-radius: 50%; }
.sk-num { width: 28px; height: 12px; }
.sk-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-panel); padding: var(--space-16);
  box-shadow: var(--shadow-rest); display: flex; flex-direction: column; gap: var(--space-12);
}
.sk-figure { width: 40%; height: 32px; border-radius: 8px; }
.sk-field { display: flex; flex-direction: column; gap: var(--space-8); }
.sk-input { height: 44px; border-radius: var(--radius-input); }
.sk-input.sk-tall { height: 96px; }
.sk-button { height: 44px; width: min(220px, 100%); border-radius: var(--radius-button); }
.sk-bubble { display: flex; }
.sk-bubble.sk-end { justify-content: flex-end; }
.sk-bubble-bone { width: 62%; height: 52px; border-radius: var(--radius-panel); }
.sk-bar { display: flex; flex-wrap: wrap; gap: var(--space-8); padding: var(--space-12); }
.sk-chip { width: 88px; height: 36px; border-radius: var(--radius-button); }
.sk-search { width: min(320px, 100%); height: 40px; border-radius: var(--radius-input); }
.sk-table { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-panel); box-shadow: var(--shadow-rest); overflow: hidden; }
.sk-tr { display: grid; grid-template-columns: 2fr 2fr 1fr 1fr; gap: var(--space-16); padding: var(--space-16); border-bottom: 1px solid var(--line); }
.sk-day { min-height: 220px; }
.sk-block { height: 40px; border-radius: var(--radius-input); }
.sk-chart { height: 180px; border-radius: var(--radius-input); }
.reveal { animation: sk-reveal 240ms ease-out; }
@keyframes sk-reveal { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .sk-bone { animation: none; background-image: none; }
  .reveal { animation: none; }
}

@media (max-width: 1023px) {
  .workspace { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(280px, 86vw); z-index: 25; transform: translateX(-105%); }
  .sidebar.open { transform: none; }
  .menu-btn { display: inline-flex; }
  .dash, .studio, .split, .channels, .inbox { grid-template-columns: 1fr; }
  .inbox > :nth-child(3) { display: none; }
  .inbox.detail > :first-child { display: none; }
  .inbox.detail > :nth-child(3) { display: block; }
  .kpis, .week { grid-template-columns: 1fr 1fr; }
  .topbar { grid-template-columns: auto 1fr auto; padding: var(--space-12); }
}
@media (max-width: 700px) {
  .kpis, .week, .channels { grid-template-columns: 1fr; }
  .topbar { grid-template-columns: auto 1fr; }
  .top-actions { grid-column: 1 / -1; }
}

/* Spacing helpers. Markup may not carry inline style attributes: the site CSP blocks them. */
.text-center { text-align: center; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.p-12 { padding: 12px; }
.max-720 { max-width: 720px; }
.w-240 { width: 240px; }

/* Customer pages (quote, invoice, booking, photos; spec 027). They follow the system theme through
   the tokens, unlike the owner sign-in screen, which stays light. */
.public { min-height: 100vh; display: grid; justify-items: center; align-content: start; padding: var(--space-32) var(--space-16); background: var(--bg); color: var(--text); }
.public-card {
  width: min(560px, 100%); display: flex; flex-direction: column; gap: var(--space-12);
  background: var(--surface); color: var(--text); border: 1px solid var(--line);
  border-radius: var(--radius-panel); padding: var(--space-24); box-shadow: var(--shadow-rest);
  overflow-wrap: anywhere;
}
.public-card .langs a { min-height: 44px; display: inline-flex; align-items: center; }
.lines { width: 100%; border-collapse: collapse; }
.lines th, .lines td { text-align: left; padding: var(--space-8) 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.lines .num { text-align: right; padding-left: var(--space-12); white-space: nowrap; }
.total { border-top: 2px solid var(--line); padding-top: var(--space-12); }
/* The booking form's honeypot (spec 028): off screen for people, still in the form for bots. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.week-nav { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8); margin-bottom: var(--space-12); }
.week-nav .label { font-weight: 600; margin-inline: var(--space-8); }
.day.today h2 { color: var(--blueprint); }

/* Spec 032: the money screens and the customer's drawn signature. */
.row.wrap { flex-wrap: wrap; }
tr.flag td { background: var(--warning-soft, rgba(240, 180, 41, 0.12)); }
.signature { width: 100%; max-width: 400px; height: auto; color: var(--text); }
.signature path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.signature-pad { width: 100%; max-width: 400px; aspect-ratio: 400 / 150; border: 1px dashed var(--line); border-radius: var(--radius-control, 8px); background: var(--surface); color: var(--text); touch-action: none; }

/* Spec 033: the open lead's pictures, the bell's alerts and the open overview figure. */
.photos { display: flex; flex-wrap: wrap; gap: var(--space-8); }
.photos img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--radius-input); border: 1px solid var(--line); }
.top-actions .menu { right: 0; width: min(320px, calc(100vw - 32px)); }
.menu .notification { height: auto; min-height: 44px; padding: var(--space-8) var(--space-12); line-height: 1.35; }
.menu .notification.unread strong::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-inline-end: var(--space-8); border-radius: 50%; background: var(--sky); }
.modal-host .modal.stack { max-height: 80vh; overflow-y: auto; }
.block[data-action="open-visit"] { cursor: pointer; }
.thread [role="status"] { margin: var(--space-8) 0; }
/* The figures' label and note each take a line; five figures share the row on a wide screen. */
.kpi span { display: block; }
.kpis:has(> :nth-child(5)) { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.back-btn { display: none; }
@media (max-width: 1023px) { .inbox.detail .back-btn { display: inline-flex; } }

/* Spec 034: on a phone the search button keeps only its icon, so a long Spanish title fits. */
@media (max-width: 700px) {
  .topbar > .btn.secondary > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .topbar h1 { overflow-wrap: anywhere; }
}

/* Spec 042: the workspace in both appearances. */
.topbar .btn { white-space: nowrap; }
.panel > h2:not(:last-child) { margin-bottom: var(--space-12); }
.panel > p:not(:first-child) { margin-top: var(--space-8); }
.control:hover { border-color: color-mix(in srgb, var(--blueprint) 40%, var(--line)); }
.control:focus { border-color: var(--blueprint); }
.choice input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--blueprint); }
.error:empty { display: none; }
.notice { padding: var(--space-12); border-radius: var(--radius-input); background: color-mix(in srgb, var(--sky) 14%, var(--surface)); }

/* Spec 042: the public site. One gutter and width for the bar, the sections and the footer. */
.site {
  --site-max: 1200px;
  --site-gutter: clamp(16px, 4vw, 32px);
  min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text);
}
.site > main { flex: 1; }
.site-bar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-bar-inner {
  max-width: var(--site-max); margin: 0 auto; min-height: 64px;
  padding: var(--space-8) var(--site-gutter);
  display: flex; align-items: center; gap: var(--space-16);
}
.site .brand { text-decoration: none; }
.site-brand { font-size: var(--font-lg); }
.site-brand .brand-mark { width: 32px; height: 32px; border-radius: 8px; }
/* The trademark sign beside the name (owner 2026-10-20: ™ until the USPTO registers the mark). */
/* Drawn in the gap after the name, so it never widens the bar (a phone's German or French header is full). */
.site-brand > span { position: relative; }
.site-brand .tm { position: absolute; left: 100%; top: 0.5em; margin-left: 1px; font-size: 0.45em; font-weight: 500; line-height: 1; }
.site-links { display: flex; gap: var(--space-4); }
.site-links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-12);
  border-radius: var(--radius-input); color: var(--text); text-decoration: none; font-weight: 500;
}
.site-links a:hover { background: color-mix(in srgb, var(--sky) 14%, transparent); }
.site-tools { margin-left: auto; display: flex; align-items: center; gap: var(--space-4); }
/* Spec 054: the compact language list: the page's language name, with the native select laid over it (clear, but
   focusable and read by screen readers as "Language"), so a phone opens its own picker. */
.lang-picker { position: relative; color: var(--text); font-weight: 500; padding: 0 var(--space-12); }
.lang-picker .lang-select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.lang-picker:focus-within { outline: var(--focus-width) solid var(--focus-ring, var(--blueprint)); outline-offset: var(--focus-offset); }
.menu .lang-picker { width: 100%; justify-content: flex-start; min-height: 44px; }
.site-cta { margin-left: var(--space-8); }
/* Spec 063: while sign-ups are closed, a band under the bar says new accounts open soon. */
.soon-banner {
  background: color-mix(in srgb, var(--amber) 18%, var(--surface));
  border-bottom: 1px solid color-mix(in srgb, var(--amber) 45%, var(--line));
  color: var(--text);
}
.soon-inner {
  max-width: var(--site-max); margin: 0 auto; padding: var(--space-12) var(--site-gutter);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-4) var(--space-8);
  text-align: center;
}
.soon-inner .icon { flex: none; }

/* The hero and the closing band share the brand's blueprint: a deep gradient under a fine grid. */
.hero, .closing {
  color: var(--light-paper);
  --focus-ring: var(--light-paper);
  background-color: var(--hero-mid);
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--light-paper) 8%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--light-paper) 8%, transparent) 1px, transparent 1px),
    radial-gradient(ellipse at 85% 0%, color-mix(in srgb, var(--sky) 28%, transparent), transparent 55%),
    linear-gradient(160deg, var(--hero-deep) 0%, var(--hero-mid) 55%, var(--hero-lift) 100%);
  background-size: 24px 24px, 24px 24px, auto, auto;
}
.hero-inner {
  max-width: var(--site-max); margin: 0 auto;
  padding: clamp(32px, 6vw, 72px) var(--site-gutter) clamp(48px, 7vw, 96px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  grid-template-areas: "copy account" "visual account";
  column-gap: clamp(32px, 5vw, 72px); row-gap: var(--space-32); align-items: start;
}
.hero-copy { grid-area: copy; display: flex; flex-direction: column; gap: var(--space-16); }
.eyebrow { font-size: var(--font-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blueprint); }
.hero .eyebrow {
  align-self: flex-start; padding: 6px var(--space-12); border-radius: 99px; letter-spacing: 0.02em; text-transform: none;
  color: var(--light-paper); background: color-mix(in srgb, var(--light-paper) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--light-paper) 28%, transparent);
}
.hero-title { font-size: clamp(36px, 5vw, 60px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 700; max-width: 18ch; }
.hero-lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--light-mist); max-width: 56ch; }
.hero-points { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-8) var(--space-24); color: var(--light-mist); font-weight: 500; }
.hero-points li, .plan-list li { display: flex; gap: var(--space-8); align-items: flex-start; }
.hero-points .icon { color: var(--sky); margin-top: 4px; }

.hero-visual { grid-area: visual; margin: 0; max-width: 560px; }
.convo { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-sheet); box-shadow: var(--shadow-float); overflow: hidden; }
.convo-head { display: flex; align-items: center; gap: var(--space-12); padding: var(--space-12) var(--space-16); border-bottom: 1px solid var(--line); }
.convo-head .brand-mark { width: 36px; height: 36px; border-radius: 9px; }
.convo-who { display: flex; flex-direction: column; line-height: 1.25; margin-right: auto; }
.convo-who span { color: var(--muted); font-size: var(--font-xs); }
.convo-body {
  display: flex; flex-direction: column; gap: var(--space-8); padding: var(--space-16);
  background-color: var(--bg);
  background-image: linear-gradient(to right, var(--grid-line) 1px, transparent 1px), linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 24px 24px;
}
.convo-event {
  align-self: center; display: inline-flex; align-items: center; gap: 6px; padding: 4px var(--space-12);
  border-radius: 99px; font-size: var(--font-xs); font-weight: 600; color: var(--bad);
  background: color-mix(in srgb, var(--bad) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent);
}
.msg { max-width: 85%; display: flex; flex-direction: column; gap: 4px; }
.msg p { padding: 10px 14px; border-radius: 16px; line-height: 1.4; }
.msg.agent { align-self: flex-end; align-items: flex-end; }
.msg.agent p { background: var(--primary); color: var(--on-primary); border-bottom-right-radius: 4px; }
.msg.customer { align-self: flex-start; }
.msg.customer p { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg-meta { display: inline-flex; align-items: center; gap: 4px; font-size: var(--font-2xs); color: var(--muted); }
.convo-booked {
  display: flex; align-items: center; gap: var(--space-12); margin-top: var(--space-4); padding: var(--space-12) var(--space-16);
  border-radius: var(--radius-panel); background: color-mix(in srgb, var(--ok) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent);
}
.convo-booked > .icon { color: var(--ok); }
.convo-booked p { display: flex; flex-direction: column; line-height: 1.3; margin-right: auto; }
.convo-booked p span { color: var(--muted); font-size: var(--font-xs); }
.hero-caption { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8); margin-top: var(--space-16); color: var(--light-mist); font-size: var(--font-xs); font-weight: 500; }
/* The conversation plays once per visit; reduced motion shows it whole. */
@media (prefers-reduced-motion: no-preference) {
  .convo.play .convo-body > * { opacity: 0; transform: translateY(8px); animation: rise 0.45s ease-out forwards; }
  .convo.play .convo-body > :nth-child(2) { animation-delay: 0.6s; }
  .convo.play .convo-body > :nth-child(3) { animation-delay: 1.3s; }
  .convo.play .convo-body > :nth-child(4) { animation-delay: 2s; }
  .convo.play .convo-body > :nth-child(5) { animation-delay: 2.7s; }
  .convo.play .convo-body > :nth-child(6) { animation-delay: 3.3s; }
  html { scroll-behavior: smooth; }
}

/* The account card: light in every appearance (.auth). */
.account {
  grid-area: account; scroll-margin-top: 88px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sheet);
  box-shadow: var(--shadow-float); padding: clamp(20px, 3vw, 32px);
}
.auth-card { display: flex; flex-direction: column; gap: var(--space-12); color: var(--text); }
.account-title { font-size: var(--font-xl); line-height: var(--line-heading); letter-spacing: -0.02em; margin-top: var(--space-4); }
.auth-card .field > span { font-weight: 500; }
.divider { display: flex; align-items: center; gap: var(--space-12); color: var(--muted); font-size: var(--font-xs); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-card .forgot { align-self: flex-end; margin-top: calc(-1 * var(--space-8)); padding: 0 var(--space-4); font-size: var(--font-xs); }
.auth-card .submit { min-height: 48px; }

/* Sections. */
.band { padding: clamp(56px, 8vw, 96px) 0; scroll-margin-top: 64px; }
.band.alt { background: var(--surface); border-block: 1px solid var(--line); }
.band-inner { max-width: var(--site-max); margin: 0 auto; padding: 0 var(--site-gutter); }
.band-inner.narrow { max-width: 860px; }
.band-head { max-width: 720px; margin-bottom: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; gap: var(--space-12); }
.band-head h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; letter-spacing: -0.02em; }
.band-lede { color: var(--muted); font-size: var(--font-md); }
.steps, .features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: var(--space-16); }
.step, .feature { border: 1px solid var(--line); border-radius: var(--radius-panel); padding: var(--space-24); display: flex; flex-direction: column; gap: var(--space-8); }
.step { background: var(--surface); box-shadow: var(--shadow-rest); }
.feature { background: var(--bg); }
.step h3, .feature h3 { font-size: var(--font-md); font-weight: 650; line-height: 1.3; }
.step p, .feature p { color: var(--muted); }
.step-num, .feature-icon { width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: var(--space-8); }
.step-num { border-radius: 50%; background: var(--primary); color: var(--on-primary); font-weight: 700; font-size: var(--font-md); }
.feature-icon { border-radius: 12px; background: color-mix(in srgb, var(--sky) 18%, var(--surface)); color: var(--blueprint); }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: var(--space-24); align-items: stretch; }
.plan {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sheet); box-shadow: var(--shadow-rest);
  padding: var(--space-32) var(--space-24) var(--space-24); display: flex; flex-direction: column; gap: var(--space-12);
}
.plan.featured { border: 2px solid var(--primary); box-shadow: var(--shadow-raised); }
.plan-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-8); }
.plan-head h3 { font-size: var(--font-lg); }
.plan-flag { padding: 4px 10px; border-radius: 99px; font-size: var(--font-2xs); font-weight: 700; background: var(--primary); color: var(--on-primary); }
.plan-blurb, .plan-alt, .plan-price span { color: var(--muted); }
.plan-alt { font-size: var(--font-xs); }
.plan-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.plan-price strong { font-size: var(--font-3xl); line-height: 1; letter-spacing: -0.03em; }
.plan-price span { font-weight: 500; }
.plan-list { list-style: none; margin: var(--space-8) 0 0; padding: var(--space-16) 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: var(--space-8); flex: 1; }
.plan-list .icon { color: var(--ok); margin-top: 4px; }
.plan .btn { margin-top: var(--space-8); }
.faq { display: flex; flex-direction: column; gap: var(--space-12); }
.faq-item { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-panel); }
.faq-item summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: var(--space-16);
  min-height: 56px; padding: var(--space-12) var(--space-24); border-radius: var(--radius-panel); font-weight: 600;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon { color: var(--muted); transition: transform 0.2s; }
.faq-item[open] summary .icon { transform: rotate(180deg); }
.faq-item p { padding: 0 var(--space-24) var(--space-24); color: var(--muted); max-width: 70ch; }
.closing-inner {
  max-width: var(--site-max); margin: 0 auto; padding: clamp(48px, 7vw, 80px) var(--site-gutter);
  display: flex; flex-direction: column; align-items: center; gap: var(--space-16); text-align: center;
}
.closing h2 { font-size: clamp(28px, 3.6vw, 44px); line-height: 1.1; letter-spacing: -0.02em; }
.closing p { color: var(--light-mist); font-size: var(--font-md); max-width: 52ch; }
.btn.on-hero { min-height: 52px; padding: 0 var(--space-32); font-size: var(--font-md); background: var(--light-paper); color: var(--light-blueprint); }

/* Footer. */
.site-foot { background: var(--surface); border-top: 1px solid var(--line); color: var(--muted); }
.site-foot-inner {
  max-width: var(--site-max); margin: 0 auto; padding: var(--space-48) var(--site-gutter) var(--space-32);
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--space-32);
}
.foot-brand { display: flex; flex-direction: column; gap: var(--space-8); max-width: 340px; }
.foot-brand .brand { margin-bottom: var(--space-4); }
.foot-brand .foot-tm { font-size: var(--font-xs); }
.foot-col h2 { margin-bottom: var(--space-8); font-size: var(--font-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text); }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.foot-col a { display: inline-flex; align-items: center; min-height: 36px; color: var(--muted); text-decoration: none; overflow-wrap: anywhere; }
.foot-col a:hover { color: var(--blueprint); text-decoration: underline; }
.site-foot-base {
  max-width: var(--site-max); margin: 0 auto; padding: var(--space-12) var(--site-gutter) var(--space-24);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-12);
  border-top: 1px solid var(--line); font-size: var(--font-xs);
}

/* The terms, the privacy page, the business step and the sign-in callback. */
.doc { padding: clamp(24px, 5vw, 64px) var(--site-gutter); }
.doc-card, .setup-card {
  margin: 0 auto; display: flex; flex-direction: column; gap: var(--space-12);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sheet);
}
.doc-card { max-width: 46rem; padding: clamp(24px, 5vw, 56px); box-shadow: var(--shadow-rest); overflow-wrap: anywhere; }
.doc-card h1 { font-size: clamp(28px, 4vw, 40px); }
.doc-card h2 { margin-top: var(--space-16); font-size: var(--font-md); }
.doc-card .btn { align-self: flex-start; margin-top: var(--space-16); }
/* Spec 078: the privacy notice's and the deletion page's lists, retention table and copyable notice. */
.doc-card ul, .doc-card ol { margin: 0; padding-inline-start: 1.25rem; display: grid; gap: var(--space-8); }
.doc-table { overflow-x: auto; }
.doc-table table { width: 100%; border-collapse: collapse; font-size: var(--font-sm); }
.doc-table th, .doc-table td { text-align: start; vertical-align: top; padding: var(--space-8) var(--space-12) var(--space-8) 0; border-bottom: 1px solid var(--line); }
.doc-table thead th { color: var(--muted); font-weight: 600; }
.doc-table tbody th { font-weight: 500; }
.doc-quote { margin: 0; padding: var(--space-12) var(--space-16); border-inline-start: 3px solid var(--primary); background: var(--panel); border-radius: var(--radius-input); }
.setup {
  display: grid; align-content: start; padding: clamp(24px, 6vw, 80px) var(--site-gutter);
  background-image: linear-gradient(to right, var(--grid-line) 1px, transparent 1px), linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 24px 24px;
}
.setup-card { width: min(480px, 100%); padding: clamp(20px, 4vw, 32px); box-shadow: var(--shadow-raised); }

@media (max-width: 1023px) {
  .site-links { display: none; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "account" "visual"; }
  .account { width: 100%; max-width: 520px; }
  .site-foot-inner { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .site-bar-inner { gap: var(--space-8); }
  .site-tools { gap: 0; }
  .lang-picker { padding: 0 var(--space-8); }
  .site-cta { margin-left: var(--space-4); padding: 0 var(--space-12); }
  .site-foot-inner { grid-template-columns: 1fr 1fr; }
  .faq-item summary, .faq-item p { padding-inline: var(--space-16); }
}

/* Spec 043: signing in. The brand gradient fills the screen from Apple's or Google's return until the workspace or the
   business step; one line names the step. The mark breathes and a light sweeps the bar only without reduced motion. */
.signing-in {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  padding: var(--space-32) var(--space-16);
  color: var(--light-paper);
  background-color: var(--hero-mid);
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--light-paper) 8%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--light-paper) 8%, transparent) 1px, transparent 1px),
    radial-gradient(ellipse at 85% 0%, color-mix(in srgb, var(--sky) 28%, transparent), transparent 55%),
    linear-gradient(160deg, var(--hero-deep) 0%, var(--hero-mid) 55%, var(--hero-lift) 100%);
  background-size: 24px 24px, 24px 24px, auto, auto;
}
.signing-in-inner { display: flex; flex-direction: column; align-items: center; gap: var(--space-12); text-align: center; max-width: 360px; }
.signing-in-mark { width: 72px; height: auto; display: block; }
.signing-in-name { font-size: var(--font-xl); font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.signing-in-step { font-size: var(--font-md); font-weight: 600; margin: 0; }
.signing-in-hint { font-size: var(--font-xs); margin: 0; color: var(--light-mist); }
.signing-in-bar { position: relative; width: 168px; height: 4px; border-radius: 2px; overflow: hidden; margin: var(--space-4) 0;
  background: color-mix(in srgb, var(--light-paper) 22%, transparent); }
.signing-in-bar span { position: absolute; inset: 0 auto 0 32%; width: 36%; border-radius: 2px;
  background: color-mix(in srgb, var(--light-paper) 90%, transparent); }
@keyframes signing-in-breathe { 50% { transform: scale(1.07); opacity: 0.8; } }
@keyframes signing-in-sweep { from { left: -36%; } to { left: 100%; } }
@media (prefers-reduced-motion: no-preference) {
  .signing-in-mark { animation: signing-in-breathe 1.6s ease-in-out infinite; }
  .signing-in-bar span { animation: signing-in-sweep 1.3s ease-in-out infinite; }
}

/* Spec 047: the business picture, the setup wizard, the dashboard's "Continue setup" and Studio's "Try it now". The
   picture is a square or a circle; without one, the business's initial on the brand colour. */
.pic { display: inline-grid; place-items: center; flex: none; object-fit: cover; background: var(--surface); }
.pic.square { border-radius: 22%; }
.pic.circle { border-radius: 50%; }
.pic.initial { background: var(--primary); color: var(--on-primary); font-weight: 700; line-height: 1; }
img.pic { border: 1px solid var(--line); }
.pic-32 { width: 32px; height: 32px; font-size: var(--font-xs); }
.pic-56 { width: 56px; height: 56px; font-size: var(--font-lg); }
.pic-96 { width: 96px; height: 96px; font-size: var(--font-2xl); }
.wizard-page { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); }
.wizard-bar { background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-rest); position: sticky; top: 0; z-index: 5; }
.wizard-bar-inner {
  max-width: 960px; margin: 0 auto; min-height: 60px; padding: var(--space-8) var(--space-16);
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-8);
}
.wizard-bar .row { gap: var(--space-4); }
.wizard {
  flex: 1; display: grid; justify-items: center; align-content: start; padding: clamp(16px, 4vw, 48px) var(--space-16) var(--space-48);
  background-image: linear-gradient(to right, var(--grid-line) 1px, transparent 1px), linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 24px 24px;
}
.wizard-card {
  width: min(680px, 100%); display: flex; flex-direction: column; gap: var(--space-16);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sheet);
  padding: clamp(20px, 4vw, 36px); box-shadow: var(--shadow-raised); overflow-wrap: anywhere;
}
.wizard-card h1 { font-size: clamp(24px, 3.4vw, 30px); }
/* Spec 054: the step's content, kept at the card's own spacing when it fades in after its skeleton. */
.wizard-step { display: flex; flex-direction: column; gap: var(--space-16); }
.wizard-card h1:focus { outline: none; }
.h3 { font-size: var(--font-md); line-height: var(--line-heading); font-weight: 650; }
.wizard-progress { display: flex; flex-direction: column; gap: var(--space-8); }
.dots { list-style: none; display: flex; align-items: center; gap: var(--space-8); margin: 0; padding: 0; }
.dots li { width: 12px; height: 12px; border-radius: 99px; background: var(--line); flex: none; }
.dots li.done { background: var(--primary); }
.dots li.current { width: 32px; background: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sky) 35%, transparent); }
.dots li.skipped { background: transparent; border: 2px dashed var(--muted); }
.wizard-actions { display: flex; flex-direction: column; gap: var(--space-8); padding-top: var(--space-16); border-top: 1px solid var(--line); }
.wizard-actions .row { justify-content: space-between; flex-wrap: wrap; }
.btn.wide { width: 100%; min-height: 48px; font-size: var(--font-md); }
.notice { color: var(--ok); }
.callout { border: 1px solid var(--line); background: color-mix(in srgb, var(--sky) 10%, var(--surface)); border-radius: var(--radius-panel); padding: var(--space-12); }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-8); }
.chip {
  min-height: 44px; padding: var(--space-8) var(--space-16); border-radius: 22px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font-weight: 500; text-align: left;
}
.chip:hover { border-color: var(--blueprint); }
.chip[aria-pressed="true"] { background: color-mix(in srgb, var(--sky) 22%, var(--surface)); border-color: var(--blueprint); color: var(--blueprint); font-weight: 600; }
.picture-step { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--space-24); align-items: start; }
.crop {
  position: relative; width: 240px; height: 240px; overflow: hidden; display: grid; place-items: center;
  border-radius: var(--radius-panel); border: 1px solid var(--line); color: var(--muted);
  background-color: var(--surface);
  background-image: linear-gradient(45deg, var(--grid-line) 25%, transparent 25%, transparent 75%, var(--grid-line) 75%),
    linear-gradient(45deg, var(--grid-line) 25%, transparent 25%, transparent 75%, var(--grid-line) 75%);
  background-size: 16px 16px; background-position: 0 0, 8px 8px;
  touch-action: none; cursor: grab;
}
.crop.circle { border-radius: 50%; }
.crop.empty, .crop.saved { cursor: default; }
.crop.empty .icon { width: 48px; height: 48px; }
.crop.saved img { width: 100%; height: 100%; object-fit: cover; display: block; }
.crop [data-crop-img] { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; user-select: none; pointer-events: none; }
input[type="range"] { width: 100%; min-height: 44px; accent-color: var(--blueprint); }
.file-pick { position: relative; overflow: hidden; }
.file-pick input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-pick:focus-within { outline: var(--focus-width) solid var(--focus-ring, var(--blueprint)); outline-offset: var(--focus-offset); }
.price-rows { display: flex; flex-direction: column; }
.price-row { display: grid; grid-template-columns: minmax(0, 1fr) 140px; gap: var(--space-12); align-items: center; padding: var(--space-8) 0; border-bottom: 1px solid var(--line); }
.own-price, .number-row { display: grid; grid-template-columns: minmax(0, 1fr) 160px; gap: var(--space-12); align-items: end; }
.number-row { grid-template-columns: minmax(0, 1fr) auto; }
progress.wide { appearance: none; width: 100%; height: 10px; border: 0; border-radius: 99px; overflow: hidden; background: var(--line); color: var(--ok); }
progress.wide::-webkit-progress-bar { background: var(--line); border-radius: 99px; }
progress.wide::-webkit-progress-value { background: var(--ok); border-radius: 99px; }
progress.wide::-moz-progress-bar { background: var(--ok); border-radius: 99px; }
.area.short { min-height: 72px; }
.codes, .knows, .needs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-8); }
.codes li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-8); padding: var(--space-12); border: 1px solid var(--line); border-radius: var(--radius-input); }
.codes code { font-size: var(--font-md); font-weight: 600; }
.knows li, .needs li { display: flex; gap: var(--space-8); align-items: flex-start; }
.knows .icon, .needs .ready .icon { color: var(--ok); margin-top: 3px; }
.needs .next .icon { color: var(--warn); margin-top: 3px; }
.needs li > span { display: flex; flex-direction: column; gap: 2px; }
.convo-lines .bubble { max-width: 85%; }
.continue-setup {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-16); margin-bottom: var(--space-16);
  border-color: color-mix(in srgb, var(--sky) 55%, var(--line)); background: color-mix(in srgb, var(--sky) 8%, var(--surface));
}
.picture-settings { display: flex; gap: var(--space-16); align-items: center; }
.top-actions .pic { pointer-events: none; }
.try-now { margin-bottom: var(--space-16); border-color: color-mix(in srgb, var(--sky) 55%, var(--line)); }
/* These panels space their children with the stack's gap alone. */
.panel.try-now > h2, .panel.try-now > p, .wizard-card .panel > h2, .wizard-card .panel > p { margin: 0; }
.composer .btn { flex: none; }
.wizard-card .btn, .try-now .btn { overflow-wrap: normal; }
/* Customer pages: the business's picture and name above the quote, the invoice or the booking form. */
.public-brand { display: flex; align-items: center; gap: var(--space-12); padding-bottom: var(--space-12); border-bottom: 1px solid var(--line); }
.public-brand-name { font-size: var(--font-md); font-weight: 700; }
/* The top bar on a phone, where the picture shows: the rail switch does nothing there (the menu opens the sidebar), and
   the range moves under the title instead of squeezing it letter by letter. */
@media (max-width: 1023px) { .topbar [data-action="rail"] { display: none; } }
@media (max-width: 700px) {
  .topbar > .row:first-child { flex-wrap: wrap; row-gap: var(--space-4); }
  .topbar > .row:first-child h1 { flex: 1 1 auto; }
  .wizard { padding: var(--space-12) var(--space-12) 0; }
  .wizard-card { padding: var(--space-16); border-radius: var(--radius-panel); }
  .wizard-actions {
    position: sticky; bottom: 0; z-index: 3; background: var(--surface);
    margin: 0 calc(-1 * var(--space-16)); padding: var(--space-12) var(--space-16) var(--space-16);
  }
  .picture-step { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .picture-step > .stack { width: 100%; }
  .own-price, .number-row { grid-template-columns: minmax(0, 1fr); }
  .price-row { grid-template-columns: minmax(0, 1fr) 112px; }
  .continue-setup, .picture-settings { flex-direction: column; align-items: stretch; }
  .picture-settings .pic { align-self: center; }
}

/* Spec 055: "How Rulabe works". The hub (the tour, the topics in groups, the big picture, what needs setup), one topic's
   tutorial (picture, words, dots, Next, Back and Skip at 48 px) and the dashboard's first-run card. Pictures are SVG in
   the tokens by role; their motion stops for reduced motion. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.settings-guide { align-self: flex-start; }
.tour-chip {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px;
  background: var(--primary); color: var(--on-primary);
}
.tour-offer {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-16);
  border-color: color-mix(in srgb, var(--sky) 55%, var(--line)); background: color-mix(in srgb, var(--sky) 8%, var(--surface));
}
.tour-offer-copy { display: flex; flex-direction: column; gap: var(--space-4); }
.tour-offer-actions { display: flex; gap: var(--space-8); flex-wrap: wrap; }
.tour-offer-actions .btn, .tour-hero-btn, .tour-bar .btn, .tour-card { min-height: 48px; }
.tour-hub { display: flex; flex-direction: column; gap: var(--space-24); max-width: 1040px; }
.tour-hero {
  border-radius: var(--radius-sheet); padding: var(--space-24); color: var(--light-paper);
  background: linear-gradient(135deg, var(--hero-lift), var(--hero-mid) 55%, var(--hero-deep));
  display: flex; flex-direction: column; gap: var(--space-16);
}
.tour-hero-intro { font-size: var(--font-md); max-width: 62ch; }
.tour-hero-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-16) var(--space-24); }
.tour-hero-btn { background: var(--light-paper); color: var(--hero-mid); border-radius: 24px; padding: 0 var(--space-24); }
.tour-progress { display: flex; flex-direction: column; gap: var(--space-4); min-width: 200px; font-weight: 500; }
.tour-progress progress { appearance: none; width: 100%; height: 8px; border: 0; border-radius: 99px; overflow: hidden; background: color-mix(in srgb, var(--light-paper) 28%, transparent); color: var(--light-paper); }
.tour-progress progress::-webkit-progress-bar { background: color-mix(in srgb, var(--light-paper) 28%, transparent); border-radius: 99px; }
.tour-progress progress::-webkit-progress-value { background: var(--light-paper); border-radius: 99px; }
.tour-progress progress::-moz-progress-bar { background: var(--light-paper); border-radius: 99px; }
.tour-head { display: flex; flex-direction: column; gap: var(--space-4); margin-bottom: var(--space-8); }
.tour-group { display: flex; flex-direction: column; gap: var(--space-8); margin-top: var(--space-16); }
.tour-group h3 { font-size: var(--font-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.tour-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: var(--space-12); }
.tour-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-12);
  width: 100%; text-align: left; padding: var(--space-16); color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-panel); box-shadow: var(--shadow-rest);
}
.tour-card:hover { border-color: color-mix(in srgb, var(--sky) 60%, var(--line)); }
.tour-card-copy { display: flex; flex-direction: column; gap: 2px; }
.tour-card-copy strong { font-size: var(--font-md); }
.tour-meta { font-size: var(--font-xs); color: var(--muted); }
.tour-done { color: var(--ok); font-weight: 600; }
.tour-state { color: var(--muted); }
.tour-card.is-done .tour-state { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--ok); color: var(--on-primary); }
.tour-card.is-done .tour-state .icon { width: 16px; height: 16px; }
.tour-steps, .tour-try, .tour-needs { list-style: none; margin: var(--space-12) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-12); }
.tour-steps li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-12); align-items: start; }
.tour-steps .step-num { width: 32px; height: 32px; margin: 0; font-size: var(--font-sm); }
.tour-try li { display: flex; gap: var(--space-8); align-items: flex-start; }
.tour-try .icon { color: var(--ok); margin-top: 3px; }
.tour-need { border: 1px solid var(--line); border-radius: var(--radius-input); padding: var(--space-12); display: flex; flex-direction: column; gap: var(--space-4); }
.tour-need .pill.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.tour-need .pill.todo { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.tour-player { display: flex; flex-direction: column; gap: var(--space-16); max-width: 1040px; }
.tour-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-12); flex-wrap: wrap; }
.tour-top .btn { min-height: 48px; padding-left: 0; }
.tour-stage { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--space-24); align-items: center; touch-action: pan-y; }
.tour-figure { margin: 0; }
.tour-copy { display: flex; flex-direction: column; gap: var(--space-12); }
.tour-copy h2 { font-size: var(--font-xl); }
/* The title takes the focus when a topic opens, for screen readers; it is not a control, so it draws no ring. */
.tour-copy h2:focus { outline: none; }
.tour-copy p { font-size: var(--font-md); color: var(--muted); max-width: 46ch; }
.tour-bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "dots links next"; align-items: center; gap: var(--space-12); }
.tour-dots { grid-area: dots; display: flex; gap: 6px; align-items: center; }
.tour-dot { display: block; width: 8px; height: 8px; border-radius: 4px; background: var(--line); }
.tour-dot.seen { background: color-mix(in srgb, var(--primary) 45%, transparent); }
.tour-dot.current { width: 22px; background: var(--primary); }
.tour-links { grid-area: links; display: flex; justify-content: flex-end; gap: var(--space-8); }
.tour-next { grid-area: next; min-width: 160px; }
.tour-art { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; border-radius: 16px; border: 1px solid var(--line); }
.ta-f-stage { fill: var(--bg); }
.ta-grid { fill: none; stroke: var(--primary); stroke-opacity: 0.07; stroke-width: 1; }
.ta-shadow { flood-color: var(--night); flood-opacity: 0.14; }
:root[data-theme="dark"] .ta-shadow { flood-opacity: 0.5; }
@media (prefers-color-scheme: dark) { :root[data-theme="system"] .ta-shadow { flood-opacity: 0.5; } }
.ta-f-surface { fill: var(--surface); } .ta-k-surface { stroke: var(--surface); }
.ta-f-line { fill: var(--line); } .ta-k-line { stroke: var(--line); }
.ta-f-text { fill: var(--text); } .ta-k-text { stroke: var(--text); }
.ta-f-muted { fill: var(--muted); } .ta-k-muted { stroke: var(--muted); }
.ta-f-primary { fill: var(--primary); } .ta-k-primary { stroke: var(--primary); }
.ta-f-on { fill: var(--on-primary); } .ta-k-on { stroke: var(--on-primary); }
.ta-f-accent { fill: var(--amber); } .ta-k-accent { stroke: var(--amber); }
.ta-f-onAccent { fill: var(--light-ink); } .ta-k-onAccent { stroke: var(--light-ink); }
.ta-f-ok { fill: var(--ok); } .ta-k-ok { stroke: var(--ok); }
.ta-f-bad { fill: var(--bad); } .ta-k-bad { stroke: var(--bad); }
.ta-f-voice { fill: var(--channel-voice); } .ta-k-voice { stroke: var(--channel-voice); }
.ta-f-whatsapp { fill: var(--channel-whatsapp); } .ta-k-whatsapp { stroke: var(--channel-whatsapp); }
.ta-f-sms { fill: var(--channel-sms); } .ta-k-sms { stroke: var(--channel-sms); }
.ta-f-web { fill: var(--channel-web); } .ta-k-web { stroke: var(--channel-web); }
.tour-art [class*="ta-k-"] { stroke-linecap: round; stroke-linejoin: round; }
.tour-art .ta-icon { fill: none; stroke-width: 2; }
.tour-art .ta-g { animation: ta-rise both cubic-bezier(0.33, 1, 0.68, 1); transform-box: fill-box; }
.tour-art .ta-pop { animation-name: ta-pop; transform-origin: center; }
.tour-art .ta-grow { animation-name: ta-grow; transform-origin: left center; }
.tour-art .ta-fade { animation-name: ta-fade; }
.tour-art .ta-pulse { opacity: 0; animation: ta-pulse ease-out forwards; transform-box: fill-box; transform-origin: center; }
@keyframes ta-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes ta-pop { from { opacity: 0; transform: scale(0.7); } to { opacity: 1; transform: none; } }
@keyframes ta-grow { from { opacity: 0; transform: scaleX(0); } 33% { opacity: 1; } to { opacity: 1; transform: none; } }
@keyframes ta-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ta-pulse { from { opacity: 0.7; transform: scale(1); } to { opacity: 0; transform: scale(1.35); } }
.tour-art.ta-still .ta-g { animation: none; }
.tour-art.ta-still .ta-pulse { display: none; }
@media (prefers-reduced-motion: reduce) {
  .tour-art .ta-g { animation: none; }
  .tour-art .ta-pulse { display: none; }
}
@media (max-width: 900px) {
  .tour-stage { grid-template-columns: minmax(0, 1fr); gap: var(--space-16); }
  .tour-bar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "dots dots" "next next" "links links"; }
  .tour-dots { justify-content: center; }
  .tour-links { justify-content: space-between; }
  .tour-next { min-width: 0; width: 100%; }
}
@media (max-width: 700px) {
  .dash-head { flex-wrap: wrap; }
  .dash-head h2 { flex: 1 1 100%; }
  .tour-offer { grid-template-columns: auto minmax(0, 1fr); }
  .tour-offer-actions { grid-column: 1 / -1; flex-direction: column; }
  .tour-offer-actions .btn { width: 100%; }
  .tour-hero { padding: var(--space-16); }
  .tour-copy h2 { font-size: var(--font-lg); }
}

/* Spec 060: index.html, terms.html and privacy.html arrive drawn in English. When first-paint.js finds the page will open
   in another language, the drawn page waits, hidden, for app.js's first draw (which drops data-prerendered), or 3 s at
   most if app.js never runs. */
html[data-language-pending] #app[data-prerendered] { visibility: hidden; animation: prerendered-show 0s linear 3s forwards; }
@keyframes prerendered-show { to { visibility: visible; } }

/* Spec 088: the demo company. The banner in the workspace, the scenarios in Settings, the ribbon on the customer pages and
   the DEMO watermark on a demo document's printed copy. */
.demo-banner { margin: 12px 16px 0; }
.demo-panel .demo-scenario { display: grid; gap: 4px; padding: 8px 0; border-top: 1px solid var(--hairline); }
.demo-ribbon { margin: 8px 0 0; padding: 6px 10px; border-radius: 6px; background: var(--amber); color: var(--ink); font-weight: 600; }
.demo-doc::after { content: "DEMO"; position: fixed; inset: 0; display: grid; place-items: center; font-size: 160px; font-weight: 700;
  color: var(--ink); opacity: 0.06; transform: rotate(-24deg); pointer-events: none; }
@media print { .demo-doc::after { opacity: 0.12; } }

/* Spec 083: the web command centre (UI plan 4.2–4.3 and section 6). Tokens only; no colour is written here. */
.h3, h3 { font-size: var(--font-md); line-height: var(--line-heading); font-weight: 650; }
.btn.small { min-height: 36px; padding: 0 var(--space-12); font-size: var(--font-xs); }
.btn.menu-btn, .sidebar-close { display: none; }
.kbd { font: inherit; font-size: var(--font-2xs); color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; background: var(--bg); white-space: nowrap; }

/* The sidebar: full height beside the content, its meter and Settings always in view. */
.sidebar { height: 100vh; min-height: 0; overflow-y: auto; align-self: start; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-8); min-height: 44px; }
.sidebar-nav { display: flex; flex-direction: column; gap: var(--space-8); }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: var(--space-4); border-top: 1px solid var(--line); padding-top: var(--space-12); }
.plan-meter { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px var(--space-8); padding: var(--space-8); border-radius: var(--radius-input); background: color-mix(in srgb, var(--sky) 8%, var(--surface)); }
.plan-meter .meter-label { font-size: var(--font-xs); color: var(--muted); font-weight: 600; }
.plan-meter .meter-track { grid-column: 1 / -1; grid-row: 2; }
.plan-meter .meter-text { grid-column: 2; grid-row: 1; font-size: var(--font-xs); }
.plan-meter.free { grid-template-columns: 1fr auto; }
.meter-track, .audio-track { height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--line) 70%, var(--surface)); overflow: hidden; }
.meter-track i, .audio-track i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--primary); }
.plan-meter.warn .meter-track i { background: var(--amber); }
.rail .sidebar { padding-inline: var(--space-8); }
.rail .nav-item { justify-content: center; padding-inline: 0; }
.rail .nav-item .dot { position: absolute; top: 8px; right: 10px; }
.rail .plan-meter { grid-template-columns: 1fr; padding: var(--space-8) 6px; }
.rail .plan-meter .meter-label, .rail .plan-meter .meter-text, .rail .plan-meter .btn { display: none; }
.rail .sidebar-head { justify-content: center; }
.sidebar-scrim { display: none; }

/* The top bar: the title and range, the search with its shortcut, then New, the bell and the avatar. */
.topbar { grid-template-columns: minmax(min-content, 1fr) minmax(180px, 420px) auto; }
.topbar-title h1 { line-height: 1.15; }
.spread { flex-wrap: wrap; }
.week > * { min-width: 0; }
.block { overflow-wrap: anywhere; }
@media (max-width: 1279px) and (min-width: 1024px) { .week { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.search-btn { justify-content: flex-start; color: var(--muted); min-width: 0; }
.search-btn > span { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.segmented.range { flex: none; }
.segmented.range button { padding: 0 var(--space-12); white-space: nowrap; }
.bell { position: relative; }
.bell-dot { position: absolute; top: 9px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--sky); border: 2px solid var(--surface); }
.avatar-btn { border-radius: 50%; }

/* Menus: icon, words; the avatar's menu names who is signed in and holds the language and appearance choices. */
.menu button, .palette-option { display: flex; align-items: center; gap: var(--space-12); }
.menu [role="menuitem"]:focus-visible, .menu [role="menuitemradio"]:focus-visible { outline-offset: -3px; }
.menu-head { padding: var(--space-4) var(--space-8) var(--space-8); border-bottom: 1px solid var(--line); margin-bottom: var(--space-4); }
.menu-who { display: flex; flex-direction: column; padding: var(--space-8) var(--space-12) var(--space-12); border-bottom: 1px solid var(--line); margin-bottom: var(--space-4); overflow-wrap: anywhere; }
.menu-who .muted { font-size: var(--font-xs); }
.menu-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-8); padding: var(--space-4) var(--space-12); flex-wrap: wrap; }
.menu-row-label { display: inline-flex; align-items: center; gap: var(--space-12); }
.menu-choices { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-input); overflow: hidden; }
.menu .menu-choices button { width: auto; min-height: 36px; padding: 0 var(--space-12); border-radius: 0; }
.menu .menu-choices button[aria-checked="true"] { background: color-mix(in srgb, var(--sky) 25%, var(--surface)); color: var(--text); font-weight: 600; }
.account-menu { width: min(320px, calc(100vw - 32px)); }
.bell-panel { width: min(380px, calc(100vw - 32px)); }
.bell-list { max-height: min(60vh, 480px); overflow-y: auto; }

/* The palette: a search field over grouped results; the active option is tinted and outlined. */
.palette-host { place-items: start center; padding-top: min(14vh, 120px); }
.palette { display: flex; flex-direction: column; gap: var(--space-8); max-height: min(70vh, 560px); }
.palette-search { display: flex; align-items: center; gap: var(--space-8); padding: 0 var(--space-4) var(--space-8); border-bottom: 1px solid var(--line); }
.palette-search .control { border: 0; box-shadow: none; flex: 1; min-width: 0; }
.palette-search .control:focus { outline: none; }
.palette-list { overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.palette-group { font-size: var(--font-xs); color: var(--muted); font-weight: 600; padding: var(--space-8) var(--space-12) var(--space-4); }
.palette-option { width: 100%; text-align: left; background: none; border: 0; min-height: 44px; border-radius: var(--radius-input); padding: 0 var(--space-12); }
.palette-option[aria-selected="true"] { background: color-mix(in srgb, var(--sky) 18%, var(--surface)); box-shadow: inset 3px 0 0 var(--sky); }
.palette-label { font-weight: 600; white-space: nowrap; }
.palette-detail { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.palette-empty { padding: var(--space-16) var(--space-12); }
.palette-hint { font-size: var(--font-xs); padding: var(--space-4) var(--space-12) 0; border-top: 1px solid var(--line); padding-top: var(--space-8); }

/* The dashboard (UI plan 4.3): the figures, chart and day on the left; the queue and the feed in the right column. */
.page-head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-12); flex-wrap: wrap; }
.dash { margin-top: var(--space-16); grid-template-columns: minmax(0, 1fr) clamp(300px, 27vw, 360px); align-items: start; }
.page-head .segmented.range { min-width: 0; }
.dash-main, .dash-side { display: flex; flex-direction: column; gap: var(--space-16); min-width: 0; }
.panel.raised { box-shadow: var(--shadow-raised); }
.panel-head { margin-bottom: var(--space-12); }
.panel > .panel-head h2 { margin: 0; }
.count-pill { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; margin-left: var(--space-4); border-radius: 99px; font-size: var(--font-xs); background: color-mix(in srgb, var(--sky) 22%, var(--surface)); color: var(--text); vertical-align: middle; }
.kpi:hover { border-color: color-mix(in srgb, var(--blueprint) 40%, var(--line)); }
.chart-figure { margin: 0; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: var(--space-4) var(--space-8); }
.chart-figure .chart { position: relative; border-bottom: 1px solid var(--line); background-image: linear-gradient(to top, var(--grid-line) 1px, transparent 1px); background-size: 100% 25%; }
.chart-scale { display: flex; flex-direction: column; justify-content: space-between; font-size: var(--font-2xs); color: var(--muted); text-align: right; }
.chart-axis { grid-column: 2; display: flex; justify-content: space-between; font-size: var(--font-xs); }
.attention-list, .feed, .timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.attention-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-4) var(--space-12); padding: var(--space-12) 0; border-top: 1px solid var(--line); }
.attention-item:first-child { border-top: 0; padding-top: 0; }
.attention-item > .btn, .attention-actions { grid-column: 2; justify-self: start; }
.attention-icon { color: var(--blueprint); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: color-mix(in srgb, var(--sky) 14%, var(--surface)); }
.attention-item.urgent .attention-icon { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, var(--surface)); }
.attention-copy { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.feed-item { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: var(--space-12); padding: var(--space-8) 0; position: relative; }
.feed-item p { margin-top: var(--space-4); overflow-wrap: anywhere; }
.feed-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 8px; background: var(--muted); }
.feed-item.voice .feed-dot { background: var(--channel-voice); }
.feed-item.whatsapp .feed-dot { background: var(--channel-whatsapp); }
.feed-item.sms .feed-dot { background: var(--channel-sms); }
.feed-item.web .feed-dot { background: var(--channel-web); }
.feed-item:not(:last-child)::after { content: ""; position: absolute; left: 4px; top: 22px; bottom: -8px; width: 2px; background: var(--line); }
.timeline-row { display: grid; grid-template-columns: 56px 12px minmax(0, 1fr); align-items: start; gap: var(--space-12); width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--line); padding: var(--space-12) var(--space-4); border-radius: 0; }
.timeline li:first-child .timeline-row { border-top: 0; }
.timeline-row:hover { background: color-mix(in srgb, var(--sky) 8%, transparent); }
.timeline-time { font-weight: 600; }
.timeline-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 7px; background: var(--primary); }
.timeline-copy { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.empty.compact { padding: var(--space-16) var(--space-8); gap: var(--space-8); color: var(--muted); }
.empty .icon { color: var(--blueprint); margin-inline: auto; }

/* The gallery's states drawn at rest, and its floating parts drawn in place. */
.gallery { max-width: 1280px; margin: 0 auto; padding: var(--space-24); }
.gallery-head { flex-wrap: wrap; }
.gallery .gallery-section { display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: var(--space-12); }
.gallery-section + .gallery-section { border-top: 1px solid var(--line); padding-top: var(--space-24); }
.gallery-body { display: flex; flex-direction: column; gap: var(--space-12); }
.gallery-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-12); }
.gallery-label { width: 96px; color: var(--muted); font-size: var(--font-xs); font-weight: 600; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: var(--space-16); align-items: start; }
.btn.is-hover { filter: brightness(1.05); }
.btn.secondary.is-hover, .btn.ghost.is-hover, .btn.icon.is-hover { background: color-mix(in srgb, var(--sky) 12%, var(--surface)); }
.btn.is-focus, .control.is-focus, .kpi.is-focus { outline: var(--focus-width) solid var(--blueprint); outline-offset: var(--focus-offset); }
/* Pressed darkens, never fades: a faded label would fall under AA (the phone's press dim is for a moment under a finger). */
.btn:active, .btn.is-pressed { filter: brightness(0.9); transform: translateY(1px); }
.btn.secondary:active, .btn.secondary.is-pressed, .btn.ghost:active, .btn.ghost.is-pressed, .btn.icon:active, .btn.icon.is-pressed { filter: none; background: color-mix(in srgb, var(--sky) 22%, var(--surface)); }
.btn:disabled:active { transform: none; filter: none; }
.gallery-body, .gallery-body > *, .gallery-section { min-width: 0; max-width: 100%; }
.menu .is-hover { background: color-mix(in srgb, var(--sky) 16%, transparent); }
.menu.static, .sheet.static, .modal.static, .palette.static { position: static; width: 100%; height: auto; }
.toast.static { align-self: start; }
.row.end { justify-content: flex-end; }
.field.inline { flex-direction: row; align-items: center; gap: var(--space-8); }
.field.invalid .control { border-color: var(--bad); }
.date-range { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-12); }
.select { position: relative; }
.select-button { display: flex; align-items: center; justify-content: space-between; gap: var(--space-8); width: 100%; min-height: 44px; padding: 0 var(--space-12); border: 1px solid var(--line); border-radius: var(--radius-input); background: var(--surface); text-align: left; }
.select-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-input); box-shadow: var(--shadow-float); padding: var(--space-4); margin-top: var(--space-4); }
.select-list:not(.static) { position: absolute; left: 0; right: 0; z-index: 20; }
.select-option { display: flex; align-items: center; gap: var(--space-8); min-height: 40px; padding: 0 var(--space-8); border-radius: var(--radius-input); cursor: pointer; }
.select-option > span { flex: 1; }
.select-option[aria-selected="true"] { background: color-mix(in srgb, var(--sky) 18%, var(--surface)); font-weight: 600; }
.choice.switch input { position: absolute; opacity: 0; width: 44px; height: 24px; margin: 0; cursor: pointer; }
.choice.switch { position: relative; }
.switch-track { width: 44px; height: 24px; border-radius: 99px; background: color-mix(in srgb, var(--muted) 45%, var(--surface)); position: relative; flex: none; transition: background 120ms; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-rest); transition: transform 120ms; }
.choice.switch input:checked + .switch-track { background: var(--primary); }
.choice.switch input:checked + .switch-track::after { transform: translateX(20px); }
.choice.switch input:focus-visible + .switch-track { outline: var(--focus-width) solid var(--blueprint); outline-offset: var(--focus-offset); }
.pill.status-approved, .pill.status-invoiced { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.pill.status-sent, .pill.status-viewed { color: var(--blueprint); border-color: color-mix(in srgb, var(--blueprint) 40%, var(--line)); }
.pill.status-expired, .pill.status-revoked { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.avatar.small { width: 28px; height: 28px; font-size: var(--font-xs); }
.filter-bar { display: flex; flex-wrap: wrap; gap: var(--space-8); }
.chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 var(--space-12); border-radius: 99px; border: 1px solid var(--line); background: var(--surface); }
.chip.on { border-color: var(--blueprint); color: var(--blueprint); font-weight: 600; background: color-mix(in srgb, var(--sky) 12%, var(--surface)); }
.bulk-bar { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-12); padding: var(--space-8) var(--space-12); border-radius: var(--radius-input); background: color-mix(in srgb, var(--sky) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--blueprint) 30%, var(--line)); }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-12); }
.panel.flush { padding: 0; overflow: hidden; }
.audio-player { display: flex; align-items: center; gap: var(--space-8); padding: var(--space-8); border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--surface); }
.audio-player .audio-track { flex: 1; }
.gallery-thread { padding: 0; }
.tabs { display: flex; gap: var(--space-4); border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs [role="tab"] { min-height: 44px; padding: 0 var(--space-16); background: none; border: 0; border-bottom: 3px solid transparent; color: var(--muted); font-weight: 600; white-space: nowrap; }
.tabs [role="tab"][aria-selected="true"] { color: var(--blueprint); border-bottom-color: var(--sky); }
.tab-panel { padding-top: var(--space-12); }
ol.stepper { list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
ol.stepper li { display: inline-flex; align-items: center; gap: var(--space-4); padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); }
ol.stepper li.now { background: var(--primary); color: var(--on-primary); border-color: transparent; }
ol.stepper li.done { color: var(--ok); }
.drop { display: flex; flex-direction: column; align-items: center; gap: var(--space-8); }
.banner { display: flex; align-items: center; gap: var(--space-8); }

@media (max-width: 1023px) {
  .btn.menu-btn { display: inline-flex; }
  .rail-btn { display: none; }
  .workspace.rail { grid-template-columns: 1fr; }
  .rail .nav-label, .rail .nav-item span, .rail .brand span, .rail .count { display: revert; }
  .rail .nav-item { justify-content: flex-start; padding-inline: var(--space-8); }
  .sidebar { height: 100%; transition: transform 160ms ease-out; box-shadow: var(--shadow-float); }
  .workspace.nav-open .sidebar { transform: none; }
  .workspace.nav-open .sidebar-scrim { display: block; position: fixed; inset: 0; z-index: 24; background: color-mix(in srgb, var(--light-ink) 35%, transparent); }
  .sidebar-close { display: inline-flex; }
  .topbar { grid-template-columns: auto minmax(0, 1fr) auto; }
  .topbar-title { grid-column: 1 / -1; }
  .search-btn { grid-column: 1 / 3; }
  .dash { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .search-btn .kbd { display: none; }
  .topbar > .btn.secondary.search-btn > span { position: static; width: auto; height: auto; overflow: hidden; clip: auto; }
  .page-head .segmented.range { width: 100%; }
  .kpi strong { font-size: var(--font-xl); }
  .topbar-title h1 { white-space: normal; overflow-wrap: anywhere; }
  .topbar { grid-template-columns: minmax(0, 1fr) auto; }
  .search-btn { grid-column: 1; }
  .top-actions { grid-column: 2; }
  .top-actions > .popover-wrap:first-child .btn > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .topbar-title .segmented.range { order: 3; width: 100%; }
  .topbar-title { flex-wrap: wrap; }
  .gallery { padding: var(--space-16); }
  .gallery-label { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar, .switch-track, .switch-track::after { transition: none; }
}
/* Spec 083: a customer page never scrolls sideways at 360 px (the file field's own width was wider than the card). */
.public-card > *, .public-card .field { min-width: 0; }
.public-card input[type="file"] { width: 100%; max-width: 100%; }
.btn.secondary.loading::after, .btn.ghost.loading::after, .btn.icon.loading::after { color: var(--blueprint); }
.btn.money.loading::after { color: var(--light-ink); }
/* Spec 083 with 084: the owner's announcement under the top bar; colour and icon both carry the severity. */
.notice-banner { display: flex; align-items: center; gap: var(--space-12); padding: var(--space-8) var(--space-24); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--sky) 14%, var(--surface)); color: var(--text); }
.notice-banner p { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.notice-banner .notice-icon { display: grid; place-items: center; color: var(--blueprint); }
.notice-banner.warning { background: color-mix(in srgb, var(--amber) 18%, var(--surface)); }
.notice-banner.warning .notice-icon { color: var(--warn); }
.notice-banner.outage { background: color-mix(in srgb, var(--bad) 12%, var(--surface)); }
.notice-banner.outage .notice-icon { color: var(--bad); }
@media (max-width: 700px) { .notice-banner { padding: var(--space-8) var(--space-16); } }

/* Spec 083 part 2: the quotes table (views, filters, selection) and the editor beside the live preview. */
.view-tabs { flex-wrap: wrap; }
.view-tab { display: inline-flex; align-items: center; }
.view-tab .num { margin-left: var(--space-4); font-weight: 500; }
.quote-tools { align-items: end; }
.quote-tools #quote-search { flex: 1 1 260px; max-width: 420px; }
.save-view .control { min-width: 0; width: 220px; max-width: 100%; }
.quotes-table td, .quotes-table th { white-space: normal; }
.quotes-table .pick { width: 44px; padding-right: 0; }
.quotes-table .pick input { width: 18px; height: 18px; accent-color: var(--blueprint); }
.quotes-table th button { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; }
.quotes-table th.num button { justify-content: flex-end; }
.link-cell { background: none; border: 0; padding: 0; color: var(--blueprint); font-weight: 600; text-align: left; min-height: 36px; }
.link-cell:hover { text-decoration: underline; }
.quote-work { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr); gap: var(--space-16); align-items: start; }
.quote-work-head { grid-column: 1 / -1; }
.quote-work > .side { min-width: 0; }
.quote-paper-wrap { position: sticky; top: 88px; display: flex; flex-direction: column; gap: var(--space-8); min-width: 0; }
.small-label { display: inline-flex; align-items: center; gap: var(--space-4); font-size: var(--font-xs); font-weight: 600; }
.paper { display: flex; flex-direction: column; gap: var(--space-8); min-height: 480px; padding: var(--space-32); overflow-wrap: anywhere; }
.paper-head { display: flex; justify-content: space-between; gap: var(--space-12); padding-bottom: var(--space-12); border-bottom: 2px solid var(--line); }
.paper .lines { margin: var(--space-8) 0; }
.paper .lines tr.muted td { color: var(--muted); }
.paper-notes { white-space: pre-line; color: var(--muted); border-top: 1px solid var(--line); padding-top: var(--space-12); }
@media (max-width: 1023px) {
  .quote-work { grid-template-columns: 1fr; }
  .quote-paper-wrap { position: static; }
}
@media (max-width: 700px) {
  .paper { padding: var(--space-16); }
  .quotes-table th:nth-child(5), .quotes-table td:nth-child(5) { display: none; }
}

/* Spec 083 part 2: the three-pane inbox (UI plan 4.4): each pane scrolls on its own on a wide screen. */
.inbox-filters { padding: var(--space-12); border-bottom: 1px solid var(--line); gap: var(--space-8); }
.inbox-filters .row { align-items: center; }
.inbox-filters #inbox-search { flex: 1; min-width: 0; }
.inbox-filters .segmented button { padding: 0 var(--space-8); }
.channel-chips .chip { gap: 6px; min-height: 36px; padding: 0 10px; font-size: var(--font-xs); }
.key-list { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4) var(--space-12); padding: var(--space-8) var(--space-12); border-radius: var(--radius-input); background: var(--bg); }
.key-list div { display: flex; align-items: center; gap: var(--space-8); }
.key-list dt, .key-list dd { margin: 0; }
.lead-row { grid-template-columns: 12px minmax(0, 1fr); }
.lead-row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lead-row-top { display: flex; justify-content: space-between; gap: var(--space-8); }
.lead-row-meta { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-8); margin-top: var(--space-4); font-size: var(--font-xs); }
.list-row:hover { background: color-mix(in srgb, var(--sky) 8%, var(--surface)); }
.list-row.active:hover { background: color-mix(in srgb, var(--sky) 14%, var(--surface)); }
.inbox .more { margin: var(--space-12); }
.thread-head { align-items: flex-start; border-bottom: 1px solid var(--line); padding-bottom: var(--space-12); }
.thread-lines { display: flex; flex-direction: column; gap: var(--space-12); }
.thread .composer { position: sticky; bottom: 0; background: var(--surface); padding-top: var(--space-8); flex-wrap: wrap; }
.thread .composer #reply { flex: 1 1 200px; min-width: 0; }
@media (min-width: 1024px) {
  .inbox { height: calc(100vh - 140px); min-height: 520px; }
  .inbox > * { overflow-y: auto; }
  .inbox-filters { position: sticky; top: 0; z-index: 1; background: var(--surface); }
}
.line-edits { display: flex; flex-direction: column; gap: var(--space-12); }
.line-edit { display: grid; grid-template-columns: minmax(0, 1fr) 96px 140px 44px; gap: var(--space-8) var(--space-12); align-items: end; padding: var(--space-12); border: 1px solid var(--line); border-radius: var(--radius-input); }
.line-edit.flag { border-color: var(--warn); }
.line-edit .line-switches { grid-column: 1 / -1; gap: var(--space-4) var(--space-16); }
.line-edit .line-remove { align-self: end; }
@media (max-width: 700px) {
  .line-edit { grid-template-columns: 1fr 1fr 44px; }
  .line-edit .line-name { grid-column: 1 / -1; }
}

/* Spec 083 part 3: Reports. Bars are drawn to their percent through CSSOM ([data-width]). */
.reports-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: var(--space-16); align-items: start; }
.funnel, .bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-8); }
.funnel li, .bars li { display: grid; grid-template-columns: minmax(96px, 34%) minmax(0, 1fr) auto; align-items: center; gap: var(--space-12); }
.bar-label, .funnel-label { overflow-wrap: anywhere; }
.hbar { height: 12px; border-radius: 99px; background: color-mix(in srgb, var(--line) 60%, var(--surface)); overflow: hidden; }
.hbar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--primary); }
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-12); margin: 0; }
.stat-grid div { padding: var(--space-12); border: 1px solid var(--line); border-radius: var(--radius-input); }
.stat-grid dt { font-size: var(--font-xs); }
.stat-grid dd { margin: var(--space-4) 0 0; font-size: var(--font-xl); font-weight: 700; }
.hours { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 2px; margin-bottom: var(--space-4); }
.hour { height: 32px; border-radius: 3px; background: color-mix(in srgb, var(--line) 50%, var(--surface)); }
.hour.level-1 { background: color-mix(in srgb, var(--sky) 30%, var(--surface)); }
.hour.level-2 { background: color-mix(in srgb, var(--sky) 55%, var(--surface)); }
.hour.level-3 { background: color-mix(in srgb, var(--primary) 75%, var(--surface)); }
.hour.level-4 { background: var(--primary); }
.hours-axis { display: flex; justify-content: space-between; font-size: var(--font-xs); margin-bottom: var(--space-8); }
.gaps-panel .gap-item { border-top: 1px solid var(--line); padding-top: var(--space-12); }
@media (max-width: 700px) { .funnel li, .bars li { grid-template-columns: 1fr auto; } .funnel .hbar, .bars .hbar { grid-column: 1 / -1; grid-row: 2; } }

/* Spec 083 part 3: the week as an hours grid; on a narrow screen it scrolls inside its own box, never the page. */
.week-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--surface); box-shadow: var(--shadow-rest); }
.week-grid { display: grid; grid-template-columns: 64px repeat(7, minmax(96px, 1fr)); min-width: 760px; }
.week-day, .week-hours { display: flex; flex-direction: column; border-left: 1px solid var(--line); min-width: 0; }
.week-hours { border-left: 0; }
.week-day-head { font-size: var(--font-sm); font-weight: 650; padding: var(--space-12) var(--space-8); min-height: 48px; border-bottom: 1px solid var(--line); margin: 0; position: sticky; top: 0; background: var(--surface); }
.week-day.today .week-day-head { color: var(--blueprint); box-shadow: inset 0 -3px 0 var(--sky); }
.week-day-body, .week-hours-body { position: relative; height: 640px; }
.week-day-body { background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px); background-size: 100% calc(100% / 12); }
.week-day.today .week-day-body { background-color: color-mix(in srgb, var(--sky) 6%, var(--surface)); }
.week-hours-body span { position: absolute; right: var(--space-8); transform: translateY(-50%); font-size: var(--font-2xs); color: var(--muted); white-space: nowrap; }
.week-hours-body span:first-child { transform: none; }
.week-grid .block { position: absolute; left: 4px; right: 4px; margin: 0; padding: 4px 6px; overflow: hidden; font-size: var(--font-xs); line-height: 1.3; border-left: 3px solid var(--primary); min-height: 22px; }
.week-grid .block.visit { cursor: grab; }
.week-grid .block.visit:focus-visible { z-index: 2; }
.week-grid .block.travel { border-left-color: var(--muted); color: var(--text); background-color: var(--surface); }

/* Spec 083 part 3: the price book edits in place, like a spreadsheet. */
.cell-input { width: 100%; min-width: 72px; min-height: 40px; padding: 0 var(--space-8); border: 1px solid transparent; border-radius: var(--radius-input); background: transparent; color: var(--text); }
.cell-input:hover { border-color: var(--line); }
.cell-input:focus { border-color: var(--blueprint); background: var(--surface); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--sky) 45%, transparent); }
.cell-input[aria-invalid="true"] { border-color: var(--bad); }
.cell-input.num { text-align: right; }

/* Spec 083 part 3: Settings in sections beside their list; Studio's channel cards with their status. */
.settings-layout { display: grid; grid-template-columns: 220px minmax(0, 720px); gap: var(--space-24); align-items: start; }
.settings-nav { position: sticky; top: 88px; display: flex; flex-direction: column; gap: var(--space-12); }
.settings-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.settings-nav a { display: flex; align-items: center; min-height: 40px; padding: 0 var(--space-12); border-radius: var(--radius-input); color: var(--text); text-decoration: none; }
.settings-nav a:hover { background: color-mix(in srgb, var(--sky) 12%, transparent); }
.settings-section { scroll-margin-top: 88px; padding: var(--space-16); border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--surface); box-shadow: var(--shadow-rest); }
.channel-card { display: flex; flex-direction: column; gap: var(--space-8); }
.channel-card .status-pill { font-weight: 600; }
.channel-card.status-live .status-pill { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.channel-card.status-setup .status-pill { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); }
.channel-card.status-paused .status-pill { color: var(--muted); }
.channel-card .btn { align-self: flex-start; margin-top: auto; }
@media (max-width: 1023px) {
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { position: static; }
  .settings-nav ul { flex-direction: row; flex-wrap: wrap; }
}
@media (min-width: 1024px) and (max-width: 1279px) { .channels { grid-template-columns: repeat(2, 1fr); } }
.week-day-body { background-image: none; }
.week-day-body .hour-line { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--line); }
