/* Concept B ("Tactile Field Guide Atlas") — Shared Self-Hosted Fonts, Tokens & Primitives */

@font-face {
  font-family: 'DM Serif Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/dm-serif-display-latin-400.woff2') format('woff2');
}

@font-face {
  font-family: 'DM Serif Display Fallback';
  src: local('Georgia'), local('Times New Roman');
  size-adjust: 97%;
  ascent-override: 103%;
  descent-override: 28%;
  line-gap-override: 0%;
  font-weight: 400;
}

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/dm-sans-latin-var.woff2') format('woff2');
}

@font-face {
  font-family: 'DM Sans Fallback';
  src: local('Arial'), local('Helvetica Neue');
  size-adjust: 100%;
  ascent-override: 94%;
  descent-override: 24%;
  line-gap-override: 0%;
  font-weight: 400 700;
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-latin-500.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-latin-600.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono Fallback';
  src: local('Consolas'), local('Courier New');
  size-adjust: 100%;
  ascent-override: 102%;
  descent-override: 27%;
  line-gap-override: 0%;
  font-weight: 500 600;
}

:root {
  /* Tactile Field Guide Atlas Palette */
  --fg-navy: #10233F;
  --fg-navy-soft: #1C355B;
  --fg-ink-muted: #39506B;
  --fg-mint: #DDF3E8;
  --fg-mint-deep: #BFE4D1;
  --fg-mint-wash: #F3FAF6;
  --fg-coral: #F26430;
  --fg-coral-ink: #B83E14;
  --fg-coral-wash: #FFF2EC;
  --fg-white: #FFFFFF;

  /* Tactile Elevation & Borders */
  --fg-border: 1.5px solid var(--fg-navy);
  --fg-border-soft: 1px solid rgba(16, 35, 63, 0.24);
  --fg-shadow-soft: 2px 2px 0 rgba(16, 35, 63, 0.12);
  --fg-shadow-sm: 2px 2px 0 var(--fg-navy);
  --fg-shadow-md: 4px 4px 0 var(--fg-navy);
  --fg-shadow-lg: 6px 6px 0 var(--fg-navy);
  --fg-radius-sm: 4px;
  --fg-radius-md: 8px;
  --fg-radius-lg: 12px;

  /* Typography */
  --fg-font-display: 'DM Serif Display', 'DM Serif Display Fallback', Georgia, 'Times New Roman', serif;
  --fg-font-body: 'DM Sans', 'DM Sans Fallback', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --fg-font-mono: 'IBM Plex Mono', 'IBM Plex Mono Fallback', ui-monospace, SFMono-Regular, monospace;

  /* Bridge Existing Site Tokens Seamlessly onto Concept B */
  --btp-navy: var(--fg-navy);
  --btp-night: var(--fg-navy);
  --btp-ink: var(--fg-navy);
  --btp-ink-soft: var(--fg-ink-muted);
  --btp-teal: var(--fg-navy);
  --btp-lagoon: var(--fg-navy-soft);
  --btp-harbor: var(--fg-navy-soft);
  --btp-link: var(--fg-navy);
  --btp-mint: #6ACD9B;
  --btp-pale-mint: var(--fg-mint);
  --btp-sand: var(--fg-mint-wash);
  --btp-sand-deep: var(--fg-mint);
  --btp-teal-tint: var(--fg-mint);
  --btp-teal-line: rgba(16, 35, 63, 0.28);
  --btp-line: rgba(16, 35, 63, 0.22);
  --btp-control: var(--fg-ink-muted);
  --btp-white: var(--fg-white);
  --btp-surface: var(--fg-white);
  --btp-surface-raised: var(--fg-mint);
  --btp-coral: var(--fg-coral-ink);
  --btp-functional-red: var(--fg-coral-ink);
  --btp-red: var(--fg-coral);
  --btp-coral-on-dark: #FF8A5C;
  --btp-on-dark: var(--fg-white);
  --btp-on-gold: var(--fg-navy);
  --btp-font-display: var(--fg-font-display);
  --btp-font-body: var(--fg-font-body);
  --btp-font-mono: var(--fg-font-mono);
  --btp-display-weight: 400;
  --btp-display-settings: normal;
  --btp-label-tracking: 0.09em;
  --btp-radius-sm: 4px;
  --btp-radius-md: 8px;
  --btp-radius-lg: 12px;
  --navy: var(--fg-navy);
  --ink: var(--fg-navy);
  --muted: var(--fg-ink-muted);
  --line: var(--btp-line);
  --paper: var(--fg-mint-wash);
  --cream: var(--fg-mint);
  --orange: var(--fg-coral-ink);
  --serif: var(--fg-font-display);
}

