/* Plaza — a theme for Pushpad's design library.
   Mid-century civic modernism for software: flat colour fields, a strict grid,
   one variable grotesk used at three widths, and geometric tiles that double as data marks. */

/* ---------- Tokens: light ---------- */
:root {
  color-scheme: light;

  /* Grounds and surfaces */
  --ground: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #e9edf2;
  --line: #d4dae3;
  --line-strong: #a9b3c2;

  /* Ink (text) */
  --ink: #141a33;
  --ink-2: #464e6b;
  --ink-3: #5d6582;

  /* The three fields */
  --ultramarine: #2b3fd0;
  --ultramarine-deep: #1c2a9c;
  --marigold: #f2b531;
  --viridian: #127f69;
  --mint: #8fdcc4;

  /* Roles */
  --accent: #2b3fd0;          /* links, selected text, focus */
  --action: #2b3fd0;          /* primary button fill */
  --action-hover: #1f30ad;
  --on-action: #ffffff;
  --field: #2b3fd0;           /* large colour fields */
  --on-field: #ffffff;
  --on-field-2: #d9defc;
  --rail: #161d4a;            /* app navigation rail */
  --rail-ink: #e6e9fb;
  --rail-ink-2: #a9b0de;
  --rail-active: #2b3fd0;
  --focus: #2b3fd0;
  --selection: #f2b531;
  --on-selection: #141a33;

  /* Status */
  --ok: #0e6b58;
  --ok-soft: #dcf2ea;
  --warn-ink: #7a4f00;
  --warn-soft: #fdf0cf;
  --info-soft: #e3e7fc;
  --danger: #b8302a;
  --danger-soft: #fbe5e3;

  /* Type */
  --font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --wide: 125%;
  --text: 100%;
  --dense: 87.5%;

  --t-xs: 0.8125rem;   /* 13 */
  --t-sm: 0.875rem;    /* 14 */
  --t-md: 1rem;        /* 16 */
  --t-lg: 1.125rem;    /* 18 */
  --t-xl: 1.375rem;    /* 22 */
  --t-2xl: 1.75rem;    /* 28 */
  --t-h2: clamp(1.875rem, 1.3rem + 2.2vw, 3.125rem);
  --t-display: clamp(2.375rem, 1.4rem + 3.6vw, 4.625rem);

  /* Space (4-unit base) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 144px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 9vw, 136px);

  /* Shape */
  --r-1: 4px;
  --r-2: 10px;
  --r-pill: 999px;
  --r-quarter: clamp(72px, 11vw, 180px);

  /* Depth: only for things that float above the page */
  --shadow-float: 0 2px 4px rgb(20 26 51 / 0.06), 0 12px 28px -6px rgb(20 26 51 / 0.18);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Tokens: dark ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ground: #0d1226;
    --surface: #141a33;
    --surface-2: #1b2242;
    --line: #2a3258;
    --line-strong: #46507c;
    --ink: #eef0f8;
    --ink-2: #b7bdd6;
    --ink-3: #9198b8;
    --ultramarine: #4357ec;
    --ultramarine-deep: #2433a8;
    --viridian: #2fb394;
    --accent: #9eabff;
    --action: #4b5ff0;
    --action-hover: #6072ff;
    --field: #2433a8;
    --on-field-2: #ccd3ff;
    --rail: #090d1d;
    --rail-ink: #e6e9fb;
    --rail-ink-2: #9aa2cf;
    --rail-active: #2433a8;
    --focus: #f2b531;
    --ok: #5fd0b2;
    --ok-soft: #12352f;
    --warn-ink: #f6c968;
    --warn-soft: #3a2e10;
    --info-soft: #1e2758;
    --danger: #ff8a80;
    --danger-soft: #3d1a1c;
    --shadow-float: 0 2px 4px rgb(0 0 0 / 0.3), 0 16px 32px -8px rgb(0 0 0 / 0.55);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #0d1226;
  --surface: #141a33;
  --surface-2: #1b2242;
  --line: #2a3258;
  --line-strong: #46507c;
  --ink: #eef0f8;
  --ink-2: #b7bdd6;
  --ink-3: #9198b8;
  --ultramarine: #4357ec;
  --ultramarine-deep: #2433a8;
  --viridian: #2fb394;
  --accent: #9eabff;
  --action: #4b5ff0;
  --action-hover: #6072ff;
  --field: #2433a8;
  --on-field-2: #ccd3ff;
  --rail: #090d1d;
  --rail-ink: #e6e9fb;
  --rail-ink-2: #9aa2cf;
  --rail-active: #2433a8;
  --focus: #f2b531;
  --ok: #5fd0b2;
  --ok-soft: #12352f;
  --warn-ink: #f6c968;
  --warn-soft: #3a2e10;
  --info-soft: #1e2758;
  --danger: #ff8a80;
  --danger-soft: #3d1a1c;
  --shadow-float: 0 2px 4px rgb(0 0 0 / 0.3), 0 16px 32px -8px rgb(0 0 0 / 0.55);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--line-strong) transparent; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-stretch: var(--text);
  font-size: var(--t-md);
  line-height: 1.55;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--accent);
  accent-color: var(--action);
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.08; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
::selection { background: var(--selection); color: var(--on-selection); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--s-4); top: -100px; z-index: 50; background: var(--action); color: var(--on-action); padding: var(--s-2) var(--s-4); border-radius: var(--r-1); }
.skip:focus { top: var(--s-4); }
.num { font-variant-numeric: tabular-nums; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Buttons ---------- */
.btn {
  --h: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: var(--h); padding: 0 var(--s-5);
  border: 1px solid transparent; border-radius: var(--r-1);
  font: inherit; font-weight: 650; font-size: var(--t-md); line-height: 1;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--action); color: var(--on-action); }
