/*
 * Design system (v3). One ground, one ink, one accent.
 *   Ground  #F6F5F2   the room everything sits in
 *   Panel   #FFFFFF   surfaces, borderless, 16px corners
 *   Ink     #16151A   text and primary buttons
 *   Accent  #8A2D5C   mulberry: data marks and the current page, never decoration
 * Type: Bricolage Grotesque for headlines and large figures, Geist for everything else.
 */
:root {
  --bg: #F6F5F2;
  --panel: #FFFFFF;
  --sunk: #EBE9E4;
  --ink: #16151A;
  --ink-2: #5B5762;
  --ink-3: #8C8893;
  --line: #E4E2DD;
  --line-2: #EFEDE9;
  --control-line: #DAD7D1; /* borders on buttons, inputs and chips */
  --accent: #8A2D5C;
  --accent-ink: #FFFFFF;
  --accent-soft: #F3EAF0;
  --accent-text: #6E2449;
  --warn: #8A5A12;
  --warn-soft: #F7EEDC;
  --bad: #A3312A;
  --bad-soft: #F8E6E3;
  --good: #1F5C3A;
  --good-soft: #E6F1EA;
  --focus: #8A2D5C;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(22, 21, 26, 0.06), 0 8px 24px rgba(22, 21, 26, 0.06);
  --font: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --display: 'Bricolage Grotesque', 'Geist', sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131215;
    --panel: #1C1B1F;
    --sunk: #26242A;
    --ink: #F1EFEC;
    --ink-2: #B3AEB8;
    --ink-3: #8A8590;
    --line: #2F2D33;
    --line-2: #27252B;
    --control-line: #3A3840;
    --accent: #D27BA6;
    --accent-ink: #1C1B1F;
    --accent-soft: #3A2431;
    --accent-text: #E6A9C6;
    --warn: #E2B46E;
    --warn-soft: #3A2F1E;
    --bad: #EB8D86;
    --bad-soft: #3D2422;
    --good: #8CC79A;
    --good-soft: #21352A;
    --focus: #D27BA6;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 22px; font-weight: 650; letter-spacing: -0.01em; }
h2 { font-size: 16px; font-weight: 600; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 12.5px; }
.hidden { display: none !important; }

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

/* ─── Buttons and inputs ─── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--ink-3); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 550; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { color: var(--bad); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--line-2); }
.btn.sm { height: 28px; padding: 0 9px; font-size: 13px; }

.input, select.input {
  height: 34px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); min-width: 0;
}
.input:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
label.field { display: grid; gap: 5px; font-weight: 550; font-size: 13px; }
label.field .hint { font-weight: 400; color: var(--ink-2); }

/* ─── App shell ─── */
.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.nav {
  border-right: 1px solid var(--line); padding: 20px 12px;
  display: flex; flex-direction: column; gap: 2px; background: var(--panel);
}
.brand { padding: 0 10px 18px; }
.brand b { display: block; font-size: 15px; }
.brand span { font-size: 12.5px; color: var(--ink-2); }
.nav a {
  display: flex; align-items: center; gap: 8px; justify-content: space-between;
  padding: 8px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-weight: 500;
}
.nav a:hover { background: var(--line-2); color: var(--ink); }
.nav a.active { background: var(--accent-soft); color: var(--ink); }
.nav .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
.nav .spacer { flex: 1; }
.main { padding: 28px 32px 120px; max-width: 1180px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.page-head p { margin: 6px 0 0; color: var(--ink-2); }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.panel.pad { padding: 20px; }
.stack { display: grid; gap: 16px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ─── Toolbar and table ─── */
.toolbar { display: flex; gap: 8px; align-items: center; padding: 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.toolbar .search { flex: 1 1 220px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; cursor: pointer; font-size: 13px; color: var(--ink-2);
}
.chip.on { background: var(--ink); color: var(--panel); border-color: var(--ink); }
.chip .n { opacity: 0.7; margin-left: 4px; }

table.services { width: 100%; border-collapse: collapse; }
table.services th {
  text-align: left; font-weight: 550; font-size: 12px; color: var(--ink-2);
  text-transform: uppercase; letter-spacing: 0.04em;
  padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--panel);
  position: sticky; top: 0; z-index: 1;
}
table.services td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.services tr:last-child td { border-bottom: 0; }
table.services tr.selected td { background: var(--accent-soft); }
table.services tr.off td.name-cell .name-input { color: var(--ink-3); }
td.check, th.check { width: 36px; padding-right: 0 !important; }
td.check input, th.check input { width: 16px; height: 16px; margin-top: 8px; accent-color: var(--accent); }
th.check input { margin-top: 0; }
.group-head td {
  background: var(--bg) !important; font-weight: 600; font-size: 13px; padding: 8px 12px !important;
  border-bottom: 1px solid var(--line) !important;
}
.group-head .faint { font-weight: 400; margin-left: 6px; }

.name-input, .detail-input {
  width: 100%; border: 1px solid transparent; border-radius: 6px; background: transparent; padding: 3px 6px; margin-left: -6px;
}
.name-input { font-weight: 550; }
.detail-input { font-size: 12.5px; color: var(--ink-2); }
.name-input:hover, .detail-input:hover { border-color: var(--line); }
.name-input:focus, .detail-input:focus { border-color: var(--focus); background: var(--panel); outline: none; }
.square-name { font-size: 12px; color: var(--ink-3); margin-top: 2px; padding-left: 0; }
.suggest {
  font-size: 12px; margin-top: 3px; border: 0; background: none; padding: 0; color: var(--accent); cursor: pointer;
}
.suggest:hover { text-decoration: underline; }

select.group-select { height: 30px; font-size: 13px; max-width: 180px; }
.price { white-space: nowrap; font-variant-numeric: tabular-nums; }
.price .faint { display: block; font-size: 12px; }

.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px;
  border-radius: 6px; font-size: 12.5px; font-weight: 550; white-space: nowrap;
  background: var(--line-2); color: var(--ink-2); border: 0; cursor: pointer;
}
.badge.pay { background: var(--good-soft); color: var(--good); }
.badge.deposit { background: var(--accent-soft); color: var(--accent); }
.badge.consult { background: var(--warn-soft); color: var(--warn); }
.badge.off { background: var(--bad-soft); color: var(--bad); cursor: default; }
.from { display: block; font-size: 11.5px; color: var(--ink-3); margin-top: 3px; }

.switch { position: relative; width: 34px; height: 20px; display: inline-block; margin-top: 5px; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span {
  position: absolute; inset: 0; border-radius: 999px; background: var(--line); transition: background 0.15s; cursor: pointer;
}
.switch span::after {
  content: ''; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; transition: transform 0.15s; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.switch input:checked + span { background: var(--ink); }
.switch input:checked + span::after { background: var(--panel); }
.switch input:disabled + span { opacity: .45; cursor: not-allowed; }
.switch input:checked + span::after { transform: translateX(14px); }
.switch input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }

.empty { padding: 48px 20px; text-align: center; color: var(--ink-2); }

/* ─── Bulk bar ─── */
.bulkbar {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center;
  background: var(--ink); color: var(--panel); padding: 8px 8px 8px 14px; border-radius: 12px;
  box-shadow: var(--shadow); z-index: 20; max-width: calc(100vw - 32px);
}
.bulkbar .count { font-weight: 600; margin-right: 6px; }
.bulkbar .btn { background: transparent; color: var(--panel); border-color: rgba(255, 255, 255, 0.2); height: 32px; }
.bulkbar .btn:hover { background: rgba(255, 255, 255, 0.1); }
@media (prefers-color-scheme: dark) {
  .bulkbar .btn { border-color: rgba(0, 0, 0, 0.2); }
  .bulkbar .btn:hover { background: rgba(0, 0, 0, 0.08); }
}
.menu { position: relative; }
.menu-list {
  position: absolute; bottom: calc(100% + 8px); left: 0; min-width: 200px; max-height: 320px; overflow: auto;
  background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow); padding: 4px; z-index: 30;
}
.menu-list button {
  display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: none;
  border-radius: 6px; cursor: pointer;
}
.menu-list button:hover { background: var(--line-2); }
.menu-list hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }

/* ─── Dialog ─── */
dialog {
  border: 1px solid var(--line); border-radius: 14px; padding: 0; width: min(520px, calc(100vw - 32px));
  background: var(--panel); color: var(--ink); box-shadow: var(--shadow);
}
dialog::backdrop { background: rgba(20, 18, 14, 0.35); }
.dialog-body { padding: 20px; display: grid; gap: 14px; }
.dialog-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.options { display: grid; gap: 6px; }
.option {
  display: grid; grid-template-columns: 20px 1fr; gap: 8px; align-items: start;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
}
.option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.option input { margin-top: 3px; accent-color: var(--accent); }
.option b { font-weight: 550; }
.option .extra { grid-column: 2; display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.option .extra .input { width: 110px; }
.diff { max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.diff div { padding: 8px 12px; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.diff div:last-child { border-bottom: 0; }
.diff s { color: var(--ink-3); }

/* ─── Groups page ─── */
.group-row {
  display: grid; grid-template-columns: auto 1fr auto auto auto; gap: 12px; align-items: center;
  padding: 12px 16px; border-bottom: 1px solid var(--line-2);
}
.group-row:last-child { border-bottom: 0; }
.order-btns { display: grid; gap: 2px; }
.order-btns button { width: 26px; height: 18px; border: 1px solid var(--line); background: var(--panel); border-radius: 4px; cursor: pointer; font-size: 10px; line-height: 1; }
.order-btns button:disabled { opacity: 0.35; cursor: default; }

/* ─── Connection page ─── */
.grid-2 { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; align-items: start; }
.notice { padding: 10px 12px; border-radius: 8px; font-size: 13.5px; }
.notice.bad { background: var(--bad-soft); color: var(--bad); }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.good { background: var(--good-soft); color: var(--good); }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--ink-2); }
.steps b { color: var(--ink); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 13.5px; }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; }
pre.code {
  margin: 0; padding: 12px; border-radius: 8px; background: var(--line-2); font-size: 12.5px;
  overflow-x: auto; white-space: pre-wrap; word-break: break-all;
}

/* ─── Toast ─── */
.toasts { position: fixed; top: 16px; right: 16px; display: grid; gap: 8px; z-index: 50; }
.toast {
  background: var(--ink); color: var(--panel); padding: 10px 14px; border-radius: 10px;
  box-shadow: var(--shadow); font-size: 13.5px; max-width: 360px; animation: in 0.15s ease-out;
}
.toast.error { background: var(--bad); color: #fff; }
@keyframes in { from { opacity: 0; transform: translateY(-4px); } }

/* ─── Auth pages ─── */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth .panel { width: min(400px, 100%); padding: 28px; display: grid; gap: 16px; }
.auth h1 { font-size: 20px; }
.auth form { display: grid; gap: 12px; }
.auth .btn.primary { height: 38px; justify-content: center; }
.error-text { color: var(--bad); font-size: 13px; min-height: 18px; }

/* ─── Small screens ─── */
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .nav { flex-direction: row; overflow-x: auto; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { display: none; }
  .nav .spacer { display: none; }
  .main { padding: 20px 16px 120px; }
  .grid-2 { grid-template-columns: 1fr; }
  table.services .col-price, table.services .col-group { display: none; }
  .page-head { flex-direction: column; align-items: flex-start; }
}

/* ═════════ v2: overview, health, designer, promos ═════════ */

.nav .count { font-style: normal; font-size: 11px; font-weight: 600; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--warn); color: #fff; display: inline-grid; place-items: center; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.label-sm { font-size: 12px; font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.linkish { border: 0; background: none; padding: 0; cursor: pointer; font-size: 12px; display: block; text-align: left; }
.linkish:hover { color: var(--accent); text-decoration: underline; }
.warn-text { font-size: 12px; color: var(--warn); margin-top: 3px; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.indent { padding-left: 14px; border-left: 2px solid var(--line); }
.panel-head { padding: 16px 20px 0; }
.right { text-align: right; display: grid; justify-items: end; gap: 4px; }
.row.right { display: flex; }
.table-wrap { overflow-x: auto; }
.small.faint, .faint.small { font-size: 12px; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr) 1.6fr; gap: 12px; margin: 16px 0; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 2px; align-content: start; }
.stat-label { font-size: 12px; color: var(--ink-2); }
.stat-value { font-size: 24px; font-weight: 650; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.spark svg { width: 100%; height: 44px; display: block; margin-top: 8px; }
.bars { display: grid; gap: 8px; margin-top: 12px; }
.bar-row { display: grid; grid-template-columns: minmax(120px, 1fr) 2fr 30px; gap: 10px; align-items: center; font-size: 13px; }
.bar-row .bar { height: 8px; background: var(--line-2); border-radius: 4px; overflow: hidden; }
.bar-row .bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }

/* checklist */
.checklist-card { margin-bottom: 16px; }
.progress { height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.checklist { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.check-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 13.5px; }
.check-item:hover { border-color: var(--accent); }
.check-item .tick { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line); flex-shrink: 0; display: grid; place-items: center; font-size: 12px; }
.check-item.done { color: var(--ink-3); }
.check-item.done .tick { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.check-item .go { margin-left: auto; color: var(--accent); }

/* lists */
.list { display: grid; }
.list-row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 20px; border-bottom: 1px solid var(--line-2); align-items: flex-start; }
.list-row:last-child { border-bottom: 0; }
.panel .empty.small { padding: 28px 20px; }

/* insights */
.insights { display: grid; gap: 8px; }
.insight { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); border-left-width: 3px; }
.insight.problem { border-left-color: var(--bad); background: var(--bad-soft); }
.insight.fix { border-left-color: var(--warn); }
.insight.tip { border-left-color: var(--accent); }
.insight.info { border-left-color: var(--line); }
.insight-main { display: grid; gap: 3px; min-width: 0; }
.insight-actions { display: flex; gap: 6px; flex-shrink: 0; }
.examples { font-size: 12.5px; display: grid; gap: 2px; margin-top: 2px; }
.examples s { color: var(--ink-3); }
.health { margin-bottom: 14px; padding: 12px; display: grid; gap: 8px; }
.health-head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 4px; }
.health .insight { padding: 9px 12px; }

