/*
 * design-v2/overlays.css – drawers, popovers, toasts, wizards, dropzone,
 * chat bubbles. All Pure Stone tokens. Loaded only when MM_DESIGN_V2 is on.
 * Source of truth: 07-atlas-brief-pure-stone.html (lines 380–445, 1900–1965).
 */

/* ─── HOST + BACKDROP ──────────────────────────────────────── */
.v2-overlay-host {
  position: fixed;
  inset: 0;
  z-index: 8500;
  pointer-events: none;
}
/* Open drawers sit above Driver.js tour overlay (z-index 10000) so an active
   page tour cannot block iframe edit forms. See tours-theme.css z-index pact. */
.v2-overlay-host.is-open {
  pointer-events: auto;
  z-index: 10020;
}
.v2-overlay-host[hidden] { display: none; }

.v2-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 14, 30, 0.42);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 8505;
  animation: v2-fadeIn 320ms var(--ease-out) both;
  cursor: pointer;
}
@keyframes v2-fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ─── DRAWER BASE + VARIANTS ───────────────────────────────── */
.v2-drawer {
  position: fixed;
  background: var(--paper-soft);
  box-shadow: var(--sh-pop);
  z-index: 8510;
  display: flex;
  flex-direction: column;
  font-family: 'Public Sans', system-ui, sans-serif;
  color: var(--ink);
}
.v2-drawer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
  pointer-events: none;
}
.v2-drawer--modal {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(820px, 92%);
  max-height: 92%;
  border-radius: 18px;
  border: 1px solid var(--hairline);
  overflow: hidden;
  animation: v2-modalIn 380ms var(--ease-out) both;
}
@keyframes v2-modalIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.96); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.v2-drawer--right {
  top: 16px;
  right: 16px;
  bottom: 16px;
  width: min(480px, 95%);
  border-radius: 18px;
  border: 1px solid var(--hairline);
  animation: v2-rightIn 420ms var(--ease-drawer) both;
}
@keyframes v2-rightIn {
  from { opacity: 0; transform: translateX(8%); }
  to   { opacity: 1; transform: translateX(0); }
}
.v2-drawer--bottom {
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(680px, 96%);
  border-radius: 22px 22px 0 0;
  border: 1px solid var(--hairline);
  border-bottom: none;
  max-height: 78%;
  animation: v2-bottomIn 480ms var(--ease-drawer) both;
}
@keyframes v2-bottomIn {
  from { opacity: 0; transform: translate(-50%, 100%); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* Slides DOWN from below the topnav + subnav (Smart Upload). The top offset
   roughly matches the v2-topnav (~64px) + subnav (~52px) so the drawer
   appears anchored just under the section navigation. */
.v2-drawer--under-nav {
  top: 116px;
  left: 50%;
  transform: translate(-50%, 0);
  width: min(680px, 96%);
  border-radius: 18px;
  border: 1px solid var(--hairline);
  max-height: calc(100vh - 140px);
  animation: v2-topIn 380ms var(--ease-drawer) both;
}
@keyframes v2-topIn {
  from { opacity: 0; transform: translate(-50%, -110%); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
@media (max-width: 768px) {
  .v2-drawer--under-nav { top: 96px; width: calc(100% - 24px); max-height: calc(100vh - 120px); }
}

/* ─── SMART UPLOAD HISTORY (in-drawer view) ─────────────────── */
.v2-su-hist { overflow: auto; }
.v2-su-hist__table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Geist', sans-serif;
  font-size: 0.86667rem;
}
.v2-su-hist__table th,
.v2-su-hist__table td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--hairline-soft);
}
.v2-su-hist__table th {
  font-family: 'Geist Mono', monospace;
  font-size: 0.66667rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 1;
  font-weight: 600;
}
.v2-su-hist__table tbody tr:last-child td { border-bottom: none; }
.v2-su-hist__file { color: var(--ink-strong); word-break: break-all; }
.v2-su-hist__status {
  display: inline-flex;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--paper-shade);
  color: var(--ink);
  font-family: 'Geist Mono', monospace;
  font-size: 0.66667rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
}
.v2-su-hist__link {
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
.v2-su-hist__link:hover { text-decoration: underline; }
.v2-su-hist__empty {
  padding: 24px 0;
  text-align: center;
  color: var(--ink-muted);
}

.v2-su-parsing {
  padding: 32px 16px;
}

.v2-drawer__body--review {
  padding: 0;
  overflow: hidden;
}
.v2-su-review {
  position: relative;
  min-height: 320px;
  background: var(--paper);
}
.v2-su-review__loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: var(--ink-muted);
  font-weight: 600;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96) 0%, rgba(241, 245, 249, 0.96) 100%);
  z-index: 1;
}
.v2-su-review__frame {
  display: block;
  width: 100%;
  height: 420px;
  border: 0;
  background: transparent;
}
.v2-su-review__frame.is-ready + .v2-su-review__loading,
.v2-su-review__frame.is-ready ~ .v2-su-review__loading {
  display: none;
}
.v2-su-review:has(.v2-su-review__frame.is-ready) .v2-su-review__loading {
  display: none;
}

