/**
 * Sunny Days Travel — Design System
 * =================================
 * WARM CREAM / HOTELTONIGHT visual direction (the "opus" mockups the owner
 * approved). Cream #FFF9F0 paper, deep-ink text, warm-orange #FF8A3D accent,
 * Plus Jakarta Sans display + Inter body, 26px card radii, warm shadows,
 * pill controls.
 *
 * This file REPLACES the previous dark luxury-editorial system ("moody dark
 * backgrounds, premium serif display type"), which the owner rejected twice.
 *
 * Tokens live in sd-tokens.css and MUST be loaded first.
 *
 * Component class NAMES are deliberately unchanged. trip-detail.js,
 * timeline-view.js, wishlist.js and departure-badge.js reference these classes
 * and are outside this task's ownership list — they keep working with zero JS
 * edits because the names and the --color-* aliases both survived.
 */

/* =================================================================
   BASE
   Font faces are self-hosted and linked separately (fonts/fonts.css).
   No @import here on purpose: it would serialise HTML->CSS->CSS->font.
   ================================================================= */

body {
  font-family: var(--body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* a11y.css already sets `html, body { overflow-x: hidden }`. That alone does
   NOT constrain a flex/grid child, so every horizontal scroller in here also
   carries `min-width: 0; max-width: 100%`. Skipping that produced a 1382px
   document inside a 390px viewport once already. */

::selection { background: var(--gold-soft); color: var(--ink); }

/* =================================================================
   TYPOGRAPHY
   ================================================================= */

.font-display,
.text-display,
.text-title,
h1.masthead,
.masthead {
  font-family: var(--display);
  letter-spacing: -0.03em;
}

.temp-display,
.num {
  font-family: var(--display);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.display-xl { font-family: var(--display); font-weight: 800; font-size: clamp(30px, 5.4vw, 52px); letter-spacing: -0.035em; line-height: 1.03; }
.display-l  { font-family: var(--display); font-weight: 800; font-size: clamp(24px, 4vw, 38px); letter-spacing: -0.03em; line-height: 1.08; }
.display-m  { font-family: var(--display); font-weight: 800; font-size: 21px; letter-spacing: -0.02em; }
.display-s  { font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }

.text-display { font-weight: 800; font-size: clamp(28px, 5vw, 44px); line-height: 1.05; color: var(--ink); }
.text-title   { font-weight: 800; font-size: 21px; line-height: 1.2; color: var(--ink); }
.text-heading { font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: -0.01em; color: var(--ink); }
.text-body    { font-size: 14.5px; color: var(--ink); }
.text-caption { font-size: 12px; color: var(--ink-soft); }

.eyebrow {
  font-family: var(--display);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.meta { font-size: 12.5px; color: var(--ink-soft); font-weight: 500; }

/* =================================================================
   SHELL / MASTHEAD
   ================================================================= */

.sd-topbar {
  background: rgba(255, 249, 240, 0.9);
  backdrop-filter: blur(14px) saturate(1.35);
  -webkit-backdrop-filter: blur(14px) saturate(1.35);
  border-bottom: 1px solid var(--hairline);
}

.sd-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.sd-brand__mark {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
  background: linear-gradient(135deg, var(--gold), var(--sun));
  box-shadow: 0 4px 14px rgba(255, 138, 61, 0.34);
}

h1.masthead,
.sd-brand__name {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--ink);
  line-height: 1.05;
}

.sd-brand__tag {
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 500;
  margin-top: 2px;
}

.sd-brand__tag b { color: var(--sun-deep); font-weight: 700; }

.sd-stat {
  text-align: right;
  font-size: 11.5px;
  color: var(--ink-soft);
  line-height: 1.5;
}

.sd-stat b {
  font-family: var(--display);
  font-weight: 800;
  color: var(--ink);
}

/* The old dark theme drew a gold hairline rule under the masthead. Keep the
   class (the template still uses it) but make it a warm gradient. */
.masthead-rule {
  height: 3px;
  background: linear-gradient(90deg, var(--sun) 0%, var(--gold) 38%, rgba(255, 193, 69, 0) 100%);
}

/* =================================================================
   CONTROLS — pill everything
   ================================================================= */

.sd-controls {
  background: var(--paper-raised);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  box-shadow: var(--lift-1);
}

.sd-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }

.sd-field__label {
  font-family: var(--display);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.sd-field__label .opt { text-transform: none; letter-spacing: 0; font-weight: 500; }

/* Pill select. Native <select> is kept (it is the most accessible and most
   usable control on mobile); only the chrome changes. min-height 44px keeps
   the a11y tap-target baseline. */
.sd-select {
  appearance: none;
  -webkit-appearance: none;
  font-family: var(--body);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  background-color: var(--paper-raised);
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%235A5A75' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  border: 1.5px solid var(--hairline);
  border-radius: var(--r-chip);
  padding: 11px 34px 11px 15px;
  min-height: 44px;
  max-width: 100%;
  cursor: pointer;
  transition: border-color 0.16s, box-shadow 0.16s;
}

.sd-select:hover { border-color: var(--ink-faint); }
.sd-select:focus { outline: none; border-color: var(--sun); box-shadow: 0 0 0 3px rgba(255, 138, 61, 0.2); }
.sd-select:disabled { cursor: not-allowed; background-color: var(--paper-sunken); color: var(--ink-faint); }

.sd-resultcount {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--display);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--sun-deep);
  background: var(--gold-soft);
  border-radius: var(--r-chip);
  padding: 8px 15px;
  min-height: 34px;
  white-space: nowrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--display);
  font-size: 12.5px;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: var(--r-chip);
  border: 1.5px solid var(--hairline);
  background: var(--paper-raised);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.16s;
}

