/*
 * package_builder.css — Package-Builder (C8b) components.
 *
 * Three foundational pieces, grounded in DM's design system (tokens.css):
 *   1. .pkb-optcard  — selectable option card (single / multi select)
 *   2. .pkb-vrail    — vertical step rail (current / done / upcoming)
 *   3. .diveos-sidebar.is-collapsed — 68px icon-rail collapse mode
 *
 * Token-only. Durations use DM's --t-fast/--t-med/--t-slow; easing uses
 * --ease-out-quart. No raw hex, no --space-* (DM has no space scale → raw px).
 *
 * Source spec: Design/design_handoff_package_builder/components/*.md
 */

/* ─── 1. Option card ───────────────────────────────────────────────── */
.pkb-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pkb-optcard {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1.5px solid var(--hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: border-color var(--t-fast) ease,
              background var(--t-fast) ease,
              transform var(--t-fast) ease,
              box-shadow var(--t-fast) ease;
}
.pkb-optcard:hover {
  border-color: var(--accent-border);
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}
.pkb-optcard.is-on {
  border-color: var(--accent);
  background: var(--accent-softer);
}
.pkb-optcard:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.pkb-optcard__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pkb-optcard__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.pkb-optcard__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-md);
  letter-spacing: -0.01em;
  color: var(--ink);
}
.pkb-optcard__desc {
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: 1.4;
}
.pkb-optcard__price {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.pkb-optcard.is-on .pkb-optcard__price { color: var(--accent); }

/* check indicator — round (single) / square (multi via --square) */
.pkb-optcard__check {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--hairline-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  flex-shrink: 0;
  transition: background var(--t-fast) ease, border-color var(--t-fast) ease;
}
.pkb-optcard__check--square { border-radius: var(--radius-sm); }
.pkb-optcard.is-on .pkb-optcard__check {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--surface);
}
/* the check glyph is hidden until selected (color:transparent above) */
.pkb-optcard__check svg { width: 14px; height: 14px; }

/* ─── 2. Vertical step rail ────────────────────────────────────────── */
.pkb-vrail {
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  position: sticky;
  top: 48px;
  align-self: start;
}
.pkb-vrail__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 14px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-md);
  letter-spacing: -0.01em;
  color: var(--ink);
}
.pkb-vrail__brand .pkb-vrail__brand-ic {
  color: var(--accent);
  display: flex;
  flex-shrink: 0;
}

.pkb-vrail__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pkb-vstep {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 12px;
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  text-align: left;
  color: var(--muted);
  cursor: default;
  transition: background var(--t-fast) ease, color var(--t-fast) ease;
}
.pkb-vstep[disabled] { opacity: 0.55; cursor: not-allowed; }

/* the vertical bar (replaces a circle) */
.pkb-vstep .bar {
  flex-shrink: 0;
  width: 3px;
  height: 16px;
  border-radius: var(--radius-pill);
  background: var(--hairline-strong);
  transition: background var(--t-fast) ease, height var(--t-fast) ease,
              box-shadow var(--t-fast) ease;
}
.pkb-vstep .lbrow {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.pkb-vstep .tk {
  display: none;
  align-items: center;
  color: var(--accent);
  flex-shrink: 0;
}
.pkb-vstep .tk svg { width: 15px; height: 15px; }
.pkb-vstep .lb {
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* done — accent bar + check pip, tappable */
.pkb-vstep.is-done { color: var(--text-secondary); cursor: pointer; }
.pkb-vstep.is-done .bar { background: var(--accent); }
.pkb-vstep.is-done .tk { display: flex; }

/* nav (any reachable, non-current step) — gray hover affordance */
.pkb-vstep.is-nav { cursor: pointer; }
.pkb-vstep.is-nav:hover { background: var(--gray-100); }
.pkb-vstep.is-nav:hover .bar { background: var(--accent); }

/* on — accent-soft pill, raised halo'd bar, leading dot, bold accent label */
.pkb-vstep.is-on {
  background: var(--accent-soft);
  color: var(--accent);
  cursor: default;
}
.pkb-vstep.is-on .bar {
  height: 20px;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.pkb-vstep.is-on .lb { font-weight: 600; }
/* leading dot for the current step */
.pkb-vstep.is-on .lbrow::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  flex-shrink: 0;
}
.pkb-vstep:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.pkb-vrail__count {
  margin-top: 14px;
  padding: 0 12px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
}

/* ─── 4. Price slider (.pkb-slider) ────────────────────────────────────
   A native <input type="range"> owns value + keyboard a11y; the visible
   track/fill/thumb are positioned by the pkb-slider Stimulus controller,
   which snaps to 5%. Token-only; webkit + moz thumb/track zeroed so only
   our custom visuals show. */
.pkb-slider {
  position: relative;
  height: 24px;
  margin: 6px 0;
  display: flex;
  align-items: center;
}
/* the real range input — full-bleed, invisible, drives the value */
.pkb-slider__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  z-index: 2;
}
.pkb-slider__input:focus { outline: none; }
.pkb-slider__input::-webkit-slider-runnable-track {
  -webkit-appearance: none;
  appearance: none;
  height: 100%;
  background: transparent;
}
.pkb-slider__input::-moz-range-track { height: 100%; background: transparent; }
/* the native thumb is invisible but full-height so the whole bar is grabbable */
.pkb-slider__input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  background: transparent;
  border: 0;
}
.pkb-slider__input::-moz-range-thumb {
  width: 22px;
  height: 22px;
  background: transparent;
  border: 0;
}
/* visible track (full, gray) */
.pkb-slider__track {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--hairline-strong);
  pointer-events: none;
}
/* accent fill (cost → current value) */
.pkb-slider__fill {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 6px;
  width: 0;
  border-radius: var(--radius-pill);
  background: var(--accent);
  pointer-events: none;
}
/* draggable-looking thumb (positioned by JS via left:%) */
.pkb-slider__thumb {
  position: absolute;
  top: 50%;
  left: 0;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 2.5px solid var(--accent);
  box-shadow: var(--shadow-sm);
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: box-shadow var(--t-fast) ease;
}
.pkb-slider__thumb::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: var(--radius-pill);
  background: var(--accent);
}
.pkb-slider:hover .pkb-slider__thumb {
  box-shadow: 0 0 0 6px var(--accent-soft), var(--shadow-sm);
}
.pkb-slider__input:focus-visible ~ .pkb-slider__thumb {
  box-shadow: 0 0 0 3px var(--focus-ring), var(--shadow-sm);
}