.v2-drawer__grab {
  width: 36px;
  height: 4px;
  background: var(--hairline-strong);
  border-radius: 999px;
  margin: 10px auto 4px;
}
.v2-drawer__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 22px 26px 16px;
  border-bottom: 1px solid var(--hairline);
}
.v2-drawer__head .l { display: flex; flex-direction: column; gap: 4px; }
.v2-drawer__head .eyebrow,
.v2-drawer__head .v2-eyebrow { margin-bottom: 4px; }
.v2-drawer__head h3 {
  font-family: 'Bricolage Grotesque', serif;
  font-style: normal;
  font-weight: 400;
  font-size: 1.6rem;
  letter-spacing: -0.012em;
  color: var(--ink-strong);
  line-height: 1.1;
  margin: 0;
}
.v2-drawer__head h3 b { font-style: normal; font-weight: 600; }
.v2-drawer__close {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid var(--hairline);
  background: var(--paper);
  color: var(--ink-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 160ms var(--ease-out);
}
.v2-drawer__close:hover { color: var(--ink-strong); border-color: var(--ink-strong); }
.v2-drawer__close:active { transform: scale(0.93); }
.v2-drawer__close svg { width: 14px; height: 14px; stroke-width: 2; }
.v2-drawer__body {
  padding: 22px 26px;
  overflow-y: auto;
  flex: 1;
}
.v2-drawer__foot {
  padding: 16px 26px;
  border-top: 1px solid var(--hairline);
  background: var(--paper);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.v2-drawer__foot .info {
  font-family: 'Geist', sans-serif;
  font-size: 0.83333rem;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.v2-drawer__foot .info svg { width: 14px; height: 14px; color: var(--atlas); }
.v2-drawer__foot .actions { display: flex; gap: 8px; }

/* ─── WIZARD STEP INDICATOR ────────────────────────────────── */
.v2-wiz-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--hairline-soft);
}
.v2-wiz-step {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 0 4px;
}
.v2-wiz-step__num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--hairline-strong);
  display: grid;
  place-items: center;
  font-family: 'Geist Mono', monospace;
  font-size: 0.73333rem;
  font-weight: 600;
  color: var(--ink-muted);
  background: var(--paper);
  transition: all 220ms var(--ease-out);
}
.v2-wiz-step.done .v2-wiz-step__num { background: var(--atlas); border-color: var(--atlas); color: white; }
.v2-wiz-step.active .v2-wiz-step__num { background: var(--navy); border-color: var(--navy); color: white; box-shadow: 0 0 0 4px rgba(14,31,59,0.10); }
.v2-wiz-step__labels { display: flex; flex-direction: column; gap: 0; }
.v2-wiz-step__l {
  font-family: 'Geist Mono', monospace;
  font-size: 0.63333rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.v2-wiz-step__n {
  font-family: 'Geist', sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--ink-muted);
}
.v2-wiz-step.active .v2-wiz-step__n { color: var(--ink-strong); font-weight: 600; }
.v2-wiz-step.done .v2-wiz-step__n { color: var(--atlas-deep); }
.v2-wiz-step__conn {
  flex: 1;
  height: 1.5px;
  background: var(--hairline);
  margin: 0 12px;
  min-width: 24px;
  max-width: 80px;
  align-self: center;
  position: relative;
  top: -10px;
}
.v2-wiz-step__conn.done { background: var(--atlas); }

/* ─── FORM FIELDS ──────────────────────────────────────────── */
.v2-f-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px 16px;
}
.v2-f-grid .c1 { grid-column: span 1; }
.v2-f-grid .c2 { grid-column: span 2; }
.v2-f-grid .c3 { grid-column: span 3; }
.v2-f-grid .c4 { grid-column: span 4; }
.v2-field { display: flex; flex-direction: column; gap: 5px; }
.v2-field label {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.66667rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.v2-field label .req { color: var(--orange); margin-left: 2px; }
.v2-field input,
.v2-field select,
.v2-field textarea {
  font-family: 'Public Sans', system-ui, sans-serif;
  font-size: 0.96667rem;
  padding: 9px 13px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  transition: all 160ms var(--ease-out);
  width: 100%;
}
.v2-field input:focus,
.v2-field select:focus,
.v2-field textarea:focus {
  outline: none;
  border-color: var(--ink-strong);
  box-shadow: 0 0 0 3px rgba(14,31,59,0.08);
}
.v2-field input.mono {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}
.v2-field .hint {
  font-family: 'Public Sans', system-ui, sans-serif;
  font-size: 0.73333rem;
  color: var(--ink-faint);
  margin-top: 1px;
}
.v2-field select {
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235A6373' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center;
  background-size: 12px;
  appearance: none;
}
.v2-field textarea { min-height: 64px; resize: vertical; }
.v2-field-cb {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}
.v2-field-cb input { width: 18px; height: 18px; }
.v2-field-cb label {
  font-family: 'Geist', sans-serif;
  font-size: 0.9rem;
  color: var(--ink);
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}
.v2-field-error {
  font-family: 'Geist', sans-serif;
  font-size: 0.76667rem;
  color: var(--pace-ruby);
  margin-top: 2px;
}
.v2-form-error {
  background: var(--pace-ruby-paper);
  color: var(--pace-ruby);
  padding: 10px 14px;
  border-radius: 9px;
  font-family: 'Geist', sans-serif;
  font-size: 0.86667rem;
  margin-bottom: 16px;
}

/* ─── ADD FLIGHT REFERENCE CARD (Step 2 read-only date/number) ───────── */
.v2-af-ref {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
  padding: 14px 16px;
  margin-bottom: 18px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--stone-paper, #FAF8F4);
}
.v2-af-ref__item { display: flex; flex-direction: column; gap: 4px; }
.v2-af-ref__l {
  font-family: 'Geist Mono', monospace;
  font-size: 0.66667rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.v2-af-ref__v {
  font-family: 'Geist Mono', monospace;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-strong);
  font-weight: 600;
}

/* ─── ADD/EDIT FLIGHT — error summary, verification, loyalty, post-save ─ */
.v2-af-error-summary {
  background: var(--pace-ruby-paper);
  border: 1px solid rgba(180, 45, 60, 0.18);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.v2-af-error-summary__title {
  font-family: 'Geist', sans-serif;
  font-size: 0.86667rem;
  font-weight: 600;
  color: var(--pace-ruby);
  margin: 0 0 8px;
}
.v2-af-error-summary ul {
  margin: 0;
  padding-left: 18px;
  font-family: 'Geist', sans-serif;
  font-size: 0.86667rem;
  color: var(--pace-ruby);
}
.v2-af-error-summary a {
  color: var(--pace-ruby);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.v2-af-source-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--stone-paper, #F4F6FA);
  color: var(--ink-muted);
  font-family: 'Geist Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  vertical-align: middle;
}
.v2-af-verify {
  margin: 14px 0 18px;
  padding: 14px 16px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: linear-gradient(180deg, var(--stone-paper, #FAF8F4) 0%, var(--paper) 100%);
}
.v2-af-verify--compact { margin-top: 0; margin-bottom: 14px; }
.v2-af-verify__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.v2-af-verify__eyebrow {
  font-family: 'Geist Mono', monospace;
  font-size: 0.66667rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.v2-af-verify__source {
  font-family: 'Geist', sans-serif;
  font-size: 0.73333rem;
  color: var(--ink-muted);
}
.v2-af-verify__route {
  font-family: 'Geist Mono', monospace;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink-strong);
  letter-spacing: 0.04em;
}
.v2-af-verify__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  font-family: 'Geist', sans-serif;
  font-size: 0.83333rem;
  color: var(--ink-muted);
}
.v2-af-overnight {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--amber-paper, #FFF4E0);
  color: var(--ink-strong);
  font-size: 0.73333rem;
  font-weight: 600;
}
.v2-af-overnight svg { width: 14px; height: 14px; }
.v2-af-loyalty {
  margin: 12px 0 18px;
  padding: 14px 16px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--stone-paper, #F4F6FA);
}
.v2-af-loyalty__eyebrow {
  font-family: 'Geist Mono', monospace;
  font-size: 0.66667rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent, #FF6810);
  margin-bottom: 4px;
}
.v2-af-loyalty__title {
  font-family: 'Bricolage Grotesque', serif;
  font-size: 1.13333rem;
  color: var(--ink-strong);
  margin-bottom: 6px;
}
.v2-af-loyalty__msg {
  font-family: 'Geist', sans-serif;
  font-size: 0.86667rem;
  color: var(--ink-muted);
  margin: 0 0 10px;
  line-height: 1.45;
}
.v2-af-loyalty__delta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.v2-af-loyalty__pill {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  font-family: 'Geist', sans-serif;
  font-size: 0.8rem;
  color: var(--ink);
}
.v2-af-loyalty__pill strong {
  font-family: 'Geist Mono', monospace;
  font-size: 0.86667rem;
}
.v2-af-loyalty__meter {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: var(--hairline-soft, rgba(14,31,59,0.08));
  overflow: hidden;
  margin-bottom: 8px;
}
.v2-af-loyalty__meter span {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 999px;
}
.v2-af-loyalty__meter span:first-child { background: rgba(14, 31, 59, 0.22); z-index: 1; }
.v2-af-loyalty__meter span:last-child { background: var(--accent, #FF6810); z-index: 2; opacity: 0.85; }
.v2-af-loyalty__summary {
  font-family: 'Geist', sans-serif;
  font-size: 0.83333rem;
  color: var(--ink-muted);
}
.v2-af-credit-followup {
  margin: 20px 0 18px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--paper);
}
.v2-af-credit-followup summary {
  cursor: pointer;
  font-family: 'Geist', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-strong);
}
.v2-af-dup-banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 104, 16, 0.22);
  background: var(--amber-paper, #FFF4EB);
  color: var(--ink-strong);
}
.v2-af-dup-banner svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--accent, #FF6810);
}
.v2-af-dup-banner__text {
  margin: 0 0 8px;
  font-family: 'Geist', sans-serif;
  font-size: 0.86667rem;
  line-height: 1.45;
}
.v2-af-dup-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.v2-af-saved {
  text-align: center;
  padding: 28px 12px 12px;
}
.v2-af-saved__icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--green-paper, #E8F5EE);
  color: var(--green, #1B7F4A);
  display: flex;
  align-items: center;
  justify-content: center;
}
.v2-af-saved__icon svg { width: 26px; height: 26px; }
.v2-af-saved h4 {
  font-family: 'Bricolage Grotesque', serif;
  font-size: 1.46667rem;
  font-weight: 400;
  color: var(--ink-strong);
  margin: 0 0 8px;
}
.v2-af-saved__meta {
  font-family: 'Geist', sans-serif;
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin: 0 0 20px;
}
.v2-af-saved__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.v2-af-save-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.v2-drawer__foot .actions[data-mm-foot-actions] {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}
/* The wizard toggles footer controls per step via the [hidden] attribute, but
   .v2-btn { display:inline-flex } and .v2-af-save-group { display:flex } are
   author rules that out-rank the bare [hidden] default — so without these
   guards Back + the Save group leak onto Step 1 (and Continue onto Step 2).
   Same gotcha the trip-builder + ledger CSS already guard for. */
.v2-drawer__foot .actions .v2-btn[hidden],
.v2-af-save-group[hidden] { display: none; }

/* ─── INLINE HINT (e.g. miles auto-calc note) ───────────────────────── */
.v2-field-hint {
  font-family: 'Geist', sans-serif;
  font-size: 0.66667rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-faint);
  margin-left: 6px;
  font-style: normal;
}