/* Base Canvas & Typography */
body {
  background-color: var(--fg-mint-wash);
  background-image: radial-gradient(rgba(16, 35, 63, 0.065) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--fg-navy);
  font-family: var(--fg-font-body);
}

h1,
h2,
h3,
.card-copy h3,
.moment-grid h3,
.event-copy h3,
.event-art span,
.empty-result h3 {
  font-family: var(--fg-font-display);
  font-weight: 400;
  font-variation-settings: normal;
  letter-spacing: -0.01em;
}

.eyebrow,
.btp-eyebrow {
  font-family: var(--fg-font-mono);
  font-weight: 600;
  letter-spacing: 0.09em;
  color: var(--fg-coral-ink);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--fg-coral);
  outline-offset: 2px;
}

/* Reusable Field Guide Atlas Primitives (used in Phases 2–4) */
.fg-mono-stamp {
  font-family: var(--fg-font-mono);
  font-size:0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}

.fg-plate {
  border: 2px solid var(--fg-navy);
  border-radius: var(--fg-radius-md);
  background: var(--fg-white);
  box-shadow: var(--fg-shadow-md);
  overflow: hidden;
}

.fg-card {
  background: var(--fg-white);
  border: var(--fg-border-soft);
  border-radius: var(--fg-radius-md);
  box-shadow: var(--fg-shadow-soft);
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.fg-card:hover {
  border-color: var(--fg-navy);
  transform: translate(-2px, -2px);
  box-shadow: var(--fg-shadow-md);
}

/* Phase 3: Unified Concept B Field Guide Card Framing (Area Hubs, /things-to-do & Place Listings) */
html body[data-b3-page] .btp-card.btp-card {
  background: var(--fg-white);
  border: var(--fg-border-soft);
  border-radius: var(--fg-radius-md);
  box-shadow: var(--fg-shadow-soft);
}

html body[data-b3-page] .btp-card .btp-card-title {
  font-family: var(--fg-font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
}

html body[data-b3-page] .btp-card .btp-card-badge {
  background: #10233F;
  color: #DDF3E8;
  border: 1px solid #DDF3E8;
  border-radius: 3px;
  padding: 4px 9px;
  font-family: var(--fg-font-mono);
  font-size:0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

html body[data-b3-page] .btp-card .btp-card-text-badge {
  font-family: var(--fg-font-mono);
  font-size:0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-coral-ink);
}

html body[data-b3-page] .btp-card .place-budget {
  font-family: var(--fg-font-mono);
  font-size:0.8125rem;
  font-variant-numeric: tabular-nums;
}

.fg-illustrated-mat {
  position: relative;
  aspect-ratio: 4 / 3;
  width: 100%;
  background: var(--fg-navy);
  padding: 10px 12px 9px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fg-illustrated-window {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  border: 1.5px solid var(--fg-mint);
  border-radius: 3px;
  overflow: hidden;
  background: #142748;
}

.fg-illustrated-window img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 48%;
}

.fg-pill-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.fg-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border: 1px solid rgba(16, 35, 63, 0.28);
  border-radius: 3px;
  background: var(--fg-white);
  color: var(--fg-navy);
  font-family: var(--fg-font-mono);
  font-size:0.8125rem;
  font-weight: 500;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}

.fg-pill--drive {
  background: var(--fg-navy);
  border-color: var(--fg-navy);
  color: var(--fg-white);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.fg-pill--mint {
  background: var(--fg-mint);
  border-color: rgba(16, 35, 63, 0.35);
  color: var(--fg-navy);
}

.fg-pill--coral {
  background: var(--fg-coral);
  border-color: var(--fg-navy);
  color: var(--fg-navy);
  font-weight: 600;
}

.fg-btn-coral {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  background: var(--fg-coral);
  color: var(--fg-navy);
  border: var(--fg-border);
  border-radius: var(--fg-radius-sm);
  font-family: var(--fg-font-body);
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--fg-shadow-sm);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.fg-btn-coral:hover {
  background: #FF7542;
  color: var(--fg-navy);
  transform: translate(-2px, -2px);
  box-shadow: var(--fg-shadow-md);
}

/* Temporary Venue / Event Closure Notice (Concept B --fg-* tokens, WCAG AA light & dark) */
.fg-closure-notice {
  margin: 14px 0 16px;
  padding: 14px 16px;
  background: var(--fg-coral-wash);
  color: var(--btp-ink);
  border: var(--fg-border);
  border-left: 5px solid var(--fg-coral);
  border-radius: var(--fg-radius-md);
  box-shadow: var(--fg-shadow-sm);
  max-width: 68ch;
  overflow-wrap: anywhere;
}

.fg-closure-notice .fg-closure-eyebrow {
  margin: 0 0 4px;
  font-family: var(--fg-font-mono);
  font-size:0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--fg-coral-ink);
}

.fg-closure-notice .fg-closure-title {
  margin: 0 0 6px;
  font-family: var(--fg-font-body);
  font-size:1.0625rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--btp-ink);
}