/* ─── 5. Pill group (.pkb-pillgroup) ───────────────────────────────────
   Single-select row of pills, radio-backed (native, no JS) like the
   _segmented field. Active = accent-soft bg + accent text + accent border,
   resolved via :has() on the checked radio. */
.pkb-pillgroup {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pkb-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 15px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray-700);
  background: var(--surface);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background var(--t-fast) ease, border-color var(--t-fast) ease,
              color var(--t-fast) ease;
}
.pkb-pill:hover { border-color: var(--accent-border); }
/* visually-hidden radio (kept focusable for a11y) */
.pkb-pill__radio {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
/* active state */
.pkb-pill:has(.pkb-pill__radio:checked) {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent);
  font-weight: 600;
}
.pkb-pill:has(.pkb-pill__radio:focus-visible) {
  box-shadow: 0 0 0 3px var(--focus-ring);
}

/* ─── 6. Round checkbox (.diveos-checkbox--round) ──────────────────────
   ROUND variant of DM's square .diveos-checkbox. Native input + CSS only;
   checked = accent fill + white check glyph. The square checkbox is reused
   as-is (this only adds the circular shape + accent-fill treatment). */
.diveos-checkbox--round {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
/* visually-hidden native input (focusable, not display:none) */
.diveos-checkbox--round .pkb-checkbox__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.diveos-checkbox--round .pkb-checkbox__box {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--hairline-strong);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  flex-shrink: 0;
  transition: background var(--t-fast) ease, border-color var(--t-fast) ease;
}
.diveos-checkbox--round .pkb-checkbox__box svg { width: 14px; height: 14px; }
.diveos-checkbox--round .pkb-checkbox__input:checked + .pkb-checkbox__box {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--surface);
}
.diveos-checkbox--round .pkb-checkbox__input:focus-visible + .pkb-checkbox__box {
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.diveos-checkbox--round .pkb-checkbox__label {
  font-size: var(--text-sm);
  color: var(--ink);
}

/* ─── 4. Price slider (.pkb-slider) ────────────────────────────────────
   A native <input type="range"> owns value + keyboard a11y; the visible
   track/fill/thumb are positioned by the pkb-slider Stimulus controller,
   which snaps to 5%. Token-only; webkit + moz thumb/track zeroed so only
   our custom visuals show. */
.pkb-slider {
  position: relative;
  height: 24px;
  margin: 6px 0;
  display: flex;
  align-items: center;
}
/* the real range input — full-bleed, invisible, drives the value */
.pkb-slider__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  z-index: 2;
}
.pkb-slider__input:focus { outline: none; }
.pkb-slider__input::-webkit-slider-runnable-track {
  -webkit-appearance: none;
  appearance: none;
  height: 100%;
  background: transparent;
}
.pkb-slider__input::-moz-range-track { height: 100%; background: transparent; }
/* the native thumb is invisible but full-height so the whole bar is grabbable */
.pkb-slider__input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  background: transparent;
  border: 0;
}
.pkb-slider__input::-moz-range-thumb {
  width: 22px;
  height: 22px;
  background: transparent;
  border: 0;
}
/* visible track (full, gray) */
.pkb-slider__track {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--hairline-strong);
  pointer-events: none;
}
/* accent fill (cost → current value) */
.pkb-slider__fill {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 6px;
  width: 0;
  border-radius: var(--radius-pill);
  background: var(--accent);
  pointer-events: none;
}
/* draggable-looking thumb (positioned by JS via left:%) */
.pkb-slider__thumb {
  position: absolute;
  top: 50%;
  left: 0;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 2.5px solid var(--accent);
  box-shadow: var(--shadow-sm);
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: box-shadow var(--t-fast) ease;
}
.pkb-slider__thumb::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: var(--radius-pill);
  background: var(--accent);
}
.pkb-slider:hover .pkb-slider__thumb {
  box-shadow: 0 0 0 6px var(--accent-soft), var(--shadow-sm);
}
.pkb-slider__input:focus-visible ~ .pkb-slider__thumb {
  box-shadow: 0 0 0 3px var(--focus-ring), var(--shadow-sm);
}

/* ─── 5. Pill group (.pkb-pillgroup) ───────────────────────────────────
   Single-select row of pills, radio-backed (native, no JS) like the
   _segmented field. Active = accent-soft bg + accent text + accent border,
   resolved via :has() on the checked radio. */
.pkb-pillgroup {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pkb-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 15px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray-700);
  background: var(--surface);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background var(--t-fast) ease, border-color var(--t-fast) ease,
              color var(--t-fast) ease;
}
.pkb-pill:hover { border-color: var(--accent-border); }
/* visually-hidden radio (kept focusable for a11y) */
.pkb-pill__radio {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
/* active state */
.pkb-pill:has(.pkb-pill__radio:checked) {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent);
  font-weight: 600;
}
.pkb-pill:has(.pkb-pill__radio:focus-visible) {
  box-shadow: 0 0 0 3px var(--focus-ring);
}

/* ─── 6. Round checkbox (.diveos-checkbox--round) ──────────────────────
   ROUND variant of DM's square .diveos-checkbox. Native input + CSS only;
   checked = accent fill + white check glyph. The square checkbox is reused
   as-is (this only adds the circular shape + accent-fill treatment). */
