/* Bloomback — quiet luxury, in the manner of Apple: system type, generous space, soft depth,
   one accent used sparingly: forest green in light mode, gold in dark mode (the logo's two
   colors). Light and dark. */

:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #f5f5f7;
  --fill: rgba(118, 118, 128, .12);
  --text: #1d1d1f;
  --muted: #6e6e73;
  --faint: #86868b;
  --border: rgba(0, 0, 0, .08);
  --hairline: rgba(0, 0, 0, .06);
  --accent: #1f6b52;
  --accent-soft: rgba(31, 107, 82, .10);
  --accent-strong: #154a39;
  --gold: #b8913f;
  --ink: #1d1d1f;          /* primary buttons */
  --on-ink: #ffffff;
  --good: #1f8a3b;
  --good-soft: rgba(31, 138, 59, .10);
  --error: #d70015;
  --error-soft: rgba(215, 0, 21, .08);
  --warning: #b25000;
  --warning-soft: rgba(178, 80, 0, .10);
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 6px 24px rgba(0, 0, 0, .05);
  --shadow-hover: 0 2px 6px rgba(0, 0, 0, .06), 0 14px 40px rgba(0, 0, 0, .08);
  --radius: 20px;
  --radius-sm: 12px;
  --glass: rgba(255, 255, 255, .72);
  --segment: #ffffff;
  --segment-hover: rgba(255, 255, 255, .5);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-2: #2c2c2e;
    --fill: rgba(118, 118, 128, .24);
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --faint: #8e8e93;
    --border: rgba(255, 255, 255, .10);
    --hairline: rgba(255, 255, 255, .08);
    --accent: #d9b56b;
    --accent-soft: rgba(217, 181, 107, .14);
    --accent-strong: #ecd096;
    --gold: #d9b56b;
    --ink: #f5f5f7;
    --on-ink: #1d1d1f;
    --good: #30d158;
    --good-soft: rgba(48, 209, 88, .14);
    --error: #ff453a;
    --error-soft: rgba(255, 69, 58, .14);
    --warning: #ff9f0a;
    --warning-soft: rgba(255, 159, 10, .14);
    --shadow: 0 0 0 1px rgba(255, 255, 255, .06);
    --shadow-hover: 0 0 0 1px rgba(255, 255, 255, .14);
    --glass: rgba(22, 22, 23, .72);
    --segment: #636366;
    --segment-hover: rgba(255, 255, 255, .08);
    color-scheme: dark;
  }
}