/* service dialog */
dialog.wide { width: min(680px, calc(100vw - 32px)); }
.opt-list { display: grid; gap: 10px; }
.opt-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; align-items: center; }
.opt-row .input { width: 100%; margin-top: 4px; }
.opt-meta { display: grid; justify-items: end; gap: 3px; font-size: 13px; }

/* designer */
body.wide-view .main { max-width: none; }
.designer { display: grid; grid-template-columns: minmax(380px, 520px) 1fr; gap: 24px; align-items: start; }
.designer-controls { min-width: 0; padding-bottom: 80px; }
.designer-preview { position: sticky; top: 20px; height: calc(100vh - 40px); display: flex; flex-direction: column; gap: 8px; }
.preview-bar { display: flex; justify-content: space-between; align-items: center; }
.frame-wrap { flex: 1; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; box-shadow: var(--shadow); display: flex; justify-content: center; }
.frame-wrap iframe { width: 100%; height: 100%; border: 0; transition: width .25s; }
.designer-preview.phone .frame-wrap { background: var(--line-2); }
.designer-preview.phone iframe { width: 390px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs a { padding: 9px 12px; color: var(--ink-2); text-decoration: none; font-weight: 550; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--accent); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 14px; }
.card h3 { font-size: 14px; font-weight: 650; margin: 0; }
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.preset { display: grid; gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); cursor: pointer; text-align: left; }
.preset:hover { border-color: var(--ink-3); }
.preset.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.swatches { display: flex; gap: 0; height: 28px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); margin-bottom: 4px; }
.swatches i { flex: 1; }
.colors { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.color-row { display: grid; grid-template-columns: 34px 1fr 90px; gap: 8px; align-items: center; font-size: 13px; }
.color-row input[type=color] { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 2px; background: var(--panel); cursor: pointer; }
.color-row .input { height: 30px; font-size: 12.5px; }
input[type=range] { width: 100%; accent-color: var(--accent); }
.segment { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; width: fit-content; max-width: 100%; flex-wrap: wrap; }
.segment button { border: 0; background: var(--panel); padding: 7px 12px; cursor: pointer; font-size: 13px; color: var(--ink-2); border-right: 1px solid var(--line); }
.segment button:last-child { border-right: 0; }
.segment button.on { background: var(--ink); color: var(--panel); }
.toggle-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; font-size: 13.5px; font-weight: 500; cursor: pointer; }
.toggle-row > span:first-child { display: grid; gap: 2px; }
.toggle-row .hint { font-weight: 400; color: var(--ink-2); font-size: 12.5px; }
.toggle-row .switch { margin-top: 0; flex-shrink: 0; }
.door { border: 1px solid var(--line); border-radius: 10px; }
.door.on { border-color: var(--accent); }
.door-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.door-head b { flex: 1; font-weight: 550; }
.door-icon { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.door-body { padding: 0 12px 12px; display: grid; gap: 10px; }
.chips.wrap { flex-wrap: wrap; align-items: center; }
.chip-x { border: 0; background: none; color: inherit; cursor: pointer; margin-left: 4px; font-size: 14px; }
.input.sm { height: 28px; font-size: 13px; }
.code-wrap { position: relative; }
.code-wrap .copy { position: absolute; top: 6px; right: 6px; }
.code-wrap pre.code { padding-right: 70px; }
details.platforms summary { cursor: pointer; color: var(--accent); font-weight: 500; font-size: 13.5px; }
.save-bar { position: fixed; left: 236px; bottom: -80px; display: flex; gap: 10px; align-items: center; background: var(--ink); color: var(--panel); padding: 10px 12px 10px 18px; border-radius: 12px; box-shadow: var(--shadow); transition: bottom .25s cubic-bezier(.16,1,.3,1); z-index: 25; }
.save-bar.show { bottom: 20px; }
.save-bar .btn.ghost { color: var(--panel); }
.save-bar .btn.ghost:hover { background: rgba(255, 255, 255, .1); }

/* promos */
.pick-list { max-height: 210px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; margin-top: 6px; }
.pick { display: grid; grid-template-columns: 20px 1fr auto; gap: 8px; align-items: center; padding: 7px 10px; border-bottom: 1px solid var(--line-2); font-weight: 400; cursor: pointer; }
.pick:last-child { border-bottom: 0; }
.pick input { accent-color: var(--accent); }

@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat.wide { grid-column: 1 / -1; }
  .designer { grid-template-columns: 1fr; }
  .designer-preview { position: static; height: 640px; }
  .save-bar { left: 50%; transform: translateX(-50%); }
}
@media (max-width: 860px) {
  .two, .colors { grid-template-columns: 1fr; }
  .insight { flex-direction: column; align-items: flex-start; }
  .list-row { padding: 12px 14px; }
}
a.btn { text-decoration: none; color: inherit; }
a.btn.primary { color: var(--accent-ink); }
div.field { display: grid; gap: 6px; font-weight: 550; font-size: 13px; }
.field .hint { font-weight: 400; color: var(--ink-2); font-size: 12.5px; }
.overview { display: grid; gap: 16px; }
.overview .stats { margin: 0; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.plan-card { display: grid; gap: 10px; align-content: start; }
.plan-price { font-size: 20px; font-variant-numeric: tabular-nums; }
.perk-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13.5px; }
.credit-row { display: flex; gap: 8px; align-items: center; }
.credit-row select { flex: 1; }

