/* ═══════════════════════════════════════════════════════════════════
   IHG POINTS FINDER — design system (Apple-inspired, light)
   Tokens → components → layout. Functionality lives in app.js.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  /* color */
  --bg: #ffffff;
  --bg-soft: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #f5f5f7;
  --surface-3: #ebebef;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #73737a;
  --neutral-3: #c7c7cc;   /* checkbox/radio checkmarks & quiet controls */
  --neutral-4: #a8a8ad;   /* subdued control borders */
  --neutral-5: #6e6e73;   /* secondary control text */
  --ink-soft: #2c2c2e;    /* dark button hover surface */
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-soft: rgba(0, 113, 227, 0.1);
  --ok: #23853b;
  --ok-soft: rgba(36, 138, 61, 0.1);
  --warn: #b25000;
  --warn-soft: rgba(178, 80, 0, 0.09);
  --danger: #c42b1c;
  --danger-soft: rgba(196, 43, 28, 0.08);
  --cash: #9a5b00;
  --points: #6d28d9;
  /* value categories — Poor → Fair → Great → Exceptional (labels/badges only;
     the calendar heatmap uses a continuous teal ramp, not these colors) */
  --v-low: #86868b;   --v-low-bg: rgba(134, 134, 139, 0.10);   --v-low-bd: rgba(134, 134, 139, 0.16);
  --v-normal: #0071e3; --v-normal-bg: rgba(0, 113, 227, 0.10); --v-normal-bd: rgba(0, 113, 227, 0.16);
  --v-high: #008c95;  --v-high-bg: rgba(0, 140, 149, 0.10);    --v-high-bd: rgba(0, 140, 149, 0.16);
  --v-extreme: #6e5ae6; --v-extreme-bg: rgba(110, 90, 230, 0.10); --v-extreme-bd: rgba(110, 90, 230, 0.16);
  /* calendar lenses — neutral surfaces + blue heat ramp */
  --cal-bg: #f5f5f7;
  --cal-border: #e8e8ed;
  --blue-1: #f5f9ff; --blue-2: #e8f2ff; --blue-3: #d6e9ff; --blue-4: #b9d8ff;

  /* typography */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
  --fs-hero: clamp(44px, 6vw, 64px);
  --fs-page: clamp(30px, 4.5vw, 44px);
  --fs-section: clamp(22px, 3vw, 30px);
  --fs-card: 19px;
  --fs-body: 15px;
  --fs-meta: 13px;
  --lh-tight: 1.08;
  --lh-body: 1.5;

  /* spacing scale (4px base) */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px; --sp-9: 96px;

  /* radius */
  --r-sm: 9px; --r-md: 13px; --r-lg: 18px; --r-xl: 24px; --r-pill: 999px;

  /* shadow — soft, restrained */
  --sh-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --sh-md: 0 2px 8px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.06);
  --sh-lg: 0 6px 20px rgba(0, 0, 0, 0.08), 0 24px 60px rgba(0, 0, 0, 0.1);

  /* motion */
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --t-fast: 160ms;
  --t-base: 260ms;
  --t-slow: 400ms;

  /* layout */
  --maxw: 1120px;
}

/* ── base ─────────────────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body {
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh; min-height: 100dvh;
}
::selection { background: var(--accent-soft); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }

/* ── nav ──────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px clamp(20px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.logo {
  width: 30px; height: 30px; border-radius: 9px;
  background-color: var(--text);
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M8 2l6 6-6 6-6-6z' fill='%23ffffff'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}
.brand h1 { font-size: 15px; font-weight: 650; letter-spacing: -0.01em; }
.tagline { font-size: 11.5px; color: var(--text-3); margin-top: 1px; }
.nav-live { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-2); }
.nav-live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

main { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(18px, 3.5vw, 40px) 96px; }

/* ── hero ─────────────────────────────────────────────────────────── */
.hero { text-align: center; padding: clamp(56px, 9vw, 104px) 16px clamp(40px, 6vw, 64px); }
.hero-title {
  font-size: var(--fs-hero); font-weight: 700; letter-spacing: -0.025em;
  line-height: var(--lh-tight); max-width: 20ch; margin: 0 auto;
  animation: rise 400ms var(--ease) both;
}
.hero-sub { margin-top: 18px; font-size: clamp(16px, 2vw, 19px); color: var(--text-2); max-width: 46ch; margin-inline: auto; animation: rise 400ms 70ms var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ── unified search surface ───────────────────────────────────────── */
.searchglass {
  max-width: 900px; margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-md);
  padding: 8px;
  transition: box-shadow var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}
.searchglass:focus-within { border-color: var(--border-strong); box-shadow: var(--sh-lg); }
.searchrow { display: flex; align-items: stretch; }
.sfield {
  appearance: none;
  background: transparent; border: 0; border-radius: var(--r-lg);
  color: var(--text); font-size: 15px; padding: 12px 16px; outline: none;
  transition: background var(--t-fast) var(--ease);
}
.sfield:hover { background-color: var(--surface-2); }
.ac-wrap { position: relative; flex: 1 1 260px; min-width: 200px; display: flex; }
.sfield-city { width: 100%; }
.sep { width: 1px; align-self: stretch; margin: 10px 0; background: var(--border); flex: none; }
.dr-wrap { display: flex; align-items: stretch; }
.sfield-dates { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; min-width: 196px; cursor: pointer; }
.dr-label { font-size: 10px; letter-spacing: 0.09em; color: var(--text-3); font-weight: 600; }
.dr-value { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
/* currency dropdown — same field language as destination/dates */
.cur-wrap { position: relative; display: flex; flex: 0 1 132px; min-width: 0; }
.sfield-cur { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; }
.cur-chev {
  width: 8px; height: 8px; flex: none;
  border-right: 1.5px solid var(--text-3); border-bottom: 1.5px solid var(--text-3);
  transform: rotate(45deg); margin-top: -3px;
  transition: transform var(--t-fast) var(--ease);
}
.sfield-cur[aria-expanded="true"] .cur-chev { transform: rotate(225deg); margin-top: 3px; }
.cur-panel {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 70;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--r-lg); box-shadow: var(--sh-lg);
  min-width: 100%; max-height: 320px; overflow-y: auto; padding: 6px;
  animation: pop 200ms var(--ease) both;
}
.cur-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  padding: 9px 14px; border: 0; background: transparent; color: var(--text);
  font-size: 14px; border-radius: var(--r-sm); cursor: pointer;
  /* A <button> defaults to text-align:center. Short labels hid it (the text box is
     only as wide as the label), but a label long enough to wrap filled the row and
     centred itself — "Holiday Inn Club Vacations" sat differently from every other
     brand. Dropdown rows always read from the left. */
  text-align: left;
  transition: background var(--t-fast) var(--ease);
}
.cur-item:hover, .cur-item:focus-visible { background: var(--surface-2); outline: none; }
.cur-item.active { font-weight: 650; }
.cur-check { color: var(--text-2); font-size: 12px; }
.btn-primary {
  border: 0; border-radius: var(--r-lg); margin: 2px; padding: 0 26px;
  background: var(--text); color: #fff; font-size: 14px; font-weight: 600; letter-spacing: 0.01em;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
}
.btn-primary:hover { background: var(--ink-soft); }
.btn-primary:disabled, .btn-ghost:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.btn-primary:active { transform: scale(0.975); }
#searchBtn[aria-busy="true"] { cursor: progress; }
.searchhint { margin: 16px 6px 0; font-size: var(--fs-meta); color: var(--text-3); text-align: center; }