/* ─── PI-05 simplified drawers ────────────────────────────────────── */
/* Forecast-led intro line atop the flight essentials. */
.v2-af-intro {
  font-family: 'Bricolage Grotesque', serif;
  font-style: normal;
  font-size: 1.06667rem;
  color: var(--ink-muted);
  margin-bottom: 18px;
  line-height: 1.5;
}
/* "Skip lookup, enter manually" escape hatch under the step-1 grid. */
.v2-af-manual {
  margin: 2px 0 0;
  font-family: 'Geist', sans-serif;
  font-size: 0.83333rem;
}
.v2-af-manual__btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--accent, #FF6810);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.v2-af-manual__btn:hover { color: var(--orange-deep, #C44600); }
/* Soft, non-blocking warning state for an inline field hint (e.g. no programme
   picked, or a completed item dated in the future). Amber, not red: it never
   blocks the save. */
.v2-field-hint--warn,
.v2-field-warn {
  display: block;
  font-family: 'Geist', sans-serif;
  font-size: 0.73333rem;
  font-style: normal;
  color: var(--orange-deep);
  margin: 4px 0 0;
}
/* Contextual "add a programme" nudge — an inline prompt on the programme field,
   not a new surface. */
.v2-field-nudge {
  font-family: 'Geist', sans-serif;
  font-size: 0.76667rem;
  color: var(--ink-muted);
  margin: 6px 0 0;
  line-height: 1.5;
}
.v2-link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}
.v2-link-btn:hover { color: var(--orange-deep); }
.v2-se-status-hint { margin: 8px 0 0; display: block; }
/* "More details (optional)" disclosure — the single place the long tail of
   optional fields lives, in the same drawer. Matches the credit-followup look. */
.v2-af-more,
.v2-se-more {
  margin: 0 0 18px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--paper);
}
.v2-af-more > summary,
.v2-se-more > summary {
  cursor: pointer;
  font-family: 'Geist', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-strong);
  list-style: none;
}
.v2-af-more > summary::-webkit-details-marker,
.v2-se-more > summary::-webkit-details-marker { display: none; }
.v2-af-more[open] > summary,
.v2-se-more[open] > summary { margin-bottom: 10px; }

/* Flight-number example placeholder shown in italic ("e.g.: BA 005 …"). */
#af-num::placeholder { font-style: normal; }