.fg-closure-notice .fg-closure-body {
  margin: 0 0 10px;
  font-family: var(--fg-font-body);
  font-size:0.9375rem;
  line-height: 1.48;
  color: var(--btp-ink);
}

.fg-closure-notice .fg-closure-action {
  margin: 0;
}

.fg-closure-notice .fg-closure-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 9px 14px;
  background: var(--fg-navy);
  color: var(--fg-white);
  border: 1.5px solid var(--fg-navy);
  border-radius: var(--fg-radius-sm);
  font-family: var(--fg-font-body);
  font-size:0.9375rem;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: underline;
  text-underline-offset: 3px;
  box-shadow: var(--fg-shadow-soft);
}

.fg-closure-notice .fg-closure-link:hover {
  background: var(--fg-navy-soft);
  color: var(--fg-white);
}

.fg-closure-inline {
  margin: 8px 0 0;
  font-size:0.875rem;
  font-weight: 700;
  line-height: 1.4;
}

.fg-closure-inline a {
  color: var(--fg-coral-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 600px) {
  .fg-closure-notice {
    margin: 10px 0 12px;
    padding: 10px 12px;
  }

  .fg-closure-notice .fg-closure-title {
    font-size:0.9375rem;
    margin-bottom: 4px;
  }

  .fg-closure-notice .fg-closure-body {
    font-size:0.875rem;
    line-height: 1.4;
    margin-bottom: 8px;
  }

  .fg-closure-notice .fg-closure-link {
    width: 100%;
    text-align: center;
    padding: 8px 12px;
    font-size:0.875rem;
  }
}

.fg-chips-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.fg-chips-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.fg-rail {
  position: sticky;
  top: 24px;
  background: var(--fg-white);
  border: 2px solid var(--fg-navy);
  border-radius: var(--fg-radius-md);
  box-shadow: var(--fg-shadow-md);
  overflow: hidden;
  min-width: 0;
}

@media (max-width: 959px) {
  .fg-rail {
    position: static;
    top: auto;
  }
}

@media (max-width: 640px) {
  .atlas-utility-strip {
    display: none;
  }

  .fg-chips-row {
    position: relative;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .fg-chips-row::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 2px;
    width: 38px;
    height: 52px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.94) 85%, #FFFFFF 100%);
    pointer-events: none;
    z-index: 2;
  }

  .fg-chips-scroll {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 2px 38px 8px 2px;
    scroll-padding-inline: 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .fg-chips-scroll::-webkit-scrollbar {
    display: none;
  }

  .fg-chips-scroll > * {
    flex-shrink: 0;
    white-space: nowrap;
  }

  /* Phase 4: Mobile horizontal chip scroll with right-edge peek fade on active filters & /planner */
  html body[data-b3-page] .btp-active-filters {
    position: relative;
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
    padding: 4px 36px 8px 2px;
    scroll-padding-inline: 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 34px), transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 34px), transparent 100%);
  }

  html body[data-b3-page] .btp-active-filters::-webkit-scrollbar {
    display: none;
  }

  html body[data-b3-page] .btp-active-filters > * {
    flex-shrink: 0;
    white-space: nowrap;
  }

  /* Keep /events quick-filter pills wrapped cleanly inside the filter card on mobile (no right-edge clipping) */
  html body[data-b3-page] #event-filters .event-quick-filters {
    flex-wrap: wrap;
    overflow-x: visible;
    max-width: 100%;
    gap: 8px 10px;
    padding: 4px 0 2px;
    mask-image: none;
    -webkit-mask-image: none;
  }

  html body[data-b3-page] #event-filters .event-quick-filters > * {
    flex: 0 1 auto;
    max-width: 100%;
  }

  .planner-shell .chips,
  .planner-shell .segments {
    padding: 6px 34px 8px 4px;
    scroll-padding-inline: 12px;
    scrollbar-width: none;
    mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 30px), transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 30px), transparent 100%);
  }

  .planner-shell .chips::-webkit-scrollbar,
  .planner-shell .segments::-webkit-scrollbar {
    display: none;
  }
}