.diveos-checkbox--round {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
/* visually-hidden native input (focusable, not display:none) */
.diveos-checkbox--round .pkb-checkbox__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.diveos-checkbox--round .pkb-checkbox__box {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--hairline-strong);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  flex-shrink: 0;
  transition: background var(--t-fast) ease, border-color var(--t-fast) ease;
}
.diveos-checkbox--round .pkb-checkbox__box svg { width: 14px; height: 14px; }
.diveos-checkbox--round .pkb-checkbox__input:checked + .pkb-checkbox__box {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--surface);
}
.diveos-checkbox--round .pkb-checkbox__input:focus-visible + .pkb-checkbox__box {
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.diveos-checkbox--round .pkb-checkbox__label {
  font-size: var(--text-sm);
  color: var(--ink);
}

/* ─── 7. Guided builder layout (C8b shell) ─────────────────────────────
   Three zones inside the app content area: left vertical step rail (236px),
   centered conversational column (max 660px), right live-summary rail
   (296px). A sticky footer spans the full width. Spec: flow-c8b.md.
   The app sidebar is collapsed on entry (see §3). Token-only. */
/* full-bleed: the wizard layout removes the centered 1280px content cap so the
   three-zone grid spans the whole main pane (rail hard-left, summary hard-right) */
.diveos-content--full {
  max-width: none;
  margin-inline: 0;
  padding: 0;
}

.pkb-guided {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 1px);
  background: var(--canvas);
}

.pkb-guided__grid {
  flex: 1;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr) 296px;
  gap: 56px;
  padding: 48px 56px 56px;
  align-items: start;
}

/* center conversational column — centered, capped at 660px */
.pkb-guided__center {
  min-width: 0;
  display: flex;
  justify-content: center;
}
.pkb-guided-inner {
  width: 100%;
  max-width: 660px;
  text-align: center;
}

/* shared step chrome */
.pkb-guided .step-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 14px;
}
.pkb-guided-q {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.12;
  color: var(--ink);
  margin: 0;
}
.pkb-guided-help {
  margin-top: 14px;
  font-size: var(--text-md);
  line-height: 1.5;
  color: var(--muted);
}
/* step bodies sit left-aligned within the centered column */
.pkb-guided-body {
  margin-top: 32px;
  text-align: left;
}
/* centered variant — for short single-decision bodies (pills, big field) that
   should sit under the centered question rather than left-aligned */
.pkb-guided-body--center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.pkb-guided-body--center .pkb-pillgroup { justify-content: center; }

/* big underline field (Name step) */
.pkb-bigfield {
  margin-top: 32px;
}
.pkb-bigfield__input {
  display: block;
  width: 100%;
  text-align: center;
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--hairline);
  border-radius: 0;
  padding: 10px 0;
  transition: border-color var(--t-fast) ease;
}
.pkb-bigfield__input::placeholder { color: var(--input-placeholder); }
.pkb-bigfield__input:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

/* inline header row (e.g. duration/pax on the Dives step) */
.pkb-inline-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 20px;
  padding-bottom: 22px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--hairline);
}
.pkb-inline-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pkb-inline-field__label {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.pkb-inline-field__control {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pkb-num {
  width: 64px;
  padding: 7px 10px;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--ink);
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  transition: border-color var(--t-fast) ease, box-shadow var(--t-fast) ease;
}
.pkb-num:focus {
  outline: none;
  border-color: var(--input-border-focus);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.pkb-inline-field__suffix { font-size: var(--text-sm); color: var(--muted); }

/* native toggle (flexible duration) */
.pkb-toggle { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.pkb-toggle__input { position: absolute; opacity: 0; width: 0; height: 0; }
.pkb-toggle__track {
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: var(--radius-pill);
  background: var(--hairline-strong);
  transition: background var(--t-fast) ease;
  flex-shrink: 0;
}
.pkb-toggle__track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-fast) ease;
}
.pkb-toggle__input:checked + .pkb-toggle__track { background: var(--accent); }
.pkb-toggle__input:checked + .pkb-toggle__track::after { transform: translateX(16px); }
.pkb-toggle__input:focus-visible + .pkb-toggle__track { box-shadow: 0 0 0 3px var(--focus-ring); }
.pkb-toggle__state { font-size: var(--text-sm); color: var(--muted); }

/* review ledger (Review step) */
.pkb-guided-review {
  /* matches the DS card stroke (.bk-detail .balance-card): border-only, no
     shadow, radius-lg, clipped corners. Centered within the review column. */
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 560px;
  margin-inline: auto;
}
.pkb-guided-review .rr {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 22px;
  border-top: 1px solid var(--hairline-2);
}
.pkb-guided-review .rr:first-child { border-top: 0; }
.pkb-guided-review .rr .ic { color: var(--accent); display: flex; flex-shrink: 0; }
.pkb-guided-review .rr .k { flex: 1; min-width: 0; color: var(--muted); font-size: var(--text-sm); }
.pkb-guided-review .rr .v { color: var(--ink); font-size: var(--text-sm); font-weight: 500; text-align: right; }
.pkb-guided-review .rr .v.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.pkb-guided-review .rr .v.is-profit { color: var(--confirmed); font-weight: 700; }
/* component-summary row: small uppercase category tag before the item name */
.pkb-guided-review .rr .rr-cat {
  font-family: var(--font-mono); font-size: var(--text-2xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted-2);
  margin-right: 8px;
}

/* count chip (multi-select steps) */
.pkb-guided-count {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-pill);
}

/* sticky footer — spans full width below the grid */
.pkb-guided-foot {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  background: var(--surface);
  border-top: 1px solid var(--hairline);
}
.pkb-guided-hintrow {
  font-size: var(--text-sm);
  color: var(--muted-2);
}

/* footer status segmented control */
.pkb-foot-div { width: 1px; height: 22px; background: var(--hairline); }
.pkb-statusfield { display: inline-flex; align-items: center; gap: 10px; }
.pkb-statusfield__lbl {
  font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-2);
}
.pkb-statusseg {
  display: inline-flex; padding: 2px; gap: 2px;
  background: var(--surface-alt); border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
}
.pkb-statusseg__opt {
  appearance: none; border: 0; cursor: pointer;
  padding: 5px 14px; border-radius: var(--radius-pill);
  font-family: var(--font-sans); font-size: var(--text-sm); font-weight: 600;
  color: var(--muted); background: transparent;
  transition: color var(--t-fast) ease, background var(--t-fast) ease;
}
.pkb-statusseg__opt:hover { color: var(--ink); }
.pkb-statusseg__opt.is-on {
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm);
}
.pkb-statusseg__opt[data-active="true"].is-on { color: var(--confirmed); }
/* Tailwind's .hidden (display:none) loses to .diveos-button (display:inline-flex)
   on source order — so the wizard controller's hide of Back/Continue/Publish was
   visually ignored. Re-assert it with a footer-scoped, higher-specificity rule. */
