:root {
  --paper: #f6f3ec;
  --paper-deep: #ede8dc;
  --white: #fdfcf9;
  --ink: #161513;
  --ink-soft: #4c4842;
  --ink-faint: #787268;
  --rule: #d4cdc0;
  --rule-soft: #e3ddd1;
  --rule-strong: #161513;
  --navy: #1b367d;
  --navy-hover: #13285e;
  --green: #047857;
  --red: #be123c;
  --amber: #b45309;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", "SF Mono", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
html { overflow-x: clip; }
body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.hidden { display: none !important; }
.guest-only { display: none !important; }

/* Dedicated Clean Guest Arrival Card Mode (/m/:id) */
body.guest-mode .guest-only { display: inline-flex !important; }
body.guest-mode .guest-cta-bar.guest-only { display: flex !important; }
body.guest-mode .editor-only,
body.guest-mode .search-section,
body.guest-mode .customizer-panel,
body.guest-mode .dev-drawer {
  display: none !important;
}
body.guest-mode .shell {
  max-width: 1120px;
  padding-top: 28px;
}
body.guest-mode .arrival-card {
  border-color: var(--rule-strong);
}

.guest-cta-bar {
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 22px;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 3px;
}
.guest-cta-copy strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.guest-cta-copy span {
  font-size: 13px;
  color: var(--ink-soft);
}
.guest-cta-bar .btn-primary {
  text-decoration: none;
}

/* Share Card Modal */
.modal-share-card {
  max-width: 640px;
}
.share-preview-frame {
  border: 1px solid var(--rule-strong);
  background: var(--white);
  padding: 8px;
  margin-bottom: 16px;
}
.share-preview-frame img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: contain;
  background: var(--paper);
}
.share-link-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  flex-wrap: wrap;
}
.share-link-row input {
  flex: 1 1 240px;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--white);
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink);
  outline: none;
}
.share-link-row input:focus { border-color: var(--ink); }
.share-actions-foot {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.share-foot-left {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Full-Bleed Architectural Masthead (Identical to Homepage & /privacy) */
.masthead {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 243, 236, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.masthead-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 15px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--ink);
}
.dot-logo {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--navy);
  flex-shrink: 0;
}
.brand-name {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.brand-tld {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
  margin-left: 1px;
}
.brand-tagline {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.top-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.mast-link {
  font-size: 13.5px;
  color: var(--ink-soft);
  text-decoration: none;
  margin-right: 8px;
  transition: color 0.14s;
}
.mast-link:hover { color: var(--ink); }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--ink-soft);
  padding: 6px 12px;
  border-radius: 3px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.14s, color 0.14s, background 0.14s;
}
.btn-ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--paper-deep);
}
.btn-ghost.active {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}
.btn-pricing-nav {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--white);
}
.btn-pricing-nav:hover {
  background: var(--ink);
  color: var(--white);
}

/* Main Content Shell */
.shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 28px 52px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Search Section & Crisp Architectural Hairlines */
.search-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.search-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto auto;
  gap: 8px;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 8px;
}
@media (max-width: 860px) {
  .search-bar { grid-template-columns: minmax(0, 1fr); }
  .swap-btn { display: none; }
}
.input-group {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 0 11px;
  transition: border-color 0.14s, background 0.14s;
}
.input-group:focus-within {
  border-color: var(--ink);
  background: var(--white);
}
.pin-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pin-dot.start { background: var(--green); }
.pin-dot.end { background: var(--red); }
.input-group input {
  width: 100%;
  border: none;
  background: transparent;
  padding: 9px 0;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  outline: none;
}
.input-group input::placeholder { color: #9a9387; font-weight: 400; }

.swap-btn {
  width: 34px;
  height: 36px;
  border-radius: 3px;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 14px;
  transition: border-color 0.14s, color 0.14s, background 0.14s;
}
.swap-btn:hover {
  background: var(--paper-deep);
  border-color: var(--ink);
  color: var(--ink);
}

.mode-pills {
  display: inline-flex;
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 2px;
  gap: 2px;
}
.mode-pill {
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  padding: 7px 11px;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.mode-pill:hover { color: var(--ink); }
.mode-pill.active {
  background: var(--white);
  color: var(--ink);
}

.btn-primary {
  background: var(--ink);
  color: var(--white);
  border: 1px solid var(--ink);
  border-radius: 3px;
  padding: 9px 18px;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s, border-color 0.14s;
}
.btn-primary:hover {
  background: var(--navy);
  border-color: var(--navy);
}
.btn-primary:disabled { opacity: 0.55; cursor: wait; }

/* Example Samples Row */
.preset-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.preset-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-right: 4px;
}
.preset-chip {
  background: var(--white);
  border: 1px solid var(--rule);
  color: var(--ink-soft);
  border-radius: 3px;
  padding: 5px 10px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.14s, color 0.14s, background 0.14s;
}
.preset-chip:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.preset-chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}
.preset-chip.live-chip {
  border-color: rgba(27, 54, 125, 0.35);
  background: rgba(27, 54, 125, 0.05);
  color: var(--navy);
}
.preset-chip.live-chip:hover {
  border-color: var(--navy);
  background: rgba(27, 54, 125, 0.1);
}
.live-status {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
}
.live-status.error { color: var(--red); font-weight: 500; }