.btn--primary:hover { background: var(--action-hover); }
.btn--secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--secondary:hover { border-color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink-2); padding-inline: var(--s-3); }
.btn--ghost:hover { color: var(--ink); background: var(--surface-2); }
.btn--on-field { background: var(--on-field); color: var(--ultramarine-deep); }
.btn--on-field:hover { background: var(--marigold); color: #141a33; }
.btn--sm { --h: 36px; padding-inline: var(--s-4); font-size: var(--t-sm); }
.btn--danger { background: transparent; color: var(--danger); border-color: currentColor; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn[aria-busy="true"] { cursor: progress; }
.btn[aria-busy="true"]::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-1); border: 1px solid var(--line); background: transparent; color: var(--ink-2); cursor: pointer; transition: color 160ms, border-color 160ms; }
.icon-btn:hover { color: var(--ink); border-color: var(--line-strong); }

/* Theme toggle: shows the theme you would switch to */
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-stretch: var(--wide); font-size: 1.125rem; letter-spacing: -0.02em; }
.brand svg { width: 28px; height: 28px; }

/* ================= Landing ================= */
.site-nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--ground) 94%, transparent); border-bottom: 1px solid var(--line); }
.site-nav .wrap { display: flex; align-items: center; gap: var(--s-5); min-height: 68px; }
.site-nav nav { display: flex; gap: var(--s-1); margin-left: var(--s-5); }
.site-nav nav a { color: var(--ink-2); text-decoration: none; font-weight: 550; padding: var(--s-2) var(--s-3); border-radius: var(--r-1); }
.site-nav nav a:hover { color: var(--ink); background: var(--surface-2); }
.site-nav .end { margin-left: auto; display: flex; align-items: center; gap: var(--s-2); }
@media (max-width: 860px) { .site-nav nav { display: none; } .site-nav .signin { display: none; } }
@media (max-width: 400px) { .site-nav .btn--primary { padding-inline: var(--s-4); } }

/* Hero: copy column + the week poster on an ultramarine field */
.hero { padding-top: clamp(40px, 6vw, 88px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: end; }
.hero h1 { font-size: var(--t-display); font-weight: 800; font-stretch: var(--wide); letter-spacing: -0.035em; line-height: 0.98; }
.hero .lede { margin-top: var(--s-5); font-size: clamp(1.0625rem, 0.95rem + 0.45vw, 1.3125rem); color: var(--ink-2); max-width: 34ch; line-height: 1.5; }
.hero .actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-6); }
.hero .fine { margin-top: var(--s-4); font-size: var(--t-sm); color: var(--ink-3); }
.hero-copy { padding-bottom: clamp(8px, 3vw, 48px); }