/* Automations */
.auto-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.auto-card { display: flex; flex-direction: column; gap: 14px; }
.auto-card h2 { margin: 0; font-size: 16px; }
.auto-card.off { background: var(--bg); }
.auto-card.off h2, .auto-card.off p { color: var(--ink-3); }
.auto-result { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--ink-2); margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line-2); }
.auto-result .good { color: var(--good); }
.field.inline { display: flex; flex-direction: row; align-items: center; gap: 8px; flex-wrap: wrap; }
.field.inline .input { width: auto; }
@media (max-width: 900px) { .auto-grid { grid-template-columns: 1fr; } }

/* Funnel */
.funnel { display: grid; gap: 8px; }
.funnel-row { display: grid; grid-template-columns: 190px 1fr 48px 120px; gap: 12px; align-items: center; font-size: 13.5px; }
.funnel-row b { text-align: right; }
.funnel-rate { font-size: 22px; }
a.stat.link { color: inherit; text-decoration: none; }
a.stat.link:hover { border-color: var(--accent); }
@media (max-width: 700px) { .funnel-row { grid-template-columns: 1fr 44px; } .funnel-row .bar, .funnel-row .faint { display: none; } }
.funnel-row .bar { height: 10px; background: var(--line-2); border-radius: 5px; overflow: hidden; }
.funnel-row .bar i { display: block; height: 100%; background: var(--accent); border-radius: 5px; }
.rebook-row { flex-wrap: nowrap; }
.rebook-name { min-width: 150px; }
@media (max-width: 700px) { .rebook-row { flex-wrap: wrap; } .rebook-name { flex-basis: 100%; min-width: 0; } }


/* ═════════ v3: design system ═════════ */

body { font-size: 14px; line-height: 1.5; }
a { color: var(--ink); text-underline-offset: 3px; }
h1, h2, .stat-value, .plan-price, .funnel-rate { font-family: var(--display); }
h1 { font-size: 30px; font-weight: 600; letter-spacing: -0.022em; }
h2 { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.dialog-body h2 { font-size: 22px; }

/* Buttons: ink is primary. The accent is for data and the current page. */
.btn { height: 40px; padding: 0 16px; border-radius: var(--radius-sm); border-color: var(--control-line); font-weight: 500; font-size: 13.5px; }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--panel); font-weight: 500; }
.btn.primary:hover { filter: none; background: #2A2830; }
.btn.sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.btn.ghost:hover { background: var(--sunk); }
.input, select.input { height: 40px; border-color: var(--control-line); border-radius: var(--radius-sm); }
textarea.input { height: auto; padding: 10px 12px; }
.input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px var(--accent-soft); }
label.field { font-weight: 500; }

/* Shell: the menu sits on the ground, no box around it. */
.shell { grid-template-columns: 232px 1fr; }
.nav { background: transparent; border-right: 0; padding: 28px 16px 24px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 26px; }
.brand .mono-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--ink); color: var(--bg); display: grid; place-items: center; font: 700 15px/1 var(--display); flex-shrink: 0; }
.brand b { font-size: 14px; font-weight: 600; }
.brand span { font-size: 12px; color: var(--ink-3); }
.nav a { color: var(--ink-2); padding: 8px 10px 8px 26px; position: relative; font-weight: 400; }
.nav a:hover { background: var(--sunk); color: var(--ink); }
.nav a.active { background: var(--sunk); color: var(--ink); font-weight: 600; }
.nav a.active::before { content: ''; position: absolute; left: 12px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 3px; background: var(--accent); }
.nav .sep { height: 1px; background: var(--line); margin: 10px 10px; }
.nav .product { padding: 18px 10px 0; font-size: 12px; color: var(--ink-3); }
.main { padding: 28px 40px 120px; max-width: 1200px; }
.page-head { align-items: center; margin-bottom: 22px; }
.page-head p { color: var(--ink-2); }

/* Surfaces: white, borderless, on the ground. */
.panel, .stat, .card { border: 0; border-radius: var(--radius); }
.panel.pad { padding: 22px 26px; }
.panel-head { padding: 22px 26px 4px; }
.list-row { padding: 13px 26px; border-bottom-color: var(--line-2); }
.toolbar { border-bottom-color: var(--line-2); padding: 14px 18px; }
.chip { height: 32px; padding: 0 12px; border-color: var(--control-line); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--panel); }

/* Badges: quiet tints, readable ink. */
.badge { border-radius: 999px; padding: 2px 9px; font-weight: 500; }
.badge.pay { background: var(--good-soft); color: var(--good); }
.badge.deposit { background: var(--accent-soft); color: var(--accent-text); }

/* Notices */
.notice { border-radius: var(--radius-sm); }

/* Stats elsewhere (memberships, packages, automations) */
.stat { padding: 18px 20px; }
.stat-label { font-size: 13px; color: var(--ink-2); }
.stat-value { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; }

/* Checklist */
.check-item { border-color: var(--line); border-radius: var(--radius-sm); }
.check-item:hover { border-color: var(--ink-3); }
.check-item .go { color: var(--ink-3); }

/* Dialog */
dialog { border-radius: 20px; }

/* Auth */
.auth h1 { font-size: 28px; }
.auth .panel { padding: 32px; box-shadow: var(--shadow); }
.auth .mono-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--ink); color: var(--bg); display: grid; place-items: center; font: 700 17px/1 var(--display); margin-bottom: 18px; }

/* ─── Overview (v3) ─── */
.ov { display: grid; gap: 22px; }
.ov-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--sunk); border-radius: 10px; }
.seg button { border: 0; background: transparent; color: var(--ink-2); padding: 6px 12px; border-radius: 8px; font-size: 13px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--panel); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(22, 21, 26, .08); }
.headline { margin: 2px 0 0; max-width: 980px; font: 500 44px/1.14 var(--display); letter-spacing: -0.025em; color: var(--ink-3); }
.headline b { color: var(--ink); font-weight: 700; }
.chart { padding: 24px 28px 18px; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 18px; }
.chart-bars { height: 120px; display: flex; align-items: flex-end; gap: 4px; border-bottom: 1px solid var(--line); }
.chart-bars i { flex: 1 1 0; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 3px; }
.chart-bars i.zero { background: var(--line); }
.chart-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); padding-top: 8px; }
.ov-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; }
.ov-pair > .panel { padding: 24px 28px; display: flex; flex-direction: column; gap: 14px; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.drop { display: grid; gap: 5px; }
.drop-top { display: flex; justify-content: space-between; font-size: 13.5px; }
.drop-bar { height: 8px; background: var(--line-2); border-radius: 4px; overflow: hidden; }
.drop-bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.tip { margin: 4px 0 0; padding: 14px 16px; background: var(--bg); border-radius: var(--radius-sm); font-size: 13.5px; color: var(--ink-2); }
.tip b { color: var(--ink); font-weight: 600; }
.won { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line-2); }
.won .amt { font: 600 20px/1 var(--display); font-variant-numeric: tabular-nums; }
.look { padding: 22px 28px 8px; }
.look-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line-2); }
.look-row > div:first-child { flex: 1 1 360px; min-width: 0; }
.bk { padding: 22px 28px 10px; }
.bk table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 13.5px; }
.bk th { text-align: left; font-weight: 500; color: var(--ink-3); font-size: 12.5px; padding: 10px 12px 10px 0; border-top: 1px solid var(--line-2); }
.bk td { padding: 12px 12px 12px 0; border-top: 1px solid var(--line-2); vertical-align: top; }
.bk .num { text-align: right; font-variant-numeric: tabular-nums; padding-right: 0; }
.bk .who { font-weight: 500; }
.ov-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; }

@media (max-width: 860px) {
  .nav { background: var(--bg); }
  .nav a { padding: 8px 12px; white-space: nowrap; }
  .nav a.active::before, .nav .sep, .nav .product { display: none; }
  .main { padding: 16px 16px 100px; }
  .headline { font-size: 30px; line-height: 1.16; }
  .chart, .ov-pair > .panel, .look, .bk { padding-left: 18px; padding-right: 18px; }
  .chart-bars { height: 88px; gap: 3px; }
  h1 { font-size: 26px; }
}
.auth .btn.primary { height: 44px; }