/* Phase 4: /events Field Calendar, /locals Refinements & Sunset Walk 4:3 Compact Thumbs */
html body[data-b3-page] #event-filters {
  background: var(--fg-white);
  border: var(--fg-border);
  border-radius: var(--fg-radius-md);
  box-shadow: var(--fg-shadow-sm);
}

html body[data-b3-page] #event-filters label {
  font-family: var(--fg-font-mono);
  font-size:0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Single-line Concept B select controls with inline SVG caret (prevents native caret wrap) */
html body[data-b3-page] :is(#browse-form, #event-filters, .moment-area-switcher) select {
  display: inline-block;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background-color: var(--btp-surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%2310233F' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round' d='M1.5 1.5 6 6l4.5-4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
}

html body[data-b3-page] :is(#browse-form, #event-filters, .moment-area-switcher) select::picker-icon {
  display: none;
}

html[data-btp-theme="dark"] body[data-b3-page] :is(#browse-form, #event-filters, .moment-area-switcher) select {
  background-color: var(--btp-surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23DDF3E8' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round' d='M1.5 1.5 6 6l4.5-4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
}

#events-container .btp-event-mode:not([hidden]) {
  padding: 3px;
  background: var(--fg-mint);
  border: var(--fg-border);
  border-radius: 999px;
  box-shadow: var(--fg-shadow-sm);
}

#events-container .btp-event-mode [role="radio"] {
  font-family: var(--fg-font-mono);
  font-size:0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg-navy);
}

#events-container .btp-event-mode [aria-checked="true"] {
  background: var(--fg-navy);
  color: var(--fg-white);
}

html body[data-b3-page] .btp-events-group h2 {
  font-family: var(--fg-font-display);
  font-weight: 400;
  line-height: 1.1;
  padding-bottom: 8px;
  border-bottom: 1.5px solid var(--btp-line);
}

/* Non-clock fallback schedule strings stay plain mono text, never dark navy pills */
html body[data-b3-page] .btp-card :is(.event-date, .event-time, .event-fact-check, .hours-summary) {
  font-family: var(--fg-font-mono);
  font-size:0.8125rem;
  font-variant-numeric: tabular-nums;
  color: var(--btp-ink-soft);
  background: transparent;
}

/* Keep Sunset Walk illustrated compact thumbs at 4:3 on utility & /saved cards */
:is(.saved-item, .saved-shared, .planner-shell, .btp-card) img[src*="sunset-walk-illustration"] {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 48%;
}

/* /locals Tactile Field Guide alignment */
.locals-hero {
  border-bottom: 3px solid var(--fg-coral);
}

.locals-hero h1 {
  font-family: var(--fg-font-display);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.015em;
}

.locals-next {
  border: 2px solid var(--fg-navy);
  border-radius: var(--fg-radius-md);
  box-shadow: 4px 4px 0 var(--fg-coral);
}

.locals-chip,
.locals-time,
.locals-town,
.locals-stamp {
  font-family: var(--fg-font-mono);
}

.locals-days .locals-list,
.locals-deal,
.locals-note,
.locals-cal {
  border-radius: var(--fg-radius-md);
  box-shadow: var(--fg-shadow-soft);
}

html[data-btp-theme="dark"] #events-container .btp-event-mode:not([hidden]) {
  background: var(--fg-navy-soft);
  border-color: var(--btp-teal-line);
}

html[data-btp-theme="dark"] #events-container .btp-event-mode [role="radio"] {
  color: var(--btp-ink);
}

html[data-btp-theme="dark"] #events-container .btp-event-mode [aria-checked="true"] {
  background: var(--btp-link);
  color: var(--fg-navy);
}

/* Phase 2: All 6 Moment Pages, 5 Area x Moment Routes & Park Rest Day */
:is([data-moment-page], .area-moment-page, .rest-day-page) .page-heading {
  max-width: none;
  margin: 16px 0 28px;
  padding: clamp(22px, 3vw, 34px) clamp(20px, 3.2vw, 36px);
  background: var(--fg-mint);
  border: 2px solid var(--fg-navy);
  border-radius: var(--fg-radius-md);
  box-shadow: var(--fg-shadow-md);
}

:is([data-moment-page], .area-moment-page, .rest-day-page) .page-heading h1 {
  line-height: 1.1;
  letter-spacing: -0.01em;
}

:is([data-moment-page], .area-moment-page, .rest-day-page) .page-heading .lead {
  color: var(--btp-ink);
  max-width: 66ch;
}

