/*
 * dashboard-tab-logg.css — styles for the iOS-parity Logg tab override.
 * Tokens only (--cw-*), flat fills (no gradients on buttons/heroes), warm
 * shadows, radii 24 / 18 / 14. Namespaced under .cwl- to avoid clashing with
 * the host dashboard-modern.css. Inherits the host's light/dark token values.
 */

/* ───────────────────────── Layout shell ───────────────────────── */
.cwl-root { display: flex; flex-direction: column; gap: 18px; }
.cwl-mount { display: block; }

.cwl-toolbar {
  background: var(--cw-card-solid);
  border: 1px solid var(--cw-line);
  border-radius: var(--cw-radius);
  box-shadow: var(--cw-shadow);
  padding: 20px;
}
.cwl-toolbar-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cwl-toolbar-note { margin: 14px 0 0; color: var(--cw-ink-3); font-size: .92rem; line-height: 1.5; }

/* ───────────────────────── Buttons ───────────────────────── */
.cwl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 18px; border-radius: var(--cw-radius-sm);
  font-family: var(--cw-sans); font-weight: 600; font-size: .92rem;
  border: 1px solid var(--cw-line); background: var(--cw-card-solid); color: var(--cw-ink);
  cursor: pointer; text-decoration: none; transition: transform .12s ease, background .12s ease, box-shadow .12s ease;
}
.cwl-btn:hover { transform: translateY(-1px); }
.cwl-btn:active { transform: translateY(0); }
.cwl-btn-primary { background: var(--cw-green); color: var(--cw-on-primary); border-color: var(--cw-green); box-shadow: var(--cw-shadow-green); }
.cwl-btn-primary:hover { background: var(--cw-green-2); }
.cwl-btn-gold { background: var(--cw-gold); color: #2A2008; border-color: var(--cw-gold); }
.cwl-btn-gold:hover { background: var(--cw-gold-2); }
.cwl-btn-ghost { background: transparent; }
.cwl-btn-ghost:hover { background: var(--cw-cream-2); }
.cwl-mt { margin-top: 12px; }

.cwl-link {
  background: none; border: none; color: var(--cw-green); font-weight: 600;
  font-family: var(--cw-sans); font-size: .88rem; cursor: pointer; padding: 0; margin-left: auto;
}
.cwl-link:hover { color: var(--cw-green-2); text-decoration: underline; }
.cwl-link-danger {
  background: none; border: none; color: var(--cw-red); font-weight: 600;
  font-family: var(--cw-sans); font-size: .82rem; cursor: pointer; padding: 0;
}
.cwl-link-danger:hover { text-decoration: underline; }

/* ───────────────────────── Metrics ───────────────────────── */
.cwl-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.cwl-metrics-3 { grid-template-columns: repeat(3, 1fr); }
.cwl-metric {
  background: var(--cw-card-solid); border: 1px solid var(--cw-line);
  border-radius: var(--cw-radius-mid); box-shadow: var(--cw-shadow-soft); padding: 16px;
}
.cwl-metric-label { color: var(--cw-ink-3); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.cwl-metric-value { color: var(--cw-ink); font-family: var(--cw-serif); font-size: 1.7rem; line-height: 1.1; margin-top: 6px; }
.cwl-metric-sub { color: var(--cw-ink-3); font-size: .82rem; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ───────────────────────── Section heads ───────────────────────── */
.cwl-section-head { display: flex; align-items: center; gap: 10px; margin: 6px 2px -4px; }
.cwl-section-head h2, .cwl-section-head h3 { margin: 0; font-family: var(--cw-serif); color: var(--cw-ink); }
.cwl-section-head h2 { font-size: 1.35rem; }
.cwl-section-head h3 { font-size: 1.1rem; }
.cwl-pill {
  margin-left: auto; padding: 4px 11px; border-radius: 999px;
  background: var(--cw-green-mint); color: var(--cw-green); font-size: .76rem; font-weight: 700;
}
.cwl-pill-gold { background: var(--cw-gold-soft); color: #6E5410; }

.cwl-error {
  background: var(--cw-coral-soft); color: #7A2C16; border: 1px solid var(--cw-coral);
  border-radius: var(--cw-radius-sm); padding: 12px 16px; font-size: .9rem;
}

/* ───────────────────────── Timeline cards ───────────────────────── */
.cwl-list { display: flex; flex-direction: column; gap: 10px; }
.cwl-card {
  /* Top-aligned grid + a min-height matching the thumb keeps every card the
     same height and guarantees the text column starts level with the image —
     text can never ride up onto / overlap the thumbnail. */
  display: grid; grid-template-columns: 78px minmax(0, 1fr) auto; align-items: flex-start; gap: 14px;
  background: var(--cw-card-solid); border: 1px solid var(--cw-line);
  border-radius: var(--cw-radius-mid); box-shadow: var(--cw-shadow-soft);
  padding: 12px; cursor: pointer; transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.cwl-card:hover { transform: translateY(-2px); box-shadow: var(--cw-shadow-pop); border-color: var(--cw-green-soft); }
.cwl-card:focus-visible { outline: 2px solid var(--cw-green); outline-offset: 2px; }
.cwl-card-past { grid-template-columns: 56px minmax(0, 1fr) auto; }

.cwl-thumb {
  position: relative; width: 78px; height: 78px; border-radius: var(--cw-radius-sm); overflow: hidden;
  background: var(--cw-green-soft); display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cwl-thumb-sm { width: 56px; height: 56px; }
/* Photo thumbs sit on a warm fill so a slow/broken image never flashes white. */
.cwl-thumb-img { background: var(--cw-cream-3); }
.cwl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Scrim under the chip on photo thumbs so overlaid text always stays legible. */
.cwl-thumb-scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(20,18,14,.34), rgba(20,18,14,0) 52%); pointer-events: none; }

/* Premium placeholder tile (no cover image). Branded gradient + destination
   initial + a faint trip/event glyph — reads as a designed tile, not an
   empty box. Six deterministic gradients so adjacent cards stay distinct. */
.cwl-thumb-ph { color: #fff; }
.cwl-thumb-initial {
  position: relative; z-index: 2; font-family: var(--cw-serif); font-weight: 700;
  font-size: 1.85rem; line-height: 1; color: #fff; letter-spacing: .01em;
  text-shadow: 0 1px 2px rgba(0,0,0,.22);
}
.cwl-thumb-sm .cwl-thumb-initial { font-size: 1.3rem; }
.cwl-thumb-glyph { position: absolute; right: -6px; bottom: -6px; width: 46px; height: 46px; fill: rgba(255,255,255,.20); z-index: 1; }
.cwl-thumb-sm .cwl-thumb-glyph { width: 34px; height: 34px; right: -5px; bottom: -5px; }
/* Curated brand gradients (greens + warm gold/terracotta accents). */
.cwl-thumb-g0 { background: linear-gradient(135deg, #1F6F54, #2E9A74); }
.cwl-thumb-g1 { background: linear-gradient(135deg, #C8922E, #E0B85C); }
.cwl-thumb-g2 { background: linear-gradient(135deg, #2A6F8E, #4FA3C0); }
.cwl-thumb-g3 { background: linear-gradient(135deg, #155E45, #3FA17C); }
.cwl-thumb-g4 { background: linear-gradient(135deg, #B5562F, #D98A4E); }
.cwl-thumb-g5 { background: linear-gradient(135deg, #3E5C8A, #6E86B8); }

.cwl-thumb-chip {
  position: absolute; left: 6px; bottom: 6px; z-index: 3; padding: 2px 8px; border-radius: 999px;
  background: rgba(26, 24, 20, .72); color: #fff; font-size: .68rem; font-weight: 700; backdrop-filter: blur(2px);
}
.cwl-card-main { min-width: 0; min-height: 78px; display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.cwl-card-past .cwl-card-main { min-height: 56px; }
.cwl-card-text { min-width: 0; }
.cwl-card-title { margin: 0; font-size: 1.02rem; font-weight: 700; color: var(--cw-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cwl-card-meta { color: var(--cw-ink-3); font-size: .85rem; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cwl-countdown { color: var(--cw-gold); font-weight: 700; font-size: .85rem; margin-top: 4px; }
.cwl-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.cwl-badge {
  padding: 3px 9px; border-radius: 999px; background: var(--cw-cream-2);
  border: 1px solid var(--cw-line); color: var(--cw-ink-2); font-size: .72rem; font-weight: 600;
}
.cwl-badge-gold { background: var(--cw-gold-soft); color: #6E5410; border-color: transparent; }
.cwl-badge-route { background: var(--cw-green-mint); color: var(--cw-green); border-color: transparent; }
.cwl-card-cta {
  align-self: center; padding: 8px 14px; border-radius: var(--cw-radius-sm); background: var(--cw-green-mint);
  color: var(--cw-green); font-weight: 700; font-size: .82rem; white-space: nowrap;
}
.cwl-card-past > .cwl-badge-gold { align-self: center; }

.cwl-empty {
  display: flex; flex-direction: column; gap: 6px; text-align: center;
  background: var(--cw-card-solid); border: 1px dashed var(--cw-line);
  border-radius: var(--cw-radius-mid); padding: 28px 20px;
}
.cwl-empty strong { color: var(--cw-ink); font-family: var(--cw-serif); font-size: 1.05rem; }
.cwl-empty span { color: var(--cw-ink-3); font-size: .9rem; max-width: 460px; margin: 0 auto; line-height: 1.5; }

.cwl-skeleton-wrap { display: flex; flex-direction: column; gap: 10px; }
.cwl-skeleton { height: 96px; border-radius: var(--cw-radius-mid); background: linear-gradient(90deg, var(--cw-cream-2), var(--cw-cream-3), var(--cw-cream-2)); background-size: 200% 100%; animation: cwl-shimmer 1.4s infinite; }
@keyframes cwl-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ───────────────────────── Modal ───────────────────────── */
.cwl-modal-backdrop {
  position: fixed; inset: 0; z-index: 1200; display: flex; align-items: flex-start; justify-content: center;
  background: rgba(26, 24, 20, .52); backdrop-filter: blur(4px); padding: 28px 16px; overflow-y: auto; overscroll-behavior: contain;
  animation: cwl-fade .18s ease;
}
@keyframes cwl-fade { from { opacity: 0; } to { opacity: 1; } }
body.cwl-modal-lock { overflow: hidden; }
.cwl-modal {
  position: relative; width: min(760px, 100%); background: var(--cw-card-solid);
  border: 1px solid var(--cw-line); border-radius: var(--cw-radius); box-shadow: var(--cw-shadow-pop);
  max-height: calc(100vh - 56px); max-height: calc(100dvh - 56px); display: flex; flex-direction: column; overflow: hidden;
  animation: cwl-pop .2s cubic-bezier(.2,.8,.3,1);
}
@keyframes cwl-pop { from { transform: translateY(12px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.cwl-modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 3; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--cw-line); background: var(--cw-card-solid); color: var(--cw-ink-2);
  font-size: 1.2rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.cwl-modal-close:hover { background: var(--cw-cream-2); color: var(--cw-ink); }

.cwl-detail { padding: 0; }
.cwl-detail-head { padding: 22px 22px 0; }
.cwl-eyebrow { color: var(--cw-ink-3); font-size: .76rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }
.cwl-detail-titlerow { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-top: 4px; }
.cwl-detail-titlebox { min-width: 0; }
.cwl-detail-title { margin: 0; font-family: var(--cw-serif); color: var(--cw-ink); font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.1; }
.cwl-detail-sub { margin: 5px 0 0; color: var(--cw-ink-3); font-size: .95rem; }

/* Detail tabs */
.cwl-dtabs {
  display: flex; gap: 4px; padding: 14px 22px 0; overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid var(--cw-line);
}
.cwl-dtabs::-webkit-scrollbar { display: none; }
.cwl-dtab {
  padding: 9px 14px 12px; background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--cw-ink-3); font-family: var(--cw-sans); font-weight: 600; font-size: .9rem; cursor: pointer; white-space: nowrap;
}
.cwl-dtab:hover { color: var(--cw-ink); }
.cwl-dtab.on { color: var(--cw-green); border-bottom-color: var(--cw-green); }

.cwl-detail-body { padding: 18px 22px 24px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 14px; }

/* Hero (flat fill, no gradient) */
.cwl-hero {
  background: var(--cw-green); color: var(--cw-on-primary);
  border-radius: var(--cw-radius-mid); padding: 20px; box-shadow: var(--cw-shadow-green);
}
.cwl-hero.done { background: var(--cw-green-deep); }
.cwl-hero-eyebrow { color: var(--cw-gold-soft); font-size: .76rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }
.cwl-hero h3 { margin: 6px 0 4px; font-family: var(--cw-serif); font-size: 1.6rem; }
.cwl-hero p { margin: 0; opacity: .92; font-size: .92rem; }

/* Panels */
.cwl-panel {
  background: var(--cw-card-solid); border: 1px solid var(--cw-line);
  border-radius: var(--cw-radius-mid); box-shadow: var(--cw-shadow-soft); padding: 16px;
}
.cwl-panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.cwl-panel-head h3 { margin: 0; font-family: var(--cw-serif); font-size: 1.08rem; color: var(--cw-ink); }
.cwl-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cwl-note { margin-top: 10px; }

/* Overview tiles */
.cwl-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cwl-tile {
  display: flex; flex-direction: column; gap: 2px; align-items: flex-start;
  background: var(--cw-cream-2); border: 1px solid var(--cw-line); border-radius: var(--cw-radius-sm);
  padding: 14px; cursor: pointer; transition: transform .12s ease, background .12s ease;
}
.cwl-tile:hover { transform: translateY(-1px); background: var(--cw-green-mint); }
.cwl-tile strong { font-family: var(--cw-serif); font-size: 1.5rem; color: var(--cw-ink); line-height: 1; }
.cwl-tile small { color: var(--cw-ink-3); font-size: .8rem; font-weight: 600; }

.cwl-ready-row { display: flex; align-items: center; justify-content: space-between; padding: 7px 0; border-top: 1px solid var(--cw-line); font-size: .9rem; color: var(--cw-ink); }
.cwl-ready-row:first-of-type { border-top: none; }
.cwl-ready-state { color: var(--cw-ink-3); font-size: .82rem; }

.cwl-chiprow { display: flex; flex-wrap: wrap; gap: 8px; }
.cwl-chip {
  padding: 8px 14px; border-radius: 999px; background: var(--cw-card-solid);
  border: 1px solid var(--cw-line); color: var(--cw-ink); font-weight: 600; font-size: .85rem; cursor: pointer;
}
.cwl-chip:hover { background: var(--cw-green-mint); border-color: var(--cw-green-soft); }

/* Route line (overview preview) */
.cwl-routeline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cwl-routenode { display: inline-flex; align-items: center; gap: 6px; background: var(--cw-cream-2); border: 1px solid var(--cw-line); border-radius: 999px; padding: 5px 12px 5px 5px; }
.cwl-routenode i { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--cw-green); color: var(--cw-on-primary); font-style: normal; font-weight: 700; font-size: .78rem; }
.cwl-routenode b { font-weight: 600; font-size: .85rem; color: var(--cw-ink); }
.cwl-routearrow { color: var(--cw-ink-3); font-weight: 700; }

/* Mini rows / generic rows */
.cwl-mini { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-top: 1px solid var(--cw-line); }
.cwl-mini:first-child { border-top: none; }
.cwl-mini strong { display: block; color: var(--cw-ink); font-size: .92rem; font-weight: 600; }
.cwl-mini small { display: block; color: var(--cw-ink-3); font-size: .8rem; margin-top: 2px; }
.cwl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cw-green); margin-top: 6px; flex-shrink: 0; }

.cwl-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; background: var(--cw-card-solid); border: 1px solid var(--cw-line); border-radius: var(--cw-radius-sm); padding: 10px; }
.cwl-rowicon { width: 44px; height: 44px; border-radius: var(--cw-radius-sm); background: var(--cw-cream-2); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }

.cwl-notecard { background: var(--cw-cream-2); border: 1px solid var(--cw-line); border-radius: var(--cw-radius-sm); padding: 14px; }
.cwl-notebody { white-space: pre-wrap; font-size: .9rem; color: var(--cw-ink); line-height: 1.5; }

/* Members */
.cwl-member { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 12px; background: var(--cw-card-solid); border: 1px solid var(--cw-line); border-radius: var(--cw-radius-sm); padding: 10px; }
.cwl-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--cw-green-soft); color: var(--cw-green); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.cwl-member-ctrl { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }

/* Inputs */
.cwl-input {
  width: 100%; padding: 10px 12px; border-radius: var(--cw-radius-sm);
  border: 1px solid var(--cw-line); background: var(--cw-card-solid); color: var(--cw-ink);
  font-family: var(--cw-sans); font-size: .9rem;
}
.cwl-input:focus { outline: none; border-color: var(--cw-green); box-shadow: 0 0 0 3px var(--cw-green-mint); }
.cwl-input-sm { padding: 6px 8px; font-size: .82rem; width: auto; }
.cwl-textarea { resize: vertical; min-height: 44px; }
.cwl-exp-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 8px; }
.cwl-exp-amt { text-align: right; white-space: nowrap; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.cwl-exp-amt strong { color: var(--cw-ink); }

/* Chat */
.cwl-chat-scroll { max-height: 340px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 8px; padding: 4px 0; }
.cwl-chat-row { display: flex; }
.cwl-chat-row.mine { justify-content: flex-end; }
.cwl-chat-bubble { max-width: 78%; background: var(--cw-cream-2); border: 1px solid var(--cw-line); border-radius: var(--cw-radius-sm); padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.cwl-chat-row.mine .cwl-chat-bubble { background: var(--cw-green); color: var(--cw-on-primary); border-color: var(--cw-green); }
.cwl-chat-author { font-size: .72rem; font-weight: 700; opacity: .8; }
.cwl-chat-text { font-size: .9rem; line-height: 1.4; }
.cwl-chat-time { font-size: .68rem; opacity: .65; align-self: flex-end; }
.cwl-chat-compose { display: flex; gap: 8px; margin-top: 10px; }
.cwl-chat-compose .cwl-input { flex: 1; }

/* ───────────────────────── Map / Route tab ───────────────────────── */
.cwl-map-intro { color: var(--cw-ink-3); font-size: .9rem; margin: 0; }
.cwl-map-wrap { position: relative; }
.cwl-map-stage {
  position: relative; width: 100%; aspect-ratio: 1009 / 666; min-height: 240px;
  background: var(--cw-cream-2); border: 1px solid var(--cw-line); border-radius: var(--cw-radius-mid);
  overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.cwl-map-loading { color: var(--cw-ink-3); font-size: .9rem; }
.cwl-map-svg { width: 100%; height: 100%; display: block; }
.cwl-map-note {
  background: var(--cw-cream-2); border: 1px dashed var(--cw-line); border-radius: var(--cw-radius-sm);
  padding: 14px 16px; color: var(--cw-ink-3); font-size: .88rem;
}

/* World-map country tints (matches Atlas semantics) */
.cwl-map-off { fill: var(--cw-cream-3); stroke: var(--cw-card-solid); stroke-width: .5; }
.cwl-map-on { fill: var(--cw-green-soft); stroke: var(--cw-green); stroke-width: .75; }

/* Route overlay layer */
.cwl-map-leg { stroke: var(--cw-green); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 7 6; opacity: .85; }
.cwl-map-pin-halo { fill: var(--cw-green); opacity: .18; }
.cwl-map-pin-dot { fill: var(--cw-green); stroke: var(--cw-card-solid); stroke-width: 2; }
.cwl-map-pin-num { fill: var(--cw-on-primary); font-family: var(--cw-sans); font-size: 9px; font-weight: 700; }
.cwl-map-pin { cursor: default; }

.cwl-map-overlay {
  position: absolute; top: 12px; left: 12px; right: 12px; display: flex; align-items: center; gap: 12px;
  pointer-events: none;
}
.cwl-map-count {
  display: flex; align-items: baseline; gap: 5px; background: var(--cw-card-solid);
  border: 1px solid var(--cw-line); border-radius: 999px; box-shadow: var(--cw-shadow-soft); padding: 5px 12px;
}
.cwl-map-count strong { font-family: var(--cw-serif); font-size: 1.05rem; color: var(--cw-green); }
.cwl-map-count span { font-size: .76rem; color: var(--cw-ink-3); }
.cwl-map-route {
  background: var(--cw-card-solid); border: 1px solid var(--cw-line); border-radius: 999px;
  box-shadow: var(--cw-shadow-soft); padding: 5px 12px; font-size: .76rem; font-weight: 600; color: var(--cw-ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%;
}
.cwl-map-legend {
  position: absolute; bottom: 12px; left: 12px; display: flex; gap: 12px; flex-wrap: wrap;
  background: var(--cw-card-solid); border: 1px solid var(--cw-line); border-radius: 999px;
  box-shadow: var(--cw-shadow-soft); padding: 6px 12px;
}
.cwl-map-legend span { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; color: var(--cw-ink-2); font-weight: 600; }
.cwl-leg-dot { width: 10px; height: 3px; border-radius: 2px; display: inline-block; }
.cwl-leg-dot-stop { width: 9px; height: 9px; border-radius: 50%; background: var(--cw-green); }
.cwl-map-empty { padding: 40px 20px; }

/* Route steps list */
.cwl-route-steps { list-style: none; margin: 0; padding: 0; }
.cwl-route-step { display: flex; align-items: center; gap: 12px; padding: 4px 0; }
.cwl-route-num { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--cw-green); color: var(--cw-on-primary); font-weight: 700; font-size: .82rem; flex-shrink: 0; }
.cwl-route-body strong { display: block; color: var(--cw-ink); font-size: .94rem; }
.cwl-route-body small { display: block; color: var(--cw-ink-3); font-size: .8rem; margin-top: 1px; }
.cwl-route-leg { display: flex; padding: 2px 0 2px 12px; }
.cwl-leg-pill { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 600; color: var(--cw-ink-2); background: var(--cw-cream-2); border: 1px solid var(--cw-line); border-left: 3px solid var(--leg, var(--cw-green)); border-radius: 8px; padding: 3px 10px; }

/* ───────────────────────── Menu ───────────────────────── */
.cwl-menu-wrap { position: relative; flex-shrink: 0; }
.cwl-menu-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--cw-line);
  background: var(--cw-card-solid); color: var(--cw-ink-2); font-size: 1.2rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
.cwl-menu-btn:hover { background: var(--cw-cream-2); }
.cwl-menu {
  position: absolute; top: 42px; right: 0; z-index: 6; min-width: 210px; padding: 6px;
  background: var(--cw-card-solid); border: 1px solid var(--cw-line); border-radius: var(--cw-radius-sm);
  box-shadow: var(--cw-shadow-pop); display: flex; flex-direction: column; gap: 2px;
}
.cwl-menu[hidden] { display: none; }
.cwl-menu-item {
  text-align: left; padding: 9px 11px; border-radius: 10px; border: none; background: none;
  color: var(--cw-ink); font-family: var(--cw-sans); font-size: .9rem; cursor: pointer;
}
.cwl-menu-item:hover { background: var(--cw-cream-2); }
.cwl-menu-item.danger { color: var(--cw-red); }
.cwl-menu-item.danger:hover { background: var(--cw-coral-soft); }

/* ───────────────────────── Responsive ───────────────────────── */
@media (max-width: 720px) {
  .cwl-metrics { grid-template-columns: 1fr 1fr; }
  .cwl-tiles { grid-template-columns: 1fr 1fr; }
  .cwl-grid2 { grid-template-columns: 1fr; }
  .cwl-exp-grid { grid-template-columns: 1fr 1fr; }
  /* Drop the trailing "Open" pill column; the whole card is tappable. Keep the
     thumb + text columns aligned so the image and copy share one baseline. */
  .cwl-card { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; }
  .cwl-card-cta { display: none; }
  .cwl-card-past { grid-template-columns: 56px minmax(0, 1fr); }
  .cwl-card-past > .cwl-badge-gold { display: none; }
  .cwl-thumb { width: 64px; height: 64px; }
  .cwl-card-main { min-height: 64px; }
  .cwl-thumb-initial { font-size: 1.5rem; }
  .cwl-thumb-glyph { width: 38px; height: 38px; }
  .cwl-map-route { display: none; }
}
@media (max-width: 460px) {
  .cwl-metrics { grid-template-columns: 1fr 1fr; }
  .cwl-toolbar-actions .cwl-btn { flex: 1; }
}
