/* home.css — the first-run guide (/onboarding) and the cabinet home
   (/cabinet without ?tab=).

   Same system as the landing and the sign-in pages: sheets of white paper
   on the grey pasteboard, Sofia Sans for text, Sofia Sans Condensed for
   headings, black ink, the logo's indigo for the one action that matters
   on a sheet, hairline rules instead of boxes inside a sheet, tabular
   figures for numbers. Honours the theme (theme-bootstrap.js sets
   data-theme on <html>). Self-contained: no variables shared with
   auth.css, landing.css or app.css. */

@import url('https://fonts.googleapis.com/css2?family=Sofia+Sans:wght@400;500;600;700&family=Sofia+Sans+Condensed:wght@700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --hm-font: 'Sofia Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --hm-display: 'Sofia Sans Condensed', 'Sofia Sans', 'Arial Narrow', sans-serif;
  --hm-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --hm-board: #e9ebee;
  --hm-paper: #ffffff;
  --hm-ink: #000000;
  --hm-text: #30343b;
  --hm-text-soft: #4a4f57;
  --hm-mute: #646a73;
  --hm-rule: #d5d9de;
  --hm-rule-strong: #b4bac2;
  --hm-well: #f4f5f7;
  --hm-accent: #4f46e5;
  --hm-accent-hover: #3f37c9;
  --hm-accent-soft: rgba(79, 70, 229, .10);
  --hm-on-accent: #ffffff;
  --hm-ok: #1f7a45;
  --hm-ok-soft: rgba(31, 122, 69, .10);
  --hm-warn: #b45309;
  --hm-danger: #b42318;
  --hm-shadow: 0 1px 2px rgba(0, 0, 0, .10), 0 18px 40px -18px rgba(0, 0, 0, .28);
  --hm-ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

[data-theme="dark"] {
  --hm-board: #16171a;
  --hm-paper: #212328;
  --hm-ink: #f5f6f8;
  --hm-text: #c9ccd2;
  --hm-text-soft: #b2b6bd;
  --hm-mute: #8b9099;
  --hm-rule: #33363c;
  --hm-rule-strong: #4a4e56;
  --hm-well: #1a1b1f;
  --hm-accent: #9a9cff;
  --hm-accent-hover: #b6b8ff;
  --hm-accent-soft: rgba(154, 156, 255, .14);
  --hm-on-accent: #0d0e12;
  --hm-ok: #6ad19a;
  --hm-ok-soft: rgba(106, 209, 154, .12);
  --hm-warn: #f0c879;
  --hm-danger: #fca5a5;
  --hm-shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 18px 40px -18px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body.hm-page {
  margin: 0;
  min-height: 100vh;
  background: var(--hm-board);
  color: var(--hm-text);
  font: 400 16px/1.55 var(--hm-font);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

a { color: var(--hm-accent); }
a:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--hm-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Top bar ─────────────────────────────────────────────────────── */
.hm-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 16px 8px;
}
.hm-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--hm-ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -.01em;
}
.hm-mark img { width: 28px; height: 28px; display: block; }
.hm-bar__nav { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 18px; font-size: 15px; }
.hm-bar__nav a { color: var(--hm-text-soft); text-decoration: none; }
.hm-bar__nav a:hover { color: var(--hm-ink); text-decoration: underline; }
.hm-bar__nav .hm-bar__who { color: var(--hm-mute); }

/* ── Buttons ─────────────────────────────────────────────────────── */
.hm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 6px;
  font: 600 16px/1 var(--hm-font);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.hm-btn--primary { background: var(--hm-accent); color: var(--hm-on-accent); }
.hm-btn--primary:hover { background: var(--hm-accent-hover); }
.hm-btn--ghost { background: transparent; color: var(--hm-ink); border-color: var(--hm-rule-strong); }
.hm-btn--ghost:hover { border-color: var(--hm-ink); }
.hm-btn--sm { min-height: 34px; padding: 0 12px; font-size: 14px; }
.hm-btn:disabled { opacity: .55; cursor: not-allowed; }
.hm-link {
  border: 0;
  padding: 0;
  background: none;
  color: var(--hm-accent);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.hm-link--quiet { color: var(--hm-mute); }
.hm-link--quiet:hover { color: var(--hm-ink); }

/* ── Sheet: a page of paper ─────────────────────────────────────── */
.hm-sheet {
  background: var(--hm-paper);
  box-shadow: var(--hm-shadow);
  padding: clamp(22px, 4vw, 40px);
}
.hm-eyebrow {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--hm-mute);
}
.hm-title {
  margin: 0 0 10px;
  font: 800 clamp(32px, 5vw, 46px)/1.02 var(--hm-display);
  color: var(--hm-ink);
  text-wrap: balance;
}
/* Step titles take focus (for screen readers) when a step changes; that
   focus is not a keyboard target, so it shows no ring. */
.hm-title[tabindex="-1"]:focus { outline: none; }
.hm-lede { margin: 0 0 26px; max-width: 60ch; font-size: 17px; color: var(--hm-text-soft); }
.hm-h2 {
  margin: 0 0 12px;
  font: 700 24px/1.1 var(--hm-display);
  color: var(--hm-ink);
}
.hm-muted { color: var(--hm-mute); }
.hm-small { font-size: 14px; }

/* ══════════════════════════════════════════════════════════════════
   ONBOARDING
   ════════════════════════════════════════════════════════════════ */
.ob-stage {
  max-width: 820px;
  margin: 0 auto;
  padding: 12px 16px 64px;
}

/* Progress: three numbered steps on one hairline. */
.ob-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 18px 0 22px;
  padding: 0;
  list-style: none;
  counter-reset: ob;
}
.ob-steps li {
  position: relative;
  padding-top: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--hm-mute);
  counter-increment: ob;
}
.ob-steps li::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  background: var(--hm-rule-strong);
}
.ob-steps li span::before { content: counter(ob) "  "; font-variant-numeric: tabular-nums; }
.ob-steps li.is-done { color: var(--hm-text-soft); }
.ob-steps li.is-done::before { background: var(--hm-ink); }
.ob-steps li.is-current { color: var(--hm-ink); }
.ob-steps li.is-current::before { background: var(--hm-accent); height: 3px; top: -.5px; }