.pkb-guided-foot .diveos-button.hidden { display: none; }
.pkb-kbd {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  padding: 2px 6px;
  background: var(--gray-100);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  color: var(--muted);
}

/* summary rail (right, 296px) — package roll-up + economics */
.pkb-summary {
  position: sticky;
  top: 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pkb-summary__card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 16px 18px;
}
/* section header: uppercase mono eyebrow + optional status pill */
.pkb-summary__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.pkb-summary__eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-2);
}
.pkb-summary__draftpill {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--muted);
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
}

/* icon roll-up line: soft accent tile · two-line label · trailing value */
.pkb-summary__line {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
}
.pkb-summary__line + .pkb-summary__line { border-top: 1px solid var(--hairline-2); }
.pkb-summary__line-ic {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pkb-summary__line-ic svg { width: 17px; height: 17px; }
.pkb-summary__line-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pkb-summary__line-main { font-size: var(--text-sm); font-weight: 600; color: var(--ink); }
.pkb-summary__line-sub { font-size: var(--text-xs); color: var(--muted); }
.pkb-summary__line-val {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

/* SELLING PRICE block — accent-soft, sits at the foot of the roll-up card */
.pkb-summary__sell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px -18px -16px;
  padding: 14px 18px;
  background: var(--accent-soft);
  border-top: 1px solid var(--accent-border);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.pkb-summary__sell .pkb-summary__eyebrow { color: var(--accent); }
.pkb-summary__sell-v {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
}

/* economics rows */
.pkb-summary__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: var(--text-sm);
}
.pkb-summary__row .k { color: var(--muted); }
.pkb-summary__row .v {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  font-weight: 600;
  text-align: right;
}
.pkb-summary__row--accent .v { color: var(--accent); }
.pkb-summary__divider { height: 1px; background: var(--hairline-2); margin: 6px 0; }

/* responsive: drop the summary rail, then the step rail, on narrow viewports */
@media (max-width: 1180px) {
  .pkb-guided__grid { grid-template-columns: 200px minmax(0, 1fr); gap: 40px; }
  .pkb-summary { display: none; }
}
@media (max-width: 820px) {
  .pkb-guided__grid { grid-template-columns: minmax(0, 1fr); padding: 28px 24px 40px; }
  .pkb-guided .pkb-vrail { display: none; }
}

/* ─── 8. Pricer (Price step) ───────────────────────────────────────────
   The C8b markup pricer: big editable price · Recommended snap · quick-add ·
   markup slider (reuses .pkb-slider) · margin chip. Centered, compact so it
   never overflows the sticky footer. Token-only. */
.pkb-pricer {
  max-width: 540px;
  margin: 32px auto 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* big editable price */
.pkb-pricefield {
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  border-bottom: 2px solid var(--hairline);
  transition: border-color var(--t-fast) ease;
}
.pkb-pricefield:focus-within { border-color: var(--accent); }
.pkb-pricefield__cur {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 600;
  color: var(--muted-2);
  margin-top: 8px;
}
.pkb-price-input {
  width: 4ch;
  field-sizing: content;
  min-width: 2ch;
  max-width: 9ch;
  border: 0;
  padding: 4px 0;
  background: transparent;
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.pkb-price-input:focus { outline: none; }
.pkb-pricer__sub {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--muted);
}

/* Recommended snap button */
.pkb-recbtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 24px;
  padding: 13px 16px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-softer);
  border: 1.5px solid var(--accent-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--t-fast) ease, color var(--t-fast) ease, border-color var(--t-fast) ease;
}
.pkb-recbtn:hover { border-color: var(--accent); }
.pkb-recbtn.is-on {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--surface);
}
.pkb-recbtn__v { font-family: var(--font-mono); }

/* quick-add row */
.pkb-quickrow {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 12px;
}
.pkb-quickrow__lbl {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-2);
  flex-shrink: 0;
}
.pkb-quickbtn {
  flex: 1;
  padding: 10px 0;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--hairline);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--t-fast) ease, border-color var(--t-fast) ease, color var(--t-fast) ease;
}
.pkb-quickbtn:hover { border-color: var(--accent-border); }
.pkb-quickbtn.is-on { color: var(--accent); background: var(--accent-soft); border-color: var(--accent); }

/* slider + scale */
.pkb-pricer__slider { width: 100%; margin-top: 26px; }
.pkb-pricer__scale {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pkb-pricer__scale b { font-weight: 700; display: inline-block; margin-top: 2px; }
.pkb-pricer__scale .lo { color: var(--muted-2); text-align: left; }
.pkb-pricer__scale .mid { color: var(--confirmed); text-align: center; }
.pkb-pricer__scale .hi { color: var(--muted-2); text-align: right; }

/* live margin chip — green */
.pkb-guided-marginchip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 22px;
  padding: 8px 16px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--confirmed);
  background: var(--confirmed-bg);
  border: 1px solid var(--confirmed-border);
  border-radius: var(--radius-pill);
}
/* no cost yet → muted prompt instead of a fake green margin */
.pkb-guided-marginchip.is-muted {
  color: var(--muted);
  background: var(--surface-alt);
  border-color: var(--hairline);
}

/* ─── 9. Dives catalogue picker (Dives step) ───────────────────────────
   Spec: components/dive-catalogue.md. dv2-/dv- prefixed (bare .row/.chip/.meta
   collide with global app CSS). Token-only. */

/* widen + left-align the centered column for the picker (set by the wizard
   controller when the shown step opts in via data-wide) */
.pkb-guided-inner.has-picker { max-width: 720px; text-align: left; }
.pkb-guided-inner.has-picker .step-eyebrow,
.pkb-guided-inner.has-picker .pkb-guided-q,
.pkb-guided-inner.has-picker .pkb-guided-help { text-align: center; }

/* duration toolbar — exact to "Duration Toolbar - Spec (standalone)".
   One content-width container, cells split by a light (--hairline-2) divider;
   Fixed/Flexible pill toggle; − [value] + steppers with a .val display span. */