.poster {
  background: var(--field); color: var(--on-field);
  border-radius: 0 var(--r-quarter) 0 0;
  padding: clamp(20px, 3.2vw, 40px) clamp(16px, 3vw, 40px) clamp(20px, 2.6vw, 32px);
}
.poster svg { width: 100%; height: auto; }
.poster .dow { fill: var(--on-field-2); font: 600 15px var(--font); font-stretch: var(--dense); letter-spacing: 0.02em; }
.poster .dot { fill: rgb(255 255 255 / 0.26); }
.poster .t-sq { fill: var(--marigold); }
.poster .t-q { fill: #ffffff; }
.poster .t-pill { fill: var(--mint); }
.poster .t-ring { fill: none; stroke: #ffffff; stroke-width: 5; }
.poster .today { fill: rgb(255 255 255 / 0.1); }
.legend { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin: var(--s-4) 0 0; padding: 0; list-style: none; font-size: var(--t-sm); color: var(--on-field-2); }
.legend li { display: inline-flex; align-items: center; gap: var(--s-2); }
.legend svg { width: 14px; height: 14px; }
.poster figcaption { margin-top: var(--s-3); font-size: var(--t-xs); color: var(--on-field-2); }

@media (prefers-reduced-motion: no-preference) {
  .poster .pt { animation: settle 900ms var(--ease) backwards; transform-box: fill-box; transform-origin: center; animation-delay: calc(var(--i, 0) * 45ms + 150ms); }
  @keyframes settle { from { opacity: 0; transform: scale(0.4); } }
}

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-copy { padding-bottom: 0; }
}

/* Section rhythm */
.band.band--mint { background: var(--mint); border: 0; --ink: #141a33; --ink-2: #1f3d36; --line-strong: rgb(20 26 51 / 0.35); color: var(--ink); }
.band--mint ::selection { background: #fff; }
.band--mint .step-mark--2 { background: #fff; }
.band.band--mint .steps::before { background: rgb(20 26 51 / 0.3); }
.band--mint :focus-visible { outline-color: #141a33; }
.band { background: var(--surface); border-block: 1px solid var(--line); }
.band .steps::before { background: var(--line); }
.section { padding-block: var(--section); }
.section-head { max-width: 760px; }
.section-head h2 { max-width: 18ch; }
.section-head h2, .h2 { font-size: var(--t-h2); font-weight: 800; font-stretch: var(--wide); letter-spacing: -0.03em; }
.section-head p { margin-top: var(--s-4); color: var(--ink-2); font-size: var(--t-lg); max-width: 52ch; }

/* Features: one large row, then a pair split by a rule */
.feature-lead { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: center; margin-top: var(--s-8); padding-bottom: var(--s-8); border-bottom: 1px solid var(--line); }
.feature h3 { font-size: var(--t-xl); font-weight: 750; font-stretch: 112%; letter-spacing: -0.015em; }
.feature p { margin-top: var(--s-3); color: var(--ink-2); max-width: 46ch; }
.feature-lead h3 { font-size: var(--t-2xl); }
.feature-pair { display: grid; grid-template-columns: 1fr 1fr; }
.feature-pair > .feature { padding-top: var(--s-7); }
.feature-pair > .feature + .feature { padding-left: clamp(24px, 4vw, 64px); border-left: 1px solid var(--line); }
.feature-pair > .feature:first-child { padding-right: clamp(24px, 4vw, 64px); }
.demo { margin-top: var(--s-5); }
@media (max-width: 820px) {
  .feature-lead, .feature-pair { grid-template-columns: 1fr; }
  .feature-pair > .feature + .feature { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); margin-top: var(--s-7); }
  .feature-pair > .feature:first-child { padding-right: 0; }
}

/* A colour field that holds a live-looking demo */
.stage { background: var(--marigold); padding: clamp(16px, 4vw, 48px); border-radius: var(--r-quarter) 0 0 0; }
.stage .picker { border-color: transparent; box-shadow: var(--shadow-float); }

/* Slot picker demo */
.picker { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); padding: clamp(16px, 2.4vw, 28px); }
.picker-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--s-1) var(--s-3); }
.picker-head span { white-space: nowrap; }
.picker-head strong { font-stretch: 112%; font-size: var(--t-lg); }
.picker-head span { color: var(--ink-3); font-size: var(--t-sm); }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-top: var(--s-4); }
.day { display: grid; gap: 2px; justify-items: center; padding: var(--s-2) 0; border-radius: var(--r-1); border: 1px solid var(--line); font-size: var(--t-xs); color: var(--ink-3); }
.day b { font-size: var(--t-md); color: var(--ink); font-weight: 650; }
.day.is-on { background: var(--ink); border-color: var(--ink); color: var(--surface-2); }
.day.is-on b { color: var(--surface); }
.day.is-full { text-decoration: line-through; opacity: 0.55; }
.slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); margin-top: var(--s-4); }
.slot { display: flex; justify-content: space-between; align-items: center; gap: var(--s-2); padding: 10px var(--s-3); border: 1px solid var(--line-strong); border-radius: var(--r-1); font-weight: 600; font-size: var(--t-sm); }
.slot small { color: var(--ink-3); font-weight: 500; }
.slot.is-picked { background: var(--action); border-color: var(--action); color: var(--on-action); }
.slot.is-picked small { color: inherit; opacity: 0.85; }
.slot.is-gone { color: var(--ink-3); border-style: dashed; }
@media (max-width: 460px) { .slots { grid-template-columns: 1fr 1fr; } }

/* Client card demo */
.client-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.client-list li { display: grid; grid-template-columns: 40px 1fr auto; gap: var(--s-3); align-items: center; padding: var(--s-3) 0; border-bottom: 1px solid var(--line); }
.client-list .who { font-weight: 650; }
.client-list .note { display: block; font-size: var(--t-sm); color: var(--ink-3); font-weight: 450; }
.client-list .count { font-size: var(--t-sm); color: var(--ink-2); }
.monogram { display: grid; place-items: center; width: 40px; height: 40px; font-weight: 750; font-stretch: var(--wide); font-size: var(--t-sm); color: #141a33; border-radius: 0 50% 0 0; }
.mg-1 { background: var(--marigold); }
.mg-2 { background: var(--mint); border-radius: 50%; }
.mg-3 { background: #c9d0fb; border-radius: 0 0 0 50%; }

/* Invoice demo */
.invoice { border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); }
.invoice-row { display: flex; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); font-size: var(--t-sm); }
.invoice-row:last-child { border-bottom: 0; }
.invoice-row.total { font-weight: 700; font-size: var(--t-md); }