.pill--active,
.pill[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pill--inactive { color: var(--ink-soft); }
.pill--inactive:hover { border-color: var(--ink-faint); }

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: var(--r-chip);
  border: 1.5px solid var(--hairline);
  background: var(--paper-raised);
  color: var(--ink);
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s;
}

.filter-pill:hover { border-color: var(--sun); }
.filter-pill[data-active="true"] { background: var(--gold-soft); border-color: var(--sun); color: var(--sun-deep); }
.filter-pill__icon { width: 1rem; height: 1rem; }

.filter-pill__badge {
  font-size: 10.5px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: var(--r-chip);
  background: rgba(26, 26, 46, 0.08);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 3px 9px;
  border-radius: var(--r-chip);
  background: var(--paper-sunken);
  color: var(--ink-soft);
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* =================================================================
   VIEW TOGGLE (Card / Timeline tabs)
   role=tablist + aria-selected live in the template; this is chrome only.
   ================================================================= */

.view-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--paper-sunken);
  border: 1px solid var(--hairline);
  border-radius: var(--r-chip);
  max-width: 100%;
}

.view-toggle__btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 17px;
  min-height: 44px;
  border: none;
  border-radius: var(--r-chip);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}

.view-toggle__btn[data-active="true"] {
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--lift-1);
}

.view-toggle__btn:not([data-active="true"]):hover { color: var(--ink); background: rgba(26, 26, 46, 0.05); }

/* =================================================================
   TRUST / CONFIDENCE / VERIFICATION
   trust-components.js emits tailwind utilities inside these; the
   .dest-card__verify wrapper below normalises them onto the cream palette.
   ================================================================= */

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-soft);
}

.trust-badge__icon { width: 0.85rem; height: 0.85rem; color: var(--verify); }
.trust-badge__separator { color: var(--ink-faint); }

.confidence-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--r-chip);
}

.confidence-indicator__dot { width: 6px; height: 6px; border-radius: 50%; }
.confidence-indicator__text { font-weight: 700; }

.confidence-indicator--high   { background: rgba(0, 181, 137, 0.12); }
.confidence-indicator--high .confidence-indicator__dot  { background-color: var(--verify); }
.confidence-indicator--high .confidence-indicator__text { color: #00805F; }

.confidence-indicator--medium { background: var(--gold-soft); }
.confidence-indicator--medium .confidence-indicator__dot  { background-color: var(--gold); }
.confidence-indicator--medium .confidence-indicator__text { color: var(--sun-deep); }

.confidence-indicator--low    { background: var(--tier-mixed-bg); }
.confidence-indicator--low .confidence-indicator__dot  { background-color: var(--ink-faint); }
.confidence-indicator--low .confidence-indicator__text { color: var(--ink-soft); }

.weather-state-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--r-chip);
}

.weather-state-indicator__dot { width: 6px; height: 6px; border-radius: 50%; }

.weather-state-indicator--perfect { background: var(--tier-perfect-bg); }
.weather-state-indicator--perfect .weather-state-indicator__dot  { background-color: var(--tier-perfect-fg); }
.weather-state-indicator--perfect .weather-state-indicator__text { color: var(--tier-perfect-fg); }