.dv-durbar {
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 28px;
  align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  overflow: hidden;
  font-family: var(--font-sans);
}
.dv-cseg {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 18px;
  border-left: 1px solid var(--hairline-2);
}
.dv-cseg:first-child { border-left: 0; padding-left: 20px; }
.dv-cseg:last-child { padding-right: 20px; }
.dv-cseg[hidden] { display: none; }
.dv-clabel {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

/* Fixed/Flexible segmented toggle — pill */
.dv-segtog {
  display: inline-flex;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.dv-segtog button {
  height: 32px;
  padding: 0 14px;
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: background var(--t-fast) ease, color var(--t-fast) ease;
}
.dv-segtog button.on {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

/* − [value] + stepper */
.dv-cstep { display: inline-flex; align-items: center; gap: 1rem; }
.dv-cstep button {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted-2);
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--t-fast) ease, border-color var(--t-fast) ease, color var(--t-fast) ease;
}
.dv-cstep button:hover:not(:disabled) { background: var(--surface-alt); border-color: var(--accent-border); color: var(--ink); }
.dv-cstep button:disabled { opacity: 0.5; cursor: default; }
.dv-cstep .val {
  min-width: 2.5rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--ink);
}
.dv-cstep .val .un {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--muted);
  margin-left: 3px;
}
.pkb-stepper__unit { font-size: var(--text-xs); color: var(--muted); }

/* picker controls */
.dv2-pick { text-align: left; margin-top: 8px; }
.dv2-results { margin-top: 18px; }

.dv2-seg {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow-x: auto;
}
.dv2-seg-btn {
  flex: 1;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}
.dv2-seg-btn .c { font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 600; opacity: 0.8; }
.dv2-seg-btn.is-on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm); }
.dv2-seg-btn.is-on .c { color: var(--accent); opacity: 1; }

.dv-search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
}
.dv-search:focus-within { border-color: var(--input-border-focus); box-shadow: 0 0 0 3px var(--focus-ring); }
.dv-search .ico { color: var(--muted-2); display: flex; flex-shrink: 0; }
.dv-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: inherit; font-size: var(--text-sm); color: var(--ink); }
.dv-search input::placeholder { color: var(--muted-2); }
.dv-search .clr {
  display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border: 0; border-radius: var(--radius-pill);
  background: var(--gray-100); color: var(--muted); cursor: pointer; flex-shrink: 0;
}
.dv-search .clr:hover { background: var(--gray-200); color: var(--ink); }

/* group label */
.dv-grouplabel { display: flex; align-items: center; gap: 9px; margin: 38px 2px 12px; }
/* only the very first group's label is flush — every later group keeps its
   top margin so sections are clearly separated (NOT :first-child, which would
   match every group's label since each is first inside its own group div). */
.dv2-results > [data-dv-group]:first-child .dv-grouplabel { margin-top: 0; }
.dv-grouplabel .t { font-size: var(--text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.dv-grouplabel .ln { flex: 1; height: 1px; background: var(--hairline-2); }
.dv-grouplabel .c { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--muted-2); }

/* dense selectable row */
.dv-rows { display: flex; flex-direction: column; gap: 6px; }
.dv-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 14px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  transition: border-color var(--t-fast) ease, background var(--t-fast) ease;
}
.dv-row:hover { border-color: var(--accent-border); }
.dv-row.is-on { border-color: var(--accent); background: var(--accent-softer); }
.dv-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.dv-row .box {
  width: 20px; height: 20px; border-radius: 6px; flex-shrink: 0;
  border: 1.5px solid var(--hairline-strong); background: var(--surface);
  display: flex; align-items: center; justify-content: center; color: transparent;
}
.dv-row.is-on .box { background: var(--accent); border-color: var(--accent); color: var(--surface); }
.dv-row .dv-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dv-row .nm { font-size: var(--text-sm); font-weight: 600; color: var(--ink); }
.dv-row .meta { font-size: var(--text-xs); color: var(--muted); line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dv-row .pr { font-family: var(--font-mono); font-size: var(--text-sm); font-weight: 600; color: var(--ink); white-space: nowrap; flex-shrink: 0; }
.dv-row.is-on .pr { color: var(--accent); }

/* qty stepper (replaces price on selected rows) */
.dv-step { display: inline-flex; align-items: center; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; flex-shrink: 0; }
.dv-step button { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; border: 0; background: transparent; color: var(--gray-700); cursor: pointer; }
.dv-step button:hover { background: var(--surface-alt); color: var(--ink); }
.dv-step button:disabled { color: var(--muted-2); cursor: default; background: transparent; }
.dv-step .v { min-width: 26px; text-align: center; font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 600; color: var(--ink); }

/* equipment: note + grouped chips */
.dv-kitnote {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; margin-bottom: 16px;
  background: var(--accent-softer); border: 1px solid var(--accent-border); border-radius: var(--radius-sm);
  font-size: var(--text-sm); color: var(--gray-700); line-height: 1.5;
}
.dv-kitnote .ico { color: var(--accent); flex-shrink: 0; margin-top: 1px; }
.dv-kitnote b { color: var(--ink); font-weight: 600; }
.dv-kitgroup { margin-bottom: 18px; }
.dv-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.dv-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px;
  font: inherit; font-size: var(--text-sm); font-weight: 500; color: var(--gray-700);
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-pill);
  cursor: pointer; transition: border-color var(--t-fast) ease, background var(--t-fast) ease, color var(--t-fast) ease;
}
.dv-chip:hover { border-color: var(--accent-border); }
.dv-chip .tk {
  width: 15px; height: 15px; border-radius: var(--radius-pill); flex-shrink: 0;
  border: 1.5px solid var(--hairline-strong); display: flex; align-items: center; justify-content: center; color: transparent;
}
.dv-chip.is-on { color: var(--accent); background: var(--accent-soft); border-color: var(--accent); font-weight: 600; }
.dv-chip.is-on .tk { background: var(--accent); border-color: var(--accent); color: var(--surface); }

/* empty / no-results */
.dv-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 56px 20px; text-align: center; }
.dv-empty .t { font-size: var(--text-sm); font-weight: 600; color: var(--gray-700); }
.dv-empty .s { font-size: var(--text-sm); color: var(--muted); }

/* ─── 10. Read-only published view (packages#show) ─────────────────────
   Spec: read-only-view/pb-view.jsx + pb.css. Single-scroll detail page with a
   CSS-gradient ocean hero, bento stats, blocks, and a sticky section nav.
   Token-only; ocean blues via --sky-*, sheen via white/black alpha. */