/* Choices: ruled rows, the whole row is the button. */
.ob-choices { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--hm-rule); }
.ob-choice {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 20px 4px;
  border: 0;
  border-bottom: 1px solid var(--hm-rule);
  background: none;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: background-color .15s;
}
.ob-choice:hover { background: var(--hm-well); }
.ob-choice__icon { width: 28px; height: 28px; color: var(--hm-ink); }
.ob-choice__icon svg { width: 28px; height: 28px; display: block; }
.ob-choice__title { display: block; font-weight: 700; font-size: 18px; color: var(--hm-ink); }
.ob-choice__body { display: block; margin-top: 3px; color: var(--hm-text-soft); font-size: 15px; }
.ob-choice__go { color: var(--hm-mute); font-size: 22px; line-height: 1; }
.ob-choice:hover .ob-choice__go { color: var(--hm-accent); }

/* Numbered instructions. */
.ob-howto { margin: 0 0 24px; padding: 0; list-style: none; counter-reset: how; }
.ob-howto > li {
  position: relative;
  padding: 0 0 18px 40px;
  counter-increment: how;
}
.ob-howto > li::before {
  content: counter(how);
  position: absolute;
  left: 0; top: -1px;
  width: 26px; height: 26px;
  border: 1px solid var(--hm-ink);
  border-radius: 50%;
  font: 700 14px/24px var(--hm-font);
  text-align: center;
  color: var(--hm-ink);
}
.ob-howto b { color: var(--hm-ink); }

/* Credentials: label, monospace value, copy. */
.ob-creds { margin: 4px 0 8px; border-top: 1px solid var(--hm-rule); }
.ob-cred {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--hm-rule);
}
.ob-cred__label { font-size: 14px; font-weight: 600; color: var(--hm-text-soft); }
.ob-cred__value {
  min-width: 0;
  overflow-wrap: anywhere;
  font: 500 14px/1.45 var(--hm-mono);
  color: var(--hm-ink);
}
.ob-once {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-left: 3px solid var(--hm-warn);
  background: var(--hm-well);
  font-size: 14px;
  color: var(--hm-text);
}
.ob-note {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-left: 3px solid var(--hm-rule-strong);
  background: var(--hm-well);
  font-size: 15px;
}
.ob-error { border-left-color: var(--hm-danger); }

/* Connection status line. */
.ob-status {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--hm-rule);
  font-size: 15px;
}
.ob-status__dot {
  flex: none;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--hm-rule-strong);
}
.ob-status.is-waiting .ob-status__dot { animation: ob-breathe 1.8s var(--hm-ease) infinite; background: var(--hm-mute); }
.ob-status.is-ok { border-color: var(--hm-ok); background: var(--hm-ok-soft); }
.ob-status.is-ok .ob-status__dot { background: var(--hm-ok); }
.ob-status b { color: var(--hm-ink); }
@keyframes ob-breathe { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ob-status.is-waiting .ob-status__dot { animation: none; } }