:is([data-moment-page], .rest-day-page) :is(.moment-hero, .destination-hero) {
  border: 2px solid var(--fg-navy);
  border-radius: var(--fg-radius-md);
  box-shadow: var(--fg-shadow-md);
}

[data-moment-page] .moment-area-switcher {
  max-width: 420px;
  margin: 12px 0 18px;
  padding: 16px 18px;
  background: var(--fg-white);
  border: var(--fg-border);
  border-radius: var(--fg-radius-md);
  box-shadow: var(--fg-shadow-sm);
}

[data-moment-page] .moment-area-switcher label {
  font-family: var(--fg-font-mono);
  font-size:0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--btp-ink-soft);
}

.rest-day-page .rest-day-areas button {
  border: var(--fg-border-soft);
  border-radius: var(--fg-radius-sm);
  background: var(--fg-white);
  color: var(--btp-ink);
  font-family: var(--fg-font-mono);
  font-size:0.8125rem;
  font-weight: 600;
}

.rest-day-page .rest-day-areas button[aria-pressed="true"] {
  background: var(--fg-navy);
  border-color: var(--fg-navy);
  color: var(--fg-white);
  box-shadow: 3px 3px 0 var(--fg-coral) !important;
}

.rest-day-page #rest-day-plan {
  background: var(--fg-coral) !important;
  color: #10233F !important;
  border: 1.5px solid #10233F !important;
  border-radius: var(--fg-radius-sm) !important;
  box-shadow: 3px 3px 0 #10233F !important;
}

/* Framed 4:3 Venue Plates & Top-Aligned Moment Grids */
:is([data-moment-page], .area-moment-page, .rest-day-page) :is(.moment-picks, #rest-day-picks) {
  align-items: start;
}

html body[data-b3-page] :is([data-moment-page], .area-moment-page, .rest-day-page) .btp-card.btp-card {
  background: var(--fg-white);
  border: var(--fg-border-soft);
  border-radius: var(--fg-radius-md);
  box-shadow: var(--fg-shadow-soft);
}

html body[data-b3-page] :is([data-moment-page], .area-moment-page, .rest-day-page) .btp-card .btp-card-media {
  aspect-ratio: 4 / 3;
  align-self: start;
  border-bottom: 1px solid var(--btp-line);
}

html body[data-b3-page] :is([data-moment-page], .area-moment-page, .rest-day-page) .btp-card .btp-card-media :is(picture, img) {
  aspect-ratio: 4 / 3;
}

html body[data-b3-page] :is([data-moment-page], .area-moment-page, .rest-day-page) .btp-card .btp-card-text-badge {
  font-family: var(--fg-font-mono);
  font-size:0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-coral-ink);
}

