/* The "boarding pass" design, the site's only design. Loaded after designs.css; every rule is scoped to :root[data-palette="boarding"].
   Idea: a bright consumer travel app. Sky-blue and white, sunshine-yellow calls to action, coral highlights,
   rounded Fredoka headings over Nunito text, and flights drawn as boarding passes with a perforated stub.
   Fonts: self-hosted subsets in /fonts/ (SIL OFL 1.1, see fonts/OFL.txt). */

@font-face { font-family: 'Boarding Fredoka'; src: url('/fonts/fredoka.woff2') format('woff2'); font-weight: 500 700; font-display: swap; }
@font-face { font-family: 'Boarding Nunito'; src: url('/fonts/nunito.woff2') format('woff2'); font-weight: 400 900; font-display: swap; }

/* [lang] keeps the specificity the tokens block was tested with (four attribute selectors). */
:root[lang][data-design][data-palette="boarding"] {
  color-scheme: light;
  /* Palette roles */
  --navy: #0f2147;
  --sky-700: #0f56bd;
  --sky-600: #1766d6;
  --sky-400: #4fa8f5;
  --sky-300: #a9d2f7;
  --sky-200: #cfe6fc;
  --sky-100: #e4f1fe;
  --sky-50: #f2f8ff;
  --sun: #ffc83d;
  --sun-deep: #e3a512;
  --sun-soft: #fff4d1;
  --coral: #ff6b5e;
  --coral-ink: #b83227;
  --coral-soft: #ffe7e3;
  --ticket-shadow: 0 1px 2px #0f21471a, 0 10px 28px -8px #1766d633;
  --lift-shadow: 0 2px 4px #0f21471f, 0 18px 40px -12px #1766d655;
  /* Tokens the site reads */
  --bg: #eaf5ff;
  --panel: #ffffff;
  --panel-2: var(--sky-50);
  --text: #26385a;
  --high: var(--navy);
  --muted: #4a5d7e;
  --faint: #566a8a;
  --border: #d5e6f7;
  --outline: #b5cfea;
  --accent: var(--sky-600);
  --purple: var(--sky-600);
  --mint: #0a7553;
  --amber: #995400;
  --tint: var(--sky-100);
  --hover: #d9ecfe;
  --input: #f7fbff;
  --primary: var(--sun);
  --primary-hover: #ffd766;
  --primary-ink: var(--navy);
  --map-surface: #ffffff;
  --profile-grid: #7f9bb92e;
  --font: 'Boarding Nunito', ui-rounded, 'SF Pro Rounded', 'Nunito', system-ui, sans-serif;
  --display: 'Boarding Fredoka', ui-rounded, 'SF Pro Rounded', 'Nunito', system-ui, sans-serif;
  --mono: var(--font);
  --notch: var(--bg);
  --perf: #9fc3e8;
}

