/* Design system: the live public site tokens + components stylesheets are linked before this file. */
/* MOM brand: Ledger. Teal #0F766E, amber #F59E0B, Inter Tight / Inter / JetBrains Mono. Legacy token names kept, values remapped. */
/* Self-hosted fonts (SIL OFL 1.1, see fonts/ in the repo). */

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

html {
  scroll-behavior: smooth;
  /* Let the viewport expose wide content instead of clipping it. */
  overflow-x: auto;
  scrollbar-width: auto;
  scrollbar-color: var(--teal) var(--line);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  /* Wide content stays reachable through the viewport scrollbar. */
  overflow-x: visible;
  scrollbar-width: auto;
  scrollbar-color: var(--teal) var(--line);
}

h1, h2, h3, .mom {
  font-family: "Inter Tight", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--navy);
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  margin: 0 0 1rem;
}

h2 {
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  margin: 0 0 0.7rem;
}

h3 { font-size: 1.25rem; margin: 0; }

p { margin: 0 0 0.85rem; }

a { color: var(--teal); }
a:hover { color: var(--navy); }

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

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--navy);
  color: #fff;
  padding: 0.45rem 0.75rem;
  z-index: 6;
}
.skip:focus { top: 0.5rem; color: #fff; }

.wrap {
  width: min(100%, var(--measure));
  max-width: 1100px;
  min-width: 0;
  margin-inline: auto;
  padding-inline: max(clamp(1.15rem, 2.4vw, 2.5rem), env(safe-area-inset-left, 0px));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 4;
  background: rgba(255,255,255, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.bar {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 4.5rem;
}

.wordmark {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  margin: 0;
  text-decoration: none;
  color: var(--navy);
}

.mom {
  font-size: 1.55rem;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--navy);
}


.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.15rem;
  margin-left: auto;
  align-items: center;
}

.site-nav a {
  color: var(--navy);
  font-size: 0.98rem;
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover { color: var(--teal); }

.example {
  margin: 0;
  padding-top: 0.85rem;
  color: var(--muted);
  font-size: 0.86rem;
}

main { flex: 1 0 auto; min-width: 0; max-width: 100%; }

.hero {
  background: var(--paper);
  color: var(--navy);
  text-align: center;
  padding: 2.4rem 0 2.2rem;
}

.hero h1 {
  max-width: none;
  margin-inline: auto;
}

.lede {
  max-width: 42rem;
  margin: 0 auto 0.2rem;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1.45;
}

.kicker {
  margin: 0 0 0.45rem;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--teal);
}

.hero .kicker { color: var(--teal); }

.hero-button {
  display: inline-block;
  margin-top: 1.1rem;
  text-decoration: none;
}

.section { padding: 0; }

.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  padding-bottom: 4.5rem;
}

.features .section {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.6rem 1.45rem 1.4rem;
}

.note {
  color: var(--muted);
  max-width: 46rem;
}

.ask,
.login-card,
.stock-form {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 18px 50px rgba(15,61,58, 0.06);
}

.login-card,
.stock-form {
  display: grid;
  gap: 0.35rem;
  text-align: left;
  padding: 1.35rem 1.3rem 1.45rem;
}

.hero .login-card {
  width: min(28rem, 100%);
  margin: 0.8rem auto 0;
  text-align: left;
}
.hero-login { margin-top: 1.4rem; }
.hero-login h2 { margin-bottom: 0.2rem; }
.hero-login .note { margin-top: 0; }

.login-card label,
.stock-form label {
  margin-top: 0.65rem;
  font-weight: 700;
  color: var(--navy);
}

.login-card input,
.stock-form input,
.stock-form textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--mom-line-strong);
  border-radius: 12px;
  padding: 0.8rem 0.85rem;
}

.stock-form textarea { resize: vertical; min-height: 5.5rem; }

.login-card input:focus,
.stock-form input:focus,
.stock-form textarea:focus {
  outline: 2px solid var(--teal-bright);
  border-color: var(--teal-bright);
}

.button:not(.ui-btn) {
  margin-top: 0.95rem;
  justify-self: start;
  background: var(--teal-bright);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.35rem;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
}

.button:not(.ui-btn):hover { background: var(--teal); color: #fff; }

.button:not(.ui-btn).ghost {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--line);
  box-shadow: none;
}

.button:not(.ui-btn).ghost:hover { background: var(--paper); color: var(--navy); }

.error {
  margin: 0 0 0.35rem;
  color: #8c2f2f;
  font-weight: 700;
}

.contract {
  max-width: 46rem;
  margin: 0;
  padding: 1.15rem 1.2rem;
  background: var(--paper-2);
  border-left: 3px solid var(--teal);
  border-radius: 0 14px 14px 0;
  color: var(--navy);
  font-family: "Inter Tight", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.2rem;
  line-height: 1.45;
}

.snapshot {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 2.2rem 0 0.4rem;
}

.snap {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.15rem 1.2rem 1.2rem;
}

.snap dt {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
}

.snap dd { margin: 0.45rem 0 0; }

.figure {
  display: block;
  font-family: "Inter Tight", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.lines {
  display: grid;
  gap: 0.85rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.lines:empty { display: none; }

.line {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.05rem 1.15rem 1.1rem;
}

.left-count {
  margin: 0.35rem 0 0;
  font-weight: 700;
  color: var(--navy);
}

.price-line { margin: 0.2rem 0 0; color: var(--muted); }

.sold-form { margin: 0.8rem 0 0; }

.sold-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--navy);
}

.sold-label input {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--teal);
}

main .section { margin-top: 2.6rem; }

.stock-form { max-width: 36rem; margin-top: 1.2rem; }
.stock-form h2 { margin-bottom: 0.15rem; }

.site-footer {
  background: var(--navy-deep);
  margin-top: 4rem;
  padding: 2.4rem 0 1.5rem;
  color: rgba(255,255,255, 0.86);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 1.4rem 1.15rem;
}
.site-footer h2 {
  margin: 0 0 0.65rem;
  color: #fff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-transform: uppercase;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 0.4rem; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--mom-footer-ink); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-copy {
  margin: 1.35rem 0 0;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(255,255,255, 0.18);
  color: rgba(255,255,255, 0.78);
  font-size: 0.92rem;
}

@media (max-width: 800px) {
  .wrap { width: min(var(--measure), 100%); }
  .hero { padding: 3.2rem 0 2rem; text-align: left; }
  .hero h1, .lede { margin-left: 0; }
  .features, .snapshot { grid-template-columns: 1fr; }
  .bar { align-items: flex-start; flex-wrap: wrap; padding: 0.85rem 0; }
  .site-nav { margin-left: 0; width: 100%; }
  .button:not(.ui-btn), .hero-button { width: 100%; text-align: center; }
  .login-card .button:not(.ui-btn), .stock-form .button:not(.ui-btn) { width: 100%; }
}

.tag {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: var(--soft);
  color: var(--teal);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: middle;
}

.photos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
  margin: 0;
  padding: 0 0 0.4rem;
  list-style: none;
}

.photos figure { margin: 0; }

.photos img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 18px;
  display: block;
  background: var(--line);
}

.photos figcaption {
  margin-top: 0.55rem;
  color: var(--navy);
  font-size: 0.95rem;
}

.photo-note { margin: 0.8rem 0 2rem; }

.receipt-tools { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: flex-end; margin: 0.8rem 0 1rem; }
.receipt-mail { display: grid; gap: 0.35rem; margin: 0; min-width: min(100%, 16rem); }
.receipt-mail .note { margin: 0; }

.receipt {
  max-width: 36rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.3rem 1.25rem 1.2rem;
}

@media (max-width: 800px) {
  .photos, .split { grid-template-columns: 1fr; }
}

@media print {
  body * { visibility: hidden; }
  .receipt, .receipt * { visibility: visible; }
  .receipt {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    border: 0;
    box-shadow: none;
  }
  .no-print { display: none !important; }
}

.menu { position: relative; }
.menu summary {
  color: var(--navy);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.menu summary::-webkit-details-marker { display: none; }
.site-header, .bar, .site-nav { overflow: visible; }
.menu-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 6;
  min-width: 15rem;
  padding: 0.7rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15,61,58, 0.08);
}
.menu-panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -0.45rem;
  height: 0.45rem;
}
.menu[open] .menu-panel,
.menu:hover > .menu-panel,
.menu:focus-within > .menu-panel,
details.menu:hover > .menu-panel,
details.menu:focus-within > .menu-panel {
  display: grid;
  gap: 0.15rem;
}
details.menu:hover::details-content,
details.menu:focus-within::details-content {
  display: block;
  content-visibility: visible;
}
.menu-panel a {
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
}
.menu-panel a:hover { background: var(--paper); color: var(--teal); }

.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}
.plan {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.4rem 1.25rem 1.3rem;
  display: flex;
  flex-direction: column;
}
.plan-lead { border-color: var(--teal); }
.price-unset {
  margin: 0.2rem 0 0.6rem;
  font-family: "Inter Tight", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.7rem;
  color: var(--navy);
}
.plan ul { margin: 0.4rem 0 1rem; padding-left: 1.1rem; color: var(--ink); }
.plan li { margin: 0.25rem 0; }
.plan .button:not(.ui-btn) { margin-top: auto; }

.compare-wrap { overflow-x: auto; }
.compare {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  min-width: 36rem;
}
.compare th, .compare td {
  text-align: left;
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.compare thead th { color: var(--navy); }

.faq { display: grid; gap: 0.6rem; max-width: 46rem; }
.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem 1rem;
}
.faq summary { cursor: pointer; font-weight: 700; color: var(--navy); }
.faq p { margin: 0.6rem 0 0; }

@media (max-width: 800px) {
  .plans { grid-template-columns: 1fr; }
  .menu-panel { position: static; box-shadow: none; min-width: 0; margin-top: 0.35rem; }
}

.sample-path {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0 2rem;
}

.sample-path .section {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.2rem 1.15rem;
}

.sample-path .left-count {
  font-family: "Inter Tight", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 2.4rem;
  color: var(--navy);
  margin: 0.3rem 0;
}

.path-login,
#login .login-card {
  width: min(28rem, 100%);
  margin-top: 0.6rem;
}

.next-step { margin: 0.65rem 0 1.25rem; }
.hero .sale-gap { margin-top: 1rem; }
.shop-book .hero .book-jumps { margin-bottom: 0.35rem; }
.shop-book .hero .sale-gap,
.shop-book .hero .shelf-hero-row.sale-gap {
  margin-top: 0.85rem;
  padding-top: 0;
}

.sales-spans {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  margin: 1rem 0 1.25rem;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
}
.sales-spans a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
  background: #fff;
}
.sales-spans a[aria-current="page"] {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.sales-wrap, .compare-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

/* Keep sideways affordances visible on both desktop and touch browsers. Auto
   only paints a track when the contents actually overflow. */
.book-jumps,
.sales-spans,
.sales-wrap,
.compare-wrap {
  scrollbar-width: auto;
  scrollbar-color: var(--teal) var(--line);
}
html::-webkit-scrollbar,
body::-webkit-scrollbar,
.book-jumps::-webkit-scrollbar,
.sales-spans::-webkit-scrollbar,
.sales-wrap::-webkit-scrollbar,
.compare-wrap::-webkit-scrollbar {
  height: 0.7rem;
}
html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
.book-jumps::-webkit-scrollbar-track,
.sales-spans::-webkit-scrollbar-track,
.sales-wrap::-webkit-scrollbar-track,
.compare-wrap::-webkit-scrollbar-track {
  background: var(--line);
}
html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
.book-jumps::-webkit-scrollbar-thumb,
.sales-spans::-webkit-scrollbar-thumb,
.sales-wrap::-webkit-scrollbar-thumb,
.compare-wrap::-webkit-scrollbar-thumb {
  background: var(--teal);
  border-radius: 999px;
}
.sales-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  min-width: 36rem;
}
.sales-table th, .sales-table td {
  text-align: left;
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.sales-table thead th { color: var(--navy); }
.sales-mail { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.1rem 0 0.4rem; }


@media (max-width: 800px) {
  .sample-path { grid-template-columns: 1fr; }
}

/* Public pages: one photo per file, in the page, not as a repeated background. */
body.public { background-color: var(--paper); }

.public .hero { background: transparent; }

.quote {
  max-width: 40rem;
  margin: 1.4rem auto 0;
  padding: 0.15rem 0 0.15rem 1rem;
  border-left: 3px solid var(--teal);
  color: var(--navy);
  font-family: "Inter Tight", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.35rem;
  line-height: 1.35;
}
.quote p { margin: 0; }

.settings { position: relative; margin-left: 0.4rem; }
.settings-toggle {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.settings-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  z-index: 30;
  /* Item 1 (2026-10-28): same size as the public panel; the shared .set-* card grid needs the room. */
  width: min(38rem, calc(100vw - 2rem));
  max-height: calc(100vh - 6rem);
  overflow: auto;
  text-align: left;
  background: var(--paper-2);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.75rem 0.8rem 0.85rem;
  box-shadow: 0 16px 36px rgba(15,61,58, 0.16);
}
.settings-panel[hidden] { display: none !important; }
.settings-panel .note { margin: 0 0 0.35rem; font-size: 0.92rem; }
.set-label {
  margin: 0.55rem 0 0.25rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--teal);
}
.set-row { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.set-btn {
  margin: 0;
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}
.set-btn[aria-pressed="true"] {
  background: var(--navy);
  color: var(--paper);
  border-color: var(--navy);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 1.25rem 2rem;
  align-items: center;
  margin-top: 2.4rem;
}
.split figure { margin: 0; }
.split img,
.photos img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 18px;
  display: block;
}
.split figcaption, .photos figcaption { margin-top: 0.4rem; color: var(--muted); }
.mark {
  display: inline-block;
  width: 2.1rem;
  height: 2.1rem;
  margin-bottom: 0.55rem;
  border: 2px solid var(--teal);
  border-radius: 8px;
  background:
    linear-gradient(var(--teal), var(--teal)) center / 62% 2px no-repeat,
    linear-gradient(var(--teal), var(--teal)) center / 2px 62% no-repeat,
    var(--soft);
}
.mark-round { border-radius: 50%; }
.mark-note { border-radius: 3px 12px 12px 12px; background: var(--soft); }

.public .site-header { z-index: 6; }

.public .photos img,
.public .features .section,
.public .plan,
.public .play-card,
.public .wordmark .mom,
.public .button:not(.ui-btn) {
  transition: transform 0.2s ease, box-shadow 0.2s ease, letter-spacing 0.2s ease, background 0.2s ease;
}

.public .photos figure:hover img { transform: scale(1.04) rotate(-0.4deg); }
.public .features .section:hover,
.public .plan:hover,
.public .play-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 36px rgba(15,61,58, 0.14);
}
.public .wordmark:hover .mom { letter-spacing: 0.22em; }
.public .button:not(.ui-btn):hover { transform: translateY(-2px); }

.hero-photo {
  width: min(720px, 100%);
  margin: 1.6rem auto 0;
}
.hero-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 18px;
  display: block;
}