/* Code snippets. */
.ob-code { position: relative; margin: 8px 0 18px; }
.ob-code pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  background: var(--hm-well);
  border: 1px solid var(--hm-rule);
  font: 400 13px/1.55 var(--hm-mono);
  color: var(--hm-ink);
  white-space: pre;
}
.ob-code .hm-btn { position: absolute; top: 8px; right: 8px; background: var(--hm-paper); }
.ob-code__label { margin: 18px 0 0; font-weight: 600; color: var(--hm-ink); }

/* Design pick: three document sheets. */
.ob-docs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 0 0 8px;
}
.ob-doc {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}
.ob-doc__sheet {
  position: relative;
  aspect-ratio: 210 / 297;
  background: var(--hm-paper);
  border: 1px solid var(--hm-rule);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
  padding: 12% 11%;
  transition: transform .2s var(--hm-ease), box-shadow .2s var(--hm-ease), border-color .2s;
}
.ob-doc:hover .ob-doc__sheet, .ob-doc:focus-visible .ob-doc__sheet {
  transform: translateY(-3px);
  border-color: var(--hm-ink);
  box-shadow: var(--hm-shadow);
}
/* A schematic page: title bar, two address blocks, table rows, total. */
.ob-doc__sheet i { display: block; background: var(--hm-rule); border-radius: 1px; }
.ob-doc__sheet .t { width: 46%; height: 9%; background: var(--hm-ink); margin-bottom: 9%; }
.ob-doc__sheet .a { display: flex; justify-content: space-between; margin-bottom: 10%; }
.ob-doc__sheet .a i { width: 38%; height: 14px; }
.ob-doc__sheet .r { height: 5px; margin-bottom: 7px; }
.ob-doc__sheet .h { height: 9px; margin-bottom: 9px; background: var(--hm-text-soft); }
.ob-doc__sheet .s { width: 42%; height: 12px; margin: 12% 0 0 auto; background: var(--hm-accent); }
.ob-doc__name { font-weight: 700; font-size: 17px; color: var(--hm-ink); }
.ob-doc__model { font: 400 13px/1.3 var(--hm-mono); color: var(--hm-mute); }

.ob-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--hm-rule);
}
.ob-actions__end { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.ob-aside { margin-top: 18px; text-align: center; font-size: 15px; color: var(--hm-mute); }

/* ══════════════════════════════════════════════════════════════════
   CABINET HOME
   ════════════════════════════════════════════════════════════════ */
.ch-stage {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 16px 64px;
}
.ch-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px 28px;
  margin: 18px 0 26px;
}
.ch-head .hm-title { margin: 0; }
.ch-head__actions { display: flex; flex-wrap: wrap; gap: 10px; }

.ch-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}
.ch-card { grid-column: span 4; display: flex; flex-direction: column; min-width: 0; }
.ch-card--wide { grid-column: span 8; }
.ch-card--half { grid-column: span 6; }
.ch-card .hm-sheet { flex: 1; display: flex; flex-direction: column; }
.ch-card__foot { margin-top: auto; padding-top: 16px; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }

/* Credits meter: a big figure and a hairline bar. */
.ch-figure { display: flex; align-items: baseline; gap: 8px; margin: 2px 0 12px; }
.ch-figure b { font: 800 48px/1 var(--hm-display); color: var(--hm-ink); }
.ch-figure span { color: var(--hm-text-soft); }
.ch-meter {
  height: 6px;
  margin: 0 0 10px;
  background: var(--hm-well);
  border: 1px solid var(--hm-rule);
  overflow: hidden;
}
.ch-meter > span { display: block; height: 100%; background: var(--hm-ink); width: 0; transition: width .5s var(--hm-ease); }
.ch-meter.is-low > span { background: var(--hm-danger); }
.ch-facts { margin: 0; padding: 0; list-style: none; }
.ch-facts li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--hm-rule);
  font-size: 15px;
}
.ch-facts li:last-child { border-bottom: 0; }
.ch-facts dt, .ch-facts .k { color: var(--hm-text-soft); }
.ch-facts .v { color: var(--hm-ink); font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.ch-facts .k { flex: 0 0 auto; }
.ch-facts li.ch-facts__step { display: block; }
.ch-facts__step .k { display: block; margin-bottom: 2px; font-size: 13px; }
/* In the cabinet frame the cards share the width with the page list. */
.ch-home .ch-head { margin-top: 0; }
/* Beside the page list there is room for two cards a row; the recent
   templates take a whole row. One card a row on a phone. */
.ch-home .ch-card { grid-column: span 6; }
.ch-home .ch-card--wide { grid-column: span 12; }
@media (max-width: 680px) {
  .ch-home .ch-card, .ch-home .ch-card--wide { grid-column: span 12; }
}

/* Status pill: a dot and a word. */
.ch-state { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--hm-ink); }
.ch-state::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--hm-rule-strong); }
.ch-state.is-ok::before { background: var(--hm-ok); }
.ch-state.is-off::before { background: var(--hm-warn); }

