/* "hidden" always means hidden. Without this, a box's own layout (a grid, a flex row)
   overrides it: the register's new-customer form and repair check-in's questions showed
   for every type of device. */
[hidden] { display: none !important; }

/* MRW Platform — shared interface styles */

:root {
  --paper: #f1f4f2;
  --surface: #ffffff;
  --ink: #16211d;
  --muted: #5a6963;
  --line: #d8e0db;
  --line-strong: #b9c6bf;
  --pine: #15332d;
  --pine-soft: #1f463d;
  --sidebar-ink: #d2e2db;
  --sidebar-muted: #8fb0a4;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --ok: #1d7549;
  --ok-soft: #e5f4ec;
  --warn: #9a5a06;
  --warn-soft: #fdf1dc;
  --module: #3f5a52;
  --accent: #1f6b57;
  --radius: 6px;
  --font: "Public Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
}

a { color: var(--module); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 26px; font-weight: 650; letter-spacing: -0.01em; }
h2 { font-size: 18px; font-weight: 650; }
h3 { font-size: 15px; font-weight: 650; }
p { margin: 0; }

:focus-visible { outline: 3px solid var(--module); outline-offset: 2px; }

.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.skip-link { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--surface); padding: 8px 12px; border-radius: var(--radius); }
.skip-link:focus { left: 8px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }

/* Shell ------------------------------------------------------------ */

.shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  background: var(--pine);
  color: var(--sidebar-ink);
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  position: sticky;
  top: 0;
  /* Above the page: its flyout menus must open over the content, not under it. */
  z-index: 45;
  height: 100vh;
  overflow-y: auto;
}