/* 9-Theme Style Ribbon (Crisp Flat Swatches) */
.style-ribbon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 7px 12px;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 3px;
}
.style-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.style-group-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-faint);
  margin-right: 4px;
}
.style-divider {
  width: 1px;
  height: 18px;
  background: var(--rule);
}
.swatch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.swatch:hover {
  color: var(--ink);
  background: var(--paper);
}
.swatch.active {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--ink);
  font-weight: 600;
}
.sw-chip {
  width: 14px;
  height: 11px;
  border-radius: 2px;
  border: 1px solid rgba(22, 21, 19, 0.28);
  flex-shrink: 0;
}

/* Main Arrival Pass Plate (Flat Exposed Hairline Frame) */
.arrival-card {
  background: var(--white);
  border: 1px solid var(--rule-strong);
  border-radius: 3px;
  overflow: hidden;
}

.card-header {
  padding: 18px 22px 16px;
  border-bottom: 1px solid var(--rule);
  background: var(--white);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.title-block h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.subtitle {
  margin: 4px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
  text-wrap: balance;
}

/* The title takes the leftover width and wraps its own text, so a long subtitle never pushes the
   buttons onto another line. Below about 680px of room the buttons drop under the title. */
.title-block {
  flex: 1 1 280px;
}
.header-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  /* Pinned to the title line so the buttons do not move when the subtitle wraps. */
  align-self: flex-start;
  margin-top: 1px;
}
.trip-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}
.trip-pill {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 3px;
  background: var(--paper);
  border: 1px solid var(--rule);
  color: var(--ink-soft);
}
.trip-pill.primary {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}
.trip-pill.toll {
  background: #fef3c7;
  border-color: #d97706;
  color: #92400e;
}

/* Matches Homepage .plate-toggle */
.view-switcher {
  display: inline-flex;
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 2px;
}
.view-btn {
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  padding: 5px 10px;
  border-radius: 2px;
  cursor: pointer;
}
.view-btn:hover { color: var(--ink); }
.view-btn.active {
  background: var(--white);
  color: var(--ink);
  font-weight: 500;
}

/* Split Map Plate + Synced Step Directory */
.card-body {
  display: grid;
  grid-template-columns: minmax(420px, 1.65fr) minmax(280px, 1fr);
  gap: 0;
  min-height: 440px;
}
@media (max-width: 960px) {
  .card-body { grid-template-columns: minmax(0, 1fr); }
  .map-pane { border-right: none; border-bottom: 1px solid var(--rule); padding: 14px; }
}

.map-pane,
.steps-pane,
.arrival-card,
.search-bar,
.input-group,
.title-block,
.header-right {
  min-width: 0;
}

.map-pane {
  padding: 20px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--rule);
}
@media (max-width: 960px) {
  .map-pane { border-right: none; border-bottom: 1px solid var(--rule); }
}
/* On a phone the map runs edge to edge: it is drawn at exactly this width (see app.js). */
@media (max-width: 600px) {
  .map-pane { padding: 10px 0; }
}
.map-hint {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
  text-align: center;
}

