/* Fastener Lab — shared styles. Mobile-first. Warm off-white, charcoal,
   industrial blue, restrained amber. */

:root {
  --paper: #f6f3ec;
  --paper-2: #efeae0;
  --surface: #ffffff;
  --ink: #212429;
  --ink-2: #4a4f57;
  --ink-3: #6b7078;
  --line: #ddd5c7;
  --line-2: #c9bfae;
  --blue: #1d4f7c;
  --blue-700: #163d61;
  --blue-50: #e8eff6;
  --blue-100: #d3e1ee;
  --amber: #b9770e;
  --amber-600: #9a6208;
  --amber-50: #fbf2df;
  --ok: #2e6b3c;
  --ok-50: #e6f1e8;
  --danger: #a2322a;
  --danger-50: #f8e6e4;
  --info: #3d5a73;
  --info-50: #eaf0f4;
  --neutral-50: #ecebe7;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(33, 36, 41, 0.06), 0 4px 14px rgba(33, 36, 41, 0.06);
  --focus: 0 0 0 3px #f2b84b, 0 0 0 5px #212429;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;
  --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; outline: none; }
img, svg { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); }
h2 { font-size: clamp(1.25rem, 2.6vw, 1.6rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
a { color: var(--blue); text-underline-offset: 2px; }
a:hover { color: var(--blue-700); }
code, .mono { font-family: var(--mono); font-size: 0.92em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
small, .small { font-size: 0.86rem; }
.muted { color: var(--ink-3); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Focus: always visible for keyboard users */
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 8px; color: #fff; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 28px 0; }
.section-tight { padding: 18px 0; }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.row-between { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.grid { display: grid; gap: 16px; }
.grid > *, .layout-side > *, .layout-side-left > * { min-width: 0; }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .layout-side { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
  .layout-side-left { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
}

/* ---------- Demo strip (role switch) ---------- */
.demo-strip {
  background: var(--ink);
  color: #e9e6df;
  font-size: 0.84rem;
}
.demo-strip .container { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding-top: 6px; padding-bottom: 6px; }
.demo-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--amber-50); color: #5b3b04; border-radius: 999px;
  padding: 2px 10px; font-weight: 600; font-size: 0.8rem;
}
.demo-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.demo-switch { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.demo-switch label { color: #cfcac0; }
.demo-switch select {
  font: inherit; font-size: 0.84rem; color: var(--ink); background: #f6f3ec;
  border: 1px solid #8b8478; border-radius: 6px; padding: 3px 6px; max-width: 200px;
}
.demo-switch .sim-note { color: #b5afa3; font-style: italic; }

/* ---------- Header / nav ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.site-header .container { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; letter-spacing: -0.02em; font-size: 1.15rem; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand small { display: block; font-weight: 500; color: var(--ink-3); font-size: 0.72rem; letter-spacing: 0; }
.nav-toggle {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 8px 12px; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer;
}
.nav-toggle-bars { width: 18px; height: 12px; position: relative; display: inline-block; }
.nav-toggle-bars::before, .nav-toggle-bars::after, .nav-toggle-bars span {
  content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor; border-radius: 2px;
}
.nav-toggle-bars::before { top: 0; } .nav-toggle-bars span { top: 5px; } .nav-toggle-bars::after { bottom: 0; }
.site-nav { display: none; }
.site-nav.open {
  display: block; position: absolute; left: 0; right: 0; top: 100%;
  background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  padding: 8px var(--gutter) 16px;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.site-nav a {
  white-space: nowrap;
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--ink); text-decoration: none; font-weight: 600;
}
.site-nav a:hover { background: var(--paper); }
.site-nav a[aria-current="page"] { background: var(--blue-50); color: var(--blue-700); }
.count-badge {
  display: inline-flex; min-width: 22px; height: 22px; align-items: center; justify-content: center;
  border-radius: 999px; background: var(--amber); color: #fff; font-size: 0.75rem; padding: 0 6px;
}
@media (min-width: 1180px) {
  .nav-toggle { display: none; }
  .site-nav, .site-nav.open { display: block; position: static; box-shadow: none; border: 0; padding: 0; margin-left: auto; background: none; }
  .site-nav ul { flex-direction: row; gap: 4px; }
  .site-nav a { padding: 8px 12px; }
}

.subnav { background: var(--paper-2); border-bottom: 1px solid var(--line); }
.subnav .container { display: flex; gap: 4px; overflow-x: auto; padding-top: 6px; padding-bottom: 6px; scrollbar-width: thin; }
.subnav-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); font-weight: 700; padding: 8px 8px 8px 0; white-space: nowrap; align-self: center; }
.subnav a {
  white-space: nowrap; padding: 7px 12px; border-radius: var(--radius-sm); text-decoration: none;
  color: var(--ink-2); font-weight: 600; font-size: 0.92rem;
}
.subnav a:hover { background: var(--surface); color: var(--ink); }
.subnav a[aria-current="page"] { background: var(--surface); color: var(--blue-700); box-shadow: inset 0 -2px 0 var(--blue); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #cfcac0; margin-top: 48px; font-size: 0.9rem; }
.site-footer .container { padding-top: 32px; padding-bottom: 32px; display: grid; gap: 24px; }
.site-footer a { color: #f0ece4; }
.site-footer h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: #a9a397; margin-bottom: 8px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-brand { font-weight: 800; color: #fff; font-size: 1.05rem; }
.footer-legal { border-top: 1px solid #3a3e45; padding-top: 16px; color: #a9a397; font-size: 0.82rem; }
@media (min-width: 760px) {
  .site-footer .container { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .footer-legal { grid-column: 1 / -1; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 650; font-size: 0.95rem; line-height: 1.2;
  padding: 10px 16px; min-height: 42px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; text-decoration: none; text-align: center;
  background: var(--blue); color: #fff; transition: background 0.12s ease;
}
.btn:hover { background: var(--blue-700); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-secondary:hover { background: var(--paper); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--blue); border-color: transparent; padding-left: 8px; padding-right: 8px; }
.btn-ghost:hover { background: var(--blue-50); color: var(--blue-700); }
.btn-amber { background: var(--amber); color: #fff; }
.btn-amber:hover { background: var(--amber-600); }
.btn-danger { background: var(--surface); color: var(--danger); border-color: #d9a8a3; }
.btn-danger:hover { background: var(--danger-50); color: var(--danger); }
.btn-danger-solid { background: var(--danger); color: #fff; }
.btn-danger-solid:hover { background: #85271f; color: #fff; }
.btn-sm { padding: 6px 10px; min-height: 34px; font-size: 0.86rem; }
.btn-lg { padding: 13px 22px; min-height: 50px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card-flat { box-shadow: none; }
.card h2, .card h3 { margin-bottom: 0.4em; }
.card-header { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.card-header h2, .card-header h3 { margin: 0; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.kv dt { color: var(--ink-3); font-size: 0.9rem; }
.kv dd { margin: 0; font-weight: 550; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 700;
  padding: 3px 9px; border-radius: 999px; line-height: 1.3; white-space: nowrap; border: 1px solid transparent;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.8; }
.badge-ok { background: var(--ok-50); color: var(--ok); border-color: #bcd8c2; }
.badge-info { background: var(--info-50); color: var(--info); border-color: #c5d3de; }
.badge-blue { background: var(--blue-50); color: var(--blue-700); border-color: var(--blue-100); }
.badge-amber { background: var(--amber-50); color: #7a4c05; border-color: #ecd3a2; }
.badge-danger { background: var(--danger-50); color: var(--danger); border-color: #e6bdb8; }
.badge-neutral { background: var(--neutral-50); color: var(--ink-2); border-color: var(--line); }
.tag { display: inline-block; font-size: 0.78rem; padding: 2px 8px; border-radius: 4px; background: var(--paper-2); color: var(--ink-2); font-weight: 600; }
.ro-tag { font-family: var(--mono); font-size: 0.8rem; background: #fff7e6; color: #6a4304; border: 1px solid #ecd3a2; padding: 1px 6px; border-radius: 4px; white-space: nowrap; }
.sku { font-family: var(--mono); font-size: 0.86rem; color: var(--ink-2); }

/* ---------- Notices ---------- */
.notice { border-radius: var(--radius-sm); padding: 12px 14px; border: 1px solid var(--line); background: var(--surface); display: flex; gap: 10px; align-items: flex-start; }
.notice > :last-child { margin-bottom: 0; }
.notice-info { background: var(--blue-50); border-color: var(--blue-100); color: #1b3550; }
.notice-amber { background: var(--amber-50); border-color: #ecd3a2; color: #5b3b04; }
.notice-danger { background: var(--danger-50); border-color: #e6bdb8; color: #6d1f19; }
.notice-ok { background: var(--ok-50); border-color: #bcd8c2; color: #1f4a29; }
.sim-label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--amber-600); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field label, .field .label { font-weight: 650; font-size: 0.92rem; }
.field .hint { color: var(--ink-3); font-size: 0.84rem; }
.req { color: var(--danger); }
input[type="text"], input[type="search"], input[type="number"], input[type="date"], input[type="email"], select, textarea {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 9px 11px; min-height: 42px; width: 100%;
}
textarea { min-height: 90px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--blue); }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--danger); background: #fffafa; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; accent-color: var(--blue); }
input[type="file"] { font: inherit; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.check input { margin-top: 3px; flex: none; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 0; min-width: 0; }
legend { font-weight: 700; padding: 0 6px; }
.form-grid { display: grid; gap: 14px; }
@media (min-width: 640px) {
  .form-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .span-2 { grid-column: span 2; }
  .span-all { grid-column: 1 / -1; }
}
.form-error {
  border: 1px solid #e6bdb8; background: var(--danger-50); color: #6d1f19;
  border-radius: var(--radius-sm); padding: 10px 12px; font-weight: 600;
}
.form-error:empty { display: none; }
.input-money { position: relative; }
.input-money::before { content: "$"; position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.input-money input { padding-left: 24px; }
.qty-input { display: inline-flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.qty-input button { background: var(--paper); border: 0; width: 38px; font-size: 1.15rem; cursor: pointer; color: var(--ink); }
.qty-input button:hover { background: var(--paper-2); }
.qty-input input { border: 0; border-radius: 0; width: 64px; text-align: center; min-height: 40px; }

/* ---------- Tables ---------- */
.table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.data th, table.data td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { background: var(--paper-2); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-2); white-space: nowrap; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: #fbfaf7; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data tfoot td { font-weight: 700; background: var(--paper); border-top: 2px solid var(--line-2); border-bottom: 0; }
table.data .group-row td { background: #fffaf0; font-weight: 700; border-top: 1px solid #ecd3a2; }
table.data input, table.data select { min-height: 36px; padding: 6px 8px; }
.compact table.data th, .compact table.data td { padding: 7px 10px; }

/* ---------- Storefront ---------- */
.hero { background: linear-gradient(180deg, var(--surface) 0%, var(--paper) 100%); border-bottom: 1px solid var(--line); }
.hero .container { display: grid; gap: 24px; padding-top: 36px; padding-bottom: 36px; align-items: center; }
@media (min-width: 900px) { .hero .container { grid-template-columns: 1.2fr 1fr; padding-top: 56px; padding-bottom: 56px; } }
.eyebrow { text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.78rem; font-weight: 800; color: var(--amber-600); margin-bottom: 8px; }
.hero h1 { font-size: clamp(1.9rem, 5vw, 3rem); }
.hero p.lead { font-size: 1.08rem; color: var(--ink-2); max-width: 46ch; }
.search-hero { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 2px solid var(--blue); border-radius: var(--radius); padding: 8px; box-shadow: var(--shadow); max-width: 560px; }
.search-hero input { border: 0; font-size: 1.05rem; min-height: 48px; }
.search-hero input:focus-visible { box-shadow: none; }
.search-hero:focus-within { box-shadow: var(--focus); }
@media (min-width: 520px) { .search-hero { flex-direction: row; } }
.hero-art { background: var(--paper-2); border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.action-card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); }
.action-card:hover { border-color: var(--blue); color: var(--ink); }
.action-card .icon { width: 40px; height: 40px; border-radius: 10px; background: var(--blue-50); color: var(--blue); display: grid; place-items: center; }
.action-card h3 { margin: 6px 0 0; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { counter-increment: step; position: relative; padding-left: 46px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 800; }

.product-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.product-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.product-card .figure { background: var(--paper-2); border-bottom: 1px solid var(--line); aspect-ratio: 5 / 4; display: grid; place-items: center; }
.product-card .figure svg { width: 100%; height: 100%; }
.product-card .body { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card h3 { font-size: 1rem; margin: 0; }
.product-card h3 a { color: var(--ink); text-decoration: none; }
.product-card h3 a:hover { color: var(--blue); text-decoration: underline; }
.product-card .price { font-size: 1.15rem; font-weight: 800; }
.product-card .price small { font-weight: 500; color: var(--ink-3); font-size: 0.82rem; }
.product-card .actions { margin-top: auto; padding-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.figure-lg { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); aspect-ratio: 5 / 4; display: grid; place-items: center; }
.price-xl { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.02em; }
.filters { display: grid; gap: 12px; }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  font: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); padding: 6px 12px;
}
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Owner / dashboards ---------- */
body[data-area="owner"] .container, body[data-area="lab"] .container { max-width: 1320px; }
.page-head { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: flex-end; padding: 22px 0 14px; }
.page-head h1 { margin: 0; font-size: clamp(1.4rem, 3vw, 1.9rem); }
.page-head p { margin: 4px 0 0; color: var(--ink-3); }
.metrics { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.metric {
  display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line-2);
  border-radius: var(--radius-sm); padding: 12px 14px;
}
.metric:hover { border-color: var(--blue); color: var(--ink); }
.metric .value { font-size: 1.8rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.metric .label { font-size: 0.86rem; color: var(--ink-2); font-weight: 600; }
.metric .sub { font-size: 0.8rem; color: var(--ink-3); }
.metric.tone-danger { border-left-color: var(--danger); }
.metric.tone-amber { border-left-color: var(--amber); }
.metric.tone-ok { border-left-color: var(--ok); }
.metric.tone-blue { border-left-color: var(--blue); }
.metric.tone-info { border-left-color: var(--info); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 14px; }
.toolbar .field { flex: 1 1 180px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a, .tabs button {
  font: inherit; background: none; border: 0; padding: 10px 14px; cursor: pointer; white-space: nowrap;
  color: var(--ink-2); font-weight: 650; text-decoration: none; border-bottom: 3px solid transparent;
}
.tabs [aria-selected="true"], .tabs [aria-current="page"] { color: var(--blue-700); border-bottom-color: var(--blue); }
.list-plain { list-style: none; padding: 0; margin: 0; }
.list-divided > li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.list-divided > li:last-child { border-bottom: 0; }
.empty { text-align: center; color: var(--ink-3); padding: 28px 12px; border: 1px dashed var(--line-2); border-radius: var(--radius); background: rgba(255, 255, 255, 0.5); }
.progress { height: 8px; border-radius: 99px; background: var(--paper-2); overflow: hidden; min-width: 80px; }
.progress > span { display: block; height: 100%; background: var(--ok); }
.progress > span.part { background: var(--amber); }

.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 12px 16px; font-size: 0.9rem; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--blue); }
.timeline time { display: block; color: var(--ink-3); font-size: 0.8rem; }

.board { display: grid; gap: 12px; grid-auto-flow: row; }
@media (min-width: 900px) { .board { grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); overflow-x: auto; padding-bottom: 8px; } }
.board-col { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; min-height: 80px; }
.board-col h2 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); display: flex; justify-content: space-between; margin: 2px 4px 10px; }
.board-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px; margin-bottom: 8px; color: var(--ink); text-decoration: none; font-size: 0.9rem; }
.board-card:hover { border-color: var(--blue); color: var(--ink); }
.board-card strong { display: block; }

.job-card { display: grid; gap: 10px; }
@media (min-width: 900px) { .job-card { grid-template-columns: minmax(0, 1fr) auto; align-items: start; } }

/* ---------- Dialog ---------- */
dialog.modal {
  border: 0; padding: 0; border-radius: 12px; width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 32px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); color: var(--ink); background: var(--surface);
}
dialog.modal-wide { width: min(960px, calc(100vw - 24px)); }
dialog.modal::backdrop { background: rgba(26, 28, 32, 0.55); }
.modal-form { display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 1.15rem; }
.modal-close { background: none; border: 0; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--ink-2); width: 36px; height: 36px; border-radius: 6px; }
.modal-close:hover { background: var(--paper); }
.modal-body { padding: 16px 18px; overflow-y: auto; display: grid; gap: 14px; }
.modal-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--paper); border-radius: 0 0 12px 12px; }

/* ---------- Toast ---------- */
.toast-region { position: fixed; z-index: 200; left: 12px; right: 12px; bottom: 12px; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  pointer-events: auto; max-width: 520px; width: 100%; background: var(--ink); color: #fff; padding: 12px 16px;
  border-radius: var(--radius-sm); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); font-weight: 550; border-left: 5px solid var(--ok);
}
.toast-error { border-left-color: #e0645a; }
.toast-info { border-left-color: var(--amber); }

/* ---------- Documents (invoice / statement) ---------- */
.doc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; max-width: 900px; margin: 24px auto; box-shadow: var(--shadow); }
.doc-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; border-bottom: 2px solid var(--ink); padding-bottom: 14px; margin-bottom: 18px; }
.doc-title { font-size: 1.6rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.doc-watermark { font-size: 0.78rem; font-weight: 700; color: var(--amber-600); text-transform: uppercase; letter-spacing: 0.06em; }
.totals { margin-left: auto; width: min(100%, 320px); }
.totals div { display: flex; justify-content: space-between; padding: 4px 0; }
.totals .grand { border-top: 2px solid var(--ink); font-weight: 800; font-size: 1.1rem; padding-top: 8px; margin-top: 4px; }
.print-only { display: none; }

.recovery { max-width: 720px; margin: 40px auto; }
.gate { max-width: 620px; margin: 48px auto; text-align: center; }
.illus-inline { width: 64px; height: 52px; flex: none; background: var(--paper-2); border-radius: 6px; border: 1px solid var(--line); }
.illus-inline svg { width: 100%; height: 100%; }
.line-item { display: flex; gap: 12px; align-items: center; }

@media print {
  @page { margin: 14mm; }
  body { background: #fff; font-size: 11pt; }
  .demo-strip, .site-header, .subnav, .site-footer, .no-print, .toast-region, .skip-link { display: none !important; }
  .print-only { display: block !important; }
  .doc { border: 0; box-shadow: none; margin: 0; padding: 0; max-width: none; }
  .container { max-width: none; padding: 0; }
  .card { box-shadow: none; break-inside: avoid; }
  .table-wrap { border: 0; overflow: visible; }
  table.data th { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  table.data tr { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
  .badge { border: 1px solid #999; background: none !important; color: #000 !important; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Definition-list totals (checkout summary) */
.totals dt, .totals dd { margin: 0; }
.board-card > span { display: block; }
.btn { white-space: nowrap; }
.compact .card h2 { font-size: 1.12rem; }

/* Stacked tables on narrow screens (quick order) */
@media (max-width: 720px) {
  table.table-stack thead { display: none; }
  table.table-stack, table.table-stack tbody, table.table-stack tr, table.table-stack td { display: block; width: 100%; }
  table.table-stack tr { border-bottom: 2px solid var(--line-2); padding: 8px 0; }
  table.table-stack td { border: 0; padding: 5px 12px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; justify-content: space-between; text-align: right; }
  table.table-stack td::before { content: attr(data-label); font-weight: 700; font-size: 0.8rem; color: var(--ink-2); text-align: left; flex: none; }
  table.table-stack td[data-label=""]::before { content: none; }
  table.table-stack td > select, table.table-stack td > input { max-width: 65%; }
  table.table-stack td.num { text-align: right; }
}

/* ---------- Part finder (three paths, search explanations) ---------- */
.hero-compact .container { padding-top: 28px; padding-bottom: 28px; }
@media (min-width: 900px) { .hero-compact .container { padding-top: 40px; padding-bottom: 40px; } }
.finder h2 { margin-bottom: 14px; }
.finder-grid { display: grid; gap: 16px; }
@media (min-width: 900px) { .finder-grid { grid-template-columns: 1.35fr 1fr 1fr; } }
.path-card { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.path-card h3 { margin: 4px 0 0; font-size: 1.15rem; }
.path-card p { margin: 0; }
.path-card .icon { width: 40px; height: 40px; border-radius: 10px; background: var(--blue-50); color: var(--blue); display: grid; place-items: center; }
.path-primary { border: 2px solid var(--blue); }
.path-primary .search-hero { border-width: 1px; box-shadow: none; max-width: none; }
.match-note { font-size: 0.82rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px 8px; color: var(--ink-2); }
.match-label { font-weight: 700; color: var(--ink); }
.result-group + .result-group { margin-top: 26px; }
.result-group-head { border-bottom: 1px solid var(--line); margin-bottom: 12px; padding-bottom: 6px; }
.result-group-head h2 { font-size: 1.15rem; margin: 0; }
.result-group-head p { margin: 2px 0 0; }

/* ---------- Identification ---------- */
.choice-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.choice { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--surface); cursor: pointer; }
.choice:has(input:checked) { border-color: var(--blue); background: var(--blue-50); }
.choice input { margin-top: 3px; flex: none; }
.measure-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.measure-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; background: var(--surface); display: grid; gap: 8px; }
.measure-figure { border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); }
.measure-figure svg { display: block; width: 100%; height: auto; }
.hint.conv { color: var(--blue-700); font-weight: 600; }
.candidate-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 12px; }
.candidate { display: grid; gap: 14px; }
@media (min-width: 700px) { .candidate { grid-template-columns: 160px minmax(0, 1fr); } }
.candidate-figure { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-sm); aspect-ratio: 5 / 4; max-width: 220px; }
.candidate-figure svg { width: 100%; height: 100%; }
.candidate h3 { margin: 4px 0 6px; font-size: 1.05rem; }
.check-list { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 4px; font-size: 0.9rem; }
.check-list li { display: flex; gap: 8px; align-items: baseline; }
.check-icon { width: 20px; height: 20px; flex: none; border-radius: 50%; display: inline-grid; place-items: center; font-size: 0.78rem; font-weight: 800; background: var(--neutral-50); color: var(--ink-2); }
.check-ok .check-icon { background: var(--ok-50); color: var(--ok); }
.check-amber .check-icon { background: var(--amber-50); color: #7a4c05; }
.check-danger .check-icon { background: var(--danger-50); color: var(--danger); }
.unit-switch { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.unit-switch .chip { padding: 4px 10px; }

/* ---------- Comparison ---------- */
.compare-wrap { max-width: 100%; }
.compare-table { min-width: calc(150px + var(--cols, 2) * 170px); table-layout: fixed; }
.compare-table th, .compare-table td { width: 170px; }
.compare-table .cmp-label { position: sticky; left: 0; z-index: 1; width: 150px; background: var(--paper-2); text-transform: none; letter-spacing: 0; font-size: 0.86rem; color: var(--ink); white-space: normal; }
.compare-table thead th { white-space: normal; text-transform: none; letter-spacing: 0; font-size: 0.86rem; color: var(--ink); background: var(--surface); vertical-align: bottom; }
.cmp-figure { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-sm); aspect-ratio: 5 / 4; margin-bottom: 6px; }
.cmp-figure svg { width: 100%; height: 100%; }
.compare-table tr.cmp-diff td { background: #fff7e6; }
.compare-table tr.cmp-diff th { background: #fbe9c6; }
.diff-mark { display: inline-block; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: #7a4c05; background: var(--amber-50); border: 1px solid #ecd3a2; border-radius: 4px; padding: 0 4px; }

/* ---------- Requests progress ---------- */
.stepper { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); counter-reset: none; }
.step { display: flex; gap: 6px; align-items: center; font-size: 0.82rem; color: var(--ink-3); border-top: 3px solid var(--line); padding-top: 6px; }
.step-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); flex: none; }
.step-done { color: var(--ok); border-top-color: var(--ok); }
.step-done .step-dot { background: var(--ok); }
.step-current { color: var(--blue-700); font-weight: 700; border-top-color: var(--blue); }
.step-current .step-dot { background: var(--blue); box-shadow: 0 0 0 3px var(--blue-100); }
.step-skipped { color: var(--ink-3); font-style: italic; border-top-style: dashed; }
.notice-card { border-color: #ecd3a2; background: #fffcf4; }
.request-card h2 a { color: var(--ink); }

/* ---------- Deadlines, import review ---------- */
.deadline-kv { margin: 0; }
.issue-list { margin: 6px 0 0; padding-left: 18px; font-size: 0.84rem; color: #6d1f19; }
table.data tr.row-flag td { background: #fff8f6; }
table.data tr.row-flag td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.import-card summary { cursor: pointer; }
.import-card[open] { box-shadow: var(--shadow); }
input.readonly { background: var(--paper); color: var(--ink-2); }
@media (min-width: 640px) { .form-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.form-grid-4 { display: grid; gap: 14px; }
@media (max-width: 720px) {
  table.table-stack td > .btn-row { justify-content: flex-end; }
  table.table-stack td .issue-list, table.table-stack td > div { text-align: left; }
  .review-table td[data-label="Resolved product"] { display: block; text-align: left; }
}

/* Long labels wrap instead of widening the page on phones. */
.badge { white-space: normal; max-width: 100%; }
.kv dd { min-width: 0; overflow-wrap: anywhere; }
.empty .btn, .notice .btn, .card-flat .btn, .path-card .btn { white-space: normal; }
.est-kv { gap: 2px 8px; }
.est-kv dt { font-size: 0.8rem; }

/* =================== Phase 2 =================== */

/* ---------- Homepage hero with first-screen search ---------- */
.hero-finder .container { display: grid; gap: 20px; padding-top: 22px; padding-bottom: 26px; align-items: center; }
@media (min-width: 900px) { .hero-finder .container { grid-template-columns: minmax(0, 1fr) 200px; padding-top: 32px; padding-bottom: 32px; } }
.hero-finder h1 { font-size: clamp(1.8rem, 4.6vw, 2.7rem); margin-bottom: 0.3em; }
.hero-main .search-hero { max-width: 720px; margin-top: 8px; }
.lead-compact { font-size: 1rem; margin-bottom: 4px; max-width: 62ch; }
.hero-hint { margin: 6px 0 12px; }
.hero-paths { display: grid; gap: 10px; max-width: 720px; }
@media (min-width: 560px) { .hero-paths { grid-template-columns: 1fr 1fr; } }
.path-link { display: flex; gap: 10px; align-items: flex-start; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 10px 12px; }
.path-link:hover { border-color: var(--blue); color: var(--ink); }
.path-link > span:last-child { display: flex; flex-direction: column; }
.path-link .icon { width: 36px; height: 36px; flex: none; border-radius: 8px; background: var(--blue-50); color: var(--blue); display: grid; place-items: center; }
.hero-tour { margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.hero-mini { display: none; }
@media (min-width: 900px) { .hero-mini { display: block; background: var(--paper-2); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; } .hero-mini svg { display: block; width: 100%; height: auto; } }

/* ---------- Demo strip: help + training ---------- */
.help-btn { font: inherit; font-size: 0.82rem; font-weight: 700; display: inline-flex; gap: 6px; align-items: center; background: #f6f3ec; color: var(--ink); border: 1px solid #8b8478; border-radius: 999px; padding: 3px 10px; cursor: pointer; }
.help-btn:hover { background: #fff; }
.help-exit { background: var(--amber-50); }
.training-pill { display: inline-flex; align-items: center; gap: 6px; background: #d9ecff; color: #0f2f4d; border-radius: 999px; padding: 2px 10px; font-weight: 700; font-size: 0.8rem; }
.training-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.demo-strip.is-training { background: #142a40; }
.link-btn { font: inherit; background: none; border: 0; padding: 0; color: #f0ece4; text-decoration: underline; cursor: pointer; }

/* ---------- Grouped owner navigation ---------- */
.subnav-owner .subnav-wide { display: none; }
.subnav-owner .subnav-narrow { display: block; padding-top: 6px; padding-bottom: 6px; }
@media (min-width: 900px) {
  .subnav-owner .subnav-wide { display: flex; flex-wrap: wrap; gap: 4px 14px; padding-top: 6px; padding-bottom: 6px; overflow: visible; }
  .subnav-owner .subnav-narrow { display: none; }
}
.subnav-group { display: flex; align-items: center; gap: 2px; padding-right: 10px; border-right: 1px solid var(--line); }
.subnav-group:last-child { border-right: 0; }
.subnav-menu summary { cursor: pointer; font-weight: 600; padding: 6px 0; list-style-position: inside; }
.subnav-menu-groups { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 8px 0 4px; }
.subnav-menu-groups > div { display: flex; flex-direction: column; }
.subnav-menu-groups a { padding: 6px 8px; border-radius: var(--radius-sm); text-decoration: none; color: var(--ink-2); font-weight: 600; }
.subnav-menu-groups a[aria-current="page"] { background: var(--surface); color: var(--blue-700); }

/* ---------- Owner attention list ---------- */
.attention-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.attention-item { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-left: 4px solid var(--line-2); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--surface); }
.attention-item.tone-danger { border-left-color: var(--danger); }
.attention-item.tone-amber { border-left-color: var(--amber); }
.attention-item.tone-info { border-left-color: var(--info); }
.attention-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 320px; }
.attention-kind .badge { font-size: 0.72rem; }

/* ---------- Deadlines (compact) ---------- */
.deadline-table tr.detail-row td { padding-top: 0; background: #fcfbf8; }
.deadline-table tr.detail-row:hover td { background: #fcfbf8; }
.deadline-table details > summary { cursor: pointer; color: var(--blue-700); padding: 4px 0; }
@media (max-width: 720px) { .deadline-table tr.detail-row td::before { content: none; } }

/* ---------- Identification ---------- */
.type-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.type-choice { flex-direction: column; }
.type-choice > input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.type-choice { position: relative; }
.type-choice:focus-within { box-shadow: var(--focus); }
.type-art { display: block; width: 100%; aspect-ratio: 5 / 3; background: var(--paper-2); border-radius: 6px; overflow: hidden; }
.type-art svg { width: 100%; height: 100%; }
.type-unsure { display: grid; place-items: center; height: 100%; font-size: 2.4rem; font-weight: 800; color: var(--blue); }
.choice-unsure { border-style: dashed; }
.check-diff { background: #fff3d6; border-radius: 3px; padding: 0 3px; }
.check-danger .check-diff { background: #fde4e1; }
.near-misses summary { cursor: pointer; }
.tol-table input { width: 64px; }
.tol-pair { display: flex; gap: 4px; }

/* ---------- Part picker ---------- */
.picker { position: relative; min-width: 220px; }
.picker-list { list-style: none; margin: 4px 0 0; padding: 4px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface); max-height: 260px; overflow-y: auto; box-shadow: var(--shadow); text-align: left; }
.picker-option { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px; border-radius: 4px; cursor: pointer; }
.picker-option[aria-selected="true"], .picker-option:hover { background: var(--blue-50); outline: 2px solid var(--blue); outline-offset: -2px; }
.picker-note { padding: 6px 8px; font-size: 0.84rem; color: #6d4805; background: var(--amber-50); border-radius: 4px; margin-bottom: 4px; }
.picker-status { color: var(--ink-3); min-height: 1em; text-align: left; }
@media (max-width: 720px) { table.table-stack td .picker { width: 100%; } table.table-stack td[data-label="Product"] { display: block; } }

/* ---------- Guided tour ---------- */
.tour-root { position: relative; z-index: 300; }
.tour-ring { position: fixed; z-index: 301; pointer-events: none; border-radius: 8px; box-shadow: 0 0 0 3px #f2b84b, 0 0 0 6px rgba(33, 36, 41, 0.85), 0 0 0 9999px rgba(20, 22, 26, 0.18); transition: all 0.18s ease; }
.tour-panel { position: fixed; z-index: 302; right: 16px; bottom: 16px; width: min(400px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow-y: auto; background: #16212e; color: #f4f1ea; border-radius: 12px; padding: 14px 16px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35); font-size: 0.92rem; }
.tour-panel.at-top { bottom: auto; top: 16px; }
.tour-panel.at-left { right: auto; left: 16px; }
.tour-panel a { color: #bfe0ff; }
.tour-panel h2 { color: #fff; font-size: 1.1rem; margin: 4px 0 8px; }
.tour-panel h2:focus-visible { box-shadow: 0 0 0 3px #f2b84b; }
.tour-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.tour-chapter { font-size: 0.76rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #cdd8e3; }
.tour-icon-btn { font: inherit; font-size: 0.8rem; background: transparent; color: #f4f1ea; border: 1px solid #5c6b7a; border-radius: 6px; padding: 2px 8px; cursor: pointer; }
.tour-progress { height: 6px; background: #2e3d4d; border-radius: 99px; overflow: hidden; margin: 8px 0 4px; }
.tour-progress > span { display: block; height: 100%; background: #f2b84b; }
.tour-steppos { margin: 0 0 6px; color: #cdd8e3; }
.tour-kind { display: inline-block; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; border-radius: 4px; padding: 2px 6px; }
.kind-look { background: #2e3d4d; color: #e4ebf2; }
.kind-do { background: #f2b84b; color: #2b1d00; }
.kind-optional { background: #3e5a43; color: #e4f4e7; }
.kind-warn { background: #7a2d26; color: #ffe9e6; }
.tour-text { margin: 0; display: grid; gap: 2px; }
.tour-text dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: #f2c46d; font-weight: 800; margin-top: 6px; }
.tour-text dd { margin: 0; line-height: 1.45; }
.tour-needs { background: #233447; border-left: 3px solid #f2b84b; padding: 6px 8px; border-radius: 4px; }
.tour-more summary { cursor: pointer; color: #bfe0ff; margin-top: 8px; }
.tour-terms { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.tour-term { font: inherit; font-size: 0.8rem; background: transparent; color: #bfe0ff; border: 1px dashed #6f8aa6; border-radius: 999px; padding: 1px 8px; cursor: pointer; }
.tour-term[aria-expanded="true"] { background: #233447; border-style: solid; }
.tour-term-def { background: #233447; border-radius: 6px; padding: 8px; margin: 6px 0 0; }
.tour-wait { margin: 10px 0 0; padding: 8px; border-radius: 6px; background: #3b2f12; color: #ffe7b0; }
.tour-wait.is-done { background: #1f3d29; color: #d7f5df; }
.tour-wait.nudge { outline: 2px solid #f2b84b; }
.tour-foot { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px solid #2e3d4d; }
.tour-panel .btn-secondary { background: #233447; color: #f4f1ea; border-color: #5c6b7a; }
.tour-panel .btn-ghost { color: #bfe0ff; }
.tour-panel .btn-ghost:hover { background: #233447; color: #fff; }
.tour-panel .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.tour-keys { margin: 8px 0 0; color: #a9b6c3; }
.tour-panel .muted { color: #b4c0cc; }
.tour-panel.is-min { width: auto; padding: 6px; background: transparent; box-shadow: none; overflow: visible; }
.tour-panel.is-min .btn { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3); white-space: normal; max-width: calc(100vw - 32px); }
.tour-chapter-list { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.tour-chapter-list li { display: flex; gap: 10px; justify-content: space-between; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; }
.tour-panel .tour-chapter-list li { border-color: #2e3d4d; }
.tour-chapter-list.compact li { padding: 4px 8px; }
.tour-checklist { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 4px; }
.tour-checklist li { display: flex; gap: 8px; align-items: center; }
.tour-checklist li > span:nth-child(2) { flex: 1; }
.tour-checklist li.is-done > span:first-child { color: #8fe3a5; font-weight: 800; }
.tour-welcome { font-size: 1.05rem; }
@media (max-width: 719px) {
  .tour-panel { left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 46vh; padding: 10px 12px; }
  .tour-panel.at-top, .tour-panel.at-left { top: auto; left: 8px; bottom: 8px; }
  .tour-text dt { margin-top: 4px; }
  .tour-keys { display: none; }
}
@media (prefers-reduced-motion: reduce) { .tour-ring { transition: none; } }
@media print { .tour-root { display: none !important; } }

.subnav-owner .subnav-wide { gap: 2px 8px; }
.subnav-owner .subnav-group { padding-right: 6px; }
.subnav-owner .subnav-wide a { padding: 6px 8px; font-size: 0.88rem; }
.subnav-owner .subnav-label { font-size: 0.68rem; padding-right: 2px; }