/* Phone: the menu becomes a sticky row you swipe along, above the page. */
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .nav { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; gap: 4px; padding: 10px 16px; position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .brand, .nav .sep, .nav .spacer { display: none; }
  .nav a { flex: 0 0 auto; padding: 8px 12px; min-height: 40px; }
  .ov-top { gap: 10px; }
  .ov-top .row { width: 100%; }
  .ov-top .row .btn { flex: 1; justify-content: center; height: 44px; }
  .seg { width: 100%; }
  .seg button { flex: 1; height: 38px; }
  .ov-pair { grid-template-columns: 1fr; }
  .bk .table-wrap { margin: 0 -18px; padding: 0 18px; }
}
.main, .ov > * { min-width: 0; }

/* A membership plan that is turned off: still listed, clearly not on sale. */
.plan-card.plan-off { opacity: .72; }
.plan-card.plan-off .plan-price { color: var(--ink-3); }

/* Services table: the "Set up" link into a service's page. */
.services .col-open { width: 1%; white-space: nowrap; text-align: right; }
.services .col-price .linkish.small { display: block; margin-top: 2px; }
/* A package that is turned off: still listed, clearly not on sale. */
.list-row.plan-off > div:first-child { opacity: .6; }

/* Service page: options edited in place and saved to Square. */
.opt-edit { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.opt-edit-main { display: grid; grid-template-columns: minmax(0, 1fr) 110px 90px; gap: 10px; }
.opt-edit-more { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.opt-edit-more .btn { margin-left: auto; }
label.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.staff-pick { display: inline-flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
details.more > summary { cursor: pointer; font-size: 13.5px; color: var(--ink-2); }
details.more > summary:hover { color: var(--ink); }
@media (max-width: 640px) {
  .opt-edit-main { grid-template-columns: 1fr 1fr; }
  .opt-edit-main .field:first-child { grid-column: 1 / -1; }
}

/* Square checks with their fix (setup popup). */
.check-row { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--bg); }
.check-row .tick { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 700; }
.check-row.ok .tick { background: var(--good-soft); color: var(--good); }
.check-row.todo .tick { background: var(--warn-soft); color: var(--warn); }

/* ── Simple first: the service side panel, the setup popup, the Overview setup card ── */

/* Close button used in panels and popups. */
button.x { border: 0; background: transparent; color: var(--ink-3); font-size: 22px; line-height: 1; width: 32px; height: 32px; border-radius: 8px; cursor: pointer; flex: none; transition: background .15s, color .15s; }
button.x:hover { background: var(--sunk); color: var(--ink); }

/* The service side panel slides in from the right over the list. */
dialog.drawer {
  margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(520px, 100vw); max-width: 100vw;
  border: 0; border-left: 1px solid var(--line); border-radius: 0; overflow-y: auto; overflow-x: hidden;
  animation: drawer-in .18s ease-out;
}
@keyframes drawer-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-body { display: grid; gap: 0; }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 22px 24px 14px; position: sticky; top: 0; background: var(--panel); z-index: 1; border-bottom: 1px solid var(--line-2); }
.drawer-head h2 { margin: 0; font-size: 22px; overflow-wrap: anywhere; }
.drawer-section { padding: 18px 24px; border-bottom: 1px solid var(--line-2); }
.drawer-section h3, .drawer-more h3 { margin: 0; font-size: 15px; }
.drawer-more { padding: 16px 24px 28px; }
.drawer-more > summary { font-weight: 500; }

/* Services list: the name opens the panel. */
.svc-open { border: 0; background: transparent; padding: 0; font: inherit; font-weight: 500; color: var(--ink); text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.svc-open:hover { text-decoration: underline; text-underline-offset: 3px; }

/* The setup popup. */
.wizard { position: relative; display: grid; gap: 14px; padding: 26px 26px 22px; }
.wizard h2 { margin: 0; font-size: 24px; padding-right: 32px; }
.wizard .muted { margin: 0; }
.wizard-x { position: absolute; top: 14px; right: 14px; }
.wizard-dots { display: flex; gap: 6px; }
.wizard-dots i { width: 22px; height: 4px; border-radius: 4px; background: var(--line); }
.wizard-dots i.on { background: var(--ink); }
.wizard-foot { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding-top: 6px; }
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.type-card { text-align: left; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel); color: var(--ink); font: inherit; font-weight: 500; cursor: pointer; transition: border-color .15s, background .15s; }
.type-card:hover, .type-card.on { border-color: var(--ink); background: var(--bg); }
.type-card:disabled { opacity: .6; cursor: progress; }
.rec-list { display: grid; gap: 2px; }
.rec-row { display: grid; grid-template-columns: minmax(0, 1fr) 190px 104px; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.rec-row.rec-head { padding: 0 0 4px; }
.rec-row:last-child { border-bottom: 0; }
.link-box { display: flex; gap: 8px; }
.link-box .input { flex: 1; min-width: 0; }

/* Overview: the one setup card. */
.setup-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.setup-card h2 { margin: 0; }

/* Settings: package sizes. */
.size-row .input { width: 76px; }

@media (max-width: 640px) {
  .rec-row { grid-template-columns: 1fr 1fr; }
  .rec-row > div:first-child { grid-column: 1 / -1; }
  .rec-row.rec-head { display: none; }
  .drawer-head, .drawer-section, .drawer-more { padding-left: 16px; padding-right: 16px; }
  .wizard { padding: 22px 16px 18px; }
}

/* ── Services list: grouped cards, one aligned row per service ── */
.svc-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 14px; }
.svc-toolbar .search { flex: 1 1 240px; min-width: 0; }
.svc-toolbar select.input { width: auto; min-width: 150px; }
.svc-toolbar .chips { gap: 6px; }
.svc-toolbar .chip { height: 40px; }

.svc-list { display: grid; gap: 14px; }
.svc-row {
  display: grid; grid-template-columns: 28px minmax(0, 1fr) 190px 112px 64px; gap: 14px; align-items: center;
  padding: 12px 18px; min-height: 64px; border-top: 1px solid var(--line-2); transition: background .15s;
}
.svc-group .svc-row:first-of-type { border-top: 0; }
.svc-group .svc-row:hover { background: var(--bg); }
.svc-row.selected { background: var(--accent-soft); }

/* No overflow clipping, so a group's menu can open over the cards below; the last row keeps the corners. */
.svc-group { background: var(--panel); border-radius: var(--radius); position: relative; }
.svc-group:has(.menu-list:not(.hidden)) { z-index: 5; }
.svc-group .svc-row:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.svc-group-head { display: flex; align-items: baseline; gap: 10px; padding: 16px 18px 6px; }
.svc-group-head h3 { margin: 0; font-size: 15px; }

/* Selection boxes appear on hover, focus, or once anything is selected. */
.pick { display: grid; place-items: center; cursor: pointer; }
.pick input { width: 16px; height: 16px; margin: 0; accent-color: var(--ink); cursor: pointer; }
.svc-list:not(.selecting) .svc-group .svc-row:not(:hover):not(:focus-within) .pick input { opacity: 0; }

.svc-main { min-width: 0; display: grid; gap: 3px; }
.svc-main .svc-open { font-size: 14.5px; }
.svc-meta { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.svc-warn { color: var(--warn); }
.svc-row.off .svc-open { color: var(--ink-3); }


@media (max-width: 760px) {
  .svc-row { grid-template-columns: 24px minmax(0, 1fr) 44px 44px; gap: 10px; padding: 12px 14px; }
}

/* ── Services, simplest form: one button, one menu, groups that carry their own deposit ── */
.icon-btn { width: 40px; padding: 0; display: inline-grid; place-items: center; }
.icon-btn .dots, .icon-btn svg { display: block; fill: currentColor; }
/* "More" menus open downward and line up with the button's right edge. */
.menu.down .menu-list { top: calc(100% + 6px); bottom: auto; right: 0; left: auto; z-index: 60; }
.svc-toolbar select.input { min-width: 220px; }

/* The first column is a drag handle now (checkboxes only in "Edit several"). */
.drag { display: inline-grid; grid-template-rows: repeat(3, 3px); gap: 3px; justify-content: center; align-content: center; width: 20px; height: 28px; cursor: grab; border-radius: 6px; opacity: 0; transition: opacity .15s, background .15s; }
.drag i { display: block; width: 12px; height: 2px; border-radius: 2px; background: var(--ink-3); }
.drag:hover { background: var(--sunk); }
.svc-row:hover .drag, .svc-group-head:hover .drag, .drag:focus-visible { opacity: 1; }
.drag:active { cursor: grabbing; }
.svc-empty { padding: 14px 18px 18px 52px; }

.svc-group-head { align-items: center; gap: 10px; padding: 12px 18px 8px; }
.svc-group-head .drag { width: 28px; }
.group-pay { display: flex; align-items: center; gap: 8px; }
.group-pay select.input { height: 34px; width: auto; min-width: 150px; font-size: 13px; }
.svc-group-head .icon-btn { height: 34px; width: 34px; }

@media (max-width: 760px) {
  .svc-group-head { flex-wrap: wrap; }
  .group-pay { order: 5; width: 100%; padding-left: 30px; }
  .group-pay select.input { flex: 1; }
  .svc-toolbar select.input { min-width: 0; flex: 1; }
}

/* Settings: one column of sections (Square connection, your business, recommendations). */
.settings { display: grid; gap: 16px; max-width: 640px; }
.settings > .page-head { margin-bottom: 0; }
.settings-section h2 { margin: 0; }
.settings-section.stack > .panel { margin: 0; }

/* ── Services, final form (Oct 9 design): narrow page, quiet group heads, one line per service ── */
.svc-list { gap: 18px; }
.svc-group { border: 1px solid var(--line-2); }
.svc-group-head { padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.svc-group-head h3 { font-size: 15px; font-weight: 600; }
.svc-main .svc-open { font-size: 14.5px; font-weight: 500; }
.svc-meta { font-size: 12.5px; line-height: 1.5; }
.svc-own { color: var(--ink); font-weight: 500; }
.svc-fix { border: 0; background: none; padding: 0; font: inherit; color: var(--warn); cursor: pointer; }
.svc-fix:hover { text-decoration: underline; text-underline-offset: 2px; }
.svc-online { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.svc-online .switch { margin-top: 0; }
.svc-chev { display: grid; place-items: center; width: 20px; height: 28px; border: 0; background: none; color: var(--ink-3); cursor: pointer; padding: 0; }
.svc-row:hover .svc-chev { color: var(--ink); }
.svc-select-all { padding: 0 2px; }

/* The group's "At booking" picker reads as text with a chevron, not a form box. */
.ghost-select {
  appearance: none; -webkit-appearance: none; border: 0; background-color: transparent; color: var(--ink); font: inherit; font-size: 13.5px;
  padding: 6px 26px 6px 8px; border-radius: 8px; cursor: pointer; text-align: right;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%238C8893' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; transition: background-color .15s;
}
.ghost-select:hover { background-color: var(--sunk); }
.ghost-select:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.ghost-select option { color: var(--ink); background: var(--panel); }
.group-pay { gap: 6px; }
/* The group's ⋯ (rename, move, delete) shows on hover, like the drag handles. */


/* ── Services layout: head and rows share one grid (grip, content, control, menu), inside the card ── */
.services-page { max-width: 1040px; }
.svc-group-head, .svc-group .svc-row {
  display: grid; grid-template-columns: 20px minmax(0, 1fr) auto 32px; gap: 12px; align-items: center; padding: 14px 16px 14px 10px;
}
.svc-group .svc-row { min-height: 0; cursor: pointer; }
.svc-list.selecting .svc-group .svc-row { cursor: default; }
.svc-group-head { border-bottom: 1px solid var(--line-2); }
.svc-group-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; flex-wrap: wrap; }
.svc-group-title h3 { margin: 0; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }

/* The grip sits in its own slot at the left of the card; it shows on hover (and on keyboard focus). */
.svc-group .drag { position: static; transform: none; width: 20px; height: 28px; opacity: 0; }
.svc-group-head:hover .drag, .svc-group .svc-row:hover .drag, .svc-group .drag:focus-visible { opacity: 1; }
@media (hover: none) { .svc-group .drag { opacity: .5; } } /* touch: no hover, so the grip stays faintly visible */

/* The group's menu sits in the same column as the rows' chevrons, quiet until hovered. */
.svc-group-head .menu .icon-btn { width: 32px; height: 32px; border-color: transparent; background: transparent; color: var(--ink-3); opacity: 1; }
.svc-group-head .menu .icon-btn:hover { background: var(--sunk); color: var(--ink); }
.svc-chev { width: 32px; height: 32px; justify-self: center; border-radius: 8px; }
.svc-chev:hover { background: var(--sunk); }
.svc-online { justify-self: end; }
.group-pay { justify-self: end; }

@media (max-width: 640px) {
  .svc-group-head, .svc-group .svc-row { grid-template-columns: 0 minmax(0, 1fr) auto 28px; gap: 8px; padding: 12px 10px 12px 4px; }
  .svc-group-head { row-gap: 4px; }
  .group-pay .small, .svc-online .small { display: none; }
  .ghost-select { padding-left: 4px; max-width: 150px; }
  .svc-toolbar { flex-wrap: wrap; }
  .svc-toolbar .search { flex-basis: 100%; }
  .svc-toolbar select.input { flex: 1; }
}

/* ── Drag to reorder: the lifted copy follows the pointer; its spot is an empty slot that moves ── */
body.is-dragging, body.is-dragging * { cursor: grabbing !important; user-select: none; }
.svc-group .drag { touch-action: none; cursor: grab; }
.drag-ghost {
  position: fixed; z-index: 1000; margin: 0; pointer-events: none; will-change: transform;
  background: var(--panel); border: 1px solid var(--ink-3); box-shadow: 0 18px 40px rgba(0, 0, 0, .28), 0 2px 6px rgba(0, 0, 0, .12);
}
.drag-ghost.is-row { border-radius: 12px; }
.drag-ghost.is-group { border-radius: var(--radius); }
.drag-ghost .drag { opacity: 1; }
.drag-slot { position: relative; }
.drag-slot > * { visibility: hidden; }
.drag-slot::after { content: ''; position: absolute; inset: 4px; border: 2px dashed var(--control-line); border-radius: 10px; background: var(--bg); }
.svc-group.drag-slot { border-color: transparent; background: transparent; }
.svc-group.drag-slot::after { inset: 0; border-radius: var(--radius); }
.svc-empty { padding: 16px 16px 18px 42px; }

/* ── Service panel: packages, one line each (sessions, price, per visit and savings, menu) ── */
.pk-list { border: 1px solid var(--line-2); border-radius: 12px; }
.pk-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 32px; grid-template-areas: 'name price menu' 'meta meta menu'; column-gap: 12px; row-gap: 2px; align-items: center; padding: 10px 6px 10px 14px; }
.pk-row + .pk-row { border-top: 1px solid var(--line-2); }
.pk-name { grid-area: name; display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.pk-price { grid-area: price; font-weight: 500; font-variant-numeric: tabular-nums; }
.pk-meta { grid-area: meta; font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.pk-row .menu { grid-area: menu; }
.pk-row .icon-btn { width: 32px; height: 32px; border-color: transparent; background: transparent; color: var(--ink-3); }
.pk-row .icon-btn:hover { background: var(--sunk); color: var(--ink); }
.pk-row.off .pk-name b, .pk-row.off .pk-price { color: var(--ink-3); }
.pk-row.off .pk-price { text-decoration: line-through; }
.pk-tag { font-size: 11px; font-weight: 500; padding: 1px 7px; border-radius: 999px; background: var(--sunk); color: var(--ink-2); }
.pk-add { display: block; width: 100%; text-align: left; border: 0; border-top: 1px solid var(--line-2); background: none; padding: 11px 14px; font: inherit; font-size: 13px; color: var(--ink-2); cursor: pointer; border-radius: 0 0 12px 12px; transition: background .15s, color .15s; }
.pk-add:first-child { border-top: 0; border-radius: 12px; }
.pk-add:hover { background: var(--sunk); color: var(--ink); }
.pk-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 12.5px; color: var(--ink-3); line-height: 1.5; }
.pk-link { flex: none; border: 0; background: none; padding: 0; font: inherit; color: var(--ink-2); font-weight: 500; cursor: pointer; transition: color .15s; }
.pk-link:hover { color: var(--ink); text-decoration: underline; }

/* ── Your page (Foyer Page): settings rail left, live preview right ── */
.pg-app { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; align-items: start; }
.pg-rail { background: var(--panel); border-radius: var(--radius); padding: 20px; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; min-width: 0; }
.pg-view { display: grid; gap: 22px; }
.pg-title { font: 600 20px/1.2 var(--display); margin: 0; }
.pg-group { display: grid; gap: 10px; }
.pg-group h3 { font: 600 15px/1.3 var(--display); margin: 0; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.pg-group h3 small { font: 400 12px var(--font); color: var(--ink-3); }
.pg-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pg-preset { border: 1px solid var(--control-line); background: var(--panel); color: var(--ink); border-radius: var(--radius-sm); padding: 8px; cursor: pointer; display: grid; gap: 6px; text-align: left; font-size: 12px; font-weight: 500; transition: border-color .15s, box-shadow .15s; }
.pg-preset:hover, .pg-own:hover, .pg-tile:hover { border-color: var(--ink-3); }
.pg-preset[aria-pressed="true"], .pg-own[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.pg-sw { height: 30px; border-radius: 6px; display: flex; overflow: hidden; border: 1px solid var(--line); }
.pg-sw i { flex: 1; }
.pg-own { display: flex; align-items: center; gap: 10px; width: 100%; border: 1px dashed var(--control-line); background: var(--panel); color: var(--ink); border-radius: var(--radius-sm); padding: 9px 10px; cursor: pointer; font-size: 13px; font-weight: 500; text-align: left; transition: border-color .15s; }
.pg-own[aria-pressed="true"] { border-style: solid; }
.pg-dots { display: flex; }
.pg-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--panel); margin-left: -5px; }
.pg-dots i:first-child { margin-left: 0; }
.pg-custom { display: grid; gap: 10px; padding: 12px; background: var(--sunk); border-radius: var(--radius-sm); }
.pg-color { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.pg-color input[type=color] { width: 38px; height: 34px; border: 1px solid var(--control-line); border-radius: 8px; padding: 2px; background: var(--panel); cursor: pointer; flex: none; }
.pg-color > span { flex: 1; min-width: 0; display: grid; }
.pg-color b { font-weight: 500; }
.pg-color small { color: var(--ink-3); font-size: 11.5px; }
.pg-color code { font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink-2); }
.pg-warn { font-size: 12.5px; color: var(--warn); background: var(--warn-soft); border-radius: 8px; padding: 8px 10px; display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.pg-warn[hidden] { display: none; }
.pg-photos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pg-tile { aspect-ratio: 1; border-radius: var(--radius-sm); border: 1px solid var(--control-line); cursor: pointer; position: relative; overflow: hidden; padding: 0; background: linear-gradient(160deg, var(--sunk), var(--line)); background-size: cover; background-position: center; transition: box-shadow .15s, border-color .15s; }
.pg-tile[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--ink); }
.pg-tile em { position: absolute; left: 4px; bottom: 4px; font: 500 10px/1.2 var(--font); font-style: normal; background: var(--panel); color: var(--ink); padding: 2px 5px; border-radius: 4px; }
.pg-toggles { display: grid; }
.pg-tg { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.pg-tg:last-child { border-bottom: 0; }
.pg-tg-txt { flex: 1; min-width: 0; display: grid; }
.pg-tg-txt b { font-weight: 500; }
.pg-tg-txt small { color: var(--ink-3); font-size: 11.5px; }
.pg-tg .switch { margin-top: 0; flex: none; }
.pg-tg.locked .switch { opacity: .7; }
.pg-more { border-top: 1px solid var(--line); padding-top: 14px; }
.pg-more summary { cursor: pointer; font-weight: 500; }
.pg-domain { display: flex; align-items: center; border: 1px solid var(--control-line); border-radius: var(--radius-sm); overflow: hidden; background: var(--panel); min-width: 0; }
.pg-domain span { padding: 9px 0 9px 11px; color: var(--ink-3); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60%; }
.pg-domain input { border: 0; padding: 9px 11px 9px 1px; min-width: 0; flex: 1; background: transparent; color: var(--ink); font: inherit; font-size: 13px; }
.pg-domain:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px var(--accent-soft); }
.pg-domain input:focus { outline: none; }
.pg-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pg-actions .btn.primary { flex: 1; }
.pg-down { width: 100%; font-size: 12.5px; color: var(--ink-2); }
.pg-back { border: 0; background: none; color: var(--ink-2); cursor: pointer; padding: 0; font-size: 13px; justify-self: start; transition: color .15s; }
.pg-back:hover { color: var(--ink); }
.pg-src { font-size: 12.5px; color: var(--ink-2); background: var(--sunk); border-radius: var(--radius-sm); padding: 10px 12px; line-height: 1.45; display: grid; gap: 6px; }
.pg-src p { margin: 0; }
.pg-src b { color: var(--ink); font-weight: 600; }
.pg-link { font-size: 13px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; justify-self: start; transition: color .15s; }
.pg-link:hover { color: var(--ink); }
.pg-readonly { display: grid; gap: 2px; font-size: 13px; }
.pg-readonly small { color: var(--ink-3); font-size: 11.5px; }
.pg-person { display: grid; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.pg-picks { display: grid; }
.pg-pick { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.pg-pick:last-child { border-bottom: 0; }
.pg-pick input { margin-top: 3px; accent-color: var(--ink); flex: none; width: 16px; height: 16px; cursor: pointer; }
.pg-pick.off { cursor: default; opacity: .55; }
.pg-pick-txt { flex: 1; min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
.pg-pick-txt small { display: block; color: var(--ink-3); font-size: 11.5px; }
.pg-pick-price { font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: 12.5px; white-space: nowrap; }
.pg-hours { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 6px 10px; font-size: 13px; font-variant-numeric: tabular-nums; }
.pg-hours span:nth-child(even) { color: var(--ink-2); }
.pg-faq { display: grid; gap: 6px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.pg-faq .linkish { color: var(--ink-2); }
.pg-stage { display: grid; gap: 12px; min-width: 0; }
.pg-stagebar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.pg-seg { display: inline-flex; background: var(--sunk); border-radius: 12px; padding: 3px; }
.pg-seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 9px; cursor: pointer; font-size: 13px; color: var(--ink-2); transition: background .15s, color .15s; }
.pg-seg button[aria-pressed="true"] { background: var(--panel); color: var(--ink); font-weight: 500; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.pg-url { font-size: 12.5px; color: var(--ink-2); min-width: 0; max-width: 100%; }
.pg-url a, .pg-url span { display: inline-block; max-width: 100%; background: var(--panel); padding: 4px 9px; border-radius: 8px; border: 1px solid var(--line); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; color: inherit; text-decoration: none; }
.pg-url a:hover { color: var(--ink); border-color: var(--ink-3); }
.pg-canvas { background: var(--sunk); border-radius: var(--radius); padding: 24px 16px; display: flex; justify-content: center; overflow: hidden; }
.pg-frame { width: 100%; max-width: 1100px; height: calc(100vh - 170px); min-height: 560px; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); background: var(--panel); transition: max-width .25s ease; }
.pg-frame.phone { max-width: 390px; border-radius: 32px; border: 8px solid #16151A; }
.pg-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (prefers-reduced-motion: reduce) { .pg-frame { transition: none; } }
@media (max-width: 960px) {
  .pg-app { grid-template-columns: minmax(0, 1fr); }
  .pg-rail { position: static; max-height: none; order: 2; }
  .pg-frame { height: 640px; }
}

/* Your page: services layout picker, photo thumbnails, opening hours */
.pg-layouts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pg-layout { display: grid; gap: 4px; text-align: left; border: 1px solid var(--control-line); background: var(--panel); color: var(--ink); border-radius: var(--radius-sm); padding: 10px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.pg-layout:hover { border-color: var(--ink-3); }
.pg-layout[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.pg-layout b { font-weight: 500; font-size: 13px; }
.pg-layout small { color: var(--ink-3); font-size: 11.5px; }
.pg-layout-art { display: grid; gap: 4px; height: 44px; margin-bottom: 4px; }
.pg-layout-art.list { grid-template-rows: repeat(3, 1fr); }
.pg-layout-art.cards { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); }
.pg-layout-art i { background: var(--sunk); border-radius: 4px; }
.pg-thumb { width: 36px; height: 36px; flex: none; border-radius: 8px; background: var(--sunk) center / cover no-repeat; border: 1px solid var(--line); }
.pg-photo-btn { margin-top: 4px; font-size: 12.5px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.pg-photo-btn:hover { color: var(--ink); }
.pg-week { display: grid; }
.pg-day { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 8px; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--line); }
.pg-day:last-child { border-bottom: 0; }
.pg-day-name { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; min-height: 36px; }
.pg-day-name .switch { margin-top: 0; flex: none; }
.pg-day-name b { font-weight: 500; }
.pg-day > .small { line-height: 36px; }
.pg-periods { display: grid; gap: 6px; justify-items: start; }
.pg-period { display: flex; align-items: center; gap: 6px; width: 100%; }
.pg-period .input { height: 36px; padding: 0 8px; min-width: 0; flex: 1; font-variant-numeric: tabular-nums; }
.pg-periods .linkish { font-size: 12.5px; color: var(--ink-2); }

/* Your page: pasted reviews */
.pg-two { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 8px; }
.pg-confirm { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; padding: 10px 12px; border: 1px solid var(--control-line); border-radius: var(--radius-sm); cursor: pointer; }
.pg-confirm input { margin-top: 2px; accent-color: var(--ink); flex: none; width: 16px; height: 16px; }

/* Your page: uploads */
.pg-tile.upload { display: grid; place-items: center; background: var(--sunk); color: var(--ink-2); font-size: 12px; font-weight: 500; border-style: dashed; }
.pg-tile.upload:disabled { cursor: progress; opacity: .7; }
.pg-logo-row { display: flex; gap: 12px; align-items: center; }
.pg-logo { width: 64px; height: 64px; flex: none; border-radius: 12px; border: 1px solid var(--line); background: var(--sunk) center / contain no-repeat; display: grid; place-items: center; font: 600 18px var(--display); color: var(--ink-2); }
.pg-logo.round { border-radius: 50%; background-size: cover; }

/* Your page: own domain */
.pg-domain .suffix { padding: 9px 11px 9px 0; max-width: none; }
.pg-own-domain { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pg-steps { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13px; color: var(--ink-2); }
.pg-records { display: grid; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.pg-rec { display: grid; grid-template-columns: 56px 64px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px 10px; border-top: 1px solid var(--line); font-size: 12.5px; }
.pg-rec.head { border-top: 0; background: var(--sunk); color: var(--ink-3); font-size: 11.5px; }
.pg-rec code { font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.pg-rec .val { color: var(--ink); }

/* ── Newsletter ── */
.nl { display: grid; gap: 18px; }
.nl .page-head { margin-bottom: 0; }
.nl-tabs { display: inline-flex; background: var(--sunk); border-radius: 12px; padding: 3px; width: fit-content; max-width: 100%; flex-wrap: wrap; }
.nl-tabs a { padding: 7px 16px; border-radius: 9px; font-size: 13.5px; color: var(--ink-2); text-decoration: none; transition: background .15s, color .15s; }
.nl-tabs a:hover { color: var(--ink); }
.nl-tabs a.on { background: var(--panel); color: var(--ink); font-weight: 500; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.nl-sentence { font: 500 clamp(24px, 3.2vw, 36px)/1.15 var(--display); letter-spacing: -0.02em; color: var(--ink-3); margin: 0; max-width: 34ch; text-wrap: balance; }
.nl-sentence b { color: var(--ink); font-weight: 700; }
.nl-phead { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.nl-phead h2 { font: 600 17px/1.3 var(--display); margin: 0 0 2px; }
.nl-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.nl-seg { display: inline-flex; background: var(--sunk); border-radius: 10px; padding: 3px; flex-wrap: wrap; }
.nl-seg button { border: 0; background: transparent; padding: 6px 11px; border-radius: 8px; cursor: pointer; font-size: 12.5px; color: var(--ink-2); transition: background .15s, color .15s; }
.nl-seg button:hover { color: var(--ink); }
.nl-seg button[aria-pressed="true"] { background: var(--panel); color: var(--ink); font-weight: 500; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.nl-source { width: auto; max-width: 220px; }
.nl-search { flex: 1; min-width: 180px; }
.nl-bulk { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; background: var(--sunk); border-radius: var(--radius-sm); padding: 8px 8px 8px 14px; margin-bottom: 12px; font-size: 13px; }
.nl-table { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.nl-table th { text-align: left; font-weight: 400; color: var(--ink-3); font-size: 12.5px; padding: 0 12px 10px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.nl-table td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.nl-table tr:last-child td { border-bottom: 0; }
.nl-table .num { text-align: right; }
.nl-check { width: 28px; }
.nl-check input { width: 16px; height: 16px; accent-color: var(--ink); cursor: pointer; }
.nl-name { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; overflow-wrap: anywhere; }
.nl-sub { display: block; color: var(--ink-3); font-size: 12px; overflow-wrap: anywhere; }
.nl-chip { display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 500; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.nl-chip.good { background: var(--good-soft); color: var(--good); }
.nl-chip.warn { background: var(--warn-soft); color: var(--warn); }
.nl-chip.bad { background: var(--bad-soft); color: var(--bad); }
.nl-chip.muted { background: var(--sunk); color: var(--ink-2); }
.nl-chip.accent { background: var(--accent-soft); color: var(--accent-text); }
.nl-agree { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; cursor: pointer; }
.nl-agree input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--ink); flex: none; }
.new-tag { font-style: normal; font-size: 10.5px; font-weight: 600; padding: 1px 6px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); margin-left: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 640px) { .nl-table th:nth-child(4), .nl-table td:nth-child(4), .nl-table th:nth-child(6), .nl-table td:nth-child(6) { display: none; } }

/* Newsletter: import */
.nl-import { display: grid; gap: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; margin-bottom: 16px; }
.nl-import h2 { font: 600 15px/1.3 var(--display); margin: 0; }
.nl-steps { display: flex; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); }
.nl-steps span.on { color: var(--ink); font-weight: 500; }
.nl-drop { border: 1.5px dashed var(--control-line); border-radius: var(--radius-sm); padding: 26px; text-align: center; color: var(--ink-2); display: grid; gap: 10px; justify-items: center; }
.nl-map { display: grid; grid-template-columns: minmax(0, 180px) auto minmax(0, 200px) minmax(0, 1fr); gap: 8px 10px; align-items: center; }
.nl-map code { font: 12.5px ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.nl-map .faint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nl-result { display: grid; gap: 4px; font-size: 14px; }
.nl-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; background: var(--warn-soft); color: var(--ink); border-radius: var(--radius-sm); padding: 12px; cursor: pointer; }
.nl-consent input { margin-top: 2px; flex: none; width: 16px; height: 16px; accent-color: var(--ink); }
@media (max-width: 640px) { .nl-map { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); } .nl-map .faint { display: none; } }

/* Newsletter: emails, editor, templates, reports, Autopilot */
.nl-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.nl-table tr.click { cursor: pointer; transition: background .15s; }
.nl-table tr.click:hover td { background: var(--line-2); }
.nl-bar { display: block; height: 4px; width: 64px; margin: 5px 0 0 auto; background: var(--sunk); border-radius: 4px; overflow: hidden; }
.nl-bar i { display: block; height: 100%; background: var(--accent); }
.dns-wrap { overflow-x: auto; }
table.dns { width: 100%; border-collapse: collapse; font-size: 13px; }
table.dns th { text-align: left; font-weight: 400; color: var(--ink-3); font-size: 12px; padding: 0 10px 8px 0; border-bottom: 1px solid var(--line); }
table.dns td { padding: 9px 10px 9px 0; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.dns tr:last-child td { border-bottom: 0; }
table.dns code { font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; word-break: break-all; }
table.dns td:last-child { width: 1%; white-space: nowrap; }
.nl-upgrade { display: grid; gap: 12px; justify-items: start; max-width: 640px; }
.nl-upgrade h2 { font: 600 22px/1.2 var(--display); margin: 0; }
.nl-upgrade p { margin: 0; }
.nl-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 13.5px; text-align: left; }
.nl-list li { display: flex; gap: 8px; align-items: baseline; }
.nl-list li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; transform: translateY(-2px); }
.nl-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.nl-tcard { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: grid; background: var(--panel); }
.nl-thumb { height: 180px; background: var(--sunk); overflow: hidden; position: relative; }
.nl-thumb pre { margin: 0; padding: 18px; font: 12px ui-monospace, Menlo, monospace; color: var(--ink-2); }
.nl-mini { position: absolute; top: 0; left: 0; width: 620px; height: 430px; border: 0; transform: scale(.42); transform-origin: top left; pointer-events: none; background: var(--panel); }
.nl-tmeta { padding: 14px; display: grid; gap: 6px; border-top: 1px solid var(--line); }
.nl-tmeta b { font-weight: 600; }
.nl-tmeta p { margin: 0; font-size: 12.5px; color: var(--ink-2); }
.nl-editor { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 18px; align-items: start; }
.nl-form { display: grid; gap: 18px; min-width: 0; }
.nl-group { display: grid; gap: 10px; }
.nl-group h3 { font: 600 14px/1.3 var(--display); margin: 0; display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.nl-group h3 small { font: 400 12px var(--font); color: var(--ink-3); }
.nl-tpls { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.nl-tpl { border: 1px solid var(--control-line); background: var(--panel); color: var(--ink); border-radius: var(--radius-sm); padding: 8px 6px; cursor: pointer; font-size: 12.5px; transition: border-color .15s; }
.nl-tpl:hover { border-color: var(--ink-3); }
.nl-tpl[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); font-weight: 500; }
.nl-block { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; display: grid; gap: 8px; }
.nl-block > b { font-size: 12.5px; font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.nl-block > b span { font-weight: 400; color: var(--ink-3); }
.nl-svc { display: flex; gap: 8px; align-items: center; font-size: 13px; cursor: pointer; min-width: 0; }
.nl-svc input { width: 16px; height: 16px; accent-color: var(--ink); flex: none; }
.nl-svc span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.nl-svc small { color: var(--ink-3); white-space: nowrap; }
.nl-svcrow { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 8px; align-items: center; }
.nl-svcrow > :only-child { grid-column: 1 / -1; }
.nl-code { min-height: 320px; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre; }
.nl-locked { font-size: 12px; color: var(--ink-2); background: var(--sunk); border-radius: var(--radius-sm); padding: 10px 12px; }
.nl-checks { display: grid; gap: 6px; font-size: 13px; }
.nl-check { display: flex; gap: 8px; align-items: flex-start; }
.nl-check .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: none; }
.nl-check .dot.ok { background: var(--good); }
.nl-check .dot.warn { background: var(--warn); }
.nl-confirm { display: grid; gap: 10px; background: var(--sunk); border-radius: var(--radius-sm); padding: 14px; }
.nl-stage { display: grid; gap: 10px; min-width: 0; position: sticky; top: 16px; }
.nl-inbox { font-size: 12.5px; color: var(--ink-2); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; display: grid; gap: 2px; min-width: 0; }
.nl-inbox b { color: var(--ink); font-weight: 600; }
.nl-inbox span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nl-mailbox { width: 100%; max-width: 660px; transition: max-width .25s; }
.nl-mailbox.phone { max-width: 375px; }
.nl-preview { width: 100%; height: 720px; border: 0; border-radius: 10px; background: var(--panel); display: block; box-shadow: var(--shadow); }
.nl-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.nl-tile { display: grid; gap: 2px; }
.nl-tile b { font: 600 26px/1.15 var(--display); }
.nl-soon { position: relative; min-height: 560px; }
.nl-soon-blur { filter: blur(7px); opacity: .6; pointer-events: none; user-select: none; display: grid; gap: 18px; }
.nl-apgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.nl-trow { padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.nl-soon-card { position: absolute; top: 70px; left: 50%; transform: translateX(-50%); width: min(460px, calc(100% - 16px)); background: var(--panel); border-radius: var(--radius); padding: 28px 26px; box-shadow: var(--shadow); text-align: center; display: grid; gap: 12px; justify-items: center; z-index: 2; }
.nl-soon-card h2 { font: 600 26px/1.15 var(--display); margin: 0; }
.nl-soon-card p { margin: 0; color: var(--ink-2); max-width: 40ch; }
@media (max-width: 1080px) { .nl-editor { grid-template-columns: minmax(0, 1fr); } .nl-stage { position: static; } }
@media (prefers-reduced-motion: reduce) { .nl-mailbox { transition: none; } }

.pg-optional { background: var(--sunk); color: var(--ink-2); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 13.5px; line-height: 1.5; margin-bottom: 18px; max-width: 900px; }
.pg-optional b { color: var(--ink); font-weight: 600; }
.pg-optional a { color: var(--ink); text-underline-offset: 3px; }

/* Website: a top bar, then settings and a full-height preview */
.pg-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.pg-bar-title { display: flex; align-items: center; gap: 10px; }
.pg-bar-title h1 { margin: 0; font: 600 26px/1.15 var(--display); }
.pg-bar-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pg-optional { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 9px 10px 9px 14px; margin-bottom: 12px; max-width: none; font-size: 13px; }
.pg-x { border: 0; background: none; color: var(--ink-3); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px; border-radius: 6px; transition: color .15s, background .15s; }
.pg-x:hover { color: var(--ink); background: var(--panel); }
.pg .pg-app { grid-template-columns: 360px minmax(0, 1fr); height: calc(100vh - 128px); min-height: 560px; align-items: stretch; gap: 16px; }
.pg .pg-rail { position: static; height: 100%; max-height: none; overflow-y: auto; }
.pg .pg-stage { height: 100%; display: flex; flex-direction: column; gap: 0; }
.pg-browser { flex: 1; min-height: 0; display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); }
.pg-chrome { flex: none; height: 38px; display: flex; align-items: center; gap: 12px; padding: 0 12px; background: var(--sunk); border-bottom: 1px solid var(--line); }
.pg-dots { display: flex; gap: 6px; flex: none; }
.pg-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--control-line); }
.pg-addr { flex: 1; max-width: 520px; margin: 0 auto; background: var(--panel); border-radius: 8px; padding: 4px 10px; font-size: 12px; color: var(--ink-2); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-viewport { flex: 1; min-height: 0; position: relative; overflow: hidden; background: var(--panel); }
.pg-viewport iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: top left; display: block; }
.pg-phone-wrap { flex: 1; min-height: 0; background: var(--sunk); border-radius: 12px; display: flex; justify-content: center; padding: 18px 16px; overflow: hidden; }
.pg-phone-wrap .pg-frame.phone { height: 100%; max-height: 860px; min-height: 0; }
@media (max-width: 960px) {
  .pg .pg-app { height: auto; }
  .pg .pg-rail { height: auto; overflow: visible; }
  .pg .pg-stage { height: 640px; }
}

/* Website editor: fits the window, a toolbar on top, a tidy scrolling settings column */
body.fit-view .main { padding-bottom: 20px; }
body.fit-view .pg { display: flex; flex-direction: column; height: calc(100vh - 48px); min-height: 620px; }
body.fit-view .pg .pg-app { flex: 1; min-height: 0; height: auto; grid-template-columns: 390px minmax(0, 1fr); }
.pg-bar { background: var(--panel); border-radius: var(--radius); padding: 10px 12px 10px 18px; flex: none; }
.pg-bar-title h1 { font-size: 20px; }
.pg-optional { flex: none; }
.pg .pg-rail { padding: 20px 12px 20px 20px; scrollbar-width: thin; scrollbar-color: var(--control-line) transparent; scrollbar-gutter: stable; }
.pg .pg-rail::-webkit-scrollbar { width: 10px; }
.pg .pg-rail::-webkit-scrollbar-track { background: transparent; margin: 14px 0; }
.pg .pg-rail::-webkit-scrollbar-thumb { background: var(--control-line); border-radius: 10px; border: 3px solid var(--panel); }
.pg .pg-rail::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }
@media (max-width: 960px) {
  body.fit-view .main { padding-bottom: 100px; }
  body.fit-view .pg { height: auto; min-height: 0; }
  body.fit-view .pg .pg-app { grid-template-columns: minmax(0, 1fr); }
}

.auth .invite { background: var(--good-soft); color: var(--good); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13.5px; }
.auth .invite b { font-weight: 600; }

/* Sidebar: Refer & save, and the account menu (like Covey's) */
.refer-btn { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; margin: 10px 0 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel); color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s; }
.refer-btn:hover { border-color: var(--ink-3); }
.refer-btn b { display: block; font-size: 13px; font-weight: 600; }
.refer-btn small { display: block; font-size: 11.5px; color: var(--ink-3); }
.refer-ic { width: 28px; height: 28px; border-radius: 8px; background: var(--accent-soft); flex: none; position: relative; }
.refer-ic::after { content: ""; position: absolute; inset: 7px; background: var(--accent-text); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.6'%3E%3Crect x='2.2' y='6' width='11.6' height='7.8' rx='1.2'/%3E%3Cpath d='M1.8 6h12.4M8 6v7.8M8 6C6.6 3.2 4.2 3.4 4.4 4.8 4.6 6 8 6 8 6zm0 0c1.4-2.8 3.8-2.6 3.6-1.2C11.4 6 8 6 8 6z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.6'%3E%3Crect x='2.2' y='6' width='11.6' height='7.8' rx='1.2'/%3E%3Cpath d='M1.8 6h12.4M8 6v7.8M8 6C6.6 3.2 4.2 3.4 4.4 4.8 4.6 6 8 6 8 6zm0 0c1.4-2.8 3.8-2.6 3.6-1.2C11.4 6 8 6 8 6z'/%3E%3C/svg%3E") center / contain no-repeat; }
.acct { position: relative; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
.acct-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--ink); cursor: pointer; font: inherit; text-align: left; transition: background .15s; }
.acct-btn:hover, .acct-btn[aria-expanded="true"] { background: var(--sunk); }
.acct-av { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font: 600 12.5px/1 var(--font); flex: none; }
.acct-name { flex: 1; min-width: 0; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-chev { width: 14px; height: 14px; color: var(--ink-3); flex: none; display: grid; transition: transform .15s; }
.acct-chev.down { transform: rotate(180deg); }
.acct-menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 2px 4px rgba(0, 0, 0, .06), 0 18px 40px rgba(0, 0, 0, .16); padding: 6px; z-index: 40; display: grid; }
.acct-head { display: grid; gap: 4px; justify-items: start; padding: 10px 10px 8px; }
.acct-head b { font-size: 14px; font-weight: 600; }
.acct-email { font-size: 12.5px; color: var(--ink-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-role { display: inline-block; font-size: 11.5px; font-weight: 600; background: var(--sunk); color: var(--ink-2); border-radius: 6px; padding: 2px 8px; }
.acct-sep { height: 1px; background: var(--line); margin: 4px 2px; }
.acct-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: none; color: var(--ink); cursor: pointer; font: inherit; font-size: 13.5px; text-align: left; transition: background .15s; }
.acct-item:hover, .acct-item:focus-visible { background: var(--sunk); outline: none; }
.acct-ic { width: 16px; height: 16px; display: grid; color: var(--ink-2); flex: none; }
.acct-ic svg, .acct-chev svg { width: 100%; height: 100%; }
.refer { justify-items: start; }
.refer-badge { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; }
.refer-badge svg { width: 22px; height: 22px; }
.refer-link { display: flex; gap: 8px; width: 100%; }
.refer-link .input { flex: 1; min-width: 0; font-size: 13px; }
.refer-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.refer-stats > div { background: var(--sunk); border-radius: var(--radius-sm); padding: 12px; display: grid; gap: 2px; }
.refer-stats b { font: 600 24px/1.1 var(--display); }
.refer-stats span { font-size: 12.5px; color: var(--ink-2); }
@media (max-width: 860px) {
  .refer-btn { width: auto; flex: 0 0 auto; margin: 0; padding: 6px 10px; }
  .refer-btn small { display: none; }
  .acct { border-top: 0; padding-top: 0; margin: 0; flex: 0 0 auto; position: static; }
  .acct-name, .acct-chev { display: none; }
  .acct-btn { padding: 6px; }
  .acct-menu { position: fixed; left: auto; right: 12px; top: 62px; bottom: auto; width: min(300px, calc(100vw - 24px)); }
}

/* ─────────────  Billing (#billing)  ───────────── */
.billing { max-width: 760px; }
.billing-sentence { font-family: var(--display); font-weight: 600; font-size: 26px; line-height: 1.2; letter-spacing: -0.015em; margin: 0; color: var(--ink); }
.billing-sentence .g { color: var(--ink-3); }
.billing-banner { justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plan-pick { padding: 16px 18px; }
.plan-price { color: var(--ink-2); font-size: 14px; }
.plan-price .big { font-family: var(--display); font-weight: 600; font-size: 28px; color: var(--ink); letter-spacing: -0.02em; }
.plan-price s { margin-left: 6px; }
.plan-points { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
@media (max-width: 640px) { .plan-grid { grid-template-columns: 1fr; } .billing-sentence { font-size: 22px; } }

/* Desktop: the menu stays put while the page scrolls, so the account bar is always at the bottom. */
@media (min-width: 861px) {
  .nav { position: sticky; top: 0; align-self: start; height: 100vh; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
}