.map-canvas {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Most maps are at most 520px tall; long, busy routes are drawn up to 1.75x taller (910px). */
.map-canvas svg {
  width: auto;
  max-width: 100%;
  max-height: 910px;
  height: auto;
  display: block;
}
.map-canvas svg .step-badge {
  cursor: pointer;
  transition: transform 0.12s ease;
  transform-box: fill-box;
  transform-origin: center;
}
.map-canvas svg .step-badge.is-highlighted circle {
  stroke: #d97706 !important;
  stroke-width: 3.6px !important;
}

.steps-pane {
  padding: 16px 18px;
  background: var(--white);
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 552px;
  overflow-y: auto;
}
/* Beside a tall map, the step list grows to match it (--map-h is set by app.js on .card-body). */
@media (min-width: 961px) {
  .steps-pane { max-height: max(552px, calc(var(--map-h, 0px) + 40px)); }
}
.steps-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}
.steps-title {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}
.steps-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
}

.steps-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.step-item {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 10px 8px;
  background: transparent;
  border-bottom: 1px solid var(--rule-soft);
  border-left: 2px solid transparent;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.step-item:last-child { border-bottom: none; }
.step-item:hover, .step-item.active {
  background: var(--paper);
  border-left-color: var(--navy);
}
.step-item.walk {
  background: rgba(4, 120, 87, 0.04);
  border-left-color: rgba(4, 120, 87, 0.35);
}
.step-item.walk:hover, .step-item.walk.active {
  background: rgba(4, 120, 87, 0.09);
  border-left-color: var(--green);
}
.step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.step-item.first .step-num,
.step-item.walk .step-num { background: var(--green); }
.step-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.step-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
}
.step-inst {
  font-size: 12px;
  color: var(--ink-soft);
}
.step-exit {
  display: inline-block;
  margin-top: 3px;
  padding: 1px 6px;
  border-radius: 2px;
  background: #065f46;
  color: #ffffff;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  width: fit-content;
}
.step-landmark {
  margin-top: 3px;
  font-size: 11px;
  font-style: italic;
  color: var(--ink-faint);
}
.step-time {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--navy);
  white-space: nowrap;
}
.step-item.walk .step-time { color: var(--green); }

/* Bottom Nav Handoff & Export Bar */
.handoff-bar {
  padding: 16px 22px 18px;
  background: var(--white);
  border-top: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.handoff-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.handoff-label {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
}
.handoff-label strong { font-weight: 600; }
.handoff-note {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
}

.handoff-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.nav-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 3px;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 500;
  transition: border-color 0.14s, background 0.14s;
}
.nav-btn:hover {
  border-color: var(--ink);
  background: var(--white);
}
.nav-ico {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 700;
  color: #ffffff;
}
.apple-ico { background: #10b981; }
.google-ico { background: #ea4335; }
.waze-ico { background: #33ccff; color: #0f172a; }
.transit-ico { background: #047857; }
.uber-ico { background: #161513; }
.lyft-ico { background: #e11d74; }

.export-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--rule-strong);
  color: var(--ink);
  border-radius: 3px;
  padding: 7px 13px;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s;
}
.btn-outline:hover { background: var(--paper-deep); }
.btn-outline.small { padding: 5px 10px; font-size: 11.5px; }

.btn-share {
  border-color: var(--rule);
  background: var(--paper);
  color: var(--ink);
}
.btn-share:hover {
  border-color: var(--ink);
  background: var(--paper-deep);
}

.btn-unlock {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s;
}
.btn-unlock:hover {
  background: var(--navy);
  border-color: var(--navy);
}

.btn-pro {
  border: 1px solid var(--green);
  background: var(--green);
  color: #ffffff;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 3px;
  cursor: pointer;
}
.btn-pro:hover { background: #065f46; border-color: #065f46; }
.btn-pro-outline {
  border-color: var(--green);
  color: #065f46;
}
.btn-pro-outline:hover {
  background: rgba(4, 120, 87, 0.08);
}

/* Inline Map Customizer Panel */
.customizer-panel {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cust-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.cust-head strong {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  margin-right: 10px;
}
.cust-sub {
  font-size: 12.5px;
  color: var(--ink-faint);
}
.cust-row-labels {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr 1.15fr;
  gap: 10px;
}
.cust-row-pins {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  padding-top: 10px;
  border-top: 1px solid var(--rule-soft);
}
.cust-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.cust-field.grow { flex: 1 1 200px; }
.cust-field input[type="text"],
.cust-field input[type="email"],
.cust-field select {
  padding: 8px 10px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  outline: none;
}
.cust-field input:focus,
.cust-field select:focus {
  border-color: var(--ink);
  background: var(--white);
}
.accent-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
}
.accent-chip {
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink-soft);
  border-radius: 3px;
  padding: 4px 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  cursor: pointer;
}
.accent-chip.active {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--white);
  font-weight: 500;
}
.accent-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
}
.accent-dot.active {
  box-shadow: 0 0 0 2px var(--white), 0 0 0 3.5px var(--ink);
}
#cust-accent-picker {
  width: 24px;
  height: 24px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 1px;
  background: var(--white);
  cursor: pointer;
}
.cust-add-btn {
  height: 34px;
  white-space: nowrap;
}
.cust-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cust-tags:empty { display: none; }
.cust-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 4px 9px;
  font-size: 12px;
  color: var(--ink);
}
.cust-tag-kind {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--navy);
}
.cust-tag button {
  border: none;
  background: transparent;
  color: var(--ink-faint);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}