.pkb-view {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 0 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 188px;
  gap: 40px;
  align-items: start;
}
@media (max-width: 1000px) { .pkb-view { grid-template-columns: 1fr; } .pkb-minnav { display: none; } }
.pkb-view-main { min-width: 0; display: flex; flex-direction: column; gap: 28px; }
/* Breadcrumb on the package show header uses the canonical
   .hero-show__breadcrumb component (shared/patterns/_breadcrumb); give it the
   header's spacing below the trail. */
.pkb-view-header-inner .hero-show__breadcrumb { margin-bottom: 16px; }

/* full-width header band — white surface, hairline divider below. The
   background bleeds to the content-pane edges (same calc as .dv-page-band —
   keep in sync); the inner content re-caps to the 1180 column, which is
   centered in the pane exactly like .pkb-view below, so they line up. */
.pkb-view-header {
  background: var(--surface); border-bottom: 1px solid var(--hairline);
  margin-top: -40px; /* bleed up through .diveos-content's 40px top padding */
  margin-left:  min(-48px, calc(712px - 50vw));
  margin-right: min(-48px, calc(712px - 50vw));
  padding-left:  max(48px, calc(50vw - 712px));
  padding-right: max(48px, calc(50vw - 712px));
}
@media (max-width: 1023px) { .pkb-view-header { margin-top: -56px; } }
.pkb-view-header-inner { max-width: 1180px; margin: 0 auto; padding: 18px 0 22px; }
.pkb-view-headrow {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 28px;
}
.pkb-view-header .hd-l { min-width: 0; }
.pkb-view-header .hd-title { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pkb-view-header .hd-title h1 {
  margin: 0; font-family: var(--font-display); font-weight: 600; font-size: var(--text-3xl);
  line-height: 1.1; letter-spacing: -0.02em; color: var(--ink);
}
.pkb-view-header .hd-sub { margin: 9px 0 0; font-size: var(--text-sm); color: var(--muted); max-width: 68ch; }
.pkb-view-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

/* SelectableStatusPill — DS StatusPill + chevron trigger + popover menu */
.pkb-statussel { position: relative; }
.pkb-statuspill-sel { cursor: pointer; padding-right: 8px; transition: background 120ms ease, border-color 120ms ease; }
.pkb-statuspill-sel .chev { margin-left: 1px; opacity: 0.7; }
.pkb-statuspill-sel:hover { filter: brightness(0.98); }
.pkb-statuspill-sel:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
.pkb-statusmenu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; min-width: 152px; margin: 0;
  padding: 5px; background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius); box-shadow: var(--shadow-md);
  display: none; flex-direction: column; gap: 2px;
}
.pkb-statussel.is-open .pkb-statusmenu { display: flex; }
.pkb-statusopt {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  padding: 6px 8px; background: none; border: 0; border-radius: var(--radius-sm);
  font: inherit; cursor: pointer; text-align: left;
}
.pkb-statusopt:hover { background: var(--surface-alt); }
.pkb-statusopt.on { background: var(--accent-soft); }
.pkb-statusopt .ck { color: var(--accent); flex-shrink: 0; }
.pkb-view-foot {
  display: flex; align-items: center; gap: 20px;
  margin-top: 8px; padding-top: 22px; border-top: 1px solid var(--hairline);
}

/* link-style buttons */
.pkb-linkbtn {
  display: inline-flex; align-items: center; gap: 6px; padding: 0;
  font: inherit; font-size: var(--text-sm); font-weight: 500; background: none; border: 0;
  color: var(--muted); cursor: pointer; text-decoration: none;
  transition: color var(--t-fast) ease;
}
.pkb-linkbtn.neutral:hover { color: var(--ink); }
.pkb-linkbtn.danger { color: var(--cancelled); }
.pkb-linkbtn.danger:hover { color: var(--cancelled); text-decoration: underline; }

/* sticky section mini-nav */
.pkb-minnav { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 2px; }
.pkb-minnav a {
  padding: 7px 12px; font-size: var(--text-sm); font-weight: 500; color: var(--muted);
  text-decoration: none; border-left: 2px solid var(--hairline);
  transition: color var(--t-fast) ease, border-color var(--t-fast) ease;
}
.pkb-minnav a:hover { color: var(--ink); border-left-color: var(--hairline-strong); }
.pkb-minnav a.on { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }

/* ocean hero — pure CSS gradient, no image */
.pkb-hero {
  position: relative; aspect-ratio: 16 / 6.6; border-radius: var(--radius-lg);
  overflow: hidden; border: 1px solid var(--hairline);
}
.pkb-ocean {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 70% 0%, rgba(255, 255, 255, 0.28), transparent 55%),
    linear-gradient(180deg, var(--sky-600) 0%, var(--sky-800) 38%, var(--sky-950) 100%);
}
.pkb-ocean::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 40% at 22% 14%, rgba(255, 255, 255, 0.18), transparent 60%),
    radial-gradient(40% 30% at 85% 80%, rgba(0, 0, 0, 0.35), transparent 70%);
}
/* cover image — fills the hero, sits above the gradient; if the src is broken
   the controller-free onerror removes it and the ocean placeholder shows. */
