:root {
  color-scheme: light;
  --bg: #eef3f6;
  --surface: #ffffff;
  --surface-2: #f7fafb;
  --ink: #15202b;
  --muted: #5c6c78;
  --line: #d5dee6;
  --brand: #0a524e;
  --brand-hover: #083f3c;
  --link: #0a524e;
  --nav: #101920;
  --nav-ink: #ffffff;
  --nav-quiet: #d5dee6;
  --footer: #5c6c78;
  --chip: #e7eef2;
  --danger: #8d1c14;
  --ok-bg: #e5f6ef;
  --ok-ink: #0d4f3c;
  --bad-bg: #fdecea;
  --bad-ink: #6e120c;
  --info-bg: #e7f3f2;
  --info-ink: #083f3c;
  --practice-bg: #f6e4b8;
  --practice-ink: #3d2808;
  --shadow: 0 1px 2px rgba(16, 25, 32, 0.06);
  --font: "Segoe UI", system-ui, sans-serif;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e151b;
  --surface: #17212b;
  --surface-2: #1d2935;
  --ink: #f4f7f8;
  --muted: #c5d0d8;
  --line: #31404c;
  --brand: #0a524e;
  --brand-hover: #12756f;
  --link: #b7f3ee;
  --nav: #0b1218;
  --nav-ink: #ffffff;
  --nav-quiet: #d5dee6;
  --footer: #b7c3cc;
  --chip: #243240;
  --danger: #8d1c14;
  --ok-bg: #12352c;
  --ok-ink: #d7f7ec;
  --bad-bg: #3d1816;
  --bad-ink: #ffd2cc;
  --info-bg: #123330;
  --info-ink: #d5f4f1;
  --practice-bg: #4a3412;
  --practice-ink: #ffe6b8;
  --shadow: none;
}