.cust-tag button:hover { color: var(--red); }

/* Post-Checkout Unlocked Banner */
.unlock-banner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 22px;
  background: #edf7f2;
  border-bottom: 1px solid #b5dcc8;
  color: #064e3b;
}
.unlock-banner-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.unlock-banner-left strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
}
.unlock-banner-left span {
  font-size: 12px;
  color: #047857;
}
.unlock-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--green);
  color: #ffffff;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.credit-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid #86c9a8;
  border-radius: 3px;
  padding: 5px 10px;
  font-size: 12px;
}
.credit-box code {
  font-family: var(--mono);
  font-weight: 500;
  color: var(--ink);
  font-size: 12px;
}

/* Developer Mode Drawer */
.dev-drawer {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dev-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}
.dev-header h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
}
.dev-header p { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-faint); }
.dev-badge {
  font-family: var(--mono);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 3px;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink-soft);
}

.metrics-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
}
.metric {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 8px 10px;
}
.metric .k {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
}
.metric .v {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  margin-top: 2px;
}
.metric.ok .v { color: var(--green); }
.metric.bad .v { color: var(--red); }

.dev-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 960px) {
  .dev-grid { grid-template-columns: 1fr; }
}
.dev-panel {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dev-panel h3 {
  margin: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-faint);
}

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.weights-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.checks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-soft);
}
.checks-grid label { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.field { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--ink-soft); }
.field span { display: flex; justify-content: space-between; }
.field input[type="range"] { width: 100%; accent-color: var(--navy); }
.field select,
.field input[type="number"],
.field input[type="password"],
.field textarea {
  width: 100%;
  padding: 5px 8px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  font-family: inherit;
  font-size: 12px;
  background: var(--white);
  color: var(--ink);
}
.seed-row { display: flex; gap: 4px; }
.charts { display: flex; flex-direction: column; gap: 8px; }
.charts svg { width: 100%; height: auto; }

/* Colophon Footer */
.colophon {
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
  padding-top: 8px;
}
.colophon a {
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 2px;
}
.colophon a:hover { color: var(--ink); }