.weather-state-indicator--good { background: var(--tier-good-bg); }
.weather-state-indicator--good .weather-state-indicator__dot  { background-color: var(--tier-good-fg); }
.weather-state-indicator--good .weather-state-indicator__text { color: var(--tier-good-fg); }

.weather-state-indicator--poor { background: var(--tier-mixed-bg); }
.weather-state-indicator--poor .weather-state-indicator__dot  { background-color: var(--ink-soft); }
.weather-state-indicator--poor .weather-state-indicator__text { color: var(--ink-soft); }

.weather-state-indicator--storm { background: var(--tier-poor-bg); }
.weather-state-indicator--storm .weather-state-indicator__dot  { background-color: var(--tier-poor-fg); }
.weather-state-indicator--storm .weather-state-indicator__text { color: var(--tier-poor-fg); }

/* =================================================================
   PRICE BREAKDOWN  (trust-components.js + trip-detail.js)
   ================================================================= */

.price-breakdown {
  background: var(--paper-sunken);
  border: 1px solid var(--hairline);
  border-radius: var(--r-inner);
  padding: 12px 14px;
  font-size: 13px;
  color: var(--ink);
}

.price-breakdown__items { display: flex; flex-direction: column; gap: 6px; }
.price-breakdown__item { display: flex; justify-content: space-between; gap: 10px; }
.price-breakdown__label { color: var(--ink-soft); }
.price-breakdown__value { font-family: var(--display); font-weight: 700; font-variant-numeric: tabular-nums; }
.price-breakdown__divider { height: 1px; background: var(--hairline); margin: 9px 0; }
.price-breakdown__total { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.price-breakdown__total-label { font-weight: 700; color: var(--ink); }

.price-breakdown__total-value {
  font-family: var(--display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--sun-deep);
}

/* trust-components.js writes its own tailwind classes inside .price-breakdown.
   Attribute-substring selectors retint them without touching that file (which
   this task does not own). */
.price-breakdown [class*="text-slate-500"],
.price-breakdown [class*="text-slate-600"] { color: var(--ink-soft); }
.price-breakdown [class*="text-slate-700"],
.price-breakdown [class*="text-slate-800"] { color: var(--ink); }
.price-breakdown [class*="text-amber-600"] { color: var(--sun-deep); }
.price-breakdown [class*="border-t"] { border-color: var(--hairline); }
.price-breakdown [class*="font-mono"] { font-family: var(--display); font-weight: 700; font-variant-numeric: tabular-nums; }

/* =================================================================
   SURFACES / UTILITIES
   ================================================================= */

.glass,
.glass-dark {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--hairline);
}

.interactive { transition: transform 0.16s, box-shadow 0.16s; }
.interactive:hover { transform: translateY(-2px); box-shadow: var(--lift-2); }
.interactive:active { transform: translateY(0); }

.data-label {
  font-family: var(--display);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.data-value {
  font-family: var(--display);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.skeleton {
  background: linear-gradient(90deg, var(--paper-sunken) 0%, #FFF6E9 50%, var(--paper-sunken) 100%);
  background-size: 200% 100%;
  animation: sdShimmer 1.4s ease-in-out infinite;
  border-radius: var(--r-inner);
}

@keyframes sdShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2.5px solid var(--gold-soft);
  border-top-color: var(--sun);
  animation: sdSpin 0.8s linear infinite;
}

@keyframes sdSpin { to { transform: rotate(360deg); } }

.card-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }

/* =================================================================
   BUTTONS
   ================================================================= */

.cta-primary,
.view-flights-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 13px 22px;
  border: none;
  border-radius: var(--r-chip);
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  background: linear-gradient(135deg, var(--gold), var(--sun));
  box-shadow: 0 4px 14px rgba(255, 138, 61, 0.34);
  cursor: pointer;
  transition: transform 0.14s, box-shadow 0.14s;
}

.cta-primary:hover,
.view-flights-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(255, 138, 61, 0.44); }
.cta-primary:active,
.view-flights-btn:active { transform: translateY(1px); box-shadow: 0 2px 8px rgba(255, 138, 61, 0.34); }

.cta-primary__icon { width: 1rem; height: 1rem; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 11px 20px;
  border-radius: var(--r-chip);
  border: 1.5px solid var(--hairline);
  background: var(--paper-raised);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
}