/* autocomplete */
.ac-panel {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 70;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--r-lg); box-shadow: var(--sh-lg);
  overflow: hidden; max-height: 320px; overflow-y: auto;
  animation: pop 200ms var(--ease) both;
}
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(0.99); } to { opacity: 1; transform: none; } }
.ac-item { padding: 11px 18px; font-size: 14px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; }
.ac-item .ac-country { color: var(--text-3); font-size: 12px; }
.ac-item:hover, .ac-item.sel { background: var(--surface-2); }
.ac-item em { font-style: normal; color: var(--accent); }
.ac-empty { padding: 14px 18px; font-size: 13px; color: var(--text-3); }

/* date-range popover */
.dr-wrap { position: relative; }
.dr-popover {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%); z-index: 70;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--r-xl); box-shadow: var(--sh-lg);
  padding: 18px; width: max-content; max-width: min(94vw, 620px);
  animation: fadeIn 220ms var(--ease) both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.dr-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.dr-head > span { flex: 1; text-align: center; font-weight: 650; font-size: 14px; }
.iconbtn, .dr-head button {
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  border-radius: var(--r-sm); width: 32px; height: 32px; cursor: pointer; font-size: 16px; line-height: 1;
  transition: background var(--t-fast) var(--ease);
}
.iconbtn:hover, .dr-head button:hover { background: var(--surface-3); }
.dr-presets { display: flex; gap: 6px; margin-left: 6px; }
.dr-presets button { width: auto; padding: 0 13px; font-size: 12px; border-radius: var(--r-pill); color: var(--text-2); }
.dr-calendars { display: grid; grid-template-columns: repeat(2, minmax(248px, 1fr)); gap: 22px; }
.drmonth-title { text-align: center; font-size: 13px; font-weight: 650; margin-bottom: 10px; }
.drgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.drdow { text-align: center; font-size: 10px; color: var(--text-3); padding: 4px 0; }
.drday {
  border: 0; background: transparent; color: var(--text); border-radius: var(--r-sm);
  height: 36px; font-size: 13px; cursor: pointer; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.drday:hover { background: var(--surface-2); }
.drday.disabled { color: var(--text-3); opacity: 0.4; cursor: default; }
.drday.start, .drday.end, .drday.single { background: var(--accent); color: #fff; font-weight: 650; }
.drday.start { border-radius: var(--r-sm) 4px 4px var(--r-sm); }
.drday.end { border-radius: 4px var(--r-sm) var(--r-sm) 4px; }
.drday.inrange { background: var(--accent-soft); border-radius: 0; }

/* results header */
.resultmeta {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin: 40px 4px 18px;
}
.resultmeta .rt-title { font-size: var(--fs-section); font-weight: 700; letter-spacing: -0.02em; }
.resultmeta .meta-sub { color: var(--text-2); font-size: var(--fs-body); font-weight: 400; margin-top: 4px; display: block; }
.resultmeta select {
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--r-pill); padding: 9px 18px; font-size: 13px; outline: none; cursor: pointer;
  transition: border-color var(--t-fast) var(--ease);
}
.resultmeta select:hover { border-color: var(--border-strong); }

/* ── multi-city comparison: destination chips + per-city summary ─── */
.dest-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 6px 0; }
.dest-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-pill);
  padding: 6px 8px 6px 14px; font-size: 13px; font-weight: 600; color: var(--text);
}
.dest-chip em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--text-2); background: var(--surface-2); border-radius: var(--r-pill); padding: 1px 7px; }
.dest-x {
  border: 0; background: transparent; color: var(--text-3); cursor: pointer;
  font-size: 15px; line-height: 1; padding: 2px 5px; border-radius: var(--r-pill);
}
.dest-x:hover { color: var(--text); background: var(--surface-2); }
.citysummary {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 0 4px 18px;
}
.city-sum {
  font-size: 12.5px; color: var(--text-2); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-md); padding: 8px 14px;
}
.city-sum b { color: var(--text); }
.citypill {
  display: inline-block; padding: 1px 9px; border-radius: var(--r-pill);
  font-size: 11px; font-weight: 600; background: var(--accent-soft); color: var(--accent);
  margin-right: 7px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ── filters — premium brand selection ────────────────────────────── */
.filters { margin: 4px 0 22px; }
.filterrow { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-pill); padding: 7px 15px; cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip input[type="checkbox"] {
  appearance: none; width: 18px; height: 18px; border-radius: 50%; flex: none; cursor: pointer;
  border: 1px solid var(--neutral-3); background: #fff;
  background-position: center; background-repeat: no-repeat; background-size: 10px 8px;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.chip input[type="checkbox"]:checked {
  background-color: var(--neutral-5); border-color: var(--neutral-5);
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 8'%3E%3Cpath d='M1 4l3 3 5-6' fill='none' stroke='%23ffffff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.chip:hover input[type="checkbox"] { border-color: var(--neutral-4); }
.chip input[type="checkbox"]:active { transform: scale(0.9); }
.chip input[type="number"] { width: 70px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; color: var(--text); padding: 3px 8px; outline: none; }
/* category bar — one compact row of chips (parent circle + name + count + chevron) */
.tierbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tierchip {
  display: flex; align-items: center; gap: 2px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-pill);
  padding: 3px 4px 3px 6px;
  transition: border-color var(--t-fast) var(--ease);
}
.tierchip:hover { border-color: var(--border-strong); }
.tierchip-main {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 6px 10px; border-radius: var(--r-pill);
}
.tierchip .circle { width: 22px; height: 22px; }
.tiername { font-size: 12px; font-weight: 600; letter-spacing: 0.05em; color: var(--text-3); }
.tiercount { font-size: 11px; font-weight: 400; color: var(--text-3); }
.tierchev {
  width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: transparent; color: var(--text-2); cursor: pointer;
  display: grid; place-items: center; font-size: 16px;
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.tierchev:hover { background: var(--surface-2); }
.tierchev[aria-expanded="true"] { transform: rotate(180deg); }
.tierpanels { margin-top: 10px; }
.tierpanel { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); padding: 6px 10px 10px; }
.brandrow {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: 10px; cursor: pointer;
  transition: background var(--t-fast) var(--ease);
}
.brandrow:hover { background: var(--surface-2); }
.brandname { font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.35; }

/* circular selection control — graphite when selected, soft outline when not */
.circle {
  flex: none; width: 20px; height: 20px; border-radius: 50%;
  border: 1px solid var(--neutral-3); background: #fff;
  display: grid; place-items: center;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.brandrow:hover .circle, .parenttoggle:hover .circle { border-color: var(--neutral-4); }
.brandrow:active .circle, .parenttoggle:active .circle { transform: scale(0.9); }
.circle::after {
  content: ''; width: 5px; height: 9px; margin-top: -2px;
  border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg); opacity: 0;
  transition: opacity 150ms var(--ease);
}
.brandcb:checked + .circle, .parentcb:checked + .circle { background-color: var(--neutral-5); border-color: var(--neutral-5); }
.brandcb:checked + .circle::after, .parentcb:checked + .circle::after { opacity: 1; }
/* partial selection: quiet horizontal mark inside the circle */
.brandcb:indeterminate + .circle::after, .parentcb:indeterminate + .circle::after {
  content: ''; width: 8px; height: 2px; margin-top: 0;
  border: 0; background: #fff; border-radius: 1px; transform: none;
}
.brandcb:focus-visible + .circle, .parentcb:focus-visible + .circle { box-shadow: var(--focus-ring); }

/* results — premium cards */
.cards { display: flex; flex-direction: column; gap: 12px; }
.hcard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px 26px;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 0.9fr)) auto;
  align-items: start; gap: 20px;
  cursor: pointer;
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
  animation: rise 300ms var(--ease) both;
}
.cards.anim-done .hcard { animation: none; }
.hcard:hover { transform: translateY(-2px); box-shadow: var(--sh-md); border-color: var(--border-strong); }
.hcard:active { transform: scale(0.996); }
.hname { font-size: var(--fs-card); font-weight: 650; letter-spacing: -0.015em; display: block; }
.hsub { font-size: var(--fs-meta); color: var(--text-2); }
.brandpill { display: inline-block; padding: 1px 9px; border-radius: var(--r-pill); font-size: 11px; font-weight: 600; background: var(--surface-2); color: var(--text-2); margin-right: 7px; }
.metric { display: flex; flex-direction: column; gap: 2px; }
.metric .m-label { font-size: 10px; letter-spacing: 0.09em; color: var(--text-3); font-weight: 600; }
.metric .m-value { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; color: var(--cash); font-variant-numeric: tabular-nums; }
.metric.points .m-value { color: var(--points); }
.metric .m-total { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.metric .m-total .t-label { font-size: 9px; color: var(--text-3); letter-spacing: 0.08em; margin-right: 5px; }
.discbadge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: var(--r-pill); font-size: 10.5px; font-weight: 700; background: var(--warn-soft); color: var(--warn); }
.vcat { font-weight: 700; font-size: inherit; white-space: nowrap; }
.vcat .vcatsym { margin-right: 3px; }
.vcat.LOW { color: var(--v-low); } .vcat.NORMAL { color: var(--v-normal); } .vcat.HIGH { color: var(--v-high); } .vcat.EXTREMELY_HIGH { color: var(--v-extreme); }
/* category badge — subtle tinted surface, strong color text/dot, hairline border */
.vbadge {
  display: inline-flex; align-items: center; align-self: flex-start; gap: 5px;
  margin-top: 2px; padding: 3px 10px; border-radius: var(--r-pill);
  border: 1px solid transparent; font-size: 11.5px; font-weight: 650; letter-spacing: 0.02em; white-space: nowrap;
}
.vbadge .vcatsym { font-size: 8px; }
.vbadge.LOW { color: var(--v-low); background: var(--v-low-bg); border-color: var(--v-low-bd); }
.vbadge.NORMAL { color: var(--v-normal); background: var(--v-normal-bg); border-color: var(--v-normal-bd); }
.vbadge.HIGH { color: var(--v-high); background: var(--v-high-bg); border-color: var(--v-high-bd); }
.vbadge.EXTREMELY_HIGH { color: var(--v-extreme); background: var(--v-extreme-bg); border-color: var(--v-extreme-bd); }
.pill { display: inline-block; padding: 4px 13px; border-radius: var(--r-pill); font-size: 12px; font-weight: 650; white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.neutral { background: var(--surface-2); color: var(--text-2); }
.calbtn {
  background: var(--text); color: #fff; border: 0; border-radius: var(--r-md);
  padding: 10px 18px; font-size: 13px; font-weight: 600; white-space: nowrap;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
}
.calbtn:hover { background: var(--ink-soft); }
.calbtn:active { transform: scale(0.97); }
.hsub.native { display: block; margin-top: 2px; font-size: 11.5px; color: var(--warn); }

/* skeleton loading */
.sk {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 22px 26px; display: flex; flex-direction: column; gap: 10px;
}
.sk-line { height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 45%, var(--surface-2) 65%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.sk-line.w60 { width: 60%; } .sk-line.w40 { width: 40%; } .sk-line.w30 { width: 30%; }
.day.sk-day {
  background: linear-gradient(90deg, #ffffff 25%, #ececf0 45%, #ffffff 65%);
  background-size: 200% 100%; animation: shimmer 1.4s linear infinite;
  border-color: transparent; box-shadow: none; transform: none; pointer-events: none;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.empty-note { padding: 44px 20px; text-align: center; color: var(--text-2); font-size: 14px; }
/* Round-125: the zero-result card is a short checklist, not a paragraph. The
   bullets stay left-aligned inside the otherwise centred empty state. */
.empty-search ul { margin: .5rem 0 .75rem 1.1rem; padding: 0; text-align: left }
.empty-search li { margin: .2rem 0 }

/* status (skeletons carry the loading state; text stays informative) */
.status { font-size: var(--fs-meta); color: var(--text-2); padding: 8px 2px; min-height: 20px; }
.status.fetching { color: var(--accent); }

/* round-114: the age of the prices on screen, directly above the list. The
   per-view interval repaints it; the stale state turns the line gold and adds
   the one-tap refresh action. */
.freshness {
  margin-bottom: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
}
.freshness:empty { display: none; }
.freshness--stale { color: var(--gold); }
.freshness .freshness-refresh {
  margin-left: 8px;
  padding: 2px 10px;
  font-size: 12px;
  color: inherit;
  border-color: currentColor;
  vertical-align: baseline;
}

/* value info */
.valueinfo { margin-top: 18px; font-size: 12.5px; color: var(--text-3); line-height: 1.6; }
.valueinfo strong { color: var(--text-2); }
.valueinfo .sw { display: inline-block; width: 9px; height: 9px; border-radius: 4px; margin: 0 5px 0 2px; }
.rt-left { min-width: 0; }
.c-rec { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.c-act { display: flex; align-self: center; }
.monthlabel { font-size: 13px; font-weight: 650; min-width: 90px; text-align: center; }
.sw.t-low { background: var(--v-low); }
.sw.t-normal { background: var(--v-normal); }
.sw.t-high { background: var(--v-high); }
.sw.t-extreme { background: var(--v-extreme); }
.legend-sep { width: 1px; height: 12px; background: var(--border); align-self: center; }
.gradbar { display: inline-block; width: 34px; height: 8px; border-radius: 4px; margin-right: 5px; vertical-align: -1px; }
.gradbar-grey { background: linear-gradient(90deg, #363639, #0a0a0b); border: 1px solid var(--cal-border); }

/* ── hotel calendar view ──────────────────────────────────────────── */
.btn-ghost {
  background: transparent; color: var(--text-2); border: 1px solid var(--border);
  border-radius: var(--r-pill); padding: 9px 18px; font-size: 13px; cursor: pointer;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-strong); }
.back { margin-bottom: 28px; }
.hotelbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; animation: rise 400ms var(--ease) both; }
.hoteltitle {
  font-size: var(--fs-page); font-weight: 700; letter-spacing: -0.02em;
  /* Round-33: name and metadata are stacked with a REAL gap — under the old
     tight line-height the pills overlapped the title's descenders. */
  line-height: 1.12;
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  min-width: 0;
}
.hoteltitle .hotelname { display: block; line-height: 1.12; text-wrap: balance; }
.hoteltitle .sub { font-size: 15px; font-weight: 400; color: var(--text-2); margin-left: 0; }
.hotelbar-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.microlabel { font-size: 10px; letter-spacing: 0.09em; color: var(--text-3); font-weight: 600; }
.hotelbar-controls select {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 9px 14px; font-size: 13px; outline: none; cursor: pointer; max-width: min(60vw, 360px);
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2386868b' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 30px;
}
.hotelbar-controls .cur-wrap > button {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 9px 14px; font-size: 13px; cursor: pointer; color: var(--text);
  display: flex; align-items: center; gap: 10px;
  transition: border-color var(--t-fast) var(--ease);
}
.hotelbar-controls .cur-wrap > button:hover { border-color: var(--border-strong); }
.monthbar { display: flex; align-items: center; justify-content: center; gap: 12px; margin: -6px 0 16px; }
.monthbar .monthlabel { font-size: 15px; font-weight: 650; min-width: 110px; }

/* insights — editorial, not boxes */
.insights {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border: 1px solid var(--border); border-radius: var(--r-lg);
  overflow: hidden; margin-bottom: 28px; background: var(--surface);
}
.insight { padding: 20px 24px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.insight:nth-child(3n) { border-right: 0; }
.insight:nth-last-child(-n+3) { border-bottom: 0; }
.insight .k { font-size: 10.5px; letter-spacing: 0.09em; color: var(--text-3); font-weight: 600; }
.insight .v { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.insight .d { font-size: 12.5px; color: var(--text-2); margin-top: 3px; }
.insight.highlight { background: var(--v-high-bg); }

/* calendar card — gray board so the white cells read as a clean grid */
.calendar-card {
  background: var(--cal-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 28px;
  box-shadow: var(--sh-sm);
}
.calhead { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 20px; }
.calhead-left { display: flex; flex-direction: column; gap: 8px; }
.seg { display: inline-flex; background: var(--surface-3); border: 1px solid var(--cal-border); border-radius: var(--r-pill); padding: 3px; gap: 2px; }
.seg-item { border: 0; background: transparent; color: var(--text-2); font-size: 12.5px; font-weight: 600; padding: 7px 16px; border-radius: var(--r-pill); cursor: pointer; transition: background var(--t-base) var(--ease), color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease); }
.seg-item.active { background: var(--surface); color: var(--text); box-shadow: var(--sh-sm); }
.modecaption { font-size: 12px; color: var(--text-2); }
.legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--text-2); flex-wrap: wrap; align-items: center; }
.legend-cats { display: inline-flex; gap: 14px; flex-wrap: wrap; }
.legend-ramp { display: inline-flex; align-items: center; }
.legend .sw { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; }

.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; }
.dow { text-align: center; font-size: 10.5px; color: var(--text-3); letter-spacing: 0.07em; padding: 5px 0; font-weight: 600; }
/* Day cells — square tiles, neutral typography only (primary/secondary/tertiary).
   The background carries the analytical insight (blue = cheaper, violet = better value). */
.day {
  border: 1px solid var(--cal-border); border-radius: var(--r-md); padding: 10px 12px;
  aspect-ratio: 1 / 1; min-height: 86px; position: relative;
  min-width: 0; overflow: hidden; background: #fff;
  display: grid; grid-template-columns: 1fr; align-content: start; gap: 2px;
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}
.day:hover { transform: translateY(-2px); box-shadow: var(--sh-md); border-color: var(--border-strong); }
/* Round-43 (user request): a bookable day opens that night on IHG, so it looks
   pressable and is reachable from the keyboard. Past/closed nights have no
   data-ihg and stay inert. */
.day[data-ihg] { cursor: pointer; }
.day[data-ihg]:hover { box-shadow: var(--sh-md), 0 0 0 2px var(--accent-soft); }
.day .num { font-size: 11.5px; font-weight: 600; color: var(--text); }
.day .cash { font-size: 13.5px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.day .pts { font-size: clamp(11px, 0.98vw, 12.5px); font-weight: 600; color: var(--text-2); letter-spacing: -0.025em; font-variant-numeric: tabular-nums; overflow: visible; text-overflow: clip; }
.day .orig { font-size: 10px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.day .sec { font-size: 10.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.day .val { font-size: 12.5px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
/* classification — frame colour + dot only (round-81): the text chips clipped at
   tile width and made the grid read as noise, so no label is emitted any more. */
/* lens emphasis — the measured metric becomes the hero, placed for a calm tile */
.mode-CASH .day { grid-template-rows: auto 1fr; }
.mode-CASH .day .cash { font-size: 18px; align-self: center; }
.mode-POINTS .day { grid-template-rows: auto 1fr auto; }
.mode-POINTS .day .pts { font-size: 18px; font-weight: 700; color: var(--text); align-self: center; }
.mode-POINTS .day .orig { align-self: end; font-size: 12px; font-weight: 650; }
.mode-VALUE .day { grid-template-rows: auto auto 1fr; padding: 10px 8px; }
.mode-VALUE .day .val { font-size: 16px; margin-top: 14px; }
.mode-VALUE .day .sec { align-self: end; font-size: 12px; font-weight: 650; }
/* Overview: day, then cash and points stacked as one centred group. */
.mode-DUAL .day { grid-template-columns: 1fr; grid-template-rows: auto 1fr; grid-template-areas: "num" "mid"; padding: 10px 8px; }
.mode-DUAL .day .num { grid-area: num; }
.mode-DUAL .day .mid { grid-area: mid; align-self: center; display: grid; gap: 3px; min-width: 0; }
.mode-DUAL .day .pts { font-size: clamp(11px, 0.98vw, 12.5px); font-weight: 650; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; overflow: visible; text-overflow: clip; }
.mode-DUAL .day .orig { font-size: 11px; font-weight: 650; letter-spacing: -0.01em; }
.day.today { outline: 2px solid var(--accent); outline-offset: -2px; }
.day.closed { opacity: 0.45; background: var(--surface-3); }
.day.empty { border-style: dashed; opacity: 0.35; background: transparent; }
.calendar.enter { animation: calIn 380ms var(--ease) both; }
@keyframes calIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* stays */
.stays { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; margin-top: 20px; background: var(--surface); }
.stay { padding: 20px 24px; border-right: 1px solid var(--border); }
.stay:last-child { border-right: 0; }
.stay .k { font-size: 10.5px; letter-spacing: 0.09em; color: var(--text-3); font-weight: 600; }
.stay .v { font-size: 20px; font-weight: 700; margin-top: 6px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stay .d { font-size: 12.5px; color: var(--text-2); margin-top: 3px; }

.notes { margin-top: 18px; font-size: 12.5px; color: var(--text-2); line-height: 1.7; }
/* Round-29: the methodology line reads as a compact, scannable list. */
.notes-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.notes-list li { display: flex; align-items: baseline; gap: 9px; }
.notes-list li::before {
  content: ''; flex: 0 0 auto; width: 5px; height: 5px; margin-top: 0.45em;
  border-radius: 50%; background: var(--accent); opacity: 0.55;
}
.nl-key { flex: 0 0 auto; min-width: 96px; font-weight: 650; color: var(--text); }
.nl-text { color: var(--text-3); }
.notes-list .notes-warn { color: var(--warn-text, #8a5a00); }
.notes-list .notes-warn::before { background: var(--warn-text, #8a5a00); opacity: 0.8; }

/* ── responsive ───────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .hcard { grid-template-columns: 1fr 1fr; grid-template-areas: "name name" "value value" "cash points" "act act"; }
  .hcard .c-name { grid-area: name; }
  .hcard .c-cash { grid-area: cash; }
  .hcard .c-points { grid-area: points; }
  .hcard .c-value { grid-area: value; }
  .hcard .c-act { grid-area: act; justify-self: start; }
  .insights, .stays { grid-template-columns: 1fr 1fr; }
  .insight:nth-child(3n) { border-right: 1px solid var(--border); }
  .insight:nth-child(2n) { border-right: 0; }
  .insight:nth-last-child(-n+3) { border-bottom: 1px solid var(--border); }
  .insight:nth-last-child(-n+2) { border-bottom: 0; }
  .stay:nth-child(2n) { border-right: 0; }
  .stay:nth-last-child(-n+2) { border-right: 0; }
}
@media (max-width: 720px) {
  .searchrow { flex-wrap: wrap; }
  .searchrow .sep { display: none; }
  .searchrow .ac-wrap { flex-basis: 100%; }
  .sfield-dates { min-width: 100%; }
  .cur-wrap { flex: 1 1 30%; }
  .btn-primary { flex: 1 1 40%; width: auto; padding: 14px 0; }
  .dr-calendars { grid-template-columns: 1fr; }
  .drday { height: 40px; }
  .iconbtn, .dr-head > button { width: 40px; height: 40px; }
  .dr-head .dr-presets button { width: auto; height: 34px; padding: 0 12px; }
  .seg-item { padding: 9px 16px; }
  .chip { padding: 10px 16px; }
  .tierchev { width: 34px; height: 34px; font-size: 17px; }
  .tierchip-main { padding: 8px 10px; }
  .hoteltitle { font-size: 30px; }
  .day { min-height: 66px; padding: 6px; }
  .day .cash { font-size: 11.5px; } .day .pts { font-size: 11px; }
  .day .orig, .day .sec { display: none; }
  .mode-CASH .day .cash, .mode-POINTS .day .pts { font-size: 14px; }
  .mode-VALUE .day .val { font-size: 12px; margin-top: 8px; }
  .mode-CASH .day, .mode-POINTS .day { grid-template-rows: auto 1fr; }
  .mode-VALUE .day { grid-template-rows: auto auto; padding: 6px; }
  /* Overview on phones: single column, numbers only — the frame and dot carry the
     category at every width. */
  .mode-DUAL .day { padding: 6px; }
  .mode-DUAL .day .pts { font-size: 11px; }
  main { padding-bottom: 56px; }
  .calendar-card { padding: 18px; }
  .hcard { padding: 18px 20px; gap: 14px; }
}

/* ── Value Watch ──────────────────────────────────────────────────── */
.topnav { display: flex; align-items: center; gap: 18px; }
.navlink {
  border: 0; background: transparent; color: var(--text-2); font-size: 13px; font-weight: 600;
  padding: 7px 14px; border-radius: var(--r-pill); cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.navlink:hover { background: var(--surface-2); color: var(--text); }
.navlink.active { background: var(--surface-2); color: var(--text); }
.btn-watch {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-pill);
  padding: 10px 18px; font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.btn-watch:hover { border-color: var(--border-strong); box-shadow: var(--sh-sm); }
.btn-watch:active { transform: scale(0.98); }
.hotelbar-watch { margin-bottom: 18px; }

/* watch sheet — desktop modal, mobile bottom sheet */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 210;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  animation: fadeIn 200ms var(--ease) both;
}
.sheet {
  position: fixed; z-index: 211; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; color-scheme: dark;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--r-xl); box-shadow: var(--sh-lg);
  animation: sheetIn 240ms var(--ease) both;
}
@keyframes sheetIn { from { opacity: 0; transform: translate(-50%, -46%); } to { opacity: 1; transform: translate(-50%, -50%); } }
.sheet-inner { padding: 24px 26px 20px; display: flex; flex-direction: column; gap: 14px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-head h3 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.sheet-lead { font-size: 13.5px; color: var(--text-2); }
.sheet-body { display: flex; flex-direction: column; gap: 14px; }
.sheet-error { font-size: 12.5px; color: var(--danger); }
.sheet-success h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.015em; }
.sheet-success p { font-size: 13.5px; color: var(--text-2); margin-top: 8px; line-height: 1.6; }
.sheet-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }

.wf-row { display: flex; align-items: center; gap: 16px; }
.wf-label { flex: 0 0 150px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; color: var(--text-3); }
.wf-value { font-size: 14.5px; font-weight: 600; color: var(--text); }
.wf-dates { display: flex; align-items: center; gap: 8px; }
.wf-sep { color: var(--text-3); }
.wf-input {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 9px 12px; font-size: 14px; color: var(--text); outline: none;
  transition: border-color var(--t-fast) var(--ease);
}
.wf-input:focus { border-color: var(--border-strong); }
.wf-input[aria-invalid="true"] { border-color: #e5484d; box-shadow: 0 0 0 1px #e5484d; }
input.wf-input[type="date"] { min-width: 140px; }
.wf-select { min-width: 220px; cursor: pointer; }
.wf-stepper { display: flex; align-items: center; gap: 10px; }
.wf-stepper-value { font-size: 17px; font-weight: 700; min-width: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.wf-unit { font-size: 13px; color: var(--text-2); margin-right: 6px; }
.wf-advanced { border-top: 1px solid var(--border); padding-top: 10px; }
.wf-advanced summary { list-style: none; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--text-2); user-select: none; }
.wf-advanced summary::-webkit-details-marker { display: none; }
.wf-advanced summary::before { content: '▸'; display: inline-block; margin-right: 8px; color: var(--text-3); transition: transform var(--t-base) var(--ease); }
.wf-advanced[open] summary::before { transform: rotate(90deg); }
.wf-adv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.wf-field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--text-2); }
.wf-field input { width: 100%; }

/* ── Discover ─────────────────────────────────────────────────────── */
.d-glass { max-width: 980px; }
.d-month { min-width: 132px; cursor: pointer; }
.d-stay { display: flex; align-items: center; gap: 10px; padding: 0 10px; }
.stepper-btn:disabled { opacity: .4; cursor: not-allowed; }
.d-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 4px 0; }
.d-chip { background: var(--surface); font-weight: 600; }
.d-chip.active { border-color: var(--text); color: var(--text); }
.d-advanced { margin: 12px 4px 0; }
.d-adv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 12px; align-items: end; }
/* Round-44 (user request): the Discover filters read as one aligned row: the
   label sits above a full-width popover control (the location bar's own
   component). The weekend constraint moved to the chip strip in round-71, so
   there is no toggle to align here. */
.d-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.d-label { font-size: 12px; color: var(--text-2); }
.d-wrap { flex: 1 1 auto; width: 100%; }
.d-select { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; text-align: left; cursor: pointer; }
.d-select .d-select-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) {
  .d-adv-grid { grid-template-columns: 1fr; }
}
/* Round-44: the points-budget controls (input + summary head) were removed at
   the user's request; their styles went with them. */.d-value { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.d-sweet {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--v-extreme-bg); border: 1px solid var(--v-extreme-bd); color: var(--v-extreme);
  border-radius: var(--r-md); padding: 10px 16px; font-size: 13px; font-weight: 600;
}
.d-sweet-label { letter-spacing: 0.07em; font-size: 10.5px; }
.d-alts {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; gap: 2px;
  border-top: 1px dashed var(--border); padding-top: 8px;
  font-size: 12.5px; color: var(--text-2);
}
.d-alts span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-alts span::before { content: '✦ '; color: var(--text-3); }
.d-ihg { text-decoration: none; display: inline-block; }

/* ── "You've saved" impact strip ──────────────────────────────────── */
.impact {
  display: flex; gap: 0; flex-wrap: wrap;
  border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden;
  background: var(--surface); margin: 34px 4px 0;
  animation: rise 300ms var(--ease) both;
}
.impact-item { flex: 1 1 200px; padding: 16px 22px; border-right: 1px solid var(--border); }
.impact-item:last-child { border-right: 0; }
.impact-item .k { font-size: 10px; letter-spacing: 0.09em; color: var(--text-3); font-weight: 600; }
.impact-item .v { display: inline-block; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin-top: 5px; font-variant-numeric: tabular-nums; }
.impact-item .u { margin-left: 7px; font-size: 12.5px; color: var(--text-2); }

/* ── dashboard ────────────────────────────────────────────────────── */
.watches-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 40px 4px 22px; }
.wt-title { font-size: var(--fs-page); font-weight: 700; letter-spacing: -0.02em; }
.wt-summary { margin-top: 6px; font-size: 14px; color: var(--text-2); }
.wt-list { display: flex; flex-direction: column; gap: 12px; }
.wt-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 20px 24px;
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 18px;
  animation: rise 300ms var(--ease) both;
}
.wt-hotel { font-size: 19px; font-weight: 650; letter-spacing: -0.015em; }
.wt-window { margin-top: 5px; font-size: 13px; color: var(--text-2); }
.wt-window strong { color: var(--text); font-weight: 600; }
.wt-best { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.wt-best-label { font-size: 10px; letter-spacing: 0.09em; color: var(--text-3); font-weight: 600; }
.wt-best-date { font-size: 14px; font-weight: 650; color: var(--text); }
.wt-best-metric { font-size: 12.5px; color: var(--text-2); }
.wt-best-none { font-size: 12.5px; color: var(--text-3); }
.wt-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.wt-checked { font-size: 11.5px; color: var(--text-3); }
.wt-actions { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 12px; margin-top: 2px; }
.wt-act {
  border: 0; background: transparent; color: var(--text-2); font-size: 12.5px; font-weight: 600;
  padding: 6px 12px; border-radius: var(--r-pill); cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.wt-act:hover { background: var(--surface-2); color: var(--text); }
.wt-act.danger { color: var(--danger); }
.wt-act.danger:hover { background: var(--danger-soft); color: var(--danger); }
.wt-empty { text-align: center; padding: 72px 20px; }
.wt-empty h2 { font-size: var(--fs-section); font-weight: 700; letter-spacing: -0.02em; }
.wt-empty p { margin: 12px auto 22px; color: var(--text-2); max-width: 42ch; font-size: 15px; }
.d-empty-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; row-gap: 6px; }
  .topnav { gap: 8px; }
  .topnav .navlink { font-size: 12px; padding: 6px 9px; }
  .nav-live { display: none; }
  .hero { padding: 40px 16px 26px; }
  .hero-title { font-size: 27px; }
  /* Round-5 #4: suggestions push the controls down instead of covering the
     Search action (an overlaid panel used to swallow taps on Search). */
  .ac-panel { position: static; width: 100%; margin-top: 6px; max-height: 44vh; overflow-y: auto; }
  .sheet {
    width: calc(100vw - 20px); bottom: 0; top: auto; left: 50%; transform: translateX(-50%);
    border-radius: var(--r-xl) var(--r-xl) 0 0; max-height: calc(100vh - 60px); max-height: calc(100dvh - 60px);
    animation: sheetInM 260ms var(--ease) both;
  }
  @keyframes sheetInM { from { opacity: 0; transform: translate(-50%, 24px); } to { opacity: 1; transform: translate(-50%, 0); } }
  .wf-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .wf-label { flex: none; }
  .wf-dates { width: 100%; }
  input.wf-input[type="date"] { flex: 1; min-width: 0; }
  .wf-select { width: 100%; }
  .wf-adv-grid { grid-template-columns: 1fr; }
  .wt-card { grid-template-columns: 1fr; }
  .wt-side { align-items: flex-start; }
  .h-stay { flex-wrap: wrap; }
  .h-stay input[type="date"] { flex: 1 1 120px; min-width: 0; }
}

/* ── Rebook Guardian + notifications ─────────────────────────────── */
.hotelbar-watch { display: flex; gap: 8px; flex-wrap: wrap; }
.wf-hotel-pick { display: flex; gap: 8px; flex: 1; min-width: 0; }
.wf-hotel-pick .wf-input { min-width: 0; }
.wf-hotel-pick input { flex: 0 0 auto; height: 40px; min-height: 40px; max-height: 40px; width: 100%; box-sizing: border-box; }
.wf-hotel-pick select { flex: 0 0 auto; height: 40px; min-height: 40px; max-height: 40px; width: 100%; box-sizing: border-box; }
.g-sec { margin-top: 44px; border-top: 1px solid var(--border); padding-top: 34px; }
.g-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.wt-note { margin-top: 6px; font-size: 11.5px; color: var(--text-3); line-height: 1.5; }
.wt-best-metric.save { color: var(--ok); font-weight: 700; }
.guardian-ctx {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 14px 18px; margin-bottom: 18px;
  animation: rise 300ms var(--ease) both;
}
.gctx-label { font-size: 10px; letter-spacing: 0.09em; color: var(--text-3); font-weight: 600; }
.gctx-text { font-size: 13.5px; color: var(--text-2); }
.gctx-text strong { color: var(--text); font-weight: 650; }
.gctx-link { margin-left: auto; text-decoration: none; }
.notif-wrap { position: relative; }
.notif-badge {
  display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px; background: var(--text); color: #fff;
  font-size: 10px; font-weight: 700; vertical-align: 1px; margin-left: 2px;
}
.notif-panel {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 80;
  width: min(360px, calc(100vw - 32px)); max-height: min(480px, calc(100vh - 120px)); max-height: min(480px, calc(100dvh - 120px));
  overflow-y: auto; background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--r-lg); box-shadow: var(--sh-lg); padding: 6px;
  animation: pop 200ms var(--ease) both;
}
.notif-empty { padding: 26px 16px; text-align: center; font-size: 13px; color: var(--text-3); }
.notif-item {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px; width: 100%;
  text-align: left; border: 0; background: transparent; border-radius: var(--r-sm);
  padding: 12px 14px; cursor: pointer;
  transition: background var(--t-fast) var(--ease);
}
.notif-item:hover { background: var(--surface-2); }
.notif-item.unread { background: var(--accent-soft); }
.notif-item.unread:hover { background: rgba(0, 113, 227, 0.16); }
.notif-title { font-size: 13.5px; font-weight: 650; color: var(--text); }
.notif-hotel { font-size: 12px; font-weight: 600; color: var(--text-2); }
.notif-line { font-size: 12px; color: var(--text-2); line-height: 1.45; }
.notif-time { font-size: 10.5px; color: var(--text-3); margin-top: 2px; }
.notif-allread { width: 100%; border: 0; background: transparent; color: var(--accent); font-size: 12px; font-weight: 600; padding: 10px; cursor: pointer; border-radius: var(--r-sm); }
.notif-allread:hover { background: var(--surface-2); }

/* ── Value History ────────────────────────────────────────────────── */
.history-sec { margin-top: 44px; border-top: 1px solid var(--border); padding-top: 34px; }
.h-stay { display: flex; align-items: center; gap: 8px; }
.h-stay input[type="date"] { min-width: 138px; }
.h-empty { text-align: center; padding: 44px 20px; border: 1px dashed var(--border-strong); border-radius: var(--r-lg); }
.h-empty h3 { font-size: 19px; font-weight: 650; letter-spacing: -0.015em; }
.h-empty p { margin: 10px auto 18px; color: var(--text-2); max-width: 44ch; font-size: 14px; }
.h-hero { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.h-hero-value { font-size: 34px; font-weight: 700; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.h-hero-sub { font-size: 13.5px; color: var(--text-2); }
.h-chart { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px 14px 8px; }
.h-svg { width: 100%; height: auto; display: block; touch-action: manipulation; }
.h-line { stroke: var(--text); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.h-grid { stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 4; }
.h-dot { fill: var(--surface); stroke: var(--text); stroke-width: 1.5; }
.h-dot.cur { fill: var(--text); }
.h-tip {
  position: absolute; top: 4px; z-index: 5; pointer-events: none;
  display: flex; flex-direction: column; gap: 2px;
  background: var(--text); color: #fff; border-radius: var(--r-md);
  padding: 10px 13px; font-size: 12px; min-width: 170px;
  box-shadow: var(--sh-lg);
}
.h-tip-date { font-weight: 700; font-size: 12.5px; margin-bottom: 2px; }
.h-stats { display: flex; gap: 0; flex-wrap: wrap; margin-top: 14px; border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.h-stat { flex: 1 1 160px; padding: 14px 18px; border-right: 1px solid var(--border); }
.h-stat:last-child { border-right: 0; }
.h-stat .k { font-size: 10px; letter-spacing: 0.09em; color: var(--text-3); font-weight: 600; }
.h-stat .v { font-size: 16.5px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.h-sweet {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 14px; padding: 13px 18px; border-radius: var(--r-lg);
  background: var(--v-high-bg); border: 1px solid var(--v-high-bd); color: var(--v-high);
  font-size: 13px; font-weight: 600;
}
.h-sweet-label { letter-spacing: 0.07em; font-size: 11px; }
.h-coverage { margin-top: 14px; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--text-2); }
.h-insight-title { font-weight: 700; color: var(--text); font-size: 14px; }
.h-cov { color: var(--text-3); font-size: 11.5px; }

/* ── exact-stay decision header (round-5 #1/#3) ─────────────────── */
.stay-summary {
  display: flex; flex-direction: column; gap: 4px;
  margin: 26px 4px 6px; padding: 14px 18px;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--r-lg); box-shadow: var(--sh-sm);
}
.stay-sum-head {
  font-size: 10px; letter-spacing: 0.09em;
  color: var(--text-3); font-weight: 600;
}
.stay-sum-body { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* Round-31 (user request): the verdict, its category badge and the
   recommendation share ONE centred line — the badge used to ride high on
   `align-self: flex-start`. */
.stay-sum-body .vbadge { align-self: center; margin-top: 0; }
.stay-sum-body .pill { display: inline-flex; align-items: center; }
/* Round-32: the booking handoff (verdict block + each best-window box). */
.stay-sum-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.stay-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 650; color: var(--accent); text-decoration: none;
  padding: 6px 13px; border: 1px solid var(--border-strong); border-radius: var(--r-pill);
  background: var(--surface); transition: border-color var(--t-base) var(--ease), background var(--t-base) var(--ease);
}
.stay-link:hover, .stay-link:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.stay-note { font-size: 11.5px; color: var(--text-3); }
.stay-handoff { margin-top: 10px; }
.stay-handoff .stay-link { padding: 5px 11px; font-size: 12px; }
.stay-sum-body .pill { display: inline-flex; align-items: center; }
.stay-sum-main { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stay-sum-sub { font-size: 13px; color: var(--text-2); width: 100%; }
.c-rec-inline { margin-top: 6px; }
/* (round: the "Either" gloss was removed — the verdict pill states it alone) */
.notif-expired { font-size: 10.5px; font-weight: 700; color: var(--text-3); letter-spacing: 0.06em; margin-top: 2px; }
/* Round-17: delivery status lines + browser-notification toggle */
.notif-actions { padding: 8px 12px; border-bottom: 1px solid var(--line, rgba(0, 0, 0, 0.08)); }
.notif-browser { font-size: 12px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line, rgba(0, 0, 0, 0.12)); background: transparent; color: var(--text-2); cursor: pointer; }
.notif-browser[aria-pressed="true"] { background: var(--accent, #0071e3); border-color: var(--accent, #0071e3); color: #fff; }
.notif-delivery { display: block; font-size: 10.5px; color: var(--text-3); margin-top: 2px; }
.notif-delivery.dead { color: #c0392b; font-weight: 600; }
.wt-head-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
#wtList, #gSec { scroll-margin-top: 84px; }
/* Round-33 (reviewer r28 #5: "avoid an oversized rectangular heading
   outline"): the route focuses this heading programmatically, so a mouse click
   on a hotel card used to paint a big blue box around the title AND its
   metadata pills. Focus transfer is preserved; the indicator is now
   keyboard-only (:focus-visible) and hugs the hotel name instead of the whole
   block — a visible replacement, never an invisible focus. */
.hoteltitle:focus { outline: none; }
.hoteltitle:focus-visible .hotelname { box-shadow: var(--focus-ring); border-radius: 8px; }
.hotelbar-main .sub { display: flex; flex-wrap: wrap; gap: 6px; }
/* Round-29: the title's metadata chips are compact pills — they used to
   inherit the segmented-control look from the shared .seg class. */
.hotelbar-main .sub .seg {
  white-space: nowrap;
  font-size: 11px;
  font-weight: 550;
  letter-spacing: 0.015em;
  padding: 2px 9px;
  color: var(--text-2);
  background: var(--surface-3);
  border: 1px solid var(--cal-border);
  border-radius: var(--r-pill);
  display: inline-flex;
  align-items: center;
}
.hotelbar-main .sub .seg + .seg::before { content: none; }
/* Round-29: label + control travel together, so the currency options sit on
   the SAME line as the "Currency" label instead of wrapping away from it. */
.hotelbar-controls .ctl-group { display: flex; align-items: center; gap: 10px; min-width: 0; }
#wtList:focus, #gSec:focus { outline: 2px solid var(--accent-soft); outline-offset: 4px; border-radius: 14px; }

/* ── toast — shared non-blocking feedback (round-4 review #8) ─────── */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(12px);
  z-index: 120; max-width: min(420px, calc(100vw - 32px));
  background: var(--ink-soft); color: #fff; font-size: 13px; font-weight: 600;
  padding: 11px 18px; border-radius: var(--r-pill); box-shadow: var(--sh-lg);
  opacity: 0; transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease);
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
/* Round-121: an actionable toast keeps the message and Undo on one line; the
   button re-enables pointer events that .toast disables, and stays a native,
   keyboard-focusable button. */
.toast.has-action { display: flex; align-items: center; flex-wrap: wrap; }
.toast-action {
  min-height: 44px;
  margin-left: 12px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--gold);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  pointer-events: auto;
  border-radius: 6px;
}
.toast-action:hover,
.toast-action:focus-visible { text-decoration: underline; }
.toast-action:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ── round-25: returning-trip briefing, monitoring strip, recovery ────────── */
.briefing {
  border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface);
  padding: 18px 20px; margin-bottom: 18px; display: grid; gap: 10px;
}
.bf-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.bf-title { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
.bf-count { font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.bf-nearest { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }
.bf-when { font-size: 11px; font-weight: 700; letter-spacing: 0.07em; color: var(--accent); }
.bf-hotel { font-size: 15px; }
.bf-dates { font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.bf-check { font-size: 12.5px; color: var(--text-2); }
.bf-found { font-size: 12.5px; font-weight: 650; color: var(--ok, #1d7a4d); }
.bf-none { font-size: 12.5px; color: var(--text-3); }
.bf-since { font-size: 12.5px; color: var(--text-2); margin: 0; }
.bf-flag { font-size: 12.5px; color: var(--warn-text, #8a5a00); margin: 0; }
.bf-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.bf-actions .btn-primary, .bf-actions .btn-ghost { width: auto; padding: 9px 16px; font-size: 13px; }

.monstrip {
  border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface-2, var(--surface));
  padding: 12px 16px; margin-bottom: 14px; display: grid; gap: 8px;
}
.mon-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mon-state { font-size: 12.5px; color: var(--text-2); }
.mon-state strong { color: var(--text-1); }
.mon-state.busy strong::after { content: ' ·'; animation: monPulse 1.2s infinite; }
@keyframes monPulse { 0%, 100% { opacity: 1 } 50% { opacity: 0.35 } }
.mon-actions { display: flex; gap: 8px; }
.mon-actions .btn-ghost { padding: 6px 12px; font-size: 12.5px; }
.mon-note { font-size: 12px; color: var(--text-3); margin: 0; line-height: 1.6; }
/* Round-37: each background programme gets its own line, so the note reads as a
   short list instead of one run-on sentence. */
#monTaskLine, #monCollectLine { display: block; margin-top: 6px; }
#monTaskLine { margin-top: 2px; }
/* Round-37: when daily collection is ON it is visible in the main row too, so
   the state never hides behind the "How checks work" disclosure. */
.mon-badge { color: var(--accent); font-weight: 550; }
.mon-note code { font-size: 11.5px; background: var(--surface-3, rgba(0,0,0,0.05)); padding: 1px 5px; border-radius: 4px; }

.recovery {
  border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface);
  padding: 18px 20px; display: grid; gap: 10px; margin-top: 14px;
}
.rec-title { font-size: 16px; margin: 0; }
.rec-body { font-size: 13px; color: var(--text-2); margin: 0; line-height: 1.6; }
.rec-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.rec-actions .btn-primary, .rec-actions .btn-ghost { width: auto; padding: 9px 16px; font-size: 13px; }
.rec-hint { font-size: 11.5px; color: var(--text-3); margin: 0; }

.wt-empty-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.wt-empty-actions .btn-primary, .wt-empty-actions .btn-ghost { width: auto; padding: 10px 18px; }
.wt-card.ended { opacity: 0.72; }
.filters-toggle { display: none; }
.tierwrap[hidden] { display: none; }
.wt-sec-title { margin-top: 18px; }
/* round-26: briefing v2 groups + background-check line */
.bf-group { display: grid; gap: 6px; }
.bf-group-title { font-size: 11.5px; font-weight: 700; letter-spacing: 0.07em; color: var(--text-3); margin: 4px 0 0; }
.bf-row { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; text-align: left; background: transparent; border: 0; padding: 4px 0; font: inherit; color: inherit; border-radius: 8px; }
button.bf-row { cursor: pointer; }
button.bf-row:hover, button.bf-row:focus-visible { background: var(--surface-3, rgba(0, 0, 0, 0.04)); }
.bf-row.alert .bf-note-lead { color: var(--accent); font-weight: 650; }
.bf-row.quiet { opacity: 0.72; }
.mon-task-actions { display: inline-flex; gap: 8px; margin-left: 6px; flex-wrap: wrap; }
.mon-task-actions .btn-ghost { padding: 4px 10px; font-size: 11.5px; }
.data-details { margin-top: 6px; }
.data-details summary { cursor: pointer; font-size: 11.5px; color: var(--text-3); }
.data-details p { margin: 6px 0; font-size: 11.5px; line-height: 1.6; }
/* round-27: deep-linked card highlight + collapsible quiet briefing group */
.wt-card.focused { outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: var(--sh-lg); }
.bf-group.quiet summary { cursor: pointer; list-style: none; display: block; }
.bf-group.quiet summary::-webkit-details-marker { display: none; }
.bf-group.quiet summary::before { content: '▸ '; }
.bf-group.quiet[open] summary::before { content: '▾ '; }

@media (max-width: 720px) {
  /* Round-25 (reviewer finding #5): on a phone the ANSWER leads — the verdict
     sits above the metric split, and the brand-tier wall collapses behind a
     toggle so the first hotel is not pushed below the fold. */
  .filters-toggle { display: inline-flex; padding: 8px 14px; font-size: 12.5px; }
  #valueLegend { font-size: 11.5px; line-height: 1.55; }
  #valueTeach { font-size: 12px; }
  .tierbar { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .briefing { padding: 14px 16px; }
  .bf-title { font-size: 16px; }
}

/* ── reduced motion ───────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ── round-112: global keyboard shortcuts + help dialog ───────────── */
.shortcuts-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--text-3);
  font: inherit;
  font-size: 11px;
  line-height: 1.5;
  cursor: pointer;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
    background var(--t-fast) var(--ease);
}
.shortcuts-hint:hover,
.shortcuts-hint:focus-visible {
  border-color: var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
}
.shortcuts-hint kbd { color: var(--gold); }

.shortcuts-dialog {
  width: min(420px, calc(100vw - 32px));
  max-width: 420px;
  padding: 24px 26px 22px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--sh-lg);
}
.shortcuts-dialog::backdrop { background: rgba(0,0,0,.55); }
.shortcuts-dialog[open] { animation: shortcuts-dialog-in 180ms var(--ease) both; }
@keyframes shortcuts-dialog-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.shortcuts-dialog h2 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.shortcuts-dialog dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  align-items: center;
  gap: 10px 16px;
  margin: 18px 0 22px;
}
.shortcuts-dialog dt { margin: 0; }
.shortcuts-dialog dd { margin: 0; color: var(--text-2); font-size: 13.5px; }
.shortcuts-dialog kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6em;
  padding: 2px 6px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--gold);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}
.shortcuts-dialog .btn-ghost { display: block; margin-left: auto; }

@media (pointer: coarse) {
  .shortcuts-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .shortcuts-dialog[open] { animation: none; }
}

/* ── round-116: dismissible "Install app" header button ───────────── */
.install-app-btn {
  font-size: 13px;
  padding: 6px 12px;
  border-color: var(--gold);
  color: var(--gold);
}
/* titanium.css loads after this file and gives .btn-ghost neutral chrome. The
   header-scoped selector keeps the install action champagne-gold in the shipped
   cascade at rest, on hover and while keyboard-focused. */
.topbar .install-app-btn,
.topbar .install-app-btn:hover,
.topbar .install-app-btn:focus-visible {
  border-color: var(--gold);
  color: var(--gold);
}

@media print {
  .install-app-btn { display: none !important }
}

/* ── round-120: accessible branded confirm dialog ─────────────────── */
/* One Surface-style card replaces window.confirm(). It uses the same graphite
   surface / hairline / gold language as the .pm-modal and .shortcuts-dialog,
   with the safe Cancel action first and the gold (or danger) action last. */
.ipf-confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.ipf-confirm-backdrop[hidden] { display: none !important; }

.ipf-confirm {
  width: 100%;
  max-width: 420px;
  padding: 24px 24px 20px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: #1c1c1e;
  background: var(--surface);
  color: #f5f5f7;
  color: var(--text);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 30px 80px rgba(0, 0, 0, 0.78),
    0 0 0 1px rgba(200, 162, 90, 0.1);
  animation: ipf-confirm-in 180ms var(--ease) both;
}
@keyframes ipf-confirm-in {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.ipf-confirm h2 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.ipf-confirm p {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.ipf-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}
.ipf-confirm-actions button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 9px;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.ipf-confirm-cancel {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-strong);
  color: var(--text);
}
.ipf-confirm-cancel:hover { background: rgba(255, 255, 255, 0.14); }
.ipf-confirm-ok {
  background: #c8a25a;
  background: var(--gold);
  border-color: #c8a25a;
  border-color: var(--gold);
  color: #08090c;
}
.ipf-confirm-ok:hover { background: #e5c178; border-color: #e5c178; }
.ipf-confirm-ok.danger {
  background: #e5484d;
  background: var(--danger);
  border-color: #e5484d;
  border-color: var(--danger);
  color: #ffffff;
}
.ipf-confirm-ok.danger:hover { background: #f16a6e; border-color: #f16a6e; }
.ipf-confirm-actions button:focus-visible {
  box-shadow: 0 0 0 2px #08090c, 0 0 0 4px #c8a25a;
  box-shadow: var(--focus-ring);
}

/* Phones: the decision buttons become a full-width stack. Because the DOM is
   Cancel then Confirm (Cancel is the safe initial focus), column-reverse puts
   Confirm on top while preserving that keyboard/screen-reader order. */
@media (max-width: 480px) {
  .ipf-confirm { padding: 20px 18px 16px; }
  .ipf-confirm-actions { flex-direction: column-reverse; }
  .ipf-confirm-actions button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .ipf-confirm { animation: none; }
  .ipf-confirm-actions button { transition: none; }
}

/* round-127: the no-JS fallback, the only content a visitor without
   JavaScript sees before the app shell. */
.noscript-note {
  margin: 1rem auto;
  max-width: 40rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  background: #fff8e6;
  color: #3a2a00;
  border: 1px solid #e8c766;
  font: inherit;
  text-align: center;
}

/* round-133: clear button inside the destination fields */
.input-clear {
  position: absolute; right: .5rem; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; font-size: 1.1rem; line-height: 1;
  padding: .25rem .4rem; cursor: pointer; color: inherit; opacity: .65;
}
.input-clear:hover, .input-clear:focus-visible { opacity: 1; }
.has-input-clear { position: relative; }
#cityInput, #dCity { padding-right: 2rem; }