.brand { padding: 4px 10px 22px; }
.brand a { color: #fff; text-decoration: none; font-weight: 700; font-size: 17px; letter-spacing: -0.01em; display: block; }
.brand__logo { display: block; max-width: 100%; max-height: 46px; }
.brand small { display: block; color: var(--sidebar-muted); font-size: 12px; margin-top: 2px; }

.nav-section { border-left: 3px solid var(--section, var(--sidebar-muted)); margin: 0 0 18px; padding-left: 8px; }
.nav-section__title { color: #fff; font-size: 13px; font-weight: 650; padding: 2px 8px 6px; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 8px;
  border-radius: var(--radius);
  color: var(--sidebar-ink);
  text-decoration: none;
  font: inherit;
  font-size: 14px;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
}
.nav-link:hover { background: var(--pine-soft); color: #fff; }
.nav-link.is-active { background: #fff; color: var(--pine); font-weight: 600; }
.nav-link.is-active .icon { color: var(--section, var(--pine)); }
.nav-link:focus-visible { outline-color: #fff; }
.nav-link--sub { padding-left: 36px; font-size: 13.5px; color: var(--sidebar-muted); }
.nav-link--sub.is-active { color: var(--pine); }

.sidebar nav { flex: 1; }
.sidebar__foot { border-top: 1px solid var(--pine-soft); padding-top: 12px; }
.sidebar__foot form { margin: 0; }

.main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border-top: 4px solid var(--module);
  border-bottom: 1px solid var(--line);
  padding: 10px 28px;
  min-height: 52px;
}
.topbar__module { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; font-size: 14px; color: var(--module); }
.topbar__module::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--module); }
.topbar__meta { margin-left: auto; color: var(--muted); font-size: 13px; }

.topbar .menu-toggle { display: none; }

.page { padding: 28px; max-width: 1280px; width: 100%; }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.page-head__title { display: flex; flex-direction: column; gap: 6px; }
.page-head__title .crumb { font-size: 13px; color: var(--muted); }
.page-head__title .crumb a { color: var(--muted); }
.page-head__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.page-sub { color: var(--muted); }

/* Buttons ---------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { border-color: var(--ink); }
.btn .icon { width: 16px; height: 16px; }
.btn--primary { background: var(--module); border-color: var(--module); color: var(--on-module, #fff); }
.btn--primary:hover { filter: brightness(0.92); border-color: var(--module); }
.btn--danger { color: var(--danger); border-color: #e7b4ae; }
.btn--danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn--quiet { border-color: transparent; background: transparent; color: var(--module); padding-inline: 8px; }
.btn--quiet:hover { background: var(--paper); border-color: transparent; }
.btn--sm { min-height: 30px; padding: 4px 10px; font-size: 13px; }

.inline-form { display: inline; margin: 0; }

/* Panels ----------------------------------------------------------- */

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.panel + .panel { margin-top: 20px; }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel__head p { color: var(--muted); font-size: 13px; }
.panel__body { padding: 18px; }
.panel__foot { padding: 12px 18px; border-top: 1px solid var(--line); background: #fafbfa; border-radius: 0 0 8px 8px; }

.columns { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

/* Figures strip: one bordered row, divided into cells */

.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 20px; }
.figure { padding: 14px 18px; border-left: 1px solid var(--line); }
.figure:first-child { border-left: 0; }
.figure dt { color: var(--muted); font-size: 13px; }
.figure dd { margin: 2px 0 0; font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.figure dd small { font-size: 13px; color: var(--muted); font-weight: 500; }

/* Module block on the dashboard */

.module-block { margin-bottom: 32px; }
.module-block__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 0 10px; margin-bottom: 14px; border-bottom: 3px solid var(--section); }
.module-block__head h2 { color: var(--section); }

/* Tables ----------------------------------------------------------- */

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; font-size: 13px; background: #fafbfa; white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #f7f9f8; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .nowrap { white-space: nowrap; }
.table .primary-cell { min-width: 170px; }
.table .primary-cell a { font-weight: 600; color: var(--ink); text-decoration: none; }
.table .primary-cell a:hover { color: var(--module); text-decoration: underline; }
.table .sub { display: block; color: var(--muted); font-size: 13px; }
.table tfoot td { font-weight: 650; background: #fafbfa; border-top: 1px solid var(--line); }

/* Badges ----------------------------------------------------------- */

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #eef1ef; color: #45524d; white-space: nowrap; }
.badge--active, .badge--approved { background: var(--ok-soft); color: var(--ok); }
.badge--prospect, .badge--pending { background: #e8eefb; color: #2451a0; }
.badge--paused { background: var(--warn-soft); color: var(--warn); }
.badge--archived, .badge--cancelled, .badge--completed, .badge--inactive { background: #eceeed; color: #5f6b66; }
.badge--owner { background: #e9e4f7; color: #54408f; }
.badge--admin { background: #e8eefb; color: #2451a0; }

/* Filters ---------------------------------------------------------- */

.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.tab { padding: 6px 10px; border-radius: var(--radius); color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; }
.tab:hover { background: var(--paper); color: var(--ink); }
.tab.is-active { background: var(--paper); color: var(--ink); font-weight: 650; box-shadow: inset 0 -2px 0 var(--module); }
.tab .count { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; margin-left: 4px; }
.search { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.search .input { width: auto; min-width: 200px; }
.search select.input { min-width: 0; }

/* Forms ------------------------------------------------------------ */

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field--wide { grid-column: 1 / -1; }
.label { font-size: 14px; font-weight: 600; }
.req { color: var(--danger); }
.input {
  width: 100%;
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
.input:focus { border-color: var(--module); outline: 3px solid color-mix(in srgb, var(--module) 22%, transparent); outline-offset: 0; }
textarea.input { resize: vertical; min-height: 96px; }
.input.is-invalid { border-color: var(--danger); }
.hint { color: var(--muted); font-size: 13px; }
.error { color: var(--danger); font-size: 13px; font-weight: 500; }

fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 600; font-size: 14px; padding: 0; margin-bottom: 8px; }

.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 16px; }
.check { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--module); flex: none; }
.check small { display: block; color: var(--muted); font-size: 13px; }

.form-section + .form-section { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.form-section > h2 { margin-bottom: 4px; }
.form-section > p { color: var(--muted); font-size: 14px; margin-bottom: 16px; }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.form-actions .spacer { flex: 1; }

/* Details list */

.details { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px 14px; margin: 0; font-size: 14px; }
.details dt { color: var(--muted); }
.details dd { margin: 0; overflow-wrap: break-word; min-width: 0; }
.details .sub { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }

.notes { white-space: pre-wrap; font-size: 14px; }

/* Activity */

.feed { list-style: none; margin: 0; padding: 0; }
.feed li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.feed li:last-child { border-bottom: 0; }
.feed .when { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }

/* Messages --------------------------------------------------------- */

.flash { padding: 11px 14px; border-radius: var(--radius); margin-bottom: 18px; background: var(--ok-soft); color: #145638; border: 1px solid #bfe0cd; font-size: 14px; }
.flash--error { background: var(--danger-soft); color: #8a1c12; border-color: #f2c2bc; }
.flash ul { margin: 6px 0 0; padding-left: 18px; }

.empty { padding: 34px 18px; text-align: center; color: var(--muted); }
.empty p + p, .empty p + .btn { margin-top: 10px; }
.empty strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }

/* Pagination */

.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.pager__links { display: flex; gap: 6px; }

/* Guest pages (sign in, installer) -------------------------------- */

.guest { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; background: var(--pine); }
.guest__card { width: 100%; max-width: 460px; background: var(--surface); border-radius: 10px; padding: 30px; border-top: 5px solid var(--accent); }
.guest__card--wide { max-width: 680px; }
.guest__brand { font-weight: 700; font-size: 15px; color: var(--muted); margin-bottom: 18px; }
.guest__card h1 { font-size: 24px; margin-bottom: 6px; }
.guest__card .lede { color: var(--muted); margin-bottom: 22px; }
.guest__card form { display: flex; flex-direction: column; gap: 16px; }
.guest .btn--primary { --module: var(--accent); --on-module: var(--accent-ink, #fff); justify-content: center; }
.guest :focus-visible { outline-color: var(--accent); }
.guest .input:focus { border-color: var(--accent); outline-color: color-mix(in srgb, var(--accent) 22%, transparent); }

.steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 22px; counter-reset: step; }
.steps li { flex: 1; font-size: 12px; color: var(--muted); padding-top: 8px; border-top: 3px solid var(--line); counter-increment: step; }
.steps li::before { content: counter(step) ". "; }
.steps li.is-done { border-top-color: color-mix(in srgb, var(--accent) 60%, #ffffff); }
.steps li.is-current { border-top-color: var(--accent); color: var(--ink); font-weight: 650; }

.checklist { list-style: none; margin: 0 0 18px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); }
.checklist li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.checklist li:last-child { border-bottom: 0; }
.checklist .mark { font-weight: 700; }
.checklist .is-ok .mark { color: var(--ok); }
.checklist .is-bad .mark { color: var(--danger); }
.checklist small { display: block; color: var(--muted); }

.code { display: block; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }


/* Projects module states */

.badge--new, .badge--not_started, .badge--under_review { background: #e8eefb; color: #2451a0; }
.badge--planning, .badge--waiting, .badge--waiting_on_client, .badge--needs_clarification, .badge--pending_approval { background: var(--warn-soft); color: var(--warn); }
.badge--in_progress, .badge--review, .badge--accepted { background: #e6f0ff; color: #1d4ed8; }
.badge--complete, .badge--completed, .badge--approved { background: var(--ok-soft); color: var(--ok); }
.badge--on_hold, .badge--closed_no_change, .badge--rejected, .badge--needs_review, .badge--final_payment_due { background: #eceeed; color: #5f6b66; }
.badge--overdue { background: var(--danger-soft); color: var(--danger); }
.badge--priority-urgent { background: var(--danger-soft); color: var(--danger); }
.badge--priority-high { background: var(--warn-soft); color: var(--warn); }
.badge--priority-normal, .badge--priority-low { background: #eef1ef; color: #45524d; }
.badge--company_to_client { background: #e8eefb; color: #2451a0; }
.badge--client_to_company { background: var(--ok-soft); color: var(--ok); }
.badge--internal_note { background: #eceeed; color: #5f6b66; }

.quick-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-bottom: 16px; }
.quick-add .input { flex: 1; min-width: 180px; }
.quick-add input[type="date"], .quick-add select { flex: 0 0 auto; width: auto; min-width: 150px; }

.quick-add--picker select { flex: 1 1 340px; min-width: 240px; width: auto; }
.quick-add--picker input[type="number"] { flex: 0 0 110px; min-width: 0; }

.tick { width: 22px; height: 22px; padding: 0; display: grid; place-items: center; border: 1.5px solid var(--line-strong); border-radius: 5px; background: var(--surface); cursor: pointer; color: #fff; }
.tick:hover { border-color: var(--module); }
.tick .icon { width: 14px; height: 14px; stroke-width: 3; }
tr.is-done .tick { background: var(--module); border-color: var(--module); }
tr.is-done .primary-cell a { color: var(--muted); text-decoration: line-through; }

.thread { list-style: none; margin: 0; padding: 0; }
.thread__item { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.thread__item:last-child { border-bottom: 0; }
.thread__item.is-internal { background: #fafbfa; }
.thread__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.thread__head a { font-weight: 600; color: var(--ink); text-decoration: none; }
.thread__head a:hover { color: var(--module); text-decoration: underline; }
.thread .when { display: block; color: var(--muted); font-size: 12px; margin-top: 6px; }


/* Client portal (signed-out clients) */

.portal-body { background: var(--paper); margin: 0; }
.portal-bar { display: flex; align-items: center; gap: 12px; padding: 14px 20px; background: var(--pine); color: #fff; }
.portal-bar__brand { font-weight: 700; }
.portal-bar__who { margin-left: auto; color: var(--sidebar-muted); font-size: 14px; }
.portal-bar form { margin: 0; }
.portal-main { max-width: 760px; margin: 0 auto; padding: 28px 16px 12px; }
.portal-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 28px; }
.portal-card--wide { max-width: none; }
.portal-card h1 { margin-bottom: 8px; }
.portal-card h2 { margin-bottom: 8px; }
.portal-card .lede { color: var(--muted); margin-bottom: 20px; }
.portal-card form { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.portal-card .crumb { font-size: 13px; margin-bottom: 8px; }
.portal-body { --module: var(--accent); --on-module: var(--accent-ink, #fff); }
.portal-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.portal-list li { border-bottom: 1px solid var(--line); }
.portal-list a, .portal-list__plain { display: block; padding: 14px 4px; text-decoration: none; color: var(--ink); }
.portal-list a:hover { background: var(--paper); }
.portal-list__meta { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.portal-foot { max-width: 760px; margin: 0 auto; padding: 16px; color: var(--muted); font-size: 13px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.portal-nav { display: flex; flex-wrap: wrap; gap: 4px; max-width: 760px; margin: 0 auto; padding: 10px 16px 0; }
.portal-nav a { padding: 8px 12px; border-radius: var(--radius); text-decoration: none; color: var(--muted); font-weight: 500; font-size: 14px; }
.portal-nav a:hover { background: var(--surface); color: var(--ink); }
.portal-nav a.is-active { background: var(--surface); color: var(--ink); font-weight: 650; box-shadow: inset 0 -2px 0 var(--module); }
.portal-card + .portal-card { margin-top: 20px; }
.portal-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.portal-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.portal-head h1 { margin: 0; }
.portal-card input[type="file"] { padding: 8px; background: var(--paper); }

.panel__head-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.panel__head-actions form { margin: 0; }
.steps-list { margin: 12px 0 0; padding-left: 20px; font-size: 14px; }
.steps-list li { margin-bottom: 8px; }
.steps-list .code { margin-top: 4px; }

/* Website feedback */

.feedback-items { list-style: none; margin: 0; padding: 0; }
.feedback-item { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 18px; padding: 18px; border-bottom: 1px solid var(--line); }
.feedback-item:last-child { border-bottom: 0; }
.feedback-item__number { font-size: 13px; font-weight: 650; color: var(--module); margin-bottom: 6px; }
.feedback-item__shot { display: block; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--paper); }
.feedback-item__shot img { display: block; width: 100%; height: auto; }
.badge--review-pending { background: #e8eefb; color: #2451a0; }
.badge--review-active { background: var(--warn-soft); color: var(--warn); }
.badge--review-submitted { background: var(--ok-soft); color: var(--ok); }
.badge--review-closed { background: #eceeed; color: #5f6b66; }

@media (max-width: 860px) {
  .feedback-item { grid-template-columns: minmax(0, 1fr); }
}

.feedback-item__file { display: grid; place-items: center; min-height: 120px; padding: 16px; font-size: 13px; text-align: center; color: var(--muted); }
.feedback-item__file small { display: block; margin-top: 4px; }

.attachment-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.attachment { display: block; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--paper); text-decoration: none; color: var(--ink); }
.attachment:hover { border-color: var(--module); }
.attachment img { display: block; width: 100%; height: 130px; object-fit: cover; background: #fff; }
.attachment__name { display: block; padding: 8px 10px; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.attachment__name small { display: block; font-weight: 400; color: var(--muted); }

/* Leads pipeline board */

.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 14px; padding: 16px; overflow-x: auto; align-items: start; }
.board__column { background: var(--paper); border-radius: 8px; padding: 12px; min-width: 230px; }
/* Five working columns that fit a screen, rather than seven that do not. */
.board--compact { grid-auto-columns: minmax(168px, 1fr); }
.board--compact .board__column { min-width: 168px; }
.board-toggle { padding: 10px 16px 0; font-size: 13.5px; }
.board-toggle:empty { display: none; }
/* A long word or address in a card wraps, rather than widening its column. */
.lead-card { overflow-wrap: anywhere; }
.board__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.board__head h2 { font-size: 14px; }
.board__head .count { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.board__empty { color: var(--muted); font-size: 13px; padding: 6px 2px; }
.lead-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 8px; }
.lead-card__title { display: block; font-weight: 650; font-size: 14px; color: var(--ink); text-decoration: none; }
.lead-card__title:hover { color: var(--module); text-decoration: underline; }
.lead-card__meta { color: var(--muted); font-size: 12px; margin-top: 3px; }
.lead-card__value { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 4px; }
.lead-card__move { margin-top: 8px; }
.lead-card__move .input { min-height: 30px; padding: 3px 8px; font-size: 12px; }

.badge--lead-new { background: #e8eefb; color: #2451a0; }
.badge--lead-contacted, .badge--lead-follow_up { background: var(--warn-soft); color: var(--warn); }
.badge--lead-proposal_sent { background: #e6f0ff; color: #1d4ed8; }
.badge--lead-won { background: var(--ok-soft); color: var(--ok); }
.badge--lead-lost { background: #eceeed; color: #5f6b66; }
.badge--funnel-active { background: var(--ok-soft); color: var(--ok); }
.badge--funnel-draft { background: #e8eefb; color: #2451a0; }
.badge--funnel-paused { background: var(--warn-soft); color: var(--warn); }
.badge--funnel-archived { background: #eceeed; color: #5f6b66; }

/* Funnel landing pages */

.funnel-body { --module: var(--accent); --on-module: var(--accent-ink, #fff); background: var(--surface); }
.funnel-wrap { max-width: 820px; margin: 0 auto; padding: 0 20px; }
.funnel-hero { background: var(--pine); color: #fff; padding: 64px 0 56px; }
.funnel-hero__eyebrow { color: color-mix(in srgb, var(--accent) 45%, #ffffff); font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.funnel-hero h1 { font-size: 40px; line-height: 1.1; letter-spacing: -0.02em; max-width: 16ch; }
.funnel-hero__sub { color: #cfe0d9; font-size: 18px; margin: 16px 0 26px; max-width: 54ch; }
.funnel-hero .btn--primary { --module: var(--accent); --on-module: var(--accent-ink, #fff); }
.funnel-main { padding: 48px 20px 20px; }
.funnel-section { margin-bottom: 44px; }
.funnel-section h2 { font-size: 24px; margin-bottom: 12px; }
.funnel-lede { color: var(--muted); font-size: 17px; max-width: 62ch; }
.funnel-list { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.funnel-list li { padding-left: 28px; position: relative; }
.funnel-list li::before { content: ""; position: absolute; left: 0; top: 7px; width: 14px; height: 8px; border-left: 2.5px solid var(--module); border-bottom: 2.5px solid var(--module); transform: rotate(-45deg); }
.funnel-proof { display: grid; gap: 12px; border-left: 3px solid var(--module); padding-left: 18px; color: var(--muted); }
.funnel-form { margin-top: 20px; }
.funnel-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.funnel-form .field--wide { grid-column: 1 / -1; }
.funnel-form .btn { margin-top: 20px; }
.funnel-foot { border-top: 1px solid var(--line); padding: 22px 0; color: var(--muted); font-size: 14px; }
.funnel-body--embed { background: transparent; }
.funnel-embed { padding: 18px; }
.funnel-embed h2 { font-size: 20px; margin-bottom: 10px; }

@media (max-width: 700px) {
  .funnel-hero { padding: 44px 0 36px; }
  .funnel-hero h1 { font-size: 30px; }
  .funnel-form__grid { grid-template-columns: minmax(0, 1fr); }
}

.field-list { list-style: none; margin: 0; padding: 0; }
.field-row { border-bottom: 1px solid var(--line); }
.field-row:last-child { border-bottom: 0; }
.field-row__summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; }
.field-row__summary .sub { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; }
.field-row__actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.field-row__actions form { margin: 0; }
.field-row__edit { padding: 16px 18px; background: #fafbfa; }
.field-row__edit .form-actions { margin-top: 16px; }

.guest__logo { display: block; max-height: 48px; max-width: 220px; margin-bottom: 18px; }
.portal-bar__logo { display: block; max-height: 32px; max-width: 200px; }
.funnel-foot__logo { max-height: 34px; max-width: 200px; }

.brand-preview { display: inline-flex; align-items: center; justify-content: center; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 10px; }
.brand-preview--dark { background: var(--pine); }
.brand-preview img { max-height: 44px; max-width: 220px; }

.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.swatch { display: inline-flex; align-items: center; justify-content: center; min-width: 96px; padding: 8px 10px; border-radius: var(--radius); color: #fff; font-size: 12px; font-weight: 600; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.swatch--dot { min-width: 0; width: 12px; height: 12px; padding: 0; border-radius: 3px; vertical-align: middle; margin-right: 6px; }

/* Estimates */

.totals { display: grid; gap: 6px; margin: 0; justify-items: end; }
.totals > div { display: grid; grid-template-columns: auto minmax(150px, auto); gap: 16px; align-items: baseline; }
.totals dt { color: var(--muted); font-size: 14px; }
.totals dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.totals__grand dt { color: var(--ink); font-weight: 650; font-size: 15px; }
.totals__grand dd { font-size: 19px; font-weight: 700; }
.totals--estimate { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }

.estimate__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.estimate__from { text-align: right; color: var(--muted); font-size: 13px; }
.estimate__from p { margin: 0; }
.estimate__parties { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.estimate__parties p { margin: 0; }
.estimate__intro { margin-bottom: 20px; }
.estimate__table .sub { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; }
.estimate__terms { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
details.portal-card summary { cursor: pointer; font-weight: 600; }

.badge--estimate-draft { background: #eceeed; color: #5f6b66; }
.badge--estimate-sent { background: #e8eefb; color: #2451a0; }
.badge--estimate-viewed { background: var(--warn-soft); color: var(--warn); }
.badge--estimate-accepted { background: var(--ok-soft); color: var(--ok); }
.badge--estimate-declined { background: var(--danger-soft); color: var(--danger); }
.badge--estimate-expired { background: #eceeed; color: #5f6b66; }

@media (max-width: 700px) {
  .estimate__head { flex-direction: column; }
  .estimate__from { text-align: left; }
}

.compose { padding-bottom: 16px; }
.compose .form-actions .hint { margin-left: 4px; }

.badge--invoice-draft { background: #eceeed; color: #5f6b66; }
.badge--invoice-sent { background: #e8eefb; color: #2451a0; }
.badge--invoice-partial { background: var(--warn-soft); color: var(--warn); }
.badge--invoice-paid { background: var(--ok-soft); color: var(--ok); }
.badge--invoice-void { background: #eceeed; color: #5f6b66; }

.document-sheet__para { margin: 0 0 14px; line-height: 1.65; white-space: pre-line; }
.document-sheet__para:last-child { margin-bottom: 0; }
.document-sheet__signature { font-size: 22px; font-family: "Segoe Script", "Brush Script MT", cursive; margin: 6px 0 4px; }
.document-sheet h1 { font-size: 22px; margin-bottom: 6px; }

.badge--document-draft { background: #eceeed; color: #5f6b66; }
.badge--document-sent { background: #e8eefb; color: #2451a0; }
.badge--document-viewed { background: var(--warn-soft); color: var(--warn); }
.badge--document-signed { background: var(--ok-soft); color: var(--ok); }
.badge--document-archived { background: #eceeed; color: #5f6b66; }

.badge--roadmap-feature { background: #e8eefb; color: #2451a0; }
.badge--roadmap-improvement { background: var(--ok-soft); color: var(--ok); }
.badge--roadmap-fix { background: var(--warn-soft); color: var(--warn); }
.badge--roadmap-decision { background: #eceeed; color: #5f6b66; }

/* Events */

.sponsor-level { border-bottom: 1px solid var(--line); }
.sponsor-level:last-of-type { border-bottom: 0; }
.sponsor-level__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; background: #fafbfa; }
.sponsor-level__head .sub { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; }
.sponsor-level__count { text-align: right; }
.sponsor-level__count .sub { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }

.badge--event-planning { background: #e8eefb; color: #2451a0; }
.badge--event-open { background: var(--warn-soft); color: var(--warn); }
.badge--event-running { background: #e6f0ff; color: #1d4ed8; }
.badge--event-complete { background: var(--ok-soft); color: var(--ok); }
.badge--event-cancelled { background: #eceeed; color: #5f6b66; }

.badge--money-pledged, .badge--money-estimated { background: #e8eefb; color: #2451a0; }
.badge--money-invoiced, .badge--money-committed { background: var(--warn-soft); color: var(--warn); }
.badge--money-received, .badge--money-paid { background: var(--ok-soft); color: var(--ok); }
.badge--money-written_off, .badge--money-cancelled { background: #eceeed; color: #5f6b66; }

.panel__foot details summary { cursor: pointer; font-weight: 600; font-size: 14px; }

.portal-greeting { margin-bottom: 22px; }
.portal-greeting h1 { font-size: 26px; letter-spacing: -0.02em; margin: 0 0 8px; }
.portal-columns { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(260px, 1fr); gap: 20px; align-items: start; }
.portal-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.portal-card__head h2 { font-size: 16px; margin: 0; }
.portal-card__head a { font-size: 13px; }
.portal-card--quiet { background: #f5f8f6; border: 1px solid var(--line); }
.portal-assurances { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.portal-assurances li { position: relative; padding-left: 22px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.portal-assurances li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--accent); font-weight: 700; }
.portal-card .details { margin-top: 4px; }

/* In the narrow column, labels sit above their values rather than beside. */
aside .portal-card .details { grid-template-columns: minmax(0, 1fr); gap: 12px; }
aside .portal-card .details dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 2px; }
aside .portal-card .details dd { font-size: 14px; }
aside .portal-card .details dd + dt { margin-top: 2px; }

/* A list entry is one block: its title, then its detail line underneath. */
.portal-list li { padding: 11px 4px; display: grid; gap: 3px; }
.portal-list li > a, .portal-list li > span:first-child { padding: 0; font-weight: 600; }
.portal-list .when { display: block; color: var(--muted); font-size: 13px; font-weight: 400; }

@media (max-width: 860px) {
  .portal-columns { grid-template-columns: minmax(0, 1fr); }
}

/* Landing page sections ------------------------------------------------ */

.funnel-built { --fs-accent: var(--accent); }
.fs-wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.fs-wrap--narrow { max-width: 760px; }
.fs-block { padding: 58px 0; }
.fs-block--tight { padding: 34px 0; }
.fs-block h2 { font-size: 26px; letter-spacing: -0.02em; margin: 0 0 16px; }
.fs-block p { line-height: 1.65; margin: 0 0 14px; }
.fs-block--center { text-align: center; }

.fs-hero { padding: 92px 0; background: var(--pine); background-size: cover; background-position: center; color: #fff; }
.fs-hero--center { text-align: center; }
.fs-hero h1 { font-size: 40px; line-height: 1.1; letter-spacing: -0.03em; margin: 0 0 14px; max-width: 18ch; }
.fs-hero--center h1 { margin-left: auto; margin-right: auto; }
.fs-hero .fs-lede { font-size: 18px; color: rgba(255,255,255,0.86); max-width: 56ch; margin: 0 0 24px; }
.fs-hero--center .fs-lede { margin-left: auto; margin-right: auto; }
.fs-eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 12px; font-weight: 700; color: rgba(255,255,255,0.72); margin: 0 0 12px; }

.fs-btn { display: inline-block; background: var(--fs-accent, var(--accent)); color: #fff; text-decoration: none; font-weight: 650; padding: 13px 26px; border-radius: var(--radius); }
.fs-btn:hover { filter: brightness(1.07); }
.fs-btn--quiet { background: transparent; color: var(--fs-accent, var(--accent)); border: 1px solid var(--fs-accent, var(--accent)); }

.fs-kicker { text-transform: uppercase; letter-spacing: 0.1em; font-size: 12px; font-weight: 700; color: var(--muted); margin: 0 0 16px; }

.fs-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 34px; align-items: center; }
.fs-split--flip .fs-split__media { order: -1; }
.fs-split__media img { width: 100%; border-radius: 10px; display: block; }

.fs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.fs-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 22px; }
.fs-card h3 { font-size: 16px; margin: 0 0 8px; }
.fs-card p { font-size: 14.5px; color: var(--muted); margin: 0; }
.fs-card--price { text-align: center; }
.fs-price { font-size: 28px; font-weight: 700; color: var(--ink) !important; margin: 0 0 10px !important; }
.fs-card--price .fs-btn { margin-top: 14px; }

.fs-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 20px; text-align: center; }
.fs-stats strong { display: block; font-size: 30px; letter-spacing: -0.02em; }
.fs-stats span { color: var(--muted); font-size: 14px; }

.fs-logos { display: flex; flex-wrap: wrap; gap: 26px; align-items: center; }
.fs-logos img { max-height: 46px; max-width: 150px; object-fit: contain; }

.fs-quote { background: var(--paper); }
.fs-quote blockquote { font-size: 21px; line-height: 1.5; margin: 0 0 18px; }
.fs-quote__who { display: flex; align-items: center; gap: 12px; }
.fs-quote__who img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.fs-quote__who span { display: block; color: var(--muted); font-size: 14px; }

.fs-video { position: relative; padding-top: 56.25%; border-radius: 10px; overflow: hidden; background: #000; }
.fs-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.fs-faq { border-bottom: 1px solid var(--line); padding: 14px 0; }
.fs-faq summary { cursor: pointer; font-weight: 650; }
.fs-faq p { margin: 10px 0 0; color: var(--muted); }

.fs-form-block { background: var(--paper); }
.fs-cta { background: var(--pine); color: #fff; text-align: center; }
.fs-cta h2 { color: #fff; }
.fs-cta .fs-lede { color: rgba(255,255,255,0.84); margin-bottom: 22px; }

.fs-placeholder { border: 1px dashed var(--line); border-radius: 10px; padding: 34px; text-align: center; color: var(--muted); font-size: 14px; }

@media (max-width: 700px) {
  .fs-hero { padding: 62px 0; }
  .fs-hero h1 { font-size: 30px; }
  .fs-block { padding: 42px 0; }
  .fs-split--flip .fs-split__media { order: 0; }
}

.deliver-problem { border-left: 3px solid var(--line); padding: 2px 0 2px 14px; margin-bottom: 16px; }
.deliver-problem--bad { border-left-color: var(--danger); }
.deliver-problem--warn { border-left-color: var(--warn); }
.deliver-problem p { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }

.mail-preview { width: 100%; height: 620px; border: 1px solid var(--line); border-radius: var(--radius); background: #f1f4f2; }

.wording-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: start; }
.wording-row:last-child { border-bottom: 0; }
.wording-row__meta .label { margin-bottom: 4px; }
.wording-row__meta .hint { margin-top: 4px; }
.wording-row__input { display: grid; gap: 8px; justify-items: start; }
.wording-row__input .input { width: 100%; }

@media (max-width: 820px) {
  .deliver-problem { border-left: 3px solid var(--line); padding: 2px 0 2px 14px; margin-bottom: 16px; }
.deliver-problem--bad { border-left-color: var(--danger); }
.deliver-problem--warn { border-left-color: var(--warn); }
.deliver-problem p { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }

.mail-preview { width: 100%; height: 620px; border: 1px solid var(--line); border-radius: var(--radius); background: #f1f4f2; }

.wording-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
}

.panel--highlight { border-color: var(--module); box-shadow: 0 0 0 3px rgba(31, 107, 87, 0.08); }
.panel--danger { border-color: #e7b7b0; }
.panel--danger .panel__head { background: var(--danger-soft); }

.money-note { font-style: italic; }
.badge--money-in_kind { background: #eef0fb; color: #3b4a9a; }

/* Folding menu sections, and the icons-only menu */

.nav-section > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.nav-section > summary::-webkit-details-marker { display: none; }
.nav-section > summary::after { content: '⌄'; font-size: 13px; line-height: 1; color: var(--sidebar-muted); transform: translateY(-3px); transition: transform 0.15s ease; }
.nav-section:not([open]) > summary::after { transform: rotate(-90deg); }
.nav-section > summary:hover { color: #fff; }

.sidebar-toggle { display: flex; align-items: center; gap: 8px; width: 100%; margin: 0 0 14px; padding: 7px 10px; border: 0; border-radius: var(--radius); background: transparent; color: var(--sidebar-muted); font: inherit; font-size: 12.5px; cursor: pointer; position: relative; }
.sidebar-toggle:hover { background: var(--pine-soft); color: #fff; }
.sidebar-toggle .icon { width: 16px; height: 16px; flex: none; }

html.is-rail .shell { grid-template-columns: 66px minmax(0, 1fr); }
html.is-rail .sidebar { padding-left: 8px; padding-right: 8px; }
html.is-rail .brand { padding: 4px 0 16px; text-align: center; }
html.is-rail .brand a { font-size: 0; }
/* With no logo, the first letter stands in for the name. */
html.is-rail .brand a::after { content: attr(data-initial); font-size: 18px; font-weight: 700; color: #fff; }
html.is-rail .brand a:has(.brand__logo)::after { content: none; }
html.is-rail .brand small { display: none; }
html.is-rail .brand__logo { margin: 0 auto; max-height: 34px; }
html.is-rail .nav-section { padding-left: 0; margin-bottom: 10px; }
html.is-rail .nav-section > summary { display: none; }
html.is-rail .nav-link--sub { display: none; }
html.is-rail .nav-link, html.is-rail .sidebar-toggle { justify-content: center; padding: 10px 0; }
html.is-rail .sidebar-toggle .icon { transform: rotate(180deg); }

/* The name appears beside the icon on hover, rather than being lost. */
html.is-rail .nav-link, html.is-rail .sidebar-toggle { position: relative; }
html.is-rail .nav-link__label {
  position: absolute; left: calc(100% + 6px); top: 50%; transform: translateY(-50%);
  background: var(--pine); color: #fff; padding: 6px 10px; border-radius: 6px; font-size: 13px;
  white-space: nowrap; opacity: 0; pointer-events: none; box-shadow: 0 6px 18px rgba(20, 30, 26, 0.18); z-index: 60;
}
html.is-rail .nav-link:hover .nav-link__label,
html.is-rail .nav-link:focus-visible .nav-link__label,
html.is-rail .sidebar-toggle:hover .nav-link__label { opacity: 1; }

/* The icons-only menu: one icon per section, in the section's own colour,
   with its pages in a menu beside it. The menu is placed against the window
   when it opens, so the sidebar can still scroll without cutting it off. */
.rail { display: none; }
html.is-rail nav[aria-label="Main"]:not(.rail) { display: none; }
html.is-rail .rail { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rail-item { position: relative; width: 100%; display: flex; justify-content: center; }
/* Each section's own colour, lightened enough to read on the dark sidebar:
   several accents are too dark to show against it as they are. */
.rail-item { --section-light: color-mix(in srgb, var(--section) 62%, #ffffff); }
.rail-item__icon { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; color: var(--section-light); text-decoration: none; }
.rail-item__icon .icon { width: 21px; height: 21px; }
.rail-item__icon:hover, .rail-item:focus-within .rail-item__icon { background: var(--pine-soft); }
.rail-item__icon.is-active { background: color-mix(in srgb, var(--section) 22%, transparent); box-shadow: inset 3px 0 0 var(--section); }
.rail-item__menu {
  position: fixed; z-index: 70; min-width: 210px; max-width: 280px; max-height: calc(100vh - 16px); overflow-y: auto;
  padding: 8px; border-radius: 10px; border-left: 3px solid var(--section);
  background: var(--pine); box-shadow: 0 14px 40px rgba(10, 20, 16, 0.35);
  visibility: hidden; opacity: 0; transform: translateX(-4px);
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0s linear 0.12s;
}
/* A bridge across the gap, so moving the pointer to the menu does not close it. */
.rail-item__menu::before { content: ''; position: absolute; left: -14px; top: 0; bottom: 0; width: 14px; }
.rail-item:hover .rail-item__menu, .rail-item:focus-within .rail-item__menu {
  visibility: visible; opacity: 1; transform: none; transition-delay: 0s;
}
.rail-item__title { margin: 2px 8px 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--section-light); }
.rail-item__link { display: block; padding: 7px 10px; border-radius: 6px; color: var(--sidebar-ink); text-decoration: none; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-item__link:hover, .rail-item__link:focus-visible { background: var(--pine-soft); color: #fff; }
.rail-item__link.is-active { color: #fff; font-weight: 650; background: color-mix(in srgb, var(--section) 20%, transparent); }

/* On a phone the menu is a drawer, so it always shows its labels. */
@media (max-width: 860px) {
  html.is-rail .shell { grid-template-columns: minmax(0, 1fr); }
  html.is-rail .sidebar { padding-left: 18px; padding-right: 18px; }
  html.is-rail .brand a { font-size: 17px; }
  html.is-rail .nav-section > summary, html.is-rail .nav-link--sub { display: flex; }
  html.is-rail .nav-link, html.is-rail .sidebar-toggle { justify-content: flex-start; padding: 8px 10px; }
  html.is-rail .nav-link__label { position: static; transform: none; background: none; box-shadow: none; padding: 0; opacity: 1; }
  .sidebar-toggle { display: none; }
  html.is-rail .rail { display: none; }
  html.is-rail nav[aria-label="Main"]:not(.rail) { display: block; }
}

/* What has been tried, on a roadmap item */

.try-log { list-style: none; margin: 0; padding: 0; }
.try-log li { position: relative; padding: 0 0 16px 18px; border-left: 2px solid var(--line); }
.try-log li:last-child { padding-bottom: 0; }
.try-log li::before { content: ''; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.try-log__open::before { background: var(--warn, #b7791f); }
.try-log__action { margin: 0 0 4px; font-weight: 600; }
.try-log__result { margin: 0 0 4px; color: var(--muted); }
.try-log__settle { margin: 6px 0 4px; }
.try-log .when { display: block; color: var(--muted); font-size: 12.5px; }
.badge--outcome-worked { background: #e7f4ec; color: #1f6b57; }
.badge--outcome-partly { background: #fdf3e2; color: #8a5a12; }
.badge--outcome-did_not_work { background: #fbeaea; color: #8d3030; }

/* Choosing an edition */

.edition-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.edition { position: relative; display: block; cursor: pointer; }
.edition input { position: absolute; top: 14px; left: 14px; }
.edition__body { display: block; height: 100%; box-sizing: border-box; padding: 14px 14px 14px 38px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.edition:hover .edition__body { border-color: var(--edition); }
.edition input:checked + .edition__body { border-color: var(--edition); box-shadow: 0 0 0 3px color-mix(in srgb, var(--edition) 18%, transparent); }
.edition input:focus-visible + .edition__body { outline: 2px solid var(--edition); outline-offset: 2px; }
.edition__name { display: block; font-weight: 700; color: var(--edition); }
.edition__for { display: block; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 6px; }
.edition__blurb { display: block; font-size: 13.5px; line-height: 1.5; color: var(--ink); }

/* Proofs */

.proof-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.proof-thumb { margin: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.proof-thumb img { display: block; width: 100%; height: 150px; object-fit: contain; background: #fff; }
.proof-thumb__locked { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; height: 150px; background: var(--paper); color: var(--muted); font-size: 13px; }
.proof-thumb figcaption { padding: 8px 10px; font-size: 13px; border-top: 1px solid var(--line); }
.proof-thumb figcaption .sub { display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }

.proof-view { margin: 0 0 22px; }
.proof-view__frame { position: relative; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; cursor: crosshair; }
.proof-view__frame img { display: block; width: 100%; height: auto; }
.proof-view__held { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px; border: 1px dashed var(--line); border-radius: 8px; background: var(--paper); color: var(--muted); text-align: center; font-size: 13.5px; }
.proof-view figcaption { margin-top: 6px; font-size: 13px; color: var(--muted); }
.proof-pin { position: absolute; transform: translate(-50%, -50%); min-width: 22px; height: 22px; border-radius: 999px; background: var(--module, #7357D9); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,0.3); }

.badge--proof-draft { background: var(--paper); color: var(--muted); }
.badge--proof-with_client { background: #eef0fb; color: #3b4a9a; }
.badge--proof-changes_requested { background: #fdf3e2; color: #8a5a12; }
.badge--proof-approved { background: #e7f4ec; color: #1f6b57; }

.final-locked { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.final-locked .icon { width: 14px; height: 14px; }

.note-list { list-style: none; margin: 0; padding: 0; }
.note-list__item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line); }
.note-list__item:last-child { border-bottom: 0; }
.note-list__item form { margin: 0; }
.note-list__tick { width: 22px; height: 22px; flex: none; border: 2px solid var(--line); border-radius: 6px; background: var(--surface); color: #fff; font-weight: 700; font-size: 13px; line-height: 1; cursor: pointer; }
.note-list__tick:hover { border-color: var(--module); }
.is-done .note-list__tick { background: var(--ok, #2f855a); border-color: var(--ok, #2f855a); }
.is-done .note-list__text { color: var(--muted); text-decoration: line-through; }
.note-list__body .when { display: block; color: var(--muted); font-size: 12.5px; }

/* Sorting the roadmap, and incidents */

.lead-card__problem { float: right; margin: -2px 0 4px 8px; }
.check--small { font-size: 12px; gap: 5px; color: var(--muted); }
.check--small input { width: 14px; height: 14px; }
.lead-card--problem { border-left: 3px solid #c0392b; }
.lead-card--problem .check--small { color: #a8322a; font-weight: 600; }
.badge--sev-minor { background: var(--paper); color: var(--muted); }
.badge--sev-moderate { background: #fdf3e2; color: #8a5a12; }
.badge--sev-serious { background: #fbe4e1; color: #a8322a; }
.badge--sev-critical { background: #a8322a; color: #fff; }
.badge--inc-open { background: #fbeaea; color: #8d3030; }
.badge--inc-investigating { background: #fdf3e2; color: #8a5a12; }
.badge--inc-fixed, .badge--inc-verified { background: #e7f4ec; color: #1f6b57; }
.badge--inc-wont_fix { background: var(--paper); color: var(--muted); }

.sort-banner { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 0 0 16px; padding: 14px 16px; border: 1px solid #f0d7a8; border-radius: 10px; background: #fdf3e2; font-size: 14px; line-height: 1.5; }
.sort-banner form { margin: 0; }

/* The help window */

.help-button { position: relative; flex: none; width: 34px; height: 34px; margin-left: 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; }
.help-button:hover { border-color: var(--module); color: var(--module); }
.help-button__dot { position: absolute; top: -2px; right: -2px; width: 11px; height: 11px; border-radius: 50%; background: #c0392b; border: 2px solid var(--surface); }
.help-panel { position: fixed; right: 16px; bottom: 16px; z-index: 80; width: min(390px, calc(100vw - 32px)); height: min(560px, calc(100vh - 32px)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 50px rgba(20, 30, 26, 0.22); overflow: hidden; }
.help-panel[hidden] { display: none; }
.help-panel__head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--paper); }
.help-panel__head h2 { margin: 0; font-size: 15px; }
.help-panel__close { border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); }
.help-panel__thread { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.help-panel__ask { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.help-panel__ask .input { flex: 1; min-width: 0; }
.help-bubble { margin: 0; padding: 8px 12px; border-radius: 12px; max-width: 88%; font-size: 14px; line-height: 1.45; white-space: pre-line; }
.help-bubble--them { align-self: flex-start; background: var(--paper); }
.help-bubble--me { align-self: flex-end; background: var(--module); color: #fff; }
.help-answer { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: var(--surface); }
.help-answer summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.help-answer__text { margin: 8px 0; font-size: 14px; line-height: 1.5; white-space: pre-line; }
.help-answered { border-left: 3px solid var(--ok, #2f855a); padding: 4px 0 4px 10px; }
.help-answered__q { margin: 0; font-weight: 600; font-size: 13.5px; }
.help-hint { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; }
.help-thanks { color: var(--ok, #2f855a); font-size: 13px; }
.help-offer { align-self: flex-start; }

.help-desk-q { border-bottom: 1px solid var(--line); }
.help-desk-q__question { font-size: 15.5px; font-weight: 600; margin: 0 0 4px; }
.faq-edit { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }
.faq-edit summary { cursor: pointer; font-weight: 600; }
.faq-edit summary .sub { font-weight: 400; color: var(--muted); font-size: 12.5px; margin-left: 6px; }
.faq-edit[open] summary { margin-bottom: 12px; }
.check--inline { display: inline-flex; margin-right: 14px; }

/* The client portal, signed in */

.portal-body--signed-in { background: var(--paper, #f1f4f2); }
.portal-shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.portal-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; padding: 22px 16px; background: var(--surface, #fff); border-right: 1px solid var(--line); box-sizing: border-box; }
.portal-profile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.portal-profile__picture, .portal-band__picture { display: flex; align-items: center; justify-content: center; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 18px; }
.portal-profile__picture { width: 76px; height: 76px; }
.portal-profile__picture img, .portal-band__picture img { width: 100%; height: 100%; object-fit: contain; }
.portal-profile__picture span, .portal-band__picture span { font-size: 30px; font-weight: 700; color: var(--module, #1f6b57); }
.portal-profile__name { font-weight: 700; font-size: 15px; line-height: 1.3; }
.portal-profile__more { color: var(--muted); font-size: 12.5px; }
.portal-menu { display: flex; flex-direction: column; gap: 2px; }
.portal-menu form { margin: 0; }
.portal-menu__group { margin: 14px 10px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); }
.portal-menu__link { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; font-size: 14px; text-align: left; text-decoration: none; cursor: pointer; }
.portal-menu__link .icon { width: 18px; height: 18px; flex: none; color: var(--muted); }
.portal-menu__link:hover { background: var(--paper, #f1f4f2); }
.portal-menu__link.is-active { background: color-mix(in srgb, var(--module, #1f6b57) 12%, transparent); color: var(--module, #1f6b57); font-weight: 650; }
.portal-menu__link.is-active .icon { color: currentColor; }
.portal-menu__count { margin-left: auto; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--paper, #f1f4f2); color: var(--muted); font-size: 11.5px; text-align: center; }
.portal-side__foot { margin-top: auto; display: flex; flex-direction: column; gap: 4px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.portal-side__foot img { max-width: 120px; max-height: 32px; object-fit: contain; object-position: left; margin-bottom: 4px; }
.portal-side__foot a { color: inherit; }
.portal-page { min-width: 0; }
.portal-topline { display: none; }
.portal-scrim { display: none; }
.portal-content { max-width: 1180px; margin: 0 auto; padding: 24px 32px 48px; box-sizing: border-box; }

.portal-band { position: relative; display: flex; align-items: center; gap: 20px; padding: 26px 32px; background: var(--band, #1f6b57); background-image: linear-gradient(120deg, rgba(255,255,255,0.10), rgba(0,0,0,0.12)); color: #fff; }
.portal-band__picture { width: 72px; height: 72px; flex: none; border: 3px solid rgba(255,255,255,0.85); box-shadow: 0 6px 18px rgba(0,0,0,0.18); }
.portal-band__words h1 { margin: 0; font-size: 24px; letter-spacing: -0.01em; color: #fff; }
.portal-band__words p { margin: 4px 0 0; opacity: 0.9; font-size: 14.5px; max-width: 720px; }

.portal-heading { margin: 4px 0 20px; }
.portal-heading h1 { margin: 0 0 4px; font-size: 26px; letter-spacing: -0.01em; }
.portal-heading p { margin: 0; color: var(--muted); max-width: 720px; }
.portal-section-title { font-size: 13px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); margin: 28px 0 12px; }

.portal-attention { background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.portal-attention h2 { margin: 0 0 10px; font-size: 17px; }
.portal-attention__clear { margin: 0; color: var(--muted); }
.portal-attention__list { list-style: none; margin: 0; padding: 0; }
.portal-attention__item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0 10px 14px; border-top: 1px solid var(--line); border-left: 3px solid var(--module, #1f6b57); }
.portal-attention__item:first-child { border-top: 0; }
.portal-attention__item--invoice { border-left-color: #b7791f; }
.portal-attention__item--document { border-left-color: #4a5d8a; }
.portal-attention__item--artwork { border-left-color: #7357D9; }
.portal-attention__item--posts { border-left-color: #4f7a28; }
.portal-attention__text { font-weight: 600; }

.portal-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.portal-tile { display: flex; flex-direction: column; gap: 6px; padding: 18px; background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 14px; color: var(--ink); text-decoration: none; transition: border-color 0.15s ease, transform 0.15s ease; }
.portal-tile:hover { border-color: var(--module, #1f6b57); transform: translateY(-2px); }
.portal-tile__icon { display: flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 10px; background: color-mix(in srgb, var(--module, #1f6b57) 12%, transparent); color: var(--module, #1f6b57); }
.portal-tile__icon .icon { width: 20px; height: 20px; }
.portal-tile__label { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15.5px; }
.portal-tile__count { padding: 1px 7px; border-radius: 999px; background: var(--paper, #f1f4f2); color: var(--muted); font-size: 12px; font-weight: 600; }
.portal-tile__blurb { color: var(--muted); font-size: 13.5px; line-height: 1.45; }

.portal-foot-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-top: 28px; }
.portal-card--quiet { background: transparent; }
.portal-safe { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13.5px; line-height: 1.55; }

.portal-rows { display: flex; flex-direction: column; gap: 8px; }
.portal-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; }
.portal-row:hover { border-color: var(--module, #1f6b57); }
.portal-row__main { display: flex; flex-direction: column; gap: 2px; }
.portal-row__main span { color: var(--muted); font-size: 13px; }
.portal-empty { padding: 28px; text-align: center; color: var(--muted); background: var(--surface, #fff); border: 1px dashed var(--line); border-radius: 12px; }
.portal-subhead { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 18px 0 8px; }
.portal-swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.portal-swatch { display: flex; flex-direction: column; gap: 3px; min-width: 110px; font-size: 13px; }
.portal-swatch__chip { height: 54px; border-radius: 10px; border: 1px solid rgba(0,0,0,0.08); }
.portal-brand-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.portal-brand-file { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); text-decoration: none; font-size: 12.5px; word-break: break-word; }
.portal-brand-file:hover { border-color: var(--module, #1f6b57); }
.portal-brand-file img { width: 100%; height: 100px; object-fit: contain; border-radius: 6px; }
.portal-brand-file__type { display: flex; align-items: center; justify-content: center; height: 100px; border-radius: 6px; background: var(--paper, #f1f4f2); color: var(--muted); font-weight: 700; }

.portal-return { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 20px; background: var(--surface, #fff); border-bottom: 1px solid var(--line); font-size: 14px; position: sticky; top: 0; z-index: 30; }
.portal-return__back { font-weight: 650; color: var(--module, #1f6b57); text-decoration: none; }
.portal-return__back:hover { text-decoration: underline; }
.portal-return__who { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Booking a time */

.book-days { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; }
.book-day { flex: none; display: flex; flex-direction: column; align-items: center; width: 58px; padding: 8px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface, #fff); color: var(--ink); text-decoration: none; font-size: 12px; }
.book-day strong { font-size: 19px; line-height: 1.2; }
.book-day:hover { border-color: var(--module, #0f7c8c); }
.book-day.is-chosen { background: var(--module, #0f7c8c); border-color: var(--module, #0f7c8c); color: #fff; }
.book-day.is-closed { opacity: 0.35; }
.book-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; border: 0; padding: 0; margin: 0; }
.book-time { position: relative; }
.book-time input { position: absolute; opacity: 0; }
.book-time span { display: block; padding: 10px 0; text-align: center; border: 1px solid var(--line); border-radius: 8px; background: var(--surface, #fff); cursor: pointer; font-weight: 600; }
.book-time input:checked + span { background: var(--module, #0f7c8c); border-color: var(--module, #0f7c8c); color: #fff; }
.book-time input:focus-visible + span { outline: 2px solid var(--module, #0f7c8c); outline-offset: 2px; }
.appt-day { border-bottom: 1px solid var(--line); }
.appt-day__date { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 8px; }
.appt-row { display: flex; gap: 16px; align-items: baseline; padding: 8px 0; color: var(--ink); text-decoration: none; }
.appt-row:hover strong { color: var(--module); }
.appt-row__time { width: 64px; flex: none; font-weight: 700; }
.appt-row__what { display: flex; flex-direction: column; }
.appt-row__what span { color: var(--muted); font-size: 13px; }
.hours-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; flex-wrap: wrap; }
.hours-row__day { width: 150px; }
.hours-row .input { width: auto; }

.setup-guide { border-top: 1px solid var(--line); }
.setup-guide summary { cursor: pointer; font-weight: 600; }
.setup-guide[open] summary { margin-bottom: 10px; }

/* A menu row with its own fold-away sub-menu */

.nav-row { display: flex; align-items: center; }
.nav-row .nav-link { flex: 1; min-width: 0; }
/* Clear enough to be seen as something to tap: full strength, and a bigger target. */
.nav-row__arrow { flex: none; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin-right: 4px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, 0.06); color: inherit; opacity: 1; cursor: pointer; }
.nav-row__arrow:hover { opacity: 1; background: rgba(255, 255, 255, 0.08); }
.nav-row__arrow .icon { width: 18px; height: 18px; transition: transform 0.15s ease; }
.nav-row__arrow[aria-expanded="false"] .icon { transform: rotate(-90deg); }
.nav-sub[hidden] { display: none; }
/* Folded on one of its own pages: only the page you are on stays in view. */
.nav-sub.is-folded .nav-link--sub:not(.is-active) { display: none; }

/* The changelog */

.changelog-release > summary { cursor: pointer; list-style: none; }
.changelog-release > summary::-webkit-details-marker { display: none; }
.changelog-release > summary h2 { display: flex; align-items: center; gap: 10px; }
.changelog-release:not([open]) > summary { border-bottom: 0; }
.release-notes { font-size: 14.5px; line-height: 1.6; max-width: 820px; }
.release-notes h4 { font-size: 14.5px; margin: 18px 0 6px; }
.release-notes ul { padding-left: 20px; }
.release-notes pre.code { white-space: pre-wrap; word-break: break-all; }

.portal-welcome { position: relative; margin-bottom: 18px; padding: 18px 22px; border-radius: 14px; background: color-mix(in srgb, var(--module, #1f6b57) 9%, #fff); border: 1px solid color-mix(in srgb, var(--module, #1f6b57) 25%, transparent); }
.portal-welcome h2 { margin: 0 0 6px; font-size: 18px; }
.portal-welcome ul { margin: 8px 0; padding-left: 20px; line-height: 1.55; }
.portal-welcome__close { position: absolute; top: 10px; right: 12px; border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); }

/* On a phone the menu slides in from the side. */
@media (max-width: 900px) {
  .portal-shell { grid-template-columns: minmax(0, 1fr); }
  .portal-side { position: fixed; z-index: 60; left: 0; top: 0; width: 280px; max-width: 86vw; box-shadow: 0 10px 40px rgba(0,0,0,0.25); transform: translateX(-105%); transition: transform 0.2s ease; }
  .portal-menu-toggle:checked ~ .portal-side { transform: translateX(0); }
  .portal-scrim { display: none; position: fixed; inset: 0; z-index: 55; background: rgba(20, 30, 26, 0.35); }
  .portal-menu-toggle:checked ~ .portal-scrim { display: block; }
  .portal-topline { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--surface, #fff); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
  .portal-topline__title { font-weight: 700; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .portal-content { padding: 18px 16px 40px; }
  .portal-band { padding: 20px 16px; gap: 14px; }
  .portal-band__picture { width: 56px; height: 56px; }
  .portal-band__words h1 { font-size: 19px; }
  .portal-attention__item { flex-wrap: wrap; }
}

/* Social post previews */

.post-editor { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 20px; align-items: start; }
.post-editor > .panel { margin: 0; }
.post-editor .post-preview { position: sticky; top: 16px; }
@media (max-width: 1100px) { .post-editor { grid-template-columns: minmax(0, 1fr); } .post-editor .post-preview { position: static; } }
.post-preview { background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.post-preview__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.post-preview__where { font-size: 14px; }
.post-preview__views { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.post-preview__views button { border: 0; background: none; padding: 4px 12px; border-radius: 999px; font: inherit; font-size: 12.5px; cursor: pointer; color: var(--muted); }
.post-preview__views button.is-on { background: var(--ink, #1c2a26); color: #fff; }
.post-preview__count { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.post-preview__count.is-over { color: #a8322a; font-weight: 650; }
.post-preview__actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 6px; }

.pp-frame { margin: 0 auto; background: #0f1412; box-shadow: 0 10px 28px rgba(0,0,0,0.18); overflow: hidden; }
.pp-frame--phone { width: 300px; max-width: 100%; border-radius: 34px; padding: 12px 10px; }
.pp-frame--desktop { width: 100%; border-radius: 10px; padding: 26px 8px 8px; position: relative; }
.pp-frame--desktop::before { content: ''; position: absolute; top: 10px; left: 12px; width: 36px; height: 8px; background: radial-gradient(circle, #ff5f57 3px, transparent 3.5px) 0 0 / 12px 8px repeat-x; opacity: 0.9; }
.pp-screen { background: #fff; color: #1a1a1a; border-radius: 24px; overflow: hidden; min-height: 180px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.4; }
.pp-frame--desktop .pp-screen { border-radius: 4px; }
.pp-head { display: flex; align-items: center; gap: 9px; padding: 11px 12px 8px; }
.pp-avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; background: #6b7c93; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.pp-who { display: flex; flex-direction: column; min-width: 0; }
.pp-who strong { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-who span { font-size: 11.5px; color: #65676b; }
.pp-text { margin: 0; padding: 0 12px 10px; white-space: pre-line; overflow-wrap: anywhere; }
.pp-more { color: #65676b; font-weight: 600; }
.pp-note { margin: 0; padding: 0 12px 10px; font-size: 11.5px; color: #8a5a12; }
.pp-picture { position: relative; width: 100%; background: #e9ecef; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.pp-picture img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-picture.is-empty span { color: #6c757d; font-size: 12.5px; padding: 10px; text-align: center; }
.pp-picture--rounded { border-radius: 14px; margin: 6px 0; }
.pp-linkcard { margin: 0 12px 10px; border: 1px solid #dddfe2; border-radius: 8px; padding: 9px 11px; display: flex; flex-direction: column; gap: 2px; background: #f7f8fa; }
.pp-linkcard__domain { font-size: 11px; color: #65676b; letter-spacing: 0.03em; }
.pp-linkcard__url { font-size: 12.5px; color: #1a1a1a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-actions { display: flex; justify-content: space-around; gap: 6px; padding: 8px 10px; border-top: 1px solid #eceef0; font-size: 12.5px; color: #65676b; font-weight: 600; }
.pp-screen--instagram .pp-actions { justify-content: flex-start; gap: 16px; border-top: 0; font-size: 18px; }
.pp-screen--instagram .pp-text strong, .pp-screen--x .pp-x__who strong { color: #1a1a1a; }
.pp-x { display: flex; gap: 10px; padding: 12px; }
.pp-x__col { flex: 1; min-width: 0; }
.pp-x__who { font-size: 13.5px; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-x__who span { color: #536471; }
.pp-screen--x .pp-text { padding: 0 0 4px; }
.pp-screen--x .pp-actions { border-top: 0; justify-content: space-between; padding: 6px 0 0; }
.pp-over { background: #fbd0d0; color: #8d1f1f; }
.pp-tiktok { background: #111; }
.pp-tiktok.is-empty span { color: #aaa; }
.pp-tiktok__over { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 12px 14px; background: linear-gradient(transparent, rgba(0,0,0,0.65)); color: #fff; }
.pp-tiktok__over .pp-text { padding: 4px 0 0; color: #fff; }
.pp-tiktok__over .pp-more { color: #ddd; }
.pp-frame--phone .pp-screen--tiktok { border-radius: 24px; }
.pp-frame--desktop .pp-tiktok { max-width: 320px; margin: 0 auto; }
.pp-button { display: block; margin: 0 12px 12px; padding: 8px; text-align: center; border-radius: 6px; background: #e8f0fe; color: #1a56c4; font-weight: 600; font-size: 13px; }

.pp-tag { color: #1d6fd8; font-weight: 600; }
.pp-tag--missing { color: inherit; font-weight: 400; background: #fdf1d8; border-radius: 3px; }
.post-preview__tagnote { margin: 8px 0 0; padding: 8px 10px; border-radius: 8px; background: #eef4fd; font-size: 12.5px; line-height: 1.45; }
.tag-picker { position: relative; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tag-picker__menu { position: absolute; z-index: 30; top: 38px; left: 0; width: 280px; padding: 8px; background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,0.14); }
.tag-picker__list { max-height: 220px; overflow-y: auto; margin-top: 6px; display: flex; flex-direction: column; }
.tag-picker__item { text-align: left; border: 0; background: none; padding: 7px 8px; border-radius: 6px; font: inherit; font-size: 14px; cursor: pointer; }
.tag-picker__item:hover, .tag-picker__item:focus-visible { background: var(--paper, #f1f4f2); }
.tag-picker__item[hidden] { display: none; }
.tag-handles { margin-top: 8px; }
.tag-row > summary { cursor: pointer; list-style: none; }
.tag-row > summary::-webkit-details-marker { display: none; }

/* Getting started */

.onboarding__bar { height: 6px; margin: 0 20px; border-radius: 999px; background: var(--paper, #f1f4f2); overflow: hidden; }
.onboarding__bar span { display: block; height: 100%; background: var(--module, #1f6b57); border-radius: 999px; transition: width 0.3s ease; }
.onboarding__steps { list-style: none; margin: 0; padding: 8px 20px 16px; }
.onboarding__step { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.onboarding__step:last-child { border-bottom: 0; }
.onboarding__tick { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; color: #fff; }
.onboarding__step.is-done .onboarding__tick { background: var(--ok, #2f855a); border-color: var(--ok, #2f855a); }
.onboarding__step.is-done strong { color: var(--muted); font-weight: 500; text-decoration: line-through; }
.onboarding__words { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.onboarding__words > span { color: var(--muted); font-size: 13px; }
.onboarding__words > .onboarding__title { color: inherit; font-size: inherit; }
.onboarding__optional { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; background: var(--paper, #f1f4f2); font-size: 11px !important; }
.onboarding__actions { display: flex; gap: 6px; flex: none; }
.onboarding__actions form { margin: 0; }
@media (max-width: 700px) { .onboarding__step { flex-wrap: wrap; } .onboarding__actions { width: 100%; padding-left: 38px; } }

/* Terms and privacy */

.legal-body { background: #fafaf8; margin: 0; }
.legal-head { display: flex; align-items: baseline; gap: 10px; padding: 16px 24px; background: #132238; color: #fff; }
.legal-head strong { font-size: 18px; }
.legal-head span { opacity: 0.75; font-size: 13.5px; }
.legal-page { max-width: 760px; margin: 0 auto; padding: 32px 24px 60px; }
.legal-page h1 { margin: 0 0 4px; font-size: 30px; letter-spacing: -0.01em; }
.legal-page__date { margin: 0 0 24px; color: var(--muted); }
.legal-text { font-size: 15.5px; line-height: 1.65; max-width: none; }
.legal-text h4 { font-size: 17px; margin: 28px 0 8px; }
.legal-text p, .legal-text ul { margin: 0 0 14px; }
.legal-text li { margin-bottom: 4px; }
.legal-page__other { margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--line); }
@media print { .legal-head { background: none; color: #000; padding: 0 0 12px; } .legal-page__other { display: none; } .legal-page { padding: 0; } }
.legal-links { margin-top: 18px; font-size: 12.5px; color: var(--muted); text-align: center; }
.legal-links a { color: inherit; }

/* Atrium billing */

.paused-panel { max-width: 640px; margin: 40px auto; text-align: center; }
.paused-panel h1 { margin: 6px 0 10px; }
.plan-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; }
.plan-summary .label { margin: 0 0 4px; }
.plan-summary strong { display: block; font-size: 18px; }
.plan-summary span { color: var(--muted); font-size: 13.5px; }
.badge--plan-trial { background: #e8f0fe; color: #1a56c4; }
.badge--plan-active { background: #e7f4ec; color: #1f6b57; }
.badge--plan-past_due { background: #fdf3e2; color: #8a5a12; }
.badge--plan-suspended { background: #fbe4e1; color: #a8322a; }
.badge--plan-complimentary { background: #f1ecfb; color: #5b3fa8; }
.badge--plan-cancelled { background: var(--paper); color: var(--muted); }
.billing-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 16px; padding: 12px 16px; border-radius: 10px; background: #fdf3e2; border: 1px solid #f0d7a8; font-size: 14px; }
.billing-banner--trial { background: #eef4fd; border-color: #cfdcf6; }

.billing-customer { border-top: 1px solid var(--line); }
.billing-customer > summary { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 20px; cursor: pointer; list-style: none; }
.billing-customer > summary::-webkit-details-marker { display: none; }
.billing-customer > summary .sub { color: var(--muted); font-size: 13px; flex: 1; }
.billing-customer__form { padding: 0 20px 12px; }
.billing-customer__actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 20px 16px; }
.billing-customer__actions form { margin: 0; }
.billing-plan { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }
.billing-plan summary { cursor: pointer; }
.billing-plan[open] summary { margin-bottom: 10px; }

.billing-addons { margin: 12px 0 8px; padding: 12px; border: 1px dashed var(--line); border-radius: 8px; }
.billing-plan__delete { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.billing-plan__delete .label { margin: 0; }

/* Two-step sign-in */

.two-factor-qr { width: 200px; margin: 12px 0; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.two-factor-qr svg { display: block; width: 100%; height: auto; }
.backup-codes { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.backup-codes code { display: block; padding: 8px 10px; border: 1px dashed var(--line); border-radius: 6px; font-size: 15px; text-align: center; letter-spacing: 0.03em; }
@media print { .sidebar, .topbar, .panel__foot, .page-head .crumb { display: none !important; } }

/* Errors */

.error-row { border-top: 1px solid var(--line); }
.error-row > summary { display: flex; gap: 14px; align-items: flex-start; padding: 12px 20px; cursor: pointer; list-style: none; }
.error-row > summary::-webkit-details-marker { display: none; }
.error-row__count { flex: none; min-width: 42px; padding: 2px 8px; border-radius: 999px; background: #fbe4e1; color: #a8322a; font-weight: 700; font-size: 13px; text-align: center; }
.error-row__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.error-row__main .sub { color: var(--muted); font-size: 12.5px; }
.error-row__body { padding: 0 20px 14px 76px; }
.error-row__body pre.code { white-space: pre-wrap; font-size: 12px; }

/* Brand assets */

.brand-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; padding: 16px; }
.brand-card { display: block; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); text-decoration: none; }
.brand-card:hover { border-color: var(--module); }
.brand-card strong { display: block; margin-top: 10px; }
.brand-card .sub { display: block; color: var(--muted); font-size: 12.5px; }
.brand-card__swatches { display: flex; gap: 4px; height: 28px; }
.brand-card__swatches span { flex: 1; border-radius: 5px; border: 1px solid rgba(0,0,0,0.08); }
.brand-card__none { flex: 1; display: flex; align-items: center; color: var(--muted); font-size: 12.5px; border: 1px dashed var(--line) !important; padding-left: 8px; }
.colour-rows { display: grid; gap: 8px; }
.colour-row { display: flex; gap: 8px; align-items: center; }
.colour-row__swatch { flex: none; width: 34px; height: 34px; border-radius: 6px; border: 1px solid var(--line); }
.colour-row .input { max-width: 260px; }
.colour-row__hex { max-width: 120px !important; font-family: ui-monospace, Menlo, Consolas, monospace; }
.brand-group { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 10px; }
.brand-thumb { background-color: #fff; background-image: linear-gradient(45deg, #e6eae8 25%, transparent 25%), linear-gradient(-45deg, #e6eae8 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e6eae8 75%), linear-gradient(-45deg, transparent 75%, #e6eae8 75%); background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0; }
.input--sm { padding: 3px 6px; font-size: 12.5px; margin: 6px 0; }

/* Business switcher */
.switcher { position: relative; margin-left: 18px; min-width: 0; }
.switcher__current { list-style: none; cursor: pointer; display: flex; flex-direction: row; align-items: center; gap: 8px; max-width: 300px; padding: 5px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); line-height: 1.2; }
.switcher__current::-webkit-details-marker { display: none; }
.switcher__text { display: flex; flex-direction: column; align-items: flex-end; min-width: 0; }
.switcher__label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.switcher__current strong { font-size: 13.5px; text-align: right; white-space: normal; overflow-wrap: anywhere; }
.switcher__arrow { flex: none; font-size: 11px; color: var(--muted); transition: transform 0.15s ease; }
.switcher[open] .switcher__arrow { transform: rotate(180deg); }
.switcher__menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 240px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(20, 30, 26, 0.12); padding: 6px; z-index: 40; }
.switcher__menu form { margin: 0; }
.switcher__item { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: none; border-radius: 6px; font: inherit; font-size: 14px; color: var(--ink); text-decoration: none; cursor: pointer; overflow-wrap: anywhere; }
.switcher__item:hover { background: var(--paper); }
.switcher__item.is-current { font-weight: 650; color: var(--module); cursor: default; }
.switcher__item.is-current::before { content: '✓ '; }
.switcher__item--new { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 10px; color: var(--module); font-weight: 600; }

/* On a phone the switcher keeps to the right and never widens the page. */
@media (max-width: 860px) {
  .switcher { margin-left: auto; }
  .switcher__label { display: none; }
  .switcher__current { max-width: 52vw; padding: 5px 8px; }
  .switcher__current strong { font-size: 12.5px; }
  .switcher__menu { min-width: 0; width: min(280px, 88vw); }
}

/* On a small phone the date gives its room to the business name. */
@media (max-width: 600px) {
  .topbar__meta { display: none; }
  .switcher__current { max-width: 62vw; }
}




/* Importing */

.map-table td { vertical-align: middle; }
.map-table .input { min-width: 220px; }
.map-table__unused td { background: #fafbfa; }
.map-table__unused .primary-cell strong { color: var(--muted); font-weight: 600; }
.map-sample { display: inline-block; background: var(--paper); border: 1px solid var(--line); border-radius: 5px; padding: 1px 7px; margin: 2px 4px 2px 0; font-size: 12.5px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.map-address { white-space: pre-line; font-size: 13px; }

/* Volunteer hours */

.meter { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 4px 0; min-width: 120px; }
.meter span { display: block; height: 100%; background: var(--ok); border-radius: 999px; }
.meter--big { height: 12px; margin: 14px 0 20px; }

.hours-totals { display: flex; flex-wrap: wrap; gap: 28px; }
.hours-totals strong { display: block; font-size: 30px; letter-spacing: -0.02em; line-height: 1.1; }
.hours-totals span { color: var(--muted); font-size: 14px; }

.sheet-body { background: #f1f4f2; margin: 0; padding: 24px 14px 40px; font-family: 'Public Sans', -apple-system, Segoe UI, Arial, sans-serif; color: #16211d; }
.sheet-actions { max-width: 820px; margin: 0 auto 16px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hours-sheet { max-width: 820px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 36px 40px; }
.hours-sheet__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; border-bottom: 2px solid #16211d; padding-bottom: 16px; margin-bottom: 20px; }
.hours-sheet__head h1 { font-size: 24px; margin: 2px 0 0; letter-spacing: -0.01em; }
.hours-sheet__org { margin: 0; font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.hours-sheet__logo { max-height: 54px; max-width: 180px; }
.hours-sheet__who { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 0 0 22px; }
.hours-sheet__who dt { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.hours-sheet__who dd { margin: 2px 0 0; font-size: 16px; }
.hours-sheet__table { width: 100%; border-collapse: collapse; font-size: 14px; }
.hours-sheet__table th, .hours-sheet__table td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.hours-sheet__table thead th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); border-bottom: 2px solid var(--line); }
.hours-sheet__table tfoot th, .hours-sheet__table tfoot td { border-top: 2px solid #16211d; border-bottom: 0; font-size: 15px; }
.hours-sheet__table .num { text-align: right; }
.hours-sheet__table .sub { display: block; color: var(--muted); font-size: 12.5px; }
.hours-sheet__verify { margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.55; }
.hours-sheet__verify .sub { color: var(--muted); }
.hours-sheet__code { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: 0.08em; }

.verify-box { max-width: 820px; margin: 0 auto 20px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 26px 28px; }
.verify-box h1 { font-size: 22px; margin: 0 0 6px; }
.verify-box__form { display: flex; gap: 10px; margin: 16px 0; flex-wrap: wrap; }
.verify-box__form .input { max-width: 240px; font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: 0.08em; text-transform: uppercase; }

@media print {
  .no-print { display: none !important; }
  .sheet-body { background: #fff; padding: 0; }
  .hours-sheet { border: 0; border-radius: 0; padding: 0; max-width: none; }
  .hours-sheet__table tr { break-inside: avoid; }
}

@media (max-width: 600px) {
  .hours-sheet { padding: 22px 18px; }
}

.board__tidy { margin: 0 0 10px; }
.board__tidy .btn { width: 100%; }
.board__hint { font-size: 12.5px; color: var(--muted); margin: 0 0 10px; line-height: 1.45; }
.lead-card__reason { font-size: 13px; line-height: 1.45; margin: 6px 0 0; padding: 6px 8px; border-left: 3px solid var(--warn); background: var(--warn-soft); border-radius: 0 6px 6px 0; }
.lead-card__actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.lead-card__revisit { margin-top: 10px; }

.sponsor-level__edit { border-top: 1px solid var(--line); padding: 14px 0 4px; margin-top: 10px; }

.qr-holder { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.qr-holder svg { width: 100%; height: auto; display: block; }

.spark { display: flex; align-items: flex-end; gap: 2px; height: 90px; }
.spark__bar { flex: 1; background: var(--module); border-radius: 2px 2px 0 0; min-height: 2px; opacity: 0.85; }

/* Content calendar */

.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.cal__label { padding: 8px 10px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--line); }
.cal__day { min-height: 118px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.cal__day:nth-child(7n+7) { border-right: 0; }
.cal__day--outside { background: #fafbfa; }
.cal__day--today { background: #f2f7f4; }
.cal__date { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); }
.cal__date a { text-decoration: none; color: var(--muted); font-size: 15px; line-height: 1; padding: 0 4px; border-radius: 4px; }
.cal__date a:hover { background: var(--module); color: #fff; }
.cal__post { display: block; text-decoration: none; border-radius: 6px; padding: 5px 7px; font-size: 12px; line-height: 1.35; border-left: 3px solid var(--line); background: var(--paper); color: var(--ink); }
.cal__post:hover { filter: brightness(0.97); }
.cal__time { display: block; color: var(--muted); font-size: 11px; }
.cal__text { display: block; }
.cal__who { display: block; color: var(--muted); font-size: 11px; }

.cal__post--idea { border-left-color: #9aa5a0; }
.cal__post--draft { border-left-color: #6b7f99; }
.cal__post--awaiting_approval { border-left-color: var(--warn); background: var(--warn-soft); }
.cal__post--changes_requested { border-left-color: var(--danger); background: var(--danger-soft); }
.cal__post--approved { border-left-color: var(--ok); background: var(--ok-soft); }
.cal__post--published { border-left-color: var(--ok); }
.cal__post--archived { border-left-color: #cbd3cf; }

.cal-key { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); }
.cal-key__item { display: inline-flex; align-items: center; gap: 6px; }
.cal-key__dot { width: 10px; height: 10px; border-radius: 3px; border-left-width: 3px; border-left-style: solid; }

.badge--content-idea, .badge--content-archived { background: #eceeed; color: #5f6b66; }
.badge--content-draft { background: #e8eefb; color: #2451a0; }
.badge--content-awaiting_approval { background: var(--warn-soft); color: var(--warn); }
.badge--content-changes_requested { background: var(--danger-soft); color: var(--danger); }
.badge--content-approved, .badge--content-published { background: var(--ok-soft); color: var(--ok); }

.post-review__head { margin-bottom: 10px; }
.post-review__image { width: 100%; max-height: 320px; object-fit: cover; border-radius: 8px; margin-bottom: 12px; }
.post-review__body { white-space: pre-line; line-height: 1.6; margin: 0 0 14px; }

@media (max-width: 860px) {
  .cal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cal__label { display: none; }
  .cal__day { min-height: 92px; }
  .cal__day--outside { display: none; }
}

/* Booking a place */

.ticket-list { list-style: none; margin: 14px 0 0; padding: 0; border-top: 1px solid var(--line); }
.ticket { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 2px; border-bottom: 1px solid var(--line); }
.ticket .sub { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; }
.ticket__qty { flex: 0 0 90px; }
.ticket__qty .input { text-align: center; }
.ticket--gone { opacity: 0.55; }

/* Header and footer blocks */

.fs-header { background: var(--surface); border-bottom: 1px solid var(--line); padding: 12px 0; }
.fs-header--sticky { position: sticky; top: 0; z-index: 20; }
.fs-header__inner { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.fs-header__brand { font-weight: 700; letter-spacing: -0.01em; }
.fs-header__brand img { max-height: 34px; display: block; }
.fs-header__menu { display: flex; gap: 18px; flex-wrap: wrap; margin-left: auto; }
.fs-header__menu a { color: var(--ink); text-decoration: none; font-size: 14.5px; font-weight: 550; }
.fs-header__menu a:hover { color: var(--fs-accent, var(--accent)); }
.fs-header__hint { margin-left: auto; color: var(--muted); font-size: 13px; }
.fs-btn--sm { padding: 9px 16px; font-size: 14px; }

.fs-footer { background: var(--pine); color: rgba(255,255,255,0.8); padding: 44px 0 22px; margin-top: auto; }
.fs-footer__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 28px; }
.fs-footer h3 { color: #fff; font-size: 14px; margin: 0 0 10px; }
.fs-footer p { margin: 0 0 8px; font-size: 14px; line-height: 1.6; }
.fs-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.fs-footer a { color: rgba(255,255,255,0.86); text-decoration: none; font-size: 14px; }
.fs-footer a:hover { color: #fff; text-decoration: underline; }
.fs-footer__small { margin-top: 26px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.16); font-size: 13px; }
.fs-footer__small p { margin: 0; }

/* Jumping to a section should not hide it behind a sticky header. */
.funnel-built .fs { scroll-margin-top: 78px; }

/* The builder ---------------------------------------------------------- */

.builder { display: grid; grid-template-columns: 250px minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.builder__palette, .builder__editor { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
.builder__palette h2, .builder__editor h2 { font-size: 14px; margin: 0 0 6px; }
.builder__canvas { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.builder-canvas-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 650; }

.builder-blocks { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.builder-block { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--radius); cursor: grab; background: var(--surface); }
.builder-block:hover { border-color: var(--module); background: var(--paper); }
.builder-block .icon { width: 16px; height: 16px; color: var(--module); flex: none; margin-top: 2px; }
.builder-block strong { display: block; font-size: 13.5px; }
.builder-block small { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; }

.bsec { position: relative; border-bottom: 1px solid var(--line); cursor: pointer; }
.bsec__bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 10px; background: #f3f6f4; font-size: 12px; color: var(--muted); }
.bsec__grip { cursor: grab; font-weight: 650; }
.bsec__tools { display: flex; gap: 4px; }
.bsec__tools button { border: 1px solid var(--line); background: var(--surface); border-radius: 5px; padding: 2px 7px; font: inherit; font-size: 11.5px; cursor: pointer; }
.bsec__tools button:hover { border-color: var(--module); color: var(--module); }
.bsec__body { pointer-events: none; }
.bsec.is-selected { outline: 2px solid var(--module); outline-offset: -2px; }
.bsec.is-dragging { opacity: 0.45; }
.bsec.is-over-top { box-shadow: inset 0 3px 0 var(--module); }
.bsec.is-over-bottom { box-shadow: inset 0 -3px 0 var(--module); }
.bsec--hidden .bsec__body { opacity: 0.4; }

.builder-empty { padding: 50px 20px; text-align: center; color: var(--muted); }
.builder-editor__empty { color: var(--muted); font-size: 13.5px; }
.builder__editor .field { margin-bottom: 14px; }
.builder-status { font-size: 13px; color: var(--muted); align-self: center; }
.builder-status--ok { color: var(--ok); }
.builder-status--bad { color: var(--danger); }

.builder-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.builder-thumb { position: relative; }
.builder-thumb img { width: 62px; height: 62px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); display: block; }
.builder-thumb button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); cursor: pointer; line-height: 1; }

@media (max-width: 1100px) {
  .builder { grid-template-columns: minmax(0, 1fr); }
  .builder__palette, .builder__editor { position: static; max-height: none; }
}

@media (prefers-reduced-motion: reduce) {
  .topbar, .portal-bar { transition: none; }
  .topbar.is-tucked, .portal-bar.is-tucked { transform: none; }
}

/* Responsive ------------------------------------------------------- */

@media (max-width: 1080px) {
  .columns { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  /* The drawer is taken out of the page entirely until it is opened, so it
     cannot affect scrolling on a phone. */
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 40; transform: translateX(-100%); transition: transform 0.2s ease; visibility: hidden; }
  .sidebar.is-open { transform: translateX(0); visibility: visible; box-shadow: 0 0 0 100vmax rgba(10, 25, 21, 0.45); }
  /* The header scrolls with the page rather than staying put. */
  .topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    transition: transform 0.22s ease;
  }
  .topbar.is-tucked { transform: translateY(-101%); }
  .portal-bar { position: sticky; top: 0; z-index: 30; transition: transform 0.22s ease; }
  .portal-bar.is-tucked { transform: translateY(-101%); }
  .page, .portal-main { scroll-margin-top: 60px; }
  .shell { min-height: 0; }
  body { overflow-x: clip; }
  .topbar .menu-toggle { display: inline-flex; }
  .topbar { padding: 10px 16px; }
  .page { padding: 20px 16px; }
  .split, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .details { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .details dd { margin-bottom: 8px; }
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figure { border-left: 0; }
  .figure:nth-child(even) { border-left: 1px solid var(--line); }
  .figure:nth-child(n+3) { border-top: 1px solid var(--line); }
  .figure dd { font-size: 19px; }
  .search .input { min-width: 0; flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar { transition: none; }
}

@media print {
  .sidebar, .topbar, .page-head__actions, .toolbar { display: none !important; }
  .shell { display: block; }
  body { background: #fff; }
}

/* ---- Repairs -------------------------------------------------------------- */

.rp-search .input { min-width: 260px; }
.rp-board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 10px; align-items: flex-start; }
.rp-column { flex: 0 0 240px; background: var(--paper, #f3f6f4); border-radius: 12px; padding: 10px; }
.rp-column__head { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; margin: 2px 4px 10px; display: flex; justify-content: space-between; color: var(--muted); }
.rp-column__head span { background: #fff; border-radius: 999px; padding: 0 8px; }
.rp-card { display: flex; flex-direction: column; gap: 2px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--module, #C41E3A); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; text-decoration: none; color: inherit; font-size: 14px; }
.rp-card:hover { box-shadow: 0 6px 16px rgba(0, 0, 0, .08); }
.rp-card__number { font-size: 12px; color: var(--muted); font-weight: 600; }
.rp-card__when { font-size: 12px; color: var(--muted); }
.rp-card--overdue { border-left-color: #a8322a; background: #fdf4f3; }
.rp-card--overdue .rp-card__when { color: #a8322a; font-weight: 600; }

.rp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
@media (max-width: 1000px) { .rp-layout { grid-template-columns: minmax(0, 1fr); } }
.rp-facts p { margin: 0 0 6px; }
.rp-add { display: flex; flex-direction: column; gap: 8px; }
.rp-add__row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rp-add__row .input { flex: 1 1 160px; }
.rp-add__row .rp-add__num, .rp-add__num { flex: 0 0 100px; max-width: 110px; }
.rp-service-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rp-service-row .input { flex: 1 1 140px; }

.rp-timeline { list-style: none; margin: 0; padding: 0 20px 16px; }
.rp-timeline__item { border-left: 2px solid var(--line); padding: 4px 0 12px 14px; position: relative; }
.rp-timeline__item::before { content: ""; position: absolute; left: -6px; top: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--module, #C41E3A); }
.rp-timeline__item--note::before { background: #9aa5a0; }
.rp-timeline__item p { margin: 2px 0 0; white-space: pre-line; }
.rp-timeline__when { display: block; font-size: 12px; color: var(--muted); }

.rp-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.rp-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; }
.rp-signed { max-width: 100%; border: 1px solid var(--line); border-radius: 8px; background: #fff; }

.rp-terms { background: var(--paper, #f3f6f4); border-radius: 10px; padding: 12px 14px; font-size: 14px; line-height: 1.55; margin-bottom: 10px; }
.rp-signature { position: relative; }
.rp-signature canvas { display: block; width: 100%; height: 180px; border: 2px dashed var(--line); border-radius: 10px; background: #fff; touch-action: none; cursor: crosshair; }
.rp-signature button { position: absolute; top: 8px; right: 8px; }

.rp-status { background: var(--paper, #f3f6f4); }
.rp-status--awaiting_approval { background: #fdf3e2; color: #8a5a12; }
.rp-status--ready { background: #e7f4ec; color: #1f6b57; }
.rp-status--collected { background: #eef1f0; color: var(--muted); }
.rp-status--unrepairable, .rp-status--declined, .rp-status--unclaimed { background: #fbe4e1; color: #a8322a; }

.rp-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 18px; }
.rp-steps li { padding: 6px 12px; border-radius: 999px; background: #eef1f0; color: var(--muted); font-size: 13px; }
.rp-steps li.is-done { background: #e7f4ec; color: #1f6b57; }
.rp-steps li.is-now { background: var(--accent, #1f6b57); color: var(--accent-ink, #fff); font-weight: 600; }

.rp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; text-align: center; }
.rp-stats strong { display: block; font-size: 28px; }
.rp-stats span { font-size: 12.5px; color: var(--muted); }
@media (max-width: 640px) { .rp-stats { grid-template-columns: repeat(2, 1fr); } .rp-search .input { min-width: 0; width: 100%; } }

/* ---- Online shop ----------------------------------------------------------- */

.shop-bar { display: flex; justify-content: space-between; align-items: center; }
.shop-bar__home { text-decoration: none; color: inherit; }
.shop-bar__cart { font-weight: 600; text-decoration: none; color: inherit; display: inline-flex; gap: 6px; align-items: center; }
.shop-badge { background: var(--accent, #1f6b57); color: var(--accent-ink, #fff); border-radius: 999px; padding: 0 8px; font-size: 13px; }
.shop-main { max-width: 1100px; }
.shop-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.shop-filters .input { flex: 1 1 220px; max-width: 360px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; margin-bottom: 20px; }
.shop-card { display: flex; flex-direction: column; gap: 3px; text-decoration: none; color: inherit; }
.shop-card__photo { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: #eef1f0; display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.shop-card__photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s ease; }
.shop-card:hover .shop-card__photo img { transform: scale(1.03); }
.shop-card__photo span { font-size: 48px; color: #b8c2bd; font-weight: 700; }
/* More specific than the no-photo letter's style, which would otherwise grey it out. */
.shop-card__photo .shop-card__flag { position: absolute; top: 10px; left: 10px; background: #fff; color: #a8322a; font-size: 12px; padding: 2px 8px; border-radius: 999px; font-weight: 700; }
.shop-card.is-sold-out .shop-card__photo img { opacity: .55; }
.shop-card__meta { font-size: 13px; color: var(--muted); }
.shop-card__price { font-weight: 700; font-size: 17px; }
.shop-item { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
@media (max-width: 760px) { .shop-item { grid-template-columns: minmax(0, 1fr); } }
.shop-item__photos { display: grid; gap: 10px; }
.shop-item__photos img { width: 100%; border-radius: 14px; display: block; }
.shop-item__price { font-size: 28px; font-weight: 700; margin: 4px 0 10px; }
.shop-item__description { margin-top: 18px; line-height: 1.6; }
.shop-stock { color: #1f6b57; font-weight: 600; }
.shop-stock--out { color: #a8322a; }
.shop-add { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin: 12px 0; }
.shop-add .input { width: 90px; }
.shop-qty { width: 76px; }
.shop-checkout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 760px) { .shop-checkout { grid-template-columns: minmax(0, 1fr); } }
.shop-thumb { display: flex; flex-direction: column; gap: 4px; }
.shop-thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
@media (prefers-reduced-motion: reduce) { .shop-card__photo img { transition: none; } }
/* Two to a row on a phone: one per screen makes browsing a long scroll. */
@media (max-width: 520px) { .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .shop-card__price { font-size: 15px; } }

/* ---- Point of sale ----------------------------------------------------------- */

.pos { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .pos { grid-template-columns: minmax(0, 1fr); } }
.pos__left, .pos__right { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; position: relative; }
.pos__bar { display: flex; gap: 8px; align-items: center; }
.pos__scan { flex: 1; font-size: 17px; padding: 12px 14px; }
.pos__results { list-style: none; margin: 8px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; max-height: 300px; overflow: auto; background: #fff; }
.pos__results button { display: flex; justify-content: space-between; gap: 10px; width: 100%; text-align: left; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; cursor: pointer; }
.pos__results button:hover, .pos__results button:focus-visible { background: #f3f6f4; }
.pos__results span { color: var(--muted); white-space: nowrap; }
.pos__pages { display: flex; gap: 6px; margin: 12px 0 0; flex-wrap: wrap; }
.pos__page { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; font: inherit; cursor: pointer; }
.pos__page.is-on { background: var(--text, #122019); color: #fff; }
.pos__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 12px; }
/* Big enough for a finger: at least 72 pixels tall. */
.pos__key { min-height: 76px; border: 0; border-radius: 12px; background: var(--key, #0B2A1D); color: #fff; font: inherit; font-weight: 600; font-size: 15px; padding: 10px; cursor: pointer; text-align: center; line-height: 1.25; }
.pos__key:active { transform: scale(.97); }
.pos__key--custom { background: #fff; color: var(--text, #122019); border: 2px dashed var(--line); }
.pos__swatch { width: 22px; height: 22px; border-radius: 6px; flex: none; }
.pos__customer { margin-bottom: 10px; position: relative; }
.pos__chosen { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 10px; background: #f3f6f4; border-radius: 10px; }
.pos__cart td { vertical-align: middle; }
.pos__cart .btn--sm { min-width: 34px; min-height: 34px; }
.pos__money { width: 96px; text-align: right; }
.pos__totals, .pos__pay { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.pos__pay label { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pos__pay label .input:not(.pos__money) { flex: 1; max-width: 210px; }
.pos__row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pos__row--total { font-size: 22px; font-weight: 700; }
.pos__quick { display: flex; gap: 8px; }
.pos__done { min-height: 56px; font-size: 18px; margin-top: 4px; }
.pos__finished { position: fixed; inset: 0; background: rgba(6, 30, 19, .55); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.pos__finished[hidden] { display: none; }
.pos__finished-card { background: #fff; border-radius: 16px; padding: 28px; max-width: 520px; width: 100%; text-align: center; }
.pos__finished-change { font-size: 28px; font-weight: 700; margin: 10px 0 18px; }
.pos__finished-card .form-actions { justify-content: center; flex-wrap: wrap; }

/* Panels that fold away show an arrow, so they read as something to open and close. */
details.panel > summary.panel__head { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
details.panel > summary.panel__head::-webkit-details-marker { display: none; }
details.panel > summary.panel__head::after {
    content: ""; flex: none; width: 9px; height: 9px; margin-right: 4px;
    border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: rotate(45deg); opacity: .6; transition: transform .15s ease;
}
details.panel:not([open]) > summary.panel__head::after { transform: rotate(-45deg); }
@media (prefers-reduced-motion: reduce) { details.panel > summary.panel__head::after { transition: none; } }

/* A tag's checkbox, with its delete button beside it. */
.tag-choice { display: inline-flex; align-items: center; gap: 2px; margin-right: 10px; }
.tag-choice .btn { min-width: 28px; padding: 2px 8px; }

/* A booking's ticket, and door check-in. */
.ticket-qr { text-align: center; margin: 18px auto 6px; max-width: 240px; }
.ticket-qr svg { width: 100%; height: auto; display: block; background: #fff; border-radius: 10px; }
.checkin__state { font-size: 20px; font-weight: 700; margin: 0 0 14px; }
.checkin__state--ok { color: #1f6b57; }
.checkin__state--done { color: #1f6b57; }
.checkin__state--bad { color: #a8322a; }
.checkin__button { min-height: 60px; min-width: 220px; font-size: 20px; }

/* Buying from customers. */
.buy-line { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 12px; }
.buy-line__find { position: relative; margin-bottom: 10px; }
@media print { .no-print, .sidebar, .rail, .topbar, .flash { display: none !important; } .bill-of-sale { border: 0; } }

/* The cart keeps its columns on a phone: quantity, price and remove are fixed widths,
   and the item (with any note, which wraps) takes what is left. */
.pos__cart { table-layout: fixed; width: 100%; }
.pos__cart td:first-child { overflow-wrap: anywhere; }
.pos__cart td:nth-child(2) { width: 108px; }
.pos__cart td:nth-child(3) { width: 104px; }
.pos__cart td:nth-child(4) { width: 46px; }
.pos__cart .pos__money { width: 100%; max-width: 96px; }
.pos__note-btn { white-space: normal; text-align: left; height: auto; max-width: 100%; overflow-wrap: anywhere; display: inline-block; margin-top: 2px; }
.pos__lineitems { list-style: none; margin: 4px 0 0; padding: 0; font-size: 13px; color: var(--muted); }
@media (max-width: 520px) {
    .pos__cart td:nth-child(2) { width: 84px; }
    .pos__cart td:nth-child(3) { width: 98px; }
    .pos__cart td:nth-child(4) { width: 36px; }
    .pos__cart td { padding-left: 4px; padding-right: 4px; }
    .pos__cart .pos__money { max-width: 100%; padding-left: 6px; padding-right: 6px; font-size: 15px; }
}
.pos__newcust { display: grid; gap: 8px; margin-top: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #f8faf9; }
.pos__layaway { margin-top: 6px; }
.pos__reader { padding: 12px; border-radius: 10px; background: #eef6f1; border: 1px solid #b9d9c6; display: grid; gap: 8px; }

/* Register mode: the platform's menus give way to the register's own bar. */
/* The header too: the register bar says who is signed in and has the lock, and a register does not switch business. */
body.is-register .sidebar, body.is-register .rail, body.is-register .sidebar-toggle, body.is-register .topbar { display: none !important; }
.register-bar__business { color: #fff; font-weight: 700; padding: 0 10px 0 6px; }
body.is-register .page { margin-left: 0 !important; max-width: none; }
.register-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 14px; padding: 8px; border-radius: 12px; background: #0B2A1D; }
.register-bar__link { color: #fff; text-decoration: none; padding: 10px 14px; border-radius: 9px; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.register-bar__link.is-active, .register-bar__link:hover { background: rgba(255, 255, 255, .14); }
.register-bar__who { margin-left: auto; color: #B6F141; font-weight: 600; padding: 0 8px; }
.register-lock { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #0B2A1D; }
.register-lock__box { background: #fff; border-radius: 18px; padding: 28px; width: min(380px, 92vw); text-align: center; }
.register-lock__pin { font-size: 28px; letter-spacing: .4em; text-align: center; margin: 8px 0 14px; }
.register-lock__keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.register-lock__key { min-height: 64px; font-size: 22px; font-weight: 700; }

/* Register mode uses the whole width: the menu's column goes with the menu. */
body.is-register .shell { grid-template-columns: minmax(0, 1fr) !important; }
body.is-register .shell > main, body.is-register .page { grid-column: 1 / -1; }

/* Inside the register, "hidden" always wins over a box's own layout. */
.pos [hidden], .pos__newcust[hidden], .pos__chosen[hidden], .pos__reader[hidden], .pos__results[hidden] { display: none !important; }

/* A wide screen: the register sits comfortably in the middle rather than stretching edge to edge. */
@media (min-width: 1400px) { body.is-register .page { max-width: 1400px; margin-left: auto !important; margin-right: auto; } }

/* Fundraisers: progress towards the goal. */
.fr-progress { height: 14px; border-radius: 999px; background: #e3ebe7; overflow: hidden; }
.fr-progress span { display: block; height: 100%; background: linear-gradient(90deg, #1f6b57, #B6F141); border-radius: 999px; }
.rp-passcode__value { display: inline-block; margin-left: 8px; padding: 4px 10px; font-size: 18px; letter-spacing: .08em; background: #fff7e0; border: 1px solid #e6cf8a; border-radius: 8px; }

/* The settings menu's groups. */
.nav-group-label { margin: 12px 0 2px; padding: 0 12px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.nav-group-label:first-child { margin-top: 4px; }
/* Each settings group folds open and shut; the one holding the current page starts open. */
.nav-group > summary.nav-group-label { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding-right: 10px; }
.nav-group > summary.nav-group-label::-webkit-details-marker { display: none; }
.nav-group > summary.nav-group-label::after { content: '▸'; font-size: 11px; transition: transform .15s; }
.nav-group[open] > summary.nav-group-label::after { transform: rotate(90deg); }
.nav-group > summary.nav-group-label:hover { color: var(--ink, #1a1a1a); }

/* Settings folded on one of its own pages: only the current page shows, so its group
   headings fold away too (they were left behind as empty labels). */
.nav-sub.is-folded .nav-group > summary { display: none; }
.nav-sub.is-folded .nav-group:not(:has(.is-active)) { display: none; }
.nav-sub.is-folded .nav-group { display: block; }
/* A module's grouped pages (its setup, say), folding under a heading like Settings'. */
.nav-group--module { margin-top: 2px; }
.nav-group--module > summary.nav-group-label { padding-left: 14px; }

/* The menu's group headings, white like its other items (they took the page's gray). */
.sidebar .nav-group-label, .nav-sub .nav-group-label, .nav-section .nav-group-label { color: rgba(255, 255, 255, .92); }
.sidebar .nav-group > summary.nav-group-label:hover, .nav-section .nav-group > summary.nav-group-label:hover { color: #fff; }
/* A passcode box with its show/hide eye. */
.pass-eye { display: flex; gap: 8px; align-items: center; }
.pass-eye .input { flex: 1; }
.bundle-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.bundle-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.bundle-card p { margin: 6px 0; }
/* Email templates, by module: each group edged in its module's color. */
.email-group { border-left: 4px solid var(--module); }
/* The register's PIN shows as dots, without being a password box (which brings up saved logins). */
.register-lock__pin { -webkit-text-security: disc; text-security: disc; }
.register-lock__pin[readonly] { background: #fff; cursor: default; }
/* Passcodes and PINs show as dots, without being password boxes: those make iPads offer saved logins. */
[data-secret] { -webkit-text-security: disc; text-security: disc; }
/* Customer pages' policy links, as texting carriers require. */
.policy-footer { text-align: center; padding: 18px 12px 28px; font-size: 14px; }
.policy-footer a { color: inherit; text-decoration: underline; }
.policy-footer span { margin: 0 8px; opacity: .6; }
.kiosk .policy-footer { color: #e9f2ee; }
.check small a { text-decoration: underline; }
/* Moving a booking: the current one, and the details carried over. */
.book-current { border-left: 4px solid var(--accent, #1E9E6A); }
.book-details { margin-top: 16px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.book-details > summary { cursor: pointer; list-style: none; }
.book-details > summary::-webkit-details-marker { display: none; }
.book-details__change { margin-left: 8px; text-decoration: underline; font-size: 14px; }
/* The register's search legend: an "i" beside the search, opening what it finds. */
.pos__legend { position: relative; flex: none; align-self: center; z-index: 30; }
.pos__legend > summary { list-style: none; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; display: grid; place-items: center; font: italic 700 15px Georgia, serif; cursor: pointer; color: var(--ink, #1a1a1a); }
.pos__legend > summary::-webkit-details-marker { display: none; }
.pos__legend[open] > summary { background: var(--ink, #1a1a1a); color: #fff; }
.pos__legend-box { position: absolute; right: 0; top: 34px; width: min(440px, 88vw); background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .14); }
.pos__legend-box table { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 14px; }
.pos__legend-box td { padding: 5px 10px 5px 0; vertical-align: top; }
.pos__legend-box td:first-child { width: 42%; color: var(--ink-soft, #4a5551); }
.pos__legend-box code { white-space: nowrap; font-size: 13px; }
/* Phones: the search and its "i" share the first line; the buttons wrap below; the guide fits the screen. */
.pos__scan { min-width: 0; }
@media (max-width: 640px) {
    .pos__bar { flex-wrap: wrap; }
    .pos__scan { flex: 1 1 calc(100% - 44px); }
    .pos__legend-box { position: fixed; left: 12px; right: 12px; top: auto; width: auto; max-height: 70vh; overflow-y: auto; }
}