/* Chips (status) */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: var(--r-pill); font-size: var(--t-xs); font-weight: 650; font-stretch: var(--dense); line-height: 1.4; white-space: nowrap; }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip--ok { background: var(--ok-soft); color: var(--ok); }
.chip--warn { background: var(--warn-soft); color: var(--warn-ink); }
.chip--info { background: var(--info-soft); color: var(--accent); }
.chip--muted { background: var(--surface-2); color: var(--ink-2); }
.chip--danger { background: var(--danger-soft); color: var(--danger); }

/* How it works: a sequence, so it is numbered */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); margin: var(--s-8) 0 0; padding: 0; list-style: none; counter-reset: step; position: relative; }
.steps::before { content: ""; position: absolute; left: 28px; right: 28px; top: 27px; height: 2px; background: var(--line-strong); }
.steps li { position: relative; }
.step-mark { position: relative; display: grid; place-items: center; width: 56px; height: 56px; font-weight: 800; font-stretch: var(--wide); font-size: var(--t-xl); color: #141a33; }
.step-mark--1 { background: var(--marigold); }
.step-mark--2 { background: var(--mint); border-radius: 0 56px 0 0; }
.step-mark--3 { background: var(--ultramarine); color: #fff; border-radius: 50%; }
.steps h3 { margin-top: var(--s-5); font-size: var(--t-xl); font-weight: 750; font-stretch: 112%; letter-spacing: -0.015em; }
.steps p { margin-top: var(--s-2); color: var(--ink-2); max-width: 36ch; }
@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; gap: var(--s-6); }
  .steps::before { left: 27px; right: auto; top: 28px; bottom: 28px; width: 2px; height: auto; }
  .steps li { display: grid; grid-template-columns: 56px 1fr; column-gap: var(--s-5); }
  .steps h3 { margin-top: 0; grid-column: 2; align-self: center; }
  .steps p { grid-column: 2; }
  .step-mark { grid-row: span 2; }
}