/* ─── TYPEAHEAD (airport / hotel searchable dropdown) ──────────────── */
[data-mm-airport-group],
[data-mm-trip-group],
[data-mm-hotel-search] { position: relative; }
/* Searchable Trip picker: "Create new trip" row + the reveal-on-pick name field. */
/* The Trip field sits just above the drawer footer, so a downward dropdown is
   clipped by the body's overflow:auto — flip it above the input when needed. */
.v2-typeahead.v2-typeahead--up { top: auto; bottom: calc(100% + 4px); }
.v2-typeahead__item--accent .v2-typeahead__label { color: var(--accent); }
.v2-trip-new-plus { display: inline-flex; vertical-align: -3px; margin-right: 6px; }
.v2-trip-new-plus svg { width: 15px; height: 15px; }
.v2-trip-newname { margin-top: 8px; }

/* Essentials (now also carries the routing/time fields): keep every field label
   on a single row — labels are short, so they fit their column. */
.v2-af-essentials .v2-field > label { white-space: nowrap; }
/* The auto-calculated miles note sits under the input, not in the label. */
.v2-af-miles-hint { display: block; margin: 4px 0 0; }
/* Seat & booking class on one row: Cabin + Booking class narrower than the two
   seat columns (Cabin / Seat type / Seat number / Booking class). */