/* ---- Base ---------------------------------------------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.47 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
}
::selection { background: var(--accent-soft); }
main { max-width: 1120px; margin: 0 auto; padding: 32px 24px 80px; }
h1, h2, h3 { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", Roboto, "Helvetica Neue", sans-serif; }
h1 { font-size: 2.1rem; line-height: 1.1; font-weight: 700; letter-spacing: -0.03em; margin: 0 0 12px; }
h2 { font-size: 1.2rem; line-height: 1.25; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 6px; }
h3 { font-size: .95rem; font-weight: 600; letter-spacing: -0.01em; margin: 22px 0 8px; }
p { margin: 0 0 10px; }
a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent-strong); }
h2 a { color: inherit; }
.muted { color: var(--muted); }
.small { font-size: .82rem; letter-spacing: -0.005em; }
.error { color: var(--error); }
.good { color: var(--good); }
.bad, .figure.bad, .value.bad, td.bad, li.bad { color: var(--error); }
section { margin: 20px 0; }
:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 2px; border-radius: 8px; }

/* ---- Top bar: translucent, like Apple's navigation ------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  height: 56px; padding: 0 max(24px, calc((100vw - 1120px) / 2 + 24px));
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text);
         font-weight: 600; font-size: 1.05rem; letter-spacing: -0.02em; }
.brand:hover { color: var(--text); }
.brand::before { content: ""; width: 24px; height: 26px; background: url("/static/brand/logo.svg") center / contain no-repeat; }
@media (prefers-color-scheme: dark) {
  .brand::before { background-image: url("/static/brand/logo-dark.svg"); }
}
.brand.has-logo::before { content: none; }
.brand img { height: 30px; width: auto; max-width: 180px; object-fit: contain; display: block; }
.brand .by { color: var(--faint); font-size: .75rem; font-weight: 500; letter-spacing: 0; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 4px; }
.swatch { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; margin: 0; cursor: pointer;
  font-size: .78rem; font-weight: 500; color: var(--muted); }
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch .chip { width: 44px; height: 44px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
  transition: transform .15s, box-shadow .15s; }
.swatch input:checked + .chip { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--text); transform: scale(1.04); }
.swatch input:focus-visible + .chip { outline: 3px solid var(--accent-soft); outline-offset: 4px; }
.swatch input[type="color"] { position: static; opacity: 1; pointer-events: auto; width: 44px; height: 44px; padding: 0;
  border-radius: 50%; border: 0; background: none; margin: 0; }
.swatch input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.swatch input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.swatch input[type="color"]::-moz-color-swatch { border: 0; border-radius: 50%; }
.swatch:has(input[value="custom"]:checked) input[type="color"] { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--text); }
input[type="file"] { padding: 8px; font-size: .9rem; color: var(--muted); }
input[type="file"]::file-selector-button { font: inherit; font-weight: 500; margin-right: 12px; padding: 8px 16px; border: 0;
  border-radius: 980px; background: var(--accent-soft); color: var(--accent-strong); cursor: pointer; }
.brand-preview { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.logo-preview { max-height: 56px; max-width: 220px; border-radius: 10px; background: var(--surface-2); padding: 8px; }
.topbar nav { display: flex; gap: 22px; align-items: center; font-size: .85rem; }
.topbar nav a, .topbar button.link { color: var(--muted); }
.topbar nav a:hover, .topbar button.link:hover { color: var(--text); }
.topbar form { margin: 0; }

/* ---- Surfaces ---------------------------------------------------------------------------- */
.card { background: var(--surface); border-radius: var(--radius); padding: 24px 26px;
        box-shadow: var(--shadow); }
.stat { background: var(--surface); border-radius: var(--radius); padding: 18px 20px;
        box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stat .label { color: var(--muted); font-size: .8rem; font-weight: 500; letter-spacing: -0.005em; }
.stat .value { font-size: 1.85rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1.15;
               font-variant-numeric: tabular-nums; }
.value.small-value { font-size: 1.15rem; letter-spacing: -0.02em; }
.stat .value a { color: inherit; }
.figure { font-size: 2.6rem; font-weight: 600; letter-spacing: -0.035em; line-height: 1.1; margin: 6px 0;
          font-variant-numeric: tabular-nums; }
.figure .muted { font-size: 1.05rem; font-weight: 400; letter-spacing: -0.01em; }
.figure.good { color: var(--good); }
a.card.link, a.stat.link { color: inherit; transition: box-shadow .25s, transform .25s; }
a.card.link:hover, a.stat.link:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
a.card.link:focus-visible, a.stat.link:focus-visible, a.hero-head:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 3px; }
.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.grid.four { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.grid.compact { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.grid.compact .stat { background: var(--surface-2); box-shadow: none; padding: 14px 16px; }
.grid.compact .stat .value { font-size: 1.4rem; }
.narrow { max-width: 420px; margin: 10vh auto; padding: 40px 36px 32px; }
.narrow h1 { font-size: 1.9rem; margin-bottom: 6px; }
.narrow h1::before { content: ""; display: block; width: 60px; height: 60px; margin-bottom: 22px;
  background: url("/static/brand/icon.svg") center / contain no-repeat; border-radius: 14px;
  box-shadow: 0 10px 28px rgba(24, 58, 47, .28); }
.narrow form { margin-top: 22px; }
.narrow button[type="submit"] { width: 100%; min-height: 46px; margin-top: 8px; font-size: 1rem; }
.narrow form + p { margin-top: 16px; text-align: center; }
.narrow-wide { max-width: 580px; }
.locked-card { max-width: 660px; }
.locations { list-style: none; padding: 0; display: grid; gap: 14px; margin: 20px 0; }

/* ---- Navigation: segmented control ------------------------------------------------------- */
.tabs { display: flex; gap: 2px; padding: 3px; margin: 10px 0 26px; width: max-content; max-width: 100%;
        overflow-x: auto; scrollbar-width: none; background: var(--fill); border-radius: 12px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; padding: 7px 16px; border-radius: 9px; color: var(--text); font-size: .88rem;
          font-weight: 500; white-space: nowrap; transition: background .2s, box-shadow .2s; }
.tabs a:hover { color: var(--text); background: var(--segment-hover); }
.tabs a[aria-current="page"] { background: var(--segment); box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 0 0 .5px rgba(0, 0, 0, .04); }
.tabs a.locked { color: var(--faint); }
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 18px; }
.pills a { padding: 7px 14px; border-radius: 980px; background: var(--fill); color: var(--text);
           font-size: .86rem; font-weight: 500; transition: background .2s; }
.pills a:hover { color: var(--text); background: var(--accent-soft); }
.pills a[aria-current="page"] { background: var(--ink); color: var(--on-ink); }
.pills .count { opacity: .6; margin-left: 4px; font-variant-numeric: tabular-nums; }
.small-pills a { padding: 4px 11px; font-size: .8rem; }
main > p:first-child a, .card + p a { font-size: .9rem; }

.location-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.location-bar > a { font-size: .9rem; }
.switcher { display: inline-flex; gap: 2px; padding: 3px; background: var(--fill); border-radius: 980px; }
.switcher a { padding: 5px 16px; border-radius: 980px; color: var(--text); font-size: .85rem; font-weight: 500; white-space: nowrap; transition: background .2s; }
.switcher a:hover { color: var(--text); background: var(--segment-hover); }
.switcher a[aria-current="page"] { background: var(--ink); color: var(--on-ink); }

/* ---- Buttons and fields ------------------------------------------------------------------ */
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-size: .92rem; font-weight: 500; letter-spacing: -0.01em;
  padding: 9px 20px; min-height: 38px; border: 0; border-radius: 980px;
  background: var(--ink); color: var(--on-ink); cursor: pointer; text-decoration: none;
  transition: transform .12s, opacity .15s, background .2s; }