html[data-accent="brand"] { --brand: #c8102e; --brand-hover: #9d0c24; --link: #9d0c24; }
html[data-accent="teal"] { --brand: #0a524e; --brand-hover: #083f3c; --link: #0a524e; }
html[data-accent="blue"] { --brand: #0f6cbd; --brand-hover: #0c5698; --link: #0c5698; }
html[data-accent="green"] { --brand: #1d6b45; --brand-hover: #154f33; --link: #154f33; }
html[data-accent="navy"] { --brand: #0f2a4a; --brand-hover: #0b1c33; --link: #0f2a4a; }
html[data-theme="dark"][data-accent="brand"] { --link: #ffb3bc; --brand-hover: #9d0c24; }
html[data-theme="dark"][data-accent="teal"] { --link: #b7f3ee; --brand-hover: #12756f; }
html[data-theme="dark"][data-accent="blue"] { --link: #b9dcff; --brand-hover: #0c5698; }
html[data-theme="dark"][data-accent="green"] { --link: #b7ebc9; --brand-hover: #154f33; }
html[data-theme="dark"][data-accent="navy"] { --link: #d5e4f5; --brand-hover: #2a4d78; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 var(--font);
}
img { max-width: 100%; }
a { color: var(--link); }
a:hover { text-decoration: none; }
h1 { font-size: 1.7rem; line-height: 1.2; margin: 0.15rem 0 0; }
h2 { font-size: 1.15rem; margin: 0 0 0.4rem; }
p { margin: 0.4rem 0; }

.skip {
  position: absolute;
  left: 8px;
  top: -40px;
  background: var(--brand);
  color: #fff;
  padding: 8px 12px;
  z-index: 5;
}
.skip:focus { top: 8px; }

.shell { min-height: 100vh; display: flex; align-items: stretch; }
.sidebar {
  width: 240px;
  flex: 0 0 240px;
  background: var(--nav);
  color: var(--nav-ink);
  display: flex;
  flex-direction: column;
  padding: 16px 12px 14px;
}
.side-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #fff;
  text-decoration: none;
  margin: 4px 4px 16px;
}
.brand img { border-radius: 8px; background: #0b1218; }
.brand strong { display: block; font-size: 1.05rem; color: #fff; }
.brand small { display: block; color: var(--nav-quiet); font-size: 12px; }
.brand.brand-shop { background: #fff; border-radius: 10px; padding: 6px 8px; }
.brand.brand-shop img { background: transparent; }
.brand.brand-shop strong { color: #0f2a4a; }
.brand.brand-shop .wm-lead,
.brand.brand-shop .wm-tail { color: #c8102e; }
.brand.brand-shop .wm-mid { color: #0f2a4a; }
.brand.brand-shop small { color: #5c6c78; }
.nav-section {
  margin: 14px 10px 6px;
  color: var(--nav-quiet);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.nav-link, .nav-button {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  color: #fff;
  text-decoration: none;
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  margin: 1px 0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.nav-link:hover, .nav-button:hover, .nav-link.is-active { background: rgba(255, 255, 255, 0.12); color: #fff; }
.logout-form { margin: 0; }
.side-bottom { margin-top: auto; padding-top: 12px; }
.who { color: #fff; font-size: 13px; margin: 0 8px 10px; }
.who strong { color: #fff; }
.theme-toggle, .nav-toggle {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.theme-toggle { width: 100%; }
.accent-choices { display: flex; gap: 6px; margin-top: 8px; }
.accent-choices button {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.75);
  padding: 0;
  cursor: pointer;
}
.accent-choices button[aria-checked="true"] { outline: 2px solid #f5c400; outline-offset: 2px; }
.accent-choices [data-accent-choice="brand"] { background: #c8102e; }
.accent-choices [data-accent-choice="teal"] { background: #0a524e; }
.accent-choices [data-accent-choice="blue"] { background: #0f6cbd; }
.accent-choices [data-accent-choice="green"] { background: #1d6b45; }
.accent-choices [data-accent-choice="navy"] { background: #0f2a4a; }
.nav-toggle { display: none; }
.side-tools { display: flex; align-items: center; gap: 8px; }
.logout-top { display: none; }
.logout-top .nav-button {
  width: auto;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 8px 10px;
}
.nav-search { position: relative; margin: 0 4px 12px; }
.nav-search input[type="search"] {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
}
.nav-search input[type="search"]::placeholder { color: var(--nav-quiet); }
.nav-search input[type="search"]:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.nav-search-list {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: min(70vh, 24rem);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  background: #17212b;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.nav-search-list mark {
  background: #f5d76e;
  color: #17212b;
  font-weight: 800;
  padding: 0 1px;
  border-radius: 2px;
}
.nav-search-list[hidden], .nav-search-empty[hidden] { display: none !important; }
.nav-search-list a {
  display: block;
  padding: 8px 10px;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
}
.nav-search-list a strong { display: block; color: #fff; font-weight: 700; }
.nav-search-list a small { display: block; color: var(--nav-quiet); font-size: 12px; font-weight: 600; }
.nav-search-list a[aria-selected="true"], .nav-search-list a:hover { background: rgba(255, 255, 255, 0.14); }
.nav-search-empty { color: var(--nav-quiet); font-size: 13px; margin: 6px 2px 0; }
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.content { flex: 1; padding: 28px 28px 12px; }
.site-footer {
  text-align: center;
  font-size: 12.5px;
  color: var(--footer);
  padding: 8px 12px 18px;
}
.site-footer a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.site-footer a:hover,
.site-footer a:focus {
  text-decoration: underline;
}

.page-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; margin-bottom: 16px; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.eyebrow { margin: 0; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.sub { color: var(--muted); max-width: 62ch; }

.banner { border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; }
.pwa-banner { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pwa-banner p { flex: 1 1 12rem; }
.pwa-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.banner p { margin: 0.2rem 0; }
.banner.ok { background: var(--ok-bg); color: var(--ok-ink); }
.banner.bad { background: var(--bad-bg); color: var(--bad-ink); }
.banner.info { background: var(--info-bg); color: var(--info-ink); }
.banner.practice { background: var(--practice-bg); color: var(--practice-ink); font-weight: 700; }
.banner a { color: inherit; font-weight: 700; }

.card, .table-wrap, .sheet {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.card { padding: 16px; }
.stack { display: grid; gap: 12px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.stat b { display: block; font-size: 1.35rem; color: var(--ink); }
.stat span { color: var(--muted); font-size: 13px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 700; }
tr:last-child td { border-bottom: 0; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--chip); color: var(--ink); font-size: 12px; font-weight: 700; }
.badge.critical, .badge.cancelled { background: var(--danger); color: #fff; }
.badge.warning, .badge.pending_approval, .badge.partial { background: #8a4b08; color: #fff; }
.badge.info, .badge.ordered, .badge.order, .badge.quote, .badge.draft, .badge.open { background: var(--brand); color: #fff; }
.badge.received, .badge.shipped, .badge.active, .badge.paid { background: #0d4f3c; color: #fff; }
.badge.void { background: var(--danger); color: #fff; }

.btn, button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--brand);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 9px 14px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--brand-hover); color: #fff; }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.btn.secondary { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn.secondary:hover { background: var(--surface-2); color: var(--ink); }
.btn.danger { background: var(--danger); color: #fff; }
.btn:disabled, button:disabled { opacity: 0.72; cursor: not-allowed; }
.help code { overflow-wrap: anywhere; }
.btn.danger:hover { background: #6e120c; color: #fff; }

form.inline { display: inline; }
[data-scan-video] { width: 100%; max-height: 240px; background: #111; margin: 8px 0; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filters input { max-width: 280px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field span { font-weight: 650; }
input, select, textarea {
  width: 100%;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
}
textarea { min-height: 88px; resize: vertical; }
.pw-wrap { display: flex; gap: 8px; }
.pw-wrap input { flex: 1; }
.pw-toggle {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.check { display: flex; align-items: center; gap: 8px; margin: 8px 0 14px; }
.check input { width: auto; }
.help { color: var(--muted); font-size: 13px; }
.home-actions, .split { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.home-actions form { display: flex; margin: 0; }
.lede { font-size: 1.15rem; max-width: 62ch; }
.price { font-size: 1.8rem; margin: 8px 0; color: var(--ink); }
.price .muted { font-size: 0.95rem; }
.plan-section { margin-top: 28px; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 12px; }
.plan-card h3 { margin-top: 0; font-size: 1.15rem; }
.landing h1 { max-width: 18em; }
.landing .eyebrow { color: var(--ink); }
.landing section { margin-top: 36px; }
.landing-mark { display: block; width: 48px; height: 48px; margin-bottom: 8px; border-radius: 10px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.2fr);
  gap: 28px;
  align-items: center;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background-color: var(--surface);
  background-image:
    radial-gradient(900px 420px at 100% -10%, color-mix(in srgb, var(--brand) 24%, transparent), transparent 62%),
    radial-gradient(480px 280px at 0% 120%, color-mix(in srgb, var(--link) 18%, transparent), transparent 58%);
}
.shot-frame {
  margin: 0;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 10px 8px;
  box-shadow: 0 12px 28px rgba(16, 25, 32, 0.08);
}
[data-theme="dark"] .shot-frame { box-shadow: none; }
.shot-chrome { display: flex; gap: 6px; padding: 2px 4px 8px; }
.shot-chrome span { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.shot-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg);
}
.shot-frame figcaption { margin-top: 8px; font-size: 13px; }
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}
.steps li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}
.steps h3 { margin: 8px 0 0; font-size: 1.05rem; }
.step-num {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--info-bg);
  color: var(--info-ink);
  font-weight: 700;
}
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 12px; }
.feature-grid h3, .faq-list h3 { margin-top: 0; }
.feature-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--info-bg);
  color: var(--info-ink);
  margin-bottom: 10px;
}
.feature-icon svg { width: 22px; height: 22px; display: block; }
.feature-grid .card:hover,
.landing .plan-card:hover,
.protect-grid .card:hover,
.steps li:hover { border-color: var(--link); }
.protect {
  scroll-margin-top: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background-color: var(--surface);
  background-image:
    radial-gradient(760px 280px at 0% -30%, color-mix(in srgb, var(--brand) 20%, transparent), transparent 62%),
    radial-gradient(520px 260px at 100% 130%, color-mix(in srgb, var(--link) 16%, transparent), transparent 58%);
}
.protect h2 { font-size: 1.45rem; }
.protect .lede { margin-top: 8px; }
.protect-jump { margin: 14px 0 0; font-weight: 700; }
.protect-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.landing .protect-grid > section { margin-top: 0; }
.protect-grid h3 { margin: 0 0 0.35rem; font-size: 1.05rem; }
[data-theme="dark"] .protect { box-shadow: none; }
.gallery-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.gallery-panel { display: none; }
.gallery:has(#screen-pipeline:checked) .panel-pipeline,
.gallery:has(#screen-warehouse:checked) .panel-warehouse,
.gallery:has(#screen-invoices:checked) .panel-invoices { display: block; }
.gallery-tabs label {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 700;
  cursor: pointer;
}
.gallery-tabs label:hover { border-color: var(--link); }
.gallery-tabs input:focus-visible + label { outline: 2px solid var(--ink); outline-offset: 2px; }
.gallery:has(#screen-pipeline:checked) label[for="screen-pipeline"],
.gallery:has(#screen-warehouse:checked) label[for="screen-warehouse"],
.gallery:has(#screen-invoices:checked) label[for="screen-invoices"] {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.landing .plan-card { display: flex; flex-direction: column; min-height: 100%; }
.landing .plan-card .price { margin-top: 8px; }
.plan-toggle { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.plan-toggle label {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 700;
  cursor: pointer;
}
.plan-toggle label:hover { border-color: var(--link); }
.plan-toggle input:focus-visible + label { outline: 2px solid var(--ink); outline-offset: 2px; }
.plan-board .price-year { display: none; }
.plan-board:has(#price-year:checked) .price-month { display: none; }
.plan-board:has(#price-year:checked) .price-year { display: block; }
.plan-board:has(#price-month:checked) label[for="price-month"],
.plan-board:has(#price-year:checked) label[for="price-year"],
.compare:has(#compare-3:checked) label[for="compare-3"],
.compare:has(#compare-10:checked) label[for="compare-10"],
.compare:has(#compare-25:checked) label[for="compare-25"] {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.plan-quote .price { font-size: 1.25rem; line-height: 1.35; }
.compare .size-3, .compare .size-25 { display: none; }
.compare:has(#compare-3:checked) .size-10 { display: none; }
.compare:has(#compare-3:checked) .size-3 { display: table-row; }
.compare:has(#compare-25:checked) .size-10 { display: none; }
.compare:has(#compare-25:checked) .size-25 { display: table-row; }
.compare .table-wrap { max-width: 100%; }
.compare-table { width: 100%; min-width: 720px; border-collapse: collapse; }
.compare-table th, .compare-table td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background: var(--surface);
}
.compare-table th { font-size: 14px; font-weight: 700; }
.compare-table th:first-child, .compare-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface);
}
.compare-note { font-size: 13px; max-width: 72ch; color: var(--ink); }
.plan-features { margin: 8px 0; padding-left: 1.15em; }
.log-view { overflow: auto; max-height: 28rem; white-space: pre-wrap; background: var(--surface); color: var(--ink); padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.plan-features li { margin: 0.2rem 0; }
.faq-list section { padding: 4px 0 8px; border-bottom: 1px solid var(--line); }
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal]:not(.is-in) { opacity: 0; transform: translateY(10px); }
  .js [data-reveal].is-in {
    opacity: 1;
    transform: none;
    transition: opacity 0.45s ease, transform 0.45s ease;
  }
  .feature-grid .card,
  .landing .plan-card,
  .protect-grid .card,
  .steps li { transition: border-color 0.15s ease, transform 0.15s ease; }
  .feature-grid .card:hover,
  .landing .plan-card:hover,
  .protect-grid .card:hover,
  .steps li:hover { transform: translateY(-2px); }
}
.narrow { max-width: 720px; }
.sheet { padding: 22px; max-width: 860px; }
.sheet h1 { font-size: 1.4rem; }
.muted { color: var(--muted); }
.reveal-once { overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.actions-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.board {
  display: grid;
  grid-template-columns: repeat(6, minmax(180px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.board-col {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  min-width: 180px;
}
.board-col h2 { font-size: 0.95rem; }
.board-card {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  margin-top: 8px;
}
.board-card p { margin: 0.2rem 0; }
.board-card select, .board-card .btn { margin-top: 6px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  border-left: 3px solid var(--line);
  margin: 0 0 0 4px;
  padding: 0 0 12px 12px;
}
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { margin: 0.35rem 0; }
.record-docs li { display: flex; flex-wrap: wrap; gap: 0.15rem 0.5rem; align-items: baseline; }
.record-docs a, .record-docs .muted { overflow-wrap: anywhere; }
.record-more { margin: 0.2rem 0 0.8rem; }
@media (max-width: 520px) {
  .record-docs li { flex-direction: column; align-items: flex-start; }
}
fieldset.stack {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0 0 12px;
  padding: 8px 12px 4px;
}
fieldset.stack legend { padding: 0 4px; color: var(--ink); }

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

.label-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.label-card {
  background: #fff;
  color: #000;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  width: min(100%, 260px);
}
.label-card p { margin: 4px 0 0; color: #000; }
.label-card svg { max-width: 100%; height: auto; }

@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .sidebar { width: auto; flex: none; }
  .nav-toggle { display: inline-flex; }
  .logout-top { display: block; }
  .nav-links { display: none; }
  .sidebar.is-open .nav-links { display: block; margin-top: 8px; }
  .nav-search-list {
    position: relative;
    top: 6px;
    max-height: min(50vh, 20rem);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }
  .content { padding: 18px 14px 8px; }
  .page-head, .grid-2 { display: block; }
  .page-actions { margin-top: 10px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .board { grid-template-columns: 1fr; overflow-x: visible; }
  .board-col { min-width: 0; }
  .hero { grid-template-columns: 1fr; padding: 18px; gap: 18px; }
  .protect { padding: 18px; }
  .steps { grid-template-columns: 1fr; }
  .landing h1 { font-size: 1.45rem; }
}

.help-launcher {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 30;
  background: var(--brand);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.help-launcher:hover, .help-launcher:focus-visible { background: var(--brand-hover); color: #fff; }
.help-panel {
  position: fixed;
  right: 16px;
  bottom: 72px;
  z-index: 30;
  width: min(380px, calc(100vw - 24px));
  max-height: min(70vh, 560px);
  overflow: auto;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  box-shadow: var(--shadow);
}
.help-panel[hidden] { display: none !important; }
.help-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.help-panel h2 { margin: 0; }
.help-log { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.help-msg {
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--surface-2);
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.help-msg.assistant { background: var(--info-bg); color: var(--info-ink); }
.help-rate { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.help-rate-note { margin: 8px 0 0; }
.help-transcript { white-space: pre-wrap; overflow-wrap: anywhere; }
.help-panel textarea { width: 100%; }

@media (max-width: 860px) {
  .help-launcher { right: 12px; bottom: 12px; }
  .help-panel { left: 12px; right: 12px; width: auto; bottom: 64px; }
}

/* On phone widths the Help button sits below the page so the text keeps the column. */
@media (max-width: 520px) {
  body:has(.help-launcher) {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }
  body:has(.help-launcher) .shell {
    height: calc(100vh - 72px);
    height: calc(100dvh - 72px);
    max-height: calc(100vh - 72px);
    max-height: calc(100dvh - 72px);
    min-height: 0;
    overflow: auto;
  }
}

.dash-bars { display: flex; flex-direction: column; gap: 8px; }
.dash-bar { display: grid; grid-template-columns: minmax(72px, 92px) minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.dash-bar i { display: block; height: 10px; border-radius: 999px; background: var(--link); width: 0%; min-width: 2px; justify-self: start; }
.dash-bar i.w-0 { width: 0%; }
.dash-bar i.w-1 { width: 1%; }
.dash-bar i.w-2 { width: 2%; }
.dash-bar i.w-3 { width: 3%; }
.dash-bar i.w-4 { width: 4%; }
.dash-bar i.w-5 { width: 5%; }
.dash-bar i.w-6 { width: 6%; }
.dash-bar i.w-7 { width: 7%; }
.dash-bar i.w-8 { width: 8%; }
.dash-bar i.w-9 { width: 9%; }
.dash-bar i.w-10 { width: 10%; }
.dash-bar i.w-11 { width: 11%; }
.dash-bar i.w-12 { width: 12%; }
.dash-bar i.w-13 { width: 13%; }
.dash-bar i.w-14 { width: 14%; }
.dash-bar i.w-15 { width: 15%; }
.dash-bar i.w-16 { width: 16%; }
.dash-bar i.w-17 { width: 17%; }
.dash-bar i.w-18 { width: 18%; }
.dash-bar i.w-19 { width: 19%; }
.dash-bar i.w-20 { width: 20%; }
.dash-bar i.w-21 { width: 21%; }
.dash-bar i.w-22 { width: 22%; }
.dash-bar i.w-23 { width: 23%; }
.dash-bar i.w-24 { width: 24%; }
.dash-bar i.w-25 { width: 25%; }
.dash-bar i.w-26 { width: 26%; }
.dash-bar i.w-27 { width: 27%; }
.dash-bar i.w-28 { width: 28%; }
.dash-bar i.w-29 { width: 29%; }
.dash-bar i.w-30 { width: 30%; }
.dash-bar i.w-31 { width: 31%; }
.dash-bar i.w-32 { width: 32%; }
.dash-bar i.w-33 { width: 33%; }
.dash-bar i.w-34 { width: 34%; }
.dash-bar i.w-35 { width: 35%; }
.dash-bar i.w-36 { width: 36%; }
.dash-bar i.w-37 { width: 37%; }
.dash-bar i.w-38 { width: 38%; }
.dash-bar i.w-39 { width: 39%; }
.dash-bar i.w-40 { width: 40%; }
.dash-bar i.w-41 { width: 41%; }
.dash-bar i.w-42 { width: 42%; }
.dash-bar i.w-43 { width: 43%; }
.dash-bar i.w-44 { width: 44%; }
.dash-bar i.w-45 { width: 45%; }
.dash-bar i.w-46 { width: 46%; }
.dash-bar i.w-47 { width: 47%; }
.dash-bar i.w-48 { width: 48%; }
.dash-bar i.w-49 { width: 49%; }
.dash-bar i.w-50 { width: 50%; }
.dash-bar i.w-51 { width: 51%; }
.dash-bar i.w-52 { width: 52%; }
.dash-bar i.w-53 { width: 53%; }
.dash-bar i.w-54 { width: 54%; }
.dash-bar i.w-55 { width: 55%; }
.dash-bar i.w-56 { width: 56%; }
.dash-bar i.w-57 { width: 57%; }
.dash-bar i.w-58 { width: 58%; }
.dash-bar i.w-59 { width: 59%; }
.dash-bar i.w-60 { width: 60%; }
.dash-bar i.w-61 { width: 61%; }
.dash-bar i.w-62 { width: 62%; }
.dash-bar i.w-63 { width: 63%; }
.dash-bar i.w-64 { width: 64%; }
.dash-bar i.w-65 { width: 65%; }
.dash-bar i.w-66 { width: 66%; }
.dash-bar i.w-67 { width: 67%; }
.dash-bar i.w-68 { width: 68%; }
.dash-bar i.w-69 { width: 69%; }
.dash-bar i.w-70 { width: 70%; }
.dash-bar i.w-71 { width: 71%; }
.dash-bar i.w-72 { width: 72%; }
.dash-bar i.w-73 { width: 73%; }
.dash-bar i.w-74 { width: 74%; }
.dash-bar i.w-75 { width: 75%; }
.dash-bar i.w-76 { width: 76%; }
.dash-bar i.w-77 { width: 77%; }
.dash-bar i.w-78 { width: 78%; }
.dash-bar i.w-79 { width: 79%; }
.dash-bar i.w-80 { width: 80%; }
.dash-bar i.w-81 { width: 81%; }
.dash-bar i.w-82 { width: 82%; }
.dash-bar i.w-83 { width: 83%; }
.dash-bar i.w-84 { width: 84%; }
.dash-bar i.w-85 { width: 85%; }
.dash-bar i.w-86 { width: 86%; }
.dash-bar i.w-87 { width: 87%; }
.dash-bar i.w-88 { width: 88%; }
.dash-bar i.w-89 { width: 89%; }
.dash-bar i.w-90 { width: 90%; }
.dash-bar i.w-91 { width: 91%; }
.dash-bar i.w-92 { width: 92%; }
.dash-bar i.w-93 { width: 93%; }
.dash-bar i.w-94 { width: 94%; }
.dash-bar i.w-95 { width: 95%; }
.dash-bar i.w-96 { width: 96%; }
.dash-bar i.w-97 { width: 97%; }
.dash-bar i.w-98 { width: 98%; }
.dash-bar i.w-99 { width: 99%; }
.dash-bar i.w-100 { width: 100%; }
.dash-bar b { font-weight: 600; }
.sign-pad { border: 1px solid var(--line); background: #fff; max-width: 100%; touch-action: none; }
.offline-wrap { max-width: 40rem; margin: 0 auto; }
.widget-row { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--line); }
.widget-row .actions-row { margin: 0; }
.slot-list { display: flex; flex-wrap: wrap; gap: 8px; }
.slot-list .check { margin: 0; }

.floor-pad { display: grid; gap: 12px; }
.floor-pad .btn, .floor-pad button.btn { min-height: 64px; font-size: 1.2rem; width: 100%; }
.floor-person { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; font-size: 1.2rem; }
.shop-board { display: flex; gap: 12px; overflow-x: auto; align-items: flex-start; }
.shop-day { min-width: 180px; flex: 1 0 180px; min-height: 80px; padding: 8px; background: var(--surface-2, transparent); border-radius: 8px; }
.shop-card { border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin-top: 8px; background: var(--surface, #fff); }
.shop-card[draggable="true"] { cursor: grab; }
.shop-late { color: #9b2c2c; }
.traveler-code { text-align: center; }
.traveler-code svg { max-width: 100%; height: auto; }

@media print {
  .sidebar, .site-footer, .no-print, .banner, .skip, .help-launcher, .help-panel { display: none !important; }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
  body, .content, .sheet { background: #fff; color: #000; }
  .shell, .main-col { display: block; }
  body:has(.help-launcher),
  body:has(.help-launcher) .shell,
  .shell {
    height: auto;
    max-height: none;
    overflow: visible;
  }
  .content { padding: 0; }
  a { color: #000; text-decoration: none; }
  .sheet { border: 0; box-shadow: none; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}

/* Projects */
.board.board-4 { grid-template-columns: repeat(4, minmax(180px, 1fr)); }
.board.board-wide { grid-template-columns: repeat(9, minmax(170px, 1fr)); }
.board-col h3 { font-size: 0.95rem; margin: 0 0 8px; }
.project-stages { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 12px; }
.project-stages li { border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 0.85rem; color: var(--ink); background: var(--surface); }
.project-stages li.is-done { background: var(--surface-2); }
.project-stages li.is-current { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
#gates details { margin: 8px 0; }
#gates summary, #tasks summary { cursor: pointer; font-weight: 600; }
#gates .plain-list li { margin: 6px 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
/* Only the board scrolls sideways on small screens. */
.main-col, .content { min-width: 0; }
.board-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.board-scroll > .board { overflow-x: visible; min-width: max-content; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }

/* Hidden labels stay inside scrolling tables. Filters stack on phones. */
.table-wrap { position: relative; max-width: 100%; }
@media (max-width: 600px) {
  .filters { flex-direction: column; align-items: stretch; }
  .filters input, .filters select, .filters .field { max-width: none; width: 100%; }
}

/* Timeline uses classes, not inline styles, because of the content security policy. */
.timeline-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); position: relative; }
.timeline.tl-size-s { min-width: 640px; }
.timeline.tl-size-m { min-width: 960px; }
.timeline.tl-size-l { min-width: 1500px; }
.timeline.tl-size-xl { min-width: 2600px; }
.tl-row { display: grid; grid-template-columns: 220px minmax(0, 1fr); border-bottom: 1px solid var(--line); min-height: 40px; }
.tl-label { padding: 6px 10px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; position: sticky; left: 0; background: var(--surface); z-index: 1; border-right: 1px solid var(--line); overflow-wrap: anywhere; }
.tl-label .muted { font-size: 12px; }
.tl-track { position: relative; min-width: 0; }
.tl-weeks { display: flex; font-size: 12px; color: var(--muted); }
.tl-weeks span { flex: 1 1 0; min-width: 0; padding: 10px 4px; border-left: 1px solid var(--line); white-space: nowrap; overflow: hidden; }
.tl-group { font-weight: 700; min-height: 32px; }
.tl-svg { display: block; overflow: visible; }
.tl-bar { fill: #2563eb; }
.tl-bar.tl-done { fill: #9ca3af; }
.tl-bar.tl-blocked { fill: #b45309; }
.tl-ms { fill: #7c3aed; }
.tl-ms.tl-done { fill: #9ca3af; }
.tl-late, .tl-bar.tl-late, .tl-ms.tl-late { fill: #b91c1c; }
.tl-today { stroke: #16a34a; stroke-width: 2; opacity: .7; }
.stat a { color: inherit; text-decoration: none; display: block; }
@media (max-width: 600px) {
  .tl-row { grid-template-columns: 140px minmax(0, 1fr); }
  .timeline.tl-size-s { min-width: 560px; }
}
@media print {
  .timeline-scroll { overflow: visible; border: 0; }
  .timeline[class] { min-width: 0; }
  .tl-label { position: static; }
}

/* Campaign planner */
.row-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-end; }
.row-form .field { min-width: 90px; flex: 1 1 90px; }
.row-form input, .row-form select { max-width: 100%; }
.inline-confirm { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
@media (max-width: 600px) {
  .row-form .field { flex-basis: 100%; }
}
.readonly-list { display: grid; grid-template-columns: minmax(110px, max-content) 1fr; gap: 6px 14px; margin: 0 0 8px; }
.readonly-list dt { font-weight: 700; }
.readonly-list dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) { .readonly-list { grid-template-columns: 1fr; } .readonly-list dd { margin-bottom: 6px; } }
tr:target td { background: #fff7d6; }
/* Project links, costs, and notes */
.banner.warn { background: #fff4e0; color: #6b3a00; }
.stat.is-bad { border-color: var(--danger); }
.stat.is-bad b { color: var(--danger); }
.row-form .field.grow { flex: 1 1 260px; }
.link-list li, .note-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.note-list li { display: block; }
.note-list li p { margin: 4px 0; overflow-wrap: anywhere; }
@media (max-width: 600px) { .row-form .field.grow { flex-basis: 100%; } }
/* Project health */
.badge.health-ok { background: #1f6f43; color: #fff; }
.badge.health-risk { background: #8a4b08; color: #fff; }
.badge.health-behind { background: var(--danger); color: #fff; }
/* Pending submit state */
.is-pending { position: relative; cursor: progress; opacity: .85; }
.is-pending::after { content: ""; display: inline-block; width: .9em; height: .9em; margin-left: .5em; vertical-align: -0.12em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: coalesce-spin .7s linear infinite; }
@keyframes coalesce-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .is-pending::after { animation-duration: 2s; } }
.badge.health-done { background: var(--muted-bg, #e6e6e6); color: inherit; }
/* Product management */
.pm-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.pm-tabs .is-current { border-color: currentColor; font-weight: 700; }
.pm-steps { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 12px; padding: 0; }
.pm-steps li { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; color: var(--muted); }
.pm-steps li.is-current { color: inherit; font-weight: 700; border-color: currentColor; }
.pm-scores { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pm-notes { white-space: normal; overflow-wrap: anywhere; line-height: 1.5; }
.badge.lc-in_development, .badge.rel-in_progress { background: #b45309; color: #fff; }
.badge.lc-launched { background: #1f6f43; color: #fff; }
.badge.lc-retired, .badge.rel-released { background: #6b7280; color: #fff; }
.badge.rel-planned { background: #2563eb; color: #fff; }
.tl-bar.rm-planned { fill: #2563eb; }
.tl-bar.rm-in_progress { fill: #b45309; }
.tl-bar.rm-released { fill: #9ca3af; }
.tl-bar.tl-late[class*="rm-"] { fill: #b91c1c; }
/* Continuous improvement */
.badge.ci-quick-win { background: #1f6f43; color: #fff; }
.badge.ci-big-bet { background: #2563eb; color: #fff; }
.badge.ci-fill-in { background: #6b7280; color: #fff; }
.badge.ci-not-worth-it { background: #b45309; color: #fff; }
.ci-details, .ci-notes dd { overflow-wrap: anywhere; }
.ci-notes dt { font-weight: 700; margin-top: 8px; }
.ci-notes dd { margin: 2px 0 0; }
.ci-lesson { border-bottom: 1px solid var(--line); padding: 8px 0; }