.v2-af-seatrow { grid-template-columns: 0.85fr 1.15fr 1.15fr 0.85fr; }
.v2-af-seatrow .v2-field { grid-column: auto; }
.v2-typeahead {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 50;
  list-style: none;
  margin: 0;
  padding: 4px 0;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  box-shadow: 0 16px 38px rgba(14, 31, 59, 0.14);
  max-height: 280px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.v2-typeahead__item {
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  align-items: center;
  line-height: 1.35;
  border-bottom: 1px solid var(--hairline-soft);
}
.v2-typeahead__item:last-child { border-bottom: none; }
.v2-typeahead__item:hover,
.v2-typeahead__item.is-active {
  background: var(--stone-paper, #F4F6FA);
}
.v2-typeahead__codes {
  flex: 0 0 auto;
  min-width: 58px;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--stone-paper, #F4F6FA);
  color: var(--ink-strong);
  font-family: 'Geist Mono', monospace;
  font-weight: 700;
  font-size: 0.76667rem;
  letter-spacing: 0.04em;
  text-align: center;
}
.v2-typeahead__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.v2-typeahead__label {
  font-family: 'Geist', sans-serif;
  font-size: 0.9rem;
  color: var(--ink);
  font-weight: 600;
}
.v2-typeahead__meta {
  font-family: 'Geist', sans-serif;
  font-size: 0.73333rem;
  color: var(--ink-faint);
}
.v2-typeahead__empty {
  padding: 10px 14px;
  font-family: 'Geist', sans-serif;
  font-size: 0.83333rem;
  color: var(--ink-faint);
  font-style: normal;
}
/* R13: section header inside the trip picker ("Your trips" /
   "Individual flights & stays"). Presentational only, never selectable. */
.v2-typeahead__group {
  padding: 8px 14px 4px;
  font-family: 'Geist', sans-serif;
  font-size: 0.66667rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  background: var(--stone-paper, #F4F6FA);
  border-bottom: 1px solid var(--hairline-soft);
  cursor: default;
}

/* Hotel variant: no code pill, name on first line, address on second,
   small source chip on the right. */
.v2-typeahead--hotel .v2-typeahead__item {
  padding: 11px 14px;
  align-items: flex-start;
}
.v2-typeahead__source {
  flex: 0 0 auto;
  margin-left: auto;
  align-self: center;
  padding: 3px 7px;
  border-radius: 999px;
  font-family: 'Geist Mono', monospace;
  font-size: 0.63333rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  background: transparent;
  border: 1px solid var(--hairline);
}
.v2-typeahead__source--saved { color: var(--orange, #FF6810); border-color: var(--orange, #FF6810); }
.v2-typeahead__source--cache { color: var(--ink-strong, #0E1F3B); border-color: var(--hairline-strong, #C6CCD8); }
.v2-typeahead__source--google { color: var(--ink-faint); }

/* ─── SMART INBOX ADDRESS CARD ─────────────────────────────── */
.v2-inb-addr {
  background: var(--paper-shade);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.v2-inb-addr .v2-eyebrow { margin-bottom: 8px; }
.v2-inb-addr__row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.v2-inb-addr__code {
  flex: 1 1 auto;
  min-width: 0;
  font-family: 'Geist Mono', monospace;
  font-size: 0.86667rem;
  color: var(--ink-strong);
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 9px 12px;
}
.v2-inb-addr__copy {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Geist', sans-serif;
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--ink-strong);
  background: var(--paper);
  border: 1px solid var(--hairline-strong);
  border-radius: 8px;
  padding: 9px 12px;
  cursor: pointer;
  transition: all 160ms var(--ease-out);
  white-space: nowrap;
}
.v2-inb-addr__copy:hover { border-color: var(--navy); color: var(--navy); }
.v2-inb-addr__copy.is-copied { border-color: var(--orange); color: var(--orange); }
.v2-inb-addr__copy-ico { width: 15px; height: 15px; }
.v2-inb-addr__hint {
  margin: 10px 0 0;
  font-family: 'Geist', sans-serif;
  font-size: 0.76667rem;
  line-height: 1.5;
  color: var(--ink-faint);
}
.v2-inb-addr__hint b { color: var(--ink-muted); font-weight: 600; }

/* ─── SMART INBOX ROW ──────────────────────────────────────── */
.v2-inb-item {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--hairline-soft);
  align-items: center;
}
.v2-inb-item:first-of-type { border-top: none; }
.v2-cb {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--hairline-strong);
  border-radius: 4px;
  background: var(--paper);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 160ms var(--ease-out);
}
.v2-cb:hover { border-color: var(--ink-strong); }
.v2-cb.on { background: var(--navy); border-color: var(--navy); }
.v2-cb.on::after {
  content: "";
  width: 7px;
  height: 4px;
  border-left: 1.5px solid var(--paper);
  border-bottom: 1.5px solid var(--paper);
  transform: rotate(-45deg);
  margin-top: -2px;
}
.v2-inb-item .body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.v2-inb-item .from {
  font-family: 'Geist', sans-serif;
  font-weight: 500;
  font-size: 0.86667rem;
  color: var(--ink-strong);
  display: flex;
  gap: 6px;
  align-items: baseline;
}
.v2-inb-item .from small {
  font-family: 'Geist Mono', monospace;
  font-size: 0.66667rem;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
  font-weight: 400;
}
.v2-inb-item .subj {
  font-family: 'Geist', sans-serif;
  font-size: 0.86667rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v2-inb-item .parsed {
  font-family: 'Bricolage Grotesque', serif;
  font-style: normal;
  font-size: 0.83333rem;
  color: var(--ink-muted);
}
.v2-inb-item .parsed b {
  font-style: normal;
  font-family: 'Geist Mono', monospace;
  font-weight: 500;
  color: var(--ink-strong);
  letter-spacing: 0.04em;
}
.v2-inb-hint {
  font-family: 'Geist', sans-serif;
  font-size: 0.76667rem;
  color: var(--ink-faint);
  font-style: normal;
}
.v2-inb-item .meta {
  text-align: right;
  font-family: 'Geist Mono', monospace;
  font-size: 0.7rem;
  color: var(--ink-faint);
  white-space: nowrap;
}

/* ─── DROPZONE (Smart Upload) ──────────────────────────────── */
.v2-dz {
  background: repeating-linear-gradient(135deg, transparent 0, transparent 12px, rgba(14,31,59,0.025) 12px, rgba(14,31,59,0.025) 13px), var(--paper);
  border: 2px dashed var(--hairline-strong);
  border-radius: 16px;
  padding: 44px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  transition: all 220ms var(--ease-out);
  cursor: pointer;
}
.v2-dz:hover,
.v2-dz.is-drag {
  border-color: var(--atlas);
  background: repeating-linear-gradient(135deg, transparent 0, transparent 12px, rgba(13,190,110,0.04) 12px, rgba(13,190,110,0.04) 13px), var(--atlas-paper);
}
.v2-dz__i {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--paper-soft);
  display: grid;
  place-items: center;
  color: var(--navy);
  border: 1px solid var(--hairline-strong);
  margin-bottom: 6px;
}
.v2-dz__i svg { width: 22px; height: 22px; stroke-width: 1.6; }
.v2-dz h4 {
  font-family: 'Bricolage Grotesque', serif;
  font-style: normal;
  font-weight: 400;
  font-size: 1.46667rem;
  letter-spacing: -0.012em;
  color: var(--ink-strong);
  margin: 0;
}
.v2-dz h4 b { font-style: normal; font-weight: 600; }
.v2-dz p {
  font-family: 'Geist', sans-serif;
  font-size: 0.9rem;
  color: var(--ink-muted);
  max-width: 440px;
  margin: 0;
}
.v2-dz__fmt {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
  justify-content: center;
}
.v2-dz__fmt span {
  font-family: 'Geist Mono', monospace;
  font-size: 0.66667rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 3px 9px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--paper);
}

/* MM-27: Smart Upload camera affordance. Hidden by default + on fine pointers;
   responsive.css (pointer:coarse) reveals it and swaps the dropzone copy. */
.v2-dz__h--coarse { display: none; }
.v2-dz__camera { display: none; }
.v2-dz__camera {
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 10px 16px;
  font-family: 'Geist', sans-serif;
  font-weight: 500;
  font-size: 0.86667rem;
  color: var(--navy);
  background: var(--paper);
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  cursor: pointer;
}
.v2-dz__camera svg { width: 16px; height: 16px; }

/* ─── ADD POPOVER ──────────────────────────────────────────── */
.v2-add-pop {
  position: absolute;
  top: 64px;
  right: 90px;
  background: var(--paper-soft);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  box-shadow: var(--sh-pop);
  padding: 6px;
  width: 280px;
  /* Must sit above the Atlas SidePanel (--av-z-panel = 9100) so the Add menu
     opens in front of the chat instead of being hidden behind it. Matches
     the .user-pop pattern from shell.css. */
  z-index: 9300;
  transform-origin: top right;
  animation: v2-popIn 200ms var(--ease-out) both;
}
.v2-add-pop[hidden] { display: none; }
@keyframes v2-popIn {
  from { opacity: 0; transform: scale(0.96) translateY(-4px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.v2-add-pop::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12px;
  right: 12px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
}
.v2-add-pop__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 9px;
  text-decoration: none;
  color: var(--ink);
  transition: background 140ms var(--ease-out);
  cursor: pointer;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
}
.v2-add-pop__item:hover { background: var(--paper-shade); }
.v2-add-pop__item .ic {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--paper-shade);
  display: grid;
  place-items: center;
  color: var(--navy);
  flex-shrink: 0;
}
.v2-add-pop__item .ic svg { width: 14px; height: 14px; stroke-width: 1.8; }
.v2-add-pop__item.atlas .ic { background: var(--atlas-paper); color: var(--atlas-deep); }
.v2-add-pop__item.primary .ic { background: var(--orange-paper); color: var(--orange-deep); }
.v2-add-pop__item.locked { opacity: 0.7; }
.v2-add-pop__item.locked::after {
  content: "PRO";
  margin-left: auto;
  font-family: 'Geist Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  color: var(--orange-deep);
  background: var(--orange-paper);
  padding: 2px 6px;
  border-radius: 4px;
}
.v2-add-pop__item .l {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.v2-add-pop__item .l .t {
  font-family: 'Geist', sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--ink-strong);
}
.v2-add-pop__item .l .s {
  font-family: 'Geist', sans-serif;
  font-size: 0.76667rem;
  color: var(--ink-muted);
}
.v2-add-pop__sep {
  height: 1px;
  background: var(--hairline-soft);
  margin: 4px 8px;
}
.v2-add-pop__kbd {
  margin-left: auto;
  font-family: 'Geist Mono', monospace;
  font-size: 0.66667rem;
  color: var(--ink-faint);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--hairline);
  background: var(--paper);
}
/* Shortcut hints mean nothing without a keyboard (F-012). */
@media (pointer: coarse) {
  .v2-add-pop__kbd { display: none; }
}

/* ─── TOASTS ───────────────────────────────────────────────── */
.v2-toast-stack {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9000;
  display: flex;
  flex-direction: column-reverse;
  gap: 0;
  align-items: flex-end;
  pointer-events: none;
}
.v2-toast {
  width: 360px;
  padding: 14px 16px;
  background: var(--paper-soft);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  box-shadow: var(--sh-toast);
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  align-items: center;
  transition: transform 400ms var(--ease-drawer), opacity 300ms var(--ease-out);
  position: relative;
  pointer-events: auto;
  margin-bottom: 8px;
}
.v2-toast::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12px;
  right: 12px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.7), transparent);
}
.v2-toast--current { transform: translateY(0) scale(1); opacity: 1; }
.v2-toast--prev { transform: translateY(60px) scale(0.94); opacity: 0.85; margin-bottom: -68px; }
.v2-toast--prev-prev { transform: translateY(122px) scale(0.88); opacity: 0.6; margin-bottom: -66px; }
.v2-toast--leaving { transform: translateX(120%) scale(0.96); opacity: 0; }
.v2-toast__i {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.v2-toast__i.ok   { background: var(--atlas-paper);  color: var(--atlas-deep); }
.v2-toast__i.info { background: var(--navy-50);      color: var(--navy); }
.v2-toast__i.warn { background: var(--orange-paper); color: var(--orange-deep); }
.v2-toast__i svg { width: 12px; height: 12px; stroke-width: 2.2; }
.v2-toast__b { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.v2-toast__t {
  font-family: 'Geist', sans-serif;
  font-weight: 500;
  font-size: 0.86667rem;
  color: var(--ink-strong);
  line-height: 1.35;
}
.v2-toast__t b { font-weight: 600; }
.v2-toast__m {
  font-family: 'Geist Mono', monospace;
  font-size: 0.66667rem;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}
.v2-toast__a {
  font-family: 'Geist', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  cursor: pointer;
  transition: all 160ms var(--ease-out);
}
.v2-toast__a:hover { border-color: var(--ink-strong); }
.v2-toast__a:active { transform: scale(0.95); }

/* ─── CHAT BUBBLES (for Atlas drawer if needed) ────────────── */
.v2-chat-msg {
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 10px;
  font-family: 'Geist', sans-serif;
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 92%;
}
.v2-chat-msg.user {
  background: var(--navy);
  color: var(--paper-soft);
  margin-left: auto;
  border-bottom-right-radius: 4px;
}
.v2-chat-msg.atlas {
  background: var(--atlas-paper);
  color: var(--ink-strong);
  border-bottom-left-radius: 4px;
}
.v2-chat-msg.atlas b { color: var(--atlas-deep); font-weight: 600; }
.v2-chat-meta {
  font-family: 'Geist Mono', monospace;
  font-size: 0.63333rem;
  color: var(--ink-faint);
  margin-top: 4px;
  letter-spacing: 0.08em;
}

/* ─── IFRAME drawer body ───────────────────────────────────── */
.v2-drawer--iframe { height: 92%; }
.v2-drawer__body--iframe {
  padding: 0;
  display: flex;
  flex: 1;
  min-height: 0;
}
.v2-iframe {
  width: 100%;
  height: 100%;
  flex: 1;
  min-height: 0;
  border: none;
  display: block;
  background: var(--paper);
}

/* ─── PARSING STATE (Smart Upload) ─────────────────────────── */
.v2-parsing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 36px 12px;
  text-align: center;
}
.v2-parsing__spinner {
  width: 36px;
  height: 36px;
  border: 2.5px solid var(--hairline);
  border-top-color: var(--atlas);
  border-radius: 50%;
  animation: v2-spin 0.9s linear infinite;
}
@keyframes v2-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .v2-drawer,
  .v2-backdrop,
  .v2-add-pop,
  .v2-toast {
    animation-duration: 180ms !important;
  }
  .v2-parsing__spinner { animation-duration: 2s; }
}