button:hover, .button:hover { opacity: .88; color: var(--on-ink); }
button:active, .button:active { transform: scale(.98); }
.button.secondary, button.secondary-button { background: var(--accent-soft); color: var(--accent-strong); }
.button.secondary:hover, button.secondary-button:hover { color: var(--accent-strong); background: color-mix(in srgb, var(--accent) 16%, transparent); opacity: 1; }
button.danger { background: var(--error-soft); color: var(--error); }
button.danger:hover { color: var(--error); }
button.link { background: none; color: var(--accent); padding: 0; min-height: 0; border-radius: 0; font-weight: 400; }
button.link.small { font-size: .85rem; }
label { display: block; margin: 14px 0; font-size: .9rem; font-weight: 500; color: var(--text); min-width: 0; }
input, select, textarea { display: block; width: 100%; margin-top: 6px; padding: 11px 14px;
  font: inherit; font-size: 1rem; color: var(--text); background: var(--surface-2);
  border: 1px solid transparent; border-radius: var(--radius-sm); transition: border-color .2s, box-shadow .2s, background .2s; }
input:hover, select:hover, textarea:hover { background: var(--fill); }
input:focus, select:focus, textarea:focus { outline: none; background: var(--surface); border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft); }
input:disabled, select:disabled, textarea:disabled { opacity: .6; }
select { appearance: none; -webkit-appearance: none; padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
textarea { line-height: 1.5; resize: vertical; }
input[type="radio"], input[type="checkbox"] { width: auto; display: inline; margin: 0; accent-color: var(--accent); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.field { margin: 16px 0; }
.field-label { display: block; font-weight: 500; font-size: .9rem; margin-bottom: 8px; }
.days { display: flex; flex-wrap: wrap; gap: 8px; }
label.day, label.inline { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 500; font-size: .88rem;
  padding: 8px 14px; border-radius: 980px; background: var(--surface-2); cursor: pointer; }
label.day:has(input:checked), label.inline:has(input:checked) { background: var(--accent-soft); color: var(--accent-strong); }
label.day input, label.inline input { width: auto; margin: 0; display: inline; }
.narrow-field { max-width: 340px; }
td input { margin: 0; min-width: 90px; padding: 8px 10px; }
input.lead-input { width: 76px; min-width: 0; margin: 0; padding: 7px 10px; text-align: right; }
form.search { display: flex; gap: 8px; margin: 4px 0 18px; max-width: 520px; }
form.search input { margin: 0; padding-left: 42px; border-radius: 980px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2386868b' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5.2'/%3E%3Cpath d='m11 11 3.5 3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 16px 50%; }
form.search button { flex: none; }
.goals-form label { margin: 12px 0; }

/* ---- Notices and badges ------------------------------------------------------------------ */
.notice { background: var(--warning-soft); color: var(--text); padding: 13px 18px; border-radius: 14px; font-size: .92rem; }
.good-notice { background: var(--good-soft); }
.bad-notice { background: var(--error-soft); }
.muted-notice { background: var(--fill); color: var(--muted); }
.notice input { margin: 10px 0; background: var(--surface); }
.alerts { display: grid; gap: 8px; }
.alerts .notice { margin: 0; }
.badge { display: inline-flex; align-items: center; font-size: .72rem; font-weight: 600; letter-spacing: .01em;
  padding: 3px 9px; border-radius: 980px; background: var(--fill); color: var(--muted); margin-left: 6px; vertical-align: middle; white-space: nowrap; }
.badge.custom { background: var(--accent-soft); color: var(--accent-strong); }
.badge.bad { background: var(--error-soft); color: var(--error); }
.package { color: var(--accent); font-weight: 500; }

/* ---- Tables -------------------------------------------------------------------------------- */
.scroll { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: .93rem; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
th { color: var(--faint); font-weight: 500; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; border-bottom-color: var(--border); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .15s; }
tbody tr:hover td { background: color-mix(in srgb, var(--fill) 35%, transparent); }
.num { text-align: right; white-space: nowrap; }
table.breakdown tr.total td { font-weight: 600; border-top: 1px solid var(--text); }
table.profit tr.losing td:first-child a { color: var(--error); }
/* Team: the name keeps its line; the usual treatments sit under it, cut to two lines. */
td.who { min-width: 170px; max-width: 240px; }
/* Many columns: headers may wrap («EST. COMMISSION» in two lines) and cells sit closer. */
th.num { white-space: normal; }
table.team th, table.team td { padding-left: 7px; padding-right: 7px; }
td.who a { white-space: nowrap; }
td.who .services { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-top: 2px; line-height: 1.35; }
table.compare td.good { color: var(--good); font-weight: 600; }
table.compare td.bad { color: var(--error); font-weight: 600; }
tr.upcoming td { background: var(--accent-soft); }
.bar { height: 6px; border-radius: 980px; background: var(--fill); overflow: hidden; margin: 10px 0; }
.bar span { display: block; height: 100%; border-radius: 980px; background: linear-gradient(90deg, var(--accent), var(--accent-strong)); }
.bar.over span { background: var(--error); }
.bar-cell { width: 45%; }
.bar-cell .bar { margin: 0; }

/* ---- Lists of people ---------------------------------------------------------------------- */
ul.people { list-style: none; padding: 0; margin: 4px 0 0; }
ul.people li { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 14px 0; border-bottom: 1px solid var(--hairline); }
ul.people li:last-child { border-bottom: 0; }
ul.people .who { flex: 1 1 320px; min-width: 0; }
ul.people .who strong { font-weight: 600; letter-spacing: -0.015em; }
ul.people .who a { color: var(--text); }
ul.people .who a:hover { color: var(--accent); }
.actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; white-space: nowrap; }
.actions form { margin: 0; }
.actions button, .actions .button { padding: 7px 16px; min-height: 34px; font-size: .86rem; }
.facts { padding-left: 0; list-style: none; margin: 8px 0; }
.facts li { margin: 0; padding: 9px 0; border-bottom: 1px solid var(--hairline); }
.facts li:last-child { border-bottom: 0; }
summary { cursor: pointer; font-weight: 600; letter-spacing: -0.015em; list-style: none; display: flex; align-items: center; gap: 10px; }
summary::-webkit-details-marker { display: none; }
summary::before { content: ""; width: 7px; height: 7px; border-right: 1.8px solid var(--muted); border-bottom: 1.8px solid var(--muted);
  transform: rotate(-45deg); transition: transform .2s; flex: none; }
details[open] > summary::before { transform: rotate(45deg); }
details > summary + * { margin-top: 12px; }
details.checklist { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--hairline); }
details.checklist ul { list-style: none; padding: 0; margin: 8px 0 0; }
details.checklist li { padding: 5px 0; font-size: .92rem; }
details.checklist li.done { color: var(--faint); }

/* ---- Page structure ----------------------------------------------------------------------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.toolbar h1 { margin: 0; }
.toolbar .pills { margin: 0; }
.table-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.month-head { display: flex; align-items: center; gap: 14px; }
.month-head h1 { margin: 0; }
.arrow { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  font-size: 1.35rem; line-height: 1; border-radius: 50%; background: var(--fill); color: var(--text); transition: background .2s; }
.arrow:hover { background: var(--accent-soft); color: var(--accent-strong); }
.arrow.disabled { opacity: .3; }
.month-actions { margin: 10px 0 0; }
.hero { padding: 28px 30px; }
.hero-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; color: inherit; }
.hero-head:hover { color: inherit; }
.hero .figure { font-size: 3.4rem; letter-spacing: -0.045em; }
.more { color: var(--accent); font-size: .88rem; white-space: nowrap; font-weight: 500; }
.goal-line { font-size: .78rem; color: var(--muted); font-weight: 500; }
.goal-line::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: middle; }
.goal-line.good { color: var(--good); }
.goal-line.bad { color: var(--error); }

/* ---- Charts ------------------------------------------------------------------------------- */
svg.pace { width: 100%; height: auto; display: block; margin-top: 14px; overflow: visible; }
svg.pace .axis { stroke: var(--hairline); }
svg.pace .goal { stroke: var(--border); stroke-dasharray: 2 5; }
svg.pace .road { fill: none; stroke: var(--faint); stroke-width: 1.4; stroke-dasharray: 4 5; }
svg.pace .area { fill: var(--accent); opacity: .10; }
svg.pace .actual { fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
svg.pace .projection { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 2 5; stroke-linecap: round; opacity: .7; }
svg.pace .dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2.5; }
svg.pace text { fill: var(--faint); font-size: 7.5px; letter-spacing: 0; }
.legend { display: flex; gap: 6px 16px; align-items: center; flex-wrap: wrap; margin: 8px 0 0; }
.key { display: inline-block; width: 18px; height: 0; border-top: 2.5px solid var(--accent); margin-right: 5px; vertical-align: middle; border-radius: 2px; }
.key.road { border-top: 1.5px dashed var(--faint); }
.key.projection { border-top: 2px dotted var(--accent); }
.bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; align-items: end; height: 150px; margin: 12px 0; }
.bar-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; min-width: 0; }
.bar-fill { width: 100%; max-width: 30px; min-height: 3px; border-radius: 7px;
  background: linear-gradient(180deg, var(--accent-strong), var(--accent)); opacity: .9; }