.pkb-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* bento stat grid */
.pkb-bento { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 12px; }
@media (max-width: 720px) { .pkb-bento { grid-template-columns: 1fr 1fr; } }
.pkb-bento-cell {
  padding: 22px 24px; background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.pkb-bento-cell.lead { display: flex; flex-direction: column; justify-content: center; }
.pkb-bento-cell .k { font-size: var(--text-2xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.pkb-bento-cell .v {
  font-family: var(--font-display); font-weight: 600; font-size: var(--text-2xl);
  letter-spacing: -0.02em; color: var(--ink); margin-top: 9px; line-height: 1;
}
.pkb-bento-cell.lead .v { font-size: 42px; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.pkb-bento-cell .v .u { font-size: var(--text-md); font-weight: 500; color: var(--muted); }
.pkb-bento-cell .sub { font-size: var(--text-xs); color: var(--muted); margin-top: 6px; }

/* blocks + cards — titles live INSIDE the card as the first row (initialism),
   separated from the body by a hairline. The card owns no padding; the head row
   and each section's body wrapper manage their own. */
.pkb-prose { font-size: var(--text-md); line-height: 1.65; color: var(--gray-700); max-width: 70ch; }

/* Card shell mirrors the DiveOS booking-detail card (.bk-detail .card, #67):
   radius-lg, border-only (no shadow), an icon + uppercase eyebrow head with NO
   hairline divider (padding 22/24/0), body padding 22/24. Package-scoped so the
   generic `.card` class stays owned by booking detail. */
.pkb-card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-lg); overflow: hidden; padding: 0; }
.pkb-cardhead {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 22px 24px 0;
}
.pkb-cardhead .t {
  display: flex; align-items: center; gap: 7px;
  font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink);
}
.pkb-cardhead .t svg { flex-shrink: 0; color: var(--muted-2); }
.pkb-cardhead .ct {
  font-family: var(--font-mono); font-size: var(--text-sm); font-weight: 500;
  color: var(--muted-2); white-space: nowrap;
}
/* per-section body wrappers — head has no bottom padding, so bodies own the
   gap below the eyebrow (DS card body = 22/24). */
.pkb-cardbody--pad { padding: 18px 24px 22px; }   /* highlights */
.pkb-cardbody--acc { padding: 6px 24px 14px; }     /* accommodation */
.pkb-cardrows { padding-top: 12px; }               /* items / extras row lists (rows own their inset) */
/* in-card empty state — clean muted row */
.pkb-cardempty { display: flex; align-items: center; gap: 10px; padding: 18px 24px 22px; font-size: var(--text-sm); color: var(--muted); }
.pkb-cardempty .ic { color: var(--muted-2); display: flex; flex-shrink: 0; }

/* highlights */
.pkb-vhls { columns: 2; column-gap: 32px; }
@media (max-width: 720px) { .pkb-vhls { columns: 1; } }
.pkb-vhl { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; font-size: var(--text-sm); color: var(--gray-700); line-height: 1.4; break-inside: avoid; }
.pkb-vhl .ic { color: var(--accent); flex-shrink: 0; margin-top: 1px; display: flex; }

/* item rows */
.pkb-itemrow { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-top: 1px solid var(--hairline-2); }
.pkb-itemrow:first-child { border-top: 0; }
.pkb-itemrow .kind { width: 36px; height: 36px; border-radius: var(--radius-pill); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pkb-itemrow .kind.dive { background: var(--sky-50); color: var(--sky-700); }
.pkb-itemrow .kind.equip { background: var(--gray-100); color: var(--gray-600); }
.pkb-itemrow .nm { flex: 1; font-size: var(--text-sm); font-weight: 500; color: var(--ink); }
.pkb-itemrow .qty { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--muted); }
.pkb-itemrow .type { font-size: var(--text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }

/* pricing viz */
.pkb-pviz { padding: 24px 26px; }
.pkb-pviz .sell { display: flex; align-items: baseline; gap: 12px; }
.pkb-pviz .sell .amt { font-family: var(--font-display); font-weight: 600; font-size: 38px; letter-spacing: -0.02em; color: var(--ink); }
.pkb-pviz .sell .per { font-size: var(--text-sm); color: var(--muted); }
.pkb-pviz-bar { position: relative; height: 8px; border-radius: var(--radius-pill); background: var(--gray-100); margin: 28px 0 8px; }
.pkb-pviz-bar.live { background: linear-gradient(90deg, var(--cancelled-bg), var(--confirmed-bg) 50%, var(--briefing-bg)); }
.pkb-pviz-bar .pos { position: absolute; top: -5px; width: 18px; height: 18px; border-radius: var(--radius-pill); background: var(--surface); border: 2.5px solid var(--accent); transform: translateX(-50%); box-shadow: var(--shadow-sm); }
.pkb-pviz-bar .pos::after { content: ""; position: absolute; inset: 3.5px; border-radius: var(--radius-pill); background: var(--accent); }
.pkb-pviz-scale { display: flex; justify-content: space-between; font-size: var(--text-xs); }
.pkb-pviz-scale .s { display: flex; flex-direction: column; gap: 2px; }
.pkb-pviz-scale .s.mid { align-items: center; }
.pkb-pviz-scale .s.end { align-items: flex-end; }
.pkb-pviz-scale .lbl { font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted-2); }
.pkb-pviz-scale .val { font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: var(--ink); }
.pkb-pviz-scale.muted .val { color: var(--muted-2); }

/* accommodation */
.pkb-acc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.pkb-acc-head .ic { color: var(--accent); display: flex; }
.pkb-acc-head .nm { font-size: var(--text-md); font-weight: 600; color: var(--ink); }
.pkb-acc-head .meta { margin-left: auto; font-size: var(--text-xs); color: var(--muted); }
.pkb-acc-rate { display: grid; gap: 0; padding: 4px 0; }
.pkb-acc-line { display: flex; align-items: baseline; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--hairline-2); }
.pkb-acc-line:first-child { border-top: 0; }
.pkb-acc-line .k { font-size: var(--text-sm); color: var(--gray-700); }
.pkb-acc-line .v { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--text-sm); color: var(--ink); }

/* extras tiles */
.pkb-pmstile { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-top: 1px solid var(--hairline-2); }
.pkb-pmstile:first-child { border-top: 0; }
.pkb-pmstile .q { width: 34px; height: 34px; border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 700; flex-shrink: 0; }
.pkb-pmstile .nm { flex: 1; font-size: var(--text-sm); font-weight: 500; color: var(--ink); }
.pkb-pmstile .amt { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--text-sm); color: var(--ink); white-space: nowrap; }
.pkb-pmstile .amt .each { font-size: var(--text-xs); color: var(--muted-2); }

/* gate note */
.pkb-gate-note { display: flex; align-items: center; gap: 10px; padding: 14px 18px; background: var(--gray-50); border: 1px dashed var(--hairline-strong); border-radius: var(--radius); font-size: var(--text-sm); color: var(--muted); }
.pkb-gate-note .ic { color: var(--muted-2); flex-shrink: 0; display: flex; }

/* ============================================================
   11 · STORY step (story-step.md) — st-form
   Diver-facing marketing copy: short desc, long desc (Trix,
   restyled into .st-editor), cover image, highlights list.
   Lives inside the data-wide centered column (720px, left form).
   ============================================================ */