/* Pro soft-gate modal (v2 shell) */
.mm-modal {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.mm-modal[hidden] { display: none; }
.mm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 14, 30, 0.48);
  cursor: pointer;
}
.mm-modal-panel {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 28px 24px 22px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 18px 48px rgba(14, 31, 59, 0.18);
  z-index: 1;
}
.mm-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 1.46667rem;
  color: var(--ink-muted);
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
}
.mm-upgrade-eyebrow {
  font-size: 0.73333rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange);
  margin: 0 0 8px;
}
.mm-upgrade-title {
  font-family: 'Bricolage Grotesque', serif;
  font-size: 1.6rem;
  line-height: 1.2;
  color: var(--ink-strong);
  margin: 0 0 14px;
}
.mm-upgrade-benefits {
  padding: 0 0 0 18px;
  margin: 0 0 18px;
  color: var(--ink-muted);
  font-size: 0.93333rem;
  line-height: 1.6;
}
.mm-upgrade-cancel {
  display: block;
  width: 100%;
  text-align: center;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.86667rem;
  color: var(--ink-muted);
  margin-top: 10px;
  padding: 8px;
}

/* ───────────────────────────────────────────────────────────────
   Upgrade-modal CTA — legacy .mm-btn baseline (ALL viewports).

   The v2 layout (components/design-v2/_layout.php) does NOT load
   lib/mm-design-system.css, where the base .mm-btn { padding:12px 20px }
   and its --primary/--lg colours + sizing live. The legacy button
   tokens (--mm-gold, --mm-navy, …) also don't exist on v2 routes. So the
   upgrade modal's "See Pro Plans" CTA (.mm-btn.mm-btn--primary.mm-btn--lg,
   _layout.php) renders as an unstyled native blue link on EVERY
   authenticated v2 page where the Pro soft-gate can appear.

   Fix: give the modal's .mm-btn the native .v2-btn appearance using v2
   tokens, at every viewport. Scoped TIGHTLY to the upgrade modal
   (#upgrade-modal / .mm-upgrade-panel) so no unrelated .mm-btn is touched.
   --primary = navy fill, hover orange; --lg upsizes for this primary
   Pro-conversion CTA (the inline style already spans it full width).
   Mirrors the D8 goals-panel baseline in loyalty.css. */
#upgrade-modal .mm-btn,
.mm-upgrade-panel .mm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: 'Geist', sans-serif;
  font-weight: 500;
  font-size: 0.86667rem;
  line-height: 1.2;
  padding: 8px 14px;
  border: 1px solid var(--hairline);
  border-radius: 9px;
  background: var(--paper-soft);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all 160ms var(--ease-out);
}
#upgrade-modal .mm-btn:hover,
.mm-upgrade-panel .mm-btn:hover {
  border-color: var(--ink-strong);
  transform: translateY(-1px);
}
/* Primary — "See Pro Plans" (navy fill, hover orange). */
#upgrade-modal .mm-btn--primary,
.mm-upgrade-panel .mm-btn--primary {
  background: var(--navy);
  color: var(--paper-soft);
  border-color: var(--navy);
}
#upgrade-modal .mm-btn--primary:hover,
.mm-upgrade-panel .mm-btn--primary:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--paper-soft);
}
/* Larger sizing for the primary Pro-conversion CTA (.mm-btn--lg). */
#upgrade-modal .mm-btn--lg,
.mm-upgrade-panel .mm-btn--lg {
  padding: 11px 18px;
  font-size: 0.93333rem;
  font-weight: 600;
}