.play-dock { margin-bottom: 1rem; }
.play-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.play-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.15rem 1.1rem 1.2rem;
}
.play-row { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.play-row .button:not(.ui-btn) { margin-top: 0.35rem; }
.tally {
  min-height: 1.6rem;
  margin: 0.2rem 0 0;
  font-family: "Inter Tight", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.35rem;
  color: var(--navy);
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}

html[data-theme="warm"] {
  --paper: #fff4e4;
  --paper-2: #fffaf2;
  --ink: #3f2a1d;
  --muted: #7a5b45;
  --line: #f0d7b8;
  --navy: #8a3412;
  --navy-deep: #4a1d0c;
  --teal: #c2410c;
  --teal-bright: #ea580c;
  --soft: #ffedd5;
}
html[data-theme="night"] {
  --paper: #0b1514;
  --paper-2: #132321;
  --ink: #f1f5f9;
  --muted: #cbd5e1;
  --line: #1e3a37;
  --navy: #e6f2f0;
  --navy-deep: #050b0a;
  --teal: #99f6e4;
  --teal-bright: #5eead4;
  --soft: #0f2f2c;
}
html[data-theme="night"] .site-header { background: rgba(11,18,32, 0.94); }
html[data-theme="night"] .menu-panel,
html[data-theme="night"] .plan,
html[data-theme="night"] .faq details,
html[data-theme="night"] .compare,
html[data-theme="night"] .login-card input,
html[data-theme="night"] .stock-form input,
html[data-theme="night"] .stock-form textarea { background: var(--paper-2); color: var(--ink); }
html[data-theme="night"] .site-nav a,
html[data-theme="night"] .menu summary,
html[data-theme="night"] .menu-panel a { color: var(--navy); }

@media (max-width: 800px) {
  .play-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .public .photos img,
  .public .features .section,
  .public .plan,
  .public .play-card,
  .public .button:not(.ui-btn) { transition: none; }
}
html[data-text="small"] { font-size: 15px; }
html[data-text="large"] { font-size: 20px; }
html[data-motion="reduce"] *,
html[data-motion="reduce"] *::before,
html[data-motion="reduce"] *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
html[data-contrast="high"] {
  --paper: #ffffff;
  --paper-2: #ffffff;
  --ink: #000000;
  --muted: #111111;
  --line: #000000;
  --navy: #000000;
  --navy-deep: #000000;
  --teal: #0022aa;
  --teal-bright: #001166;
  --soft: #fff4a8;
}
html[data-contrast="high"] body,
html[data-contrast="high"] .site-header,
html[data-contrast="high"] .settings-panel,
html[data-contrast="high"] .menu-panel,
html[data-contrast="high"] .login-card,
html[data-contrast="high"] .plan,
html[data-contrast="high"] input,
html[data-contrast="high"] textarea {
  background: #fff;
  color: #000;
  border-color: #000;
}
html[data-contrast="high"] a { text-decoration: underline; }
html[data-contrast="high"] .button:not(.ui-btn) {
  background: #000;
  color: #fff;
  border: 2px solid #000;
}
html[data-contrast="high"] .site-footer { background: #000; color: #fff; }
html[data-contrast="high"] .site-footer a { color: #fff; }


.nav-toggle {
  display: none;
  margin-left: auto;
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  min-height: 44px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 800px) {
  html { overflow-x: auto; }
  .nav-toggle { display: inline-flex; align-items: center; }
  .site-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    margin-left: 0;
    gap: 0.15rem;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a,
  .menu summary {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .menu { width: 100%; }
  .menu-panel {
    position: static;
    min-width: 0;
    width: 100%;
    margin-top: 0.2rem;
    box-shadow: none;
  }
  .menu:hover > .menu-panel,
  details.menu:hover > .menu-panel { display: none; }
  details.menu:hover::details-content { display: none; content-visibility: hidden; }
  .menu[open] > .menu-panel,
  .menu[open]:hover > .menu-panel,
  .menu:focus-within > .menu-panel,
  details.menu[open]::details-content,
  details.menu:focus-within::details-content { display: grid; }
  details.menu[open]::details-content,
  details.menu:focus-within::details-content { display: block; content-visibility: visible; }
  .plans { grid-template-columns: 1fr; }
  .photos, .split { grid-template-columns: 1fr; }
  .photos img, .split img, img { max-width: 100%; height: auto; }
  .compare-wrap { max-width: 100%; overflow-x: auto; }
  .price-unset, .lede, h1, h2, p, td, th { overflow-wrap: anywhere; }
  .settings-panel {
    position: fixed;
    top: 4.4rem;
    left: 1rem;
    right: 1rem;
    width: auto;
    max-height: min(70vh, 28rem);
    overflow: auto;
  }
  .set-btn, .settings-toggle, .button:not(.ui-btn), .hero-button, .nav-toggle {
    min-height: 44px;
  }
  .sold-label { min-height: 44px; display: flex; align-items: center; gap: 0.5rem; }
  .next-step { display: flex; flex-direction: column; align-items: stretch; gap: 0.6rem; }
  pre.receipt { white-space: pre-wrap; max-width: 100%; }
}

.book-jumps {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 0.5rem 0.8rem;
  margin: 1rem 0 0;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
}
.book-jumps a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
  background: var(--paper-2);
}
.book-jumps a[aria-current="page"] {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.low-note {
  margin-top: 1rem;
  padding: 0.75rem 0.9rem;
  border-left: 3px solid var(--teal);
  background: var(--soft);
}
.catalogue { margin-top: 2rem; }
.catalogue-search { margin-top: 0.2rem; }
#catalogue-table tr.is-out { display: none; }
#catalogue-table td:empty::after { content: ""; }
.choice-row { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.choice-row .set-btn { min-height: 44px; }
.label-preview {
  margin-top: 1rem;
  max-width: 22rem;
  border: 1px solid var(--line);
  background: #fff;
  color: #111;
  padding: 0.9rem;
}
.label-preview strong { display: block; }
.label-shelf { text-align: left; }
.label-strip { display: flex; justify-content: space-between; gap: 0.8rem; align-items: center; }
.label-square { text-align: center; min-height: 8rem; }
.mark-sample {
  margin-top: 0.55rem;
  height: 2.2rem;
  background: repeating-linear-gradient(90deg, #111 0 2px, transparent 2px 5px, #111 5px 6px, transparent 6px 9px);
}
.mark-sample.is-qr {
  width: 4.2rem;
  height: 4.2rem;
  margin-inline: auto;
  background:
    linear-gradient(#111, #111) 0 0 / 30% 30% no-repeat,
    linear-gradient(#111, #111) 100% 0 / 30% 30% no-repeat,
    linear-gradient(#111, #111) 0 100% / 30% 30% no-repeat,
    repeating-linear-gradient(90deg, #111 0 4px, transparent 4px 8px),
    repeating-linear-gradient(#111 0 4px, transparent 4px 8px);
}
.not-live { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.85rem; }

.sd-logo-link { display: block; width: min(100%, 22rem); margin: 0 0 0.9rem; text-decoration: none; }
.sd-logo { width: min(100%, 22rem); height: auto; display: block; }
.company-card { margin-top: 1.25rem; }
.company-lines { margin: 0.8rem 0 0; }
.company-lines div { display: grid; gap: 0.15rem; margin: 0.7rem 0; }
.company-lines dt { font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.company-lines dd { margin: 0; }
@media (max-width: 800px) {
  .sd-logo-link { display: block; width: min(100%, 22rem); margin: 0 0 0.9rem; text-decoration: none; }
.sd-logo { width: 100%; }
  .company-lines dd { overflow-wrap: anywhere; }
}

.sale-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.6rem; }
.sale-actions form { flex: 1 1 8rem; }
.sale-actions .button:not(.ui-btn) { width: 100%; min-height: 44px; }
@media (max-width: 800px) {
  .sale-actions { flex-direction: column; }
}

.line-manage {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}
.line-manage > .stock-form { flex: 1 1 18rem; }
.remove-form {
  margin: 0.75rem 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.line-manage .remove-form { margin: 0 0 1.45rem; }
.remove-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.remove-actions .button:not(.ui-btn) { margin-top: 0; }
.remove-ask { margin: 0 0 0.35rem; color: #8c2f2f; font-weight: 700; }

.sd-name {
  margin: 0.2rem 0 0.6rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--navy);
}
.book-photo { margin: 0 0 1rem; }
.book-photo img {
  width: 100%;
  max-height: 22rem;
  object-fit: cover;
  border-radius: 16px;
  display: block;
}
.book-photo figcaption {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.sale-desk .stock-form input[type="search"] {
  font-size: 1.15rem;
  min-height: 52px;
}
.sale-list .line {
  padding: 0.9rem 0.2rem 1rem;
  border-bottom: 1px solid var(--line);
}
.sale-list h3 { font-size: 1.2rem; margin-bottom: 0.2rem; }
.sale-actions .button:not(.ui-btn) { min-height: 52px; font-size: 1.05rem; }
@media (min-width: 801px) {
  .book-menu > .menu-panel { left: 50%; transform: translateX(-50%); text-align: left; }
}


@media (min-width: 801px) and (hover: hover) and (pointer: fine) {
  details.menu:hover > .menu-panel,
  details.menu:focus-within > .menu-panel {
    display: grid;
    gap: 0.15rem;
  }
  details.menu:hover::details-content,
  details.menu:focus-within::details-content {
    display: block;
    content-visibility: visible;
  }
}

.price-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 0.9rem;
}
.price-pair > div { display: grid; gap: 0.35rem; align-content: end; }
@media (max-width: 640px) {
  .price-pair { grid-template-columns: 1fr; }
}

.back-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 8;
  min-height: 44px;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--navy);
  font: inherit;
  font-size: 0.95rem;
  box-shadow: 0 10px 28px rgba(15,61,58, 0.14);
  cursor: pointer;
}
.back-top[hidden] { display: none !important; }
@media (max-width: 800px) {
  .back-top { right: 0.75rem; bottom: 0.75rem; }
}


/* Phone, laptop, and desktop share one centered column. Nothing widens the screen. */
h3, li, label, .sd-name, .figure {
  overflow-wrap: anywhere;
}

.book-jumps,
.sales-spans {
  max-width: 100%;
  min-width: 0;
}

.lines,
.line,
.line-manage,
.sale-desk {
  max-width: 100%;
  min-width: 0;
}
.stock-form,
.login-card {
  min-width: 0;
  max-width: min(36rem, 100%);
}

@media (max-width: 800px) {
  .bar {
    align-items: center;
    column-gap: 0.65rem;
    row-gap: 0.45rem;
  }
  .bar .button:not(.ui-btn),
  .bar .nav-toggle,
  .settings-toggle {
    margin-top: 0;
  }
  .bar .button:not(.ui-btn),
  .bar > form {
    width: auto;
    max-width: 100%;
  }
  .book-jumps,
  .sales-spans {
    justify-content: flex-start;
    flex-wrap: nowrap;
    width: 100%;
    overflow-x: auto;
  }
  .book-jumps a,
  .sales-spans a {
    flex: 0 0 auto;
    max-width: none;
  }
  .hero .sale-gap,
  .shop-book .hero .sale-gap,
  .shop-book .hero .shelf-hero-row.sale-gap {
    margin-top: 0.85rem;
    width: 100%;
    max-width: 100%;
  }
  .stock-form,
  .login-card,
  .hero .login-card {
    width: 100%;
    max-width: 100%;
  }
  .stock-form input,
  .stock-form textarea,
  .login-card input,
  .stock-form .button:not(.ui-btn),
  .login-card .button:not(.ui-btn),
  input[type="search"] {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .line-manage {
    flex-direction: column;
    align-items: stretch;
  }
  .line-manage > .stock-form,
  .line-manage .remove-form,
  .sale-actions,
  .sale-actions form,
  .sale-actions .button:not(.ui-btn) {
    width: 100%;
    max-width: 100%;
  }
  .line-manage .remove-form { margin: 0; }
}

@media (min-width: 801px) and (max-width: 1040px) {
  .bar {
    flex-wrap: wrap;
    align-items: center;
    row-gap: 0.35rem;
  }
  .site-nav {
    min-width: 0;
    max-width: 100%;
    gap: 0.35rem 0.85rem;
  }
}

/* —— Book extras: dashboard, tables, letter, staff, bottom nav, brand —— */
body.shop-book { padding-bottom: 4.5rem; }
.dash-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.9rem;
  margin: 0.35rem 0 1.5rem;
}
a.dash-card, .dash-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid var(--shop-accent-line, var(--line));
  border-radius: 0.75rem;
  padding: 1rem 1.1rem;
  min-width: 0;
}
.dash-label { margin: 0; font-size: 0.85rem; color: var(--muted, #475569); }
.dash-figure { margin: 0.2rem 0; font-size: 1.35rem; font-weight: 700; color: var(--navy); }
.table-wrap, .sales-wrap { overflow-x: auto; scrollbar-width: auto; }
.shelf-table, .owes-table, .staff-table { min-width: 28rem; }
.loc-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 0.6rem;
  margin: 0.6rem 0;
}
.letter-sheet {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 1.1rem;
  margin: 0.8rem 0;
}
.letter-head { border-bottom: 2px solid var(--shop-accent, var(--teal)); padding-bottom: 0.6rem; margin-bottom: 0.8rem; }
.letter-brand { font-weight: 700; color: var(--navy); margin: 0 0 0.25rem; }
.letter-body {
  width: 100%;
  min-height: 10rem;
  border: 0;
  resize: vertical;
  font: inherit;
  background: transparent;
}
.letter-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.shop-logo-img { max-width: min(100%, 14rem); height: auto; display: block; }
.emp-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  background: var(--shop-accent-soft, #ecf8f6);
  border: 1px solid var(--shop-accent-line, var(--line));
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  margin: 0 0 1rem;
}
.emp-bar-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.inline-form { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.owes-pay input[type="text"] { max-width: 9rem; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Phone bottom nav — fixed; desktop keeps top book-jumps */
.bottom-nav {
  display: none;
}
@media (max-width: 800px) {
  .bottom-nav {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 40;
    background: #fff;
    border-top: 1px solid var(--shop-accent-line, var(--line));
    box-shadow: 0 -4px 16px rgba(11,18,32, 0.08);
    padding: 0.35rem 0.25rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
    gap: 0.15rem;
    justify-content: space-around;
    align-items: stretch;
  }
  .bottom-nav > a,
  .bottom-nav .bn-more > summary {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    text-decoration: none;
    color: var(--navy);
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.35rem 0.2rem;
    border-radius: 0.5rem;
    min-width: 0;
    background: transparent;
    border: 0;
    list-style: none;
    cursor: pointer;
  }
  .bottom-nav .bn-more { flex: 1 1 0; position: relative; }
  .bottom-nav .bn-more > summary::-webkit-details-marker { display: none; }
  .bn-ico { font-size: 1.05rem; line-height: 1; }
  .bn-label { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .bn-more-panel {
    position: absolute;
    right: 0; bottom: calc(100% + 0.35rem);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 0.65rem;
    padding: 0.4rem;
    min-width: 11rem;
    box-shadow: 0 8px 24px rgba(11,18,32, 0.14);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
  }
  .bn-more-panel a {
    text-decoration: none;
    color: var(--navy);
    padding: 0.55rem 0.7rem;
    border-radius: 0.4rem;
    font-size: 0.9rem;
  }
  .bn-more-panel a:hover,
  .bn-more-panel a[aria-current="page"] { background: var(--shop-accent-soft, #ecf8f6); }
  /* Top tab row still usable; allow wrap, not sideways slider as main nav */
  .shop-book .book-jumps {
    flex-wrap: wrap;
    overflow-x: visible;
  }
}
@media (min-width: 801px) {
  body.shop-book { padding-bottom: 0; }
  .bottom-nav { display: none !important; }
}
@media print {
  .bottom-nav, .emp-bar, .letter-actions, .no-print { display: none !important; }
  .letter-sheet { border: 0; }
}

/* the pilot book signed-in industrial fallback is applied via --shop-accent from theme.js (motor-parts steel). */

/* Staff status chips + Staff today list */
.staff-chip-list {
  list-style: none;
  margin: 0.55rem 0 0.35rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.staff-chip-list li { margin: 0; }
.staff-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem 0.2rem 0.4rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid transparent;
  line-height: 1.2;
  max-width: 100%;
}
.staff-chip-sym { font-size: 0.7rem; line-height: 1; }
.staff-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 8rem; }
.staff-chip-state { font-weight: 500; opacity: 0.9; }
.staff-chip-active {
  color: #0d652d;
  background: #e6f4ea;
  border-color: #ceead6;
}
.staff-chip-break {
  color: #8a5a00;
  background: #fef7e0;
  border-color: #fce8b2;
}
.staff-chip-inactive {
  color: #5f6368;
  background: #f1f3f4;
  border-color: #dadce0;
}
.staff-chip-signedout {
  color: #b3261e;
  background: #fce8e6;
  border-color: #f5c6c2;
}
.dash-staff .dash-figure { font-size: 1.05rem; }
.staff-today-list {
  list-style: none;
  margin: 0.55rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.staff-today-row {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem 0.75rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: var(--paper-2, #f7f8fa);
  min-width: 0;
}
.staff-today-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  min-width: 0;
  flex: 1 1 auto;
}
.staff-today-name {
  font-weight: 700;
  color: var(--navy);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 9rem;
}
.staff-today-breaks {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
}
.staff-break-form { margin: 0; }
.staff-break-btn {
  margin: 0 !important;
  min-height: 44px;
  min-width: 6.5rem;
  padding: 0.35rem 0.85rem;
}


/* Offline-first indicator on book / demo */
.offline-banner {
  display: block;
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid #b45309;
  background: #fff7ed;
  color: #7c2d12;
  font-weight: 600;
}
.offline-banner.is-offline {
  border-color: #b45309;
  background: #fff7ed;
}
.offline-banner.is-sync {
  border-color: #0f766e;
  background: #ecfdf5;
  color: #115e59;
}
.offline-banner[hidden] { display: none !important; }

/* Who-owes payment method + reference */
.owes-pay {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.owes-pay select {
  max-width: 10rem;
  min-height: 2.4rem;
}
.owes-pay input[name="payRef"],
.owes-pay input[name="collected"] {
  max-width: 11rem;
}
.receipt-sms {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.75rem;
  max-width: 22rem;
}


/* —— the pilot book: compact top, shelf hero, catalog, responsive —— */
body.shop-book {
  overflow-x: clip;
  max-width: 100%;
}
.shop-book .site-header .example {
  display: none;
}
.shop-book .site-header .bar {
  min-height: 3.35rem;
}
.shop-book .hero {
  padding: 0.85rem 0 0.7rem;
  text-align: left;
}
.shop-book .hero .wrap {
  min-width: 0;
}
.shop-book .sd-logo-link {
  width: min(100%, 16rem);
  margin: 0 0 0.45rem;
}
.shop-book .sd-name {
  margin: 0 0 0.25rem;
  font-size: 0.92rem;
}
.shop-book .hero .kicker {
  margin: 0 0 0.2rem;
}
.shop-book .hero h1 {
  font-size: clamp(1.35rem, 3.5vw, 1.85rem);
  margin: 0 0 0.2rem;
  line-height: 1.2;
}
.shop-book .hero .lede {
  font-size: 0.98rem;
  margin: 0 0 0.35rem;
  max-width: 40rem;
  margin-inline: 0;
}
.shop-book .hero .book-jumps {
  gap: 0.45rem 0.65rem;
  margin-top: 0.55rem;
  margin-bottom: 0.25rem;
  position: sticky;
  top: 3.35rem;
  z-index: 3;
  background: var(--paper, #fff);
  padding: 0.3rem 0 0.45rem;
  flex-wrap: wrap;
  overflow-x: visible;
}
.shop-book .hero .book-jumps a {
  padding: 0.4rem 0.8rem;
  min-height: 44px;
}
.shop-book .hero .next-step {
  margin: 0.45rem 0 0.35rem;
}
.shop-book main > .wrap {
  padding-top: 0.35rem;
}
.shop-book main .section {
  margin-top: 1.75rem;
}
.shop-book .section h2 {
  margin-bottom: 0.55rem;
}
.shop-book .button:not(.ui-btn),
.shop-book .emp-bar-actions .button:not(.ui-btn),
.shop-book .sale-actions .button:not(.ui-btn) {
  margin-top: 0.15rem;
  min-height: 44px;
}
.shop-book .snapshot {
  gap: 0.85rem;
  margin: 0.85rem 0 1.35rem;
}
.shop-book .book-photo {
  margin: 0 0 0.85rem;
}
.shop-book .book-photo img {
  max-height: 11rem;
}
.shop-book .emp-bar {
  margin-bottom: 0.85rem;
  padding: 0.7rem 0.9rem;
}
.shop-book .sales-spans { margin: 1rem 0 1.2rem; gap: 0.55rem; }
.shop-book .dash-strip {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 0.75rem;
  margin: 0.25rem 0 1.1rem;
}
.shelf-hero-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 1rem 1.25rem;
  align-items: start;
  max-width: 100%;
}
.shelf-make-sale .next-step {
  margin: 0 0 0.65rem;
}
.shelf-latest-recv {
  margin: 0.35rem 0 0;
}
.low-stock-alert {
  background: #fff8f0;
  border: 1px solid #e8c49a;
  border-left: 4px solid #b45309;
  border-radius: 0.85rem;
  padding: 0.75rem 0.9rem;
  min-width: 0;
  height: auto;
  box-sizing: border-box;
}
.low-alert-title {
  margin: 0 0 0.25rem;
  font-weight: 700;
  color: var(--navy);
  font-size: 1rem;
}
.low-stock-alert .note { margin: 0 0 0.5rem; }
.low-alert-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
  max-height: 11rem;
  overflow: auto;
}
.low-alert-list li {
  margin: 0;
  padding: 0.35rem 0.5rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  font-size: 0.95rem;
}
.low-alert-qty { font-weight: 700; color: #9a4d0a; }
.low-alert-count { margin: 0.15rem 0 0.35rem; font-size: 1.55rem; line-height: 1.1; }

/* Home strip: compact Stock running low (no tall empty stretch beside Make a sale) */
a.dash-card.dash-low,
.dash-card.dash-low {
  background: #fff8f0;
  border: 1px solid #e8c49a;
  border-left: 4px solid #b45309;
}
a.dash-card.dash-low:hover {
  border-color: #b45309;
  box-shadow: 0 12px 28px rgba(196,122,26, 0.12);
}
a.dash-card.dash-low .dash-figure {
  color: #9a4d0a;
}

.catalog-table td.catalog-qty { font-weight: 700; }
.catalog-table { min-width: 32rem; }
.shelf-manage {
  display: grid;
  gap: 0.5rem;
  min-width: 10rem;
}
.shelf-edit summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--navy);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.shelf-edit[open] {
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--paper-2, #f7f8fa);
}
@media (max-width: 800px) {
  .shelf-hero-row {
    grid-template-columns: 1fr;
  }
  .shop-book .hero .book-jumps {
    top: 3.2rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.55rem;
  }
  .shop-book .dash-strip {
    grid-template-columns: 1fr;
  }
  .shop-book .stock-form,
  .shop-book .login-card {
    width: 100%;
    max-width: 100%;
  }
  .shop-book .stock-form input,
  .shop-book .stock-form textarea,
  .shop-book .stock-form select,
  .shop-book .stock-form .button:not(.ui-btn) {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 44px;
  }
  .staff-today-name { max-width: 7.5rem; }
  .shop-book .book-photo img { max-height: 8.5rem; }
}
/* Products catalog: card stack on narrow phones; table scroll otherwise */
@media (max-width: 640px) {
  .catalog-table {
    min-width: 0;
    width: 100%;
  }
  .catalog-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
  }
  .catalog-table,
  .catalog-table tbody,
  .catalog-table tr,
  .catalog-table td {
    display: block;
    width: 100%;
  }
  .catalog-table tr {
    margin: 0 0 0.75rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 0.65rem;
    background: #fff;
  }
  .catalog-table td {
    display: grid;
    grid-template-columns: 6.5rem minmax(0, 1fr);
    gap: 0.35rem 0.75rem;
    padding: 0.3rem 0;
    border: 0;
    text-align: left;
  }
  .catalog-table td::before {
    content: attr(data-label);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
  }
  .shop-book .sales-table:not(.catalog-table) {
    min-width: 28rem;
  }
}


/* —— the pilot book home polish —— */
body.shop-book {
  background: linear-gradient(165deg, #f7f9f8 0%, #f7fbfa 42%, #f7f9f8 100%);
}
.shop-book .site-header {
  background: rgba(255,255,255, 0.97);
  box-shadow: 0 1px 0 rgba(15,61,58, 0.06);
}
.shop-book .hero {
  background: linear-gradient(180deg, #ffffff 0%, #f0faf8 100%);
  border-bottom: 1px solid rgba(15,61,58, 0.08);
  box-shadow: 0 10px 28px rgba(15,61,58, 0.04);
}
.shop-book .dash-card,
a.dash-card {
  box-shadow: 0 10px 26px rgba(15,61,58, 0.06);
  border-color: rgba(15,61,58, 0.1);
  background: #fff;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
a.dash-card:hover {
  box-shadow: 0 14px 32px rgba(15,61,58, 0.1);
  border-color: var(--shop-accent, var(--teal));
}
.shop-book .sale-desk,
.shop-book .low-stock-alert {
  box-shadow: 0 8px 22px rgba(15,61,58, 0.05);
}
.shop-book .sale-desk {
  background: #fff;
  border: 1px solid rgba(15,61,58, 0.1);
  border-radius: 0.85rem;
  padding: 1rem 1.1rem 1.15rem;
}
.home-sale-row {
  margin: 0.35rem 0 1.1rem;
  align-items: stretch;
}
.home-sale-row .sale-desk {
  margin-top: 0;
}
.home-sale-row .low-stock-alert {
  align-self: start;
  max-height: none;
  width: 100%;
}
.home-sale-row .low-stock-alert .low-alert-list {
  max-height: 8.5rem;
}
.shop-book .emp-bar {
  box-shadow: 0 6px 18px rgba(15,61,58, 0.05);
}
.shop-book .ask.stock-form,
.shop-book .hero .sale-gap.stock-form {
  box-shadow: 0 12px 30px rgba(15,61,58, 0.07);
}
@media (max-width: 800px) {
  .home-sale-row {
    grid-template-columns: 1fr;
  }
}

/* Sale payment on Sold (cash/debit/credit — never card PAN) */
.sale-sold-form {
  display: grid;
  gap: 0.4rem;
  min-width: min(100%, 14rem);
  flex: 1 1 12rem;
}
.sale-pay-method {
  min-height: 44px;
  width: 100%;
  max-width: 100%;
  font: inherit;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: #fff;
}
.sale-pay-hint {
  margin: 0;
  font-size: 0.78rem;
}
.sales-staff-filter {
  margin-top: 0.35rem;
}
.sales-table-enriched {
  min-width: 48rem;
}
@media print {
  .sales-spans, .sales-mail, .bottom-nav, .site-header .bar form { display: none !important; }
  .sales-table-enriched { min-width: 0; }
}

/* Staff today timeline */
a.staff-today-name {
  font-weight: 700;
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 0.12em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 9rem;
}
.staff-today-name-static {
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
  cursor: default;
  pointer-events: none;
}
.staff-today-row-self {
  border-color: rgba(15,61,58, 0.28);
  background: #fff;
}
.staff-timeline {
  background: #fff;
  border: 1px solid rgba(15,61,58, 0.1);
  border-radius: 0.85rem;
  padding: 1rem 1.1rem 1.15rem;
  box-shadow: 0 8px 22px rgba(15,61,58, 0.05);
  margin: 0.35rem 0 1.1rem;
}
.staff-timeline-sub {
  margin: 0.85rem 0 0.45rem;
  font-size: 1rem;
}
.staff-timeline-log {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}
.staff-timeline-log li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 0.85rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--paper-2, #f7f8fa);
  margin: 0;
}
.staff-timeline-kind { font-weight: 700; color: var(--navy); }
.staff-timeline-when { color: var(--muted); font-size: 0.92rem; }
.staff-timeline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}
.staff-timeline-actions .button:not(.ui-btn) {
  min-height: 44px;
  margin: 0;
}


/* add-stock-card layout */
.shop-book .add-stock-wrap {
  max-width: 52rem;
  width: 100%;
}
.shop-book .stock-form.add-stock-card {
  max-width: 52rem;
  width: 100%;
  gap: 0.45rem;
  margin-top: 0.35rem;
  background: #fff;
  border: 1px solid rgba(15,61,58, 0.1);
  border-radius: 0.85rem;
  box-shadow: 0 8px 22px rgba(15,61,58, 0.05);
  padding: 1.2rem 1.25rem 1.35rem;
}
.shop-book .add-stock-card > h2 {
  margin: 0 0 0.15rem;
  color: var(--navy);
}
.shop-book .add-stock-hint {
  margin: 0 0 0.55rem;
}
.shop-book .add-stock-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 1rem 1.35rem;
  align-items: start;
}
.shop-book .add-stock-col {
  display: grid;
  gap: 0.35rem;
  align-content: start;
  min-width: 0;
}
.shop-book .add-stock-col > label:first-child {
  margin-top: 0;
}
.shop-book .add-stock-col .price-pair {
  margin: 0;
}
.shop-book .add-stock-loc {
  margin: 0.9rem 0 0.15rem;
  padding: 0.7rem 0.85rem 0.85rem;
  border: 1px solid rgba(15,61,58, 0.08);
  border-radius: 0.65rem;
  background: var(--paper-2, #f7f9f8);
  min-width: 0;
}
.shop-book .add-stock-loc legend {
  padding: 0 0.3rem;
  font-weight: 700;
  color: var(--navy);
  font-size: 0.95rem;
}
.shop-book .add-stock-loc .loc-fields {
  margin: 0.35rem 0 0;
}
.shop-book .add-stock-card .add-stock-submit {
  margin-top: 1.05rem;
  justify-self: start;
  min-width: 11rem;
  padding: 0.9rem 1.5rem;
  box-shadow: 0 10px 22px rgba(15,118,110, 0.22);
}
.shop-book .add-stock-card .add-stock-submit:hover {
  box-shadow: 0 12px 26px rgba(15,118,110, 0.28);
}
@media (max-width: 800px) {
  .shop-book .add-stock-grid {
    grid-template-columns: 1fr;
  }
  .shop-book .add-stock-card .add-stock-submit {
    width: 100%;
    justify-self: stretch;
    text-align: center;
  }
}

/* Add stock pack quantity */
.shop-book .add-stock-qty {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.15rem;
}
.shop-book .pack-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  margin: 0.15rem 0 0;
  min-height: 44px;
  cursor: pointer;
}
.shop-book .pack-toggle input {
  width: 1.15rem;
  height: 1.15rem;
  min-width: 1.15rem;
  margin: 0;
  accent-color: var(--teal-bright, #0f766e);
}
.shop-book .pack-fields {
  display: grid;
  gap: 0.55rem;
  padding: 0.65rem 0.7rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: var(--paper-2, #f7f8fa);
}
.shop-book .pack-mode {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 0.35rem;
}
.shop-book .pack-mode legend {
  padding: 0;
  margin: 0 0 0.2rem;
  font-weight: 700;
  font-size: 0.92rem;
}
.shop-book .pack-mode-opt {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  font-weight: 500;
  margin: 0;
  cursor: pointer;
}
.shop-book .pack-mode-opt input {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
}
.shop-book .pack-math-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}
.shop-book .pack-total {
  margin: 0.15rem 0 0;
  font-weight: 600;
}
@media (max-width: 520px) {
  .shop-book .pack-math-grid {
    grid-template-columns: 1fr;
  }
}


/* Edit employees — card layout matching shelf/home */
.emp-edit-list {
  display: grid;
  gap: 0.85rem;
  margin: 0.85rem 0 1.25rem;
}
.emp-edit-card {
  background: #fff;
  border: 1px solid rgba(15,61,58, 0.1);
  border-radius: 0.85rem;
  box-shadow: 0 8px 22px rgba(15,61,58, 0.05);
  padding: 0;
  overflow: hidden;
}
.emp-edit-card.is-open {
  border-color: var(--shop-accent, var(--teal));
  box-shadow: 0 12px 28px rgba(15,61,58, 0.1);
}
.emp-edit-head {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 1rem 1.1rem 0.95rem;
}
.emp-edit-head:hover { background: var(--paper-2, #f7f8fa); }
.emp-edit-head h3 { margin: 0 0 0.25rem; }
.emp-edit-head .note { margin: 0; }
.emp-edit-body {
  padding: 0 1.1rem 1.15rem;
  border-top: 1px solid var(--line);
}
.emp-edit-form, .emp-add-card {
  margin-top: 0.85rem;
  max-width: 100%;
}
.emp-page-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin: 0.35rem 0 0.55rem;
}
.emp-hist { margin: 0.85rem 0 1rem; }
.emp-hist-month {
  background: var(--paper-2, #f7f8fa);
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  padding: 0.55rem 0.75rem;
  margin: 0.45rem 0;
}
.emp-hist-month summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--navy);
  min-height: 44px;
  display: flex;
  align-items: center;
}
.emp-hist-month-body { margin-top: 0.55rem; }
.emp-hist-day {
  margin: 0 0 0.65rem;
  padding: 0.45rem 0.55rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
}
.emp-hist-day-label { margin: 0 0 0.35rem; }

/* Timeline Break / Sign out at top */
.staff-timeline-actions {
  margin: 0.55rem 0 0.85rem;
}
.staff-break-btn-go {
  background: #b45309 !important;
  border-color: #b45309 !important;
  color: #fff !important;
}
.staff-break-btn-on {
  background: #e6a817 !important;
  border-color: #b45309 !important;
  color: #0f172a !important;
}


/* the pilot book receipts — clickable cards + letterhead */
.receipt-list {
  display: grid;
  gap: 0.75rem;
  margin: 0.85rem 0 1.25rem;
}
.receipt-card {
  background: #fff;
  border: 1px solid rgba(15,61,58, 0.1);
  border-radius: 0.85rem;
  box-shadow: 0 8px 22px rgba(15,61,58, 0.05);
  overflow: hidden;
}
.receipt-card[open] {
  border-color: var(--shop-accent, var(--teal));
}
.receipt-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) auto;
  gap: 0.45rem 0.75rem;
  align-items: center;
  cursor: pointer;
  list-style: none;
  padding: 0.85rem 1rem;
  min-height: 52px;
  font-weight: 600;
  color: var(--navy);
}
.receipt-summary::-webkit-details-marker { display: none; }
.receipt-sum-date { color: var(--muted); font-weight: 500; font-size: 0.92rem; }
.receipt-sum-item { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.receipt-sum-total { font-family: "Inter Tight", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--navy); }
.receipt-card-body {
  border-top: 1px solid var(--line);
  padding: 0.85rem 1rem 1.1rem;
}
.receipt-letterhead {
  margin-bottom: 0.75rem;
  padding-bottom: 0.55rem;
  border-bottom: 2px solid var(--shop-accent, var(--teal));
}
.receipt-letterhead .sd-logo-link { margin-bottom: 0.35rem; }
.receipt-lines {
  margin: 0.5rem 0 0;
  display: grid;
  gap: 0.45rem;
}
.receipt-lines div {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 0.35rem 0.75rem;
}
.receipt-lines dt {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.receipt-lines dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .receipt-summary {
    grid-template-columns: 1fr auto;
  }
  .receipt-sum-date { grid-column: 1 / -1; }
  .receipt-lines div { grid-template-columns: 1fr; gap: 0.1rem; }
}
@media print {
  .receipt-list details:not([open]) { display: none !important; }
  .receipt-summary { display: none !important; }
  .receipt-card, .receipt-card-body { border: 0; box-shadow: none; }
}


/* Obligations — premium dual tables (owed to / owed by this shop) */
.owes-page .owes-block,
.owes-block {
  margin-top: 1.25rem;
}
.owes-table-wrap {
  border-radius: 0.85rem;
  overflow: hidden;
  border: 1px solid rgba(15,61,58, 0.1);
  background: #fff;
  box-shadow: 0 8px 22px rgba(15,61,58, 0.05);
}
.owes-premium {
  margin: 0;
  width: 100%;
  border-collapse: collapse;
}
.owes-premium thead th {
  background: #f0faf8;
  color: var(--navy);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid rgba(15,61,58, 0.1);
}
.owes-premium td {
  padding: 0.75rem 0.85rem;
  vertical-align: top;
  border-bottom: 1px solid rgba(15,61,58, 0.06);
  font-size: 0.95rem;
}
.owes-premium .owes-row-alt td {
  background: #ffffff;
}
.owes-premium .owes-name { text-align: left; min-width: 8rem; }
.owes-premium .owes-amount { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.owes-premium .owes-status { text-align: left; white-space: nowrap; }
.owes-premium .owes-for { text-align: left; color: var(--muted); max-width: 12rem; }
.owes-premium .owes-payments { text-align: left; font-size: 0.88rem; color: var(--muted); max-width: 14rem; }
.owes-premium .owes-actions { min-width: 11rem; }
.owes-amt-sub { font-weight: 500; color: var(--muted); font-size: 0.85rem; }
.owes-chip {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.owes-chip-open { background: #fef7e0; color: #8a5a00; border: 1px solid #fce8b2; }
.owes-chip-paid { background: #e6f4ea; color: #0d652d; border: 1px solid #ceead6; }
.owes-total-row td {
  background: #f0faf8;
  border-bottom: 0;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}
.owes-total-label { text-align: left; color: var(--muted); font-size: 0.88rem; }
.owes-empty { text-align: center; color: var(--muted); padding: 1.1rem !important; }
.owes-pay { display: grid; gap: 0.35rem; margin: 0; }
@media (max-width: 800px) {
  .owes-table-wrap { overflow-x: auto; }
  .owes-premium { min-width: 40rem; }
}

/* Staff late flag + live board */
.staff-late-flag {
  display: inline-block;
  margin-left: 0.25rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #8b1a1a;
  background: #fce8e6;
  border: 1px solid #f5c6c2;
  vertical-align: middle;
}
.staff-chip-late {
  box-shadow: 0 0 0 2px rgba(179,38,30, 0.25);
}
.staff-live-board {
  margin: 0.75rem 0 1.1rem;
  padding: 0.85rem 1rem 1rem;
  background: #fff;
  border: 1px solid rgba(15,61,58, 0.1);
  border-radius: 0.85rem;
  box-shadow: 0 8px 22px rgba(15,61,58, 0.05);
}
.staff-board-list {
  list-style: none;
  margin: 0.55rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}
.staff-board-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto minmax(0, 1fr);
  gap: 0.45rem 0.75rem;
  align-items: center;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: var(--paper-2, #f7f8fa);
}
.staff-board-name { font-weight: 700; color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.staff-board-when { font-size: 0.82rem; color: var(--muted); text-align: right; }
@media (max-width: 600px) {
  .staff-board-row { grid-template-columns: 1fr auto; }
  .staff-board-when { grid-column: 1 / -1; text-align: left; }
}


/* ===== Polished staff menu (Break / Break over / Sign out) ===== */
.staff-menu-panel {
  background: #fff;
  border: 1px solid rgba(15,61,58, 0.1);
  border-radius: 0.95rem;
  box-shadow: 0 12px 28px rgba(15,61,58, 0.07);
  padding: 1.1rem 1.15rem 1.2rem;
  margin: 0.85rem 0 1.25rem;
  border-left: 4px solid #5f6368;
}
.staff-menu-active { border-left-color: #0d652d; }
.staff-menu-break { border-left-color: #b45309; }
.staff-menu-signedout { border-left-color: #b3261e; }
.staff-menu-head {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}
.staff-menu-head-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
}
.staff-menu-head-main h2 {
  margin: 0;
  font-size: 1.35rem;
  color: var(--navy);
}
.staff-menu-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.staff-menu-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin: 0 0 0.55rem !important;
  padding: 0.75rem;
  background: var(--paper-2, #f7f8fa);
  border: 1px solid rgba(15,61,58, 0.08);
  border-radius: 0.75rem;
}
.staff-action-form { margin: 0; }
.staff-menu-actions .button:not(.ui-btn),
.staff-break-btn,
.staff-signout-btn {
  width: 100%;
  min-height: 48px;
  margin: 0 !important;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 0.65rem;
}
.staff-break-btn-go {
  background: #b45309 !important;
  border-color: #a86410 !important;
  color: #fff !important;
}
.staff-break-btn-on {
  background: #f5c518 !important;
  border-color: #b45309 !important;
  color: #0f172a !important;
}
.staff-signout-btn {
  background: #fff !important;
  border: 2px solid #b3261e !important;
  color: #b3261e !important;
}
.staff-signout-btn:hover {
  background: #fce8e6 !important;
}
.staff-action-legend {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.staff-legend-break { color: #b45309; font-weight: 700; }
.staff-legend-over { color: #0d652d; font-weight: 700; }
.staff-legend-out { color: #b3261e; font-weight: 700; }
.staff-late-banner {
  margin: 0 0 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.55rem;
  background: #fce8e6;
  border: 1px solid #f5c6c2;
  color: #8b1a1a;
  font-weight: 600;
}
.staff-menu-locked {
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.55rem;
  background: #f1f3f4;
  color: var(--muted);
  font-weight: 500;
}
.staff-timeline-sub {
  margin: 0.35rem 0 0.45rem;
  font-size: 0.95rem;
  color: var(--navy);
}
.staff-timeline-log {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}
.staff-log-item {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 0.85rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--paper-2, #f7f8fa);
  margin: 0;
  border-left: 3px solid #5f6368;
}
.staff-log-signIn { border-left-color: #0d652d; }
.staff-log-break { border-left-color: #b45309; }
.staff-log-return { border-left-color: #0d652d; }
.staff-log-signOut { border-left-color: #b3261e; }
.staff-menu-close { margin: 0.85rem 0 0; }
.staff-today-row-self {
  border-color: var(--shop-accent, var(--teal));
  box-shadow: 0 0 0 1px rgba(15,61,58, 0.06);
}
.staff-today-row-active { border-left: 3px solid #0d652d; }
.staff-today-row-break { border-left: 3px solid #b45309; }
.staff-today-row-signedout { border-left: 3px solid #b3261e; }
.staff-today-row-inactive { border-left: 3px solid #dadce0; }
.staff-chip-active { color: #0d652d; background: #e6f4ea; border-color: #ceead6; }
.staff-chip-break { color: #8a5a00; background: #fef7e0; border-color: #fce8b2; }
.staff-chip-signedout { color: #b3261e; background: #fce8e6; border-color: #f5c6c2; }
.staff-chip-inactive { color: #475569; background: #F1F5F9; border-color: #CBD5E1; }
.staff-chip-inactive .staff-chip-state { opacity: 1; } /* W&B 4:12 PM: Inactive chip >= 4.5:1 (was 4.4) */
@media (max-width: 520px) {
  .staff-menu-actions { grid-template-columns: 1fr; }
}


/* Growth dashboard */
.growth-dash { display: grid; gap: 0.35rem; }
.growth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.75rem;
  margin: 0.75rem 0 0.35rem;
}
.growth-grid-2 { grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }
.growth-card {
  background: #fff;
  border: 1px solid rgba(15,61,58, 0.1);
  border-radius: 0.85rem;
  box-shadow: 0 8px 22px rgba(15,61,58, 0.05);
  padding: 0.85rem 1rem;
  min-width: 0;
}
.growth-label {
  margin: 0 0 0.25rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
}
.growth-figure {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.growth-sub { margin: 0.35rem 0 0; font-size: 0.85rem; }
.growth-table-wrap {
  border-radius: 0.85rem;
  overflow: hidden;
  border: 1px solid rgba(15,61,58, 0.1);
  background: #fff;
  box-shadow: 0 8px 22px rgba(15,61,58, 0.05);
}
.growth-table { margin: 0; width: 100%; }
.growth-table th, .growth-table td { padding: 0.65rem 0.85rem; }
.growth-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.growth-low-list {
  list-style: none;
  margin: 0.65rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}
.growth-low-list li {
  margin: 0;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #fff8f0;
}


/* Premium Staff today cards */
.staff-today-cards {
  list-style: none;
  margin: 0.65rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.75rem;
}
.staff-card {
  margin: 0;
  display: grid;
  gap: 0.45rem;
  padding: 0.85rem 1rem;
  background: #fff;
  border: 1px solid rgba(15,61,58, 0.1);
  border-radius: 0.85rem;
  box-shadow: 0 8px 22px rgba(15,61,58, 0.05);
  border-left: 4px solid #dadce0;
  min-width: 0;
}
.staff-card-active { border-left-color: #0d652d; }
.staff-card-break { border-left-color: #b45309; }
.staff-card-signedout { border-left-color: #b3261e; }
.staff-card-inactive { border-left-color: #dadce0; opacity: 0.92; }
.staff-card-self {
  box-shadow: 0 10px 26px rgba(15,61,58, 0.1);
  border-color: rgba(15,61,58, 0.16);
}
.staff-card-openable .staff-card-name { text-decoration: none; }
.staff-card-openable:hover {
  border-color: var(--shop-accent, var(--teal));
}
.staff-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 0.65rem;
}
.staff-card-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.staff-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
}
.staff-card-when {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}
.staff-page-board h2 { margin-bottom: 0.25rem; }
.dash-staff .staff-today-cards {
  grid-template-columns: 1fr;
}

.shelf-hero-row .low-stock-alert {
  height: auto;
  align-self: start;
  max-height: 16rem;
  overflow: auto;
}


/* Credit customer capture (inline under Credit) */
.credit-capture {
  margin: 0.35rem 0 0;
  border: 1px solid rgba(15,61,58, 0.12);
  border-radius: 0.75rem;
  background: #ffffff;
  padding: 0.55rem 0.7rem 0.75rem;
}
.credit-capture-summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
.credit-capture-summary::-webkit-details-marker { display: none; }
.credit-capture[open] .credit-capture-summary {
  margin-bottom: 0.55rem;
}
.credit-capture-fields {
  display: grid;
  gap: 0.35rem;
  margin: 0 0 0.65rem;
}
.credit-capture-title {
  margin: 0 0 0.25rem;
  font-weight: 700;
  color: var(--navy);
}
.credit-capture-fields label {
  font-size: 0.9rem;
  margin: 0.15rem 0 0;
}
.credit-capture-fields .req { color: #9a4d0a; font-weight: 600; font-size: 0.8rem; }
.credit-capture-fields .opt { color: #64748b; font-size: 0.8rem; }
.credit-capture-fields input {
  width: 100%;
  box-sizing: border-box;
}
.owes-contact {
  margin: 0.25rem 0 0;
  font-size: 0.88rem;
  color: #475569;
  font-weight: 400;
  line-height: 1.35;
}


/* Shop-book footer matches header accent; keep links clear of fixed bottom-nav */
body.shop-book .site-footer {
  border-top: 3px solid var(--shop-accent, var(--teal));
}
.company-brand-block {
  margin: 0 0 1rem;
}
.company-brand-block .sd-logo-link { margin-bottom: 0.35rem; }
.company-brand-block .sd-name {
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--shop-accent, #0f766e);
}
.letter-brand {
  font-weight: 800;
  color: var(--shop-accent, var(--navy));
}
.letter-brand-block .sd-logo-link { margin-bottom: 0.45rem; }
.catalog-loc-summary { margin: 0.35rem 0 0.75rem; }
@media (max-width: 800px) {
  body.shop-book .site-footer {
    padding-bottom: calc(5.75rem + env(safe-area-inset-bottom, 0px));
  }
}


/* Responsive: catalog scrolls on phone; footer clear of bottom-nav */
.catalog-table { min-width: 28rem; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 800px) {
  body.shop-book { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px)); }
  body.shop-book .site-footer {
    margin-bottom: 0;
    padding-bottom: calc(5.75rem + env(safe-area-inset-bottom, 0px));
  }
  .shop-book .sd-logo-link { width: min(100%, 14rem); }
  .shop-book .sd-name { font-size: 0.88rem; overflow-wrap: anywhere; }
  .company-brand-block .sd-name { font-size: 0.9rem; }
}
@media (min-width: 801px) and (max-width: 1100px) {
  body.shop-book .site-footer { padding-bottom: 1.75rem; }
  .shop-book .sd-logo-link { width: min(100%, 15rem); }
}
@media (min-width: 1101px) {
  body.shop-book .site-footer { padding-bottom: 1.5rem; }
}

/* Owner desk — subtle full-page MOM watermark behind content */
body.owner-desk {
  position: relative;
  isolation: isolate;
}
body.owner-desk::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%20800%20800%22%20role%3D%22img%22%20aria-label%3D%22MOM%22%3E%20%3Cdefs%3E%20%3ClinearGradient%20id%3D%22g%22%20x1%3D%220%25%22%20y1%3D%220%25%22%20x2%3D%22100%25%22%20y2%3D%22100%25%22%3E%20%3Cstop%20offset%3D%220%25%22%20stop-color%3D%22%233b0764%22/%3E%20%3Cstop%20offset%3D%22100%25%22%20stop-color%3D%22%236d28d9%22/%3E%20%3C/linearGradient%3E%20%3C/defs%3E%20%3C%21--%20Soft%20ring%20--%3E%20%3Ccircle%20cx%3D%22400%22%20cy%3D%22400%22%20r%3D%22310%22%20fill%3D%22none%22%20stroke%3D%22url%28%23g%29%22%20stroke-width%3D%2218%22/%3E%20%3Ccircle%20cx%3D%22400%22%20cy%3D%22400%22%20r%3D%22250%22%20fill%3D%22none%22%20stroke%3D%22%236d28d9%22%20stroke-width%3D%222%22%20opacity%3D%220.5%22/%3E%20%3C%21--%20Stylized%20shelf%20/%20book%20mark%20--%3E%20%3Cg%20transform%3D%22translate%28400%20320%29%22%20fill%3D%22none%22%20stroke%3D%22url%28%23g%29%22%20stroke-width%3D%2214%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%20%3Cpath%20d%3D%22M-120%2040%20L-120%20-40%20L0%20-90%20L120%20-40%20L120%2040%22/%3E%20%3Cpath%20d%3D%22M-120%2040%20L0%2090%20L120%2040%22/%3E%20%3Cpath%20d%3D%22M0%20-90%20L0%2090%22/%3E%20%3Cpath%20d%3D%22M-60%20-15%20L-60%2055%22/%3E%20%3Cpath%20d%3D%22M60%20-15%20L60%2055%22/%3E%20%3C/g%3E%20%3C%21--%20MOM%20wordmark%20--%3E%20%3Ctext%20x%3D%22400%22%20y%3D%22560%22%20text-anchor%3D%22middle%22%20font-family%3D%22Segoe%20UI%2C%20Helvetica%20Neue%2C%20Helvetica%2C%20Arial%2C%20sans-serif%22%20font-size%3D%22120%22%20font-weight%3D%22700%22%20letter-spacing%3D%220.28em%22%20fill%3D%22url%28%23g%29%22%3EMOM%3C/text%3E%20%3Ctext%20x%3D%22400%22%20y%3D%22610%22%20text-anchor%3D%22middle%22%20font-family%3D%22Segoe%20UI%2C%20Helvetica%20Neue%2C%20Helvetica%2C%20Arial%2C%20sans-serif%22%20font-size%3D%2222%22%20font-weight%3D%22600%22%20letter-spacing%3D%220.35em%22%20fill%3D%22%233b0764%22%3EMASTER%20OPERATIONS%3C/text%3E%20%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center 42%;
  background-size: min(92vw, 44rem);
  opacity: 0.055;
}
body.owner-desk > * {
  position: relative;
  z-index: 1;
}

/* Owner desk control panel — wide centered cards */
body.owner-desk {
  --measure: 1280px;
}
body.owner-desk .wrap,
body.owner-desk .owner-wrap {
  width: min(100%, var(--measure));
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}
body.owner-desk .owner-wrap {
  padding-bottom: 2.5rem;
}
body.owner-desk .owner-panel {
  width: 100%;
}
body.owner-desk .owner-card.ask,
body.owner-desk .owner-card.stock-form,
body.owner-desk .crm-desk .crm-add {
  max-width: none;
  width: 100%;
}
body.owner-desk .hero h1 {
  letter-spacing: 0.04em;
}

/* Owner desk — MOM brand: Ledger */
body.owner-desk {
  --paper: #f7f9f8;
  --paper-2: #ffffff;
  --line: #e2e8f0;
  --navy: #134e4a;
  --navy-deep: #0f3d3a;
  --teal: #0f766e;
  --teal-bright: #0f766e;
  --soft: #ecf8f6;
  --accent: #0f766e;
  background: var(--paper);
  scrollbar-color: #0f766e #e2e8f0;
}
body.owner-desk .site-header { background: #ffffff; border-bottom: 1px solid #e2e8f0; }
body.owner-desk .wordmark { display: inline-flex; align-items: center; gap: .55rem; color: #134e4a; }
body.owner-desk .wordmark .mom { color: #134e4a; }
body.owner-desk .owner-logo { width: 2.1rem; height: 2.1rem; flex: 0 0 auto; }
body.owner-desk .hero h1 { color: #134e4a; display: inline-flex; align-items: center; gap: .75rem; }
body.owner-desk .hero .owner-hero-logo { width: 3.2rem; height: 3.2rem; }
body.owner-desk .hero .owner-hero-sub { display: block; margin: .35rem 0 0; color: #64748b; font-size: 1rem; letter-spacing: .02em; }
body.owner-desk .owner-card { background: #ffffff; border-color: #e2e8f0; }
body.owner-desk .owner-card h2 { color: #134e4a; }
body.owner-desk a { color: #0f766e; }
body.owner-desk .button:not(.ui-btn) { background: #0f766e; }
body.owner-desk .button:not(.ui-btn):hover { background: #0f766e; }
body.owner-desk .button:not(.ui-btn).ghost { background: transparent; color: #134e4a; border-color: #cfe3df; }
body.owner-desk .button:not(.ui-btn).ghost:hover { background: #ecf8f6; }
body.owner-desk input:focus, body.owner-desk select:focus, body.owner-desk textarea:focus { outline: 2px solid #5eead4; outline-offset: 1px; border-color: #0f766e; }
body.owner-desk .site-footer { background: #0f3d3a; color: #e6f2f0; }
body.owner-desk .site-footer a { color: #e6f2f0; }
/* Switches: two wide side-by-side tables filling the card */
body.owner-desk #owner-switches-form .owner-form-grid { grid-template-columns: 1fr; }
body.owner-desk #owner-switches-form input[name="shop"] { width: 100%; max-width: none; }
body.owner-desk .premium-desk .switch-columns { display: grid; grid-template-columns: 1fr; gap: 1.25rem; width: 100%; }
@media (min-width: 700px) { body.owner-desk .premium-desk .switch-columns { grid-template-columns: 1fr 1fr; } }
body.owner-desk .premium-desk .switch-column { background: #fff; border-color: #e2e8f0; }
body.owner-desk .premium-desk .switch-column h2 { color: #134e4a; }

/* ── MOM palette, shared by every page (public, demo, client books, staff, owner desk) ──
   Ledger teal and amber, same as the front page (#mom-brand) and owner desk.
   Colour only: no layout changes. Staff green / yellow / red and danger red are untouched. */
.button:not(.ui-btn).ghost { border-color: var(--mom-line-strong); }
.button:not(.ui-btn).ghost:hover { background: var(--soft); color: var(--navy); }
.site-nav a { color: var(--navy); }
.site-nav a:hover { color: var(--teal-bright); }
.login-card input:focus,
.stock-form input:focus,
.stock-form textarea:focus,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--mom-lilac);
  outline-offset: 1px;
  border-color: var(--teal-bright);
}
:focus-visible { outline-color: var(--mom-lilac); }
::selection { background: #fcd34d; color: #0f3d3a; }
input[type="checkbox"], input[type="radio"], input[type="range"], progress { accent-color: var(--teal-bright); }
mark { background: #e6f4f1; color: var(--navy-deep); }
thead th { color: var(--navy); }
.site-footer { color: rgba(239,231,255, 0.88); }
.site-footer h2, .site-footer h3 { color: #fcd34d; }
.site-footer a:hover { color: #fff; }
.footer-copy { color: rgba(239,231,255, 0.78); border-top-color: rgba(252,211,77, 0.2); }
body.shop-book .site-header { background: rgba(255,255,255, 0.97); }
body.shop-book .wordmark, body.shop-book .wordmark .mom { color: var(--navy); }
html[data-theme="night"] body.shop-book .site-header { background: rgba(11,18,32, 0.94); }
html[data-theme="night"] body.shop-book,
html[data-theme="night"] .shop-book .hero { background: var(--paper); }

/* Break-it layout fixes: nothing may push the page wider than the phone. */
.skip { width: auto; max-width: calc(100% - 1.5rem); box-sizing: border-box; }
select, input, textarea { max-width: 100%; box-sizing: border-box; }
select { min-width: 0; text-overflow: ellipsis; }
@media (max-width: 640px) {
  /* Owner/sales tables and the plan table scroll sideways instead of crushing words. */
  body.owner-desk table, #tier-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
  body.owner-desk th, body.owner-desk td, #tier-table th, #tier-table td { min-width: 6.5rem; word-break: normal; overflow-wrap: normal; }
  /* Setup and owner forms stack: label on top, field full width, easy to tap. */
  body.owner-desk form.ask label { display: block; margin: 0 0 0.7rem; }
  body.owner-desk form.ask label > input, body.owner-desk form.ask label > select, body.owner-desk form.ask label > textarea { display: block; width: 100%; margin-top: 0.25rem; min-height: 2.6rem; }
}

/* All devices: every tap target at least 44px, form text 16px so phones don't zoom. */
button, .button:not(.ui-btn), a.button:not(.ui-btn), input[type=submit], input[type=button], summary { min-height: 44px; }
input:not([type=hidden]):not([type=checkbox]):not([type=radio]), select, textarea { font-size: 16px; min-height: 44px; }
textarea { min-height: 5.5rem; }
input[type=checkbox], input[type=radio] { min-width: 22px; min-height: 22px; }
nav a, header a, footer a, .wordmark { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; }
footer a { padding: 0 0.15rem; }
summary { display: flex; align-items: center; min-width: 44px; }
a.button:not(.ui-btn), .button:not(.ui-btn) { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-height: 44px !important; }
body input:not([type=hidden]):not([type=checkbox]):not([type=radio]), body select, body textarea { font-size: 16px !important; min-height: 44px !important; box-sizing: border-box; }
label:has(> input[type=checkbox]), label:has(> input[type=radio]), label:has(+ input[type=checkbox]) { min-height: 44px; display: inline-flex; align-items: center; gap: 0.4rem; }
body.owner-desk .button:not(.ui-btn):not(.ghost), body.owner-desk a.button:not(.ghost) { color: #fff; }
.owner-access-link { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.csr-contact label { display: block; margin: 0.6rem 0 0.25rem; }
.csr-contact textarea { display: block; width: 100%; max-width: 36rem; }
.csr-ways { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.csr-ways .button:not(.ui-btn) { white-space: normal; text-align: center; overflow-wrap: anywhere; }
.crm-flow { flex-wrap: wrap; } .crm-flow li { word-break: normal; overflow-wrap: normal; white-space: nowrap; }

/* build-check 2026-10-14 */

/* ---- Ledger: shared type + app nav (one nav model for every signed-in role) ---- */
.num, .figure, .dash-figure, .price-line, .left-count, .mom-price, td.num, .code, kbd { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.wordmark .mom { text-transform: lowercase; letter-spacing: -0.02em; font-family: var(--font-head); font-weight: 700; }
.app-nav { background: #fff; border-bottom: 1px solid var(--line); }
.app-nav .wrap { display: flex; gap: .25rem 1.25rem; flex-wrap: wrap; align-items: stretch; overflow-x: auto; }
.app-nav .grp { display: flex; align-items: center; gap: .15rem; }
.app-nav .grp-label { font: 600 .68rem/1 var(--font-ui); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-right: .35rem; }
.app-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .7rem; color: var(--ink); text-decoration: none; font: 500 .92rem/1 var(--font-ui); border-bottom: 3px solid transparent; white-space: nowrap; }
.app-nav a:hover { color: var(--brand); }
.app-nav a[aria-current="page"] { color: var(--brand); border-bottom-color: var(--brand); font-weight: 650; }
.app-nav .badge-up { margin-left: .35rem; font: 600 .65rem/1 var(--font-ui); background: var(--amber); color: #111; border-radius: 999px; padding: .2rem .4rem; }
@media (max-width: 767px) { .app-nav .wrap { flex-wrap: nowrap; } .app-nav .grp-label { display: none; } .app-nav .grp + .grp { border-left: 1px solid var(--line); padding-left: .35rem; } }
.button:not(.ui-btn):not(.ghost), button.button:not(.ghost) { background: var(--brand); border-color: var(--brand); color: #fff; }
.button:not(.ui-btn):not(.ghost):hover { background: var(--brand-deep); }
.tag.attention, .badge-attention { background: #fef3c7; color: var(--amber-ink); }

/* =====================================================================
   Ledger component layer (patterns after uiarc.dev forms/cards and boardui.com
   stat cards, data tables, empty states). Plain CSS, no animation.
   ===================================================================== */
body { font-family: var(--font-ui); color: var(--ink); }
h1, h2, h3, .mom, .page-header h1 { font-family: var(--font-head); letter-spacing: -0.015em; }

/* Page header: left aligned, same width as the cards */
.page-header { background: var(--surface); border-bottom: 1px solid var(--border); padding: 1.4rem 0 1.2rem; }
.page-header .wrap { text-align: left; }
.page-header h1 { font-size: clamp(1.5rem, 2.4vw, 1.95rem); line-height: 1.15; margin: .1rem 0 .25rem; color: var(--ink); font-weight: 700; letter-spacing: -0.02em; }
.page-eyebrow { margin: 0; font: 600 .72rem/1 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.page-sub { margin: 0; color: var(--muted); font-size: .95rem; }
body.owner-desk .owner-wrap { padding-top: 1.25rem; }

/* Cards: one style everywhere */
.card:not(.ui-card), .owner-card, .dash-card, .emp-card, .crm-block, .section.tier-locked, .ask, .login-card, .stock-form {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.card:not(.ui-card) { padding: 1.15rem 1.25rem; margin: 1rem auto; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-bottom: var(--sh-gap, .75rem); }
.card-head h2 { margin: 0; font-size: 1.15rem; }
/* .card-foot = footer row with a divider line; spacing comes from the Section rows component below */
.owner-card h2, .section h2 { font-size: 1.15rem; }
/* No card-inside-card: a form inside a card is flat */
.owner-card .ask, .owner-card form.ask, .card:not(.ui-card) .ask, .section .card:not(.ui-card) .ask, .tier-locked form, .csr-contact form, .owner-card .stock-form { background: transparent; border: 0; box-shadow: none; padding: 0; border-radius: 0; }

/* Pills / badges */
.pill:not(.ui-badge) { display: inline-flex; align-items: center; gap: .3rem; font: 600 .75rem/1 var(--font-ui); padding: .35rem .6rem; border-radius: 999px; background: #ecfdf5; color: var(--brand); border: 1px solid #ccebe6; }
.pill-amber, .badge-attention { background: #fffbeb; color: var(--amber-ink); border-color: #fde68a; }
.count { display: inline-flex; min-width: 1.35rem; justify-content: center; margin-left: .35rem; padding: .15rem .4rem; border-radius: 999px; background: var(--amber); color: #111; font: 600 .72rem/1 var(--font-mono); }

/* Buttons */
.button:not(.ui-btn), a.button:not(.ui-btn), button.button:not(.ui-btn) { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border-radius: var(--radius-sm); padding: .65rem 1.05rem; font: 600 .92rem/1.1 var(--font-ui); margin-top: 0; text-decoration: none; border: 1px solid var(--brand); }
.button:not(.ui-btn).ghost, a.button:not(.ui-btn).ghost, button.button:not(.ui-btn).ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--border-strong); }
.button:not(.ui-btn).ghost:hover { border-color: var(--brand); color: var(--brand); }
.button:not(.ui-btn).danger, .button:not(.ui-btn).ghost.danger { color: #b42318; border-color: #f3c3be; }

/* Forms: labels above, styled fields, 2-column grid on wide screens, 1 column on phone */
label { font: 600 .86rem/1.3 var(--font-ui); color: var(--ink); }
input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=file]):not([type=submit]):not([type=button]), select, textarea {
  width: 100%; font: 400 16px/1.35 var(--font-ui); color: var(--ink); background: #fff; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: .62rem .75rem; min-height: 44px; box-shadow: inset 0 1px 1px rgba(15,23,42,.03);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15,118,110,.18); }
select { appearance: none; -webkit-appearance: none; padding-right: 2.2rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23475569' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .8rem center; }
input[type=file] { font: 400 .9rem var(--font-ui); padding: .5rem; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-2); width: 100%; }
/* Checkbox / radio: small, left, aligned with their text */
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; min-width: 18px; min-height: 18px; margin: 0; flex: 0 0 18px; accent-color: var(--brand); }
.confirm-line, label:has(> input[type=checkbox]), label:has(> input[type=radio]) { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: .55rem; font-weight: 500; min-height: 44px; width: auto; text-align: left; justify-content: flex-start; }
/* Wrapped-label forms -> grid of fields */
form.ask, form.stock-form, form.crm-add, form.crm-block, .sales-wrap form { display: grid; grid-template-columns: 1fr; gap: .85rem 1rem; align-items: end; padding: 1.1rem 1.2rem; }
form.ask > label:not(.confirm-line):has(> input, > select, > textarea), form.stock-form > label:not(.confirm-line):has(> input, > select, > textarea), .sales-wrap form label:not(.confirm-line):has(> input, > select, > textarea), form.crm-add label:not(.confirm-line):has(> input, > select, > textarea) { display: flex; flex-direction: column; gap: .35rem; margin: 0; }
form.ask > .note, form.ask > p, form.ask > h2, form.ask > h3, form.ask > .confirm-line, form.ask > button, form.ask > .button:not(.ui-btn), form.ask > textarea, form.ask > label:has(> textarea), form.stock-form > h2, form.stock-form > p, form.stock-form > button, form.stock-form > .button:not(.ui-btn) { grid-column: 1 / -1; }
form.ask > button, form.ask > .button:not(.ui-btn), form.stock-form > button, form.stock-form > .button:not(.ui-btn) { justify-self: start; }
@media (min-width: 768px) {
  form.ask:has(> label:not(.confirm-line) > input, > label:not(.confirm-line) > select), form.stock-form:has(> label:not(.confirm-line) > input, > label:not(.confirm-line) > select), .sales-wrap form:has(label > input, label > select), form.crm-add { grid-template-columns: 1fr 1fr; }
  /* Sibling-label forms (label + input): keep pairs stacked inside one column */
  form.ask:not(:has(> label:not(.confirm-line) > input, > label:not(.confirm-line) > select, > label:not(.confirm-line) > textarea)) { grid-template-columns: 1fr; }
}
/* Inline action rows (confirm + button): one line on laptop */
.notify-prefs { grid-template-columns: 1fr !important; }
.notify-prefs .confirm-line { grid-column: auto; }
@media (min-width: 768px) { .notify-prefs { display: flex !important; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; } .notify-prefs > .note { flex: 1 0 100%; margin: 0; } .notify-prefs > button { margin-left: auto; } }

/* Getting started: one custom step list */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; counter-reset: none; }
.steps .step { display: flex; align-items: center; gap: .7rem; padding: .55rem .7rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.steps .step-icon { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; flex: 0 0 22px; border-radius: 999px; border: 2px solid var(--border-strong); background: #fff; color: #fff; }
.steps .step.done .step-icon { background: var(--brand); border-color: var(--brand); }
.steps .step.done .step-text { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--border-strong); }
.steps .step-text a { color: var(--ink); font-weight: 600; text-decoration: none; }
.steps .step-text a:hover { color: var(--brand); }

/* Plan card on the business home */
.plan-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.plan-card .stat-label { margin: 0; }
.plan-name { margin: .15rem 0 0; font: 700 1.35rem/1.1 var(--font-head); color: var(--ink); }
.plan-card-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.quick-links { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem auto .25rem; }
/* Upgrade block */
.upgrade-card { padding: 1.15rem 1.25rem; border-left: 4px solid var(--amber); }
.upgrade-card .tier-gains { margin: .4rem 0 .8rem; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .35rem .9rem; }
.upgrade-card .tier-gains li { position: relative; padding-left: 1.4rem; }
.upgrade-card .tier-gains li::before { content: ""; position: absolute; left: 0; top: .35em; width: .8rem; height: .8rem; border-radius: 999px; background: #fef3c7; box-shadow: inset 0 0 0 3px var(--amber); }
.csr-ways { display: flex; flex-wrap: wrap; gap: .5rem; margin: .75rem 0 0; }

/* Stat cards (boardui pattern) */
.dash-card { padding: 1rem 1.1rem; }
.dash-label, .stat-label { font: 600 .72rem/1.2 var(--font-ui); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.dash-figure, .stat-value { font: 600 1.6rem/1.1 var(--font-mono); color: var(--ink); margin: .3rem 0 0; }

/* Data tables (boardui pattern) */
.table-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto; background: var(--surface); box-shadow: var(--shadow-sm); }
.table-wrap table, table.sales-table, table.access-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .92rem; }
.table-wrap th, .sales-table th, .access-table th { background: var(--surface-2); color: var(--muted); font: 600 .74rem/1.2 var(--font-ui); text-transform: uppercase; letter-spacing: .06em; text-align: left; padding: .65rem .8rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table-wrap td, .sales-table td, .access-table td { padding: .65rem .8rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table-wrap tr:last-child td, .sales-table tr:last-child td, .access-table tr:last-child td { border-bottom: 0; }
.table-wrap tbody tr:hover, .sales-table tbody tr:hover, .access-table tbody tr:hover { background: #f8fbfa; }

/* Lists of rows */
ul.lines { list-style: none; padding: 0; margin: .5rem 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
ul.lines > li.line { padding: .7rem .9rem; border-bottom: 1px solid var(--border); }
ul.lines > li.line:last-child { border-bottom: 0; }

/* Empty states (uiarc/boardui pattern) */
.empty-state, .notify-list:empty, p.note.empty { text-align: center; }
.empty-state { border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-2); padding: 1.4rem 1rem; color: var(--muted); }
.empty-state::before { content: ""; display: block; width: 40px; height: 40px; margin: 0 auto .6rem; border-radius: 12px; background: #ecfdf5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='M4 10h12M10 4v12' stroke='%230f766e' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center no-repeat; }
.owner-attention { display: flex; flex-wrap: wrap; gap: .4rem .9rem; align-items: center; background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius); padding: .7rem .9rem; margin: 0 0 1rem; }
body.owner-desk::before { content: none; display: none; }
.notify-prefs > .note { max-width: none; }
body.owner-desk > .skip { position: absolute; }
/* Owner sub-pages: sections are cards with padding */
body.owner-desk .owner-panel > section, body.owner-desk .owner-panel > .section, body.owner-desk main .wrap > section.section { padding: 1.1rem 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin: 0 0 1rem; }
body.owner-desk .owner-panel > section > .table-wrap, body.owner-desk .owner-panel > section > table { margin: .75rem -1.25rem -1.1rem; border-radius: 0 0 var(--radius) var(--radius); border-left: 0; border-right: 0; border-bottom: 0; box-shadow: none; width: calc(100% + 2.5rem); }
/* Row actions: compact, inline */
.access-table td form { display: inline-flex !important; padding: 0 !important; margin: 0 .3rem .3rem 0; background: none; border: 0; box-shadow: none; }
.access-table td .button:not(.ui-btn), .table-wrap td .button:not(.ui-btn), .sales-table td .button:not(.ui-btn) { min-height: 36px; padding: .45rem .75rem; font-size: .84rem; background: var(--surface); color: var(--ink); border: 1px solid var(--border-strong); }
.access-table td .button:not(.ui-btn):hover, .table-wrap td .button:not(.ui-btn):hover { border-color: var(--brand); color: var(--brand); }
@media (max-width: 767px) {
  .plan-card-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .plan-card-actions .button:not(.ui-btn):first-child { grid-column: 1 / -1; }
  .plan-card-actions > .mh-tip-wrap:first-child { grid-column: 1 / -1; width: 100%; }
  .plan-card-actions > .mh-tip-wrap { display: inline-flex; align-items: center; max-width: 100%; }
  .plan-card-actions > .mh-tip-wrap > .button:not(.ui-btn) { flex: 1 1 auto; min-width: 0; min-height: 44px; padding: .55rem .6rem; font-size: .88rem; }
  .plan-card-actions .button:not(.ui-btn) { min-height: 44px; padding: .55rem .6rem; font-size: .88rem; }
}
/* Row action buttons: visible text (beats the filled-button rule) */
.access-table td button.button:not(.ui-btn), .access-table td a.button:not(.ui-btn), .table-wrap td button.button:not(.ui-btn), .table-wrap td a.button:not(.ui-btn), .sales-table td button.button:not(.ui-btn) { background: var(--surface); color: var(--ink); border: 1px solid var(--border-strong); }
.access-table td button.button:not(.ui-btn):hover, .table-wrap td button.button:not(.ui-btn):hover { color: var(--brand); border-color: var(--brand); }
/* Every owner-card has padding, wherever it sits */
.owner-card { padding: 1.1rem 1.25rem; margin: 0 0 1rem; }
.owner-card h3 { margin: 0 0 .5rem; font-size: 1.05rem; }
/* Oct 22 even spacing scale on the owner desk (4 / 8 / 16 / 24): a heading that follows a form, list or table gets 24px above it,
   so "Your leads (8)" no longer touches the lead form's Stage field; forms and lists keep 16px below. */
.owner-card > :is(form, ul, ol, table, .table-wrap, details, .note) + :is(h2, h3) { margin-top: 1.5rem; }
.owner-card > form.ask, .owner-card > form.lead-form { margin-bottom: 1rem; }
form.lead-form > label { min-width: 0; }
@media (min-width: 48rem) { form.lead-form { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* In-page section tabs (settings, activity filters): one segmented style */
.settings-jump, .activity-tabs { display: flex; flex-wrap: wrap; gap: .25rem; padding: .25rem; margin: .5rem 0 1rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); width: fit-content; max-width: 100%; }
.settings-jump a, .activity-tabs a, .activity-tabs .button:not(.ui-btn) { display: inline-flex; align-items: center; min-height: 36px; padding: .35rem .75rem; border-radius: 8px; color: var(--ink); text-decoration: none; font: 500 .88rem/1 var(--font-ui); background: transparent; border: 0; }
.settings-jump a:hover, .activity-tabs a:hover { background: #fff; color: var(--brand); }
.activity-tabs a[aria-current="page"], .activity-tabs .button:not(.ui-btn):not(.ghost) { background: #fff; color: var(--brand); box-shadow: var(--shadow-sm); font-weight: 600; }
/* Header: actions pushed right */
.site-header .bar > form, .site-header .bar > .site-nav { margin-left: auto; }
.site-header .bar > .site-nav + form { margin-left: .5rem; }
.access-table td .button:not(.ui-btn), .table-wrap td .button:not(.ui-btn), .sales-table td .button:not(.ui-btn) { color: var(--ink) !important; background: var(--surface) !important; }
.activity-tabs .button:not(.ui-btn), .activity-tabs a { color: var(--ink) !important; background: transparent !important; border: 0 !important; }
.activity-tabs .button:not(.ui-btn)[aria-current="page"], .activity-tabs a[aria-current="page"] { background: #fff !important; color: var(--brand) !important; box-shadow: var(--shadow-sm); font-weight: 600; }
.quick-links .button:not(.ui-btn) { width: auto !important; flex: 0 1 auto; }
.empty-state { max-width: none; }
/* Any data table in the app gets the shared table look */
main table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; font-size: .92rem; box-shadow: var(--shadow-sm); }
main table th { background: var(--surface-2); color: var(--muted); font: 600 .74rem/1.25 var(--font-ui); text-transform: uppercase; letter-spacing: .06em; text-align: left; padding: .65rem .8rem; border-bottom: 1px solid var(--border); }
main table td { padding: .6rem .8rem; border-bottom: 1px solid var(--border); text-align: left; }
main table tbody th { text-transform: none; letter-spacing: 0; font: 600 .9rem/1.3 var(--font-ui); color: var(--ink); background: var(--surface); }
main table tr:last-child td, main table tr:last-child th { border-bottom: 0; }
.table-wrap main table, .table-wrap table { border: 0; box-shadow: none; border-radius: 0; }

li form.ask, .line form.ask, .lines form.ask { background: transparent; border: 0; box-shadow: none; padding: .6rem 0 0; border-top: 1px solid var(--border); border-radius: 0; margin-top: .6rem; }
body.owner-desk .owner-panel > section { overflow-x: auto; }
/* Tap targets: tabs and row actions keep 44px; inputs inside tables keep a usable width */
.settings-jump a, .activity-tabs a, .activity-tabs .button:not(.ui-btn), .access-table td .button:not(.ui-btn), .table-wrap td .button:not(.ui-btn), .sales-table td .button:not(.ui-btn) { min-height: 44px; }
td input:not([type=checkbox]):not([type=radio]):not([type=hidden]), td select { min-width: 5.5rem; }
td input[type=checkbox], td input[type=radio] { width: 22px; height: 22px; }
@media (max-width: 767px) { .settings-jump, .activity-tabs { flex-wrap: nowrap; overflow-x: auto; width: 100%; } .settings-jump a, .activity-tabs a, .activity-tabs .button:not(.ui-btn) { flex: 0 0 auto; white-space: nowrap; } }
/* Segmented tabs (demo book pages) */
.seg-tabs { display: flex; flex-wrap: wrap; gap: .25rem; padding: .25rem; margin: .75rem 0; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); width: fit-content; max-width: 100%; }
.seg-tabs a { display: inline-flex; align-items: center; min-height: 44px; padding: .35rem .8rem; border-radius: 8px; border: 0 !important; background: transparent !important; box-shadow: none !important; color: var(--ink) !important; font: 500 .9rem/1 var(--font-ui); text-decoration: none; }
.seg-tabs a:hover { background: #fff !important; color: var(--brand) !important; }
.seg-tabs a[aria-current="page"], .seg-tabs a.active, .seg-tabs a.here { background: #fff !important; color: var(--brand) !important; font-weight: 600; box-shadow: var(--shadow-sm) !important; }
@media (max-width: 767px) { .seg-tabs { flex-wrap: nowrap; overflow-x: auto; width: 100%; } .seg-tabs a { flex: 0 0 auto; white-space: nowrap; } }
/* Phone header: never wrap */
@media (max-width: 767px) {
  .site-header .bar { flex-wrap: nowrap; gap: .5rem; }
  .site-header .wordmark img[src*="logo.svg"] { width: 120px; height: auto; }
}
/* Phone: data tables become card lists (labels from the header) */
@media (max-width: 767px) {
  table[data-cards] { border: 0 !important; background: transparent !important; box-shadow: none !important; }
  table[data-cards], table[data-cards] tbody, table[data-cards] tr, table[data-cards] td, table[data-cards] tbody th, table[data-cards] tfoot { display: block; width: 100%; }
  table[data-cards] thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table[data-cards] > tr:first-child:has(th), table[data-cards] tbody > tr:first-child:has(> th:nth-child(2)):not(:has(td)) { display: none; }
  table[data-cards] tr { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin: 0 0 .65rem; padding: .35rem 0; }
  table[data-cards] td, table[data-cards] tbody th { display: flex; justify-content: space-between; align-items: center; gap: .75rem; border: 0 !important; padding: .4rem .9rem !important; text-align: right; background: transparent !important; }
  table[data-cards] td::before, table[data-cards] tbody th::before { content: attr(data-label); flex: 0 0 auto; max-width: 45%; text-align: left; font: 600 .72rem/1.3 var(--font-ui); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
  table[data-cards] td:not([data-label])::before, table[data-cards] td[data-label=""]::before { content: none; }
  table[data-cards] td:not([data-label]) { justify-content: flex-start; flex-wrap: wrap; }
  table[data-cards] td > form, table[data-cards] td .button:not(.ui-btn) { margin: 0; }
  table[data-cards] td:has(form), table[data-cards] td:has(.button:not(.ui-btn)) { flex-wrap: wrap; justify-content: flex-end; }
  .table-wrap { border: 0; background: transparent; box-shadow: none; overflow: visible; }
  body.owner-desk .owner-panel > section { overflow-x: visible; }
  body.owner-desk .owner-panel > section > table, body.owner-desk .owner-panel > section > .table-wrap { margin: .75rem 0 0; width: 100%; }
}
body.has-page-title .owner-panel > section:first-of-type > h2:first-child, body.has-page-title .owner-panel > section:first-of-type > header:first-child > h2 { display: none; }
body.has-page-title .owner-panel > p:first-child:has(> a.button.ghost[href="/owner"]) { display: none; }
@media (max-width: 767px) {
  table[data-cards] tr > :first-child { justify-content: flex-start; text-align: left; font: 600 1rem/1.3 var(--font-head); color: var(--ink); padding-top: .6rem !important; padding-bottom: .5rem !important; border-bottom: 1px solid var(--border) !important; margin-bottom: .25rem; }
  table[data-cards] tr > :first-child::before { content: none !important; }
}
body.has-page-title .owner-panel > p:first-child:has(> a.button.ghost) { display: none; }
/* Header CTAs: flat, same family as every other button */
.site-nav a.nav-demo { background: var(--brand) !important; color: #fff !important; box-shadow: none !important; animation: none !important; transform: none !important; font: 600 .92rem/1 var(--font-ui) !important; padding: .6rem 1rem !important; border-radius: var(--radius-sm) !important; }
.site-nav a.nav-signin { background: #fff !important; color: var(--ink) !important; border: 1px solid var(--border-strong) !important; box-shadow: none !important; animation: none !important; transform: none !important; font: 600 .92rem/1 var(--font-ui) !important; padding: .6rem 1rem !important; border-radius: var(--radius-sm) !important; }
.site-header { border-bottom: 1px solid var(--border) !important; }
/* Sign-in: card centred under the centred hero; h2 hidden (hero already says Sign in) */
.hero-login.signin-cta { max-width: 26rem; margin: 0 auto 2.5rem; }
.hero-login.signin-cta > h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hero-login.signin-cta .login-card { width: 100%; padding: 1.4rem 1.4rem 1.5rem; }
.hero-login.signin-cta .signin-button { width: 100%; justify-self: stretch; }
.hero-login.signin-cta > .note { text-align: center; margin: .9rem auto 0; }
/* Theme settings toggle matches ghost buttons */
.settings-toggle { border-radius: var(--radius-sm) !important; border: 1px solid var(--border-strong) !important; background: #fff !important; font: 600 .92rem/1 var(--font-ui) !important; padding: .6rem 1rem !important; color: var(--ink) !important; }
/* Consistent vertical rhythm between stacked cards on the book */
.wrap > .card:not(.ui-card) { margin: 0 0 1rem; }
main > .wrap:has(> .card) { margin-top: 1rem; }
.readonly-banner { background: #fffbeb; border: 1px solid #fde68a; border-left: 4px solid var(--amber); border-radius: var(--radius); padding: 1rem 1.2rem; margin-top: 1rem; margin-bottom: 1rem; box-shadow: var(--shadow-sm); }
.readonly-banner p:first-child { margin-top: 0; }

/* Legacy app variable names → design tokens (single source of truth: tokens.css) */
:root{--paper:var(--c-paper);--paper-2:var(--c-surface);--ink:var(--c-ink);--muted:var(--c-muted);--line:var(--c-line);--navy:var(--c-secondary);--navy-deep:var(--c-secondary);--teal:var(--c-primary);--teal-bright:var(--c-primary);--soft:var(--c-primary-soft);--accent:var(--c-primary);--mom-violet:var(--c-primary);--mom-lilac:#5EEAD4;--mom-lilac-soft:#99F6E4;--mom-line-strong:var(--c-line-strong);--mom-cream-ink:var(--c-surface);--mom-footer-ink:#E6F2F0;--measure:var(--container);--brand:var(--c-primary);--brand-deep:var(--c-primary-hover);--amber:var(--c-accent);--amber-ink:var(--c-warning-ink);--font-ui:var(--font-body);--font-mono:var(--font-num);--surface:var(--c-surface);--surface-2:var(--c-paper);--border:var(--c-line);--border-strong:var(--c-line-strong);--radius:var(--r-lg);--radius-sm:var(--r-md);--shadow-sm:var(--sh-1)}
/* App-only adjustments on top of the design-system components (layout, not look) */
.ui .card.ui-card { margin: 1rem auto; padding: var(--s-5) var(--s-6); }
.ui .ui-btn.danger.ui-btn-secondary { color: var(--c-danger-ink) !important; }
.ui .ui-btn { margin-top: 0; text-decoration: none; }
.ui table.ui-table th, .ui table.ui-table td { padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--border); text-align: left; }
@media (max-width: 47.98rem) { .ui .card.ui-card { padding: var(--s-4); } }
/* Buttons inside data tables: design-system secondary, small */
.ui :is(.access-table,.table-wrap,.sales-table,.ui-table) td .ui-btn:not(.ui-btn-danger) { --b-bg: var(--c-surface); --b-fg: var(--c-ink); --b-bd: var(--c-line-strong); min-height: var(--tap); padding: 0 var(--s-3); font-size: var(--fs-sm); }
.ui :is(.access-table,.table-wrap,.sales-table,.ui-table) td .ui-btn:not(.ui-btn-danger):hover { --b-bd: var(--c-primary); --b-fg: var(--c-primary); }
/* Demo: one-row segmented tabs (scroll inside the control, never the page) */
.ui .seg-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
.ui .seg-tabs a { flex: 0 0 auto; white-space: nowrap; }
/* Stat figures: one size everywhere */
.ui .stat strong, .ui .stat .num, .ui .stat-card strong, .ui .ui-stat dd { font: 600 var(--fs-2xl)/1.15 var(--font-num); }
.ui :is(.access-table,.table-wrap,.sales-table,.ui-table) td .ui-btn:not(.ui-btn-danger) { background: var(--c-surface) !important; color: var(--c-ink) !important; border: 1.5px solid var(--c-line-strong) !important; }
.ui :is(.access-table,.table-wrap,.sales-table,.ui-table) td .ui-btn:not(.ui-btn-danger):hover { color: var(--c-primary) !important; border-color: var(--c-primary) !important; }
.ui .seg-tabs, .ui .shop-book .hero .book-jumps.seg-tabs { flex-wrap: nowrap !important; overflow-x: auto; }
.ui .dash-card .dash-figure, .ui .dash-staff .dash-figure { font: 600 var(--fs-2xl)/1.15 var(--font-num) !important; }
.ui .seg-tabs { max-width: 100%; width: 100% !important; box-sizing: border-box; }
/* Legacy literals kept for older selectors/tests (same values as tokens.css) */
:root {
  --measure: 1100px;
  --brand-hex: #0f766e;
}
.ui .ui-btn { max-width: 100%; white-space: normal; text-align: center; } .ui .ai-picks .ui-btn { height: auto; padding-block: var(--s-2); text-align: left; }
/* Header logo: full lockup on laptop (as the public site), square icon on phone */
.wordmark .logo-full { height: 2.25rem; width: auto; display: block; }
.wordmark .logo-icon { display: none; width: 2rem; height: 2rem; }
@media (max-width: 47.98rem) { .wordmark .logo-full { display: none; } .wordmark .logo-icon { display: block; } }
/* Staff quick links live inside the hero band */
.hero .quick-links.in-hero { margin: var(--s-4) 0 0; padding: 0; }
/* Book sub-pages: shared page header replaces the panel h2 */
body.shop-book .page-header + main > .section:first-child { margin-top: var(--s-4); }
/* Assistant suggestion chips: wrap in a row with even gaps */
.ui .ai-picks { display: flex !important; flex-wrap: wrap; gap: var(--s-2); margin: var(--s-3) 0; }
.ui .ai-picks form { display: contents; margin: 0 !important; padding: 0 !important; }
/* Demo tabs: contained, scroll inside the control */
.ui .shop-book .hero .book-jumps.seg-tabs, .ui .seg-tabs { overflow-x: auto !important; overflow-y: hidden !important; max-width: 100% !important; min-width: 0; }
/* Plans: comparison table in a card */
.ui .plans-card { padding: 0; overflow: hidden; }
.ui .plans-card .plans-current { padding: var(--s-4) var(--s-5) var(--s-3); margin: 0; }
.ui .plans-card table { margin: 0; }
@media (max-width: 47.98rem) { .ui .plans-card { background: transparent; border: 0; box-shadow: none; } .ui .plans-card .plans-current { padding: 0 0 var(--s-3); } }
/* Dashboard: the Total row's first cell reads as a normal (bold) cell, not a header band */
.ui tfoot th[scope="row"] { background: var(--c-surface) !important; color: var(--c-ink) !important; font: 600 var(--fs-sm)/1.4 var(--font-body) !important; text-transform: none !important; letter-spacing: 0 !important; }
.ui tfoot td, .ui tfoot th { border-top: 1.5px solid var(--c-line-strong); }
/* Demo: five stat cards in one even row on laptop */
@media (min-width: 64rem) { .ui .dash-strip { display: grid !important; grid-template-columns: repeat(5, minmax(0, 1fr)) !important; gap: var(--s-3) !important; } .ui .dash-strip > * { margin: 0 !important; min-width: 0; } }
/* Demo tabs on laptop: compact, and wrap instead of clipping */
@media (min-width: 48rem) { .ui .seg-tabs, .ui .shop-book .hero .book-jumps.seg-tabs { flex-wrap: wrap !important; overflow: visible !important; } .ui .seg-tabs a { padding: .35rem .6rem !important; font-size: var(--fs-sm); } }
/* Settings buttons on phone: equal full-width */
@media (max-width: 47.98rem) { .ui .csr-ways { display: grid !important; grid-template-columns: 1fr; gap: var(--s-2); } .ui .csr-ways .ui-btn { width: 100%; margin: 0 !important; } }
/* Plans card padding (beats the generic card padding) */
.ui .card.ui-card.plans-card { padding: 0; }
@media (max-width: 47.98rem) { .ui .card.ui-card.plans-card { padding: 0; margin-top: 0; } }
/* Demo tabs on laptop: even rows, no orphan tab */
@media (min-width: 48rem) { .ui .seg-tabs, .ui .shop-book .hero .book-jumps.seg-tabs { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(7.25rem, 1fr)); gap: .25rem; } .ui .seg-tabs a { justify-content: center; text-align: center; } }
@media (min-width: 64rem) { .ui .seg-tabs, .ui .shop-book .hero .book-jumps.seg-tabs { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; } .ui .dash-strip .dash-label { min-height: 2.5em; } }
/* Sales desk: space between the intro note and the form (targeted; no other forms change) */
.ui #sales-setup > p.note + form.ask { margin-top: var(--s-4); }
/* Phone plan card: an odd last button spans the row instead of sitting alone at half width */
@media (max-width: 47.98rem) { .plan-card .plan-card-actions > a.button:last-child:nth-child(even), .plan-card .plan-card-actions > .mh-tip-wrap:last-child:nth-child(even) { grid-column: 1 / -1; } }

/* Shared Back-to-top (app/book + owner pages): safe area, 44px target, lifted above other bottom-right controls. */
.back-top { right: calc(1rem + env(safe-area-inset-right, 0px)); bottom: calc(1rem + env(safe-area-inset-bottom, 0px) + var(--back-top-lift, 0px)); min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; z-index: 40; }
.back-top:focus-visible { outline: 3px solid #F59E0B; outline-offset: 2px; }
@media (max-width: 800px) { .back-top { right: calc(0.75rem + env(safe-area-inset-right, 0px)); bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px) + var(--back-top-lift, 0px)); } }
body.owner-desk main, body.shop-book main { padding-bottom: calc(44px + 2rem + env(safe-area-inset-bottom, 0px)); }


/* People profile header card + avatars (photos via the authenticated owner route; initials on teal fallback). */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.person-head { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--line, #E2E8F0); }
.person-id { min-width: 0; flex: 1 1 14rem; }
.person-name { margin: 0; font-size: 1.5rem; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.person-role { margin: 0.25rem 0 0.5rem; color: var(--muted, #475569); }
.person-badges { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; margin: 0 0 0.75rem; }
.badge-access { display: inline-flex; align-items: center; min-height: 1.75rem; padding: 0 0.6rem; border-radius: 999px; background: #CCFBF1; color: #134E4A; font-size: 0.85rem; font-weight: 600; }
.status-dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: #94A3B8; display: inline-block; }
.status-dot.status-active { background: #16A34A; } .status-dot.status-suspended { background: #F59E0B; } .status-dot.status-revoked { background: #DC2626; }
.avatar { border-radius: 50%; object-fit: cover; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; }
.avatar-lg { width: 96px; height: 96px; font-size: 2rem; }
.avatar-sm { width: 32px; height: 32px; font-size: 0.8rem; }
.avatar-initials { background: #0F766E; color: #fff; font-weight: 700; letter-spacing: 0.02em; }
.avatar-wrap { position: relative; width: 96px; height: 96px; flex: 0 0 auto; }
.avatar-cam { position: absolute; inset: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(15, 23, 42, 0.55); color: #fff; font-size: 1.5rem; opacity: 0; transition: opacity 0.15s; cursor: pointer; }
.avatar-wrap:hover .avatar-cam, .avatar-wrap:focus-within .avatar-cam { opacity: 1; }
.photo-form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.photo-form .button, .photo-pick { min-height: 44px; }
.photo-pick { position: relative; display: inline-flex; align-items: center; gap: 0.35rem; cursor: pointer; }
.photo-pick input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.photo-pick:focus-within { outline: 3px solid #F59E0B; outline-offset: 2px; }
.person-cell { display: inline-flex; align-items: center; gap: 0.5rem; }
@media (max-width: 640px) { .avatar-lg, .avatar-wrap { width: 72px; height: 72px; } .avatar-lg { font-size: 1.5rem; } .person-name { font-size: 1.25rem; } }
/* Log navigator */
.log-views,.log-bar,.log-type,.log-pages{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;margin:.75rem 0}
.log-bar .button,.log-views .button,.log-pages .button,.log-type .button,.log-pick .button{min-height:44px;min-width:44px;display:inline-flex;align-items:center;justify-content:center}
.log-arrow{font-size:1.25rem;line-height:1}
.log-pick{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;margin-left:auto}
.log-pick input,.log-type select{min-height:44px}
.log-day{display:flex;align-items:baseline;justify-content:space-between;gap:.5rem;margin:1.25rem 0 .25rem;padding-bottom:.25rem;border-bottom:1px solid var(--border,#e2e8f0);font-size:1rem}
.log-day-count{font-weight:500;font-size:.875rem;color:var(--muted,#64748b)}
.line-refused{color:var(--muted,#64748b)}
@media (max-width:40rem){.log-pick{margin-left:0;width:100%}.log-pick input{flex:1 1 10rem}}

/* Demos & trials + pipeline */
.summary-strip{display:flex;flex-wrap:wrap;gap:.5rem;list-style:none;padding:0;margin:.75rem 0}
.summary-strip li{flex:1 1 8rem;padding:.625rem .75rem;border:1px solid var(--border,#e2e8f0);border-radius:.75rem;background:var(--card,#fff)}
.summary-strip strong{display:block;font-size:1.375rem;font-variant-numeric:tabular-nums;color:#0F766E}
.assign-form,.pipe-filters{display:flex;flex-wrap:wrap;gap:.375rem;align-items:center}
.pipe-filters{gap:.75rem;margin:.75rem 0}.pipe-filters label{display:flex;flex-direction:column;gap:.25rem}
.assign-form select,.assign-form .button,.pipe-filters select,.pipe-filters input,.pipe-filters .button{min-height:44px}
table.dense td,table.dense th{padding:.375rem .5rem;vertical-align:top}
.status-dot.status-expiring{background:#F59E0B}.status-dot.status-expired{background:#94A3B8}
.act-score{font-variant-numeric:tabular-nums;color:#0F766E}
.lead{border:1px solid var(--border,#e2e8f0);border-radius:.75rem;margin:.5rem 0;padding:.25rem .75rem}.lead summary{min-height:44px;display:flex;align-items:center;flex-wrap:wrap;gap:.25rem;cursor:pointer}

/* Access split */
.access-tabs,.access-filter{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;margin:.75rem 0}
.access-tabs .button,.access-filter .button,.access-filter input,.access-filter select{min-height:44px}
.access-filter input{flex:1 1 12rem}
.access-group h3{margin:1rem 0 .25rem}
.access-who{display:inline-flex;align-items:center;gap:.5rem}

/* ===== Owner desk WOW (item 10): Ledger teal + amber, glass/depth, KPI tiles, sparklines. Restrained motion; none under reduced motion. ===== */
body.owner-desk { --ow-teal: #0F766E; --ow-deep: #134E4A; --ow-amber: #F59E0B; --ow-line: rgba(15,118,110,.14); background: radial-gradient(1200px 500px at 85% -10%, rgba(15,118,110,.07), transparent 60%), radial-gradient(900px 400px at -10% 10%, rgba(245,158,11,.05), transparent 60%), #f6f8f7; }
body.owner-desk .owner-card { background: rgba(255,255,255,.86); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid var(--ow-line); border-radius: 16px; box-shadow: 0 1px 2px rgba(19,78,74,.05), 0 8px 24px -12px rgba(19,78,74,.18); }
body.owner-desk .owner-card h2 { color: var(--ow-deep); letter-spacing: -.01em; }
body.owner-desk .table-wrap table { border-collapse: separate; border-spacing: 0; }
body.owner-desk .table-wrap thead th { background: #f0f7f6; color: var(--ow-deep); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
body.owner-desk .table-wrap tbody tr:hover td { background: #f7fbfa; }
body.owner-desk .table-wrap td, body.owner-desk .table-wrap th { font-variant-numeric: tabular-nums; }
body.owner-desk .activity-tabs, body.owner-desk .log-views { display: flex; flex-wrap: wrap; gap: .3rem; padding: .3rem; background: #eef5f4; border-radius: 12px; }
body.owner-desk .activity-tabs .button, body.owner-desk .log-views .button { min-height: 44px; border-radius: 9px; }
body.owner-desk .activity-tabs .button.ghost, body.owner-desk .log-views .button.ghost { background: transparent; border-color: transparent; }
body.owner-desk .empty-state { padding: 1rem; border: 1px dashed var(--ow-line); border-radius: 12px; text-align: center; color: #475569; background: rgba(240,247,246,.6); }
body.owner-desk .empty-state::before { content: "M"; display: block; width: 2rem; height: 2rem; margin: 0 auto .4rem; border-radius: 9px; background: var(--ow-deep); color: #fff; font-weight: 800; line-height: 2rem; }
.desk-hero { margin: 0 0 1.2rem; }
.desk-hello { margin: 0 0 .7rem; font-size: 1.25rem; font-weight: 700; color: #134E4A; }
.desk-date { font-weight: 500; color: #475569; font-size: .95rem; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: .75rem; margin: 0 0 1rem; }
.kpi-tile { position: relative; display: flex; flex-direction: column; gap: .15rem; min-height: 44px; padding: .9rem 1rem .8rem; overflow: hidden; border-radius: 16px; border: 1px solid rgba(15,118,110,.16); background: linear-gradient(160deg, rgba(255,255,255,.95), rgba(240,247,246,.85)); box-shadow: 0 1px 2px rgba(19,78,74,.06), 0 10px 26px -14px rgba(19,78,74,.28); color: #0f172a; text-decoration: none; transition: transform .18s ease, box-shadow .18s ease; }
.kpi-tile::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: #0F766E; }
.kpi-tile.kpi-amber::before { background: #F59E0B; }
a.kpi-tile:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(19,78,74,.08), 0 16px 30px -14px rgba(19,78,74,.35); }
a.kpi-tile:focus-visible, .queue-card:focus-visible { outline: 3px solid #5eead4; outline-offset: 2px; }
.kpi-label { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: #475569; }
.kpi-num { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 800; color: #134E4A; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.1; }
.kpi-note { font-size: .78rem; color: #64748b; }
.spark { width: 100%; height: 32px; margin-top: .35rem; }
.spark-line { fill: none; stroke: #0F766E; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark-area { fill: rgba(15,118,110,.10); stroke: none; }
.spark-dot { fill: #0F766E; }
.kpi-amber .spark-line { stroke: #B45309; } .kpi-amber .spark-area { fill: rgba(245,158,11,.14); } .kpi-amber .spark-dot { fill: #F59E0B; }
.queue-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: .6rem; }
.queue-card { display: flex; align-items: center; gap: .6rem; min-height: 44px; padding: .7rem .9rem; border-radius: 12px; border: 1px solid rgba(15,118,110,.14); background: rgba(255,255,255,.85); color: #0f172a; text-decoration: none; }
.queue-dot { flex: 0 0 auto; width: .7rem; height: .7rem; border-radius: 50%; background: #0F766E; }
.queue-card.is-waiting { border-color: rgba(245,158,11,.45); background: #fffbeb; }
.queue-card.is-waiting .queue-dot { background: #F59E0B; box-shadow: 0 0 0 4px rgba(245,158,11,.18); }
.queue-label { flex: 1; font-weight: 600; }
.queue-n { font-size: .85rem; color: #475569; font-variant-numeric: tabular-nums; }
.queue-card.is-waiting .queue-n { color: #92400e; font-weight: 700; }
.desk-hero ~ .owner-attention { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tier-bars { display: flex; flex-direction: column; gap: .45rem; margin: .4rem 0 .9rem; }
.tier-bar { display: grid; grid-template-columns: minmax(6rem, 9rem) 1fr 2.5rem; align-items: center; gap: .6rem; font-size: .9rem; }
.tier-bar-track { height: .6rem; border-radius: 999px; background: #e6f0ee; overflow: hidden; }
.tier-bar-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #134E4A, #0F766E); transform-origin: left; }
.tier-bar-n { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; color: #134E4A; }
.donut-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin: .4rem 0 .8rem; }
.donut { width: 120px; height: 120px; }
.donut-bg { stroke: #e6f0ee; }
.donut-total { font-size: .55rem; font-weight: 800; fill: #134E4A; }
.donut-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.donut-key { display: inline-block; width: .7rem; height: .7rem; margin-right: .45rem; border-radius: 3px; vertical-align: middle; }
.donut-seg.donut-active { stroke: #0F766E; } .donut-key.donut-active { background: #0F766E; }
.donut-seg.donut-quiet { stroke: #5eead4; } .donut-key.donut-quiet { background: #5eead4; }
.donut-seg.donut-inactive { stroke: #F59E0B; } .donut-key.donut-inactive { background: #F59E0B; }
.donut-seg.donut-never { stroke: #cbd5e1; } .donut-key.donut-never { background: #cbd5e1; }
@media (prefers-reduced-motion: no-preference) {
  .kpi-grid .kpi-tile, .queue-card, body.owner-desk .owner-card { animation: ow-rise .42s cubic-bezier(.2,.7,.2,1) both; }
  .kpi-grid .kpi-tile:nth-child(2) { animation-delay: .05s; } .kpi-grid .kpi-tile:nth-child(3) { animation-delay: .1s; } .kpi-grid .kpi-tile:nth-child(4) { animation-delay: .15s; }
  .tier-bar-fill { animation: ow-grow .7s cubic-bezier(.2,.7,.2,1) both; }
  .spark-line { stroke-dasharray: 400; animation: ow-draw .9s ease-out both; }
}
@keyframes ow-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes ow-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes ow-draw { from { stroke-dashoffset: 400; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .kpi-tile, a.kpi-tile:hover { transition: none; transform: none; } }

/* ===== Industry templates: picker + Shop tools (Ledger style, accent per industry) ===== */
.ind-picker { border: 0; padding: 0; margin: .4rem 0 1rem; }
.ind-picker legend { font-weight: 700; margin-bottom: .5rem; }
.ind-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: .7rem; }
.ind-card { position: relative; display: flex; flex-direction: column; overflow: hidden; border: 1px solid rgba(15,118,110,.18); border-radius: 14px; background: #fff; cursor: pointer; transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease; }
.ind-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ind-photo { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #e6f0ee; }
.ind-photo img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.92); transition: transform .5s ease; }
.ind-body { display: grid; grid-template-columns: auto 1fr; gap: .15rem .55rem; padding: .7rem .8rem .85rem; }
.ind-body .ind-icon { grid-row: span 2; }
.ind-icon { width: 28px; height: 28px; padding: 5px; border-radius: 9px; background: var(--ind, #0F766E); fill: #fff; flex: none; }
.ind-name { font-weight: 700; color: #0f172a; }
.ind-pitch { grid-column: 2; font-size: .82rem; color: #475569; line-height: 1.35; }
.ind-card:has(input:checked) { border-color: var(--ind); box-shadow: 0 0 0 2px var(--ind), 0 10px 24px -12px rgba(19,78,74,.35); }
.ind-card:has(input:checked)::after { content: "✓"; position: absolute; top: .5rem; right: .5rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--ind); color: #fff; font-weight: 800; display: grid; place-items: center; }
.ind-card:has(input:focus-visible) { outline: 3px solid #F59E0B; outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) { .ind-card:hover { transform: translateY(-2px); } .ind-card:hover .ind-photo img { transform: scale(1.04); } }
.ind-hero { display: grid; grid-template-columns: minmax(0, 1fr); overflow: hidden; border-radius: 18px; margin: 0 0 1rem; background: linear-gradient(135deg, #134E4A, var(--ind, #0F766E)); color: #fff; position: relative; }
.ind-hero-photo { width: 100%; height: 160px; object-fit: cover; opacity: .55; mix-blend-mode: luminosity; }
.ind-hero-text { position: absolute; inset: auto 0 0 0; padding: 1rem 1.1rem; background: linear-gradient(0deg, rgba(19,78,74,.92), rgba(19,78,74,0)); }
.ind-hero-text h2 { color: #fff; margin: 0 0 .2rem; }
.ind-hero-text p { margin: 0; max-width: 46rem; }
.ind-hero-text .page-eyebrow { color: #fde68a; }
.ind-hero .ind-icon { background: #F59E0B; float: right; }
.ind-roles { color: #ccfbf1 !important; margin-top: .35rem !important; }
@media (min-width: 900px) { .ind-hero { grid-template-columns: 2fr 3fr; } .ind-hero-photo { height: 100%; min-height: 190px; opacity: 1; mix-blend-mode: normal; } .ind-hero-text { position: static; background: none; padding: 1.3rem 1.5rem; } }
.ind-tabs { margin: 0 0 1rem; }
.ind-items { display: grid; gap: .7rem; }
.ind-item { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: .8rem; align-items: start; }
.ind-thumb { width: 96px; height: 96px; border-radius: 12px; object-fit: cover; }
.ind-thumb-empty { display: grid; place-items: center; background: #f0f7f6; }
.ind-thumb-empty .ind-icon { width: 40px; height: 40px; opacity: .8; }
.ind-item h3 { margin: 0; font-size: 1.05rem; }
.ind-chips { display: flex; flex-wrap: wrap; gap: .3rem; margin: .3rem 0; }
.ind-flag { font-size: .75rem; padding: .1rem .45rem; border-radius: 999px; }
.ind-bad { background: #fee2e2; color: #991b1b; }
.ind-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: .5rem .8rem; align-items: end; }
.ind-form h3, .ind-form > .button, .ind-form fieldset { grid-column: 1 / -1; }
.ind-adj { display: inline-flex; gap: .25rem; margin-left: .3rem; vertical-align: middle; }
.ind-adj .button { min-height: 44px; min-width: 44px; padding: 0 .5rem; }
.ind-grid-t td, .ind-grid-t th { text-align: center; white-space: nowrap; }
.ind-out { background: #fffbeb; color: #92400e; font-weight: 700; }
.ind-late td, td.ind-late { color: #b91c1c; }
.ind-today td { background: #f0faf8; }
.ind-bar { height: .4rem; border-radius: 999px; background: #e6f0ee; margin-top: .3rem; overflow: hidden; }
.ind-bar span { display: block; height: 100%; background: linear-gradient(90deg, #134E4A, #0F766E); }
.ind-alert-bad { border-left: 4px solid #dc2626 !important; }
.ind-alert-warn { border-left: 4px solid #F59E0B !important; }
.ind-menu { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: .7rem; }
.ind-locked { padding: 1.2rem; border: 1px dashed rgba(245,158,11,.6); border-radius: 14px; background: #fffbeb; }
.ind-tiles { margin: 0 0 1rem; }
.ind-tiles-head { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; font-weight: 700; color: #134E4A; text-decoration: none; }
.ind-tiles-head .ind-icon { background: var(--ind); }
/* Industry picker inside .ask forms: cards keep their own layout; compact rows on phones. */
.ask .ind-card, .ind-card { display: flex; flex-direction: column; align-items: stretch; gap: 0; margin: 0; font-weight: 400; }
.ind-picker legend .note { font-weight: 400; }
@media (max-width: 600px) {
  .ind-grid { grid-template-columns: 1fr; gap: .5rem; }
  .ask .ind-card, .ind-card { flex-direction: row; align-items: center; }
  .ind-photo { flex: 0 0 84px; width: 84px; height: 84px; aspect-ratio: auto; }
  .ind-body { padding: .5rem .7rem; }
  .ind-pitch { font-size: .78rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
}
.ind-hero { max-height: 260px; }
@media (min-width: 900px) { .ind-hero { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); } .ind-hero-photo { height: 260px; min-height: 0; } }
@media (max-width: 899px) { .ind-hero { max-height: none; } .ind-hero-photo { height: 170px; } }
.ind-hero-photo { object-position: center 25%; }

/* Owner menu (2026-10-14): group headings are plain section labels, never links. Default cursor, no hover, set apart from the tabs. */
.app-nav .grp-label { cursor: default; user-select: none; pointer-events: none; font-size: .64rem; color: #64748b; padding: 0 .1rem; }
@media (min-width: 768px) { .app-nav .grp + .grp { border-left: 1px solid var(--line); padding-left: .6rem; margin-left: .2rem; } }
/* Back to owner desk: one link, top-left of every owner sub-page header (2026-10-14). */
.owner-back { margin: 0 0 .5rem; font: 600 .875rem/1.4 var(--font-ui); }
.owner-back a { display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; color: var(--brand, #0f766e); text-decoration: none; }
.owner-back a:hover { text-decoration: underline; text-underline-offset: 3px; }
.owner-back a:focus-visible { outline: 3px solid #F59E0B; outline-offset: 2px; border-radius: 6px; }
/* This week tiles with week-over-week change */
.week-grid .wow { display: block; margin-top: .35rem; font: 600 .78rem/1.3 var(--font-ui); }
.wow-good { color: #047857; } .wow-bad { color: #b91c1c; } .wow-flat { color: #475569; }
[data-theme="night"] .wow-good { color: #6ee7b7; } [data-theme="night"] .wow-bad { color: #fca5a5; } [data-theme="night"] .wow-flat { color: #cbd5e1; }

/* E: source tags (shared chip, counts) */
.src-chip{display:inline-block;padding:1px 8px;border-radius:999px;font:600 .75rem/1.6 var(--font-ui,system-ui);color:#134e4a;background:#f0fdfa;border:1px solid #99f6e4;white-space:nowrap}
.src-chip[data-src="direct"]{color:#334155;background:#f8fafc;border-color:#cbd5e1}
.src-counts{display:flex;flex-wrap:wrap;gap:8px 12px;margin:8px 0 16px}.src-count{display:inline-flex;align-items:center;gap:6px;min-height:44px;text-decoration:none;color:inherit}
[data-theme="night"] body:not(.owner-desk) .src-chip{color:#99f6e4;background:rgba(20,184,166,.12);border-color:rgba(94,234,212,.4)}[data-theme="night"] body:not(.owner-desk) .src-chip[data-src="direct"]{color:#e2e8f0;background:rgba(148,163,184,.12);border-color:rgba(148,163,184,.4)}

/* B: the radio-label rule (label:has(> input[type=radio]) ... !important) was squashing industry cards into rows on desktop. */
.ind-grid > .ind-card { display: flex !important; flex-direction: column !important; align-items: stretch !important; justify-content: flex-start !important; min-height: 0; }
@media (max-width: 600px) { .ind-grid > .ind-card { flex-direction: row !important; align-items: center !important; } }

/* Deploy two (2026-10-15): seat prompts (80% / 100%), proration quote, locked previews. */
.seat-prompt{margin:12px 0;padding:12px 16px;border-radius:12px;border:1px solid #FCD34D;background:#FFFBEB;color:#78350F}
.seat-prompt.seat-full{border-color:#FCA5A5;background:#FEF2F2;color:#7F1D1D}
.seat-prompt p{margin:0 0 8px}.seat-prompt .seat-actions{margin:8px 0 0}
.seat-bar{height:8px;border-radius:999px;background:#E2E8F0;overflow:hidden;margin:8px 0}
.seat-bar span{display:block;height:100%;background:#0F766E;border-radius:999px}
.seat-near .seat-bar span{background:#B45309}.seat-full .seat-bar span{background:#B91C1C}
.seat-card,.plan-quote{margin-top:16px;padding:16px}
.seat-count{font-size:1.1rem;margin:4px 0}
.plan-quote h3{margin:0 0 8px}.quote-list{display:grid;grid-template-columns:max-content 1fr;gap:6px 16px;margin:0 0 8px}.quote-list dt{font-weight:700}.quote-list dd{margin:0;overflow-wrap:anywhere}
.price-lock{margin:0 0 12px}
.locked-preview{position:relative;margin:12px 0 4px;padding:12px;border:1px dashed #CBD5E1;border-radius:12px;background:#F8FAFC;opacity:.72;filter:saturate(.6);user-select:none;pointer-events:none;overflow:hidden;max-width:100%}
.locked-preview::after{content:"";position:absolute;inset:auto 0 0 0;height:45%;background:linear-gradient(to bottom,rgba(248,250,252,0),#F8FAFC)}
.locked-preview-tag{margin:0 0 8px;font-size:.75rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#475569}
.locked-preview-table{width:100%;border-collapse:collapse;font-size:.9rem;table-layout:fixed}
.locked-preview-table th,.locked-preview-table td{text-align:left;padding:6px 8px;border-bottom:1px solid #E2E8F0;overflow-wrap:anywhere}
.locked-preview-note{margin-top:4px}
@media (max-width:600px){.quote-list{grid-template-columns:1fr}.locked-preview-table{font-size:.8rem}}
/* Deploy two: website-form leads (assign, new tag, sales notice). */
.lead-assign{display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px 12px;margin:8px 0}.lead-assign label{display:flex;flex-direction:column;gap:4px;min-width:min(240px,100%)}
.lead-assign select{min-height:44px}.lead-assign button{min-height:44px}
.lead-new{border-color:#0F766E;box-shadow:0 0 0 2px rgba(15,118,110,.15)}
.lead-new-tag{display:inline-block;padding:2px 8px;border-radius:999px;background:#0F766E;color:#fff;font-size:.75rem;font-weight:700}
.lead-notice{border-left:6px solid #0F766E}.lead-msg{white-space:pre-wrap;overflow-wrap:anywhere}

/* V1 (2026-10-15): owner/sales/accounting/book side menu. Desktop ≥1024: fixed left column with its own scroll.
   Phones/tablets: sticky "Menu · <page>" bar that opens a drawer; the drawer closes after a selection. */
.app-nav .an-open, .app-nav .an-title, .app-nav .an-help, .an-backdrop { display: none; }
.app-nav a.is-active { color: var(--brand); font-weight: 650; }
@media (min-width: 1024px) {
  body:has(> .app-nav) { padding-left: 240px; }
  body > .app-nav { position: fixed; top: 0; left: 0; bottom: 0; width: 240px; z-index: 40; border-bottom: 0; border-right: 1px solid var(--line); background: #fff; }
  body > .app-nav .wrap { display: block; height: 100%; max-width: none; margin: 0; padding: 16px 12px 24px; overflow-y: auto; overscroll-behavior: contain; box-sizing: border-box; }
  body > .app-nav .an-title { display: block; margin: 4px 8px 12px; font: 700 .72rem/1.2 var(--font-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
  body > .app-nav .grp { display: block; margin: 0 0 14px; padding: 0; border: 0 !important; margin-left: 0 !important; }
  body > .app-nav .grp-label { display: block; margin: 0 8px 4px; padding: 0; }
  body > .app-nav a { display: flex; justify-content: flex-start; text-align: left; width: 100%; box-sizing: border-box; min-height: 44px; padding: 0 10px; border-bottom: 0; border-left: 3px solid transparent; border-radius: 0 8px 8px 0; white-space: normal; line-height: 1.25; }
  body > .app-nav a:hover { background: #F1F5F9; }
  body > .app-nav a[aria-current], body > .app-nav a.is-active { background: #E6F4F1; border-left-color: var(--brand); color: var(--brand); font-weight: 650; border-bottom-color: transparent; }
  body > .app-nav .an-help { display: block; margin: 8px 0 0; padding-top: 8px; border-top: 1px solid var(--line); }
}
@media (max-width: 1023.98px) {
  html.an-js body > .app-nav { position: sticky; top: 0; z-index: 60; border-bottom: 1px solid var(--line); background: #fff; }
  html.an-js .app-nav .an-open { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 0 16px; border: 0; background: #fff; color: var(--ink); font: 600 1rem/1 var(--font-ui); cursor: pointer; text-align: left; }
  html.an-js .app-nav .an-ico { width: 18px; height: 12px; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; position: relative; flex: none; }
  html.an-js .app-nav .an-ico::after { content: ""; position: absolute; left: 0; right: 0; top: 3px; border-top: 2px solid currentColor; }
  html.an-js .app-nav .an-cur { margin-left: auto; color: var(--brand); font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
  html.an-js .app-nav .an-cur:empty { display: none; }
  html.an-js body > .app-nav .wrap { position: fixed; top: 0; left: 0; bottom: 0; width: min(86vw, 320px); z-index: 1001; display: block; margin: 0; padding: 16px 12px 32px; background: #fff; overflow-y: auto; overscroll-behavior: contain; transform: translateX(-105%); transition: transform .2s ease; box-shadow: 0 10px 40px rgba(15,23,42,.25); visibility: hidden; box-sizing: border-box; flex-wrap: nowrap; }
  html.an-js.an-open-now body > .app-nav { z-index: 1002; }
  html.an-js.an-open-now body > .app-nav .wrap { transform: none; visibility: visible; }
  html.an-js.an-open-now, html.an-js.an-open-now body { overflow: hidden; }
  html.an-js .app-nav .an-title { display: block; margin: 4px 8px 12px; font: 700 .72rem/1.2 var(--font-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
  html.an-js body > .app-nav .grp { display: block; margin: 0 0 14px; border: 0 !important; padding: 0 !important; }
  html.an-js body > .app-nav .grp-label { display: block !important; margin: 0 8px 4px; }
  html.an-js body > .app-nav a { display: flex; justify-content: flex-start; text-align: left; min-height: 44px; padding: 0 10px; border-bottom: 0; border-left: 3px solid transparent; border-radius: 0 8px 8px 0; white-space: normal; }
  html.an-js body > .app-nav a[aria-current], html.an-js body > .app-nav a.is-active { background: #E6F4F1; border-left-color: var(--brand); color: var(--brand); font-weight: 650; }
  html.an-js .app-nav .an-help { display: block; margin: 8px 0 0; padding-top: 8px; border-top: 1px solid var(--line); }
  html.an-js .an-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 1000; background: rgba(15,23,42,.45); }
  html.an-js body:has(> .app-nav) .site-header .nav-toggle { display: none; }
}
@media (prefers-reduced-motion: reduce) { html.an-js body > .app-nav .wrap { transition: none; } }

/* Website & Brand live fix 2026-10-15: demo pages (body.public.shop-book) in night and high contrast.
   Night: the demo shell mixed Ledger tokens (light theme only) with shop.css night colours, so headings went dark-on-dark and
   white cards carried light text. Map the Ledger tokens to night and give cards a night surface. High contrast keeps the
   demo's black-on-white rendering in every theme, including the header. Signed-in customer books are not changed here. */
html[data-theme="night"]:not([data-contrast="high"]) body.public.shop-book{--c-ink:#F8FAFC;--c-ink-2:#E2E8F0;--c-muted:#CBD5E1;--c-subtle:#94A3B8;--c-surface:#111A2E;--c-paper:#0B1220;--c-paper-2:#0F172A;--c-line:#1E293B;--c-line-strong:#334155;--c-primary:#5EEAD4;--c-primary-soft:#0F2E2C;--fg:#F8FAFC;--fg-muted:#CBD5E1;--card:#111A2E;--border:#334155;--link:#5EEAD4;--paper:#0B1220;--paper-2:#111A2E;--line:#334155;background:#0B1220;color:#F8FAFC}
html[data-theme="night"]:not([data-contrast="high"]) body.public.shop-book .site-header{background:rgba(17,26,46,.96)}
html[data-theme="night"]:not([data-contrast="high"]) body.public.shop-book :is(h1,h2,h3,h4,.kicker,label,legend){color:inherit}
html[data-theme="night"]:not([data-contrast="high"]) body.public.shop-book .kicker{color:#5EEAD4}
html[data-theme="night"]:not([data-contrast="high"]) body.public.shop-book :is(.dash-card,.settings-toggle,.sale-desk,.card,.panel,.stock-form,.shop-files,.file-card,.demo-card,.sale-card){background:#111A2E;color:#F8FAFC;border-color:#334155}
html[data-theme="night"]:not([data-contrast="high"]) body.public.shop-book .dash-card.dash-low{background:#2A1E0B;border-color:#92400E}
html[data-theme="night"]:not([data-contrast="high"]) body.public.shop-book main a:not(.button):not(.ui-btn){color:#5EEAD4}
html[data-theme="night"]:not([data-contrast="high"]) body.public.shop-book .settings-toggle{background:#111A2E!important;color:#F8FAFC!important;border-color:#64748B!important}
html[data-theme="night"]:not([data-contrast="high"]) body.public.shop-book .bottom-nav{background:#111A2E!important;border-color:#334155!important}
html[data-theme="night"]:not([data-contrast="high"]) body.public.shop-book .bottom-nav :is(a,summary){color:#E2E8F0}
html[data-theme="night"]:not([data-contrast="high"]) body.public.shop-book :is(tbody tr,tfoot tr,thead tr,.empty-state,.note.empty-state){background:#111A2E;color:#F8FAFC}
html[data-theme="night"]:not([data-contrast="high"]) body.public.shop-book :is(input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]),select,textarea){background:#0F172A!important;color:#F8FAFC!important;border-color:#64748B!important}
html[data-theme="night"]:not([data-contrast="high"]) body.public.shop-book :is(nav[aria-label="Sales period"],.sales-staff-filter,.seg-tabs) a{background:#111A2E;color:#5EEAD4}
html[data-theme="night"]:not([data-contrast="high"]) body.public.shop-book :is(nav[aria-label="Sales period"],.sales-staff-filter,.seg-tabs) a[aria-current]{background:#0F2E2C;color:#F8FAFC}
html[data-theme="night"]:not([data-contrast="high"]) body.public.shop-book pre.receipt{color:#0F172A}
html[data-theme="night"]:not([data-contrast="high"]) body.public.shop-book details > summary{color:inherit}
html[data-theme="night"]:not([data-contrast="high"]) body.public.shop-book main :is([class*="card"],[class*="board"],[class*="-row"],fieldset,.section,form,.letter-head,table,td){background-color:#111A2E;border-color:#334155}
html[data-theme="night"]:not([data-contrast="high"]) body.public.shop-book main :is(thead th,thead tr,thead td){background-color:#0F2E2C;color:#5EEAD4}
html[data-theme="night"]:not([data-contrast="high"]) body.public.shop-book main :is(.button,.ui-btn,button[type=submit]):not(.ghost):not(.ui-btn-ghost):not(.secondary){background-color:#0F766E;color:#fff}
html[data-theme="night"]:not([data-contrast="high"]) body.public.shop-book .letter-brand{color:#5EEAD4}
html[data-contrast="high"] body.public.shop-book .site-header,html[data-contrast="high"][data-theme="night"] body.public.shop-book .site-header{background:#fff;color:#000}
html[data-contrast="high"] body.public.shop-book .site-header a:not(.button){color:#000}

/* Signed-in customer books in night mode (Atlas approved 2026-10-15): cards, panels, tables and forms kept their white
   day surface while the text went light. Same night surfaces as the demo shell; colours only, layout unchanged. */
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public){--c-ink:#F8FAFC;--c-ink-2:#E2E8F0;--c-muted:#CBD5E1;--c-subtle:#94A3B8;--c-surface:#111A2E;--c-paper:#0B1220;--c-paper-2:#0F172A;--c-line:#1E293B;--c-line-strong:#334155;--c-primary:#5EEAD4;--c-primary-soft:#0F2E2C;--fg:#F8FAFC;--fg-muted:#CBD5E1;--card:#111A2E;--border:#334155;--link:#5EEAD4;--paper:#0B1220;--paper-2:#111A2E;--line:#334155;background:#0B1220;color:#F8FAFC}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) :is(h1,h2,h3,h4,.kicker,label,legend){color:inherit}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) .kicker{color:#5EEAD4}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) :is(.dash-card,.settings-toggle,.sale-desk,.card,.panel,.stock-form,.shop-files,.file-card,.demo-card,.sale-card){background:#111A2E;color:#F8FAFC;border-color:#334155}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) .dash-card.dash-low{background:#2A1E0B;border-color:#92400E}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) main a:not(.button):not(.ui-btn){color:#5EEAD4}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) .settings-toggle{background:#111A2E!important;color:#F8FAFC!important;border-color:#64748B!important}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) .bottom-nav{background:#111A2E!important;border-color:#334155!important}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) .bottom-nav :is(a,summary){color:#E2E8F0}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) :is(tbody tr,tfoot tr,thead tr,.empty-state,.note.empty-state){background:#111A2E;color:#F8FAFC}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) :is(input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]),select,textarea){background:#0F172A!important;color:#F8FAFC!important;border-color:#64748B!important}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) :is(nav[aria-label="Sales period"],.sales-staff-filter,.seg-tabs) a{background:#111A2E;color:#5EEAD4}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) :is(nav[aria-label="Sales period"],.sales-staff-filter,.seg-tabs) a[aria-current]{background:#0F2E2C;color:#F8FAFC}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) pre.receipt{color:#0F172A}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) details > summary{color:inherit}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) main :is([class*="card"],[class*="board"],[class*="-row"],fieldset,.section,form,.letter-head,table,td){background-color:#111A2E;border-color:#334155}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) main :is(thead th,thead tr,thead td){background-color:#0F2E2C;color:#5EEAD4}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) main :is(.button,.ui-btn,button[type=submit]):not(.ghost):not(.ui-btn-ghost):not(.secondary){background-color:#0F766E;color:#fff}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) .letter-brand{color:#5EEAD4}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) :is(nav.app-nav,.page-header,.settings-jump,.plan-card,.owner-card,.low-stock-alert,.staff-card,.sales-wrap,.table-wrap){background:#111A2E;color:#F8FAFC;border-color:#334155}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) main :is(ul.lines,ul.lines > li,.sale-list,.sale-list > li,li.line){background-color:#111A2E;color:#F8FAFC;border-color:#334155}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) main :is(th,thead th){background-color:#0F2E2C;color:#5EEAD4;border-color:#334155}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) :is(.button.ghost,button.ghost,a.button.ghost,.ui-btn-ghost){background-color:#0F172A;color:#5EEAD4;border-color:#5EEAD4}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) .dash-card.dash-low,html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) .low-stock-alert{background:#2A1E0B;border-color:#92400E}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) .app-nav a{color:#E2E8F0}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) .app-nav a[aria-current]{color:#5EEAD4}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) .settings-jump a{color:#5EEAD4}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) .note.empty-state{background:#111A2E;color:#CBD5E1}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) :is(details.credit-capture,.low-stock-alert li,aside li){background-color:#111A2E;color:#F8FAFC;border-color:#334155}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) article.receipt{background:#fff;color:#0F172A}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) article.receipt :is(h1,h2,h3,h4,p,dt,dd,span,strong,td,th,li,small,div,label){color:#0F172A;background-color:transparent}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) article.receipt :is(.kicker,.receipt-no,[class*="receipt-num"]){color:#0F766E}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) article.receipt :is(dt,.note,small){color:#475569}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) :is(.seat-prompt,.activity-tabs,.ind-tabs,.ind-photo){background:#111A2E;color:#F8FAFC;border-color:#334155}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) .seat-prompt.seat-full{background:#2A0F12;border-color:#B91C1C}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) .seat-bar{background:#334155}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) .app-nav :is(.an-open,.wrap,#app-nav-list){background:#111A2E;color:#E2E8F0;border-color:#334155}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) .app-nav a.is-active{background:#0F2E2C;color:#5EEAD4}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) .site-header :is(.ui-btn-secondary,.button.ghost){background-color:transparent;color:#F8FAFC;border-color:#94A3B8}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) :is(.ind-plate .kpi-num,.ind-plate .kpi-num *){color:#5EEAD4}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) .ind-today td{background:#0F2E2C}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) .kpi-num{color:#5EEAD4}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) .kpi-tile{background:#111A2E;color:#F8FAFC;border-color:#334155}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) .kpi-tile.kpi-amber{background:#2A1E0B;border-color:#92400E}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) .kpi-tile.kpi-amber .kpi-num{color:#FBBF24}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) .ind-thumb-empty{background:#0F172A;border-color:#334155;color:#94A3B8}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) :is(.kpi-label,.owes-contact,.kpi-sub,.muted){color:#CBD5E1}
html[data-theme="night"]:not([data-contrast="high"]) body.shop-book:not(.public) :is(.dash-low,.low-stock-alert,.kpi-amber) :is(.dash-figure,.kpi-num){color:#FBBF24}
/* W&B a11y-targets 2026-10-15 (public demo shell only; append-only) */
/* (a) skip link: 44px tall (was 40px), every shell that uses .skip */
.skip{display:inline-flex;align-items:center;min-height:44px;box-sizing:border-box}
/* standalone text links (the only thing in their line) get a 44px-tall target; links inside sentences are left alone */
body.public.shop-book p.note > a[href="/"]:only-child, body.owner-desk p.note > a[href="/demo"]:only-child, body.public-help .owner-card > p > a[href="/login"]:only-child{display:inline-flex;align-items:center;min-height:44px}
/* (c) phone card lists: the desktop table min-widths (28rem / 40rem) made the stacked cards 448px wide, so amounts and statuses
   were clipped at the right on every phone and /demo/owes scrolled sideways at 390 x 200% zoom. Cards now fit the screen. */
@media (max-width: 767px) {
  body.public.shop-book table[data-cards]{min-width:0!important;max-width:100%}
  body.public.shop-book table[data-cards] :is(td,tbody th){min-width:0!important;max-width:100%;box-sizing:border-box;flex-wrap:wrap}
  body.public.shop-book table[data-cards] td :is(input,select,textarea,.button,button){max-width:100%;box-sizing:border-box}
  body.public.shop-book table[data-cards] td.owes-amount,body.public.shop-book table[data-cards] td.owes-status{white-space:normal}
}
/* (b)+(c) very narrow screens (390 at 200% zoom = 195px): the header wraps instead of pushing Settings off screen, and the
   six bottom-nav tabs sit in two rows of three so each stays at least 44px wide; the page keeps room above the taller bar. */
@media (max-width: 299px) {
  body.public.shop-book .site-header .bar{flex-wrap:wrap;row-gap:8px}
  body.public.shop-book .bottom-nav{display:grid;grid-template-columns:repeat(3,minmax(44px,1fr));gap:4px}
  body.public.shop-book .bottom-nav>a,body.public.shop-book .bottom-nav .bn-more>summary{min-height:44px;min-width:44px}
  body.public.shop-book{padding-bottom:calc(8.5rem + env(safe-area-inset-bottom,0px))}
  body.public.shop-book .site-footer{padding-bottom:calc(8.75rem + env(safe-area-inset-bottom,0px))}
}
/* 2026-10-15: the owner desk keeps its light page in night mode, so the legacy colour names keep their day values there
   (the night block above turned --ink/--muted light, giving light headings and notes on white). */
html[data-theme="night"]:not([data-contrast="high"]) body.owner-desk{--paper:var(--c-paper);--paper-2:var(--c-surface);--ink:var(--c-ink);--muted:var(--c-muted);--line:var(--c-line);--navy:var(--c-secondary);--navy-deep:var(--c-secondary);--teal:var(--c-primary);--teal-bright:var(--c-primary);--soft:var(--c-primary-soft)}

/* Small fixes 2026-10-15 (item 1 deploy): owner-desk tap targets. Name links in owner tables and stand-alone links
   (the only thing in their paragraph or list item) get a 44px target without changing how the text looks. */
body.owner-desk main :is(td, tbody th) a:not(.button):not(.mx-btn):not(.mx-ovchip),
body.owner-desk main :is(p, li, dd, div.queue-card, span) > a:only-child:not(.button):not([class*="mx-"]) { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; box-sizing: border-box; }
body.owner-desk main a.button, body.owner-desk main .button { min-width: 44px; overflow-wrap: anywhere; }
body.owner-desk main li.alert > a:last-of-type:not(.button) { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 .35rem; }

/* ==== W&B owner-desk-components-2026-10-15 FINAL (verbatim) ==== */
/* Owner desk shared components — W&B design 2026-10-15. Scope: .od (wrap any owner page panel in <div class="od">). Append-only.
   Ledger: teal #0F766E/#134E4A, amber #F59E0B (fill/marker only, never text), ink #0F172A, slate #475569, line #E2E8F0, paper #F8FAFC,
   field borders #64748B. Inter Tight headings, Inter body, JetBrains Mono ids/times/numbers. 8px scale (4px only inside pills).
   Themes: day (default) · warm · night (the owner desk stays light in night today: night = day values) · high contrast.
   Motion: colour/opacity transitions <=150ms for feedback only; none under prefers-reduced-motion or html[data-motion=reduce]. */
.od,.od-nav,.od-drawer{--od-surface:#fff;--od-paper:#F8FAFC;--od-paper-2:#F1F5F9;--od-ink:#0F172A;--od-muted:#475569;--od-line:#E2E8F0;--od-line-2:#CBD5E1;--od-field:#64748B;
  --od-teal:#0F766E;--od-teal-deep:#134E4A;--od-teal-soft:#E6F4F2;--od-teal-line:#0F766E;--od-amber:#F59E0B;--od-amber-ink:#0F172A;--od-amber-line:#B45309;
  --od-red:#B91C1C;--od-red-soft:#FEE2E2;--od-red-ink:#7F1D1D;--od-slate:#475569;--od-info:#0369A1;--od-info-soft:#E0F2FE;--od-on-solid:#fff;
  --od-focus:#0F172A;--od-hover:#F1F5F9;--od-head:#F8FAFC;--od-shadow:0 1px 2px rgba(15,23,42,.06);--od-shadow-3:0 16px 40px rgba(15,23,42,.18);--od-scrim:rgba(15,23,42,.5);
  --od-r:10px;--od-r-lg:12px;color:var(--od-ink);font-family:"Inter",system-ui,sans-serif}
html[data-theme="warm"] :is(.od,.od-nav,.od-drawer){--od-surface:#FFFDF9;--od-paper:#FFF8EE;--od-paper-2:#FBF1E3;--od-ink:#1C1917;--od-muted:#57534E;--od-line:#E7D9C6;--od-line-2:#D6C4AC;--od-field:#78716C;--od-teal-soft:#E6F2EE;--od-hover:#FBF1E3;--od-head:#FFF8EE}
html[data-contrast="high"] :is(.od,.od-nav,.od-drawer){--od-surface:#fff;--od-paper:#fff;--od-paper-2:#fff;--od-ink:#000;--od-muted:#111;--od-line:#000;--od-line-2:#000;--od-field:#000;--od-teal:#0022AA;--od-teal-deep:#000;--od-teal-soft:#fff;--od-teal-line:#000;--od-slate:#000;--od-red:#8B0000;--od-red-soft:#fff;--od-red-ink:#000;--od-info:#0022AA;--od-info-soft:#fff;--od-hover:#FFF4A8;--od-head:#fff;--od-shadow:none}
.od .sr-only,.od-nav .sr-only,.od-drawer .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
:is(.od,.od-nav,.od-drawer) .od-ico{flex:0 0 auto;width:16px;height:16px}
:is(.od,.od-drawer) .od-num,:is(.od,.od-drawer) .od-mono{font-family:"JetBrains Mono",ui-monospace,monospace;font-variant-numeric:tabular-nums}
:is(.od,.od-drawer) .od-mono{font-size:.875rem}
:is(.od,.od-drawer) :focus-visible{outline:3px solid var(--od-focus);outline-offset:2px}
/* Card + head */
.od .od-card{background:var(--od-surface);border:1px solid var(--od-line);border-radius:var(--od-r-lg);box-shadow:var(--od-shadow);padding:24px;margin:0 0 24px;-webkit-backdrop-filter:none;backdrop-filter:none}
.od .od-card-head{display:flex;flex-wrap:wrap;gap:16px;align-items:flex-start;justify-content:space-between;margin:0 0 16px}
.od .od-card-head h2,.od .od-h2{margin:0;font:700 1.25rem/1.3 "Inter Tight","Inter",sans-serif;color:var(--od-ink);letter-spacing:-.01em}
.od .od-sub{margin:8px 0 0;max-width:70ch;color:var(--od-muted);font-size:.9375rem;line-height:1.5}
/* Stat cards */
.od .od-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(13rem,1fr));gap:16px;margin:0 0 24px}
.od .od-stat{display:block;min-width:0;padding:16px;border:1px solid var(--od-line);border-radius:var(--od-r);background:var(--od-surface);box-shadow:var(--od-shadow);color:inherit;text-decoration:none}
.od a.od-stat{transition:border-color .15s}.od a.od-stat:hover{border-color:var(--od-field)}
.od .od-stat-label{display:flex;align-items:center;gap:8px;margin:0;color:var(--od-muted);font:600 .8125rem/1.3 "Inter",sans-serif}
.od .od-stat-value{margin:8px 0 0;font:700 1.75rem/1.1 "Inter Tight","Inter",sans-serif;color:var(--od-ink);overflow-wrap:anywhere}
.od .od-stat-value .od-num{font-weight:700}
.od .od-stat-hint{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:8px 0 0;color:var(--od-muted);font-size:.8125rem;line-height:1.4}
.od .od-stat-amber{border-top:3px solid var(--od-amber)}.od .od-stat-red{border-top:3px solid var(--od-red)}.od .od-stat-teal{border-top:3px solid var(--od-teal)}
/* Pills (icon + label) and count badges */
:is(.od,.od-drawer,.od-nav) .od-pill{display:inline-flex;align-items:center;gap:6px;min-height:24px;padding:2px 10px 2px 8px;border-radius:999px;border:1px solid transparent;font:600 .8125rem/1.2 "Inter",sans-serif;white-space:nowrap;vertical-align:middle}
:is(.od,.od-drawer,.od-nav) .od-pill .od-ico{width:14px;height:14px}
:is(.od,.od-drawer,.od-nav) .od-pill-teal{background:var(--od-teal-soft);color:var(--od-teal-deep);border-color:var(--od-teal-line)}
:is(.od,.od-drawer,.od-nav) .od-pill-teal-solid{background:var(--od-teal);color:var(--od-on-solid);border-color:var(--od-teal)}
:is(.od,.od-drawer,.od-nav) .od-pill-amber{background:var(--od-amber);color:var(--od-amber-ink);border-color:var(--od-amber-line)}
:is(.od,.od-drawer,.od-nav) .od-pill-red{background:var(--od-red);color:#fff;border-color:var(--od-red)}
:is(.od,.od-drawer,.od-nav) .od-pill-slate{background:var(--od-slate);color:var(--od-on-solid);border-color:var(--od-slate)}
:is(.od,.od-drawer,.od-nav) .od-pill-ink{background:var(--od-ink);color:var(--od-surface);border-color:var(--od-ink)}
:is(.od,.od-drawer,.od-nav) .od-pill-neutral{background:var(--od-paper-2);color:var(--od-muted);border-color:var(--od-line-2)}
:is(.od,.od-drawer,.od-nav) .od-pill-info{background:var(--od-info-soft);color:var(--od-ink);border-color:var(--od-info)}
html[data-contrast="high"] :is(.od,.od-drawer,.od-nav) .od-pill{background:#fff;color:#000;border:2px solid #000}
html[data-contrast="high"] :is(.od,.od-drawer,.od-nav) :is(.od-pill-teal-solid,.od-pill-red,.od-pill-slate,.od-pill-ink){background:#000;color:#fff}
html[data-contrast="high"] :is(.od,.od-drawer,.od-nav) .od-pill-amber{background:#FFF4A8;color:#000}
/* Buttons: reuse the app's .button (solid teal = the ONE primary per view) and .button.ghost; add danger-ghost + icon buttons */
.od.od .button.button,.od-drawer.od-drawer .button.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 16px;border-radius:8px;font:600 .9375rem/1.2 "Inter",sans-serif;white-space:nowrap}
.od.od .button.button.ghost,.od-drawer.od-drawer .button.button.ghost{background:var(--od-surface);color:var(--od-ink);border:1px solid var(--od-field)}
.od.od .button.button.ghost:hover,.od-drawer.od-drawer .button.button.ghost:hover{background:var(--od-hover)}
.od.od .button.button.od-danger,.od-drawer.od-drawer .button.button.od-danger{background:var(--od-surface);color:var(--od-red);border:1px solid var(--od-red)}
.od.od .button.button.od-danger-solid{background:var(--od-red);color:#fff;border:1px solid var(--od-red)}
html[data-contrast="high"] .od.od .button.button.ghost,html[data-contrast="high"] .od.od .button.button.od-danger{background:#fff;color:#000;border:2px solid #000}
.od .od-link{display:inline-flex;align-items:center;gap:4px;min-height:44px;padding:0 4px;border:0;background:none;color:var(--od-teal);font:inherit;font-weight:600;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
html[data-contrast="high"] .od .od-link{color:#0022AA}
/* Fields + filter bar */
.od .od-filters{display:flex;flex-wrap:wrap;gap:16px;align-items:flex-end;margin:0 0 16px;padding:16px;border:1px solid var(--od-line);border-radius:var(--od-r);background:var(--od-paper)}
.od .od-field{display:flex;flex-direction:column;gap:8px;margin:0;min-width:0;font:600 .875rem/1.3 "Inter",sans-serif;color:var(--od-ink)}
.od .od-field-grow{flex:1 1 16rem}
.od .od-field input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=file]):not([type=submit]):not([type=button]),.od.od .od-field select,.od.od .od-field textarea,
.od-drawer .od-field input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=file]):not([type=submit]):not([type=button]),.od-drawer.od-drawer .od-field select,.od-drawer.od-drawer .od-field textarea{min-height:44px;padding:8px 12px;border:1px solid var(--od-field);border-radius:8px;background:var(--od-surface);color:var(--od-ink);font:400 1rem/1.4 "Inter",sans-serif;width:100%;box-sizing:border-box}
.od .od-req,.od .od-opt{font-weight:400;color:var(--od-muted)}
.od .od-hint{margin:0;color:var(--od-muted);font-size:.875rem;line-height:1.5}
/* Segmented filter (status tabs with counts) — links or radios */
.od .od-seg-tabs{display:flex;flex-wrap:wrap;gap:4px;margin:0;min-width:0;max-width:100%;box-sizing:border-box;padding:4px;border:1px solid var(--od-field);border-radius:var(--od-r);background:var(--od-surface);list-style:none}
.od .od-seg-tabs a,.od .od-seg-tabs label{position:relative;display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 12px;border-radius:8px;color:var(--od-muted);font:600 .875rem/1.2 "Inter",sans-serif;text-decoration:none;cursor:pointer}
.od .od-seg-tabs input{position:absolute;inset:0;width:100%;height:100%;opacity:0;margin:0;cursor:pointer}
.od .od-seg-tabs a:hover,.od .od-seg-tabs label:hover{background:var(--od-hover);color:var(--od-ink)}
.od .od-seg-tabs a[aria-current="true"],.od .od-seg-tabs label:has(input:checked){background:var(--od-teal-soft);color:var(--od-teal-deep);box-shadow:inset 0 0 0 1px var(--od-teal)}
html[data-contrast="high"] .od .od-seg-tabs a[aria-current="true"],html[data-contrast="high"] .od .od-seg-tabs label:has(input:checked){background:#000;color:#fff}
.od .od-seg-tabs label:has(input:focus-visible){outline:3px solid var(--od-focus);outline-offset:2px}
.od .od-count{display:inline-flex;align-items:center;justify-content:center;min-width:24px;height:20px;padding:0 6px;border-radius:999px;background:var(--od-paper-2);color:var(--od-ink);font:600 .75rem/1 "JetBrains Mono",monospace}
.od .od-chips{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:0 0 16px;padding:0;list-style:none}
.od .od-chip{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 12px;border-radius:999px;border:1px solid var(--od-teal-line);background:var(--od-teal-soft);color:var(--od-teal-deep);font:600 .8125rem/1 "Inter",sans-serif;text-decoration:none}
/* Table / list rows */
.od .od-table-wrap{overflow:auto;border:1px solid var(--od-line);border-radius:var(--od-r);background:var(--od-surface)}
.od .od-table{width:100%;border-collapse:separate;border-spacing:0;font-size:.9375rem}
.od .od-table th,.od .od-table td{padding:12px 16px;border-bottom:1px solid var(--od-line);text-align:left;vertical-align:middle;color:var(--od-ink)}
.od .od-table thead th{position:sticky;top:0;z-index:1;background:var(--od-head);color:var(--od-muted);font:600 .8125rem/1.3 "Inter",sans-serif;text-transform:none;letter-spacing:0;border-bottom-color:var(--od-line-2)}
.od .od-table tbody tr{transition:background-color .15s}.od .od-table tbody tr:hover{background:var(--od-hover)}
.od .od-table tbody tr:last-child>*{border-bottom:0}
.od .od-table .od-num-col{text-align:right}
/* Event row (activity) */
.od .od-events{margin:0;padding:0;list-style:none}
.od .od-event{display:grid;grid-template-columns:auto 1fr auto;gap:4px 16px;align-items:center}
.od .od-event-ico{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:8px;border:1px solid currentColor}
/* Empty, error, skeleton */
.od .od-empty{display:flex;flex-direction:column;align-items:center;gap:8px;margin:0;padding:40px 24px;border:1px dashed var(--od-line-2);border-radius:var(--od-r);text-align:center;color:var(--od-muted);background:var(--od-paper)}
.od .od-empty-ico{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:10px;background:var(--od-teal-soft);color:var(--od-teal-deep)}
.od .od-empty-ico .od-ico{width:20px;height:20px}
.od .od-empty-title{margin:0;font:700 1rem/1.3 "Inter Tight","Inter",sans-serif;color:var(--od-ink)}
.od .od-empty-body,.od .od-empty-action{margin:0;max-width:52ch}
.od .od-empty-err{border-style:solid;border-color:var(--od-red);background:var(--od-red-soft)}
.od .od-empty-err .od-empty-ico{background:var(--od-red);color:#fff}.od .od-empty-err .od-empty-title{color:var(--od-red-ink)}
html[data-contrast="high"] .od .od-empty-err .od-empty-ico{background:#000}
.od .od-skel-wrap{display:flex;flex-direction:column;gap:8px}
.od .od-skel-row{display:grid;grid-template-columns:3fr 1fr 1fr 1fr;gap:16px;align-items:center;min-height:48px;padding:0 16px;border:1px solid var(--od-line);border-radius:var(--od-r);background:var(--od-surface)}
.od .od-skel{display:block;height:12px;border-radius:6px;background:var(--od-paper-2);width:70%}
.od .od-skel[data-w="l"]{width:85%}.od .od-skel[data-w="s"]{width:45%}
/* Banners */
.od .od-banner{display:flex;align-items:center;gap:8px;margin:0 0 16px;padding:12px 16px;border-radius:var(--od-r);border:1px solid var(--od-teal-line);background:var(--od-teal-soft);color:var(--od-teal-deep);font-weight:600}
.od .od-banner-err{border-color:var(--od-red);background:var(--od-red-soft);color:var(--od-red-ink)}
/* Dialog (centred) */
.od .od-dialog{width:min(32rem,calc(100vw - 32px));max-height:calc(100vh - 32px);padding:0;border:1px solid var(--od-line-2);border-radius:var(--od-r-lg);background:var(--od-surface);color:var(--od-ink);box-shadow:var(--od-shadow-3)}
.od .od-dialog::backdrop{background:var(--od-scrim)}
.od .od-dialog-body{display:flex;flex-direction:column;gap:16px;padding:24px}
.od .od-dialog-title{margin:0;font:700 1.25rem/1.3 "Inter Tight","Inter",sans-serif;color:var(--od-ink)}
.od .od-dialog-sub{margin:-8px 0 0;color:var(--od-muted)}
.od .od-dialog-actions{display:flex;flex-wrap:wrap;gap:8px;padding-top:16px;border-top:1px solid var(--od-line)}
/* Side drawer (desktop) / full-screen sheet (phone) */
.od-drawer{position:fixed;inset:0 0 0 auto;z-index:1000;display:flex;flex-direction:column;width:min(28rem,100vw);max-width:100vw;background:var(--od-surface);border-left:1px solid var(--od-line-2);box-shadow:var(--od-shadow-3);transform:translateX(100%);visibility:hidden;transition:transform .2s,visibility 0s .2s}
.od-drawer.is-open{transform:none;visibility:visible;transition:transform .2s}
.od-drawer-scrim{position:fixed;inset:0;z-index:999;background:var(--od-scrim)}
.od-drawer-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:16px 16px 16px 24px;border-bottom:1px solid var(--od-line)}
.od-drawer-title{margin:0;font:700 1.125rem/1.3 "Inter Tight","Inter",sans-serif;color:var(--od-ink)}
.od-drawer-body{flex:1;overflow:auto;padding:24px}
.od-drawer .od-icon-btn{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border:1px solid var(--od-field);border-radius:8px;background:var(--od-surface);color:var(--od-ink);cursor:pointer}
@media (max-width:640px){.od-drawer{width:100vw;border-left:0}}
/* Pagination / load more */
.od .od-more{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:16px;margin:24px 0 0;color:var(--od-muted);font-size:.875rem}
/* Phone */
@media (max-width:640px){
  .od .od-card{padding:16px;margin-bottom:16px}
  .od .od-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:16px}
  .od .od-stat{padding:12px}.od .od-stat-value{font-size:1.375rem}
  .od .od-filters{padding:12px;gap:12px}.od .od-filters>*{flex:1 1 100%}
  .od .od-seg-tabs{flex-wrap:nowrap;overflow-x:auto}
  .od .od-seg-tabs a,.od .od-seg-tabs label{flex:0 0 auto}
  .od .od-skel-row{grid-template-columns:2fr 1fr}.od .od-skel-row .od-skel:nth-child(n+3){display:none}
}
@media (max-width:360px){
  .od .od-stats{grid-template-columns:minmax(0,1fr)}
  :is(.od,.od-drawer,.od-nav) .od-pill{white-space:normal}
  .od .od-card-head>*{min-width:0;flex:1 1 100%}
  .od .od-card{padding:12px}
}
@media (prefers-reduced-motion:reduce){:is(.od,.od-nav,.od-drawer),:is(.od,.od-nav,.od-drawer) *{transition:none!important;animation:none!important}}
html[data-motion="reduce"] :is(.od,.od-nav,.od-drawer),html[data-motion="reduce"] :is(.od,.od-nav,.od-drawer) *{transition:none!important;animation:none!important}
body.owner-desk>.od-drawer{position:fixed;z-index:1000}body.owner-desk>.od-drawer-scrim{position:fixed;z-index:999}
/* Alert / event rows (Today alerts, gallery): pill · text · action. Rows get a divider; the action never wraps. */
.od .od-events > .od-event{padding:12px 0;border-bottom:1px solid var(--od-line)}
.od .od-events > .od-event:last-child{border-bottom:0}
.od .od-event > .od-link{white-space:nowrap;justify-self:end}
.od .od-event .od-event-title{margin:0}
.od .od-event .od-sub{margin:2px 0 0}
@media (max-width:640px){.od .od-event{grid-template-columns:1fr}.od .od-event > .od-link{justify-self:start;white-space:normal}}
.od .od-event > .od-pill{justify-self:start}

/* ==== W&B owner-jobs-design-2026-10-15 FINAL (verbatim) ==== */
/* Owner desk · Jobs board — W&B 2026-10-15. Needs owner-desk-components.css (.od tokens + parts). Scoped .od-jobs-page. Append-only. 8px scale. */
.od-jobs-page .od-jobs{container-type:inline-size;margin:0;padding:0;list-style:none;border:1px solid var(--od-line);border-radius:var(--od-r);background:var(--od-surface);overflow:visible}
.od-jobs-page .od-job{display:grid;grid-template-columns:minmax(14rem,1fr) 7rem 10rem auto;gap:16px;align-items:center;padding:16px;border-bottom:1px solid var(--od-line);transition:background-color .15s}
.od-jobs-page .od-job:last-child{border-bottom:0}
.od-jobs-page .od-job:hover{background:var(--od-hover)}
.od-jobs-page .od-job[hidden]{display:none}
.od-jobs-page .od-job-title{margin:0;font:600 1rem/1.35 "Inter Tight","Inter",sans-serif}
.od-jobs-page .od-job-title a{display:inline-flex;align-items:center;min-height:44px;color:var(--od-ink);text-decoration:none}
.od-jobs-page .od-job-title a:hover{color:var(--od-teal);text-decoration:underline;text-underline-offset:3px}
.od-jobs-page .od-job-meta{display:flex;flex-wrap:wrap;gap:4px 16px;margin:0;color:var(--od-muted);font-size:.8125rem;line-height:1.5}
.od-jobs-page .od-job-meta .od-mono{font-size:.8125rem;color:var(--od-ink)}
.od-jobs-page .od-job-hired{display:inline-flex;align-items:center;gap:4px;color:var(--od-ink);font-weight:600}
.od-jobs-page .od-job-apps{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.od-jobs-page .od-job-count{display:inline-flex;align-items:baseline;gap:6px;min-height:44px;min-width:44px;padding:0 8px;margin-left:-8px;border-radius:8px;color:var(--od-ink);text-decoration:none;align-items:center}
.od-jobs-page .od-job-count:hover{background:var(--od-paper-2)}
.od-jobs-page .od-job-count .od-num{font-size:1.25rem;font-weight:700}
.od-jobs-page .od-job-count-l{color:var(--od-muted);font-size:.8125rem}
.od-jobs-page .od-job-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}
.od-jobs-page .od-inline{display:inline;margin:0}
.od-jobs-page .od-act{position:relative}
.od-jobs-page .od-act>summary{list-style:none;cursor:pointer}
.od-jobs-page .od-act>summary::-webkit-details-marker{display:none}
.od-jobs-page .od-act-panel{position:absolute;right:0;top:calc(100% + 8px);z-index:20;width:min(28rem,calc(100vw - 32px));border:1px solid var(--od-line-2);border-radius:var(--od-r-lg);background:var(--od-surface);box-shadow:var(--od-shadow-3)}
.od-jobs-page .od-menu{position:absolute;right:0;top:calc(100% + 8px);z-index:20;display:flex;flex-direction:column;min-width:12rem;padding:4px;border:1px solid var(--od-line-2);border-radius:var(--od-r);background:var(--od-surface);box-shadow:var(--od-shadow-3)}
.od-jobs-page .od-menu a{display:flex;align-items:center;min-height:44px;padding:0 12px;border-radius:6px;color:var(--od-ink);text-decoration:none;font-size:.9375rem}
.od-jobs-page .od-menu a:hover{background:var(--od-hover)}
/* Fill dialog: applicant picker (radio cards) */
.od .od-picks{display:flex;flex-direction:column;gap:8px;margin:0;padding:0;border:0;min-width:0}
.od .od-field-label{padding:0 0 8px;font:600 .875rem/1.3 "Inter",sans-serif;color:var(--od-ink)}
.od .od-pick{position:relative;display:flex;align-items:center;gap:12px;min-height:44px;padding:12px 16px;border:1px solid var(--od-field);border-radius:var(--od-r);background:var(--od-surface);cursor:pointer}
.od .od-pick input{width:20px;height:20px;margin:0;accent-color:var(--od-teal);flex:0 0 auto}
.od .od-pick:has(input:checked){border-color:var(--od-teal);box-shadow:inset 0 0 0 1px var(--od-teal);background:var(--od-teal-soft)}
html[data-contrast="high"] .od .od-pick:has(input:checked){background:#FFF4A8;border:2px solid #000}
.od .od-pick-body{display:flex;flex-direction:column;gap:4px;min-width:0}
.od .od-pick-name{font-weight:600;color:var(--od-ink)}
.od .od-pick-meta{display:flex;flex-wrap:wrap;gap:8px;align-items:center;color:var(--od-muted);font-size:.8125rem}
.od .od-dialog .od-dialog-body{max-height:calc(100vh - 64px);overflow:auto}
.od .od-dialog textarea{resize:vertical}
/* Narrow panel: actions drop under the row */
@container (max-width:64rem){.od-jobs-page .od-job{grid-template-columns:minmax(0,1fr) 7.5rem 11rem}.od-jobs-page .od-job-actions{grid-column:1/-1;justify-content:flex-start}}
/* Phone: one card per role */
@media (max-width:640px){
  .od-jobs-page .od-jobs{border:0;background:transparent}
  .od-jobs-page .od-job{grid-template-columns:1fr auto;gap:8px 12px;margin:0 0 8px;padding:12px 16px;border:1px solid var(--od-line);border-radius:var(--od-r);background:var(--od-surface)}
  .od-jobs-page .od-job:last-child{border-bottom:1px solid var(--od-line)}
  .od-jobs-page .od-job-main{grid-column:1/2}.od-jobs-page .od-job-status{grid-column:2/3;grid-row:1;align-self:start;padding-top:10px}
  .od-jobs-page .od-job-apps{grid-column:1/-1}
  .od-jobs-page .od-job-actions{grid-column:1/-1;justify-content:stretch;padding-top:8px;border-top:1px solid var(--od-line)}
  .od-jobs-page .od-job-actions>*{flex:1 1 auto}.od-jobs-page .od-job-actions .button{width:100%}
  .od-jobs-page .od-more-act{flex:0 0 auto}.od-jobs-page .od-more-l{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
  .od-jobs-page .od-act-panel{position:fixed;left:16px;right:16px;top:auto;bottom:16px;width:auto;max-height:80vh;overflow:auto}
  .od-jobs-page .od-card-head .button{width:100%}
}
.od-jobs-page .od-badge-new{display:inline-flex;align-items:center;gap:4px;min-height:24px;padding:2px 10px 2px 6px;border-radius:999px;background:var(--od-ink);color:var(--od-surface);font:600 .8125rem/1.2 "Inter",sans-serif}
.od-jobs-page .od-badge-new .od-ico{width:12px;height:12px;color:var(--od-amber)}
html[data-contrast="high"] .od-jobs-page .od-badge-new{background:#000;color:#fff}
.od.od .button.button.od-icon-only{width:44px;padding:0}
/* The existing job form (jobFormHtml) inside the new card: field borders at 3:1+ (#64748B), 44px fields. */
.od-jobs-page #new-job :is(input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]),select,textarea).od-x,
.od-jobs-page.od-jobs-page #new-job input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=file]):not([type=submit]):not([type=button]),.od-jobs-page.od-jobs-page.od-jobs-page #new-job select,.od-jobs-page.od-jobs-page.od-jobs-page #new-job textarea{border:1px solid var(--od-field);border-radius:8px;min-height:44px;background:var(--od-surface);color:var(--od-ink)}
/* Very narrow (320 and 200% zoom): everything in one column */
@media (max-width:360px){
  .od-jobs-page .od-job{grid-template-columns:minmax(0,1fr)}
  .od-jobs-page .od-job-status{grid-column:1;grid-row:auto;padding-top:0}
  .od-jobs-page .od-job-actions>*{flex:1 1 100%}
  .od-jobs-page .od-job-title a{overflow-wrap:anywhere}
}

/* Platform fix (2026-10-15): W&B empty states with [hidden] were still shown (display:flex won). */
:is(.od,.od-nav,.od-drawer) [hidden]{display:none!important}
/* Switches sub-nav inside the W&B od-sw view: active = teal underline (one primary per view); scrolls sideways on phone. */
.od-sw .mx-subnav{flex-wrap:nowrap;overflow-x:auto;width:auto}.od-sw .mx-subtab{white-space:nowrap}.od-sw .mx-subtab.is-active{background:transparent!important;color:#0F766E!important;box-shadow:inset 0 -3px 0 #0F766E}

/* ==== W&B owner-activity-design-2026-10-15 FINAL (verbatim) ==== */
/* Owner desk · Activity log — W&B 2026-10-15. Needs owner-desk-components.css. Scoped .od-activity (+ its #ev-drawer). Append-only. */
.od-activity .od-ev-filters .od-ev-custom{display:none}
.od-activity .od-ev-filters.is-custom .od-ev-custom{display:flex}
.od-activity .od-ev-filters:not(:has([data-period])) .od-ev-custom{display:flex}
.od-activity .od-ev-day{margin:0 0 24px}
.od-activity .od-ev-dayh{display:flex;align-items:center;gap:8px;position:sticky;top:0;z-index:2;margin:0;padding:8px 0;background:var(--od-surface);font:700 .875rem/1.3 "Inter Tight","Inter",sans-serif;color:var(--od-ink)}
.od-activity .od-events{border:1px solid var(--od-line);border-radius:var(--od-r);background:var(--od-surface);overflow:hidden}
.od-activity .od-ev{border-bottom:1px solid var(--od-line)}
.od-activity .od-ev:last-child{border-bottom:0}
.od-activity .od-ev-d>summary{list-style:none}
.od-activity .od-ev-d>summary::-webkit-details-marker{display:none}
.od-activity .od-ev-row{display:grid;grid-template-columns:32px minmax(0,1fr) auto 16px;gap:16px;align-items:center;min-height:56px;padding:8px 16px;cursor:pointer;transition:background-color .15s}
.od-activity .od-ev-row:hover,.od-activity .od-ev-row[aria-current="true"]{background:var(--od-hover)}
.od-activity .od-ev-row[aria-current="true"]{box-shadow:inset 3px 0 0 var(--od-teal)}
.od-activity .od-ev-ico{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:8px;border:1px solid currentColor}
.od-activity .od-tone-teal{color:var(--od-teal-deep);background:var(--od-teal-soft);border-color:var(--od-teal-line)}
.od-activity .od-tone-red{color:#fff;background:var(--od-red);border-color:var(--od-red)}
.od-activity .od-tone-neutral{color:var(--od-muted);background:var(--od-paper-2);border-color:var(--od-line-2)}
html[data-contrast="high"] .od-activity .od-ev-ico{background:#fff;color:#000;border:2px solid #000}
.od-activity .od-ev-main{display:flex;flex-direction:column;gap:2px;min-width:0}
.od-activity .od-ev-what{font-weight:600;color:var(--od-ink);overflow-wrap:anywhere}
.od-activity .od-ev-item{font-weight:400;color:var(--od-muted)}
.od-activity .od-ev-meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px;color:var(--od-muted);font-size:.8125rem}
.od-activity .od-ev-type::before{content:"";display:inline-block;width:4px;height:4px;margin:0 8px 2px 0;border-radius:50%;background:currentColor;vertical-align:middle}
.od-activity .od-ev-time{color:var(--od-ink);font-size:.8125rem}
.od-activity .od-ev-chev{color:var(--od-muted)}
.od-activity .od-ev-panel{padding:16px 16px 16px 64px;background:var(--od-paper);border-top:1px solid var(--od-line)}
/* Detail panel content (inline when no JS, inside the drawer with JS) */
:is(.od-activity,.od-drawer) .od-ev-h{margin:0 0 8px;font:700 1.125rem/1.3 "Inter Tight","Inter",sans-serif;color:var(--od-ink)}
:is(.od-activity,.od-drawer) .od-ev-pills{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 16px}
:is(.od-activity,.od-drawer) .od-dl{display:grid;gap:0;margin:0 0 16px;border:1px solid var(--od-line);border-radius:var(--od-r);background:var(--od-surface)}
:is(.od-activity,.od-drawer) .od-dl>div{display:grid;grid-template-columns:8rem minmax(0,1fr);gap:16px;padding:12px 16px;border-bottom:1px solid var(--od-line)}
:is(.od-activity,.od-drawer) .od-dl>div:last-child{border-bottom:0}
:is(.od-activity,.od-drawer) .od-dl dt{margin:0;color:var(--od-muted);font:600 .8125rem/1.5 "Inter",sans-serif}
:is(.od-activity,.od-drawer) .od-dl dd{display:flex;gap:8px;align-items:flex-start;margin:0;color:var(--od-ink);overflow-wrap:anywhere}
:is(.od-activity,.od-drawer) .od-dl dd .od-ico{margin-top:3px}
:is(.od-activity,.od-drawer) .od-dl-sub{display:block;margin-top:2px;color:var(--od-muted);font-size:.8125rem}
:is(.od-activity,.od-drawer) .od-dl a{color:var(--od-teal);font-weight:600}
.od-drawer .od-hint{margin:0;color:var(--od-muted);font-size:.875rem}
.od-drawer .od-mono{font-family:"JetBrains Mono",ui-monospace,monospace;font-size:.8125rem}
.od-drawer-foot{display:flex;justify-content:space-between;gap:8px;padding:16px 24px;border-top:1px solid var(--od-line)}
.od-drawer.od-drawer .button.button:disabled{opacity:.55;cursor:default}
.od-drawer[hidden]{display:none}
@media (max-width:640px){
  .od-activity .od-ev-row{grid-template-columns:32px minmax(0,1fr) auto;gap:12px;padding:8px 12px}
  .od-activity .od-ev-chev{display:none}
  .od-activity .od-ev-panel{padding:12px}
  :is(.od-activity,.od-drawer) .od-dl>div{grid-template-columns:minmax(0,1fr);gap:4px}
  .od-drawer{top:0;bottom:0;height:100%}
  .od-drawer-body{padding:16px}.od-drawer-foot{padding:12px 16px}
}
@media (max-width:360px){.od-activity .od-ev-row{grid-template-columns:minmax(0,1fr) auto}.od-activity .od-ev-ico{display:none}}
:is(.od-activity,.od-drawer) .od-dl.od-dl dd{display:block}
:is(.od-activity,.od-drawer) .od-dl dd>.od-ico{display:inline-block;vertical-align:-2px;margin:0 8px 0 0}
:is(.od-activity,.od-drawer) .od-dl dd>.od-ico+span{display:inline}
:is(.od-activity,.od-drawer) .od-dl dd>.od-ico+span .od-dl-sub{margin-left:24px}
.od-drawer .od-ev-panel{padding:0;background:none;border:0}
/* activity: phone filters in two columns (search + buttons full width) */
@media (max-width:640px){.od-activity .od-ev-filters{display:grid!important;grid-template-columns:1fr 1fr;gap:10px 10px}.od-activity .od-ev-filters > *{min-width:0}.od-activity .od-ev-filters > :first-child,.od-activity .od-ev-filters > :has(input[type=search]),.od-activity .od-ev-filters > :has(input[name=q]){grid-column:1/-1}.od-activity .od-ev-filters select{width:100%!important;min-width:0}}
/* activity: the page h1 already says "Activity log"; keep the card heading for screen readers only */
body.owner-desk .od-activity .od-card-head #act-title{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
/* ---- Per-business Switches & AI tab (src/bizsw.js), Ledger, matches the plan matrix ---- */
.bsw{display:grid;gap:16px;min-width:0}
.bsw .bsw-head h2{margin:0}
.bsw .bsw-lead{margin:0;max-width:62ch}
.bsw .bsw-biz{display:grid;gap:10px}
.bsw .bsw-biz-top{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.bsw .bsw-avatar{flex:none;display:inline-grid;place-items:center;width:44px;height:44px;border-radius:12px;background:#E6F4F1;color:#0F766E;font:700 1.15rem/1 "Inter Tight",Inter,sans-serif}
.bsw .bsw-biz-id{flex:1 1 220px;min-width:0}
.bsw .bsw-biz-name{margin:0;font:700 1.35rem/1.2 "Inter Tight",Inter,sans-serif;overflow-wrap:anywhere}
.bsw .bsw-biz-meta,.bsw .bsw-bc-p{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0 0}
.bsw .bsw-biz-links{display:flex;gap:8px;flex-wrap:wrap}
.bsw .bsw-biz-links .button{display:inline-flex;align-items:center;gap:6px;min-height:44px}
.bsw .bsw-tools{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.bsw .bsw-search{position:relative;flex:1 1 240px;display:block}
.bsw .bsw-search .od-ico{position:absolute;left:12px;top:50%;transform:translateY(-50%);color:#64748B;pointer-events:none}
.bsw .bsw-search input{width:100%;min-height:44px;padding:0 12px 0 38px!important;border:1px solid #64748B;border-radius:10px;font:inherit;box-sizing:border-box;background:#fff}
.bsw .bsw-filter select{min-height:44px;border:1px solid #64748B;border-radius:10px;padding:0 34px 0 12px;font:inherit;background-color:#fff;max-width:100%}
.bsw .bsw-resetall{display:inline-flex;align-items:center;gap:6px;min-height:44px}
.bsw .bsw-group{padding:0;overflow:hidden}
.bsw .bsw-gh{margin:0}
.bsw .bsw-gtog{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:10px;width:100%;min-height:52px;padding:10px 16px;cursor:pointer;font:600 1rem/1.2 "Inter Tight",Inter,sans-serif;color:#0F172A;flex-wrap:wrap}
.bsw .bsw-gtog:hover{background:#F8FAFC}
.bsw .bsw-gtog:focus-visible{outline:2px solid #0F172A;outline-offset:-2px}
.bsw .bsw-chev{transition:transform .15s ease;transform:rotate(90deg)}
.bsw .bsw-gtog[aria-expanded=false] .bsw-chev{transform:none}
.bsw .bsw-gcount{font:500 .82rem/1 Inter,sans-serif;color:#64748B;margin-right:auto}
.bsw .bsw-rows{list-style:none;margin:0;padding:0;border-top:1px solid #E2E8F0}
.bsw .bsw-row{display:flex;gap:14px;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid #F1F5F9;transition:background .15s ease}
.bsw .bsw-row:last-child{border-bottom:0}
.bsw .bsw-row:hover{background:#F8FAFC}
.bsw .bsw-row.is-override{box-shadow:inset 3px 0 0 #475569}
.bsw .bsw-row.is-staged{background:#F0FDFA;box-shadow:inset 3px 0 0 #0F766E}
.bsw .bsw-row.bsw-k-soon{background:repeating-linear-gradient(135deg,#F8FAFC 0 8px,#F1F5F9 8px 16px)}.bsw .bsw-row.bsw-k-soon .bsw-name{color:#475569}.bsw .bsw-row.bsw-k-soon .bsw-desc,.bsw .bsw-row.bsw-k-soon .bsw-lock{color:#475569}
.bsw .bsw-main{display:grid;gap:3px;min-width:0;flex:1 1 auto}
.bsw .bsw-name{font-weight:600;color:#0F172A;overflow-wrap:anywhere}
.bsw .bsw-desc{font-size:.88rem;color:#475569}
.bsw .bsw-state{display:flex;gap:6px;flex-wrap:wrap;margin-top:3px}
.bsw .bsw-note{display:inline-flex;gap:6px;align-items:center;font-size:.82rem;color:#475569}
.bsw .bsw-note-red{color:#B91C1C}
.bsw .bsw-act{display:flex;flex-direction:column;align-items:flex-end;gap:6px;flex:none}
.bsw .bsw-tog{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;gap:8px;min-height:44px;min-width:44px;padding:0 6px;cursor:pointer;border-radius:10px}
.bsw .bsw-tog:focus-visible,.bsw .bsw-reset:focus-visible{outline:2px solid #0F172A;outline-offset:2px}
.bsw .bsw-track{position:relative;width:40px;height:24px;border-radius:999px;background:#CBD5E1;transition:background .15s ease}
.bsw .bsw-knob{position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(15,23,42,.25);transition:transform .15s ease}
.bsw .bsw-tog[aria-checked=true] .bsw-track{background:#0F766E}
.bsw .bsw-tog[aria-checked=true] .bsw-knob{transform:translateX(16px)}
.bsw .bsw-tl{font:600 .85rem/1 Inter,sans-serif;color:#334155;min-width:24px}
.bsw .bsw-reset{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 10px;border-radius:10px;font:600 .82rem/1 Inter,sans-serif;color:#0F172A;border:1px solid #64748B;cursor:pointer}
.bsw .bsw-reset:hover{background:#F1F5F9}
.bsw .bsw-reset.is-staged{background:#0F172A;color:#fff;border-color:#0F172A}
.bsw .bsw-lock{display:inline-flex;align-items:center;gap:6px;font-size:.82rem;color:#64748B;min-height:44px}
.bsw .bsw-bar{position:sticky;bottom:12px;z-index:5;display:flex;gap:10px;align-items:center;justify-content:flex-end;flex-wrap:wrap;padding:10px 14px;border-radius:14px;background:#0F172A;color:#fff;box-shadow:0 10px 30px rgba(15,23,42,.25)}
.bsw .bsw-bar[hidden]{display:none!important}
.bsw .bsw-bar-n{margin-right:auto}
.bsw .bsw-bar .button.ghost{color:#fff;border-color:rgba(255,255,255,.4);background:transparent}
.bsw .bsw-bar .button{min-height:44px}
.bsw .bsw-none[hidden],.bsw .bsw-group[hidden],.bsw .bsw-row[hidden],.bsw .bsw-bc[hidden],.bsw .bsw-rows[hidden]{display:none!important}
.bsw .bsw-toast{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:10px 14px;border-radius:12px;background:#ECFDF5;border:1px solid #A7F3D0;color:#065F46}
.bsw .bsw-toast form{margin-left:auto}
.bsw .bsw-history h3{margin:0 0 8px}
.bsw .bsw-hist{list-style:none;margin:0;padding:0;display:grid}
.bsw .bsw-hist-i{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1.4fr) minmax(0,1.4fr) auto;gap:10px;padding:10px 0;border-bottom:1px solid #F1F5F9;font-size:.9rem;align-items:baseline}
.bsw .bsw-hist-w{font-weight:600}.bsw .bsw-hist-r{color:#64748B;overflow-wrap:anywhere}
.bsw .bsw-undo{margin-top:10px}
.bsw .bsw-blist{list-style:none;margin:12px 0 0;padding:0;display:grid;gap:8px}
.bsw .bsw-bc-a{display:flex;align-items:center;gap:12px;padding:10px 12px;min-height:56px;border:1px solid #E2E8F0;border-radius:12px;text-decoration:none;color:inherit;transition:border-color .15s ease,background .15s ease}
.bsw .bsw-bc-a:hover{border-color:#0F766E;background:#F8FAFC}
.bsw .bsw-bc-a:focus-visible{outline:2px solid #0F172A;outline-offset:2px}
.bsw .bsw-bc-m{flex:1;min-width:0;display:grid}
.bsw .bsw-bc-n{font-size:.85rem;color:#475569;white-space:nowrap}
.bsw .bsw-review{display:grid;gap:14px}
.bsw .bsw-review h2{margin:0}
.bsw .bsw-rvlist{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.bsw .bsw-rv{display:flex;gap:14px;flex-wrap:wrap;justify-content:space-between;align-items:flex-end;padding:12px 14px;border:1px solid #E2E8F0;border-radius:12px}
.bsw .bsw-rv-main{display:grid;gap:6px;min-width:0}
.bsw .bsw-rv-ft{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.bsw .bsw-rv-eff{font-size:.88rem;color:#475569}
.bsw .bsw-until input,.bsw .bsw-review .od-field input{min-height:44px;box-sizing:border-box;max-width:100%}
.bsw .bsw-rv-actions{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap}
/* Design FINAL 2026-10-15 (owner-switches-ai-tab-design): override facts, ends-soon/expired, Smart AI facts, 320px + 200% zoom */
.bsw .bsw-biz-slug{display:flex;flex-wrap:wrap;gap:6px 14px;align-items:center;margin:8px 0 0;font-size:.85rem;color:#475569}
.bsw .bsw-biz-slug span{display:inline-flex;gap:6px;align-items:center;overflow-wrap:anywhere;min-width:0}
.bsw .bsw-metas{display:grid;gap:4px;margin-top:4px}
.bsw .bsw-meta{display:flex;flex-wrap:wrap;gap:6px;align-items:center;font-size:.84rem;line-height:1.35;color:#475569;min-width:0}
.bsw .bsw-meta>span{min-width:0;overflow-wrap:anywhere}
.bsw .bsw-why{color:#0F172A}
.bsw .bsw-hist-by{color:#475569}
.bsw .bsw-gbody[hidden]{display:none!important}
.bsw .bsw-gnote{margin:0;padding:8px 16px;border-top:1px solid #E2E8F0;font-size:.84rem;color:#475569}
.bsw .bsw-ai{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(15rem,100%),1fr));gap:10px;margin:0;padding:12px 16px 16px;border-top:1px solid #E2E8F0}
.bsw .bsw-ai>div{display:grid;gap:4px;align-content:start;padding:10px 12px;border:1px solid #E2E8F0;border-radius:10px;min-width:0}
.bsw .bsw-ai dt{font:600 .78rem/1.2 Inter,sans-serif;letter-spacing:.02em;text-transform:uppercase;color:#475569}
.bsw .bsw-ai dd{margin:0;display:grid;gap:4px;justify-items:start;color:#0F172A;overflow-wrap:anywhere}
.bsw .bsw-ai dd>span:not(.od-pill){font-size:.84rem;color:#475569}
.bsw .bsw-reset{text-align:left}
.bsw #bsw-q,.bsw #bsw-f,.bsw #bsw-bq{border-color:#64748B}
.bsw>*{min-width:0}
.bsw .bsw-biz{grid-template-columns:minmax(0,1fr)}.bsw .bsw-biz-slug .od-mono{white-space:normal;word-break:break-all}
.bsw .mx-subnav{flex-wrap:nowrap;overflow-x:auto;width:auto}.bsw .mx-subtab{white-space:nowrap;flex:0 0 auto}
@media (max-width:560px){
  .bsw .bsw-row{flex-wrap:wrap;align-items:flex-start}
  .bsw .bsw-act{flex-direction:row;flex-wrap:wrap;align-items:center;width:100%;justify-content:flex-start}
  .bsw .bsw-hist-i{grid-template-columns:minmax(0,1fr)}
  .bsw .bsw-tools>*{flex:1 1 100%}
  .bsw .bsw-biz-links{width:100%}
}
@media (max-width:360px){
  .bsw .od-stats{grid-template-columns:minmax(0,1fr)!important}
  .bsw .bsw-biz-links .button,.bsw .bsw-bar .button{flex:1 1 100%;justify-content:center;white-space:normal}
  .bsw .bsw-row,.bsw .bsw-gtog{padding-left:12px;padding-right:12px}
}
@media (prefers-reduced-motion:reduce){.bsw .bsw-chev,.bsw .bsw-row,.bsw .bsw-knob,.bsw .bsw-track{transition:none}}

.bsw .bsw-rv-actions .button{min-height:44px;display:inline-flex;align-items:center}
@media (max-width:640px){.bsw .bsw-row{flex-wrap:wrap}.bsw .bsw-act{flex-direction:row;width:100%;justify-content:space-between}.bsw .bsw-hist-i{grid-template-columns:1fr;gap:2px}.bsw .bsw-bar{bottom:8px}.bsw .bsw-bc-n{display:none}}
@media (prefers-reduced-motion:reduce){.bsw *{transition:none!important}}
body.has-page-title .bsw > .bsw-head{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.bsw .bsw-bar .button.button.ghost{color:#fff!important;border-color:rgba(255,255,255,.45)!important;background:transparent!important}
.bsw .bsw-bar .button.button.ghost:hover{background:rgba(255,255,255,.08)!important}
body:has(#bsw-bar:not([hidden])) #back-top{display:none!important}
@media (max-width:640px){.bsw .bsw-row{flex-wrap:nowrap;align-items:flex-start}.bsw .bsw-act{flex-direction:column;width:auto;align-items:flex-end}.bsw .bsw-tl{display:none}.bsw .bsw-bar{justify-content:space-between}.bsw .bsw-bar-n{flex:1 0 100%}.bsw .bsw-bar .button{flex:1}}
.bsw .mx-subtab.is-active{background:transparent!important;color:#0F766E!important;box-shadow:inset 0 -3px 0 #0F766E}

/* Shelf tick box: Cash / Debit pair (bug fix 2026-10-16: the tick used to post no payment and got a 400) */
.sold-form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem; }
.sold-pay { display: inline-flex; gap: 0.35rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.sold-pay-opt { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 44px; padding: 0 0.8rem; border: 1px solid var(--border-strong, var(--line)); border-radius: 999px; font-weight: 600; cursor: pointer; background: var(--surface, #fff); color: var(--ink); }
.sold-pay-opt input { accent-color: var(--teal); width: 1rem; height: 1rem; margin: 0; }
.sold-pay-opt:has(input:checked) { border-color: var(--teal); background: var(--soft, #f0faf8); color: var(--ink); }
.sold-pay-opt:has(input:focus-visible) { outline: 2px solid var(--teal); outline-offset: 2px; }
.sold-form .sold-label { min-height: 44px; }

/* Receipt backend extras on the sale forms (flags RC_DISCOUNT / RC_MULTI / RC_PAID; demo + sample books only) */
.rc-extra{color:#0F172A;margin:.5rem 0;border:1px solid #CFE3DF;border-radius:12px;background:#F7FBFA}
.rc-extra-sum{min-height:44px;display:flex;align-items:center;gap:.5rem;padding:0 .9rem;cursor:pointer;font-weight:600;color:#0F766E;list-style:none}
.rc-extra-sum::-webkit-details-marker{display:none}
.rc-extra-sum::before{content:"+";display:inline-grid;place-items:center;width:22px;height:22px;border-radius:999px;background:#0F766E;color:#fff;font-weight:700;line-height:1}
.rc-extra[open] .rc-extra-sum::before{content:"–"}
.rc-extra-sum:focus-visible{outline:3px solid #0f172a;outline-offset:2px;border-radius:12px}
.rc-extra-body{display:grid;gap:.35rem;padding:0 .9rem .9rem}
.rc-extra-body input[inputmode=numeric]{min-height:44px;max-width:12rem;font-family:"JetBrains Mono",ui-monospace,monospace}
.rc-extra-items{border:0;margin:.35rem 0 0;padding:0;display:grid;gap:.25rem}
.rc-extra-items legend{font-weight:600;padding:0;margin-bottom:.25rem}
.rc-extra-item{display:flex;align-items:center;gap:.6rem;min-height:44px;padding:0 .6rem;border:1px solid #DDE5E3;border-radius:10px;background:#fff}
.rc-extra-item input{width:20px;height:20px;accent-color:#0F766E}
.rc-extra-price{margin-left:auto;white-space:nowrap;flex:0 0 auto;font-family:"JetBrains Mono",ui-monospace,monospace;color:#334155}

/* —— Internal desks (Accounting / Sales / Support / Employee) —— */
/* Scoped to .od.od-desk (the desk shell) so the owner desk's .od components are unchanged. */

.od.od-desk .od-mono,.od code.od-mono,.od.od-desk .od-form code{overflow-wrap:anywhere;word-break:break-word;max-width:100%;display:inline-block}
.od.od-desk .od-filters .od-field input,.od.od-desk .od-filters .od-field select{width:100%;min-height:44px;box-sizing:border-box;border:1px solid #64748B;border-radius:8px;padding:10px 12px;font:400 1rem/1.4 "Inter",sans-serif;color:var(--od-ink,#0F172A);background:#fff}
.od.od-desk .od-filters .od-field input:focus,.od.od-desk .od-filters .od-field select:focus{outline:2px solid var(--od-ink,#0F172A);outline-offset:2px;border-color:var(--od-ink,#0F172A)}
.od.od-desk .od-field{display:flex;flex-direction:column;gap:8px;margin:0;font-weight:600;min-width:0}
.od.od-desk .od-field-grow{flex:1 1 12rem}
.od.od-desk .od-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,13rem),1fr));gap:16px;margin:0 0 24px}
.od.od-desk .od-stat{display:block;min-width:0;padding:16px;border:1px solid var(--od-line,#E2E8F0);border-radius:var(--od-r,12px);background:var(--od-surface,#fff);box-shadow:var(--od-shadow);color:inherit;text-decoration:none}
.od.od-desk .od-stat-label{display:flex;align-items:center;gap:8px;margin:0;color:var(--od-muted,#475569);font:600 .8125rem/1.3 "Inter",sans-serif}
.od.od-desk .od-stat-value{margin:8px 0 0;font:700 1.75rem/1.1 "Inter Tight","Inter",sans-serif;color:var(--od-ink,#0F172A);overflow-wrap:anywhere}
.od.od-desk .od-stat-value .od-num{font-weight:700}
.od.od-desk .od-table-wrap{overflow-x:auto;overflow-y:hidden;max-width:100%;border:1px solid var(--od-line,#E2E8F0);border-radius:var(--od-r,12px);background:var(--od-surface,#fff)}
.od.od-desk .od-table{width:100%;border-collapse:separate;border-spacing:0;font-size:.9375rem}
.od.od-desk .od-table th,.od.od-desk .od-table td{padding:12px 16px;border-bottom:1px solid var(--od-line,#E2E8F0);text-align:left;vertical-align:middle;color:var(--od-ink,#0F172A)}
.od.od-desk .od-table thead th{position:sticky;top:0;z-index:1;background:var(--od-head,#F8FAFC);color:var(--od-muted,#475569);font:600 .8125rem/1.3 "Inter",sans-serif}
.od.od-desk .od-filters{display:flex;flex-wrap:wrap;gap:16px;align-items:flex-end;margin:0 0 16px;padding:16px;border:1px solid var(--od-line,#E2E8F0);border-radius:var(--od-r,12px);background:var(--od-paper,#F8FAFC);min-width:0}

.od.od-desk{min-width:0;max-width:100%}
.od.od-desk .od-desk-head{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:16px;margin:0 0 24px}
.od.od-desk .od-desk-head-text{min-width:0;flex:1 1 16rem}
.od.od-desk .od-kicker{margin:0 0 4px;font:600 .75rem/1.3 "Inter",sans-serif;letter-spacing:.04em;text-transform:uppercase;color:var(--od-muted,#475569)}
.od.od-desk .od-desk-title{margin:0;font:700 clamp(1.375rem,2.5vw,1.75rem)/1.2 "Inter Tight","Inter",sans-serif;color:var(--od-ink,#0F172A);overflow-wrap:anywhere}
.od.od-desk .od-desk-lede{margin:8px 0 0;max-width:42rem}
.od.od-desk .od-desk-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.od.od-desk .od-desk-actions .button{min-height:44px}
.od.od-desk .od-inline-form{display:inline;margin:0}
.od.od-desk .od-desk-card{margin:0 0 24px}
.od.od-desk .od-card-title{margin:0 0 12px;font:700 1.0625rem/1.3 "Inter Tight","Inter",sans-serif;color:var(--od-ink,#0F172A)}
.od.od-desk .od-row-actions{white-space:nowrap}
.od.od-desk .od-row-actions .button{min-height:44px}
.od.od-desk .od-desk-table .od-table tbody td{overflow-wrap:anywhere}
.od.od-desk .od-form.ask,.od.od-desk .od-form.prep-form{display:grid;gap:16px;margin-top:12px}
.od.od-desk .od-form .od-field{display:flex;flex-direction:column;gap:8px;margin:0;font-weight:600;min-width:0}
.od.od-desk .od-form .od-field input,.od.od-desk .od-form .od-field select,.od.od-desk .od-form .od-field textarea{
  width:100%;min-height:44px;box-sizing:border-box;border:1px solid #64748B;border-radius:8px;padding:10px 12px;font:400 1rem/1.4 "Inter",sans-serif;color:var(--od-ink,#0F172A);background:#fff
}
.od.od-desk .od-form .od-field input:focus,.od.od-desk .od-form .od-field select:focus,.od.od-desk .od-form .od-field textarea:focus{outline:2px solid var(--od-ink,#0F172A);outline-offset:2px;border-color:var(--od-ink,#0F172A)}
.od.od-desk .od-mono,.od.od-desk .od-num{font-family:"JetBrains Mono",ui-monospace,monospace;font-variant-numeric:tabular-nums}
@media (max-width:720px){
  .od.od-desk .od-desk-table .od-table thead{display:none}
  .od.od-desk .od-desk-table .od-table,.od.od-desk .od-desk-table .od-table tbody,.od.od-desk .od-desk-table .od-table tr,.od.od-desk .od-desk-table .od-table td{display:block;width:100%}
  .od.od-desk .od-desk-table .od-table tr{padding:12px;border-bottom:1px solid var(--od-line,#E2E8F0)}
  .od.od-desk .od-desk-table .od-table td{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border:0;text-align:right}
  .od.od-desk .od-desk-table .od-table td::before{content:attr(data-label);font:600 .75rem/1.3 "Inter",sans-serif;color:var(--od-muted,#475569);text-align:left;flex:0 0 42%;max-width:45%}
  .od.od-desk .od-desk-table .od-table td.od-row-actions{justify-content:flex-end}
  .od.od-desk .od-desk-table .od-table td.od-row-actions::before{content:none}
}
@media (max-width:390px){
  .od.od-desk .od-desk-actions{width:100%}
  .od.od-desk .od-desk-actions .button{flex:1 1 auto;justify-content:center}
}

/* Sync chip (demo + samples; offlineBookScriptChip). A small pill instead of the old full-width banner. */
.offline-banner.has-chip { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; padding: 0.5rem 0.75rem; border: 0; background: transparent; color: inherit; font-weight: 500; }
.offline-banner.has-chip.only-chip { position: fixed; z-index: 1000; top: calc(0.75rem + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); margin: 0; padding: 0; pointer-events: none; } /* top centre: clear of the bottom tab bar, trial bar and cookie card */
.sync-chip { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2rem; padding: 0.3rem 0.8rem; border-radius: 999px; font-size: 0.875rem; font-weight: 600; line-height: 1.2; border: 1px solid #0f766e; background: #ecfdf5; color: #115e59; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.sync-chip::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: currentColor; }
.sync-chip[data-state="retry"], .sync-chip[data-state="offline"] { border-color: #b45309; background: #fff7ed; color: #7c2d12; }
.sync-note { flex: 1 1 16rem; padding: 0.5rem 0.75rem; border-radius: 0.75rem; border: 1px solid #0f766e; background: #ecfdf5; color: #115e59; font-weight: 600; }
@media (prefers-reduced-motion: no-preference) { .sync-chip[data-state="saving"]::before, .sync-chip[data-state="retry"]::before { animation: sync-pulse 1s ease-in-out infinite alternate; } }
@keyframes sync-pulse { from { opacity: .35; } to { opacity: 1; } }

/* ===== Spacing scale v2 (PENDING INBOX 2026-10-16 #2). One scale from tokens.css (--s-*), applied only where <body> has
   class sp2: demo + sample books (NAV_FLAGS book scope). Real books and the pilot book do not get the class, so they are unchanged.
   Steps: xs 8px · sm 12px · md 16px · lg 24px · xl 32px. Nothing sits closer than 8px to text, bars, fields or lines. */
body.sp2 { --sp-2xs: .375rem; --sp-xs: var(--s-2, .5rem); --sp-sm: var(--s-3, .75rem); --sp-md: var(--s-4, 1rem); --sp-lg: var(--s-6, 1.5rem); --sp-xl: var(--s-8, 2rem); }
/* find bar */
body.sp2 .mn-find { margin-top: var(--sp-md); }
body.sp2 .mn-find-label { margin-bottom: var(--sp-xs); }
body.sp2 .mn-find-field { gap: var(--sp-xs); padding: var(--sp-2xs) var(--sp-2xs) var(--sp-2xs) var(--sp-sm); }
/* quick actions */
body.sp2 .mn-qa-title { margin-bottom: var(--sp-sm); }
body.sp2 .mn-qa-grid { margin-bottom: var(--sp-md); gap: var(--sp-sm); }
body.sp2 .mn-qa-rm-s { display: block; margin-top: var(--sp-2xs); }
/* page head */
body.sp2 .wrap.mn-top + .hero, body.sp2 .hero { padding-top: var(--sp-lg); }
body.sp2 .hero .kicker { margin-bottom: var(--sp-xs); }
body.sp2 .hero h1 { margin-bottom: var(--sp-sm); }
body.sp2 .hero .lede { margin-bottom: var(--sp-md); }
body.sp2 .hero + .wrap, body.sp2 .hero + section { margin-top: var(--sp-md); }
body.sp2 .next-step { margin: var(--sp-md) 0; }
/* sections and stacks */
body.sp2 main .section + .section, body.sp2 main section + section { margin-top: var(--sp-lg); }
body.sp2 main :is(h2, h3) { margin-bottom: var(--sp-xs); }
body.sp2 main :is(h2, h3) + :is(p, ul, ol, form, .table-wrap, .sales-wrap) { margin-top: var(--sp-xs); }
body.sp2 main :is(p.note, p.left-count, p.low-note) { margin-top: var(--sp-xs); margin-bottom: var(--sp-xs); }
body.sp2 main p.note + p.note { margin-top: var(--sp-xs); }
body.sp2 main :is(p.note, p) + :is(.table-wrap, .sales-wrap, form, ul) { margin-top: var(--sp-sm); }
body.sp2 main :is(form, .table-wrap, .sales-wrap, ul) + :is(p.note, p) { margin-top: var(--sp-sm); }
body.sp2 main button + p.note, body.sp2 main .button + p.note { margin-top: var(--sp-xs); }
/* cards and figures */
body.sp2 .dash-card { padding: var(--sp-md); }
body.sp2 .dash-label { margin-bottom: var(--sp-2xs); }
body.sp2 .dash-figure { margin-bottom: var(--sp-2xs); }
body.sp2 .dash-strip, body.sp2 #dash-strip { margin-top: var(--sp-lg); gap: var(--sp-sm); }
/* forms: label → field 8px; fields 12px apart */
body.sp2 main label:not(:has(input, select, textarea)) { margin-bottom: var(--sp-xs); }
body.sp2 main label + :is(input, select, textarea) { margin-top: 0; }
body.sp2 main :is(input, select, textarea) + label { margin-top: var(--sp-sm); }
/* tables: lines never touch text */
body.sp2 .table-wrap :is(td, th), body.sp2 .sales-table :is(td, th) { padding: var(--sp-sm) var(--sp-sm); }
/* sync chip / notes */
body.sp2 .offline-banner { margin-bottom: var(--sp-md); }
/* Hidden scrollbars + edge fades (inbox #2, Dennis). Inside the page only (side menu, tab rows, tables, panels, dialogs);
   the page's own scrollbar stays. Touch, wheel, trackpad and keyboard still scroll (tabindex=0 is added to boxes that have
   nothing focusable). spacing.js marks a scrolling box data-sf="x|y" and data-sf-s / data-sf-e where more content is off-screen. */
body.sp2 * { scrollbar-width: none !important; -ms-overflow-style: none; }
body.sp2 ::-webkit-scrollbar { display: none; width: 0; height: 0; }
/* Dennis 4:20 PM: NO visible scrollbars anywhere signed-in, the page's own one included (every book incl. the pilot book and the demo,
   every role, the owner desk, staff desks). Signed-in = the app menu is on the page (html.sp2-app is the no-:has() fallback, set by
   spacing.js). Public pages (no app menu) keep theirs (W&B). No gutter: nothing reserves scrollbar space. */
html:has(> body.sp2 nav.app-nav[data-mn]), html.sp2-app { scrollbar-width: none !important; -ms-overflow-style: none; scrollbar-gutter: auto !important; }
html:has(> body.sp2 nav.app-nav[data-mn])::-webkit-scrollbar, html.sp2-app::-webkit-scrollbar { display: none; width: 0; height: 0; }
html:has(> body.sp2 nav.app-nav[data-mn]) body.sp2, html.sp2-app body.sp2 { scrollbar-width: none !important; }
html:has(> body.sp2 nav.app-nav[data-mn]) body.sp2::-webkit-scrollbar, html.sp2-app body.sp2::-webkit-scrollbar { display: none; width: 0; height: 0; }
body.sp2 [data-sf] { --sf-s: 0px; --sf-e: 0px; }
body.sp2 [data-sf][data-sf-s] { --sf-s: 28px; }
body.sp2 [data-sf][data-sf-e] { --sf-e: 28px; }
body.sp2 [data-sf="x"]:is([data-sf-s], [data-sf-e]) { -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,.12) 0, #000 var(--sf-s), #000 calc(100% - var(--sf-e)), rgba(0,0,0,.12) 100%); mask-image: linear-gradient(90deg, rgba(0,0,0,.12) 0, #000 var(--sf-s), #000 calc(100% - var(--sf-e)), rgba(0,0,0,.12) 100%); }
body.sp2 [data-sf="y"]:is([data-sf-s], [data-sf-e]) { -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.12) 0, #000 var(--sf-s), #000 calc(100% - var(--sf-e)), rgba(0,0,0,.12) 100%); mask-image: linear-gradient(180deg, rgba(0,0,0,.12) 0, #000 var(--sf-s), #000 calc(100% - var(--sf-e)), rgba(0,0,0,.12) 100%); }
/* With no fade at an edge the gradient must not dim it: start/end stops are fully opaque. */
body.sp2 [data-sf="x"][data-sf-e]:not([data-sf-s]) { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - var(--sf-e)), rgba(0,0,0,.12) 100%); mask-image: linear-gradient(90deg, #000 calc(100% - var(--sf-e)), rgba(0,0,0,.12) 100%); }
body.sp2 [data-sf="x"][data-sf-s]:not([data-sf-e]) { -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,.12) 0, #000 var(--sf-s)); mask-image: linear-gradient(90deg, rgba(0,0,0,.12) 0, #000 var(--sf-s)); }
body.sp2 [data-sf="y"][data-sf-e]:not([data-sf-s]) { -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - var(--sf-e)), rgba(0,0,0,.12) 100%); mask-image: linear-gradient(180deg, #000 calc(100% - var(--sf-e)), rgba(0,0,0,.12) 100%); }
body.sp2 [data-sf="y"][data-sf-s]:not([data-sf-e]) { -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.12) 0, #000 var(--sf-s)); mask-image: linear-gradient(180deg, rgba(0,0,0,.12) 0, #000 var(--sf-s)); }
body.sp2 [data-sf][tabindex="0"]:focus-visible { outline: 3px solid #0F766E; outline-offset: 2px; }
/* A box with its own shadow (e.g. the phone side-menu drawer) would lose it under a mask: it gets inset edge shadows instead. */
body.sp2 [data-sf][data-sf-sh] { -webkit-mask-image: none !important; mask-image: none !important; }

/* Button sizing (Dennis 3:12 PM, D): short labels never wrap ("Move", "Set Pro", "Download my data"). */
body.owner-desk :is(.button, button.button, a.button, .ui-btn), td :is(.button, button.button, a.button, .ui-btn), .csr-ways .button { white-space: nowrap; }
td :is(.button, button.button, .ui-btn) { min-width: max-content; }
/* Long contact buttons (an email address) may wrap on phones instead of being clipped; short labels still fit on one line. */
@media (max-width: 47.98rem) { .csr-ways .button { white-space: normal; overflow-wrap: anywhere; max-width: 100%; } }
#notify-link, .quick-links .button, .ind-tabs .button, .activity-tabs .button, .plan-card-actions .button { white-space: nowrap; }
/* Night + high contrast (W&B 4:05 PM): the dark night header keeps light links; HC alone sets ink to black (was 1.29:1 on End of day). */
html[data-theme="night"][data-contrast="high"] .site-header { background: #000; border-bottom: 2px solid #fff; }
html[data-theme="night"][data-contrast="high"] .site-header a.nav-direct,
html[data-theme="night"][data-contrast="high"] .site-header .site-nav a,
html[data-theme="night"][data-contrast="high"] .site-header .nav-toggle,
html[data-theme="night"][data-contrast="high"] .site-header .button.ghost { color: #fff !important; border-color: #fff !important; background: #000 !important; }
/* Owner desk 4:04 PM (2): Pipeline + People. Names keep clear of the row lines (underline offset + row padding), the per-salesperson
   table gets its own block with a real heading-style caption, and the filters start below it (never overlapping). */
.owner-desk #people-table td, .owner-desk #rep-counts td, .owner-desk #people-table th, .owner-desk #rep-counts th { padding-top: 12px; padding-bottom: 12px; line-height: 1.45; vertical-align: middle; }
.owner-desk #people-table a, .owner-desk #rep-counts a, .owner-desk details.lead > summary a { text-underline-offset: 3px; text-decoration-thickness: 1px; }
.owner-desk #people-table .person-cell { padding-block: 2px; }
.owner-desk #rep-counts caption { caption-side: top; text-align: left; padding: 0 0 8px; font: 600 .9375rem/1.3 "Inter Tight", Inter, sans-serif; color: var(--ink, #0F172A); white-space: normal; }
.owner-desk .table-wrap:has(> #rep-counts) { margin: 16px 0 24px; position: relative; z-index: 0; }
.owner-desk .pipe-filters { position: relative; z-index: 1; clear: both; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line, #E2E8F0); }
@media (max-width: 799.98px) {
  .owner-desk #people-table tr > td:first-child, .owner-desk #rep-counts tr > td:first-child { padding-bottom: 14px; }
  .owner-desk #people-table tr > td:first-child + td, .owner-desk #rep-counts tr > td:first-child + td { padding-top: 12px; }
}
.owner-desk .pipe-showing { margin: -4px 0 12px; color: var(--muted, #475569); }
.owner-desk .pipe-more { margin: 16px 0 0; text-align: center; }

/* No visible scrollbars anywhere signed in (Dennis 4:19 PM; W&B SIGNED-IN-FINDINGS 2): unconditional, not tied to the NAV_FLAGS
   layout flag / body.sp2. Boxes still scroll (touch, wheel, keyboard); the sp2 edge fades (data-sf) still show there is more. */
*, *::before, *::after { scrollbar-width: none !important; -ms-overflow-style: none !important; }
*::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }
/* Night theme: the owner-desk shell header (also used by public /pay/done) kept a white surface under the light night heading
   (axe color-contrast on /pay/done night). Dark surface, light text. */
html[data-theme="night"] .page-header { background: #132321; border-bottom-color: #1E3A37; color: #F8FAFC; }
html[data-theme="night"] .page-header .page-sub { color: #CBD5E1; }
html[data-theme="night"] .page-header .page-eyebrow { color: #5EEAD4; }
html[data-theme="night"][data-contrast="high"] .page-header { background: #000; border-bottom-color: #fff; }
html[data-theme="night"][data-contrast="high"] .page-header h1, html[data-theme="night"][data-contrast="high"] .page-header .page-sub, html[data-theme="night"][data-contrast="high"] .page-header .page-eyebrow { color: #fff; }
html[data-theme="night"]:not([data-contrast="high"]) .page-header h1 { color: #F8FAFC; }
/* Stacked tables on phones (W&B REV 1 finding, platform-wide): the 28/40rem min-widths still applied after components.css turned the
   table into stacked cards at ≤40rem, so cards ran 37–131px off screen at 320–414. */
@media (max-width: 40rem) { .wrap table.ui-table-stack:is(.owes-table, .shelf-table, .staff-table, .owes-premium, .sales-table) { min-width: 0; width: 100%; } }

/* Section rows (queue 3b, Oct 24 2026): ONE header/footer row component + shared spacing tokens for every side.
   --sh-gap: header row -> content (and footer divider -> its buttons); --sh-sep: content/divider line -> footer row.
   :root raises specificity over the per-page "p { margin: 0 }" resets so the gap is never lost. Markup helper: src/sechead.js. */
:root { --sh-gap: var(--s-3, .75rem); --sh-sep: var(--s-4, 1rem); --sh-col: var(--s-2, .5rem); }
:root .sec-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--sh-col) var(--s-3, .75rem); margin: 0 0 var(--sh-gap); }
:root .sec-head > :is(h1, h2, h3, h4) { margin: 0; min-width: 0; }
:root .sec-head > .sec-acts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sh-col); }
:root .sec-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sh-col); margin: var(--sh-sep) 0 0; }
:root .card-foot { margin: var(--sh-sep) 0 0; padding-top: var(--sh-gap); border-top: 1px solid var(--border); }
:root .sec-head :is(a, button), :root .sec-foot :is(a.button, button) { min-height: 44px; }
form.sec-head > .ms-field, form.sec-head > :only-child { flex: 1 1 16rem; min-width: 0; }
/* A bleed table that is not the last thing in its card stops at the card edge so the footer row keeps its gap. */
body.owner-desk .owner-panel > section > :is(.table-wrap, table):not(:last-child) { margin-bottom: 0; }
/* layout-fix-1028: a short label ("Ask", "Find") must still give a 44px-wide tap target (was 38px / 42px wide). */
button.button, a.button, input.button { min-width: 2.75rem; box-sizing: border-box; }