html body[data-b3-page] :is([data-moment-page], .area-moment-page, .rest-day-page) .btp-card .btp-card-title {
  font-family: var(--fg-font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
}

html body[data-b3-page] :is([data-moment-page], .area-moment-page, .rest-day-page) .logistics-pill {
  font-family: var(--fg-font-mono);
  font-size:0.8125rem;
  border-radius: 3px;
  background: var(--fg-mint);
  color: #10233F;
  border: 1px solid rgba(16, 35, 63, 0.28);
}

/* Field Ledger Comparison Table (.s2-compare) */
:is([data-moment-page], .area-moment-page, .rest-day-page) .s2-table-wrap {
  border: var(--fg-border);
  border-radius: var(--fg-radius-md);
  box-shadow: var(--fg-shadow-sm);
  background: var(--fg-white);
}

:is([data-moment-page], .area-moment-page, .rest-day-page) .s2-compare table {
  font-family: var(--fg-font-body);
}

:is([data-moment-page], .area-moment-page, .rest-day-page) .s2-compare caption {
  background: var(--fg-mint-wash);
  color: var(--btp-ink-soft);
  border-bottom: 1px solid var(--btp-line);
}

:is([data-moment-page], .area-moment-page, .rest-day-page) .s2-compare thead th {
  background: #10233F;
  color: #FFFFFF;
  font-family: var(--fg-font-mono);
  font-size:0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

:is([data-moment-page], .area-moment-page, .rest-day-page) .s2-compare tbody th {
  background: var(--fg-mint-wash);
  color: var(--btp-ink);
  font-weight: 700;
}

:is([data-moment-page], .area-moment-page, .rest-day-page) .s2-compare tbody td {
  background: var(--fg-white);
  color: var(--btp-ink);
}

:is([data-moment-page], .area-moment-page, .rest-day-page) .s2-compare .s2-table-budget {
  font-family: var(--fg-font-mono);
  font-variant-numeric: tabular-nums;
  font-size:0.8125rem;
}

/* Moment FAQ Accordions & Related Links */
:is([data-moment-page], .area-moment-page, .rest-day-page) .moment-faq details {
  margin-bottom: 10px;
  padding: 6px 16px;
  background: var(--fg-white);
  border: var(--fg-border-soft);
  border-radius: var(--fg-radius-md);
  box-shadow: var(--fg-shadow-soft);
}

:is([data-moment-page], .area-moment-page, .rest-day-page) .moment-faq summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  font-weight: 700;
  color: var(--btp-ink);
}

:is([data-moment-page], .area-moment-page, .rest-day-page) .moment-faq details[open] {
  border-color: var(--fg-navy);
  border-left: 4px solid var(--fg-coral);
}

:is([data-moment-page], .area-moment-page, .rest-day-page) .moment-related ul {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

:is([data-moment-page], .area-moment-page, .rest-day-page) .moment-related li {
  margin: 0;
}

:is([data-moment-page], .area-moment-page, .rest-day-page) .moment-related a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  background: var(--fg-white);
  border: var(--fg-border-soft);
  border-radius: var(--fg-radius-sm);
  box-shadow: var(--fg-shadow-soft);
  font-weight: 700;
  text-decoration: none;
  color: var(--btp-ink);
}

:is([data-moment-page], .area-moment-page, .rest-day-page) .moment-related a:hover {
  background: var(--fg-mint);
  border-color: var(--fg-navy);
  box-shadow: var(--fg-shadow-sm);
}

@media (max-width: 600px) {
  :is([data-moment-page], .area-moment-page, .rest-day-page) .page-heading {
    margin: 12px 0 22px;
    padding: 18px 16px 20px;
  }

  :is([data-moment-page], .area-moment-page, .rest-day-page) .page-heading h1 {
    font-size:clamp(1.9rem, 7.6vw, 2.35rem);
    line-height: 1.1;
  }
}

/* Explicit High-Contrast Dark Mode Overrides (Overrides readable-ui heuristic) */
html[data-btp-theme="dark"] {
  --fg-navy: #0B172A;
  --fg-navy-soft: #132642;
  --fg-ink-muted: #BFE4D1;
  --fg-mint: #16332D;
  --fg-mint-deep: #1E463D;
  --fg-mint-wash: #0B172A;
  --fg-coral: #FF7A47;
  --fg-coral-ink: #FF9C75;
  --fg-coral-wash: #2B1D1B;
  --fg-white: #132642;
  --fg-border: 1.5px solid rgba(221, 243, 232, 0.32);
  --fg-border-soft: 1px solid rgba(221, 243, 232, 0.22);
  --fg-shadow-soft: 2px 2px 0 rgba(0, 0, 0, 0.35);
  --fg-shadow-sm: 2px 2px 0 rgba(0, 0, 0, 0.45);
  --fg-shadow-md: 4px 4px 0 rgba(0, 0, 0, 0.55);
  --fg-shadow-lg: 6px 6px 0 rgba(0, 0, 0, 0.6);

  --btp-sand: #0B172A;
  --btp-sand-deep: #132642;
  --btp-surface: #132642;
  --btp-surface-raised: #193152;
  --btp-white: #132642;
  --btp-ink: #EDF8F2;
  --btp-ink-soft: #C2DFD0;
  --btp-link: #92E3BA;
  --btp-teal: #1D4138;
  --btp-harbor: #245246;
  --btp-teal-tint: #16332D;
  --btp-teal-line: rgba(191, 228, 209, 0.35);
  --btp-line: rgba(191, 228, 209, 0.26);
  --btp-control: #8EB2A4;
  --btp-coral: #FF8A5C;
  --btp-coral-on-dark: #FF8A5C;
  --btp-on-dark: #FFFFFF;
}

html[data-btp-theme="dark"] body {
  background-color: #0B172A;
  background-image: radial-gradient(rgba(221, 243, 232, 0.07) 1px, transparent 1px);
  color: #EDF8F2;
}

html[data-btp-theme="dark"] .eyebrow,
html[data-btp-theme="dark"] .btp-eyebrow {
  color: #FF9C75;
}

html[data-btp-theme="dark"] .btp-chip {
  background: #132642;
  color: #EDF8F2;
  border-color: rgba(191, 228, 209, 0.35);
}

html[data-btp-theme="dark"] .btp-chip[aria-pressed="true"] {
  background: #DDF3E8 !important;
  color: #10233F !important;
  border-color: #DDF3E8 !important;
}

html[data-btp-theme="dark"] .btp-logistics .logistics-closed {
  background: var(--fg-coral) !important;
  color: var(--fg-navy) !important;
  border-color: var(--fg-coral) !important;
}

html[data-btp-theme="dark"] button.outline,
html[data-btp-theme="dark"] .analytics-choice [data-choice="deny"] {
  background: #132642 !important;
  color: #EDF8F2 !important;
  border-color: rgba(221, 243, 232, 0.45) !important;
}

html[data-btp-theme="dark"] .fg-pill--drive {
  background: #DDF3E8;
  border-color: #DDF3E8;
  color: #10233F;
}

html[data-btp-theme="dark"] .fg-pill--mint {
  background: #16332D;
  border-color: rgba(221, 243, 232, 0.35);
  color: #EDF8F2;
}

html[data-btp-theme="dark"] .fg-pill--coral,
html[data-btp-theme="dark"] .fg-btn-coral {
  background: #FF7A47;
  color: #10233F;
  border-color: #10233F;
}

html[data-btp-theme="dark"] .fg-closure-notice {
  background: var(--fg-coral-wash);
  color: var(--btp-ink);
  border-color: rgba(255, 156, 117, 0.45);
  border-left-color: var(--fg-coral);
}

html[data-btp-theme="dark"] .fg-closure-notice .fg-closure-eyebrow {
  color: var(--fg-coral-ink);
}

html[data-btp-theme="dark"] .fg-closure-notice .fg-closure-title,
html[data-btp-theme="dark"] .fg-closure-notice .fg-closure-body {
  color: var(--btp-ink);
}

html[data-btp-theme="dark"] .fg-closure-notice .fg-closure-link {
  background: var(--fg-coral);
  color: var(--fg-navy);
  border-color: var(--fg-coral);
}

html[data-btp-theme="dark"] .fg-closure-notice .fg-closure-link:hover {
  background: var(--fg-coral-ink);
  color: var(--fg-navy);
  border-color: var(--fg-coral-ink);
}

html[data-btp-theme="dark"] .fg-closure-inline a {
  color: var(--fg-coral-ink);
}

html[data-btp-theme="dark"] :is([data-moment-page], .area-moment-page, .rest-day-page) .page-heading {
  background: #132842;
  border-color: rgba(221, 243, 232, 0.32);
}

html[data-btp-theme="dark"] :is([data-moment-page], .area-moment-page, .rest-day-page) .s2-compare thead th {
  background: #091324;
  color: #DDF3E8;
}

html[data-btp-theme="dark"] :is([data-moment-page], .area-moment-page, .rest-day-page) .s2-compare tbody th {
  background: #162E4E;
  color: #EDF8F2;
}

html[data-btp-theme="dark"] :is([data-moment-page], .area-moment-page, .rest-day-page) .s2-compare tbody td {
  background: #132642;
  color: #EDF8F2;
}

html[data-btp-theme="dark"] :is([data-moment-page], .area-moment-page, .rest-day-page) .logistics-pill {
  background: #16332D;
  color: #EDF8F2;
  border-color: rgba(221, 243, 232, 0.35);
}

html[data-btp-theme="dark"] .rest-day-page .rest-day-areas button[aria-pressed="true"] {
  background: #DDF3E8;
  border-color: #DDF3E8;
  color: #10233F;
}

html[data-btp-theme="dark"] :is([data-moment-page], .area-moment-page, .rest-day-page) .moment-related a:hover {
  background: #16332D;
  border-color: #DDF3E8;
}

@media (max-width: 640px) {
  html[data-btp-theme="dark"] .fg-chips-row::after {
    background: linear-gradient(90deg, rgba(19, 38, 66, 0) 0%, rgba(19, 38, 66, 0.94) 85%, #132642 100%);
  }
}

/* Print Safety */
@media print {
  body {
    background: #FFFFFF !important;
    background-image: none !important;
    color: #10233F !important;
  }

  .skip,
  .skip-link {
    display: none !important;
  }

  .fg-pill--drive {
    background: #FFFFFF !important;
    color: #10233F !important;
    border: 1.25pt solid #10233F !important;
    white-space: nowrap !important;
  }
}
html[data-btp-theme="dark"] body[data-b3-page] .btp-card .btp-card-badge{background:var(--btp-night);color:var(--btp-on-dark);border:1px solid var(--btp-control)}:where(html[data-btp-theme="dark"]) .fg-illustrated-window{background:var(--btp-night)}:where(html[data-btp-theme="dark"]) .fg-btn-coral:hover{background:var(--btp-gold)}@media (max-width: 640px){:where(html[data-btp-theme="dark"]) .fg-chips-row::after{background:linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.94) 85%, var(--btp-surface) 100%)}}:where(html[data-btp-theme="dark"]) .rest-day-page #rest-day-plan{color:var(--btp-link) !important;border:1.5px solid var(--btp-control) !important;box-shadow:3px 3px 0 var(--btp-night) !important}html[data-btp-theme="dark"] body[data-b3-page] :is([data-moment-page], .area-moment-page, .rest-day-page) .logistics-pill{color:var(--btp-link)}:where(html[data-btp-theme="dark"]) :is([data-moment-page], .area-moment-page, .rest-day-page) .s2-compare thead th{background:var(--btp-night);color:var(--btp-on-dark)}html[data-btp-theme="dark"][data-btp-theme="dark"] body{background-color:var(--btp-night);color:var(--btp-on-dark)}html[data-btp-theme="dark"][data-btp-theme="dark"] .eyebrow,html[data-btp-theme="dark"][data-btp-theme="dark"] .btp-eyebrow{color:var(--btp-status-danger)}html[data-btp-theme="dark"][data-btp-theme="dark"] .btp-chip{background:var(--btp-night);color:var(--btp-on-dark)}html[data-btp-theme="dark"][data-btp-theme="dark"] .btp-chip[aria-pressed="true"]{background:var(--btp-surface) !important;color:var(--btp-link) !important;border-color:var(--btp-control) !important}html[data-btp-theme="dark"][data-btp-theme="dark"] button.outline,html[data-btp-theme="dark"][data-btp-theme="dark"] .analytics-choice [data-choice="deny"]{background:var(--btp-night) !important;color:var(--btp-on-dark) !important}html[data-btp-theme="dark"][data-btp-theme="dark"] .fg-pill--drive{background:var(--btp-surface);border-color:var(--btp-control);color:var(--btp-link)}html[data-btp-theme="dark"][data-btp-theme="dark"] .fg-pill--mint{background:var(--btp-night);color:var(--btp-on-dark)}html[data-btp-theme="dark"][data-btp-theme="dark"] .fg-pill--coral,html[data-btp-theme="dark"][data-btp-theme="dark"] .fg-btn-coral{background:var(--btp-gold);color:var(--btp-link);border-color:var(--btp-control)}html[data-btp-theme="dark"][data-btp-theme="dark"] :is([data-moment-page], .area-moment-page, .rest-day-page) .page-heading{background:var(--btp-night)}html[data-btp-theme="dark"][data-btp-theme="dark"] :is([data-moment-page], .area-moment-page, .rest-day-page) .s2-compare thead th{background:var(--btp-night);color:var(--btp-on-dark)}html[data-btp-theme="dark"][data-btp-theme="dark"] :is([data-moment-page], .area-moment-page, .rest-day-page) .s2-compare tbody th{background:var(--btp-night);color:var(--btp-on-dark)}html[data-btp-theme="dark"][data-btp-theme="dark"] :is([data-moment-page], .area-moment-page, .rest-day-page) .s2-compare tbody td{background:var(--btp-night);color:var(--btp-on-dark)}html[data-btp-theme="dark"][data-btp-theme="dark"] :is([data-moment-page], .area-moment-page, .rest-day-page) .logistics-pill{background:var(--btp-night);color:var(--btp-on-dark)}html[data-btp-theme="dark"][data-btp-theme="dark"] .rest-day-page .rest-day-areas button[aria-pressed="true"]{background:var(--btp-surface);border-color:var(--btp-control);color:var(--btp-link)}html[data-btp-theme="dark"][data-btp-theme="dark"] :is([data-moment-page], .area-moment-page, .rest-day-page) .moment-related a:hover{background:var(--btp-night);border-color:var(--btp-control)}@media (max-width: 640px){html[data-btp-theme="dark"][data-btp-theme="dark"] .fg-chips-row::after{background:linear-gradient(90deg, rgba(19, 38, 66, 0) 0%, rgba(19, 38, 66, 0.94) 85%, var(--btp-night) 100%)}}@media print{:where(html[data-btp-theme="dark"]) body{background:var(--btp-surface) !important;color:var(--btp-link) !important}:where(html[data-btp-theme="dark"]) .fg-pill--drive{background:var(--btp-surface) !important;color:var(--btp-link) !important;border:1.25pt solid var(--btp-control) !important}}