/* Pricing teaser: columns divided by rules, not cards */
.pricing { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: var(--s-7); border-top: 2px solid var(--ink); }
.plan { padding: var(--s-6) var(--s-5) var(--s-5) 0; display: flex; flex-direction: column; gap: var(--s-3); }
.plan + .plan { padding-left: var(--s-5); border-left: 1px solid var(--line); }
.plan-tiles { display: flex; gap: 4px; height: 32px; margin-bottom: var(--s-2); }
.plan-tiles i { display: block; width: 32px; height: 32px; }
.plan-tiles .pt-sq { background: var(--marigold); }
.plan-tiles .pt-q { background: var(--ultramarine); border-radius: 0 100% 0 0; }
.plan-tiles .pt-c { background: var(--viridian); border-radius: 50%; }
.plan h3 { font-size: var(--t-lg); font-weight: 700; font-stretch: 112%; }
.plan .price { font-size: var(--t-2xl); font-weight: 800; font-stretch: var(--wide); letter-spacing: -0.02em; line-height: 1; }
.plan .price small { font-size: var(--t-sm); font-weight: 500; font-stretch: var(--text); color: var(--ink-3); letter-spacing: 0; }
.plan p { color: var(--ink-2); font-size: var(--t-sm); }
.plan ul { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s-2); font-size: var(--t-sm); }
.plan li { display: flex; gap: var(--s-2); align-items: flex-start; }
.plan li .icon { width: 18px; height: 18px; color: var(--ok); margin-top: 2px; }
.plan .btn { margin-top: auto; align-self: flex-start; }
.plan.is-featured h3::after { content: "Most studios"; margin-left: var(--s-2); vertical-align: 2px; font-size: var(--t-xs); font-weight: 650; font-stretch: var(--dense); background: var(--marigold); color: #141a33; padding: 2px 8px; border-radius: var(--r-pill); }
.pricing-foot { margin-top: var(--s-5); color: var(--ink-2); }
@media (max-width: 820px) {
  .pricing { grid-template-columns: 1fr; }
  .plan, .plan + .plan { padding: var(--s-5) 0; border-left: 0; }
  .plan + .plan { border-top: 1px solid var(--line); }
}

/* Quotes: a marigold field with its quarter-round corner */
.quotes { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.quote-lead { background: var(--marigold); color: #141a33; padding: clamp(28px, 4.5vw, 64px); border-radius: 0 0 0 var(--r-quarter); }
.quote-lead blockquote { margin: 0; font-size: clamp(1.375rem, 1rem + 1.4vw, 2.125rem); font-weight: 700; font-stretch: 112%; letter-spacing: -0.02em; line-height: 1.22; }
.quote-lead figcaption, .quote figcaption { margin-top: var(--s-5); font-size: var(--t-sm); }
.quote-lead figcaption b { display: block; font-size: var(--t-md); }
.quote-side { display: grid; gap: var(--s-6); padding-top: var(--s-2); }
.quote { margin: 0; padding-bottom: var(--s-6); border-bottom: 1px solid var(--line); }
.quote:last-child { border-bottom: 0; }
.quote blockquote { margin: 0; font-size: var(--t-lg); line-height: 1.5; }
.quote figcaption { color: var(--ink-3); }
.quote figcaption b { color: var(--ink); font-weight: 650; }
.quotes-note { margin-top: var(--s-5); font-size: var(--t-xs); color: var(--ink-3); }
@media (max-width: 860px) { .quotes { grid-template-columns: 1fr; } }

/* Closing field + footer */
.closing { background: var(--field); color: var(--on-field); border-radius: 0 var(--r-quarter) 0 0; padding: clamp(40px, 6vw, 88px) clamp(24px, 5vw, 72px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-6); align-items: end; }
.closing h2 { font-size: var(--t-h2); font-weight: 800; font-stretch: var(--wide); letter-spacing: -0.03em; max-width: 16ch; }
.closing p { margin-top: var(--s-4); color: var(--on-field-2); max-width: 44ch; }
@media (max-width: 720px) { .closing { grid-template-columns: 1fr; } }
.site-foot { padding-block: var(--s-8) var(--s-7); }
.site-foot .cols { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: var(--s-6); }
.site-foot h2 { font-size: var(--t-sm); font-weight: 650; font-stretch: var(--dense); color: var(--ink-3); margin-bottom: var(--s-3); }
.site-foot ul { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s-2); }
.site-foot a { color: var(--ink); text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.site-foot .about p { margin-top: var(--s-3); color: var(--ink-2); max-width: 34ch; font-size: var(--t-sm); }
.site-foot .legal { margin-top: var(--s-7); padding-top: var(--s-4); border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3); font-size: var(--t-sm); color: var(--ink-3); }
@media (max-width: 760px) { .site-foot .cols { grid-template-columns: 1fr 1fr; } .site-foot .about { grid-column: 1 / -1; } }

/* ================= App shell ================= */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(to right, var(--rail) 248px, transparent 248px); }
.rail { background: var(--rail); color: var(--rail-ink); display: flex; flex-direction: column; padding: var(--s-5) var(--s-3); position: sticky; top: 0; height: 100vh; }
.rail .brand { color: var(--rail-ink); padding: 0 var(--s-3); }
.rail nav { margin-top: var(--s-7); display: grid; gap: 2px; }
.rail nav a { display: flex; align-items: center; gap: var(--s-3); padding: 10px var(--s-3); border-radius: var(--r-1); color: var(--rail-ink-2); text-decoration: none; font-weight: 550; transition: background-color 160ms, color 160ms; }
.rail nav a:hover { color: var(--rail-ink); background: rgb(255 255 255 / 0.06); }
.rail nav a[aria-current="page"] { background: var(--rail-active); color: #fff; }
.rail nav a .count { margin-left: auto; font-size: var(--t-xs); font-variant-numeric: tabular-nums; color: inherit; opacity: 0.8; }
.rail .rail-foot { margin-top: auto; display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3); border-top: 1px solid rgb(255 255 255 / 0.1); font-size: var(--t-sm); }
.rail .rail-foot .monogram { width: 34px; height: 34px; font-size: var(--t-xs); }
.rail .rail-foot div span { display: block; color: var(--rail-ink-2); font-size: var(--t-xs); }
.rail :focus-visible { outline-color: var(--marigold); }

.main { min-width: 0; }
.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); padding: var(--s-5) clamp(16px, 3vw, 40px); border-bottom: 1px solid var(--line); background: var(--surface); }
.topbar h1 { font-size: var(--t-2xl); font-weight: 800; font-stretch: var(--wide); letter-spacing: -0.025em; }
.topbar .sub { color: var(--ink-3); font-size: var(--t-sm); margin-top: 2px; }
.topbar .tools { margin-left: auto; display: flex; align-items: center; gap: var(--s-2); }
.menu-btn { display: none; }
.content { padding: clamp(16px, 3vw, 40px); display: grid; gap: clamp(16px, 2.4vw, 32px); }

.search { position: relative; }
.search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); width: 18px; height: 18px; pointer-events: none; }
.search input { padding-left: 38px; width: 240px; }