:root[data-design][data-palette="boarding"]:not(#_) {
  /* ---------- Page ---------- */
  & body {
    background:
      radial-gradient(60em 26em at 88% -6em, #fff6d6 0, #fff6d600 60%),
      linear-gradient(180deg, #cfe8ff 0, #e6f3ff 340px, var(--bg) 620px);
    background-color: var(--bg);
    background-repeat: no-repeat;
    font-family: var(--font);
    font-size: 15px;
    color: var(--text);
    font-variant-numeric: lining-nums;
  }
  /* Not on tabindex="-1" targets: the page moves focus to #results and headings for screen readers,
     and those containers shouldn't get a ring (the base design hides it with #results:focus). */
  & :focus-visible:not([tabindex="-1"]) { outline: 3px solid var(--sky-600); outline-offset: 3px; }
  & h1 { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; color: var(--navy); }
  & .kicker { font-family: var(--font); font-weight: 800; letter-spacing: .1em; color: var(--sky-700); }

  /* ---------- Header ---------- */
  & .site-header {
    border: 0;
    background: #ffffffd9;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 #cfe2f5, 0 6px 20px -12px #1766d640;
  }
  & .brand { color: var(--navy); font: 700 23px var(--display); letter-spacing: -.01em; }
  & .brand-flight { color: var(--sky-600); }
  & .brand img { filter: none; border-radius: 10px; box-shadow: 0 3px 0 var(--sun); }
  & nav { gap: 6px; align-items: center; }
  & nav a {
    align-self: center;
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
  }
  & nav a:hover { background: var(--sky-100); color: var(--navy); }
  & nav a[aria-current] { background: var(--navy); color: #fff; }
  & nav a[aria-current]::after { display: none; }
  & .trip-unread { background: var(--sun); color: var(--navy); }
  & .footer { color: var(--muted); }
  & .footer a:hover { color: var(--sky-700); }

  /* ---------- Shared controls ---------- */
  & :is(.panel,.method-panel,.explore-method,.search-panel,dialog) {
    border: 0;
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--ticket-shadow);
  }
  & .primary-button {
    height: 50px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    background: var(--sun);
    color: var(--navy);
    font: 700 16px var(--display);
    letter-spacing: .01em;
    box-shadow: 0 4px 0 var(--sun-deep), 0 10px 18px -8px #e3a51299;
    transition: transform .15s, box-shadow .15s, background .15s;
  }
  & .primary-button:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 5px 0 var(--sun-deep), 0 14px 22px -8px #e3a512aa; }
  & .primary-button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--sun-deep); }
  & .primary-button [data-icon] {
    width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: var(--sun);
  }
  & .primary-button [data-icon] svg { width: 15px; height: 15px; }
  & :is(.small-button,.schedule-choices button,.flight-action-links>*,.trip-card-actions .add-leg,.leg-links a,.live-flight-map,.profile-live-button) {
    border: 1.5px solid var(--sky-200);
    border-radius: 999px;
    background: #fff;
    color: var(--sky-700);
    font-weight: 800;
  }
  & :is(.small-button,.flight-action-links>*,.trip-card-actions .add-leg,.leg-links a,.live-flight-map,.profile-live-button):hover {
    background: var(--sky-100);
    border-color: var(--sky-400);
    color: var(--navy);
  }
  & .small-button svg { color: var(--sky-600); }
  & .icon-button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--sky-100); color: var(--navy); }
  & .icon-button:hover { background: var(--sky-200); }
  & .text-button { color: var(--text); font-weight: 700; border-radius: 999px; }
  & .text-button:hover { color: var(--sky-700); }
  & .text-button svg { color: var(--sky-600); }
  & #return-to-planner { color: var(--sky-700); }
  & .field > span:first-child { color: var(--navy); font-weight: 800; font-size: 13px; }
  & :is(.input-wrap,.field input,.field select), & #trip-import-dialog :is(textarea,input[type=file]) {
    border: 2px solid var(--sky-200);
    border-radius: 16px;
    background: var(--input);
    color: var(--navy);
  }
  & .field input, & .field select { height: 50px; padding: 0 14px; font-weight: 700; }
  & .input-wrap { padding: 0 14px; color: var(--sky-600); }
  & .field .input-wrap input { height: 46px; padding: 0; border: 0; border-radius: 0; background: transparent; outline: 0; }
  & .input-wrap:focus-within, & .field > input:focus, & .field select:focus { border-color: var(--sky-600); background: #fff; outline: 3px solid #1766d633; outline-offset: 0; }
  & .field input::placeholder { color: #5a6e8c; font-weight: 500; }
  & .field input[name=flightNumber], & .field input[name=origin], & .field input[name=destination] { font-family: var(--display); letter-spacing: .04em; font-weight: 600; }
  & .form-message { border: 0; border-radius: 16px; background: var(--coral-soft); color: #8e2219; font-weight: 700; }
  & .form-message.is-good { background: #def5ea; color: #0a5c41; }
  & .form-message.is-question { background: var(--sky-100); color: var(--navy); }
  & .badge { border-radius: 999px; border: 0; padding: 6px 12px; font-weight: 800; }
  & .flight-actions .badge { background: var(--sky-100); color: var(--navy); }
  & .flight-actions .badge i { background: var(--sky-600); width: 7px; height: 7px; }
  & .flight-actions .badge[data-tone=live] { background: #def5ea; color: #0a5c41; }
  & .flight-actions .badge[data-tone=live] i { background: #13a06e; }
  & .schedule-notice {
    border: 0;
    border-radius: 16px;
    background: var(--sun-soft);
    color: #5c3d00;
    font-weight: 600;
  }
  & .schedule-notice button { color: var(--sky-700); }
  & .flight-changes { border: 0; border-radius: 18px; background: #fff; box-shadow: var(--ticket-shadow); }
  & .flight-changes-new { background: var(--coral); color: #fff; border: 0; border-radius: 999px; padding: 1px 8px; }
  & .flight-changes li { border-color: var(--border); }

  /* Ticket perforation: one pseudo element draws the dashed tear line and the two half-circle notches. */
  & :is(.result-heading,.explore-flight,.trip-leg)::before {
    content: '';
    position: absolute;
    z-index: 1;
    top: 0;
    bottom: 0;
    left: calc(var(--tear) - 11px);
    width: 22px;
    pointer-events: none;
    background:
      radial-gradient(circle at 50% 0, var(--notch) 0 10px, #0000 10.5px),
      radial-gradient(circle at 50% 100%, var(--notch) 0 10px, #0000 10.5px),
      repeating-linear-gradient(180deg, var(--perf) 0 6px, #0000 6px 12px) 50% 0 / 2px 100% no-repeat;
  }

  /* ---------- Planner home ---------- */
  & .planner-shell { max-width: 1240px; }
  & body:not(.is-result) .planner-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    margin-top: 26px;
    border: 0;
    border-top: 0;
    border-radius: 32px;
    padding: clamp(28px,4vw,56px);
    background:
      radial-gradient(circle at 92% 14%, #fff7d6 0 46px, #ffe08a 47px 62px, #ffe08a00 63px),
      radial-gradient(70px 24px at 9% 100%, #ffffffd9 98%, #fff0),
      radial-gradient(44px 30px at 13% 96%, #ffffffd9 98%, #fff0),
      radial-gradient(90px 26px at 44% 102%, #ffffff99 98%, #fff0),
      radial-gradient(54px 32px at 49% 97%, #ffffff99 98%, #fff0),
      linear-gradient(160deg, #2570dc 0, #1f6ad6 50%, #1659c4 100%);
    box-shadow: var(--lift-shadow);
  }
  & .planner-hero .intro { padding: 0; }
  & .planner-hero h1 {
    color: #fff;
    font: 600 clamp(44px,5.8vw,84px)/.98 var(--display);
    letter-spacing: -.02em;
    text-shadow: 0 3px 0 #0f56bd66;
  }
  & .planner-hero h1 .profile-headline { color: #fff; }
  & .planner-hero .intro p { margin-top: 14px; color: #fff; font-size: 18px; font-weight: 700; max-width: 30ch; }
  & .planner-hero .search-panel {
    position: relative;
    padding: 22px 22px 16px;
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 20px 40px -18px #0b3a7a99;
  }
  & body:not(.is-result) .planner-hero .search-panel::before {
    content: '';
    position: absolute;
    inset: -1px -1px auto;
    height: 10px;
    border-radius: 26px 26px 0 0;
    background: repeating-linear-gradient(90deg, var(--coral) 0 22px, var(--sun) 22px 44px, var(--sky-600) 44px 66px);
    opacity: .9;
  }
  & .planner-hero #itinerary {
    padding-top: 12px;
    margin-top: 14px;
    border-top: 2px dashed var(--sky-200);
  }
  & #itinerary summary, & .form-options .text-button { min-height: 36px; padding: 4px 12px 4px 8px; border-radius: 999px; background: var(--sky-50); color: var(--navy); font-size: 13px; font-weight: 800; }
  & #itinerary summary:hover, & .form-options .text-button:hover { background: var(--sky-100); }
  & .form-options { gap: 8px; }
  & body:not(.is-result) .form-options { margin-top: 10px; }
  & .form-help { color: var(--muted); }

  & .home-speed { margin-top: 22px; padding: 22px; }
  & :is(.explore-board-header h2,.home-speed h2) { font: 600 25px/1.2 var(--display); letter-spacing: -.01em; color: var(--navy); }
  & .home-speed-header a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px; border-radius: 999px; background: var(--sky-100); color: var(--sky-700); font-weight: 800; }
  & .home-speed-header a:hover { background: var(--sky-200); text-decoration: none; }
  & #home-speed-status { color: var(--muted); }

  & .planner-guide { gap: 16px; margin-top: 18px; }
  & .planner-guide a {
    grid-template-columns: 48px minmax(0,1fr) 40px;
    gap: 14px;
    min-height: 84px;
    padding: 16px 18px;
    border: 0;
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--ticket-shadow);
    transition: transform .15s, box-shadow .15s;
  }
  & .planner-guide a:hover { transform: translateY(-2px); box-shadow: var(--lift-shadow); background: #fff; }
  & .planner-guide a > [data-icon]:first-child { width: 48px; height: 48px; border: 0; border-radius: 16px; background: var(--sun-soft); color: #7a4f00; }
  & .planner-guide a:nth-child(2) > [data-icon]:first-child { background: var(--coral-soft); color: var(--coral-ink); }
  & .planner-guide a > [data-icon]:last-child { width: 40px; height: 40px; border-radius: 50%; background: var(--sky-100); color: var(--sky-700); }
  & .planner-guide strong { font: 600 19px var(--display); color: var(--navy); }
  & .planner-guide small { color: var(--muted); font-size: 14px; }

  & .method-panel { margin-top: 18px; }
  & .method-panel summary { min-height: 56px; padding: 12px 18px; color: var(--navy); }
  & .method-panel summary [data-icon] { color: var(--sky-600); }
  & .method-panel h2 { font: 600 17px var(--display); color: var(--navy); }
  & .method-panel summary::after { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--sky-100); color: var(--sky-700); font-size: 20px; }
  & .method-body { color: var(--text); font-size: 14px; padding: 0 20px 16px; }
  & .method-body a { color: var(--sky-700); }

  /* ---------- Flight tickets (home speed cards, Explore) ---------- */
  & .explore-flight {
    --stub: 184px;
    --tear: calc(100% - var(--stub));
    --notch: #fff;
    position: relative;
    grid-template-columns: minmax(0,1fr) var(--stub);
    gap: 0;
    min-height: 96px;
    padding: 0;
    border: 0;
    border-radius: 20px;
    background: var(--sky-50);
    color: var(--navy);
    transition: transform .15s, box-shadow .15s, background .15s;
  }
  & .explore-flight:hover, & .explore-flight:focus-visible { background: var(--sky-100); transform: translateY(-2px); box-shadow: var(--ticket-shadow); }
  & .explore-flight-info { padding: 14px 18px; gap: 3px; align-content: center; }
  & .explore-flight-info > strong { font: 600 28px/1.05 var(--display); letter-spacing: .01em; }
  & .explore-flight-label {
    justify-self: start;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--sky-600);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
  }
  & .explore-flight-time, & .explore-reading span { color: var(--muted); font-size: 13px; font-weight: 600; }
  & .explore-reading {
    grid-column: 2;
    max-width: none;
    padding: 14px 40px 14px 22px;
    align-content: center;
    justify-items: start;
    text-align: left;
  }
  & .explore-reading strong { color: var(--navy); font: 600 24px/1.05 var(--display); }
  & .explore-open {
    position: absolute;
    top: 10px;
    right: 10px;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 50%;
    background: var(--sun);
    color: var(--navy);
    font-size: 14px;
    font-weight: 900;
  }
  & .home-speed-cards { gap: 16px; }
  & .home-speed .explore-flight { background: var(--sky-50); }
  & .home-speed .explore-flight:hover { background: var(--sky-100); }
  /* Label colour by what the card ranks, not its position: turbulence takes the site's warning colour. */
  & .home-speed .explore-flight[data-board=turbulence] .explore-flight-label { background: var(--amber); }
  & .home-speed .explore-flight[data-board=aurora] .explore-flight-label { background: var(--coral-ink); }

  /* ---------- Forecast: boarding pass header ---------- */
  & .flight-overview { margin-top: 6px; }
  & .result-heading {
    --stub: 236px;
    --pad: 26px;
    --tear: calc(100% - var(--pad) - var(--stub));
    position: relative;
    /* The airport codes' column never shrinks below the codes; the schedule takes the squeeze instead (its
       labels wrap, its times don't). With a shrinkable codes column the codes overflowed under the times. */
    grid-template-columns: auto minmax(0,1fr) var(--stub);
    gap: 14px 28px;
    margin: 24px 0 14px;
    padding: calc(var(--pad) + 8px) var(--pad) var(--pad);
    border-radius: 28px;
    background: linear-gradient(90deg, var(--sky-600), var(--sky-400) var(--tear), var(--sun) var(--tear)) top / 100% 10px no-repeat, #fff;
    box-shadow: var(--lift-shadow);
  }
  & .flight-meta { color: var(--muted); font-size: 14px; font-weight: 700; gap: 10px; }
  & .flight-meta .route-tag {
    padding: 4px 12px;
    border: 0;
    border-radius: 999px;
    background: var(--navy);
    color: #fff;
    font: 600 13px var(--display);
    letter-spacing: .06em;
  }
  & .result-heading h1 {
    gap: 14px;
    margin: 8px 0 2px;
    color: var(--navy);
    font: 600 clamp(48px,5.6vw,82px)/1 var(--display);
    letter-spacing: .01em;
  }
  & .result-heading .flight-arrow {
    width: clamp(70px,8vw,120px);
    height: 34px;
    margin: 0 2px;
    overflow: hidden;
    color: transparent;
    font-size: 0;
    background:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='12' fill='%23ff6b5e'/%3E%3Cpath fill='%23fff' d='M18.6 11.2 13.4 8.4V5.3c0-.8-.6-1.5-1.4-1.5s-1.4.7-1.4 1.5v3.1L5.4 11.2v1.6l5.2-1.4v3.4l-1.6 1.2v1.2L12 16.4l3 .8V16l-1.6-1.2v-3.4l5.2 1.4z' transform='rotate(90 12 12)'/%3E%3C/svg%3E") center / 34px 34px no-repeat,
      repeating-linear-gradient(90deg, var(--sky-300) 0 8px, #0000 8px 14px) center / 100% 3px no-repeat;
  }
  & #route-names { color: var(--muted); font-size: 15px; font-weight: 700; }
  & .flight-schedule { align-self: center; gap: 14px 26px; grid-template-columns: repeat(3, minmax(min-content, max-content)); }
  & .result-heading h1 { white-space: nowrap; }
  & .flight-schedule strong { white-space: nowrap; }
  & .flight-schedule span { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
  & .flight-schedule strong { color: var(--navy); font: 600 21px/1.2 var(--display); }
  /* The notes under each time (scheduled time, takeoff, window) wrap within their column instead of widening
     it: the schedule's columns are sized to their content, and a long note used to squeeze the airport codes
     until they overflowed under the times. */
  & .flight-schedule small { color: var(--muted); font-size: 12px; font-weight: 600; contain: inline-size; }
  & .flight-schedule[data-gate-estimate] #destination-time { color: var(--sky-700); }
  & .flight-actions { align-self: stretch; align-content: center; justify-items: stretch; gap: 10px; padding-left: 22px; }
  & .flight-actions .badge { justify-self: start; white-space: normal; }
  & .flight-action-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  & .flight-action-links > * { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 6px 12px; font-size: 13px; text-align: center; }
  /* "← Back to trip" over the trip's name, left-aligned: a long name wraps inside the button. */
  & .flight-action-links > #back-to-trip:not([hidden]) { grid-column: 1/-1; flex-direction: column; align-items: flex-start; gap: 1px; padding: 8px 16px; border-radius: 18px; text-align: left; }
  & #back-to-trip .back-name { max-width: 100%; color: var(--muted); font-size: 12px; font-weight: 700; white-space: normal; overflow-wrap: anywhere; }
  & .flight-action-links > #change-flight:not(:has(~ :not([hidden]))) { grid-column: 1/-1; }
  & .flight-action-links > :only-child, & .flight-action-links > #change-flight:last-child { grid-column: 1/-1; }
  & .save-flight-link { margin: 0; }
  & #save-flight { background: var(--sun); border-color: var(--sun); color: var(--navy); }
  & #save-flight:hover { background: var(--primary-hover); }

  & .live-flight { border: 0; border-radius: 22px; background: #fff; box-shadow: var(--ticket-shadow), inset 6px 0 0 #13a06e; padding: 14px 18px 14px 24px; }
  & .live-flight[data-state=stale], & .live-flight[data-state=waiting], & .live-flight[data-state=unavailable] { box-shadow: var(--ticket-shadow), inset 6px 0 0 var(--sky-300); }
  & .live-flight-status h2 { color: #0a7553; font-family: var(--font); font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
  & .live-flight-status strong, & .live-flight-times strong { font-family: var(--display); font-weight: 600; color: var(--navy); }
  & .live-flight-times > div { border-color: var(--border); }

  & .forecast-brief { gap: 14px; margin-bottom: 18px; border: 0; background: transparent; }
  & .forecast-brief .brief-card {
    position: relative;
    min-height: 118px;
    padding: 16px 18px;
    gap: 6px;
    border: 2px solid transparent;
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--ticket-shadow);
    transition: transform .15s, border-color .15s;
  }
  & .forecast-brief .brief-card:last-child { border-inline-end: 2px solid transparent; }
  & .forecast-brief .brief-card:hover { transform: translateY(-2px); background: #fff; border-color: var(--sky-200); }
  & .forecast-brief .brief-card[aria-pressed=true] { background: var(--sky-50); border-color: var(--sky-600); }
  & .brief-card .brief-label { color: var(--navy); font-size: 13px; font-weight: 800; gap: 8px; }
  & .brief-label [data-icon] { width: 30px; height: 30px; border-radius: 50%; background: var(--sky-100); }
  & .brief-label svg { width: 16px; height: 16px; color: var(--sky-700); }
  & .brief-card:nth-child(2) .brief-label [data-icon] { background: #e3f0ff; }
  & .brief-card:nth-child(3) .brief-label [data-icon] { background: var(--sun-soft); }
  & .brief-card:nth-child(3) .brief-label svg { color: #7a4f00; }
  & .brief-card:nth-child(4) .brief-label [data-icon] { background: var(--coral-soft); }
  & .brief-card:nth-child(4) .brief-label svg { color: var(--coral-ink); }
  & .brief-card strong { color: var(--navy); font: 600 clamp(17px,1.6vw,22px)/1.15 var(--display); }
  & .brief-card small { color: var(--muted); font-size: 13px; font-weight: 600; }
  & .brief-card:is([data-tone=watch],[data-tone=longer]) strong { color: var(--amber); }
  & .brief-card:is([data-tone=calm],[data-tone=shorter]) strong { color: var(--mint); }
  & .brief-card:is([data-tone=pending],[data-tone=muted]) strong { color: var(--muted); }

  /* ---------- Flight profile ---------- */
  & #profile-view {
    --profile-live-ink: var(--navy);
    margin: 0 0 18px;
    padding: 20px 22px 16px;
    border: 0;
    border-radius: 26px;
    background: #fff;
    box-shadow: var(--ticket-shadow);
  }
  & .route-view-heading h2 { font: 600 24px/1.1 var(--display); color: var(--navy); }
  & #profile-clock { font-family: var(--font); font-weight: 800; color: var(--navy); padding: 4px 12px; border-radius: 999px; background: var(--sky-100); }
  & .profile-live-button { min-height: 32px; padding: 3px 12px; }
  & .profile-lane { border-top: 0; padding-block: 4px; }
  & .profile-lane:last-child { border-bottom: 0; }
  & .profile-layer { padding: 8px 8px 8px 0; color: var(--navy); font: 600 15px var(--display); }
  & .profile-layer:hover { color: var(--sky-700); text-decoration: none; }
  & .profile-plot {
    min-height: 38px;
    border: 0;
    border-radius: 12px;
    overflow: hidden;
    background:
      repeating-linear-gradient(90deg, #0000 0 calc(25% - 1px), #ffffff 0 25%),
      var(--sky-50);
  }
  & .profile-plot .route-view-band { top: 5px; bottom: 5px; border-block: 0; }
  & .profile-plot .route-view-band:not(.profile-advisory-band) { border-inline-end: 2px solid #fff; }
  & .profile-plot::after { inset-block: 0; border-left: 3px solid var(--coral); }
  & .profile-reading { font: 800 13px/1.3 var(--font); color: var(--navy); font-variant-numeric: tabular-nums; }
  & .profile-key { gap: 4px 12px; color: var(--muted); font-size: 12px; font-weight: 700; }
  & .profile-key li::before { width: 14px; height: 10px; border: 0; border-radius: 5px; }
  & .profile-key .is-active { color: var(--navy); font-weight: 900; }
  & .profile-axis { font: 700 11px/1.3 var(--font); color: var(--muted); }
  & .profile-scrub { color: var(--muted); font-weight: 700; }
  & .profile-scrub input { appearance: none; height: 26px; background: transparent; cursor: ew-resize; }
  & .profile-scrub input::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: var(--sky-200); }
  & .profile-scrub input::-moz-range-track { height: 8px; border-radius: 999px; background: var(--sky-200); }
  & .profile-scrub input::-webkit-slider-thumb { appearance: none; width: 22px; height: 22px; margin-top: -7px; border: 3px solid #fff; border-radius: 50%; background: var(--coral); box-shadow: 0 2px 6px #0f214766; }
  & .profile-scrub input::-moz-range-thumb { width: 18px; height: 18px; border: 3px solid #fff; border-radius: 50%; background: var(--coral); box-shadow: 0 2px 6px #0f214766; }
  & .profile-lane { --advisory-ink: #6a2fb0; --advisory-fill: #ece2fb; }
  & .profile-plot .profile-advisory-band { border-radius: 6px; }
  & #profile-live-track::before { filter: drop-shadow(1px 0 #fff) drop-shadow(-1px 0 #fff); }

  /* ---------- Route map ---------- */
  & .route-panel { overflow: hidden; padding-bottom: 6px; }
  & .map-heading { padding: 20px 22px 8px; }
  & .map-heading h2 { font: 600 24px/1.1 var(--display); color: var(--navy); letter-spacing: -.01em; }
  & #route-basis { color: var(--muted); font-weight: 700; font-size: 13px; padding: 4px 12px; border-radius: 999px; background: var(--sky-50); }
  & .map-layers { gap: 8px; padding: 6px 22px 16px; }
  & .map-layers button {
    min-height: 40px;
    padding: 6px 16px;
    border: 1.5px solid var(--sky-200);
    border-radius: 999px;
    background: #fff;
    color: var(--navy);
    font-size: 14px;
    font-weight: 800;
  }
  & .map-layers button:hover { background: var(--sky-50); border-color: var(--sky-400); color: var(--navy); }
  & .map-layers button[aria-pressed=true] { background: var(--sky-600); border-color: var(--sky-600); color: #fff; box-shadow: 0 3px 0 var(--sky-700); }
  & .map-workspace { border: 0; margin: 0 14px; }
  & .map-box { border: 0; border-radius: 20px; overflow: hidden; background: #cfe8fb; box-shadow: inset 0 0 0 1px #b8d6f0; }
  & .map-controls { border: 0; border-radius: 18px; overflow: hidden; gap: 0; box-shadow: 0 6px 16px -6px #0f214766; }
  & .map-controls button { width: 38px; height: 38px; border: 0; border-bottom: 1px solid var(--sky-100); background: #fff; color: var(--navy); font-weight: 800; }
  & .map-controls button:hover, & #zoom-mainland[aria-pressed=true] { background: var(--sky-100); color: var(--navy); }
  & .map-box .map-selection {
    padding: 7px 14px;
    border: 0;
    border-radius: 999px;
    background: var(--navy);
    color: #fff;
    box-shadow: 0 8px 18px -8px #0f2147aa;
  }
  & .map-box .map-selection strong { font-family: var(--display); font-weight: 600; }
  & .map-box .map-selection span { color: #e4efff; border-left-color: #ffffff4d; }
  & #map-point-estimate[data-band]::before { border-color: #fff; border-radius: 3px; }
  & .map-aircraft-readout { border: 0; border-radius: 999px; background: #0a7553; color: #fff; padding: 4px 10px; }
  & .map-wheel-hint { border-radius: 999px; background: #0f2147e6; color: #fff; }
  & .map-weather-markers button, & .map-weather-events button { --event-color: #6a2fb0; --event-bg: #fff; color: var(--navy); background: var(--event-bg); border: 2px solid var(--event-color); border-radius: 999px; }
  & .map-weather-markers button[data-kind=report], & .map-weather-events button[data-kind=report] { --event-color: var(--sky-600); --event-bg: #fff; color: var(--navy); }
  & .map-weather-markers button { box-shadow: 0 4px 10px -4px #0f214780; }
  & .map-weather-markers button[aria-pressed=true], & .map-weather-events button[aria-pressed=true] { background: var(--event-color); color: #fff; }
  & .map-weather-events button::before { background: var(--event-color); }
  & .map-weather-events button span { opacity: 1; color: inherit; }

  & :is(.map-scrubber,.map-key,.map-context-note,.map-weather-events,.map-storm-source,.turbulence-evidence) { border: 0; background: transparent; color: var(--text); }
  & .map-scrubber { gap: 14px; padding: 14px 4px 6px; }
  & .map-scrubber .small-button { min-height: 44px; min-width: 86px; padding: 6px 16px; border: 0; background: var(--sun); color: var(--navy); box-shadow: 0 3px 0 var(--sun-deep); font-size: 14px; }
  & .map-scrubber .small-button:hover { background: var(--primary-hover); }
  & .map-scrubber .small-button svg { color: var(--navy); }
  & .map-scrubber-track label { color: var(--navy); font-weight: 800; font-size: 13px; }
  & #map-clock { color: var(--sky-700); font-weight: 900; font-size: 13px; }
  & .chart-axis { color: var(--muted); font-weight: 700; font-size: 11px; }
  & #route-slider { --track-color: var(--sky-200); --track-window: #6fd3a6; height: 26px; }
  & #route-slider::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; }
  & #route-slider::-moz-range-track { height: 8px; border-radius: 999px; }
  & #route-slider::-webkit-slider-thumb { width: 22px; height: 22px; margin-top: -7px; background: var(--coral); border: 3px solid #fff; box-shadow: 0 2px 6px #0f214766; }
  & #route-slider::-moz-range-thumb { width: 18px; height: 18px; background: var(--coral); border: 3px solid #fff; box-shadow: 0 2px 6px #0f214766; }
  & .map-key { margin: 6px 0 4px; padding: 12px 16px; border-radius: 18px; background: var(--sky-50); color: var(--text); font-size: 12px; }
  & .map-scale strong { color: var(--navy); font: 600 14px var(--display); }
  & .map-bands { gap: 4px; }
  & .map-bands > li { font-size: 12px; font-weight: 700; color: var(--text); }
  & .map-bands > li::before { height: 12px; border: 0; border-radius: 999px; }
  & .map-bands > li.is-active { color: var(--navy); font-weight: 900; }
  & .map-bands small { color: var(--muted); font-size: 11px; }
  & #weather-layer-note { color: var(--muted); }
  /* Route-line swatches match the map: the line colour (darkSky, unscored, viewingWindow in profile-palettes.js) on the navy halo. */
  & .key-line { border-top-color: #b49bff; box-shadow: 0 0 0 2px #14284b; }
  & .key-dashed { border-top-color: #8292a6; }
  & .key-window { border-top-color: var(--sun); }
  & .key-live { border-color: var(--navy); background: #8ef0c6; }
  & .map-context-note { padding: 8px 16px; font-size: 13px; }
  & .map-context-note strong { color: var(--navy); font-size: 13px; }
  & .map-weather-events { padding: 6px 4px 10px; gap: 8px; }
  & .map-storm-source { margin: 4px 0; padding: 10px 16px; border-radius: 16px; background: #f1eafc; color: #3f1f73; font-size: 13px; }
  & .turbulence-evidence { padding: 6px 0 10px; font-size: 13px; }
  & .turbulence-evidence :is(li,li[data-evidence=report],p) { border: 0; border-radius: 14px; background: var(--sky-50); color: var(--text); padding: 9px 12px; }
  & .turbulence-evidence li { box-shadow: inset 4px 0 0 #6a2fb0; }
  & .turbulence-evidence li[data-evidence=report] { box-shadow: inset 4px 0 0 var(--sky-600); }
  & .turbulence-evidence strong { color: var(--navy); }

  & .route-weather { margin: 8px 0 12px; padding: 18px; border: 0; border-radius: 20px; background: var(--sky-50); }
  & .route-weather-heading h3 { font: 600 20px var(--display); color: var(--navy); }
  & #selected-point-time { justify-self: start; padding: 3px 12px; border-radius: 999px; background: var(--navy); color: #fff; font-weight: 800; font-size: 13px; }
  & .weather-timing { color: var(--muted); font-weight: 700; }
  & .route-weather .weather-values { gap: 10px; }
  & .route-weather .weather-values > div { padding: 12px 14px; border: 0; border-radius: 16px; background: #fff; box-shadow: 0 1px 2px #0f214712; }
  & .weather-values dt { color: var(--muted); font-size: 12px; font-weight: 800; }
  & .weather-values dd { color: var(--navy); font: 600 16px/1.3 var(--display); margin-top: 4px; }
  & .weather-values small { color: var(--muted); font: 600 12px var(--font); }
  & .route-weather .weather-ground { background: var(--sun-soft) !important; }
  & :is(.weather-notes,#route-weather-status,.weather-attribution) { color: var(--muted); font-size: 13px; }

  /* ---------- Aurora ---------- */
  & .aurora-section { margin-top: 18px; }
  & .aurora-section > summary { min-height: 60px; padding: 14px 20px; color: var(--sky-600); }
  & .aurora-section > summary h2 { font: 600 20px var(--display); color: var(--navy); }
  & .aurora-section > summary small { color: var(--muted); font-weight: 700; font-size: 13px; }
  & .aurora-section > summary::after { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--sky-100); color: var(--sky-700); }
  & .aurora-panels { gap: 14px; padding: 0 14px 14px; }
  & .aurora-panels .panel { background: var(--sky-50); box-shadow: none; border-radius: 20px; }
  & .panel-heading h3 { font: 600 18px var(--display); color: var(--navy); }
  & .panel-heading p { color: var(--muted); }
  & :is(.icon-tile,.fact-icon) { border: 0; border-radius: 14px; background: #fff; color: var(--sky-700) !important; }
  & .icon-tile.mint { background: #def5ea; color: #0a7553 !important; }
  & .icon-tile.amber { background: var(--sun-soft); color: #7a4f00 !important; }
  & .storm-tag { border: 0; border-radius: 999px; background: var(--coral-soft); color: #8e2219; }
  & .route-window, & .route-window[data-tone] { border: 0; border-radius: 16px; background: #def5ea; color: #0a5c41; }
  & .route-window[data-tone=conditional] { background: var(--sun-soft); color: #5c3d00; }
  & .route-window[data-tone=quiet] { background: #fff; color: var(--navy); }
  & .window-times small { color: inherit; }
  & .viewing-art { border: 0; border-radius: 18px; }
  & .viewing-art .kicker { color: #d3f6e5; }
  & .viewing-fact { border-color: var(--border); }
  & .viewing-fact span { color: var(--muted); font-weight: 700; }
  & .viewing-fact strong { color: var(--navy); font-weight: 800; }
  & .storm-summary > span { color: var(--coral-ink); font-family: var(--display); }
  & .storm-summary strong { color: var(--navy); }
  & :is(.storm-note,.kp-details) { color: var(--muted); font-size: 13px; }
  & .kp-details summary { color: var(--sky-700); font-weight: 700; }
  & :is(.kp-details th,.kp-details td) { border-color: var(--border); }
  & :is(.appearance,.replay-evidence) { background: transparent; border-color: var(--border); color: var(--text); }
  & .appearance h4 { color: var(--navy); font-family: var(--display); font-weight: 600; }
  & .replay-evidence a { color: var(--sky-700); }

  /* ---------- Dialogs ---------- */
  & dialog { padding: 26px; border-radius: 28px; box-shadow: 0 30px 80px -20px #0f2147aa; }
  & dialog::backdrop { background: #0f214773; backdrop-filter: blur(6px); }
  & .dialog-heading h2 { font: 600 27px/1.15 var(--display); color: var(--navy); letter-spacing: -.01em; }
  & dialog p { color: var(--muted); font-size: 14px; }

  /* ---------- Explore ---------- */
  & .explore-shell { --board-line: var(--border); --board-inset: var(--sky-50); }
  & :is(.explore-intro,.trips-intro) h1 { font-size: clamp(40px,5.4vw,60px); }
  & :is(.explore-intro,.trips-intro) .intro-copy > p { color: var(--text); font-size: 17px; font-weight: 600; }
  & .explore-live { padding: 22px; border-radius: 28px; background: #fff; box-shadow: var(--ticket-shadow); }
  & .explore-loading { color: var(--muted); font-weight: 700; box-shadow: none; background: var(--sky-50); border-radius: 18px; }
  & .explore-picker { gap: 6px; padding: 6px; border: 0; border-radius: 999px; background: #fff; box-shadow: var(--ticket-shadow); }
  & .explore-picker button { min-height: 42px; padding: 6px 20px; border: 0; border-radius: 999px; color: var(--navy); font-size: 14px; font-weight: 800; }
  & .explore-picker button:hover { background: var(--sky-100); color: var(--navy); border: 0; }
  & .explore-picker button[aria-pressed=true] { background: var(--sky-600); color: #fff; box-shadow: 0 3px 0 var(--sky-700); }
  & .explore-results { padding: 22px; border: 0; border-radius: 28px; background: #fff; box-shadow: var(--ticket-shadow); }
  & .explore-board-header p, & .home-speed p { color: var(--muted); font-size: 14px; }
  & :is(#explore-coverage,#explore-live-checked) { padding: 4px 12px; border-radius: 999px; background: var(--sky-50); color: var(--muted); font-weight: 700; }
  & .explore-group h3 { color: var(--navy); font: 600 18px var(--display); }
  & .explore-flight-list { gap: 12px; }
  & .explore-live-list .explore-reading span { white-space: normal; }
  @media (min-width: 900px) {
    & .explore-boards:not(.is-split) .explore-flight-list { grid-template-columns: repeat(2, minmax(0,1fr)); }
  }
  /* The field input height (50px) would leave the picker's button and name at the top: even padding instead. */
  & #trip-import-dialog input[type=file] { height: auto; padding: 7px 10px; }
  & #trip-import-dialog input[type=file]::file-selector-button { margin-right: 12px; padding: 6px 14px; border: 0; border-radius: 999px; background: var(--sky-600); color: #fff; font: 800 13px var(--font); cursor: pointer; }
  & .explore-method { margin-top: 18px; padding: 6px 20px 10px; color: var(--text); font-size: 14px; }
  & .explore-method summary { color: var(--navy); font-weight: 800; }
  & .explore-method summary::before { border-color: var(--sky-600); }

  /* ---------- My trips ---------- */
  & .trips-shell { --trip-line: var(--border); --trip-inset: var(--sky-50); max-width: 900px; }
  & .trip-import-entry {
    padding: 24px 26px;
    margin-bottom: 14px;
    background:
      radial-gradient(circle at 100% 0, var(--sun-soft) 0 90px, #fff0 91px),
      #fff;
  }
  & .trip-import-entry h2 { font: 600 22px/1.2 var(--display); color: var(--navy); }
  & .trip-import-entry p { color: var(--muted); font-size: 14px; font-weight: 600; }
  & .trip-import-entry a { color: var(--sky-700); font-weight: 800; }
  & .trip-create { padding: 18px 22px; }
  & .trip-create .small-button { height: 50px; padding-inline: 20px; }
  & :is(#trip-message,#trip-mail-message) { margin-bottom: 10px; }
  & .trip-empty { border: 2px dashed var(--sky-300); background: #ffffffb3; box-shadow: none; }
  & .trip-empty h2 { font: 700 21px var(--display); color: var(--navy); }
  & .sample-trip-option p { color: var(--muted); font-size: 13px; }
  & .trip-list { gap: 22px; margin-top: 20px; }
  & .trip-card { overflow: visible; border: 0; border-top: 0; background: #fff; }
  & .trip-card-header { min-height: 76px; padding: 18px 22px; border-radius: 24px; }
  & .trip-card-header:hover, & .trip-card[open] .trip-card-header { background: transparent; }
  & .trip-card[open] .trip-card-header { border-radius: 24px 24px 0 0; }
  & .trip-card-header::after { width: 36px; height: 36px; margin: 0; border: 0; border-radius: 50%; transform: none; background: var(--sky-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f56bd' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / 18px no-repeat; }
  & .trip-card[open] .trip-card-header::after { transform: rotate(180deg); margin: 0; }
  & .trip-name { font: 600 25px/1.15 var(--display); color: var(--navy); letter-spacing: -.01em; }
  & .trip-dates { color: var(--muted); font-size: 14px; font-weight: 700; }
  & .trip-card-body { padding-bottom: 6px; }
  & .trip-card-body > .trip-card-actions { padding: 0 22px 12px; border: 0; justify-content: start; }
  & .trip-card-actions .add-leg { min-height: 38px; padding: 5px 16px; }
  & .trip-card-actions .add-leg::before { content: '+'; margin-right: 6px; font-weight: 900; }
  & .trip-card-actions .text-button { padding-inline: 10px; }
  & .trip-card-actions .remove-trip:hover, & .leg-links .remove-leg:hover { color: var(--coral-ink); }
  & .sample-trip-note { padding: 0 22px 10px; color: var(--muted); font-weight: 600; }
  & .trip-flight-changes { margin: 0 16px 10px; }

  & .trip-legs { gap: 0; margin: 0 12px 12px; padding: 14px; border-radius: 20px; background: var(--sky-50); }
  & .trip-leg {
    --stub: 212px;
    --tear: calc(100% - var(--stub));
    --notch: var(--sky-50);
    position: relative;
    grid-template-columns: minmax(0,1fr) var(--stub);
    gap: 0;
    align-items: stretch;
    padding: 0;
    border: 0;
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--ticket-shadow);
  }
  & .trip-leg > .trip-flight-link { grid-column: 1; grid-row: 1; padding: 16px 20px 12px; border-radius: 20px 0 0 20px; }
  & .trip-leg > .leg-statuses { grid-column: 1; grid-row: 2; padding: 0 20px 14px; }
  & .trip-leg > .leg-live { grid-column: 1; grid-row: 3; margin: 0 20px 14px; }
  & .trip-leg > .leg-links { grid-column: 2; grid-row: 1 / span 3; align-content: center; justify-content: center; padding: 12px 16px 12px 24px; border-radius: 0 20px 20px 0; background: linear-gradient(135deg, #fffaf0, #fff4d6); }
  & .leg-links .trip-option-actions { justify-content: center; gap: 4px 6px; }
  & .trip-leg .leg-links a { min-height: 40px; padding: 5px 18px; width: 100%; justify-content: center; border: 0; background: var(--sun); color: var(--navy); box-shadow: 0 3px 0 var(--sun-deep); }
  & .trip-leg .leg-links a:hover { background: var(--primary-hover); color: var(--navy); }
  & .leg-links .text-button { min-height: 34px; padding-inline: 6px; font-size: 13px; color: #5c3d00; }
  & .leg-links .text-button:hover { color: var(--navy); text-decoration: underline; }
  & .leg-heading { gap: 6px 12px; }
  & .leg-heading strong { font: 600 30px/1.05 var(--display); color: var(--navy); letter-spacing: .01em; }
  & .leg-heading span { padding: 3px 10px; border-radius: 999px; background: var(--navy); color: #fff; font: 600 12px var(--display); letter-spacing: .06em; }
  & .leg-schedule { margin-top: 8px; color: var(--text); font-size: 14px; font-weight: 700; }
  & .leg-schedule small { color: var(--muted); font-weight: 600; font-size: 12px; }
  & .leg-statuses { gap: 6px; }
  & .leg-status { padding: 4px 11px; border: 0; border-radius: 999px; background: var(--sky-50); color: var(--text); font-size: 12px; font-weight: 700; }
  & .leg-status[data-tone=ready] { background: #def5ea; color: #0a5c41; }
  & .leg-status[data-tone=new] { background: var(--sun); color: var(--navy); font-weight: 800; }
  & .leg-live { border: 0; border-radius: 14px; background: var(--sky-50); box-shadow: inset 4px 0 0 var(--sky-300); color: var(--muted); font-size: 13px; }
  & .leg-live:is([data-phase=airborne],[data-phase=landed]) { box-shadow: inset 4px 0 0 var(--sky-600); }
  & .leg-live[data-departure-late] { box-shadow: inset 4px 0 0 var(--sun-deep); }
  & .leg-live-phase, & .leg-live-time strong { color: var(--navy); font-weight: 800; }

  /* Connection: a layover coupon hung between two tickets on a dotted itinerary line. */
  & .trip-connection {
    --risk-low: #0a7553;
    --risk-moderate: #995400;
    --risk-high: #c0262d;
    --risk-low-soft: #def5ea;
    --risk-moderate-soft: #fff1cc;
    --risk-high-soft: #ffe3e0;
    --risk-soft: var(--sky-100);
    position: relative;
    margin: 0 0 0 26px;
    padding: 30px 0 30px 30px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 14px;
  }
  & .trip-connection[data-risk="low"] { --risk-soft: var(--risk-low-soft); }
  & .trip-connection[data-risk="moderate"] { --risk-soft: var(--risk-moderate-soft); }
  & .trip-connection[data-risk="high"] { --risk-soft: var(--risk-high-soft); }
  & .trip-connection::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    border-left: 4px dotted var(--sky-300);
  }
  & .trip-connection::after {
    content: '';
    position: absolute;
    left: -9px;
    top: 52px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--risk) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E") center / 16px no-repeat;
    box-shadow: 0 0 0 4px var(--sky-50);
  }
  & .trip-connection > * { position: relative; }
  & .trip-connection > :first-child { padding: 14px 18px 6px; margin: 0; border-radius: 20px 20px 0 0; }
  & .trip-connection > * { padding-inline: 18px; margin: 0; background: #fff; }
  & .trip-connection > .connection-summary { padding-block: 4px 6px; }
  & .trip-connection > :last-child { padding-bottom: 16px; border-radius: 0 0 20px 20px; }
  & .trip-connection > :is(.connection-plan,.connection-slack,.connection-times,.connection-onward,.connection-disruption,.connection-note) { padding-block: 2px; }
  & .trip-connection > .connection-buffers { padding-block: 6px 10px; }
  & .trip-connection > .connection-advisories { margin: 6px 18px 0; padding: 6px 12px; border: 0; border-radius: 12px; background: var(--sun-soft); color: #5c3d00; }
  & .trip-connection { filter: drop-shadow(0 6px 12px #1766d61f); }
  & .connection-header strong { color: var(--navy); font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
  & .connection-actions { gap: 4px; }
  & .connection-edit, & .connection-backup-button { min-height: 34px; padding-inline: 12px; border-radius: 999px; font-size: 13px; }
  & .connection-edit { color: var(--sky-700); }
  & .connection-backup-button { background: var(--sky-100); color: var(--sky-700); }
  & .connection-backup-button:hover { background: var(--sky-200); color: var(--navy); }
  & .connection-summary { color: var(--navy); font: 600 19px/1.35 var(--display); }
  & .connection-summary strong { color: var(--risk); font: 700 34px/1.05 var(--display); }
  & .connection-level {
    margin-right: 6px;
    padding: 4px 14px 4px 10px;
    border: 0;
    border-radius: 999px;
    background: var(--risk);
    color: #fff;
    font: 600 14px/1.4 var(--display);
    letter-spacing: .02em;
    vertical-align: 6px;
  }
  & .trip-connection[data-risk="moderate"] .connection-level { background: var(--sun); color: var(--navy); }
  & .trip-connection[data-risk="moderate"] .connection-level::before { background: var(--navy); }
  & .trip-leg + .trip-leg { margin-top: 14px; }
  & .connection-level::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: #fff; vertical-align: 1px; }
  & .connection-buffers-label { color: var(--muted); font-weight: 700; }
  & .connection-buffers ul { gap: 6px; }
  & .connection-buffers li { padding: 3px 12px; border: 0; border-radius: 999px; background: var(--sky-50); color: var(--text); font-weight: 600; }
  & .connection-buffers li strong { color: var(--navy); }
  & .connection-buffers li.is-current { background: var(--risk-soft); box-shadow: inset 0 0 0 2px var(--risk); }
  & .connection-slack, & .connection-onward { color: var(--text); font-weight: 700; }
  & .connection-details summary { min-height: 32px; display: inline-flex; align-items: center; gap: 6px; padding: 2px 12px; margin-top: 4px; border-radius: 999px; background: var(--sky-50); color: var(--sky-700); font-weight: 800; }
  & .connection-details summary::before { content: 'i'; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--sky-600); color: #fff; font: 800 11px/1 var(--font); }
  & .connection-details[open] summary { background: var(--sky-100); }
  & .connection-details[open] { padding-top: 4px; }
  & .connection-details p { color: var(--text); }
  & .connection-details > p:first-of-type { padding: 10px 12px; margin-top: 8px; border-radius: 14px; background: var(--sky-50); }
  & .connection-sources a { color: var(--sky-700); font-weight: 700; }

  /* Trip dialogs */
  & :is(#leg-dialog,#rename-dialog) { border: 0; background: #fff; }
  & .import-leg { border: 0; border-radius: 18px; background: var(--sky-50); }
  & .import-leg-header label { color: var(--navy); }
  & .import-notes { color: var(--muted); }
  & #trip-import-dialog .import-file { color: var(--navy); }
  & #trip-import-dialog textarea { min-height: 120px; }
  & .import-actions { padding-top: 6px; border-top: 2px dashed var(--sky-200); padding-top: 14px; }
  & #itinerary-example { color: var(--sky-700); }
  & .leg-preview { border: 0; border-radius: 16px; background: #def5ea; color: #0a5c41; }
  & .leg-preview strong { color: #0a5c41; }
  & #connection-backup-flights li { border: 0; border-radius: 16px; background: var(--sky-50); }
  & .connection-backup-links a { color: var(--sky-700); }

  /* ---------- Mid widths ---------- */
  @media (max-width: 1120px) {
    & .result-heading { --stub: 240px; grid-template-columns: minmax(0,1fr) var(--stub); }
    & .flight-actions { grid-column: 2; grid-row: 1 / span 2; }
    & .flight-schedule { grid-column: 1; grid-row: 2; padding: 4px 0 0; }
  }

  /* ---------- Phone ---------- */
  @media (max-width: 740px) {
    & body { font-size: 14px; }
    & nav a { padding: 0 11px; min-height: 36px; font-size: 13px; }
    & .brand { font-size: 20px; }
    & body:not(.is-result) .planner-hero {
      margin-top: 14px;
      padding: 20px 14px 14px;
      border: 0;
      border-radius: 26px;
      background:
        radial-gradient(circle at 92% 10%, #fff7d6 0 22px, #ffe08a 23px 30px, #ffe08a00 31px),
        linear-gradient(160deg, #2570dc 0, #1f6ad6 55%, #1659c4 100%);
    }
    & .planner-hero h1 { font: 700 30px/1.1 var(--display); padding: 0 4px 12px; color: #fff; }
    & .planner-hero h1 > .mobile-planner-headline { color: #fff; }
    & .planner-hero .search-panel { padding: 18px 14px 12px; border-radius: 22px; }
    & .mobile-trip-start { border: 0; border-radius: 24px; background: #fff; box-shadow: var(--ticket-shadow); overflow: hidden; }
    & .mobile-trip-start h2 { font: 700 22px var(--display); color: var(--navy); }
    & .mobile-trip-start header a { color: var(--sky-700); }
    & .mobile-trip-row { border-color: var(--border); }
    & .mobile-trip-name strong { font-family: var(--display); font-weight: 600; color: var(--navy); }
    & .mobile-next-flight { border: 0; border-radius: 50%; background: var(--sun); color: var(--navy); }
    & .home-speed { padding: 16px 12px; }
    & .explore-flight { --stub: 140px; min-height: 92px; }
    & .explore-flight-info { padding: 12px 12px 12px 14px; }
    & .explore-flight-info > strong { font-size: 22px; }
    & .explore-reading { padding: 26px 10px 12px 18px; max-width: none; }
    & .explore-live-list .explore-reading span { white-space: normal; }
    & .explore-reading strong { font-size: 21px; }
    & .explore-flight-time, & .explore-reading span { font-size: 12px; }
    & .explore-open { width: 24px; height: 24px; top: 8px; right: 8px; font-size: 12px; }
    & .planner-guide a { min-height: 74px; padding: 12px 14px; grid-template-columns: 42px minmax(0,1fr) 34px; }
    & .planner-guide a > [data-icon]:first-child { width: 42px; height: 42px; }
    & .planner-guide a > [data-icon]:last-child { width: 34px; height: 34px; }

    /* Forecast ticket stacks: actions on top, codes, then a horizontal tear line above the times. */
    & #results .flight-overview-route { margin: 14px 0 10px; padding: 0; border: 0; background: transparent; }
    & #results .result-heading { --pad: 16px; display: grid; grid-template-columns: minmax(0,1fr); gap: 10px; margin: 0 0 10px; padding: 24px 16px 0; border-radius: 24px; }
    & #results .result-heading::before { display: none; }
    & #results .flight-actions { grid-column: 1; grid-row: 1; padding: 0; }
    & #results .flight-action-links { display: flex; gap: 6px; }
    & #results .flight-action-links > * { min-height: 40px; padding: 6px 14px; font-size: 13px; flex: none; }
    & #results .flight-action-links #back-to-trip { flex: 0 1 auto; color: var(--sky-700); }
    & #results #back-to-trip .back-name { display: none; }
    & #results .flight-identity h1 { font-size: clamp(42px,13vw,58px); gap: 8px; }
    & .result-heading .flight-arrow { width: 64px; height: 28px; background-size: 28px 28px, 100% 3px; }
    & #results .flight-schedule {
      position: relative;
      grid-column: 1;
      grid-row: auto;
      margin: 6px -16px 0;
      padding: 14px 16px 16px;
      border: 0;
      border-radius: 0 0 24px 24px;
      background: linear-gradient(135deg, #fffaf0, #fff4d6);
    }
    & #results .flight-schedule::before {
      content: '';
      position: absolute;
      left: 0;
      right: 0;
      top: -11px;
      height: 22px;
      pointer-events: none;
      background:
        radial-gradient(circle at 0 50%, var(--bg) 0 10px, #0000 10.5px),
        radial-gradient(circle at 100% 50%, var(--bg) 0 10px, #0000 10.5px),
        repeating-linear-gradient(90deg, var(--perf) 0 6px, #0000 6px 12px) 0 50% / 100% 2px no-repeat;
      background-origin: border-box;
    }
    /* Two equal columns that may shrink: a long arrival ("12:31 AM PDT · May 11") wraps its date onto a
       second line instead of pushing the card, and the page, past the screen edge. */
    & #results .flight-schedule { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    & #results .flight-schedule > div { min-width: 0; padding: 0 8px 0 0; }
    & #results .flight-schedule strong { white-space: normal; }
    & #results .flight-schedule .schedule-arrival { border: 0; padding-inline: 12px 0; }
    & #results .flight-schedule strong { font-size: 20px; }
    & #results .flight-schedule .schedule-duration { border-top: 1.5px dashed #ecd39a; padding-top: 10px; margin-top: 8px; }
    & #results .flight-schedule .schedule-duration strong { font-size: 15px; }
    & #results .flight-schedule span { font-size: 11px; }
    & #results .schedule-notice { margin: 0 0 10px; padding: 10px 14px; border: 0; }
    & #results .live-flight { padding: 12px 14px 12px 20px; }

    & .aurora-section > summary h2 { font-size: 18px; white-space: nowrap; }
    & .aurora-section > summary small { font-size: 12px; text-align: right; }
    & .mobile-forecast-title { margin: 16px 2px 8px; font: 700 22px var(--display); color: var(--navy); }
    & #forecast-brief { gap: 10px; background: transparent; border: 0; }
    & #forecast-brief .brief-card { min-height: 104px; padding: 12px; border: 2px solid transparent; border-radius: 20px; }
    & #forecast-brief .brief-card:nth-child(odd), & #forecast-brief .brief-card:nth-child(-n+2) { border: 2px solid transparent; }
    & #forecast-brief .brief-card[aria-pressed=true] { border-color: var(--sky-600); }
    & #forecast-brief .brief-card .brief-label { color: var(--navy); font-size: 12px; }
    & #forecast-brief .brief-card strong { font-size: 17px; }
    & #forecast-brief .brief-card small { font-size: 12px; }
    & .brief-label [data-icon] { width: 26px; height: 26px; }

    & #profile-view { --profile-label: 0px; --profile-value: 0px; padding: 16px 14px 12px; border-radius: 22px; }
    & #profile-view .profile-lane { padding-block: 6px 2px; }
    & #profile-view .profile-layer { font-size: 15px; }
    & #profile-view .profile-reading { font-size: 13px; }
    & #profile-view .profile-key { font-size: 12px; }

    & .map-heading { padding: 16px 14px 6px; flex-wrap: wrap; }
    & .map-layers { padding: 4px 14px 12px; gap: 6px; }
    & #map-layers button { min-height: 40px; padding-inline: 13px; font-size: 13px; }
    & .map-workspace { margin: 0 8px; }
    & .map-box { border-radius: 18px; }
    & .map-controls button { width: 42px; height: 42px; }
    & .map-scrubber { padding-inline: 2px; }
    & .map-key { padding: 12px; }
    & .route-weather { padding: 14px 12px; }
    & .route-weather .weather-values { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
    & .route-weather .weather-values > div { padding: 10px 11px; }
    & .weather-values dd { font-size: 15px; }

    & .explore-live, & .explore-results { padding: 16px 12px; border-radius: 24px; }
    & .explore-picker { border-radius: 24px; }
    & .explore-picker button { border-radius: 18px; }

    & .trips-intro h1 { font-size: 38px; }
    & .trip-tools .trip-import-entry { padding: 0; margin: 0; background: transparent; box-shadow: none; }
    & .trip-tools .trip-import-entry .primary-button { width: 100%; padding-inline: 14px; justify-content: center; }
    & .mobile-new-trip { font-size: 15px; background: #fff; box-shadow: var(--ticket-shadow); border: 0; }
    & .mobile-new-trip { border-radius: 999px; min-height: 50px; }
    & .trip-tools .trip-import-entry .primary-button { min-height: 50px; }
    & .trip-card-header { padding: 14px 64px 14px 16px; }
    & .trip-card-entry > .trip-card-actions { top: 18px; right: 14px; }
    & .trip-name { font-size: 22px; }
    & .trip-options-toggle { border: 0; border-radius: 999px; background: var(--sky-100); color: var(--sky-700); font-weight: 800; }
    & .trip-options-toggle[aria-expanded=true] { background: var(--sky-600); color: #fff; }
    & .trip-card-actions .trip-option-actions { border: 0; border-radius: 18px; box-shadow: var(--lift-shadow); }
    & .trip-legs { margin: 0 8px 10px; padding: 10px; border-radius: 18px; }
    & .trip-leg {
      --stub: 96px;
      grid-template-columns: minmax(0,1fr) var(--stub);
      align-items: center;
      gap: 0;
      padding: 0;
      border-radius: 18px;
      border: 0;
      background: #fff;
    }
    /* On phones the status chips and the live strip span the whole card below the flight, so a full-height
       tear line would cut through their text. The divider runs only beside the flight and the Manage button. */
    & .trip-leg::before { display: none; }
    & .trip-leg > .trip-flight-link { align-self: stretch; padding: 12px 10px 12px 14px; border-right: 2px dashed var(--sky-200); }
    & .trip-flight-link::after { display: none; }
    & .trip-leg > .leg-links { display: contents; }
    & .leg-links .trip-options-toggle { grid-column: 2; grid-row: 1; justify-self: center; align-self: center; width: auto; min-width: 76px; padding-inline: 12px; font-size: 13px; }
    & .leg-links .trip-option-actions { grid-column: 1 / -1; grid-row: auto; padding: 10px 14px 12px; border-top: 2px dashed var(--sky-200); justify-content: flex-start; }
    & .leg-links .trip-option-actions a { width: auto; }
    & .trip-leg > .leg-statuses { grid-column: 1 / -1; grid-row: auto; padding: 0 14px 12px; }
    & .trip-leg > .leg-live { grid-column: 1 / -1; grid-row: auto; margin: 0 12px 12px; }
    & .leg-heading strong { font-size: 24px; }
    & .leg-date { color: var(--muted); font-size: 12px; font-weight: 700; }
    & .leg-times { font-size: 14px; font-weight: 800; color: var(--navy); }
    & .trip-connection { margin: 0 0 0 14px; padding: 22px 0 22px 20px; }
    & .trip-connection::after { top: 40px; }
    & .trip-connection > * { padding-inline: 14px; }
    & .trip-connection > :first-child { padding: 10px 10px 2px 14px; }
    & .trip-connection > .connection-advisories { margin-inline: 14px; }
    & .connection-header { gap: 0 4px; }
    & .connection-summary { font-size: 16px; }
    & .connection-summary strong { font-size: 28px; }
    & .connection-level { font-size: 13px; }
    & .travel-day { border: 0; border-radius: 24px; background: #fff; box-shadow: var(--ticket-shadow); }
    & .travel-day h2 { font-family: var(--display); color: var(--navy); }
    & :is(.travel-day-flight,.travel-day-connection) { border: 0; border-radius: 16px; background: var(--sky-50); }
    & .travel-day-flight strong { font-family: var(--display); font-weight: 600; }
    & .travel-day dd { font-family: var(--display); font-weight: 600; }
    & dialog { padding: 20px 16px; border-radius: 24px; }
  }

  @media (prefers-reduced-motion: reduce) {
    & * { transition: none !important; }
    & :is(.primary-button,.planner-guide a,.explore-flight,.brief-card):hover { transform: none; }
  }
}