.bar-value { font-variant-numeric: tabular-nums; font-weight: 500; }
.bar-label { color: var(--faint); }
.agenda-bars { height: 132px; gap: 6px; }
.agenda-bars .bar-label { text-align: center; line-height: 1.25; }
.bar-col.low .bar-fill { background: linear-gradient(180deg, #ffb340, var(--warning)); }
.bar-col.low .bar-value { color: var(--warning); font-weight: 600; }

/* ---- Side panel (drawer) ------------------------------------------------------------------ */
dialog.drawer { margin: 0 0 0 auto; height: 100vh; max-height: 100vh; width: min(600px, 100vw); max-width: 100vw;
  border: 0; padding: 28px 28px 40px; background: var(--bg); color: var(--text);
  border-radius: 24px 0 0 24px; box-shadow: -20px 0 60px rgba(0, 0, 0, .18); overflow-y: auto; }
dialog.drawer::backdrop { background: rgba(0, 0, 0, .28); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
dialog.drawer[open] { animation: slide-in .32s cubic-bezier(.32, .72, 0, 1); }
@keyframes slide-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
dialog.drawer .close { position: sticky; top: 0; float: right; z-index: 2; width: 32px; height: 32px; min-height: 0; padding: 0;
  border-radius: 50%; background: var(--fill); color: var(--text); font-size: 1.15rem; line-height: 1;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
dialog.drawer h2 { font-size: 1.5rem; letter-spacing: -0.03em; margin-bottom: 4px; }
dialog.drawer table, dialog.drawer ul.people { background: var(--surface); border-radius: 16px; margin: 14px 0; }
dialog.drawer table td:first-child, dialog.drawer table th:first-child { padding-left: 16px; }
dialog.drawer table td:last-child, dialog.drawer table th:last-child { padding-right: 16px; }
dialog.drawer ul.people { padding: 0 16px; }
dialog.drawer .facts { background: var(--surface); border-radius: 16px; padding: 4px 16px; }
@media (prefers-reduced-motion: reduce) {
  dialog.drawer[open] { animation: none; }
  a.card.link:hover, a.stat.link:hover { transform: none; }
  * { transition: none !important; }
}

/* ---- Phones -------------------------------------------------------------------------------- */
@media (max-width: 640px) {
  body { font-size: 16px; }
  main { padding: 20px 16px 64px; }
  .topbar { padding: 0 16px; }
  .topbar nav { gap: 14px; }
  h1 { font-size: 1.7rem; }
  .figure { font-size: 2.1rem; }
  .hero .figure { font-size: 2.6rem; }
  .card, .hero { padding: 18px 18px; border-radius: 18px; }
  .stat { padding: 14px 16px; border-radius: 18px; }
  .stat .value { font-size: 1.55rem; }
  .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .wide-only { display: none; }
  th, td { padding: 9px 6px; }
  .tabs { margin-bottom: 20px; }
  dialog.drawer { border-radius: 0; padding: 20px 16px 32px; }
  svg.pace text { font-size: 10px; }
}

/* Manual (/help): long reading, so a narrower measure and quiet section cards. */
.help { max-width: 760px; }
.help h1 { margin-bottom: 4px; }
.help .card { margin-bottom: 18px; }
.help h3 { font-size: 1rem; font-weight: 600; margin: 18px 0 4px; }
.help p, .help li { line-height: 1.6; }
.help ol, .help ul { padding-left: 1.3em; margin: 6px 0 10px; }
.help li + li { margin-top: 4px; }
.help .toc { columns: 2; column-gap: 32px; padding-left: 1.1em; }
@media (max-width: 640px) { .help .toc { columns: 1; } }
.help dt { font-weight: 600; margin-top: 12px; }
.help dd { margin: 2px 0 0; color: var(--text); line-height: 1.6; }
.help .path { font-weight: 600; }
.help .tip { border-left: 3px solid var(--accent); padding: 4px 0 4px 12px; margin: 10px 0; }

/* Plans: the one in use is outlined in the accent. */
.plan-card { display: flex; flex-direction: column; }
.plan-card form, .plan-card button { margin-top: auto; }
.plan-card.current { box-shadow: 0 0 0 2px var(--accent); }

/* Public site: the landing page, pricing and the legal pages. */
.site-hero { text-align: center; padding: 48px 0 28px; max-width: 760px; margin: 0 auto; }
.site-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); letter-spacing: -0.04em; line-height: 1.05; margin: 14px 0 12px; }
.site-mark { border-radius: 16px; }
.lead { font-size: 1.15rem; color: var(--muted); line-height: 1.55; }
.site-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 22px 0 8px; }
.site-feature { display: grid; grid-template-columns: 1fr 1.6fr; gap: 36px; align-items: center; margin: 56px 0; }
.site-feature.flip > div { order: 2; }
.site-feature h2 { font-size: 1.6rem; letter-spacing: -0.03em; }
.site-feature p { color: var(--muted); line-height: 1.6; }
.site-feature img { width: 100%; height: auto; border-radius: 14px; box-shadow: var(--shadow-hover, 0 12px 40px rgba(0,0,0,.12)); }
@media (max-width: 760px) { .site-feature { grid-template-columns: 1fr; gap: 16px; margin: 36px 0; } .site-feature.flip > div { order: 0; } }
.site-steps { padding-left: 1.2em; line-height: 1.7; }
.site-footer { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; padding: 36px 16px 48px; color: var(--muted); }
.site-footer a { color: var(--muted); }
.legal h1 { font-size: 1.7rem; margin-bottom: 14px; }
.legal th { text-transform: none; letter-spacing: 0; font-size: .85rem; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0 24px; }
.legal-nav a[aria-current] { font-weight: 600; color: var(--text); }