/* Recent templates: ruled list. */
.ch-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--hm-rule); }
.ch-list li { border-bottom: 1px solid var(--hm-rule); }
.ch-list a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 12px 2px;
  color: var(--hm-ink);
  text-decoration: none;
}
.ch-list a:hover { background: var(--hm-well); }
.ch-list a span:first-child { font-weight: 600; overflow-wrap: anywhere; }
.ch-list a span:last-child { flex: none; font-size: 14px; color: var(--hm-mute); }
.ch-list a span.ch-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px;
  border: 1px solid var(--hm-rule-strong);
  border-radius: 999px;
  font: 600 11px/1.5 var(--hm-font);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--hm-mute);
  vertical-align: 2px;
}
.ch-empty { margin: 0; padding: 18px 0 0; color: var(--hm-text-soft); }

.ch-plan { font: 800 36px/1 var(--hm-display); color: var(--hm-ink); margin: 2px 0 10px; text-transform: capitalize; }
.ch-plan__list { margin: 0 0 4px; padding: 0 0 0 18px; color: var(--hm-text-soft); font-size: 15px; }
.ch-plan__list li { margin: 3px 0; }

.ch-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--hm-rule-strong);
  font-size: 15px;
}
.ch-links a { color: var(--hm-text-soft); }
.ch-links a:hover { color: var(--hm-ink); }

.ch-loading { padding: 40px 0; color: var(--hm-mute); }

/* ══════════════════════════════════════════════════════════════════
   CONNECT (one-click Odoo pairing) + privacy mode
   ════════════════════════════════════════════════════════════════ */
.cn-form { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }
.cn-form .ob-cred__label { flex-basis: 100%; }
.cn-code {
  width: 12ch;
  padding: 10px 12px;
  border: 1px solid var(--hm-rule-strong);
  border-radius: 6px;
  background: var(--hm-paper);
  color: var(--hm-ink);
  font: 600 22px/1.2 var(--hm-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.cn-code:focus { outline: 2px solid var(--hm-accent); outline-offset: 2px; }
.cn-origin {
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid var(--hm-ink);
  font: 600 clamp(17px, 2.6vw, 22px)/1.3 var(--hm-mono);
  color: var(--hm-ink);
  overflow-wrap: anywhere;
}
.cn-h2 { margin-top: 28px; }
.cn-label { margin: 18px 0 6px; }
.cn-workspace { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.cn-workspace b { color: var(--hm-ink); font-size: 18px; }
.cn-workspace select {
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--hm-rule-strong);
  border-radius: 6px;
  background: var(--hm-paper);
  color: var(--hm-ink);
  font: 500 15px var(--hm-font);
}
.cn-choices { display: grid; gap: 0; border-top: 1px solid var(--hm-rule); margin-bottom: 10px; }
.cn-choice {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--hm-rule);
  cursor: pointer;
}
.cn-choice:hover { background: var(--hm-well); }
.cn-choice input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--hm-accent); }
.cn-choice__title { display: block; font-weight: 700; color: var(--hm-ink); }
.cn-choice__body { display: block; margin-top: 2px; font-size: 15px; color: var(--hm-text-soft); }
.ob-shot {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 7;
  margin: 10px 0 4px;
  border: 1px dashed var(--hm-rule-strong);
  background: var(--hm-well);
  color: var(--hm-mute);
  font-size: 14px;
  text-align: center;
  padding: 12px;
}
.ob-manual { margin-top: 22px; border-top: 1px solid var(--hm-rule); padding-top: 6px; }
.ob-manual > summary {
  cursor: pointer;
  padding: 10px 0;
  font-weight: 600;
  color: var(--hm-text-soft);
}
.ob-manual > summary:hover { color: var(--hm-ink); }
.ch-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; cursor: pointer; }
.ch-toggle input { width: 18px; height: 18px; accent-color: var(--hm-accent); }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .ch-card, .ch-card--wide, .ch-card--half { grid-column: span 6; }
  .ch-card--wide { grid-column: span 12; }
}
@media (max-width: 680px) {
  .ch-card, .ch-card--wide, .ch-card--half { grid-column: span 12; }
  .ob-docs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .ob-doc__name { font-size: 15px; }
  .ob-cred { grid-template-columns: minmax(0, 1fr) auto; }
  .ob-cred__label { grid-column: 1 / -1; }
  .ob-choice { grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 16px 2px; }
  .ob-choice__go { display: none; }
  .ob-steps li { font-size: 12px; }
  .ch-head__actions, .ch-head__actions .hm-btn { width: 100%; }
  .ob-actions { flex-direction: column-reverse; align-items: stretch; }
  .ob-actions__end { flex-direction: column; align-items: stretch; }
  .ob-actions .hm-btn { width: 100%; }
  .hm-bar__nav { gap: 2px 14px; font-size: 14px; }
}
@media (max-width: 420px) {
  .ob-docs { grid-template-columns: minmax(0, 1fr); }
  .ob-doc { flex-direction: row; align-items: center; }
  .ob-doc__sheet { width: 64px; flex: none; padding: 9px 8px; }
  .ob-doc__sheet .a i { height: 5px; }
  .ob-doc__sheet .r { height: 2px; margin-bottom: 3px; }
  .ob-doc__sheet .h { height: 3px; margin-bottom: 4px; }
  .ob-doc__sheet .s { height: 4px; }
}

