/* Chasing 70° — landing page
   Palette pulled from the dashboard screens: forest green, cream, rust, sand. */

:root {
  /* Brand */
  --green-900: #1f3329;
  --green-800: #2c4a3a;
  --green-700: #35543f;
  --cream:     #f4efe4;
  --cream-card:#faf7ef;
  --rust:      #c25a36;
  --rust-dark: #a8492a;
  --sand:      #d9b878;

  /* Text */
  --ink:    #1d2420;
  --muted:  #6f7d73;
  --on-dark:#f3eee2;
  --on-dark-muted: #aebcae;

  /* Lines / borders */
  --border: #e4ddcd;
  --line-green: #2f6b4f;
  --line-rust:  #c0552f;
  --line-gold:  #c8a24c;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1.5rem;
  --space-lg: 3rem;
  --space-xl: 5rem;

  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1120px;

  --mono: ui-monospace, "SF Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

a { color: inherit; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--green-800);
  color: var(--on-dark);
  padding: var(--space-xs) var(--space-md);
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--rust);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .05s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--rust); color: #fff; }
.btn-primary:hover { background: var(--rust-dark); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { background: #ffffff7a; border-color: #cfc6b2; }

.btn-lg { font-size: 1.05rem; padding: 0.8rem 1.5rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--green-800);
  color: var(--on-dark);
  border-bottom: 1px solid #ffffff14;
  transition: box-shadow .2s ease;
}
.site-header.scrolled { box-shadow: 0 6px 24px #1f332933; }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--on-dark);
}
.brand-tile {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--sand);
  color: #5a4218;
  flex: none;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand-sub {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}

.site-nav { display: flex; align-items: center; gap: 0.4rem; }
.site-nav > a:not(.btn) {
  display: none;
  text-decoration: none;
  color: var(--on-dark-muted);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
}
.site-nav > a:not(.btn):hover { color: var(--on-dark); }
.site-header .btn-ghost { color: var(--on-dark); border-color: #ffffff2e; }
.site-header .btn-ghost:hover { background: #ffffff14; border-color: #ffffff4a; }

/* ---------- Hero ---------- */
.hero { padding: var(--space-lg) 0 var(--space-xl); }
.hero-grid { display: grid; gap: var(--space-lg); align-items: center; }

.eyebrow {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: var(--space-sm);
}
.eyebrow.center { text-align: center; }

.hero-copy h1 {
  font-size: clamp(2.4rem, 8vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: var(--ink);
}
.lede {
  margin-top: var(--space-md);
  font-size: 1.15rem;
  color: #3c463e;
  max-width: 34rem;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}
.hero-note {
  margin-top: var(--space-md);
  font-size: 0.85rem;
  color: var(--muted);
}

/* Glance card */
.glance-card {
  background: var(--cream-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-md);
  box-shadow: 0 10px 30px #1f33291a;
}
.card-eyebrow {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.66rem;
  color: var(--muted);
}
.glance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin: var(--space-md) 0;
}
.glance-grid .stat {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}
.glance-grid .stat-label {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.legend { list-style: none; display: grid; gap: 0.35rem; font-size: 0.9rem; }
.legend li { display: flex; align-items: center; gap: 0.55rem; }
.dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.dot-green { background: var(--line-green); }
.dot-rust  { background: var(--line-rust); }
.dot-gold  { background: var(--line-gold); }

.route-sketch {
  width: 100%;
  height: 100px;
  margin-top: var(--space-md);
  border-top: 1px solid var(--border);
  padding-top: var(--space-md);
}

/* ---------- Sections ---------- */
.section { padding: var(--space-xl) 0; }
.section-alt { background: var(--green-800); color: var(--on-dark); }
.section h2, .cta h2 {
  font-size: clamp(1.7rem, 5vw, 2.4rem);
  letter-spacing: -0.02em;
  font-weight: 800;
  margin-bottom: var(--space-lg);
}
.section h2.center { text-align: center; }
.section-alt .eyebrow { color: var(--on-dark-muted); }

/* Phases */
.phases { display: grid; gap: var(--space-md); }
.phase {
  background: var(--cream-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-lg) var(--space-md);
}
.phase-num {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--green-800);
  color: var(--on-dark);
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: var(--space-md);
}
.phase h3 { font-size: 1.35rem; letter-spacing: -0.01em; margin-bottom: var(--space-sm); }
.phase p { color: #3c463e; }
.phase-tag {
  margin-top: var(--space-md);
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--rust-dark);
  border-top: 1px dashed var(--border);
  padding-top: var(--space-sm);
}

/* Features */
.features { list-style: none; display: grid; gap: var(--space-md); }
.feature {
  background: #ffffff0d;
  border: 1px solid #ffffff1f;
  border-radius: var(--radius);
  padding: var(--space-md);
}
.feature h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.feature p { color: var(--on-dark-muted); font-size: 0.97rem; }
.feature code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: #ffffff1f;
  padding: 0.05em 0.4em;
  border-radius: 5px;
}

/* CTA */
.cta {
  background: var(--green-900);
  color: var(--on-dark);
  text-align: center;
  padding: var(--space-xl) 0;
}
.cta-inner { max-width: 38rem; }
.cta p { color: var(--on-dark-muted); margin: var(--space-md) 0 var(--space-lg); }

/* Footer */
.site-footer { background: var(--green-900); color: var(--on-dark-muted); padding: var(--space-lg) 0; border-top: 1px solid #ffffff12; }
.footer-inner { display: flex; flex-direction: column; gap: var(--space-sm); align-items: flex-start; }
.footer-brand { color: var(--on-dark); }
.footer-copy { font-size: 0.85rem; }

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
  .site-nav > a:not(.btn) { display: inline-flex; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { flex-direction: row; justify-content: space-between; align-items: center; }
}

@media (min-width: 900px) {
  .hero { padding-top: var(--space-xl); }
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; gap: var(--space-xl); }
  .phases { grid-template-columns: 1fr 1fr; gap: var(--space-lg); }
  .features { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Auth (login) ---------- */
.btn-block { width: 100%; }

.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(120% 80% at 50% -10%, #ffffff 0%, var(--cream) 55%);
  padding: var(--space-lg) var(--space-md);
}

.auth-card-wrap { width: 100%; max-width: 25rem; }

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  margin-bottom: var(--space-md);
}
.auth-brand .brand-tile { color: #5a4218; }
.auth-brand .brand-name { font-size: 1.25rem; font-weight: 700; }

.auth-card {
  background: var(--cream-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-lg) var(--space-md);
  box-shadow: 0 12px 34px #1f33291f;
}
.auth-card h1 { font-size: 1.6rem; letter-spacing: -0.02em; }
.auth-sub { color: var(--muted); margin-top: var(--space-xs); margin-bottom: var(--space-md); }

.auth-form { display: grid; gap: 0.5rem; margin-top: var(--space-md); }
.auth-form label { font-size: 0.85rem; font-weight: 600; color: #3c463e; }
.auth-form input {
  font: inherit;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
}
.auth-form input:focus-visible { outline: 3px solid var(--rust); outline-offset: 1px; border-color: var(--rust); }
.auth-form .btn { margin-top: var(--space-sm); }

.code-input {
  font-family: var(--mono);
  font-size: 1.5rem;
  letter-spacing: 0.5em;
  text-align: center;
}

.auth-error {
  background: #fbe9e3;
  border: 1px solid #e7c3b6;
  color: #8a3416;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-top: var(--space-sm);
}

.auth-alt { margin-top: var(--space-md); font-size: 0.9rem; color: var(--muted); text-align: center; }
.auth-alt a, .auth-footer a { color: var(--rust-dark); font-weight: 600; }
.auth-footer { text-align: center; margin-top: var(--space-md); font-size: 0.9rem; color: var(--muted); }

.dev-banner {
  background: #fbf3dd;
  border: 1px dashed #d9b878;
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
  margin-top: var(--space-md);
  font-size: 0.9rem;
  color: #6a521d;
}
.dev-code {
  display: block;
  font-family: var(--mono);
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0.4em;
  color: var(--ink);
  margin: 0.3rem 0;
}
.dev-note { display: block; font-size: 0.78rem; color: #8a7430; }
.dev-banner code { font-family: var(--mono); background: #00000010; padding: 0.05em 0.35em; border-radius: 4px; }

/* ============================================================
   Dashboard / app shell — "Your trips"
   Mobile-first: green brand bar on top, bottom tab bar, content
   between. The desktop sidebar is layered on at >=900px.
   ============================================================ */

:root {
  --sidebar-w: 280px;
  --topbar-h: 56px;
  --tabbar-h: 60px;
  --shadow-card: 0 10px 30px #1f33291a;
}

.app-body { background: var(--cream); color: var(--ink); min-height: 100vh; }

.app-shell { min-height: 100vh; }

/* ---------- Mobile brand bar ---------- */
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  min-height: var(--topbar-h);
  padding: 0 var(--space-md);
  padding-top: env(safe-area-inset-top);
  background: var(--green-800);
  color: var(--on-dark);
  border-bottom: 1px solid #ffffff14;
}
.brand-sm { gap: 0.55rem; color: var(--on-dark); }
.brand-sm .brand-tile { width: 32px; height: 32px; border-radius: 9px; }
.brand-sm .brand-tile svg { width: 19px; height: 19px; }
.brand-sm .brand-name { font-size: 1.1rem; }

.iconbtn {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--on-dark-muted);
  cursor: pointer;
}
.iconbtn:hover { color: var(--on-dark); background: #ffffff14; }

/* ---------- Main content ---------- */
.app-main {
  /* leave room for the fixed bottom tab bar + iOS home indicator */
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + var(--space-md));
}

.dash-topstrip { display: none; } /* desktop only */

.dash {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: var(--space-md);
}

.dash-head { margin-bottom: var(--space-md); }
.dash-head-row { display: flex; flex-direction: column; gap: var(--space-sm); }
.dash-head h1 {
  font-size: clamp(1.9rem, 7vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.dash-actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.dash-actions .btn { flex: 1 1 auto; }

.dash-label {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.68rem;
  color: var(--muted);
}
.all-trips-label { margin: var(--space-lg) 0 var(--space-sm); }

/* ---------- Year-at-a-glance card ---------- */
.glancecard {
  background: var(--cream-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.glance-main { padding: var(--space-md); }
.glance-main .dash-label { margin-bottom: var(--space-md); }

.kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}
.kpi-num {
  display: block;
  font-size: clamp(1.8rem, 9vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}
.kpi-label { display: block; margin-top: 0.3rem; font-size: 0.85rem; color: var(--muted); }

.glance-main .legend { margin-top: var(--space-md); }

.glance-fig {
  border-top: 1px solid var(--border);
  padding: var(--space-sm) var(--space-md) var(--space-md);
}
.glance-fig .route-sketch { width: 100%; height: 130px; display: block; }

/* ---------- Trip cards ---------- */
.trip-list { list-style: none; display: grid; gap: var(--space-md); }
.trip-card {
  background: var(--cream-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.trip-thumb { background: #ece3cf; }
.thumb-map { display: block; width: 100%; aspect-ratio: 24 / 9; }

.trip-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: var(--space-md);
}
.trip-info { display: grid; gap: 0.45rem; }

.trip-meta-top { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-sm); }
.trip-dates { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}
.badge-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.badge-planning { background: #f3e6cf; color: #8a6526; }
.badge-planning .badge-dot { background: #c8932f; }

.trip-title { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.01em; line-height: 1.1; }
.trip-sub { color: var(--muted); font-size: 0.92rem; }

.trip-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
  margin-top: 0.35rem;
}
.trip-stat-num { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.01em; line-height: 1; }
.trip-stat-label {
  margin: 0.3rem 0 0;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.6rem;
  color: var(--muted);
  line-height: 1.2;
}

.trip-actions { display: flex; gap: var(--space-sm); }
.trip-actions .btn { flex: 1; }

/* ---------- Bottom tab bar (mobile) ---------- */
.app-tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 45;
  display: flex;
  background: var(--cream-card);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -6px 20px #1f33290f;
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-height: var(--tabbar-h);
  padding: 0.4rem 0.25rem;
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
}
.tab .ico { width: 22px; height: 22px; }
.tab-label { font-size: 0.66rem; letter-spacing: 0.01em; }
.tab.is-active { color: var(--rust); }

/* ---------- Sidebar (desktop only, hidden on mobile) ---------- */
.app-sidebar { display: none; }
.side-link .ico, .side-sublink .ico { flex: none; }

/* ============================================================
   Desktop: sidebar + content grid
   ============================================================ */
@media (min-width: 900px) {
  .app-topbar,
  .app-tabbar { display: none; }

  .app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    align-items: start;
  }

  .app-main { padding-bottom: 0; }

  /* Sidebar */
  .app-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: var(--space-md) 0.9rem;
    background: var(--green-900);
    color: var(--on-dark);
    border-right: 1px solid #ffffff12;
  }
  .side-brand { color: var(--on-dark); padding: 0.4rem 0.5rem; margin-bottom: var(--space-md); }

  .side-nav { display: grid; gap: 0.2rem; }
  .side-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.62rem 0.7rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--on-dark-muted);
    font-weight: 600;
    font-size: 0.97rem;
  }
  .side-link:hover { background: #ffffff12; color: var(--on-dark); }
  .side-link.is-active { background: #ffffff1f; color: var(--on-dark); }
  .side-link-btn {
    width: 100%;
    background: transparent;
    border: 0;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
  }

  .side-grouplabel {
    font-family: var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.62rem;
    color: var(--on-dark-muted);
    padding: 0 0.7rem;
    margin: var(--space-md) 0 0.45rem;
  }

  .trip-switch {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.62rem 0.7rem;
    border: 1px solid #ffffff1f;
    border-radius: var(--radius-sm);
    background: #ffffff12;
    color: var(--on-dark);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
  }
  .trip-switch:hover { background: #ffffff1f; }
  .trip-switch-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .trip-switch-chev { display: inline-flex; color: var(--on-dark-muted); flex: none; }
  .trip-switch-chev .ico { width: 18px; height: 18px; }

  .side-subnav { display: grid; gap: 0.15rem; margin-top: 0.3rem; padding-left: 0.4rem; }
  .side-sublink {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.5rem 0.7rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--on-dark-muted);
    font-size: 0.93rem;
    font-weight: 500;
  }
  .side-sublink:hover { background: #ffffff12; color: var(--on-dark); }
  .side-sublink .ico { width: 18px; height: 18px; }
  .nav-count {
    margin-left: auto;
    font-family: var(--mono);
    font-size: 0.72rem;
    min-width: 1.4rem;
    text-align: center;
    padding: 0.05rem 0.4rem;
    border-radius: 999px;
    background: #ffffff1a;
    color: var(--on-dark-muted);
  }

  .side-foot { margin-top: auto; padding-top: var(--space-md); display: grid; gap: 0.4rem; }
  .depart-card {
    background: #ffffff0d;
    border: 1px solid #ffffff14;
    border-radius: var(--radius-sm);
    padding: 0.8rem 0.85rem;
  }
  .depart-label {
    font-family: var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.6rem;
    color: var(--on-dark-muted);
  }
  .depart-date { font-size: 1.05rem; font-weight: 700; margin-top: 0.15rem; }
  .depart-meta {
    font-family: var(--mono);
    font-size: 0.66rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--on-dark-muted);
    margin-top: 0.1rem;
  }
  .side-signout { margin: 0; }

  /* Desktop header strip above the content */
  .dash-topstrip {
    display: block;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border);
  }
  .dash-topstrip-title { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
  .dash-topstrip-sub { color: var(--muted); margin-top: 0.15rem; }

  .dash { padding: var(--space-lg); }

  .dash-head-row {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
  .dash-actions .btn { flex: 0 0 auto; }

  /* Glance card: two columns with a divider */
  .glancecard { display: grid; grid-template-columns: 1.05fr 0.95fr; }
  .glance-main { padding: var(--space-lg); }
  .kpis { gap: var(--space-lg) var(--space-md); }
  .kpi-num { font-size: 2.6rem; }
  .glance-fig {
    border-top: 0;
    border-left: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: var(--space-lg);
  }
  .glance-fig .route-sketch { height: 100%; min-height: 220px; }

  /* Trip card: thumbnail left, body right, actions in a right column */
  .trip-card { flex-direction: row; }
  .trip-thumb { flex: 0 0 240px; align-self: stretch; }
  .thumb-map { height: 100%; aspect-ratio: auto; }
  .trip-body {
    flex: 1;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-lg);
    padding: var(--space-md) var(--space-lg);
  }
  .trip-info { flex: 1; }
  .trip-stats { max-width: 30rem; }
  .trip-actions {
    flex: 0 0 auto;
    flex-direction: column;
    align-items: stretch;
    min-width: 8.5rem;
  }
  .trip-actions .btn { flex: none; }
}

@media (min-width: 1200px) {
  .trip-stat-label { font-size: 0.64rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