.btn-ghost:hover { border-color: var(--ink); }

/* =================================================================
   DESTINATION CARD
   ================================================================= */

.dest-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--paper-raised);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  box-shadow: var(--lift-1);
  overflow: hidden;
  animation: sdCardIn 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s;
}

.dest-card:hover { transform: translateY(-4px); box-shadow: var(--lift-3); }

@keyframes sdCardIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Card header. Colour-blocked, not photographic: the placeholder imagery is
   picsum and frequently absurd (Aspen renders a night office building), so
   the header leans on type + a tier-tinted wash instead. */
.dest-card__head {
  position: relative;
  padding: 18px 20px 14px;
  background: linear-gradient(135deg, var(--gold-soft) 0%, #FFF6E6 58%, var(--paper-raised) 100%);
  border-bottom: 1px solid var(--hairline);
}

.dest-card[data-tier="perfect"]   .dest-card__head { background: linear-gradient(135deg, var(--tier-perfect-bg) 0%, #F2FBF6 60%, var(--paper-raised) 100%); }
.dest-card[data-tier="excellent"] .dest-card__head { background: linear-gradient(135deg, var(--gold-soft) 0%, #FFF7E8 60%, var(--paper-raised) 100%); }
.dest-card[data-tier="good"]      .dest-card__head { background: linear-gradient(135deg, var(--tier-good-bg) 0%, #FFFBF2 60%, var(--paper-raised) 100%); }
.dest-card[data-tier="mixed"]     .dest-card__head { background: linear-gradient(135deg, var(--tier-mixed-bg) 0%, #F6F8FA 60%, var(--paper-raised) 100%); }
.dest-card[data-tier="poor"]      .dest-card__head,
.dest-card[data-tier="avoid"]     .dest-card__head { background: linear-gradient(135deg, var(--tier-poor-bg) 0%, #FDF4F2 60%, var(--paper-raised) 100%); }

/* A "Poor" destination must never be dressed up as a good one. */
.dest-card[data-tier="poor"],
.dest-card[data-tier="avoid"],
.dest-card[data-tier="mixed"] { box-shadow: 0 1px 4px rgba(90, 50, 20, 0.05); }
.dest-card[data-tier="poor"]:hover,
.dest-card[data-tier="avoid"]:hover,
.dest-card[data-tier="mixed"]:hover { box-shadow: var(--lift-2); }

.dest-card__name,
.dest-card .name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.dest-card__region {
  font-family: var(--display);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 3px;
}

.dest-card__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 20px 18px;
  flex: 1;
  min-width: 0;
}

.dest-card__foot { padding: 0 20px 20px; }

.dest-card__rule { height: 1px; background: var(--hairline); }

.dest-card__sectitle {
  font-family: var(--display);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 8px;
}

/* Temperature range + flight time row */
.dest-card__stats { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; min-width: 0; }

.dest-card__temp {
  font-family: var(--display);
  font-weight: 800;
  font-size: 25px;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
  color: var(--ink);
}

.dest-card__temp[data-band="mild"]   { color: #2F8C6E; }
.dest-card__temp[data-band="warm"]   { color: #B26A00; }
.dest-card__temp[data-band="hot"]    { color: var(--sun-deep); }
.dest-card__temp[data-band="scorch"] { color: #C7362B; }

.dest-card__substat { font-size: 11.5px; color: var(--ink-soft); margin-top: 2px; }

.dest-card__flight {
  font-family: var(--display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-align: right;
  white-space: nowrap;
}

/* Verification line from trust-components.js (tailwind utilities inside) */
.dest-card__verify [class*="text-slate-500"] { color: var(--ink-soft); }
.dest-card__verify [class*="text-green-500"] { color: var(--verify); }
.dest-card__verify [class*="text-amber-500"] { color: var(--gold); }
.dest-card__verify [class*="text-orange-500"] { color: var(--sun); }
.dest-card__verify { font-size: 11px; }

/* departure-badge.js is not in this task's ownership list and emits tailwind
   utilities tuned for a light-slate palette. Rather than fork it, retint its
   output here via attribute-substring selectors. */

/* The badge repeats the destination name and region in its own <h2>/<p>. The
   card header already renders those (as the single semantic heading), so the
   duplicates are hidden here — hiding them in CSS rather than editing
   departure-badge.js keeps that file, which this task does not own, untouched.
   display:none also removes them from the a11y tree, so screen readers get one
   heading per card instead of two. */
.dest-card__depart h2,
.dest-card__depart p { display: none; }

.dest-card__depart [class*="from-amber-400/20"] { background: transparent !important; padding: 0 !important; }
.dest-card__depart [class*="from-slate-100"] {
  background: var(--paper-sunken) !important;
  border-color: var(--hairline) !important;
  border-radius: var(--r-chip);
  padding: 7px 13px !important;
  margin-top: 10px;
}
.dest-card__depart [class*="text-slate-800"] { color: var(--ink); font-family: var(--display); font-weight: 800; letter-spacing: -0.03em; }
.dest-card__depart [class*="text-slate-600"] { color: var(--ink-soft); }
.dest-card__depart [class*="text-slate-500"] { color: var(--ink-faint); }
.dest-card__depart [class*="text-amber-600"] { color: var(--sun-deep); }
.dest-card__depart [class*="text-amber-500"] { color: var(--sun); }
.dest-card__depart [class*="bg-slate-300"] { background: var(--hairline) !important; }
.dest-card__depart [class*="bg-amber-400"] { background: linear-gradient(90deg, var(--gold), var(--sun)) !important; }
.dest-card__depart [class*="border-amber-400"] { border-color: var(--sun) !important; }
.dest-card__depart [class*="rounded-xl"] { border-radius: var(--r-inner) !important; }
.dest-card__depart [class*="shadow-lg"] { box-shadow: var(--lift-2) !important; }
/* the rotated "Depart" sticky note reads as clutter at card scale */
.dest-card__depart [class*="rotate-3"] { transform: none !important; }

/* Hotels list */
.dest-card__hotel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 10px;
  padding: 10px 13px;
  border-radius: var(--r-inner);
  background: var(--paper-sunken);
  font-size: 13px;
  min-width: 0;
}

.dest-card__hotel-name { flex: 1 1 auto; min-width: 0; color: var(--ink); overflow-wrap: anywhere; font-weight: 500; }
.dest-card__hotel-price { font-family: var(--display); font-weight: 800; white-space: nowrap; color: var(--ink); font-variant-numeric: tabular-nums; }
.dest-card__stars { color: var(--gold); letter-spacing: -0.5px; }
.dest-card__chain { color: var(--ink-faint); font-size: 11.5px; }

.dest-card__desig {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  margin-left: 4px;
  border-radius: var(--r-chip);
  background: var(--gold-soft);
  color: var(--sun-deep);
  max-width: 100%;
  overflow-wrap: anywhere;
}

.dest-card__empty { font-size: 12px; color: var(--ink-faint); font-style: italic; }

/* =================================================================
   WEATHER SCORE CHIP  (0-10 model — app/scoring.py)
   Tier colours are categorical on purpose: 3.4 Poor must not be
   mistakable for 8.8 Excellent at a glance.
   ================================================================= */

.wx-score {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.wx-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--r-chip);
  border: 1.5px solid var(--tier-mixed-bd);
  background: var(--tier-mixed-bg);
  color: var(--tier-mixed-fg);
  white-space: nowrap;
}

.wx-chip b {
  font-family: var(--display);
  font-weight: 800;
  font-size: 15.5px;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.wx-chip span {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.wx-chip[data-tier="perfect"]   { background: var(--tier-perfect-bg); border-color: var(--tier-perfect-bd); color: var(--tier-perfect-fg); }
.wx-chip[data-tier="excellent"] { background: var(--tier-excel-bg);   border-color: var(--tier-excel-bd);   color: var(--tier-excel-fg); }
.wx-chip[data-tier="good"]      { background: var(--tier-good-bg);    border-color: var(--tier-good-bd);    color: var(--tier-good-fg); }
.wx-chip[data-tier="mixed"]     { background: var(--tier-mixed-bg);   border-color: var(--tier-mixed-bd);   color: var(--tier-mixed-fg); }
.wx-chip[data-tier="poor"],
.wx-chip[data-tier="avoid"]     { background: var(--tier-poor-bg);    border-color: var(--tier-poor-bd);    color: var(--tier-poor-fg); }

.wx-clear { font-size: 11px; color: var(--ink-soft); text-align: right; font-weight: 500; }
.wx-clear--none { color: var(--tier-poor-fg); font-weight: 700; }
.wx-label { font-size: 11.5px; color: var(--ink-soft); }

.wx-heading {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin-bottom: 9px;
}

.wx-heading--warn { color: var(--tier-poor-fg); }

/* =================================================================
   ⭐ TEMPERATURE RIDGE  (Option C — the chosen weather visual)
   Ported from app/static/mockups/opus/ridge.css + wx2.js ridgeBar().
   One continuous temperature curve; a paper chip per day carrying the
   high; a label row with condition icon + word + weekday; the longest
   qualifying stretch drawn as a dashed bracket band behind the curve.
   Temperature is encoded by HEIGHT, condition by COLOUR + GLYPH.
   ================================================================= */

.ridge { position: relative; width: 100%; min-width: 0; max-width: 100%; }
.ridge.is-empty { font-size: 12px; color: var(--ink-faint); padding: 8px 0; }

.ridge-svg { display: block; width: 100%; overflow: visible; }
.ridge--hero    .ridge-svg { height: 92px; }
.ridge--card    .ridge-svg { height: 62px; }
.ridge--compact .ridge-svg { height: 34px; }

.ridge-line {
  fill: none;
  stroke: var(--sun-deep);
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ridge--compact .ridge-line { stroke-width: 1.8; }
.ridge.is-pred .ridge-line { stroke: var(--indigo); stroke-dasharray: 4 3; }

.ridge-area { pointer-events: none; }
.ridge.is-pred .ridge-area { opacity: 0.55; }

.ridge-node { fill: var(--paper); stroke: var(--nc, var(--sun)); stroke-width: 2; }
.ridge-node.is-q { fill: var(--nc, var(--sun)); }

.ridge-band {
  fill: rgba(255, 193, 69, 0.11);
  stroke: rgba(178, 106, 0, 0.42);
  stroke-width: 1.25;
  stroke-dasharray: 3 2.5;
}

/* Temperature chips, positioned along the curve. Each chip lives in its own
   full-height column and is absolutely placed at the curve's y — without
   position:absolute the chip stretches to fill the grid cell. */
.ridge-chips {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 100%;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  align-items: start;
  justify-items: center;
  pointer-events: none;
}

.ridge-chipcol { position: relative; width: 100%; height: 100%; }

.ridge-chip {
  position: absolute;
  top: var(--y);
  left: 50%;
  transform: translate(-50%, -125%);
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 11.5px;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 7px;
  background: var(--paper-raised);
  color: var(--ink);
  border: 1px solid var(--hairline);
  box-shadow: 0 1px 3px rgba(26, 26, 46, 0.08);
  white-space: nowrap;
  height: auto;
  width: auto;
}

.ridge--hero    .ridge-chip { font-size: 14px; padding: 4px 8px; }
.ridge--compact .ridge-chip { font-size: 9.5px; padding: 1.5px 4px; border-radius: 6px; }

.ridge-chip[data-band="cold"]    { color: #2E6E96; border-color: #BBD7E8; }
.ridge-chip[data-band="cool"]    { color: #2F7D6B; border-color: #BFE0D5; }
.ridge-chip[data-band="ideal"]   { color: #1F7A4C; border-color: #BFE6CE; }
.ridge-chip[data-band="warm"]    { color: #B26A00; border-color: #F3DCA9; }
.ridge-chip[data-band="hot"]     { color: #C2410C; border-color: #F6CDB4; }
.ridge-chip[data-band="extreme"] { color: #B42318; border-color: #F3C0BB; background: #FFF6F5; }

.ridge-labels {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 2px;
  margin-top: 6px;
  min-width: 0;
}

.ridge-lab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 4px 1px 3px;
  border-radius: 9px;
  border: 1px solid transparent;
  min-width: 0;
}

.ridge-lab.is-q { background: var(--gold-soft); border-color: rgba(255, 193, 69, 0.55); }
.ridge-lab.is-today .ridge-day { background: var(--ink); color: var(--paper); padding: 1px 5px; border-radius: var(--r-chip); }

.ridge-ico { font-size: 13px; line-height: 1.25; }
.ridge--hero    .ridge-ico { font-size: 16px; }
.ridge--compact .ridge-ico { font-size: 10px; }

.ridge-cond {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.ridge-day {
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

.ridge--hero .ridge-day { font-size: 10px; }
.ridge--compact .ridge-day { font-size: 7.5px; }

.ridge-bandlab {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--sun-deep);
}

.ridge-bracket {
  flex: 0 0 18px;
  height: 5px;
  border-radius: 2px;
  border: 1px dashed currentColor;
  border-bottom: none;
  opacity: 0.7;
}

.ridge-legend { display: flex; gap: 11px; flex-wrap: wrap; margin-top: 9px; }

.ridge-legend-i {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-soft);
}

.ridge-legend-i i { width: 10px; height: 10px; border-radius: 3px; }

/* =================================================================
   WISHLIST / WATCH BUTTON
   ================================================================= */

.wishlist-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--ink-soft);
  box-shadow: var(--lift-1);
  cursor: pointer;
  transition: all 0.16s;
}

.wishlist-btn:hover { transform: scale(1.08); color: var(--sun-deep); }
.wishlist-btn[data-watched="true"] { background: var(--sun); color: #fff; }
.wishlist-btn svg { width: 1.15rem; height: 1.15rem; }

/* =================================================================
   TIMELINE VIEW  (timeline-view.js — not owned here, class names fixed)
   ================================================================= */

.timeline-wrap {
  background: var(--paper-raised);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  box-shadow: var(--lift-1);
  padding: 6px 6px 10px;
  /* overflow-x:auto alone does NOT constrain a grid/flex child — min-width:0
     and max-width:100% are what actually stop the 1382px-document bug. */
  overflow-x: auto;
  min-width: 0;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.timeline-header-row,
.timeline-row { display: flex; align-items: stretch; gap: 8px; min-width: 620px; }

.timeline-sidebar-header,
.timeline-row-sidebar { flex: 0 0 150px; min-width: 0; padding: 9px 10px; }

.timeline-sidebar-header {
  font-family: var(--display);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  align-self: flex-end;
}

.timeline-row-sidebar__name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 13.5px;
  letter-spacing: -0.02em;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.timeline-row-sidebar__meta { font-size: 11px; color: var(--ink-soft); }

.timeline-days,
.timeline-row-cells { display: flex; flex: 1; gap: 5px; min-width: 0; }

.timeline-day-col { flex: 1; text-align: center; padding: 6px 2px; min-width: 0; }

.timeline-day-col__label {
  font-family: var(--display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.timeline-day-col__date { font-size: 10.5px; color: var(--ink-soft); }

.timeline-row { border-top: 1px solid var(--hairline); }

.timeline-cell {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 8px 3px;
  margin: 5px 0;
  border-radius: 12px;
  background: var(--paper-sunken);
  border: 1px solid transparent;
}

.timeline-cell__temp { font-family: var(--display); font-weight: 800; font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--ink); }
.timeline-cell__rain { font-size: 9.5px; color: var(--ink-soft); }

.timeline-cell--perfect { background: var(--tier-perfect-bg); border-color: var(--tier-perfect-bd); }
.timeline-cell--perfect .timeline-cell__temp { color: var(--tier-perfect-fg); }
.timeline-cell--good    { background: var(--gold-soft); border-color: var(--tier-excel-bd); }
.timeline-cell--good .timeline-cell__temp { color: var(--tier-excel-fg); }
.timeline-cell--poor    { background: var(--tier-mixed-bg); border-color: var(--tier-mixed-bd); }
.timeline-cell--poor .timeline-cell__temp { color: var(--tier-mixed-fg); }
.timeline-cell--storm   { background: var(--tier-poor-bg); border-color: var(--tier-poor-bd); }
.timeline-cell--storm .timeline-cell__temp { color: var(--tier-poor-fg); }

.timeline-grid { display: grid; gap: 5px; }

/* =================================================================
   DEPARTURE BADGE / TIMELINE DOTS (legacy class names kept)
   ================================================================= */

.departure-badge {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 12px;
  border-radius: var(--r-inner);
  background: var(--paper-raised);
  border: 1.5px solid var(--sun);
  box-shadow: var(--lift-1);
}

.departure-badge:hover { box-shadow: var(--lift-2); }

.departure-badge__label {
  font-family: var(--display);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.departure-badge__date { font-family: var(--display); font-weight: 800; font-size: 16px; letter-spacing: -0.02em; color: var(--sun-deep); }
.departure-badge__countdown { font-size: 11px; color: var(--ink-soft); }

.timeline-dots { display: flex; align-items: center; gap: 4px; }
.timeline-dot { width: 8px; height: 8px; border-radius: var(--r-chip); background: var(--hairline); }
.timeline-dot--past,
.timeline-dot--future { background: var(--hairline); }
.timeline-dot--perfect { width: 22px; background: linear-gradient(90deg, var(--gold), var(--sun)); }

.quick-stats { display: flex; gap: 18px; }
.quick-stats__item { text-align: center; position: relative; }
.quick-stats__label { font-family: var(--display); font-size: 10px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-faint); }
.quick-stats__value { font-family: var(--display); font-weight: 800; font-size: 19px; letter-spacing: -0.03em; color: var(--ink); }

/* =================================================================
   TRIP DETAIL MODAL  (trip-detail.js — class names fixed)
   ================================================================= */

.trip-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(26, 26, 46, 0.42);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.trip-modal-overlay.hidden { display: none; }

.trip-modal {
  width: 100%;
  max-width: 660px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  box-shadow: var(--lift-3);
  padding: 22px;
}

.trip-modal__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.trip-modal__title { font-family: var(--display); font-weight: 800; font-size: 23px; letter-spacing: -0.03em; color: var(--ink); }
.trip-modal__sub { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }

.trip-modal__close {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  background: var(--paper-raised);
  color: var(--ink);
  font-size: 17px;
  cursor: pointer;
}

.trip-modal__close:hover { background: var(--paper-sunken); border-color: var(--ink-faint); }

.trip-modal__section { margin-top: 20px; }

.trip-modal__section-title {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 10px;
}

.trip-modal__notice {
  font-size: 12px;
  color: var(--sun-deep);
  background: var(--gold-soft);
  border-radius: var(--r-inner);
  padding: 10px 13px;
}

.trip-modal__loading,
.trip-modal__error,
.trip-modal__empty { font-size: 13px; color: var(--ink-soft); padding: 16px 0; }

.trip-modal__error { color: var(--tier-poor-fg); }
.trip-modal__show-more { width: auto; margin-top: 12px; }

.trip-option-list { display: flex; flex-direction: column; gap: 9px; }

.trip-option-card {
  border: 1.5px solid var(--hairline);
  border-radius: var(--r-inner);
  background: var(--paper-raised);
  padding: 13px 15px;
  min-width: 0;
}

.trip-option-card--selected { border-color: var(--sun); background: #FFFBF4; box-shadow: var(--lift-1); }
.trip-option-card__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; min-width: 0; }
.trip-option-card__title { font-family: var(--display); font-weight: 700; font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
.trip-option-card__sub { font-size: 11.5px; color: var(--ink-soft); }
.trip-option-card__price-col { text-align: right; }
.trip-option-card__price { font-family: var(--display); font-weight: 800; font-size: 17px; letter-spacing: -0.02em; color: var(--ink); }

.trip-option-card__select-btn {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--r-chip);
  border: 1.5px solid var(--hairline);
  background: var(--paper-raised);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.trip-option-card__select-btn:hover { border-color: var(--sun); color: var(--sun-deep); }
.trip-option-card--selected .trip-option-card__select-btn { background: var(--sun); border-color: var(--sun); color: #fff; }

.trip-total { margin-top: 16px; }

/* =================================================================
   ANIMATIONS (legacy names kept; respect reduced-motion)
   ================================================================= */

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.animate-float { animation: float 3s ease-in-out infinite; }
.animate-slide-up { animation: slideUp 0.3s ease-out; }
.animate-fade-in { animation: fadeIn 0.5s ease-out; }

@media (prefers-reduced-motion: reduce) {
  .dest-card,
  .animate-float,
  .animate-slide-up,
  .animate-fade-in,
  .skeleton,
  .spinner { animation: none !important; }
  .dest-card:hover { transform: none; }
}

/* =================================================================
   RESPONSIVE
   ================================================================= */

@media (max-width: 860px) {
  .sd-stat { text-align: left; }
}

@media (max-width: 640px) {
  .dest-card__name { font-size: 20px; }
  .dest-card__temp { font-size: 22px; }
  .dest-card__body { padding: 14px 16px 16px; }
  .dest-card__head { padding: 16px 16px 13px; }
  .dest-card__foot { padding: 0 16px 16px; }
  .ridge-chip { font-size: 10.5px; padding: 2px 5px; }
  .ridge-cond { display: none; }
  .ridge--card .ridge-svg { height: 54px; }
  .ridge-legend-i { font-size: 9.5px; }
  .sd-select { width: 100%; }
}

@media (max-width: 400px) {
  .ridge-chip { font-size: 9.5px; padding: 1.5px 4px; }
  .ridge-ico { font-size: 11px; }
  .ridge-day { font-size: 7.5px; }
}