/* ─── STAY EDITOR (v2-se-) ─────────────────────────────────── */
.v2-se-drawer .v2-se-intro {
  font-family: 'Bricolage Grotesque', serif;
  font-style: normal;
  font-size: 1.06667rem;
  color: var(--ink-muted);
  margin-bottom: 18px;
  line-height: 1.5;
}
.v2-se-attribution {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.v2-se-attribution__badge {
  font-family: 'Geist Mono', monospace;
  font-size: 0.66667rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--hairline);
  background: var(--paper);
}
.v2-se-attribution__badge--matched { color: var(--atlas-deep); border-color: var(--atlas); background: var(--atlas-paper, #E8F4F0); }
.v2-se-attribution__badge--name_only { color: var(--ink-muted); }
.v2-se-attribution__badge--manual { color: var(--pace-ruby); border-color: var(--pace-ruby); background: var(--pace-ruby-paper); }
.v2-se-attribution__hint { font-size: 0.8rem; color: var(--ink-muted); }
.v2-se-date-row { margin-bottom: 18px; }
.v2-se-date-grid { margin-bottom: 10px; }
.v2-se-quick-dates {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.v2-se-quick-dates__label {
  font-family: 'Geist Mono', monospace;
  font-size: 0.66667rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.v2-btn--xs {
  padding: 5px 10px;
  font-size: 0.8rem;
  min-height: 0;
}
.v2-se-warnings {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}
.v2-se-warning {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 0.83333rem;
  line-height: 1.45;
  background: var(--pace-amber-paper, #FFF8E8);
  color: var(--pace-amber, #9A6700);
  border: 1px solid rgba(154, 103, 0, 0.18);
}
.v2-se-warning svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.v2-se-warning--error { background: var(--pace-ruby-paper); color: var(--pace-ruby); border-color: rgba(180, 40, 60, 0.18); }
.v2-se-trip-range {
  font-size: 0.83333rem;
  color: var(--ink-muted);
  padding: 8px 12px;
  border-radius: 9px;
  background: var(--stone-paper, #FAF8F4);
  border: 1px solid var(--hairline);
}
.v2-se-loyalty {
  background: var(--paper-soft);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 16px;
  box-shadow: var(--sh-card);
}
.v2-se-loyalty__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.v2-se-loyalty__title {
  font-family: 'Geist Mono', monospace;
  font-size: 0.66667rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0;
}
.v2-se-loyalty__mode {
  font-size: 0.73333rem;
  color: var(--ink-muted);
  font-family: 'Geist Mono', monospace;
  letter-spacing: 0.06em;
}
.v2-se-loyalty__hint {
  font-size: 0.83333rem;
  color: var(--ink-muted);
  margin: 0 0 12px;
  line-height: 1.45;
}
.v2-se-qualify {
  margin-top: 10px;
  font-size: 0.83333rem;
  color: var(--ink-muted);
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--stone-paper, #FAF8F4);
}
.v2-se-pending {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  background: var(--pace-amber-paper, #FFF8E8);
  color: var(--pace-amber, #9A6700);
  font-size: 0.83333rem;
}
.v2-se-pending svg { width: 16px; height: 16px; flex-shrink: 0; }
.v2-se-followup {
  margin-bottom: 16px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--paper);
  overflow: hidden;
}
.v2-se-followup summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  cursor: pointer;
  font-family: 'Geist', sans-serif;
  font-size: 0.86667rem;
  color: var(--ink);
  list-style: none;
}
.v2-se-followup summary::-webkit-details-marker { display: none; }
.v2-se-followup summary svg { width: 16px; height: 16px; color: var(--ink-muted); }
.v2-se-followup > .v2-f-grid { padding: 0 14px 14px; }
.v2-se-review {
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--stone-paper, #FAF8F4);
}
.v2-se-review__title {
  font-family: 'Geist Mono', monospace;
  font-size: 0.66667rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 12px;
}
.v2-se-review__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin: 0;
}
.v2-se-review__grid dt {
  font-family: 'Geist Mono', monospace;
  font-size: 0.66667rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0;
}
.v2-se-review__grid dd {
  margin: 2px 0 0;
  font-size: 0.9rem;
  color: var(--ink-strong);
}
.v2-se-postsave {
  text-align: center;
  padding: 28px 12px 12px;
}
.v2-se-postsave__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--atlas-paper, #E8F4F0);
  color: var(--atlas-deep);
  display: flex;
  align-items: center;
  justify-content: center;
}
.v2-se-postsave__icon svg { width: 24px; height: 24px; }
.v2-se-postsave__title {
  font-family: 'Bricolage Grotesque', serif;
  font-size: 1.46667rem;
  font-weight: 400;
  margin: 0 0 6px;
  color: var(--ink-strong);
}
.v2-se-postsave__meta {
  font-size: 0.86667rem;
  color: var(--ink-muted);
  margin: 0 0 20px;
}
.v2-se-postsave__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 320px;
  margin: 0 auto;
}
.v2-se-delete { color: var(--pace-ruby); }
.v2-se-error-summary { margin-bottom: 14px; }
.v2-btn--ghost { background: transparent; border-color: transparent; color: var(--ink-muted); }
.v2-btn--ghost:hover { background: var(--paper-shade); }

/* ─── STAY EDITOR (v2-se-) ─────────────────────────────────── */
.v2-se-drawer .v2-se-intro {
  font-family: 'Bricolage Grotesque', serif;
  font-style: normal;
  font-size: 1.06667rem;
  color: var(--ink-muted);
  margin-bottom: 18px;
  line-height: 1.5;
}
.v2-se-attribution {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.v2-se-attribution__badge {
  font-family: 'Geist Mono', monospace;
  font-size: 0.66667rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--hairline);
  background: var(--paper);
}
.v2-se-attribution__badge--matched { color: var(--atlas-deep); border-color: var(--atlas); background: var(--atlas-paper, #E8F4F0); }
.v2-se-attribution__badge--name_only { color: var(--ink-muted); }
.v2-se-attribution__badge--manual { color: var(--pace-ruby); border-color: var(--pace-ruby); background: var(--pace-ruby-paper); }
.v2-se-attribution__hint { font-size: 0.8rem; color: var(--ink-muted); }
.v2-se-date-row { margin-bottom: 18px; }
.v2-se-date-grid { margin-bottom: 10px; }
.v2-se-quick-dates {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.v2-se-quick-dates__label {
  font-family: 'Geist Mono', monospace;
  font-size: 0.66667rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.v2-btn--xs {
  padding: 5px 10px;
  font-size: 0.8rem;
  min-height: 0;
}
.v2-se-warnings {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}
.v2-se-warning {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 0.83333rem;
  line-height: 1.45;
  background: var(--pace-amber-paper, #FFF8E8);
  color: var(--pace-amber, #9A6700);
  border: 1px solid rgba(154, 103, 0, 0.18);
}
.v2-se-warning svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.v2-se-warning--error { background: var(--pace-ruby-paper); color: var(--pace-ruby); border-color: rgba(180, 40, 60, 0.18); }
.v2-se-trip-range {
  font-size: 0.83333rem;
  color: var(--ink-muted);
  padding: 8px 12px;
  border-radius: 9px;
  background: var(--stone-paper, #FAF8F4);
  border: 1px solid var(--hairline);
}
.v2-se-loyalty {
  background: var(--paper-soft);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 16px;
  box-shadow: var(--sh-card);
}
.v2-se-loyalty__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.v2-se-loyalty__title {
  font-family: 'Geist Mono', monospace;
  font-size: 0.66667rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0;
}
.v2-se-loyalty__mode {
  font-size: 0.73333rem;
  color: var(--ink-muted);
  font-family: 'Geist Mono', monospace;
  letter-spacing: 0.06em;
}
.v2-se-loyalty__hint {
  font-size: 0.83333rem;
  color: var(--ink-muted);
  margin: 0 0 12px;
  line-height: 1.45;
}
.v2-se-qualify {
  margin-top: 10px;
  font-size: 0.83333rem;
  color: var(--ink-muted);
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--stone-paper, #FAF8F4);
}
.v2-se-pending {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  background: var(--pace-amber-paper, #FFF8E8);
  color: var(--pace-amber, #9A6700);
  font-size: 0.83333rem;
}
.v2-se-pending svg { width: 16px; height: 16px; flex-shrink: 0; }
.v2-se-followup {
  margin-bottom: 16px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--paper);
  overflow: hidden;
}
.v2-se-followup summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  cursor: pointer;
  font-family: 'Geist', sans-serif;
  font-size: 0.86667rem;
  color: var(--ink);
  list-style: none;
}
.v2-se-followup summary::-webkit-details-marker { display: none; }
.v2-se-followup summary svg { width: 16px; height: 16px; color: var(--ink-muted); }
.v2-se-followup > .v2-f-grid { padding: 0 14px 14px; }
.v2-se-review {
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--stone-paper, #FAF8F4);
}
.v2-se-review__title {
  font-family: 'Geist Mono', monospace;
  font-size: 0.66667rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 12px;
}
.v2-se-review__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin: 0;
}
.v2-se-review__grid dt {
  font-family: 'Geist Mono', monospace;
  font-size: 0.66667rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0;
}
.v2-se-review__grid dd {
  margin: 2px 0 0;
  font-size: 0.9rem;
  color: var(--ink-strong);
}
.v2-se-postsave {
  text-align: center;
  padding: 28px 12px 12px;
}
.v2-se-postsave__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--atlas-paper, #E8F4F0);
  color: var(--atlas-deep);
  display: flex;
  align-items: center;
  justify-content: center;
}
.v2-se-postsave__icon svg { width: 24px; height: 24px; }
.v2-se-postsave__title {
  font-family: 'Bricolage Grotesque', serif;
  font-size: 1.46667rem;
  font-weight: 400;
  margin: 0 0 6px;
  color: var(--ink-strong);
}
.v2-se-postsave__meta {
  font-size: 0.86667rem;
  color: var(--ink-muted);
  margin: 0 0 20px;
}
.v2-se-postsave__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 320px;
  margin: 0 auto;
}
.v2-se-delete { color: var(--pace-ruby); }
.v2-se-error-summary { margin-bottom: 14px; }
.v2-btn--ghost { background: transparent; border-color: transparent; color: var(--ink-muted); }
.v2-btn--ghost:hover { background: var(--paper-shade); }

/* ─── EXEC-06 (ME-11 §5): Founding 100 upgrade modal ──────────────────────────
   Rendered by components/design-v2/founding_upgrade_modal.php from the dashboard
   for engaged Explorer users (flag + offer gated). Reuses the shared .mm-modal /
   .mm-modal-backdrop / .mm-modal-panel / .mm-modal-close shell above; these
   rules add the founding-specific eyebrow / title / body / actions. Tokens only
   (no hardcoded hex) — this file is not scanned by css-hex-guard, but matches the
   convention. */
.mm-fd-modal__panel { max-width: 460px; }
.mm-fd-modal__eyebrow {
  font-size: 0.73333rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--orange);
  margin: 0 0 8px;
}
.mm-fd-modal__title {
  font-family: 'Bricolage Grotesque', Georgia, serif;
  font-size: 1.66667rem;
  line-height: 1.18;
  color: var(--ink-strong);
  margin: 0 0 14px;
}
.mm-fd-modal__body p {
  font-size: 0.96667rem;
  line-height: 1.6;
  color: var(--ink-muted);
  margin: 0 0 12px;
}
.mm-fd-modal__body p:last-child { margin-bottom: 0; }
.mm-fd-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 20px 0 0;
}
.mm-fd-modal__btn {
  display: block;
  width: 100%;
  text-align: center;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.93333rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: filter 140ms var(--ease-out, ease), background 140ms var(--ease-out, ease);
}
.mm-fd-modal__btn--primary {
  background: var(--orange);
  color: #fff;
}
.mm-fd-modal__btn--primary:hover { filter: brightness(1.06); }
.mm-fd-modal__btn--ghost {
  background: transparent;
  color: var(--ink-muted);
  border-color: var(--hairline);
}
.mm-fd-modal__btn--ghost:hover { background: var(--paper-shade); }
.mm-fd-modal__btn:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}
.mm-fd-modal__micro {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--ink-faint);
  text-align: center;
  margin: 12px 0 0;
}
/* Lock background scroll while the founding modal is open. */
body.mm-fd-modal-open { overflow: hidden; }
