@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Near-black foundation with a trace of navy */
  --bg: #05070c;          /* page */
  --panel: #0a0d15;       /* sidebars and plan */
  --surface: #0f131d;     /* cards, raised */
  --surface-2: #151a26;
  --surface-3: #1c2232;
  --line: rgba(160, 176, 214, 0.10);
  --line-2: rgba(160, 176, 214, 0.19);
  --rail-w: 64px;
  /* Text */
  --text: #e9edf5;
  --text-2: #c2c9d7;
  --text-3: #9ba4b9;
  /* One accent, used for selection and focus */
  --accent: #7fa2ff;
  --accent-soft: rgba(127, 162, 255, 0.14);
  --accent-ink: #05070c;
  /* Primary action */
  --primary: #e9edf5;
  --primary-ink: #05070c;
  /* Second color: prices and counts. Gold on outdoor, violet on airports. */
  --value-outdoor: #f3bd6e;
  --value-outdoor-dim: #cfa76a;
  --value-airport: #c9a8ff;
  --value-airport-dim: #ad95e6;
  --value: var(--value-outdoor);
  --value-dim: var(--value-outdoor-dim);
  /* Status */
  --rec: #a78bfa;
  --rec-tag: #7654ee;
  --warn: #f0917d;

  --top: 56px;
  --side-w: 256px;
  --plan-w: 368px;
  --gutter: 32px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color-scheme: dark;
}

[data-kind="outdoor"] { --value: var(--value-outdoor); --value-dim: var(--value-outdoor-dim); }
[data-kind="airport"] { --value: var(--value-airport); --value-dim: var(--value-airport-dim); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--top); }
body {
  margin: 0;
  padding-top: var(--top);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
img { max-width: 100%; display: block; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
:focus:not(:focus-visible) { outline: none; }

.skip {
  position: fixed; left: 12px; top: -80px; z-index: 200; background: var(--primary); color: var(--primary-ink);
  padding: 9px 14px; border-radius: var(--r-sm); font-weight: 600; text-decoration: none;
}
.skip:focus { top: 10px; }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; height: var(--top); z-index: 50;
  display: flex; align-items: center; gap: 14px; padding: 0 20px;
  background: linear-gradient(90deg, rgba(5, 7, 12, 0.94) 0%, rgba(7, 10, 18, 0.94) 38%, rgba(11, 16, 30, 0.94) 72%, rgba(18, 26, 50, 0.94) 100%);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.tb-logo { height: 22px; width: auto; }
.tb-name { color: var(--text-3); font-size: 14px; padding-left: 14px; border-left: 1px solid var(--line-2); line-height: 20px; }
.tb-prepared { margin-left: auto; color: var(--text-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-prepared strong { color: var(--text); font-weight: 500; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: none;
  background: none; border: 1px solid transparent; border-radius: var(--r-sm); color: var(--text-2);
  transition: background 0.12s var(--ease), color 0.12s var(--ease);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }

/* Outdoor / Airports */
.tabs { display: inline-flex; gap: 2px; padding: 3px; margin-left: 10px; border-radius: 10px; background: rgba(2, 3, 6, 0.5); border: 1px solid var(--line-2); }
.tabs [role="tab"] {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px 0 12px;
  background: none; border: 0; border-radius: 7px; color: var(--text-2); font-size: 14px; font-weight: 500;
  transition: background 0.14s var(--ease), color 0.14s var(--ease);
}
.tabs [role="tab"]:hover { color: var(--text); background: var(--surface-2); }
.tabs [role="tab"] .n { font-size: 12px; color: var(--value-dim); font-variant-numeric: tabular-nums; }
.tabs [role="tab"][aria-selected="true"] { background: var(--primary); color: var(--primary-ink); font-weight: 600; }
.tabs [role="tab"][aria-selected="true"] .n { color: rgba(5, 7, 12, 0.6); }

/* ---------- App frame ---------- */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr) var(--plan-w); align-items: start; }

/* ---------- Sidebar ---------- */
.side {
  position: sticky; top: var(--top); height: calc(100vh - var(--top)); display: flex; flex-direction: column;
  border-right: 1px solid var(--line); background: var(--panel);
}
.side-top { display: none; }
.side-nav { flex: 1; overflow-y: auto; padding: 20px 12px 16px; }
.side-head { display: flex; align-items: center; gap: 10px; padding: 4px 10px 14px; }
.side-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line);
}
.side-label { font-size: 15px; font-weight: 600; letter-spacing: -0.005em; line-height: 1.2; }
.side-count { font-size: 12px; color: var(--text-3); line-height: 1.3; }

.side-item {
  position: relative; display: block; width: 100%; min-height: 40px;
  padding: 9px 12px; background: none; border: 0; border-radius: var(--r-sm); text-align: left; color: var(--text-2);
  transition: background 0.12s var(--ease), color 0.12s var(--ease);
}
.side-item:hover { background: var(--surface); color: var(--text); }
.side-list { display: grid; gap: 4px; }
.side-empty { padding: 4px 10px; color: var(--text-3); font-size: 13px; }
.side-item-name { display: block; font-size: 14px; font-weight: 500; line-height: 1.3; }
.side-item-sub { display: block; font-size: 12px; color: var(--text-3); line-height: 1.3; }
.side-item .added { color: var(--accent); font-weight: 500; white-space: nowrap; }
.side-item[aria-current="page"] { background: var(--surface-2); color: var(--text); }
.side-item[aria-current="page"] .side-item-name { font-weight: 600; }
.side-item[aria-current="page"]::before {
  content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 2px; border-radius: 2px; background: var(--accent);
}

.side-secs { margin: 6px 0 12px 14px; padding-left: 8px; border-left: 1px solid var(--line); }
.side-sec {
  display: flex; align-items: center; gap: 9px; min-height: 36px; padding: 6px 10px; border-radius: 6px;
  color: var(--text-3); font-size: 13.5px; text-decoration: none;
  transition: background 0.12s var(--ease), color 0.12s var(--ease);
}
.side-sec span:first-child { flex: 1; min-width: 0; }
.side-sec .n { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--value-dim); }
.side-sec:hover { color: var(--text); background: var(--surface); }
.side-sec.is-active { color: var(--text); background: var(--surface); font-weight: 500; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dot, var(--text-3)); flex: none; display: inline-block; }

