:root {
  --ivory: #f7f4ed;
  --paper: #fffdf9;
  --ink: #171b2b;
  --muted: #667080;
  --stone: #d8d3c9;
  --stone-deep: #bbb5aa;
  --cobalt: #1a4eef;
  --cobalt-deep: #1035ac;
  --cobalt-pale: #edf2ff;
  --lime: #cff31b;
  --coral: #ff684a;
  --coral-deep: #ca452d;
  --green: #236a45;
  --navy: #18235b;
  --shadow-soft: 0 18px 50px rgba(29, 35, 62, .08);
  --shadow-tight: 0 8px 22px rgba(29, 35, 62, .07);
  --radius: 18px;
  --radius-sm: 12px;
  color: var(--ink);
  background: var(--ivory);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { min-width: 0; max-width: 100%; min-height: 100%; margin: 0; background: var(--ivory); }
body { overflow-x: hidden; }
button, input, select { font: inherit; }
button, select, input { max-width: 100%; }
button { cursor: pointer; }
button:disabled { opacity: .48; cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1, h2, h3 { font-family: Manrope, Inter, ui-sans-serif, system-ui, sans-serif; letter-spacing: -.055em; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* App scaffold */
.app-shell { min-height: 100vh; background: linear-gradient(130deg, #faf8f2 0%, var(--ivory) 50%, #f4f1ea 100%); }
.topbar { width: min(100%, 1480px); min-height: 78px; margin: 0 auto; padding: 14px clamp(18px, 3vw, 44px); display: flex; align-items: center; gap: 18px; border-bottom: 1px solid rgba(216, 211, 201, .86); }
.wordmark { min-width: 188px; min-height: 44px; display: inline-flex; align-items: center; color: var(--cobalt); }
.brand-mark { display: inline-flex; align-items: center; color: var(--cobalt); }
.brand-mark svg { width: 61px; height: 36px; display: block; }
.brand-mark b { margin-left: 9px; color: var(--cobalt); font: 800 19px/.9 Manrope, Inter, sans-serif; letter-spacing: -.075em; }
.topbar-note, .trip-crumb { color: var(--muted); font: 700 11px/1.35 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .06em; text-transform: uppercase; }
.trip-crumb { min-width: 0; display: flex; align-items: center; gap: 8px; }
.trip-crumb b { color: var(--ink); font-weight: 800; }
.topbar-trips { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; min-height: 44px; color: var(--cobalt); font-size: 13px; font-weight: 800; }
.topbar-trips .icon { width: 17px; height: 17px; }
.icon { width: 19px; height: 19px; flex: 0 0 auto; display: inline-block; vertical-align: middle; }

.workspace { width: min(100%, 1480px); min-width: 0; margin: 0 auto; padding: 32px clamp(18px, 3vw, 44px) 62px; display: grid; grid-template-columns: 196px minmax(0, 1fr) 222px; gap: clamp(22px, 3vw, 44px); }
.workspace-main { min-width: 0; }
.side-nav { min-width: 0; align-self: start; padding: 4px 0 0; }
.collection-link { min-height: 36px; display: inline-flex; align-items: center; gap: 7px; margin: 0 0 24px 10px; color: var(--cobalt); font-size: 12px; font-weight: 800; }
.collection-link .icon { width: 15px; height: 15px; transform: rotate(180deg); }
.side-trip-title { display: grid; gap: 4px; padding: 0 10px 17px; margin-bottom: 10px; border-bottom: 1px solid var(--stone); }
.side-trip-title span { font: 800 19px/1 Manrope, Inter, sans-serif; letter-spacing: -.055em; }
.side-trip-title small { color: var(--muted); font: 700 9px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .06em; text-transform: uppercase; }
.side-nav-list { display: grid; gap: 3px; }
.nav-link { min-height: 46px; position: relative; display: flex; align-items: center; gap: 10px; padding: 10px; color: #515a6b; border-radius: 9px; font-size: 13px; font-weight: 750; }
.nav-link:hover { color: var(--cobalt); background: rgba(26, 78, 239, .055); }
.nav-link.is-active { color: var(--cobalt); background: var(--cobalt-pale); }
.nav-link.is-active::before { position: absolute; left: -1px; width: 3px; height: 22px; content: ''; background: var(--cobalt); border-radius: 3px; }
.nav-link .icon { width: 18px; height: 18px; }
.nav-count { min-width: 20px; height: 20px; margin-left: auto; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--coral); font-size: 10px; }
.side-nav-foot { display: grid; gap: 5px; padding: 20px 10px 0; margin-top: 18px; border-top: 1px solid var(--stone); color: var(--muted); font: 650 9px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .035em; text-transform: uppercase; }
.context-panel { min-width: 0; align-self: start; padding: 0 0 0 18px; border-left: 1px solid var(--stone); }
.context-panel h2 { margin: 8px 0 10px; font-size: 20px; line-height: 1.05; }
.context-panel > p:not(.eyebrow) { color: var(--muted); font-size: 13px; line-height: 1.52; }
.context-panel .text-link { margin-top: 16px; }
.context-list { display: grid; gap: 10px; margin: 18px 0 0; }
.context-list div { display: grid; gap: 2px; }
.context-list dt { color: var(--muted); font: 700 9px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }
.context-list dd { color: var(--ink); font-size: 13px; font-weight: 750; }
.context-stat { display: flex; align-items: baseline; gap: 7px; margin-top: 17px; }
.context-stat strong { color: var(--coral-deep); font: 800 36px/1 Manrope, Inter, sans-serif; letter-spacing: -.07em; }
.context-stat span { color: var(--muted); font-size: 12px; }
.mobile-nav { display: none; }

.standalone-main { width: min(100%, 1300px); min-width: 0; margin: 0 auto; padding: clamp(44px, 8vw, 94px) clamp(18px, 5vw, 70px) 72px; }
.route-label { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font: 750 10px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .1em; text-transform: uppercase; }
.route-label span { width: 30px; height: 10px; position: relative; display: inline-block; border-left: 2px solid var(--cobalt); border-bottom: 2px solid var(--cobalt); border-radius: 0 0 0 8px; }
.route-label span::after { position: absolute; right: -4px; bottom: -4px; width: 7px; height: 7px; content: ''; border: 2px solid var(--coral); border-radius: 50%; background: var(--ivory); }
.eyebrow, .category-label { color: var(--muted); font: 750 10px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .1em; text-transform: uppercase; }
.lede { max-width: 630px; color: var(--muted); font-size: 16px; line-height: 1.55; }
.tiny-note, .illustrative-note { color: var(--muted); font-size: 12px; line-height: 1.5; }
.text-link { display: inline-flex; align-items: center; gap: 7px; color: var(--cobalt); font-size: 13px; font-weight: 800; }
.text-link:hover { color: var(--cobalt-deep); }
.text-link .icon, .button .icon { width: 17px; height: 17px; }
.back-link { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; color: var(--cobalt); font-size: 13px; font-weight: 800; }
.back-link .icon { width: 16px; height: 16px; transform: rotate(180deg); }

/* Inputs and controls */
.button { min-height: 46px; padding: 11px 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 11px; font-size: 13px; font-weight: 850; transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease; }
.button:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--shadow-tight); }
.button-primary { color: white; background: var(--cobalt); box-shadow: 0 5px 0 var(--cobalt-deep); }
.button-primary:hover:not(:disabled) { background: #2456e9; }
.button-primary .icon { color: var(--lime); }
.button-quiet { color: var(--cobalt); background: transparent; border-color: rgba(26, 78, 239, .42); }
.button-quiet:hover:not(:disabled) { background: var(--cobalt-pale); }
.button-coral { color: white; background: var(--coral); box-shadow: 0 5px 0 var(--coral-deep); }
.button-coral .icon { color: var(--lime); }
.button-approved { color: var(--green); background: #e7f3e0; border-color: #afd49e; }
.icon-button { width: 44px; height: 44px; padding: 0; display: inline-grid; place-items: center; color: var(--cobalt); background: var(--paper); border: 1px solid var(--stone); border-radius: 9px; }
.icon-button:hover:not(:disabled) { background: var(--cobalt-pale); border-color: var(--cobalt); }
.icon-button-danger { color: var(--coral-deep); }
.icon-button-danger:hover:not(:disabled) { background: #fff0eb; border-color: var(--coral); }
.status-chip { min-height: 26px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 99px; white-space: nowrap; font-size: 10px; font-weight: 850; }
.status-chip i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-needs_decision { color: #9d432e; background: #fff0eb; }
.status-ready_for_approval { color: #1557a3; background: #eaf1ff; }
.status-agreed { color: #256743; background: #e8f5e0; }
.status-draft { color: #5f6876; background: #ebe8e2; }

label, legend { display: block; color: var(--ink); font-size: 13px; font-weight: 800; line-height: 1.35; }
input, select { width: 100%; min-height: 47px; padding: 10px 11px; margin: 8px 0 17px; color: var(--ink); background: white; border: 1px solid var(--stone-deep); border-radius: 9px; outline: none; font-size: 14px; }
input:hover, select:hover { border-color: #888f9c; }
input:focus, select:focus { border-color: var(--cobalt); box-shadow: 0 0 0 3px rgba(26, 78, 239, .14); }
fieldset { min-width: 0; padding: 0; margin: 0; border: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); margin: 9px 0 17px; overflow: hidden; border: 1px solid var(--stone-deep); border-radius: 9px; }
.segmented label { position: relative; min-height: 44px; display: grid; place-items: center; margin: 0; color: var(--muted); border-right: 1px solid var(--stone-deep); cursor: pointer; }
.segmented label:last-child { border: 0; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { width: 100%; min-height: 44px; display: grid; place-items: center; padding: 0 5px; }
.segmented input:checked + span { color: white; background: var(--navy); }
.segmented input:focus-visible + span { outline: 3px solid var(--lime); outline-offset: -3px; }
.field-error { margin: -10px 0 14px; color: #a33e2b; font-size: 12px; line-height: 1.4; }
.field-hint { margin: -5px 0 10px; color: var(--muted); font-size: 12px; line-height: 1.45; }

/* My trips */
.empty-stage { width: min(100%, 770px); margin: clamp(30px, 8vh, 95px) auto 0; display: grid; justify-items: center; text-align: center; }
.empty-symbol { width: 104px; height: 86px; display: grid; place-items: center; margin-bottom: 20px; color: var(--cobalt); background: var(--paper); border: 1px solid var(--stone); border-radius: 19px; box-shadow: var(--shadow-tight); }
.empty-symbol .brand-mark svg { width: 72px; height: 42px; }
.empty-symbol > .icon { width: 42px; height: 42px; }
.empty-stage h1 { max-width: 710px; margin: 14px 0 15px; font-size: clamp(38px, 6vw, 70px); line-height: .96; }
.empty-stage .button { margin-top: 28px; }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; }
.empty-actions .button { margin-top: 0; }
.setup-strip { width: min(100%, 550px); display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 20px; margin-top: 31px; padding-top: 18px; border-top: 1px solid var(--stone); color: var(--muted); font-size: 11px; font-weight: 700; }
.setup-strip span { display: inline-flex; align-items: center; gap: 7px; }
.setup-strip b { width: 19px; height: 19px; display: grid; place-items: center; color: var(--cobalt); background: var(--cobalt-pale); border-radius: 50%; font-size: 10px; }
.trips-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding-bottom: 28px; margin-bottom: 25px; border-bottom: 1px solid var(--stone); }
.trips-head h1 { margin: 9px 0 10px; font-size: clamp(40px, 5vw, 65px); line-height: .97; }
.trips-head .button { flex: 0 0 auto; }
.trip-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 850px; }
.trip-card { min-width: 0; min-height: 260px; display: flex; flex-direction: column; padding: 21px; overflow: hidden; position: relative; background: rgba(255, 253, 249, .9); border: 1px solid var(--stone); border-radius: var(--radius); box-shadow: var(--shadow-tight); }
.trip-card::before { position: absolute; right: -18px; top: -18px; width: 80px; height: 80px; content: ''; border: 1px solid #d6defa; border-radius: 50%; }
.trip-card-top, .trip-card-footer { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.city-stamp { width: 38px; height: 38px; position: relative; display: grid; place-items: center; color: var(--navy); background: var(--lime); border-radius: 50%; font: 850 10px/1 Manrope, Inter, sans-serif; letter-spacing: .04em; }
.city-stamp i { position: absolute; right: -2px; bottom: 1px; width: 8px; height: 8px; background: var(--coral); border: 2px solid var(--paper); border-radius: 50%; }
.trip-card-body { position: relative; z-index: 1; margin: auto 0 16px; }
.trip-card-body h2 { margin: 7px 0 6px; font-size: 34px; line-height: 1; }
.trip-card-body > p:last-child { color: var(--muted); font-size: 13px; line-height: 1.45; }
.trip-card-footer { padding-top: 15px; border-top: 1px solid var(--stone); color: var(--muted); font-size: 12px; }
.trip-card-actions { display: inline-flex; align-items: center; gap: 8px; }
.trip-delete { min-height: 44px; padding: 0 10px; border: 0; border-radius: 10px; color: var(--muted); background: transparent; font: inherit; font-weight: 750; cursor: pointer; }
.trip-delete:hover { color: var(--coral); background: #fff0eb; }

/* Trip builder */
.wizard-layout { min-width: 0; display: grid; grid-template-columns: minmax(220px, .72fr) minmax(0, 1.25fr); gap: clamp(38px, 8vw, 120px); align-items: start; }
.wizard-side h1 { max-width: 440px; margin: 14px 0 15px; font-size: clamp(37px, 5vw, 58px); line-height: .98; }
.wizard-side > p:not(.route-label) { max-width: 360px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.wizard-side .route-label { margin-top: 28px; }
.wizard-steps { list-style: none; padding: 0; margin: 38px 0 0; display: grid; gap: 13px; }
.wizard-steps li { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }
.wizard-steps span { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--stone-deep); border-radius: 50%; font-size: 10px; }
.wizard-steps .is-active, .wizard-steps .is-complete { color: var(--cobalt); }
.wizard-steps .is-active span { color: white; background: var(--cobalt); border-color: var(--cobalt); }
.wizard-steps .is-complete span { background: var(--cobalt-pale); border-color: var(--cobalt); }
.wizard-form { min-width: 0; padding: clamp(22px, 4vw, 40px); background: var(--paper); border: 1px solid var(--stone); border-radius: 20px; box-shadow: var(--shadow-soft); }
.form-heading { padding-bottom: 23px; margin-bottom: 22px; border-bottom: 1px solid var(--stone); }
.form-heading h2 { margin: 8px 0 7px; font-size: 29px; line-height: 1.03; }
.form-heading p:last-child { color: var(--muted); font-size: 14px; line-height: 1.45; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding-top: 21px; margin-top: 22px; border-top: 1px solid var(--stone); }
.form-note { margin-right: auto; color: var(--muted); font-size: 12px; }
.interest-field + .interest-field { padding-top: 22px; margin-top: 23px; border-top: 1px solid var(--stone); }
.name-label input { margin-bottom: 13px; }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.check-item { min-width: 0; min-height: 44px; display: flex; align-items: center; gap: 8px; padding: 7px 8px; color: var(--muted); border: 1px solid var(--stone); border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: 700; }
.check-item input { width: 16px; min-height: 16px; padding: 0; margin: 0; accent-color: var(--cobalt); }
.check-item:has(input:checked) { color: var(--cobalt); background: var(--cobalt-pale); border-color: var(--cobalt); }
.preview-week { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.preview-day { min-width: 0; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; min-height: 118px; padding: 14px; background: #fbfaf6; border: 1px solid var(--stone); border-radius: 12px; }
.route-index { width: 24px; height: 24px; display: grid; place-items: center; color: var(--cobalt); background: var(--cobalt-pale); border-radius: 50%; font: 800 9px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.preview-day p { color: var(--muted); font-size: 11px; font-weight: 800; }
.preview-day h3 { margin: 6px 0 8px; font-size: 16px; line-height: 1.15; }
.preview-day small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.route-note { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; margin-top: 17px; color: var(--muted); font-size: 12px; line-height: 1.48; }
.route-note .icon { color: var(--cobalt); }
.route-loading { min-height: 276px; padding: 22px 0; }
.route-loading h2 { margin: 8px 0; font-size: 25px; line-height: 1.05; }
.route-loading > p:not(.eyebrow) { max-width: 430px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.loading-lines { display: grid; gap: 10px; margin-top: 27px; }
.loading-lines i { display: block; height: 10px; border-radius: 99px; background: linear-gradient(90deg, #edf0f5 0%, #edf0f5 38%, #f8fafc 52%, #edf0f5 66%, #edf0f5 100%); background-size: 220% 100%; animation: route-loading 1.2s ease-in-out infinite; }
.loading-lines i:nth-child(2) { width: 82%; animation-delay: .12s; }
.loading-lines i:nth-child(3) { width: 64%; animation-delay: .24s; }
@keyframes route-loading { from { background-position: 100% 0; } to { background-position: -120% 0; } }

/* Week board */
.page-head, .day-head, .decision-head, .summary-head { display: flex; align-items: end; justify-content: space-between; gap: 28px; padding-bottom: 27px; margin-bottom: 25px; border-bottom: 1px solid var(--stone); }
.page-head h1, .day-head h1, .decision-head h1, .summary-head h1 { max-width: 690px; margin: 10px 0 11px; font-size: clamp(36px, 4.6vw, 60px); line-height: .97; }
.agreement-progress { width: min(100%, 220px); flex: 0 0 220px; display: grid; gap: 8px; }
.agreement-progress > div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.agreement-progress strong { color: var(--cobalt); font: 850 30px/1 Manrope, Inter, sans-serif; letter-spacing: -.07em; }
.agreement-progress span, .agreement-progress small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.agreement-progress > i { height: 6px; overflow: hidden; display: block; background: #dbe0ec; border-radius: 9px; }
.agreement-progress b { height: 100%; display: block; background: var(--cobalt); border-radius: inherit; transition: width .35s ease; }
.overview-layout { display: grid; grid-template-columns: minmax(0, 1fr) 236px; gap: 25px; align-items: start; }
.weekboard { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.week-tile { min-width: 0; min-height: 190px; position: relative; display: flex; flex-direction: column; padding: 17px; overflow: hidden; background: rgba(255, 253, 249, .85); border: 1px solid var(--stone); border-radius: 15px; box-shadow: 0 5px 14px rgba(25, 31, 55, .04); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.week-tile:hover { transform: translateY(-2px); border-color: #aebef0; box-shadow: var(--shadow-tight); }
.week-tile.is-current { border-color: var(--cobalt); box-shadow: 0 0 0 3px rgba(26, 78, 239, .08); }
.week-tile-top { display: flex; justify-content: space-between; align-items: center; gap: 7px; color: var(--cobalt); font: 800 10px/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }
.week-tile-top > i { width: 9px; height: 9px; border: 2px solid var(--cobalt); border-radius: 50%; background: var(--lime); }
.tile-alert { padding: 5px 7px; color: #a04730; background: #fff0eb; border-radius: 20px; font: 800 9px/1 Inter, sans-serif; text-transform: none; letter-spacing: 0; }
.week-tile > p { margin: auto 0 5px; color: var(--muted); font-size: 11px; font-weight: 750; }
.week-tile h2 { max-width: 95%; margin-bottom: 12px; font-size: 20px; line-height: 1.08; }
.week-tile-meta { display: flex; flex-wrap: wrap; gap: 7px 12px; padding-top: 11px; border-top: 1px solid var(--stone); color: var(--muted); font-size: 11px; }
.tile-alert-warning { color: #7a5313; background: #fff6de; }
.decision-brief { padding: 20px; background: var(--paper); border: 1px solid var(--stone); border-radius: 15px; box-shadow: var(--shadow-tight); }
.decision-brief.is-open { background: #fff7f3; border-color: #f0c2b5; }
.decision-brief.is-ready { background: #f1f5ff; border-color: #c9d7fb; }
.decision-brief h2 { margin: 8px 0 11px; font-size: 21px; line-height: 1.09; }
.decision-brief > p:not(.eyebrow) { margin-bottom: 17px; color: var(--muted); font-size: 13px; line-height: 1.48; }
.decision-brief .button { width: 100%; }
.illustrative-note { margin: 19px 0 0; }
.person-pair { display: flex; }
.person-pair span, .avatar { width: 36px; height: 36px; display: grid; place-items: center; color: var(--navy); background: var(--lime); border: 2px solid var(--ivory); border-radius: 50%; font-size: 12px; font-weight: 850; }
.person-pair span + span { margin-left: -8px; color: var(--cobalt); background: #dce7ff; }

/* Local navigation model */
.route-health, .route-check-card { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 18px 20px; margin-bottom: 20px; border: 1px solid var(--stone); border-radius: 14px; background: var(--paper); box-shadow: 0 5px 14px rgba(25, 31, 55, .035); }
.route-health.is-good, .route-check-card.is-clear { background: #f6fbf3; border-color: #c4dcba; }
.route-health.is-warning, .route-check-card.is-warning { background: #fff8f2; border-color: #edc8b7; }
.route-health h2, .route-check-card h2 { margin: 6px 0; font-size: 20px; line-height: 1.08; }
.route-health p:not(.eyebrow), .route-check-card p:not(.eyebrow) { max-width: 660px; color: var(--muted); font-size: 13px; line-height: 1.48; }
.route-health .button { flex: 0 0 auto; }
.orientation-panel { min-width: 0; margin: 0 0 18px; padding: 21px; overflow: hidden; color: var(--ink); background: linear-gradient(118deg, #edf2ff 0%, #f8faff 61%, #f4fbef 100%); border: 1px solid #c9d7fb; border-radius: 18px; }
.orientation-panel.is-empty { background: #fbfaf6; border-color: var(--stone); }
.orientation-heading { display: flex; align-items: start; justify-content: space-between; gap: 22px; }
.orientation-heading h2 { margin: 7px 0; font-size: 25px; line-height: 1.02; }
.orientation-heading > div > p:not(.eyebrow) { max-width: 560px; color: #536075; font-size: 13px; line-height: 1.5; }
.orientation-facts { min-width: 260px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.orientation-facts div { min-width: 0; padding: 10px; background: rgba(255, 255, 255, .67); border: 1px solid rgba(26, 78, 239, .12); border-radius: 9px; }
.orientation-facts dt, .place-facts dt { color: var(--muted); font: 750 9px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .07em; text-transform: uppercase; }
.orientation-facts dd, .place-facts dd { margin: 5px 0 0; font-size: 12px; font-weight: 800; line-height: 1.35; overflow-wrap: anywhere; }
.orientation-list { display: grid; gap: 7px; padding: 18px 0 0; margin: 18px 0 0; list-style: none; border-top: 1px solid rgba(26, 78, 239, .16); }
.orientation-stop { min-width: 0; display: grid; grid-template-columns: 31px minmax(0, 1fr); gap: 11px; align-items: start; padding: 9px 10px; background: rgba(255, 255, 255, .68); border: 1px solid rgba(26, 78, 239, .1); border-radius: 9px; }
.orientation-stop > span { width: 25px; height: 25px; display: grid; place-items: center; color: var(--cobalt); background: var(--lime); border-radius: 50%; font: 800 9px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.orientation-stop strong { display: block; font-size: 14px; line-height: 1.25; }
.orientation-stop small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.orientation-leg { display: grid; gap: 3px; padding: 4px 12px 4px 42px; color: #4d5f84; }
.orientation-leg strong { font-size: 11px; }
.orientation-leg span { font-size: 10px; line-height: 1.4; }
.route-check-card { align-items: end; margin-bottom: 22px; }
.route-check-more { margin-top: 6px; color: var(--coral-deep) !important; font-size: 11px !important; font-weight: 800; }
.route-check-actions { display: grid; justify-items: end; gap: 8px; flex: 0 0 auto; }
.text-button { min-height: 44px; padding: 7px 1px; color: var(--cobalt); background: transparent; border: 0; font-size: 12px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.text-button:hover { color: var(--cobalt-deep); }

/* Day route */
.day-tabs { min-width: 0; display: flex; gap: 7px; padding-bottom: 19px; margin-bottom: 24px; overflow-x: auto; border-bottom: 1px solid var(--stone); scrollbar-width: thin; }
.day-tab { min-width: 76px; min-height: 48px; display: grid; grid-template-columns: 23px minmax(0, 1fr); align-items: center; gap: 7px; padding: 8px 10px; color: var(--muted); background: rgba(255, 253, 249, .7); border: 1px solid transparent; border-radius: 9px; font-size: 11px; font-weight: 750; white-space: nowrap; }
.day-tab b { width: 21px; height: 21px; display: grid; place-items: center; color: var(--cobalt); background: var(--cobalt-pale); border-radius: 50%; font: 800 9px/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.day-tab.is-active { color: var(--cobalt); background: var(--paper); border-color: var(--cobalt); box-shadow: var(--shadow-tight); }
.day-tab.is-active b { color: var(--navy); background: var(--lime); }
.day-head { margin-bottom: 23px; }
.day-summary { width: 180px; flex: 0 0 180px; display: grid; gap: 6px; padding-bottom: 2px; color: var(--muted); font-size: 11px; }
.day-summary span { display: flex; align-items: center; gap: 5px; }
.day-summary strong { color: var(--cobalt); font: 850 23px/1 Manrope, Inter, sans-serif; letter-spacing: -.06em; }
.day-summary small { font-size: 11px; }
.day-layout { display: grid; grid-template-columns: minmax(0, 1fr) 175px; gap: 27px; }
.route-ledger { min-width: 0; padding: 22px; background: rgba(255, 253, 249, .9); border: 1px solid var(--stone); border-radius: 18px; box-shadow: var(--shadow-tight); }
.ledger-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 17px; margin-bottom: 18px; border-bottom: 1px solid var(--stone); }
.ledger-heading span { color: var(--muted); font-size: 11px; }
.stop-card { min-width: 0; position: relative; display: grid; grid-template-columns: 25px 76px minmax(0, 1fr) auto; gap: 13px; align-items: start; padding-bottom: 19px; margin-bottom: 18px; border-bottom: 1px solid var(--stone); }
.timeline-node { position: relative; height: 100%; display: flex; justify-content: center; }
.timeline-node::after { position: absolute; top: 15px; bottom: -37px; width: 2px; content: ''; background: var(--cobalt); }
.stop-card:last-of-type .timeline-node::after { background: linear-gradient(var(--cobalt), var(--coral)); }
.timeline-node i { position: relative; z-index: 1; width: 14px; height: 14px; margin-top: 5px; border: 3px solid var(--cobalt); border-radius: 50%; background: var(--lime); }
.stop-card:last-of-type .timeline-node i { border-color: var(--coral); background: var(--paper); }
.stop-time input { width: 76px; min-height: 44px; padding: 5px 4px; margin: 0; color: var(--cobalt); background: var(--cobalt-pale); border: 0; border-radius: 7px; font: 800 11px/1 ui-monospace, SFMono-Regular, Consolas, monospace; text-align: center; }
.stop-content h2 { margin: 4px 0 5px; font-size: 20px; line-height: 1.08; }
.stop-content > p { color: var(--muted); font-size: 12px; line-height: 1.4; }
.stop-content .stop-window { margin-top: 4px; color: #3f5d9a; font-size: 11px; font-weight: 750; }
.stop-content .stop-reason { max-width: 400px; margin-top: 7px; color: #4f596d; }
.stop-actions { display: grid; justify-items: end; gap: 7px; }
.stop-actions select { width: 76px; min-height: 44px; padding: 4px 5px; margin: 0; font-size: 11px; }
.stop-actions > div { display: flex; gap: 4px; }
.stop-actions .icon-button { width: 44px; height: 44px; }
.stop-actions .icon { width: 14px; height: 14px; }
.add-stop { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(160px, 1.1fr) auto; gap: 14px; align-items: end; padding: 18px; margin-top: 4px; background: var(--cobalt-pale); border: 1px solid #cbd8fb; border-radius: 12px; }
.add-stop h2 { margin: 5px 0; font-size: 20px; line-height: 1.08; }
.add-stop p:last-child { color: var(--muted); font-size: 11px; line-height: 1.4; }
.add-stop select { margin: 0; }
.day-metrics { align-self: start; padding: 3px 0 0 17px; border-left: 1px solid var(--stone); }
.day-metrics dl { display: grid; gap: 12px; margin: 17px 0 23px; }
.day-metrics dl div { display: grid; gap: 2px; }
.day-metrics dt { color: var(--muted); font: 700 9px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }
.day-metrics dd { color: var(--ink); font-size: 13px; font-weight: 800; }
.no-results { padding: 35px 24px; margin-bottom: 15px; border: 1px dashed var(--stone-deep); border-radius: 12px; text-align: center; }
.no-results h2 { margin: 8px 0; font-size: 25px; }
.no-results p:last-child { color: var(--muted); font-size: 13px; }

/* Explore */
.explore-head { display: flex; align-items: end; justify-content: space-between; gap: 26px; padding-bottom: 25px; margin-bottom: 20px; border-bottom: 1px solid var(--stone); }
.explore-head h1 { max-width: 720px; margin: 10px 0 11px; font-size: clamp(36px, 4.6vw, 60px); line-height: .97; }
.explore-target { width: 235px; flex: 0 0 235px; }
.explore-target label { color: var(--muted); font-size: 11px; }
.explore-target select { margin-bottom: 0; }
.explore-controls { padding: 18px; margin-bottom: 16px; background: var(--paper); border: 1px solid var(--stone); border-radius: 15px; box-shadow: var(--shadow-tight); }
.search-field { max-width: 620px; }
.search-field > span { display: block; }
.search-field input { margin-bottom: 0; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 15px; margin-top: 15px; border-top: 1px solid var(--stone); }
.filter-chip { min-height: 44px; padding: 8px 12px; color: #536075; background: #fbfaf6; border: 1px solid var(--stone); border-radius: 99px; font-size: 12px; font-weight: 800; }
.filter-chip:hover, .filter-chip.is-active { color: var(--cobalt); background: var(--cobalt-pale); border-color: var(--cobalt); }
.explore-results { display: grid; gap: 10px; }
.results-label { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 3px 2px; color: var(--muted); font-size: 11px; }
.place-result { min-width: 0; padding: 19px; background: rgba(255, 253, 249, .88); border: 1px solid var(--stone); border-radius: 14px; box-shadow: 0 5px 14px rgba(25, 31, 55, .035); }
.place-result-head { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.place-result-head h2 { margin-top: 5px; font-size: 23px; line-height: 1.08; }
.place-result-head > span { flex: 0 0 auto; padding: 5px 7px; color: #496185; background: var(--cobalt-pale); border-radius: 99px; font-size: 10px; font-weight: 850; }
.place-result > p { margin-top: 9px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.place-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 14px 0; margin: 14px 0; border-top: 1px solid var(--stone); border-bottom: 1px solid var(--stone); }
.place-result .button { min-width: 190px; }

/* Decisions and agreement */
.decision-head { display: block; }
.decision-layout { display: grid; grid-template-columns: minmax(0, 1fr) 225px; gap: 24px; }
.decision-options { min-width: 0; display: grid; gap: 12px; }
.decision-option { min-width: 0; padding: 20px; background: var(--paper); border: 1px solid var(--stone); border-radius: 16px; box-shadow: 0 5px 14px rgba(25, 31, 55, .035); }
.decision-option.is-selected { padding: 19px; border: 2px solid var(--cobalt); box-shadow: 0 0 0 3px rgba(26, 78, 239, .08); }
.decision-option.is-unavailable { background: #fbf7f4; border-style: dashed; }
.option-heading { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 11px; }
.radio-dot { width: 14px; height: 14px; margin-top: 4px; border: 2px solid var(--stone-deep); border-radius: 50%; }
.is-selected .radio-dot { border: 4px solid var(--cobalt); }
.option-heading h2 { margin: 6px 0 5px; font-size: 22px; line-height: 1.09; }
.option-heading p:last-child { color: var(--muted); font-size: 13px; line-height: 1.45; }
.impact-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 16px 0; margin: 16px 0; border-top: 1px solid var(--stone); border-bottom: 1px solid var(--stone); }
.impact-list dt { color: var(--muted); font: 800 9px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .07em; text-transform: uppercase; }
.impact-list dd { margin: 5px 0 0; font-size: 12px; font-weight: 750; line-height: 1.35; overflow-wrap: anywhere; }
.decision-aside, .summary-aside { align-self: start; padding: 19px; background: var(--paper); border: 1px solid var(--stone); border-radius: 15px; box-shadow: var(--shadow-tight); }
.decision-aside { background: #fff7f3; border-color: #efc7bc; }
.decision-aside h2, .summary-aside h2 { margin: 8px 0 10px; font-size: 21px; line-height: 1.08; }
.decision-aside > p:not(.eyebrow), .summary-aside > p:not(.eyebrow) { color: var(--muted); font-size: 13px; line-height: 1.48; }
.decision-aside .button { width: 100%; margin-top: 18px; }
.decision-history { display: grid; gap: 20px; }
.decision-complete { display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: center; gap: 16px; padding: clamp(22px, 5vw, 44px); color: var(--navy); background: #f0f8eb; border: 1px solid #c3ddaf; border-radius: 18px; }
.decision-complete > .icon { width: 43px; height: 43px; padding: 8px; color: var(--navy); background: var(--lime); border-radius: 50%; }
.decision-complete h2 { margin: 6px 0 15px; font-size: clamp(25px, 3vw, 38px); line-height: 1; }
.history-list { display: grid; gap: 9px; }
.compact-history { margin-top: 21px; }
.resolved-decision { display: grid; grid-template-columns: 31px minmax(0, 1fr); gap: 11px; padding: 14px; background: rgba(255, 253, 249, .75); border: 1px solid var(--stone); border-radius: 11px; }
.resolved-decision > span { width: 28px; height: 28px; display: grid; place-items: center; color: var(--green); background: #e7f3e0; border-radius: 50%; }
.resolved-decision .icon { width: 15px; height: 15px; }
.resolved-decision h3 { margin: 4px 0; font-size: 15px; line-height: 1.2; }
.resolved-decision p:last-child { color: var(--muted); font-size: 12px; line-height: 1.4; }
.summary-head { display: block; }
.summary-layout { display: grid; grid-template-columns: minmax(0, 1fr) 225px; gap: 24px; }
.agreement-card { min-width: 0; padding: clamp(22px, 4vw, 37px); background: var(--paper); border: 1px solid var(--stone); border-radius: 18px; box-shadow: var(--shadow-tight); }
.agreement-card.is-agreed { border-color: #aacd95; background: #fcfff9; }
.agreement-top { display: flex; align-items: start; justify-content: space-between; gap: 14px; padding-bottom: 20px; border-bottom: 1px solid var(--stone); }
.agreement-top h2 { margin-top: 7px; font-size: 31px; line-height: 1; }
.summary-week { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 20px 0; }
.agreement-summary { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 0 0; color: #496185; font-size: 11px; font-weight: 800; }
.agreement-summary span { padding: 6px 8px; background: var(--cobalt-pale); border-radius: 99px; }
.summary-week div { min-width: 0; padding: 11px; background: #fbfaf5; border: 1px solid var(--stone); border-radius: 10px; }
.summary-week b { display: block; margin-bottom: 7px; color: var(--cobalt); font: 800 10px/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .08em; }
.summary-week span { display: block; font-size: 12px; font-weight: 800; }
.summary-week small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.approval-list { display: grid; gap: 8px; }
.approval-row { min-width: 0; display: grid; grid-template-columns: 39px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 11px 0; border-top: 1px solid var(--stone); }
.approval-row h3 { font-size: 16px; line-height: 1.1; }
.approval-row p { margin-top: 3px; color: var(--muted); font-size: 11px; }
.approval-row .button { min-width: 132px; }
.summary-aside .button { width: 100%; margin-top: 17px; }

@media (max-width: 1180px) {
  .workspace { grid-template-columns: 178px minmax(0, 1fr); }
  .context-panel { display: none; }
  .overview-layout { grid-template-columns: minmax(0, 1fr) 218px; }
}

@media (max-width: 900px) {
  .app-shell { padding-bottom: 95px; }
  .topbar { min-height: 64px; padding: 10px 16px; gap: 11px; }
  .wordmark { min-width: 147px; }
  .brand-mark svg { width: 46px; height: 30px; }
  .brand-mark b { margin-left: 6px; font-size: 16px; }
  .trip-crumb, .topbar-note { display: none; }
  .topbar-trips { margin-left: auto; font-size: 0; }
  .topbar-trips .icon { width: 19px; height: 19px; }
  .workspace { display: block; padding: 24px 16px 32px; }
  .side-nav { display: none; }
  .mobile-nav { position: fixed; z-index: 10; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); left: 10px; min-height: 66px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 5px; background: var(--navy); border: 1px solid rgba(255, 255, 255, .1); border-radius: 16px; box-shadow: 0 14px 32px rgba(16, 29, 73, .28); }
  .mobile-nav-link { min-width: 0; min-height: 54px; display: grid; place-items: center; align-content: center; gap: 3px; color: #bec8ee; border-radius: 11px; font-size: 9px; font-weight: 750; text-align: center; }
  .mobile-nav-link .icon { width: 17px; height: 17px; }
  .mobile-nav-link.is-active { color: var(--lime); background: rgba(255, 255, 255, .1); }
  .standalone-main { padding: 44px 16px 42px; }
  .empty-stage { margin-top: 22px; }
  .empty-stage h1 { font-size: clamp(36px, 11vw, 46px); }
  .setup-strip { display: grid; justify-content: stretch; gap: 9px; text-align: left; }
  .setup-strip span { justify-content: flex-start; }
  .trips-head { display: grid; align-items: stretch; gap: 19px; padding-bottom: 21px; }
  .trips-head h1 { font-size: 42px; }
  .trips-head .button { width: 100%; }
  .trip-grid { grid-template-columns: 1fr; }
  .trip-card { min-height: 238px; }
  .wizard-layout { display: block; }
  .wizard-side { margin-bottom: 29px; }
  .wizard-side .route-label { margin-top: 15px; }
  .wizard-side h1 { font-size: 41px; }
  .wizard-steps { display: flex; gap: 11px; margin-top: 22px; }
  .wizard-steps li { gap: 5px; }
  .wizard-steps b { font-size: 11px; }
  .wizard-form { padding: 20px 16px; border-radius: 16px; }
  .form-heading h2 { font-size: 26px; }
  .check-grid, .preview-week { grid-template-columns: 1fr; }
  .field-row { gap: 10px; }
  .form-actions { align-items: stretch; flex-wrap: wrap; }
  .form-note { width: 100%; }
  .form-actions .button { flex: 1 1 auto; }
  .page-head, .day-head, .decision-head, .summary-head { display: grid; align-items: stretch; gap: 19px; padding-bottom: 21px; margin-bottom: 20px; }
  .page-head h1, .day-head h1, .decision-head h1, .summary-head h1 { font-size: 39px; }
  .agreement-progress { width: 100%; }
  .overview-layout { grid-template-columns: 1fr; }
  .weekboard { gap: 9px; }
  .week-tile { min-height: 173px; padding: 14px; }
  .week-tile h2 { font-size: 18px; }
  .decision-brief { padding: 18px; }
  .route-health, .route-check-card, .explore-head { display: grid; align-items: stretch; gap: 15px; }
  .route-health .button, .route-check-actions { width: 100%; }
  .route-check-actions { justify-items: stretch; }
  .orientation-panel { padding: 17px 14px; border-radius: 15px; }
  .orientation-heading { display: grid; gap: 15px; }
  .orientation-heading h2 { font-size: 23px; }
  .orientation-facts { min-width: 0; }
  .orientation-list { margin-top: 15px; padding-top: 15px; }
  .orientation-leg { padding-left: 10px; }
  .day-tabs { width: 100%; margin-right: 0; padding-right: 0; }
  .day-head { margin-top: 0; }
  .day-summary { width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; padding: 12px 0 0; border-top: 1px solid var(--stone); }
  .day-summary strong { text-align: center; font-size: 20px; }
  .day-layout { grid-template-columns: 1fr; gap: 16px; }
  .route-ledger { padding: 17px 13px; border-radius: 15px; }
  .stop-card { grid-template-columns: 20px 69px minmax(0, 1fr); gap: 9px; padding-bottom: 17px; margin-bottom: 16px; }
  .stop-actions { grid-column: 3; grid-row: 2; justify-items: start; grid-template-columns: 65px auto; align-items: center; }
  .stop-actions select { width: 62px; }
  .stop-content h2 { font-size: 18px; }
  .stop-content .stop-reason { font-size: 11px; }
  .timeline-node::after { bottom: -33px; }
  .add-stop { grid-template-columns: 1fr; gap: 10px; padding: 15px; }
  .add-stop .button { width: 100%; }
  .day-metrics { padding: 16px; border: 1px solid var(--stone); border-radius: 13px; }
  .day-metrics dl { grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 15px; }
  .decision-layout, .summary-layout { grid-template-columns: 1fr; }
  .decision-option { padding: 17px; }
  .decision-option.is-selected { padding: 16px; }
  .impact-list { grid-template-columns: 1fr; gap: 9px; }
  .impact-list div { display: grid; grid-template-columns: 80px 1fr; gap: 10px; }
  .impact-list dd { margin: 0; }
  .decision-complete { grid-template-columns: 45px minmax(0, 1fr); padding: 22px; }
  .decision-complete > .icon { width: 38px; height: 38px; }
  .explore-head h1 { font-size: 39px; }
  .explore-target { width: 100%; }
  .place-facts { grid-template-columns: 1fr; }
  .place-result .button { width: 100%; }
  .summary-week { grid-template-columns: 1fr; }
  .approval-row { grid-template-columns: 36px minmax(0, 1fr); }
  .approval-row .button { grid-column: 1 / -1; width: 100%; }
  .summary-aside { order: -1; }
}

@media (max-width: 390px) {
  .topbar { padding-right: 13px; padding-left: 13px; }
  .brand-mark b { font-size: 15px; }
  .empty-stage h1, .trips-head h1, .wizard-side h1, .page-head h1, .day-head h1, .decision-head h1, .summary-head h1 { font-size: 36px; }
  .field-row { grid-template-columns: 1fr; }
  .weekboard { grid-template-columns: 1fr; }
  .week-tile { min-height: 150px; }
  .stop-actions { grid-column: 1 / -1; grid-row: auto; grid-template-columns: 64px auto; margin-left: 29px; }
  .day-summary { grid-template-columns: 1fr; justify-items: start; gap: 7px; }
  .day-summary strong { text-align: left; }
  .day-metrics dl { grid-template-columns: 1fr; }
  .orientation-facts { grid-template-columns: 1fr; }
  .orientation-stop { grid-template-columns: 27px minmax(0, 1fr); }
  .place-result { padding: 16px; }
  .place-result-head { display: grid; }
  .results-label { align-items: start; display: grid; }
  .mobile-nav { right: 7px; bottom: 7px; left: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