/* Stat strip: one panel, figures divided by rules */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); }
.stat { padding: var(--s-5); }
.stat + .stat { border-left: 1px solid var(--line); }
.stat dt { font-size: var(--t-sm); color: var(--ink-2); font-weight: 550; }
.stat dd { margin: var(--s-2) 0 0; font-size: var(--t-2xl); font-weight: 750; font-stretch: 112%; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .delta { display: block; margin-top: var(--s-1); font-size: var(--t-xs); font-weight: 550; font-stretch: var(--text); letter-spacing: 0; color: var(--ink-3); }
.stat .delta.up { color: var(--ok); }
.stat .delta.down { color: var(--danger); }

/* Panels */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); min-width: 0; }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: var(--t-lg); font-weight: 700; font-stretch: 112%; letter-spacing: -0.01em; }
.panel-head p { font-size: var(--t-sm); color: var(--ink-3); }
.panel-body { padding: var(--s-5); }
.panel-note { margin-top: var(--s-4); padding-top: var(--s-3); border-top: 1px solid var(--line); font-size: var(--t-sm); color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* Today: the one colour field in the app, a timeline of tiles */
.today-field { background: var(--field); color: var(--on-field); border-radius: 0 96px 0 0; padding: var(--s-5) clamp(20px, 3vw, 40px); display: grid; gap: var(--s-5); }
.tf-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-3) var(--s-6); padding-right: clamp(0px, 4vw, 48px); }
.tf-head h2 { font-size: var(--t-xl); font-weight: 800; font-stretch: var(--wide); letter-spacing: -0.02em; }
.tf-head p { color: var(--on-field-2); font-size: var(--t-sm); margin-top: 2px; }
.tf-next { margin-left: auto; display: grid; text-align: right; }
.tf-next b { color: #fff; font-size: var(--t-md); font-weight: 650; }
.today-field :focus-visible { outline-color: var(--marigold); }
.tf-line { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) 2px repeat(5, minmax(0, 1fr)); gap: var(--s-3); align-items: end; }
.tf-line li { display: grid; justify-items: center; gap: var(--s-2); font-size: var(--t-xs); font-weight: 600; font-stretch: var(--dense); color: var(--on-field-2); font-variant-numeric: tabular-nums; }
.ft { display: block; width: 32px; height: 32px; }
.ft-class { background: var(--marigold); }
.ft-private { background: #fff; border-radius: 0 100% 0 0; }
.ft-workshop { background: var(--mint); border-radius: 50%; }
.tf-line .is-past .ft { transform: scale(0.72); transform-origin: bottom center; }
.tf-line .is-past span { opacity: 0.8; }
.tf-line .is-next .ft { outline: 2px solid #fff; outline-offset: 4px; }
.tf-line .is-next span { color: #fff; font-weight: 750; }
.tf-now { width: 2px; height: 64px; background: var(--marigold); }
@media (max-width: 640px) {
  .tf-next { margin-left: 0; text-align: left; }
  .tf-line { gap: 6px; }
  .ft { width: 24px; height: 24px; }
  .tf-line li:not(.is-next) span { visibility: hidden; }
  .tf-now { height: 52px; }
}
.pair { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: clamp(16px, 2.4vw, 32px); }

/* Signature: the tile chart (each tile is one booking) */
.tilechart { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--s-2); align-items: end; }
.tilecol { display: flex; flex-direction: column-reverse; align-items: center; gap: 3px; }
.tilecol .stack { display: grid; grid-template-columns: repeat(2, 26px); gap: 4px; direction: rtl; align-content: end; }
.tile { display: block; width: 26px; height: 26px; flex: none; }
.keys .tile, .split .tile { width: 16px; height: 16px; }
@media (max-width: 520px) { .tilecol .stack { grid-template-columns: repeat(2, 17px); gap: 3px; } .tilecol .stack .tile { width: 17px; height: 17px; } }
.tile.k-class { background: var(--marigold); }
.tile.k-private { background: var(--ultramarine); border-radius: 0 100% 0 0; }
.tile.k-workshop { background: var(--viridian); border-radius: 50%; }
.tile.k-empty { box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.tilecol .lbl { margin-top: var(--s-2); font-size: var(--t-xs); font-weight: 600; font-stretch: var(--dense); color: var(--ink-3); }
.tilecol .n { font-size: var(--t-xs); font-weight: 650; color: var(--ink-2); font-variant-numeric: tabular-nums; margin-bottom: 2px; }
.tilecol.is-today .lbl { color: var(--ink); }
.tilecol.is-today .lbl { text-decoration: underline 2px; text-underline-offset: 5px; }
.keys { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin: var(--s-5) 0 0; padding: 0; list-style: none; font-size: var(--t-sm); color: var(--ink-2); }
.keys li { display: inline-flex; align-items: center; gap: var(--s-2); }

/* Field bar: a whole made of flat fields */
.fieldbar { display: flex; height: 56px; gap: 3px; }
.fieldbar span { display: block; min-width: 8px; }
.fieldbar .f1 { background: var(--marigold); }
.fieldbar .f2 { background: var(--ultramarine); }
.fieldbar .f3 { background: var(--viridian); border-radius: 0 28px 28px 0; }
.split { margin: var(--s-5) 0 0; display: grid; gap: 0; }
.split div { display: grid; grid-template-columns: 16px 1fr auto auto; gap: var(--s-3); align-items: center; padding: var(--s-3) 0; border-bottom: 1px solid var(--line); font-size: var(--t-sm); }
.split div:last-child { border-bottom: 0; }
.split dt { font-weight: 600; }
.split dd { margin: 0; font-variant-numeric: tabular-nums; color: var(--ink-2); text-align: right; }
.split dd.amt { color: var(--ink); font-weight: 650; min-width: 64px; }

/* Tabs */
.tabs { display: flex; gap: var(--s-1); }
.tab { position: relative; font: inherit; font-weight: 600; font-size: var(--t-sm); color: var(--ink-2); background: none; border: 0; padding: var(--s-2) var(--s-3); border-radius: var(--r-1); cursor: pointer; display: inline-flex; align-items: center; gap: var(--s-2); }
.tab:hover { color: var(--ink); background: var(--surface-2); }
.tab[aria-selected="true"] { color: var(--ink); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
.tab .n { font-size: var(--t-xs); color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* Table */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.data th { text-align: left; font-weight: 600; font-stretch: var(--dense); color: var(--ink-3); font-size: var(--t-xs); letter-spacing: 0.01em; padding: var(--s-3) var(--s-5); border-bottom: 1px solid var(--line); white-space: nowrap; }
.data td { padding: 14px var(--s-5); border-bottom: 1px solid var(--line); vertical-align: middle; }
.data tbody tr:last-child td { border-bottom: 0; }
.data tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.data .right { text-align: right; font-variant-numeric: tabular-nums; }
.data .who { font-weight: 650; }
.data .muted { color: var(--ink-3); display: block; font-size: var(--t-xs); }
.sort { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.sort:hover { color: var(--ink); }
.sort .icon { width: 14px; height: 14px; }
th[aria-sort="ascending"] .sort, th[aria-sort="descending"] .sort { color: var(--ink); }
th[aria-sort="descending"] .sort .icon { transform: scaleY(-1); }
.data .right .sort { flex-direction: row-reverse; }
.noresults td { text-align: center; padding: var(--s-7) var(--s-5); color: var(--ink-2); }

/* Empty state: teaches the feature, offers the next step */
.empty { display: grid; grid-template-columns: auto minmax(0, 46ch); gap: var(--s-5); align-items: center; padding: var(--s-8) var(--s-5); justify-content: center; }
.empty h3 { font-size: var(--t-lg); font-weight: 700; font-stretch: 112%; }
.empty p { margin-top: var(--s-2); color: var(--ink-2); }
.empty .btn { margin-top: var(--s-4); }
.empty-art { width: 96px; height: 96px; }
@media (max-width: 560px) { .empty { grid-template-columns: 1fr; justify-items: start; padding: var(--s-6) var(--s-5); } }

@media (max-width: 1080px) { .pair { grid-template-columns: 1fr; } .stats { grid-template-columns: 1fr 1fr; } .stat:nth-child(3) { border-left: 0; } .stat:nth-child(n+3) { border-top: 1px solid var(--line); } }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; background: none; }
  .topbar > div:not(.tools) { flex: 1; min-width: 0; }
  .rail { position: fixed; inset: 0 auto 0 0; width: min(280px, 85vw); z-index: 40; transform: translateX(-100%); visibility: hidden; transition: transform 220ms var(--ease), visibility 0s 220ms; }
  .rail.is-open { transform: none; visibility: visible; box-shadow: var(--shadow-float); transition: transform 220ms var(--ease); }
  .menu-btn { display: inline-grid; }
  .topbar .tools:has(.search) { margin-left: 0; width: 100%; }
  .topbar .tools .search { flex: 1; }
  .search input { width: 100%; }
  .scrim { position: fixed; inset: 0; background: rgb(9 13 29 / 0.5); z-index: 30; }
}
@media (max-width: 640px) {
  .data thead { display: none; }
  .data, .data tbody, .data tr, .data td { display: block; width: 100%; }
  .data tr { display: grid; grid-template-columns: 1fr auto; gap: 2px var(--s-3); padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--line); }
  .data td { padding: 0; border: 0; }
  .data td.c-when, .data td.c-service { grid-column: 1; color: var(--ink-2); }
  .data td.c-status { grid-column: 2; grid-row: 1; justify-self: end; }
  .data td.c-amount { grid-column: 2; grid-row: 2 / span 2; align-self: end; font-weight: 650; }
  .data tr.noresults { display: block; }
  .data tr.noresults td { padding: var(--s-6) 0; }
  .topbar .tools .btn--primary span { display: none; }
}

/* ================= Forms ================= */
.settings { display: grid; gap: 0; max-width: 980px; }
.settings-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: var(--s-6); padding-block: var(--s-7); border-top: 1px solid var(--line); margin: 0; border-inline: 0; border-bottom: 0; padding-inline: 0; min-width: 0; }
.settings-section:first-of-type { border-top: 0; padding-top: var(--s-2); }
.settings-section > legend { float: left; padding: 0; }
.section-intro h2 { font-size: var(--t-xl); font-weight: 750; font-stretch: 112%; letter-spacing: -0.015em; }
.section-intro p { margin-top: var(--s-2); color: var(--ink-2); font-size: var(--t-sm); max-width: 36ch; }
.fields { display: grid; gap: var(--s-5); min-width: 0; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
@media (max-width: 760px) { .settings-section { grid-template-columns: 1fr; gap: var(--s-4); } .row-2 { grid-template-columns: 1fr; } }

.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field > label, .label-row label, .label { font-weight: 600; font-size: var(--t-sm); }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-2); }
.optional { font-weight: 500; color: var(--ink-3); font-size: var(--t-xs); }
.help { font-size: var(--t-xs); color: var(--ink-3); line-height: 1.45; }
.input, select.input, textarea.input {
  width: 100%; min-height: 44px; padding: 10px 12px;
  font: inherit; font-size: var(--t-md); color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-1);
  transition: border-color 140ms, box-shadow 140ms;
}
textarea.input { min-height: 104px; resize: vertical; line-height: 1.5; }
.input::placeholder { color: var(--ink-3); opacity: 1; }
.input:hover { border-color: var(--ink-3); }
.input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 28%, transparent); }
.input:disabled { background: var(--surface-2); color: var(--ink-3); cursor: not-allowed; }
.input[aria-invalid="true"] { border-color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 25%, transparent); }
select.input { appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.affix { display: flex; align-items: stretch; }
.affix .pre { display: inline-flex; align-items: center; padding: 0 12px; border: 1px solid var(--line-strong); border-right: 0; border-radius: var(--r-1) 0 0 var(--r-1); background: var(--surface-2); color: var(--ink-2); font-size: var(--t-sm); white-space: nowrap; }
.affix .input { border-radius: 0 var(--r-1) var(--r-1) 0; min-width: 0; }
.error { display: flex; gap: 6px; align-items: flex-start; font-size: var(--t-sm); color: var(--danger); font-weight: 550; }
.error .icon { width: 16px; height: 16px; margin-top: 2px; }
.error[hidden] { display: none; }
.counter { font-size: var(--t-xs); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.counter.is-over { color: var(--danger); font-weight: 650; }

/* Switch: a real checkbox, drawn */
.switch-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-4); align-items: start; padding: var(--s-4) 0; border-bottom: 1px solid var(--line); }
.switch-row:first-child { padding-top: 0; }
.switch-row .label { display: block; }
.switch-row .help { margin-top: 2px; font-size: var(--t-sm); }
.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch .track { position: absolute; inset: 0; border-radius: var(--r-pill); background: var(--line-strong); transition: background-color 180ms var(--ease); }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(20 26 51 / 0.3); transition: transform 180ms var(--ease); }
.switch input:checked + .track { background: var(--action); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 2px solid var(--focus); outline-offset: 3px; }
.switch input:disabled + .track { opacity: 0.45; }
.reveal { padding: var(--s-4) 0 var(--s-2); }
.reveal[hidden] { display: none; }