/* Unlock & Pricing Modal (Unified Print-Shop Rate Table Style) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(22, 21, 19, 0.52);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-card {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  border-radius: 3px;
  padding: 28px 30px 24px;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 30px;
  height: 30px;
  border-radius: 3px;
  border: 1px solid var(--rule);
  background: var(--white);
  color: var(--ink-soft);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
}
.modal-close:hover { color: var(--ink); border-color: var(--ink); }
.modal-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 6px;
}
.modal-card h2 {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 400;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}
.modal-lead {
  margin: 0 0 20px;
  color: var(--ink-soft);
  font-size: 14px;
}
.tier-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--rule-strong);
  background: var(--white);
}
.tier-card {
  position: relative;
  padding: 22px;
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tier-card:last-child { border-right: none; }
.tier-card.featured {
  background: var(--paper);
}
.tier-badge {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--navy);
  font-weight: 500;
}
.tier-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}
.tier-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
}
.tier-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.tier-price strong {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 400;
  line-height: 1;
  color: var(--ink);
}
.tier-price span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
}
.tier-desc {
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
}
.tier-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}
.tier-list li {
  padding-left: 15px;
  position: relative;
}
.tier-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--ink-faint);
}
.tier-list code {
  font-family: var(--mono);
  font-size: 11px;
  background: var(--paper-deep);
  padding: 1px 5px;
  border-radius: 2px;
}
.btn-tier-primary,
.btn-tier-secondary {
  margin-top: 8px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 3px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s;
}
.btn-tier-primary {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--white);
}
.btn-tier-primary:hover {
  background: var(--navy);
  border-color: var(--navy);
}
.btn-tier-secondary {
  border: 1px solid var(--rule-strong);
  background: transparent;
  color: var(--ink);
}
.btn-tier-secondary:hover { background: var(--paper-deep); }
.btn-tier-primary:disabled,
.btn-tier-secondary:disabled { opacity: 0.55; cursor: not-allowed; }

.modal-error {
  margin-top: 12px;
  padding: 9px 12px;
  border-radius: 3px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 12.5px;
}
.modal-error.ok {
  background: #edf7f2;
  border-color: #b5dcc8;
  color: #064e3b;
}

.redeem-row {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.redeem-label {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
}
#redeem-code-input {
  flex: 1 1 160px;
  max-width: 210px;
  padding: 6px 10px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--white);
  font-family: var(--mono);
  font-size: 12.5px;
  text-transform: uppercase;
}
.modal-footer-note {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--ink-faint);
}
.link-btn {
  border: none;
  background: transparent;
  color: var(--navy);
  font-family: var(--mono);
  font-size: 11.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  padding: 0;
}
.lead-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.lead-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

@media (max-width: 820px) {
  .brand-tagline,
  .mast-link,
  .style-divider { display: none; }
  .masthead-inner,
  .shell { padding-left: 16px; padding-right: 16px; }
  .card-header { padding: 16px; }
  .title-block h1 { font-size: 22px; }
  .view-switcher { width: 100%; }
  .view-btn { flex: 1; text-align: center; padding: 6px 6px; font-size: 10.5px; }
  .mode-pills { width: 100%; }
  .mode-pill { flex: 1; text-align: center; }
  .handoff-bar { padding: 14px 16px; }
  .cust-row-labels,
  .tier-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .tier-card {
    border-right: none;
    border-bottom: 1px solid var(--rule);
  }
  .tier-card:last-child { border-bottom: none; }
}

/* Printed page: the map across the top at its real size, then every step in two columns.
   The map is redrawn 720px wide for printing (PRINT_MAP_WIDTH in app.js), the width of a
   portrait page, so its text prints at about 8pt. */
@media print {
  @page { margin: 12mm; size: portrait; }
  body { background: #ffffff !important; }
  .masthead,
  .topbar,
  .search-section,
  .customizer-panel,
  .unlock-banner,
  .view-switcher,
  .handoff-bar,
  .dev-drawer,
  .colophon,
  .map-hint,
  .modal-backdrop {
    display: none !important;
  }
  .shell { max-width: 100%; padding: 0; }
  .arrival-card {
    border: none !important;
    border-radius: 0 !important;
  }
  .card-header { padding: 0 0 12px; border-bottom: 1px solid #d4cdc0; }
  .card-body { display: block !important; min-height: 0 !important; }
  .map-pane { background: #ffffff !important; border: none !important; padding: 12px 0 !important; }
  .map-canvas svg { border: none !important; max-width: 100% !important; max-height: 205mm !important; }
  .steps-pane {
    display: block !important;
    border-top: 1px solid #d4cdc0 !important;
    padding: 12px 0 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }
  .steps-head { break-after: avoid; margin-bottom: 10px; }
  .steps-list { display: block !important; column-count: 2; column-gap: 28px; }
  .step-item { break-inside: avoid; }
}