.st-form { text-align: left; display: flex; flex-direction: column; gap: 30px; margin-top: 36px; }
.st-block { display: flex; flex-direction: column; gap: 9px; }
.st-blockhead { display: flex; justify-content: space-between; align-items: baseline; }
.st-label { font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.st-counter { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--muted-2); }
.st-counter.over { color: var(--error); }
.st-hint { margin: 0; font-size: var(--text-xs); line-height: 1.5; color: var(--muted-2); }

/* shared input recipe (short desc + add-a-highlight) */
.st-input,
.st-hladd input {
  height: 40px; padding: 0 13px; box-sizing: border-box;
  font-family: var(--font-sans); font-size: var(--text-sm); color: var(--ink);
  background: var(--surface); border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  transition: border-color var(--t-fast) ease, box-shadow var(--t-fast) ease;
}
.st-input { width: 100%; }
.st-input::placeholder,
.st-hladd input::placeholder { color: var(--muted-2); }
.st-input:focus,
.st-hladd input:focus {
  outline: none; border-color: var(--input-border-focus);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

/* long description — .st-editor wraps the Trix editor; its native toolbar is
   hidden in favor of the .st-toolbar chrome wired in story_controller. */
.st-editor {
  border: 1px solid var(--input-border); border-radius: var(--radius-sm);
  background: var(--surface); overflow: hidden;
  transition: border-color var(--t-fast) ease, box-shadow var(--t-fast) ease;
}
.st-editor:focus-within { border-color: var(--input-border-focus); box-shadow: 0 0 0 3px var(--focus-ring); }
.st-toolbar { display: flex; align-items: center; gap: 2px; padding: 6px 8px; background: var(--surface-alt); border-bottom: 1px solid var(--hairline); }
.st-tbtn {
  width: 30px; height: 30px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer;
  transition: background var(--t-fast) ease, color var(--t-fast) ease, border-color var(--t-fast) ease;
}
.st-tbtn:hover { background: var(--surface); border-color: var(--hairline); color: var(--ink); }
.st-tdiv { width: 1px; height: 18px; background: var(--hairline); margin: 0 5px; }
/* Trix editor styled as the textarea; native toolbar suppressed */
.st-editor trix-toolbar { display: none; }
.st-editor trix-editor {
  display: block; min-height: 132px; padding: 13px 14px; box-sizing: border-box;
  font-family: var(--font-sans); font-size: var(--text-sm); line-height: 1.6; color: var(--ink);
  border: 0; outline: none; resize: vertical; overflow: auto;
}
.st-editor trix-editor:empty:not(:focus)::before { color: var(--muted-2); }

/* cover image — single container drives both states via :has() on the preview */
.st-cover {
  position: relative; width: 100%; cursor: pointer;
  background: var(--surface-alt); border: 1px dashed var(--hairline-strong);
  border-radius: var(--radius);
  transition: border-color var(--t-fast) ease, background var(--t-fast) ease;
}
.st-cover.is-dragover { border-color: var(--accent); background: var(--accent-softer); }
.st-cover.is-invalid { border-color: var(--cancelled-border); background: var(--cancelled-bg); }
.st-cover:hover { border-color: var(--accent); background: var(--accent-softer); }
.st-cover__input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.st-cover__empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  padding: 30px 24px; text-align: center; pointer-events: none;
}
.st-cover__empty .ic { color: var(--muted-2); transition: color var(--t-fast) ease; }
.st-cover:hover .st-cover__empty .ic { color: var(--accent); }
.st-cover__empty .t { font-size: var(--text-sm); font-weight: 600; color: var(--ink); }
.st-cover__empty .s { font-size: var(--text-xs); color: var(--muted-2); max-width: 40ch; line-height: 1.45; }
.st-cover__img { display: none; width: 100%; height: 200px; object-fit: cover; border-radius: var(--radius); }
.st-cover-edit { display: none; }
/* filled state: a preview image is present (not .hidden) */
.st-cover:has(.st-cover__img:not(.hidden)) {
  border-style: solid; border-color: var(--hairline); background: transparent; overflow: hidden; height: 200px;
}
.st-cover:has(.st-cover__img:not(.hidden)):hover { border-color: var(--hairline); background: transparent; }
.st-cover:has(.st-cover__img:not(.hidden)) .st-cover__img { display: block; }
.st-cover:has(.st-cover__img:not(.hidden)) .st-cover-edit {
  position: absolute; right: 12px; bottom: 12px; pointer-events: none;
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  font-size: var(--text-xs); font-weight: 600; color: var(--ink);
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(6px);
  border: 1px solid var(--hairline); border-radius: var(--radius-pill); box-shadow: var(--shadow-sm);
}

/* highlights list */
.st-hls { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--hairline); border-radius: var(--radius-sm); overflow: hidden; }
.st-hls:empty { display: none; }
.st-hl { display: flex; align-items: center; gap: 11px; padding: 11px 14px; border-top: 1px solid var(--hairline-2); font-size: var(--text-sm); color: var(--ink); }
.st-hl:first-child { border-top: 0; }
.st-hl .ic { color: var(--accent); flex-shrink: 0; display: flex; }
.st-hl .tx { flex: 1; min-width: 0; }
.st-hl .rm {
  width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 5px; background: transparent; color: var(--muted-2); cursor: pointer;
  transition: background var(--t-fast) ease, color var(--t-fast) ease;
}
.st-hl .rm:hover { background: var(--surface-alt); color: var(--error); }

/* add-a-highlight row */
.st-hladd { display: flex; gap: 8px; }
.st-hladd input { flex: 1; }
.st-hladd button {
  display: inline-flex; align-items: center; gap: 6px; padding: 0 16px;
  font-size: var(--text-sm); font-weight: 600; color: var(--accent);
  background: var(--accent-soft); border: 1px solid var(--accent-border); border-radius: var(--radius-sm); cursor: pointer;
  transition: background var(--t-fast) ease, color var(--t-fast) ease;
}
.st-hladd button:hover:not(:disabled) { background: var(--accent); color: var(--surface); }
.st-hladd button:disabled { opacity: 0.5; cursor: default; }