.choices { display: grid; gap: var(--s-2); border: 0; margin: 0; padding: 0; min-width: 0; }
.choices legend { padding: 0; margin-bottom: var(--s-2); }
.choice { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-1); cursor: pointer; }
.choice:hover { border-color: var(--line-strong); }
.choice:has(input:checked) { border-color: var(--action); background: color-mix(in srgb, var(--action) 7%, var(--surface)); }
.choice input { appearance: none; width: 20px; height: 20px; margin: 1px 0 0; flex: none; border-radius: 50%; border: 1.5px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; cursor: pointer; }
.choice input::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--action); transform: scale(0); transition: transform 160ms var(--ease); }
.choice input:checked { border-color: var(--action); }
.choice input:checked::before { transform: scale(1); }
.choice b { display: block; font-weight: 600; font-size: var(--t-sm); }
.choice span { font-size: var(--t-sm); color: var(--ink-2); }

.error-summary:focus-visible { outline-offset: 4px; }
.error-summary { border: 1px solid var(--danger); background: var(--danger-soft); border-radius: var(--r-2); padding: var(--s-4) var(--s-5); color: var(--ink); }
.error-summary h2 { font-size: var(--t-md); font-weight: 700; color: var(--danger); display: flex; gap: var(--s-2); align-items: center; }
.error-summary ul { margin: var(--s-2) 0 0; padding-left: var(--s-6); }
.error-summary a { color: var(--ink); }
.error-summary[hidden], .notice[hidden] { display: none; }
.notice { display: flex; gap: var(--s-3); align-items: center; border: 1px solid var(--ok); background: var(--ok-soft); border-radius: var(--r-2); padding: var(--s-3) var(--s-5); color: var(--ink); font-size: var(--t-sm); }
.notice .icon { color: var(--ok); }

.savebar { position: sticky; bottom: 0; z-index: 10; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-4) clamp(16px, 3vw, 40px); background: var(--surface); border-top: 1px solid var(--line); }
.savebar .status { font-size: var(--t-sm); color: var(--ink-2); display: inline-flex; align-items: center; gap: var(--s-2); }
.savebar .status::before { content: ""; width: 8px; height: 8px; background: var(--marigold); border-radius: 0 8px 0 0; }
.savebar .status.is-clean::before { background: var(--ok); border-radius: 50%; }
.savebar .btns { display: flex; gap: var(--s-2); }

.danger-zone { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-4); padding: var(--s-5); border: 1px solid var(--line); border-radius: var(--r-2); }
.danger-zone b { display: block; }
.danger-zone p { color: var(--ink-2); font-size: var(--t-sm); margin-top: 2px; max-width: 48ch; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}