/* ── Starter pack (onboarding step 3) ─────────────────────────────
   The templates the sign-up created, with their gallery thumbnails, and
   the in-page style picker that rebuilds one in another style. */
.ob-pack {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}
.ob-pack__card { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ob-pack__open { display: flex; flex-direction: column; gap: 10px; color: inherit; text-decoration: none; }
.ob-pack__thumb, .ob-styles__thumb {
  position: relative;
  display: block;
  aspect-ratio: 210 / 297;
  background: var(--hm-paper);
  border: 1px solid var(--hm-rule);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
  overflow: hidden;
  transition: transform .2s var(--hm-ease), box-shadow .2s var(--hm-ease), border-color .2s;
}
.ob-pack__thumb img, .ob-styles__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .2s; }
.ob-pack__thumb.is-ready img, .ob-styles__thumb.is-ready img { opacity: 1; }
.ob-pack__thumb.is-loading::after, .ob-styles__thumb.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, var(--hm-accent-soft) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: ob-shimmer 1.4s linear infinite;
}
@keyframes ob-shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
@media (prefers-reduced-motion: reduce) { .ob-pack__thumb.is-loading::after, .ob-styles__thumb.is-loading::after { animation: none; } }
.ob-pack__open:hover .ob-pack__thumb, .ob-pack__open:focus-visible .ob-pack__thumb {
  transform: translateY(-3px);
  border-color: var(--hm-ink);
  box-shadow: var(--hm-shadow);
}
.ob-pack__name { font-weight: 700; font-size: 17px; color: var(--hm-ink); }
.ob-pack__meta { font: 400 13px/1.3 var(--hm-mono); color: var(--hm-mute); overflow-wrap: anywhere; }
.ob-pack__restyle { align-self: flex-start; }

.ob-restyle { margin: 22px 0 0; padding: 18px 0 0; border-top: 1px solid var(--hm-rule); }
.ob-restyle__label { margin: 14px 0 8px; font-weight: 600; color: var(--hm-ink); }
.ob-restyle__end { margin-top: 12px; text-align: right; }
.ob-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.ob-swatch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  border: 1px solid var(--hm-rule-strong);
  border-radius: 999px;
  background: var(--hm-paper);
  color: var(--hm-ink);
  font: 500 14px/1 var(--hm-font);
  cursor: pointer;
}
.ob-swatch[aria-checked="true"] { border-color: var(--hm-accent); box-shadow: 0 0 0 1px var(--hm-accent); }
.ob-swatch__dot { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .15); }
.ob-styles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ob-styles__btn {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--hm-text);
  font: 500 14px/1.3 var(--hm-font);
  text-align: left;
  cursor: pointer;
}
.ob-styles__btn:hover .ob-styles__thumb, .ob-styles__btn:focus-visible .ob-styles__thumb { border-color: var(--hm-ink); }
.ob-styles__btn[aria-checked="true"] .ob-styles__thumb { border-color: var(--hm-accent); box-shadow: 0 0 0 2px var(--hm-accent); }
.ob-styles__btn[aria-checked="true"] { color: var(--hm-ink); font-weight: 700; }
.ob-styles__current { font-weight: 400; font-size: 12px; color: var(--hm-mute); }
.ob-confirm {
  margin: 16px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--hm-warn);
  background: var(--hm-well);
}
.ob-confirm p { margin: 0 0 12px; color: var(--hm-ink); }
.ob-confirm__actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 960px) {
  .ob-pack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .ob-pack { gap: 12px; }
  .ob-pack__name { font-size: 15px; }
  .ob-styles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