.side-foot { padding: 14px 22px 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-3); line-height: 1.5; }
.side-foot-label { color: var(--text-2); font-weight: 500; }
.side-foot a { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.side-foot a:hover { color: var(--text); }

/* brief cue when the tab changes */
@keyframes swap-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.is-swapping { animation: swap-in 0.22s var(--ease) both; }

/* ---------- Main ---------- */
.main { padding: 32px var(--gutter) 96px; min-width: 0; outline: none; }
.proposal, .foot { max-width: 1400px; margin-left: auto; margin-right: auto; }

.ctx {
  display: none; position: sticky; top: var(--top); z-index: 20; width: calc(100% + 2 * var(--gutter)); margin: -32px calc(-1 * var(--gutter)) 20px;
  align-items: center; gap: 8px; min-height: 44px; padding: 8px var(--gutter); text-align: left;
  background: rgba(5, 7, 12, 0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 0; border-bottom: 1px solid var(--line); color: var(--text-2); font-size: 13px;
}
.ctx-path { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctx-path b { color: var(--text); font-weight: 600; }
.ctx-path i { font-style: normal; color: var(--text-3); margin: 0 6px; }
.ctx svg { color: var(--text-3); }
.ctx:hover .ctx-path, .ctx:hover svg { color: var(--text); }

.crumb { display: none; }
.crumb i { font-style: normal; opacity: 0.6; }
.crumb svg { width: 15px; height: 15px; }
.proposal { position: relative; isolation: isolate; }
.prop-head { position: relative; }
.prop-head::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none; left: calc(-1 * var(--gutter)); top: -32px; width: min(900px, 100% + var(--gutter)); height: 300px;
  background: radial-gradient(60% 70% at 12% 0%, rgba(150, 200, 255, 0.13) 0%, rgba(150, 200, 255, 0.05) 45%, transparent 75%);
}
.prop-title { font-size: 34px; line-height: 1.15; font-weight: 600; letter-spacing: -0.026em; }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .prop-title { background-image: linear-gradient(90deg, #ffffff 0%, #eef6ff 45%, #bcdcf8 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; width: fit-content; max-width: 100%; }
}
.prop-meta { margin-top: 8px; color: var(--text-2); font-size: 15px; }
.prop-intro { margin-top: 12px; color: var(--text-2); font-size: 15px; line-height: 1.55; max-width: 68ch; }
.prop-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 18px; }

.about { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats > div { padding: 0 24px; border-left: 1px solid var(--line); }
.stats > div:first-child { padding-left: 0; border-left: 0; }
.stats dt { font-size: 12px; color: var(--text-3); }
.stat-value { color: var(--value); font-size: 22px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; font-variant-numeric: tabular-nums; }
.stat-text { margin-top: 4px; font-size: 13px; color: var(--text-2); line-height: 1.5; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.steps li { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.step-round { font-size: 12px; color: var(--value-dim); }
.step-who { font-size: 14px; font-weight: 500; color: var(--text); line-height: 1.35; }
.step-time { font-size: 13px; color: var(--text-2); line-height: 1.45; }
.about-notes { margin-top: 14px; max-width: 76ch; }
.about-notes p { font-size: 13px; color: var(--text-2); line-height: 1.55; }
.about-notes p + p { margin-top: 6px; }
.about-cta { margin-top: 14px; max-width: 76ch; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--r-sm); font-size: 14px; color: var(--text); line-height: 1.5; }
.about-terms { margin-top: 16px; font-size: 12px; color: var(--text-3); max-width: 76ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 0 14px;
  border-radius: var(--r-sm); border: 1px solid transparent; font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: background 0.12s var(--ease), border-color 0.12s var(--ease), color 0.12s var(--ease);
}
.btn-primary { background: var(--primary); color: var(--primary-ink); font-weight: 600; }
.btn-primary:hover { background: #ffffff; }
.btn-secondary { background: var(--surface-2); border-color: var(--line-2); color: var(--text); }
.btn-secondary:hover { background: var(--surface-3); }
.btn-quiet { background: none; color: var(--text-2); padding: 0 10px; }
.btn-quiet:hover { background: var(--surface-2); color: var(--text); }
.btn-map { background: transparent; border-color: rgba(160, 176, 214, 0.3); color: var(--text); padding: 0 13px 0 11px; }
.btn-map:hover { background: var(--surface-2); border-color: rgba(160, 176, 214, 0.46); }
.btn-map svg { color: var(--text-2); }
.btn-secmap { color: var(--text-2); padding: 0 12px 0 10px; }
.btn-secmap:hover { color: var(--text); }
.btn-add { background: rgba(127, 162, 255, 0.16); border-color: rgba(127, 162, 255, 0.42); color: #e3eaff; }
.btn-add:hover { background: rgba(127, 162, 255, 0.24); border-color: rgba(127, 162, 255, 0.6); }
.btn-add[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn-add[aria-pressed="true"]:hover { background: #95b3ff; }
.btn:active, .switch-btn:active, .weeks-btn:active, .side-item:active, .side-sec:active, .tabs [role="tab"]:active { filter: brightness(0.92); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.4; pointer-events: none; }
.text-btn { background: none; border: 0; padding: 6px 4px; color: var(--text-3); font-size: 13px; border-radius: 6px; }
.text-btn:hover { color: var(--text); }
.text-btn[disabled] { opacity: 0.4; pointer-events: none; }

/* toggle */
.switch-btn {
  display: inline-flex; align-items: center; gap: 9px; min-height: 36px; padding: 0 12px 0 8px; background: none;
  border: 1px solid var(--line-2); border-radius: var(--r-sm); color: var(--text-2); font-size: 14px; font-weight: 500;
  transition: background 0.12s var(--ease), color 0.12s var(--ease), border-color 0.12s var(--ease);
}
.switch-btn:hover { background: var(--surface); color: var(--text); }
.switch-btn .n { color: var(--value-dim); font-size: 12px; font-variant-numeric: tabular-nums; }
.switch-track { position: relative; width: 28px; height: 16px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line-2); transition: background 0.14s var(--ease), border-color 0.14s var(--ease); }
.switch-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--text-2); transition: transform 0.14s var(--ease), background 0.14s var(--ease); }
.switch-btn[aria-pressed="true"] { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }
.switch-btn[aria-pressed="true"] .switch-track { background: var(--accent); border-color: var(--accent); }
.switch-btn[aria-pressed="true"] .switch-track::after { transform: translateX(12px); background: var(--accent-ink); }
.disclose svg { transition: transform 0.14s var(--ease); }
.disclose[aria-expanded="true"] svg { transform: rotate(180deg); }

/* ---------- Sections ---------- */
.prop-head + .section { margin-top: 28px; }
.section { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.sec-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: start; margin-bottom: 20px; }
.sec-title { font-size: 24px; line-height: 1.3; font-weight: 600; letter-spacing: -0.018em; }
.sec-meta { color: var(--text-3); font-size: 14px; }
.sec-price { color: var(--value-dim); font-variant-numeric: tabular-nums; }
.sec-note { margin-top: 4px; color: var(--text-2); font-size: 14px; max-width: 72ch; }
.sec-head > * { grid-column: 1; }
.sec-head > .btn { grid-column: 2; grid-row: 1 / span 3; }

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

.card {
  position: relative; display: flex; flex-direction: column; min-width: 0; border-radius: var(--r-md); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 12px 28px -20px rgba(0, 0, 0, 0.95);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), transform 0.18s var(--ease);
}
/* a card answers the pointer, or keyboard focus on anything in it: a lighter edge and a slight lift, nothing around it moves */
@media (hover: hover) {
  .card:hover { border-color: rgba(160, 176, 214, 0.44); box-shadow: 0 16px 32px -20px rgba(0, 0, 0, 0.8); transform: translateY(-2px); }
}
.card:has(:focus-visible) { border-color: rgba(160, 176, 214, 0.44); box-shadow: 0 16px 32px -20px rgba(0, 0, 0, 0.8); transform: translateY(-2px); }
.card.is-picked, .card.is-picked:hover { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(127, 162, 255, 0.16), 0 12px 28px -20px rgba(0, 0, 0, 0.95); }
.card-photo { display: block; padding: 0; border: 0; background: var(--surface-2); aspect-ratio: 16 / 10; overflow: hidden; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; }
/* a map shown whole: the space beside it is a blurred, navy-tinted copy of the same map */
.card-photo.is-map { position: relative; background: var(--surface-2); isolation: isolate; }
.card-photo.is-map .card-photo-fill { position: absolute; left: -10%; top: -10%; width: 120%; height: 120%; max-width: none; object-fit: cover; filter: blur(24px) saturate(0.85) brightness(0.45); }
.card-photo.is-map::after { content: ""; position: absolute; inset: 0; background: rgba(10, 13, 22, 0.8); }
.card-photo.is-map .card-photo-img { position: relative; z-index: 1; object-fit: contain; }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 18px; }
/* Recommended: a solid violet tag with white lettering, so it reads at a glance on any photo */
.flag {
  display: inline-flex; align-items: center; gap: 5px; margin-bottom: 8px; padding: 4px 10px 4px 7px; border-radius: 999px;
  background: var(--rec-tag); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: 0.005em; line-height: 16px;
}
.flag svg { width: 12px; height: 12px; fill: currentColor; stroke: none; }
.flag--photo {
  position: absolute; left: 10px; top: 10px; z-index: 1; margin: 0; padding: 5px 11px 5px 8px; font-size: 12.5px; pointer-events: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22) inset, 0 4px 14px rgba(6, 8, 24, 0.5);
}
.card-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 14px; }
.card-price { text-align: right; }
.card-per { margin-top: 1px; font-size: 13px; color: var(--text-3); white-space: nowrap; }
.card-head { min-width: 0; }
.card-sub { margin-top: 6px; font-size: 13.5px; color: var(--text-3); line-height: 1.5; }
.card-head .card-sub { margin-top: 2px; }
.card-top h3 { min-width: 0; font-size: inherit; font-weight: inherit; }
.card-title {
  display: inline-flex; align-items: flex-start; gap: 8px; min-width: 0; padding: 0; background: none; border: 0; text-align: left;
  font-size: 17px; line-height: 1.35; font-weight: 600; letter-spacing: -0.012em; color: var(--text);
}
.card-title:hover { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.card-rate { color: var(--value); text-align: right; white-space: nowrap; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.card-rate.is-tba { color: var(--text); font-size: 15px; font-variant-numeric: normal; }
.flag--muted { background: rgba(7, 10, 17, 0.86); color: var(--text); }
.card-subrow { display: flex; justify-content: space-between; gap: 12px; margin-top: 2px; font-size: 13.5px; color: var(--text-3); }
.card-subrow span:last-child { white-space: nowrap; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.unit-tag { display: inline-block; padding: 0 7px; border: 1px solid var(--line-2); border-radius: 5px; color: var(--text-2); font-size: 12px; line-height: 20px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.card-desc {
  margin-top: 12px; color: var(--text-2); font-size: 14.5px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-facts { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 6px; font-size: 14px; }
.card-facts div { display: flex; justify-content: space-between; gap: 12px; }
.card-facts dt { color: var(--text-3); }
.card-facts dd { color: var(--text-2); text-align: right; font-variant-numeric: tabular-nums; }
.card-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 16px; }
.card-actions .btn { min-height: 42px; }
.card-actions .btn-add { flex: 1; font-weight: 600; }
.more { color: var(--text-3); }

.pin {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 999px;
  border: 1.5px solid var(--pin, var(--text-3)); color: var(--text); font-size: 11.5px; font-weight: 600; letter-spacing: 0; font-variant-numeric: tabular-nums; flex: none;
}

/* ---------- Plan ---------- */
.plan { position: sticky; top: var(--top); height: calc(100vh - var(--top)); border-left: 1px solid var(--line); background: var(--panel); }
.plan-inner { height: 100%; display: flex; flex-direction: column; padding: 20px 20px 16px; overflow: hidden; }
.plan-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.plan-title { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.plan-count { color: var(--value-dim); font-size: 13px; }
.plan-close { display: none; margin-left: auto; align-self: center; }
.plan-min { margin-left: auto; align-self: center; color: var(--text-3); }
.plan-rail { display: none; }
@media (min-width: 980px) {
  body.plan-collapsed { --plan-w: var(--rail-w); }
  body.plan-collapsed .plan-inner { display: none; }
  body.plan-collapsed .plan-rail {
    display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; padding: 20px 0; background: none; border: 0;
    color: var(--text-2); font-size: 12px; font-weight: 500; transition: color 0.12s var(--ease), background 0.12s var(--ease);
  }
  body.plan-collapsed .plan-rail:hover { color: var(--text); background: var(--surface); }
  .plan-rail svg { width: 20px; height: 20px; }
  .rail-count { min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--surface-2); color: var(--text-3); font-size: 12px; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums; }
  .rail-count.has { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
}

.weeks-default { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0 14px; border-bottom: 1px solid var(--line); }
.wd-text { display: flex; flex-direction: column; min-width: 0; }
.wd-label { font-size: 14px; font-weight: 500; }
.wd-help { font-size: 12px; color: var(--text-3); line-height: 1.4; }

.stepper { display: inline-flex; align-items: center; height: 32px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); flex: none; }
.stepper button { width: 30px; height: 30px; padding: 0; border: 0; background: none; color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; }
.stepper button:hover { background: var(--surface-3); color: var(--text); }
.stepper button[disabled] { opacity: 0.3; pointer-events: none; }
.stepper button svg { width: 14px; height: 14px; }
.stepper input {
  width: 30px; padding: 0; border: 0; background: none; text-align: center; font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums;
  -moz-appearance: textfield; appearance: textfield;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper .unit { font-size: 12px; color: var(--text-3); padding: 0 9px 0 2px; }

.lines { flex: 1; overflow-y: auto; margin: 0 -8px; padding: 0 8px; overscroll-behavior: contain; }
.lines:focus { outline: none; }
.lines-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 32px 0; color: var(--text-2); font-size: 14px; line-height: 1.55; max-width: 30ch; }
.lines-empty strong { color: var(--text); font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-bottom: 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); }
.empty-icon svg { width: 20px; height: 20px; }
.empty-steps { margin: 12px 0 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 10px; }
.empty-steps li { counter-increment: step; display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 14px; }
.empty-steps li::before { content: counter(step); display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-2); color: var(--text-2); font-size: 12px; font-weight: 600; flex: none; }
.line-group-title { font-size: 12px; color: var(--text-3); padding: 14px 0 2px; }
.line-group-note { font-size: 12px; color: var(--text-3); line-height: 1.45; padding: 0 0 4px; }
.line-price.is-tba { color: var(--text-2); font-weight: 500; font-size: 13px; }
.mapctx-rate b.is-tba { color: var(--text); font-size: 14px; }
.line { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 0 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.line-thumb { grid-row: 1 / span 2; align-self: start; width: 52px; height: 38px; padding: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--surface-2); }
.line-thumb img { width: 100%; height: 100%; object-fit: cover; }
.line-thumb.is-map img { object-fit: contain; }
.line-name { font-size: 14px; font-weight: 500; line-height: 1.35; }
.line-sub { margin-top: 1px; font-size: 12px; color: var(--text-3); line-height: 1.4; }
.line-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.line-price { color: var(--value); font-size: 14px; font-weight: 600; line-height: 1.35; white-space: nowrap; font-variant-numeric: tabular-nums; }
.line-tools { display: flex; align-items: center; gap: 2px; margin-right: -6px; }
.line-remove { width: 28px; height: 28px; color: var(--text-3); }
.line-remove svg { width: 15px; height: 15px; }
.weeks-btn {
  display: inline-flex; align-items: center; gap: 3px; height: 28px; padding: 0 5px 0 8px;
  background: none; border: 1px solid var(--line); border-radius: 7px; color: var(--text-2); font-size: 13px; font-variant-numeric: tabular-nums;
  transition: background 0.12s var(--ease), color 0.12s var(--ease), border-color 0.12s var(--ease);
}
.weeks-btn:hover { background: var(--surface-2); color: var(--text); }
.weeks-btn[aria-expanded="true"] { background: var(--surface-2); border-color: var(--line-2); color: var(--text); }
.weeks-btn svg { width: 14px; height: 14px; color: var(--text-3); transition: transform 0.14s var(--ease); }
.weeks-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.line-edit { grid-column: 2 / -1; display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.line-edit-label { margin-right: auto; font-size: 12px; color: var(--text-3); }
.line-note { grid-column: 2 / -1; margin-top: 6px; font-size: 12px; color: var(--text-3); line-height: 1.45; }
.line-note.is-warn { color: var(--warn); }

.plan-foot { border-top: 1px solid var(--line-2); padding-top: 14px; }
.total-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.total-label { color: var(--text-2); font-size: 13px; }
.total { color: var(--value); font-size: 28px; line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
/* a plan that mixes outdoor and airport units: the total carries both colors */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .total[data-kind="mix"], .dock-total[data-kind="mix"] {
    background-image: linear-gradient(90deg, var(--value-outdoor) 0%, var(--value-airport) 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  }
}
.plan-count[data-kind="mix"] { color: var(--text-2); }
.total-note { margin-top: 8px; font-size: 12px; color: var(--text-3); line-height: 1.5; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.actions .btn { min-height: 38px; padding: 0 10px; }
.actions-minor { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; min-height: 32px; font-size: 13px; }
.actions-minor > .text-btn:first-child { margin-left: -4px; }
.actions-minor > .text-btn:last-child { margin-right: -4px; }
.confirm { color: var(--text-2); }
.confirm-actions { display: flex; gap: 10px; }
.text-btn.is-danger { color: var(--warn); }

/* ---------- Dock and overlays ---------- */
.dock {
  display: none; position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 30;
  align-items: center; gap: 12px; min-height: 56px; padding: 8px 8px 8px 16px; text-align: left;
  background: rgba(17, 22, 36, 0.96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.7);
}
.dock-count { flex: 1; min-width: 0; color: var(--text-2); font-size: 13px; }
.dock-total { color: var(--value); font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dock-cta { background: var(--primary); color: var(--primary-ink); font-weight: 600; font-size: 14px; padding: 9px 14px; border-radius: 9px; }
.scrim { position: fixed; inset: 0; background: rgba(1, 2, 5, 0.6); z-index: 55; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 12px); opacity: 0; pointer-events: none; z-index: 120;
  max-width: calc(100vw - 32px); background: var(--surface-3); color: var(--text); border: 1px solid var(--line-2);
  font-size: 13px; font-weight: 500; padding: 9px 14px; border-radius: 10px; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.6);
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Dialog ---------- */
.dlg {
  width: min(1040px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; overflow: hidden;
  border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--panel); color: var(--text);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
}
.dlg::backdrop { background: rgba(1, 2, 5, 0.72); }
.dlg-body { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); max-height: calc(100vh - 34px); }
.dlg-media { background: #030407; display: flex; flex-direction: column; justify-content: center; overflow-y: auto; }
.dlg-media img { width: 100%; height: auto; }
.dlg-media img + img { border-top: 1px solid var(--line); }
.dlg-media.is-map img { background: #e9eef3; }
.dlg-info { display: flex; flex-direction: column; min-height: 0; }
.dlg-scroll { flex: 1; overflow-y: auto; padding: 22px 24px 8px; }
.dlg-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dlg-title { display: flex; align-items: center; gap: 9px; font-size: 20px; line-height: 1.3; font-weight: 600; letter-spacing: -0.015em; }
.dlg-sub { margin-top: 2px; color: var(--text-3); font-size: 13px; }
.dlg-desc { margin-top: 14px; color: var(--text-2); font-size: 14px; line-height: 1.55; }
.props { margin-top: 16px; border-top: 1px solid var(--line); }
.props > div { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.props dt { color: var(--text-3); }
.props dd { color: var(--text); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.props dd.is-strong { color: var(--value); font-weight: 600; font-size: 14px; }
.props ul li + li { margin-top: 2px; }
.dlg-actions { display: flex; gap: 8px; padding: 14px 24px 18px; border-top: 1px solid var(--line); }
.dlg-actions .btn-add, .dlg-actions .btn-primary { flex: 1; min-height: 40px; }
.dlg-close--float { display: none; }

/* lightbox and map share the dialog */
.dlg.is-wide .dlg-body { display: flex; flex-direction: column; }
.dlg-bar { display: flex; align-items: center; gap: 8px; padding: 14px 16px 14px 20px; border-bottom: 1px solid var(--line); }
.dlg-bar-text { flex: 1; min-width: 0; }
.only-small { display: none; }
.only-wide { display: inline; }
.dlg-bar h3 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.dlg-bar p { font-size: 13px; color: var(--text-3); }
.dlg-bar-actions { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.dlg-bar p:empty { display: none; }
.dlg.is-map { width: min(1280px, calc(100vw - 32px)); }
.dlg.is-map .dlg-body { height: min(800px, calc(100vh - 34px)); }
/* every map sits beside a panel that says what passes that spot */
.mapview { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 320px; }
.mapview-map { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.unit-map { flex: 1; min-height: 0; background: #dfe6ee; display: flex; align-items: center; justify-content: center; color: #33415c; font-size: 13px; }
.unit-map .leaflet-tile-pane { filter: saturate(0.55) contrast(0.96); }
.mapctx {
  min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 16px;
  padding: 18px 20px 20px; border-left: 1px solid var(--line); background: var(--panel);
}
.mapctx-unit { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.mapctx-name { display: flex; align-items: center; gap: 8px; font-size: 16px; line-height: 1.35; font-weight: 600; letter-spacing: -0.01em; }
.mapctx-sub { margin-top: 2px; color: var(--text-3); font-size: 13px; }
.mapctx-rate { margin-top: 6px; color: var(--text-3); font-size: 13px; }
.mapctx-rate b { margin-right: 4px; color: var(--value); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mapctx-label { margin-bottom: 4px; color: var(--text-3); font-size: 12px; font-weight: 500; }
.mapctx-text { color: var(--text); font-size: 14px; line-height: 1.55; }
.mapctx-hint { color: var(--text-2); }
.mapctx-actions { display: flex; gap: 8px; }
.mapctx-actions .btn-add { flex: 1; }
.mapctx > .mapctx-actions { margin-top: auto; padding-top: 4px; }
.mapkey { display: grid; gap: 2px; margin: 0 -8px; }
.mapkey-item { border-radius: var(--r-sm); }
.mapkey-item.is-on { background: var(--surface-2); box-shadow: inset 2px 0 0 var(--accent); }
.mapkey-row {
  display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 8px; background: none; border: 0; border-radius: var(--r-sm);
  text-align: left; color: var(--text-2); transition: background 0.12s var(--ease);
}
.mapkey-row:hover { background: var(--surface); }
.mapkey-item.is-on .mapkey-row:hover { background: none; }
.mapkey-text { display: block; min-width: 0; }
.mapkey-name { display: block; color: var(--text); font-size: 14px; font-weight: 500; line-height: 1.4; }
.mapkey-where { display: block; margin-top: 1px; color: var(--text-3); font-size: 12.5px; line-height: 1.45; }
.mapkey-item:not(.is-on) .mapkey-where { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mapkey-item.is-on .mapkey-where { color: var(--text-2); }
.mapkey-more { display: grid; gap: 10px; padding: 2px 10px 12px 40px; }
.mapkey[data-kind="outdoor"] .mapkey-more { padding-left: 8px; }
.mapkey-who { color: var(--text-2); font-size: 12.5px; line-height: 1.45; }
.mapkey-who span { display: block; color: var(--text-3); font-size: 12px; }
.lightbox { flex: 1; min-height: 0; position: relative; overflow: hidden; background: #0b1730; }
.lightbox-img { position: absolute; left: 16px; top: 16px; width: calc(100% - 32px); height: calc(100% - 32px); object-fit: contain; }
.lightbox.is-framed .lightbox-img { left: 3%; top: 0; width: 94%; height: 96%; }
/* airport locator: the whole airport with this section's terminal filled */
.mapctx-head { display: grid; gap: 14px; }
.mapctx-locimg { display: block; width: auto; height: auto; max-width: 100%; max-height: 132px; }
.mapctx-locnote { margin-top: 4px; color: var(--text-3); font-size: 12px; }
/* full inventory map: the airport's own map page, pan and zoom, this proposal's placements in color */
.inv-tabs { display: flex; gap: 6px; padding: 8px 12px; overflow-x: auto; border-bottom: 1px solid var(--line); background: var(--panel); scrollbar-width: none; }
.inv-tabs::-webkit-scrollbar { display: none; }
.inv-tab { flex: none; height: 30px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 999px; background: none; color: var(--text-2); font-size: 13px; font-weight: 500; white-space: nowrap; }
.inv-tab:hover { background: var(--surface-2); color: var(--text); }
.inv-tab.is-on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); font-weight: 600; }
.unit-map.inv-map { background: #f6f8fb; }
.inv-map .leaflet-image-layer { mix-blend-mode: multiply; }
.inv-map.leaflet-container { cursor: grab; }
/* ---------- Airport section maps: panels, numbered circles, the airport plan, the enlarged view ---------- */
.mapview-map { position: relative; }
.mapview-body { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.lightbox.is-stage { container-type: size; display: grid; place-items: center; }
.map-crop { position: relative; overflow: hidden; aspect-ratio: var(--par); width: min(94cqw, 94cqh * var(--par)); }
.lightbox.is-focus .map-crop { width: min(96cqw, 92cqh * var(--par)); border-radius: 14px; }
.map-stage {
  position: absolute; left: calc(-100% * var(--px) / var(--pw)); top: calc(-100% * var(--py) / var(--ph));
  width: calc(100% / var(--pw)); aspect-ratio: var(--ar); container-type: inline-size;
}
.map-stage-img { display: block; width: 100%; height: 100%; }
.map-panel { position: absolute; border-radius: 0.95cqw; transition: box-shadow 0.14s var(--ease); }
.map-panel.is-hot { box-shadow: 0 0 0 2px var(--value-airport); }
/* each map's title sits above it and answers the pointer or focus with the map: brighter, and lifted by a hair */
.map-cap {
  position: absolute; left: 0.25cqw; bottom: calc(100% + 0.8cqw); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #c3ccdf; font-size: clamp(10.5px, 1.44cqw, 14px); font-weight: 600; line-height: 1.25; letter-spacing: 0.005em;
  transition: color 0.16s var(--ease), transform 0.16s var(--ease);
}
.map-panel.is-hot .map-cap { color: #fff; transform: translateY(-1px); }
.lightbox.is-focus .map-panel { box-shadow: none; }
.map-expand {
  position: absolute; top: 6px; right: 6px; z-index: 4; display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; padding: 0; border: 1px solid rgba(58, 77, 107, 0.24); border-radius: 8px;
  background: rgba(246, 248, 251, 0.9); color: #3a4d6b; opacity: 0.7;
  transition: opacity 0.12s var(--ease), background 0.12s var(--ease), border-color 0.12s var(--ease);
}
.map-expand::after { content: ""; position: absolute; inset: -7px; }
.map-expand svg { width: 14px; height: 14px; stroke-width: 2; }
.map-expand:hover, .map-expand:focus-visible, .map-panel:hover .map-expand { opacity: 1; background: #fff; border-color: rgba(58, 77, 107, 0.45); }
.lightbox.is-focus .map-expand { display: none; }
.map-expand--one { top: 12px; right: 12px; z-index: 1100; width: 32px; height: 32px; opacity: 0.86; box-shadow: 0 2px 10px rgba(4, 8, 20, 0.28); }
.map-back {
  position: absolute; top: 12px; left: 12px; z-index: 1100; height: 34px; padding: 0 13px 0 8px; gap: 4px;
  background: rgba(7, 10, 17, 0.94); border-color: var(--line-2); color: var(--text); font-size: 13px;
  box-shadow: 0 2px 10px rgba(4, 8, 20, 0.28);
}
.map-back:hover { background: var(--surface-3); }
.map-badge {
  position: absolute; z-index: 2; display: grid; place-items: center; width: clamp(18px, 2.45cqw, 24px); aspect-ratio: 1; padding: 0;
  transform: translate(-50%, -50%); border: 0; border-radius: 50%; background: var(--c); color: #0f1c2e;
  font: 700 clamp(9.5px, 1.3cqw, 12.5px)/1 var(--font); font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
  transition: opacity 0.12s var(--ease), box-shadow 0.12s var(--ease);
}
.map-badge::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; }
.map-badge:hover, .map-badge:focus-visible { z-index: 5; box-shadow: 0 0 0 2px #0f1c2e; outline: 0; }
.map-badge.is-on { z-index: 4; box-shadow: 0 0 0 2px #f6f8fb, 0 0 0 4px #0f1c2e; }
.map-badge.is-dim { opacity: 0.42; }
.loc { display: block; width: auto; max-width: 100%; height: 132px; overflow: visible; stroke-width: 0; }
.loc-line { fill: none; stroke: #8f9ebd; stroke-width: 0.5; }
.loc-fill { fill: var(--value-airport); stroke: var(--value-airport); stroke-width: 0.5; transition: opacity 0.14s var(--ease), fill 0.14s var(--ease); }
.loc-fill.is-dim { opacity: 0.26; }
.loc-fill.is-hot { fill: #e6d8ff; stroke: #fff; stroke-width: 1; }
.mapctx-locnote { min-height: 17px; margin-top: 6px; }
.mapctx-locnote.is-on { color: var(--text); font-weight: 500; }
.loc-miss { color: var(--text-3); font-weight: 400; }
.hint-touch { display: none; }
@media (hover: none) { .hint-hover { display: none; } .hint-touch { display: inline; } }
@media (min-width: 601px) {
  .dlg.is-map.is-max { width: calc(100vw - 24px); max-height: none; }
  .dlg.is-map.is-max .dlg-body { height: calc(100vh - 26px); max-height: none; }
}
.dlg.is-max .leaflet-top.leaflet-left { top: 44px; }

/* ---------- Top bar: step through the proposals of the open tab ---------- */
.psel { position: relative; display: flex; align-items: center; gap: 10px; }
.psel[hidden] { display: none; }
.psel-box { display: inline-flex; align-items: center; height: 34px; padding: 0 1px; border: 1px solid var(--line-2); border-radius: 10px; background: rgba(2, 3, 6, 0.5); }
.psel-arrow { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; background: none; border: 0; border-radius: 8px; color: var(--text-2); transition: background 0.12s var(--ease), color 0.12s var(--ease); }
.psel-arrow svg { width: 15px; height: 15px; stroke-width: 2; }
.psel-arrow:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.psel-arrow:disabled { opacity: 0.3; cursor: default; }
.psel-cur { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 62px; max-width: 200px; height: 30px; padding: 0 8px; background: none; border: 0; border-radius: 8px; color: var(--text); font-size: 14px; font-weight: 600; letter-spacing: 0.01em; transition: background 0.12s var(--ease); }
.psel-cur:hover, .psel-cur[aria-expanded="true"] { background: var(--surface-2); }
.psel-cur svg { width: 12px; height: 12px; color: var(--text-3); }
.psel-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.psel-name.is-new { animation: psel-in 0.18s var(--ease); }
@keyframes psel-in { from { opacity: 0; transform: translateY(3px); } }
.psel-pos { color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.psel-list { position: absolute; top: calc(100% + 8px); left: 0; z-index: 60; display: grid; gap: 2px; min-width: 230px; padding: 6px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5); }
.psel-list[hidden] { display: none; }
.psel-opt { display: flex; align-items: baseline; gap: 12px; width: 100%; min-height: 40px; padding: 9px 10px; background: none; border: 0; border-radius: 8px; color: var(--text); font-size: 14px; text-align: left; }
.psel-opt:hover, .psel-opt:focus-visible { background: var(--surface-2); }
.psel-opt[aria-selected="true"] { background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); }
.psel-opt-name { font-weight: 600; }
.psel-opt-sub { margin-left: auto; color: var(--text-3); font-size: 13px; white-space: nowrap; }

.map-legend { display: flex; gap: 6px 16px; flex-wrap: wrap; padding: 10px 20px; font-size: 12px; color: var(--text-3); border-top: 1px solid var(--line); }
.map-key { display: inline-flex; align-items: center; gap: 7px; }
.leaflet-container { font-family: var(--font); }
.leaflet-container svg { width: auto; height: auto; fill: initial; stroke: initial; stroke-width: initial; }
.leaflet-tooltip.map-label { background: #05070c; color: #fff; border: 0; border-radius: 7px; padding: 4px 9px; font: 600 13px var(--font); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); }
.leaflet-tooltip-top.map-label::before { border-top-color: #05070c; }
.map-pop { display: flex; flex-direction: column; gap: 2px; font: 13px var(--font); color: #0b1531; min-width: 170px; }
.map-pop strong { font-size: 14px; }
.map-pop-actions { display: flex; gap: 12px; margin-top: 4px; }
.map-pop button { background: none; border: 0; padding: 2px 0; color: #1d4ed8; font: 600 13px var(--font); }
.map-pop button:hover { text-decoration: underline; }

/* ---------- Footer, empty ---------- */
.foot { margin-top: 72px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 12px; line-height: 1.6; }
.foot a { color: var(--text-2); }
.empty { margin-top: 24px; padding: 40px 0; color: var(--text-2); max-width: 520px; }
.empty h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.015em; color: var(--text); margin-bottom: 6px; }

/* ---------- Responsive ---------- */
@media (min-width: 1700px) {
  :root { --side-w: 272px; --plan-w: 400px; --gutter: 56px; }
}

/* Sidebar becomes a drawer */
@media (max-width: 1279px) {
  :root { --plan-w: 344px; --gutter: 28px; }
  .app { grid-template-columns: minmax(0, 1fr) var(--plan-w); }
  .side {
    position: fixed; top: 0; left: 0; bottom: 0; height: auto; width: min(320px, 88vw); z-index: 60;
    transform: translateX(-102%); visibility: hidden; transition: transform 0.24s var(--ease), visibility 0.24s;
    box-shadow: 20px 0 60px -20px rgba(0, 0, 0, 0.6);
  }
  .side.open { transform: none; visibility: visible; }
  .side-top { display: flex; align-items: center; justify-content: space-between; height: var(--top); padding: 0 12px 0 22px; border-bottom: 1px solid var(--line); }
  .side-top-title { font-size: 14px; font-weight: 600; }
  .ctx { display: flex; }
  .crumb { display: none; }
  html { scroll-padding-top: calc(var(--top) + 44px); }
  .side-item { min-height: 44px; }
  .side-sec { min-height: 40px; }
}

/* Plan becomes a bottom sheet */
@media (max-width: 979px) {
  :root { --gutter: 20px; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .tb-prepared { display: none; }
  .tabs { margin-left: auto; }
  .tabs [role="tab"] { height: 40px; }
  .main { padding-bottom: 120px; }
  .plan {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; height: auto; max-height: 90vh; z-index: 60;
    border-left: 0; border-top: 1px solid var(--line-2); border-radius: 18px 18px 0 0;
    transform: translateY(104%); visibility: hidden; transition: transform 0.26s var(--ease), visibility 0.26s;
  }
  .plan.open { transform: none; visibility: visible; }
  .plan-inner { height: auto; max-height: 90vh; padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); }
  .plan-close { display: inline-flex; }
  .plan-min { display: none; }
  .lines { flex: 0 1 auto; min-height: 96px; }
  .weeks-btn { height: 36px; padding: 0 8px 0 11px; }
  .line-remove { width: 36px; height: 36px; }
  .line-tools { gap: 4px; }
  .dock { display: flex; }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .dlg-body { grid-template-columns: 1fr; overflow-y: auto; }
  .dlg-media { overflow: visible; }
  .dlg-info { min-height: auto; }
  .dlg-scroll { overflow: visible; }
  .dlg-actions { position: sticky; bottom: 0; background: var(--panel); }
  .btn, .switch-btn { min-height: 40px; }
  .stepper { height: 36px; }
  .stepper button { width: 34px; height: 34px; }
}

/* Map dialogs: the panel moves under the map and both stay on screen */
@media (max-width: 979px) {
  /* the map keeps at least 56% of the height; the panel takes what it needs of the rest and scrolls */
  .mapview { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(56%, 1fr) minmax(0, auto); }
  .mapctx { padding: 14px 16px 16px; gap: 12px; border-left: 0; border-top: 1px solid var(--line-2); }
  .mapctx-unit { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: start; padding-bottom: 10px; }
  .mapctx-name, .mapctx-sub { grid-column: 1; }
  .mapctx-rate { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; text-align: right; }
  .mapctx-rate b { display: block; margin-right: 0; }
  .mapctx > .mapctx-actions {
    position: sticky; bottom: -16px; margin: 0 -16px -16px; padding: 10px 16px 14px;
    background: var(--panel); border-top: 1px solid var(--line);
  }
  .mapctx-head { grid-template-columns: minmax(0, 1fr) 108px; column-gap: 14px; align-items: start; }
  .mapctx-head .mapctx-loc { grid-column: 2; grid-row: 1; }
  .mapctx-head .mapctx-loc + .mapctx-block { grid-column: 1; grid-row: 1; }
  .mapctx-head .mapctx-loc:only-child { grid-column: 1 / -1; }
  .mapctx-locimg { max-height: 84px; }
  .inv-tab { height: 40px; padding: 0 14px; }
  .map-legend { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; padding: 8px 16px; gap: 14px; scrollbar-width: none; }
  .map-legend::-webkit-scrollbar { display: none; }
  .map-key { flex: none; }
}

@media (max-width: 600px) {
  :root { --gutter: 16px; }
  .topbar { padding: 0 12px; gap: 10px; }
  .tb-name { display: none; }
  .tb-logo { height: 20px; }
  .tabs [role="tab"] { padding: 0 10px 0 9px; gap: 6px; }
  .main { padding-top: 24px; }
  .ctx { margin-top: -24px; }
  .prop-title { font-size: 24px; }
  .stats { grid-template-columns: 1fr; gap: 14px; }
  .stats > div { padding: 0; border-left: 0; }
  .section { margin-top: 40px; padding-top: 28px; }
  .sec-head { grid-template-columns: 1fr; }
  .sec-head > .btn { grid-column: 1; grid-row: auto; justify-self: start; margin: 10px 0 0; }
  .grid { grid-template-columns: 1fr; }
  .card-actions .btn { min-height: 44px; }
  .dlg { width: 100vw; max-width: 100vw; height: 100%; max-height: 100vh; margin: 0; border-radius: 0; border: 0; }
  .dlg-body { max-height: 100vh; height: 100%; }
  .dlg.is-map { width: 100vw; }
  .dlg.is-map .dlg-body { height: 100%; }
  .dlg-top .icon-btn, .dlg-bar .dlg-x { display: none; }
  .dlg-close--float {
    display: inline-flex; position: fixed; top: calc(10px + env(safe-area-inset-top)); right: 10px; z-index: 5; width: 40px; height: 40px;
    background: rgba(5, 7, 12, 0.82); border-color: var(--line-2); color: var(--text); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  }
  .dlg-bar { flex-direction: column; align-items: flex-start; gap: 6px; padding-right: 64px; }
  .only-small { display: inline; }
  .only-wide { display: none; }
  .dlg-bar-actions { flex-wrap: nowrap; }
  .lightbox { overflow: auto; -webkit-overflow-scrolling: touch; }
  .lightbox .lightbox-img { position: static; }
  .lightbox.is-framed .lightbox-img { height: max(100%, 420px); width: auto; max-width: none; margin: 0 16px; }
  .lightbox:not(.is-framed) .lightbox-img { width: 100%; height: auto; }
  .dlg-bar-actions { justify-content: flex-start; margin-left: -10px; }
  .props > div { grid-template-columns: 108px minmax(0, 1fr); }
}

@media (max-width: 979px) and (max-height: 560px) {
  .plan-inner { overflow-y: auto; }
  .lines { flex: none; overflow: visible; min-height: 0; }
}

@media (max-width: 979px) and (max-height: 720px) {
  .note-more { display: none; }
}

@media (max-width: 400px) {
  .dock-more { display: none; }
}

@media (max-width: 360px) {
  .tabs [role="tab"] .n { display: none; }
}

@media (max-width: 1279px) {
  .tabs { margin-left: 0; }
  .psel { margin-left: auto; }
  .psel-list { left: auto; right: 0; }
}
@media (max-width: 979px) {
  .loc { height: 84px; }
  .map-expand--one { top: 10px; right: 10px; }
}
@media (max-width: 600px) {
  :root { --top: 104px; }
  .topbar { flex-wrap: wrap; align-content: center; row-gap: 8px; }
  .tabs { margin-left: auto; }
  .psel { order: 9; flex: 0 0 100%; margin-left: 0; }
  .psel-box { height: 40px; }
  .psel-arrow { width: 40px; height: 36px; }
  .psel-cur { min-width: 76px; height: 36px; font-size: 15px; }
  .psel-list { left: 0; right: auto; min-width: min(280px, calc(100vw - 24px)); }
  .lightbox.is-stage { display: block; place-items: normal; overflow: auto; -webkit-overflow-scrolling: touch; }      /* place-items would center the wide map and cut off its left side */
  .lightbox.is-stage .map-crop { width: auto; height: max(100%, 420px); margin: 0 16px; }
  .lightbox.is-stage.is-focus { display: grid; place-items: center; overflow: hidden; }
  .lightbox.is-stage.is-focus .map-crop { width: min(100cqw - 20px, (100cqh - 20px) * var(--par)); height: auto; margin: 0; }
  .map-expand--one { display: none; }
  .map-back { top: 10px; left: 10px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

@media print {
  .topbar, .side, .dock, .scrim, .ctx, .card-actions, .actions, .actions-minor { display: none !important; }
  body { padding-top: 0; background: #fff; color: #000; }
  .app { display: block; }
  .plan { position: static; height: auto; border: 0; }
}
@media (max-width: 740px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 340px) { .psel-pos { display: none; } }
/* 601 to 740 px: the selector needs the room the "Proposals" label and the count take */
@media (min-width: 601px) and (max-width: 740px) { .tb-name { display: none; } .psel-pos { display: none; } }
/* text-style buttons line up with the text above them */
.prop-tools > .btn-quiet:first-child { margin-left: -10px; }
@media (max-width: 600px) { .sec-head > .btn-secmap { margin-left: -10px; } }

/* ---------- Phones and tablets: more screen for the units ---------- */
/* buttons are not text: a long press must not select their label */
button, .btn, .tabs [role="tab"], .side-sec, .dock { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }

.psel-menu, .psel-sec, .intro-more { display: none; }

@media (max-width: 979px) {
  /* the top bar and the tablet context bar stay fixed while scrolling (Biz, Nov 18) */
  .dock { transition: transform 0.22s var(--ease); }
  body.hide-dock .dock { transform: translateY(calc(100% + 24px + env(safe-area-inset-bottom))); }
}

@media (max-width: 600px) {
  /* two header rows: logo and tabs, then the menu, the selector and the section in view */
  .ctx { display: none; }
  html { scroll-padding-top: var(--top); }
  .psel-menu {
    display: inline-flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; padding: 0;
    border: 1px solid var(--line-2); border-radius: 10px; background: rgba(2, 3, 6, 0.5); color: var(--text);
  }
  .psel-menu svg { width: 18px; height: 18px; }
  .psel-pos { display: none; }
  .psel { min-width: 0; }
  .psel-sec { display: block; flex: 1; min-width: 0; color: var(--text-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .main { padding-top: 20px; }

  /* the top of a proposal: title, one line of counts, two lines of intro */
  .prop-title { background-image: none !important; color: var(--text) !important; -webkit-text-fill-color: currentColor !important; }
  .prop-meta { margin-top: 4px; }
  .prop-intro { margin-top: 8px; font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .prop-intro.is-open { display: block; -webkit-line-clamp: unset; }
  .intro-more { display: inline-block; margin: 2px 0 0 -4px; color: var(--text-2); font-size: 13.5px; }
  .intro-more[hidden] { display: none; }
  .prop-tools { margin-top: 12px; }
  .prop-head + .section { margin-top: 20px; }
  .section { margin-top: 32px; padding-top: 22px; }

  /* the section map sits beside its title */
  .sec-head { grid-template-columns: minmax(0, 1fr) auto; margin-bottom: 14px; }
  .sec-head > .btn { grid-column: 2; grid-row: 1; justify-self: end; align-self: start; margin: -2px 0 0 0; min-height: 36px; }
  .sec-head > .btn-secmap { margin-left: 0; padding-right: 0; }
  .sec-head > .sec-meta, .sec-head > .sec-note { grid-column: 1 / -1; }
  .sec-title { font-size: 21px; }
  /* the section's note: two lines, a tap opens the rest */
  .sec-note { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13.5px; cursor: pointer; }
  .sec-note.is-open { display: block; -webkit-line-clamp: unset; cursor: auto; }
  .intro-more { margin-top: 0; }
  .intro-more:not([hidden]) + .prop-tools { margin-top: 6px; }
}
/* phones and tablets: no plan bar until something is in the plan */
@media (max-width: 979px) { body.plan-empty .dock { display: none; } }
