:root {
  color-scheme: light;
  --bg: #fafafa;
  --card: #ffffff;
  --card2: #fafcfb;
  --soft: #f1f1f1;
  --softer: #eeeeee;
  --tablehead: #f3f3f3;
  --mapbg: #f7fafc;
  --zebra: #fbfbfb;
  --chartgrid: #ececec;
  --border-input: #cccccc;
  --green: #0a7d28;
  --green-bg: #e7f6ec;
  --amber: #8a6d00;
  --amber-bg: #fdf3d6;
  --red: #b00020;
  --gray: #666;
  --line: #e3e3e3;
  --ink: #1a1a1a;
}

* { box-sizing: border-box; }

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--ink);
  margin: 0;
  background: var(--bg);
  line-height: 1.45;
}

/* wanderlust doodle layer: faint travel line-art tiled behind the cards.
   A real fixed div (not a pseudo-element) for maximum renderer compatibility;
   cards/tables are solid, so text stays crisp. */
.bgdoodle {
  position: fixed;
  top: -140px; left: 0; right: 0; bottom: -140px;   /* headroom for scroll parallax */
  background: url("/bg.svg") repeat;
  background-size: 760px 760px;
  opacity: var(--doodle, 0.07);
  pointer-events: none;
  z-index: 0;
}
/* seasonal accent layer: swapped by JS to match the chosen travel month */
.bgseason {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-repeat: repeat;
  background-size: 520px 520px;
  opacity: calc(var(--doodle, 0.07) + 0.03);
  pointer-events: none;
  z-index: 0;
}
body > *:not(.bgdoodle):not(.bgseason):not(.lightbox) { position: relative; z-index: 1; }

/* gentle motion — all of it disabled for prefers-reduced-motion users */
@media (prefers-reduced-motion: no-preference) {
  .bgdoodle { animation: basedrift 360s linear infinite; }
  .bgseason { animation: seasondrift 180s linear infinite; }
  @keyframes basedrift  { to { background-position: -760px 760px; } }
  @keyframes seasondrift { to { background-position: 520px 1040px; } }

  .gradetable tbody tr { animation: rowin .38s ease both; animation-delay: calc(var(--i, 0) * 55ms); }
  @keyframes rowin { from { opacity: 0; transform: translateY(7px); } }

  #valueMap path.toppick { animation: mappulse 2.6s ease-in-out infinite; }
  @keyframes mappulse { 50% { opacity: .5; } }
}

header, .bar, .settings, .tablewrap, footer, .tabs, .cardwide, .filterbar { max-width: 960px; margin: 0 auto; padding: 0 20px; }

/* tab nav */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-top: 8px; }
.tabs button { background: none; border: none; border-bottom: 2px solid transparent; border-radius: 0;
  padding: 10px 14px; font-size: 14px; color: var(--gray); cursor: pointer; margin-bottom: -1px; }
.tabs button:hover { color: var(--ink); }
.tabs button.active { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.tab[hidden] { display: none; }
@media (max-width: 760px) {
  /* one swipeable row instead of wrapping into 3 rows of tabs */
  .tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { flex: 0 0 auto; white-space: nowrap; }
}

.cardwide { background: var(--card); border: 1px solid var(--line); border-radius: 10px; margin-top: 18px; padding: 18px 20px 16px; }
.pickers { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
select { padding: 7px 10px; border: 1px solid var(--border-input); border-radius: 7px; font-size: 14px; background: var(--card); }

/* best-time by country */
.bestdetail { margin-top: 14px; }
.besthead { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.besthead h3 { margin: 0; font-size: 18px; }
.monthslabel { font-size: 13px; color: var(--gray); font-weight: 600; margin: 8px 0 2px; }
.picksnote { font-size: 12.5px; color: var(--gray); margin: 14px 0 0; line-height: 1.45; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 14px; }
.chip2 { background: var(--green-bg); color: var(--green); border-radius: 999px; padding: 3px 11px; font-size: 13px; font-weight: 600; }
.bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; align-items: end; height: 150px; }
.bars .col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.bars .fill { width: 70%; border-radius: 4px 4px 0 0; background: var(--green); }
.bars .col.best .fill { outline: 2px solid var(--ink); outline-offset: -1px; }
.bars .mlabel { font-size: 10px; color: var(--gray); margin-top: 4px; }
.bars .mlabel.peak { color: var(--green); font-weight: 700; }
.bars .mlabel.shoulder { color: var(--amber); }
.bars .mlabel.off { color: #aaa; }
.bars .mscore { font-size: 9px; color: var(--gray); }
.seasons { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--gray); margin: 10px 0 14px; }
.seasons b.peak { color: var(--green); } .seasons b.off { color: #999; }

/* things to do */
.actlist { margin: 6px 0 16px; padding-left: 0; list-style: none; }
.actlist li { margin: 4px 0; font-size: 14px; display: flex; align-items: baseline; gap: 9px; }
.actemoji { flex: none; width: 1.3em; text-align: center; }
.seasrow { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; flex-wrap: wrap; }
.seasrow:last-child { border-bottom: none; }
.seasrow .what { flex: 1; min-width: 160px; display: flex; align-items: baseline; gap: 9px; }
.seasrow .months { color: var(--gray); font-size: 12px; }
.inseason { background: var(--green); color: #fff; border-radius: 999px; padding: 2px 9px; font-size: 11px; font-weight: 700; }
.offseason { background: var(--softer); color: var(--gray); border-radius: 999px; padding: 2px 9px; font-size: 11px; font-weight: 700; }
.visited-tag { background: #2a2a2a; color: #fff; border-radius: 999px; padding: 1px 7px; font-size: 10px; font-weight: 700; margin-left: 6px; }

/* advisory tags in the value table + key */
.advtag { display: inline-block; border-radius: 999px; padding: 1px 7px; font-size: 10px; font-weight: 700; color: #fff; margin-left: 6px; vertical-align: 1px; }
.advtag.a1 { background: #0a7d28; }
.advtag.a2 { background: #c9a200; }
.advtag.a3 { background: #d4730a; }
.advtag.a4 { background: #b00020; }
.tablekey { color: var(--gray); font-size: 12px; margin: 10px 0 0; }
.tablekey .advtag { margin-left: 0; }

/* priority pickers (High / Med / Low per factor) */
.weights { margin: 10px 0 4px; font-size: 14px; }
.weights summary { cursor: pointer; color: var(--gray); font-weight: 600; }
.weightrows { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px 18px; padding: 10px 2px 4px; }
.prirow { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 600; }
.prigroup { display: inline-flex; background: var(--soft); padding: 2px; border-radius: 7px; gap: 2px; }
.prigroup button { border: none; background: transparent; padding: 4px 10px; border-radius: 5px; font-size: 12px; color: var(--gray); cursor: pointer; }
.prigroup button.active { background: var(--card); color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(0,0,0,.12); }

/* top-picks answer cards */
.topcards { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 16px; }
.pickcard { display: flex; align-items: center; gap: 14px; padding: 12px 16px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card2);
  cursor: pointer; transition: border-color .15s, transform .1s; }
.pickcard:hover { border-color: var(--green); transform: translateX(2px); }
.pickrank { font-size: 15px; font-weight: 800; color: var(--gray); min-width: 28px; }
.pickmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pickname { font-size: 16px; font-weight: 700; }
.pickwhy { font-size: 13px; color: var(--gray); line-height: 1.4; }
.pickscore { font-size: 22px; font-weight: 800; color: var(--green);
  font-variant-numeric: tabular-nums; min-width: 40px; text-align: right; }

/* collapsible sections (customize / full table) */
.foldable { margin: 12px 0 0; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 14px; background: var(--card); }
.foldable > summary { cursor: pointer; font-size: 14px; font-weight: 600; }
.foldable > summary .muted { font-weight: 400; }
.foldable[open] { padding-bottom: 14px; }
.foldable .tablewrap { padding: 0; margin-top: 10px; }

/* tap-for-detail country card */
.countrycard { position: relative; margin-top: 10px; padding: 14px 38px 12px 16px; border: 1px solid var(--line);
  border-left: 4px solid var(--green); border-radius: 8px; background: var(--card2); font-size: 14px; }
.countrycard h3 { margin: 0 0 6px; font-size: 16px; }
.countrycard .ccfacts { display: flex; flex-wrap: wrap; gap: 6px 18px; color: #333; margin-bottom: 8px; }
.countrycard .ccfacts span { white-space: nowrap; }
.countrycard .ccsummary { color: var(--gray); margin: 0 0 8px; }
.countrycard .ccbtns { display: flex; gap: 8px; flex-wrap: wrap; }
.countrycard .ccbtns button { padding: 5px 11px; font-size: 13px; }
.countrycard .ccclose { position: absolute; top: 8px; right: 8px; border: none; background: none;
  font-size: 15px; color: var(--gray); cursor: pointer; padding: 4px; }
.countrycard .ccclose:hover { color: var(--ink); }
.map svg path { cursor: pointer; }

/* visited */
#visitedMap svg path { cursor: pointer; }
.chip2.rm { cursor: pointer; }
.chip2.rm:hover { background: #fdecef; color: var(--red); }
.chip2.rm.w { background: #e3f0fb; color: #1763a6; }
.chiprow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; }
.chiplabel { font-size: 12px; font-weight: 700; color: var(--gray); margin-right: 2px; }

/* advisory level badges */
.lvl { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; }
.lvl1 { background: #0a7d28; } .lvl2 { background: #c9a200; } .lvl3 { background: #d4730a; } .lvl4 { background: #b00020; }

header { padding-top: 28px; }
h1 { margin: 0 0 4px; font-size: 26px; }
.sub { color: var(--gray); margin: 0 0 16px; }

.bar {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
  padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.meta { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.meta #asof { font-weight: 600; }
.meta #summary { color: var(--gray); }

.actions { display: flex; gap: 8px; flex-wrap: wrap; }
button {
  background: var(--card); border: 1px solid var(--border-input); border-radius: 7px;
  padding: 8px 14px; font-size: 14px; cursor: pointer;
}
button:hover { border-color: #999; }
#check { background: var(--ink); color: #fff; border-color: var(--ink); }
#save { background: var(--green); color: #fff; border-color: var(--green); }

.status {
  max-width: 960px; margin: 14px auto 0;
  padding: 10px 14px; border-radius: 8px; font-size: 14px;
}
.status.ok { background: var(--green-bg); color: var(--green); }
.status.err { background: #fdecef; color: var(--red); }

.settings { background: var(--card); border: 1px solid var(--line); border-radius: 10px; margin-top: 16px; padding: 18px 20px; }
.settings h2 { margin-top: 0; }
.settings h3 { margin-bottom: 6px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
label { display: flex; flex-direction: column; font-size: 13px; font-weight: 600; gap: 4px; }
label.checkbox { flex-direction: row; align-items: center; gap: 8px; }
input[type=text], input[type=number], input[type=password] {
  padding: 7px 9px; border: 1px solid var(--border-input); border-radius: 6px; font-size: 14px; font-weight: 400;
}
small { color: var(--gray); font-weight: 400; }
.hint { color: var(--gray); font-size: 13px; }

.watchlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin-bottom: 8px; }
.watchlist label { flex-direction: row; align-items: center; gap: 6px; font-weight: 400; font-size: 13px; }

.toprow { max-width: 960px; margin: 18px auto 0; padding: 0 20px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.toprow .mapcard, .toprow .chartcard { margin-top: 0; min-width: 0; }
@media (max-width: 760px) { .toprow { grid-template-columns: 1fr; } }

.mapcard, .chartcard { background: var(--card); border: 1px solid var(--line); border-radius: 10px; margin-top: 18px; padding: 18px 20px 14px; }
.map { margin-top: 10px; }
.map svg { width: 100%; height: auto; display: block; background: var(--mapbg); border-radius: 8px; }
.map svg path { stroke: #fff; stroke-width: 0.4; cursor: default; }
.map svg path:hover { stroke: #222; stroke-width: 0.9; }

.legend { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--gray); flex-wrap: wrap; }
.legend .bar { width: 130px; height: 10px; border-radius: 5px;
  background: linear-gradient(90deg, #b00020, #e88, #f0f0f0, #8c8, #0a7d28); }
.legend .swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: #e0e4e8; vertical-align: -1px; margin-right: 3px; }

.windowtoggle { display: inline-flex; gap: 4px; margin-top: 10px; background: var(--soft); padding: 3px; border-radius: 8px; }
.windowtoggle button { border: none; background: transparent; padding: 5px 12px; border-radius: 6px; font-size: 13px; cursor: pointer; color: var(--gray); }
.windowtoggle button.active { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.12); }

.charthead { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.charthead h2 { margin: 0; font-size: 18px; }
.charthead .muted { color: var(--gray); font-weight: 400; font-size: 14px; }
.chartsub { margin: 4px 0 0; color: var(--gray); font-size: 13px; }
.bignum { text-align: right; line-height: 1.1; }
.bignum #indexnow { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bignum small { display: block; font-size: 14px; font-weight: 600; }
.bignum small.pos { color: var(--green); }
.bignum small.neg { color: var(--red); }
.chart { margin-top: 12px; }
.chart svg { width: 100%; height: auto; display: block; }
.chartnote { color: var(--gray); font-size: 12px; margin: 6px 0 0; }

.tablewrap { margin-top: 18px; padding-bottom: 24px; overflow-x: auto; }
@media (max-width: 680px) {
  /* keep numeric columns readable on phones — scroll sideways instead of crushing */
  .tablewrap table { min-width: 560px; }
  .grid { grid-template-columns: 1fr; }
}
table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; }
th { background: var(--tablehead); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--gray); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: none; }
tr.favorable { background: var(--green-bg); }

.code { font-weight: 700; }
.name { color: var(--gray); font-size: 12px; }
.pos { color: var(--green); font-weight: 700; }
.neg { color: var(--red); }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pill.great { background: var(--green); color: #fff; }
.pill.good { background: var(--green-bg); color: var(--green); }
.pill.average { background: var(--softer); color: var(--gray); }
.pill.weak { background: #fdecef; color: var(--red); }

.range { position: relative; height: 8px; background: var(--softer); border-radius: 4px; min-width: 90px; }
.range > span { position: absolute; top: -3px; width: 14px; height: 14px; border-radius: 50%; background: var(--ink); transform: translateX(-50%); }

.subscribe { max-width: 960px; margin: 22px auto 0; padding: 14px 20px; background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; display: flex; align-items: center;
  gap: 12px; flex-wrap: wrap; justify-content: center; }
.subscribe .sublabel { font-size: 14px; font-weight: 600; }
.subform { display: flex; gap: 8px; }
.subform input { padding: 8px 10px; border: 1px solid var(--border-input); border-radius: 7px; font-size: 14px; min-width: 200px; }
.subform button { background: var(--green); color: #fff; border: none; border-radius: 7px; padding: 8px 16px; font-size: 14px; cursor: pointer; }

footer { color: var(--gray); font-size: 12px; padding: 20px; text-align: center; }
footer a { color: var(--gray); }

/* ---- header row + theme toggle + layout helpers ---- */
.headrow { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.headbtns { display: flex; gap: 8px; flex-shrink: 0; }
.themebtn { font-size: 14px; padding: 7px 11px; border-radius: 8px; line-height: 1.2; white-space: nowrap; }
.rowsplit { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.pickgroup { display: inline-flex; align-items: center; gap: 7px; background: var(--soft);
  border-radius: 8px; padding: 4px 8px 4px 10px; white-space: nowrap; }
.rankby { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.picklabel { font-size: 12px; font-weight: 700; color: var(--gray); text-transform: uppercase; letter-spacing: .03em; }
.estfare { color: var(--gray); font-style: italic; }
.softrule { border: none; border-top: 1px solid var(--line); margin: 18px 0 14px; }

/* ---- polish pass ---- */
button, select, input, textarea { color: var(--ink); }
.mapcard, .chartcard, .cardwide, .settings, .subscribe, .tablewrap table { box-shadow: 0 1px 3px rgba(0,0,0,.05); }
tbody tr:nth-child(even) { background: var(--zebra); }
tbody tr:hover { background: var(--soft); }
tbody tr.favorable, tbody tr.favorable:nth-child(even) { background: var(--green-bg); }
.tabs button { transition: color .15s; }
.map svg, .chart svg { transition: opacity .2s; }

/* ---- report-card grade table (Top Picks) ---- */
.gradewrap { overflow-x: auto; margin: 14px 0 16px; }
.gradewrap .gradetable { min-width: 620px; }
.gradetable { width: 100%; border-collapse: collapse; }
.gradetable th { font-size: 11px; text-transform: uppercase; letter-spacing: .03em;
  color: var(--gray); text-align: center; padding: 6px 4px; white-space: nowrap; }
.gradetable td { padding: 9px 6px; text-align: center; border-top: 1px solid var(--line); }
.gradetable th.dest, .gradetable td.dest { text-align: left; }
.gradetable td.dest { font-weight: 700; font-size: 15px; white-space: nowrap; }
.gradetable td.rank { color: var(--gray); font-weight: 800; font-size: 13px; width: 34px; }
.gradetable td.num { font-variant-numeric: tabular-nums; }
.gradetable tbody tr { cursor: pointer; }
.gradetable tbody tr:hover td.dest { color: var(--green); }
.gradetable td.scell { cursor: pointer; }
.gradetable td.scell:hover { background: var(--soft); }
.gr { display: inline-block; min-width: 26px; padding: 2px 7px; border-radius: 7px;
  font-weight: 800; font-size: 13px; color: #fff; text-align: center; }
.gr.big { min-width: 34px; font-size: 15px; padding: 4px 9px; }
.grAp { background: #067a23; }
.grA  { background: #2f9e44; }
.grBp { background: #74b816; }
.grB  { background: #c9a200; }
.grC  { background: #e8590c; }
.grD  { background: #d9480f; }
.grF  { background: #b00020; }
.grx  { background: var(--soft); color: var(--gray); }
.hzmark { font-size: 12px; margin-left: 3px; cursor: help; }
.gradetable td.overall { white-space: nowrap; }

/* visa pill (an <a> when an official link exists) */
.visa { display: inline-block; border-radius: 7px; padding: 2px 8px; font-size: 12px;
  font-weight: 700; white-space: nowrap; text-decoration: none; }
a.visa:hover { filter: brightness(0.95); text-decoration: underline; }
.visa.vfree { background: var(--green-bg); color: var(--green); }
.visa.veasy { background: #e3f0fb; color: #1763a6; }
.visa.vmid  { background: #fbf0d8; color: #946100; }
.visa.vhard { background: #fae3e7; color: #b00020; }
.visa.vchk  { background: var(--soft); color: var(--gray); }

/* travel-guide photo carousel (full-width image + arrows) */
.guidehero { position: relative; margin: 4px 0 16px; }
.guidehero.loading { min-height: 300px; border-radius: 12px; background: var(--soft); }
.guidehero.empty { display: none; }
.heroimg { display: block; width: 100%; height: 300px; object-fit: cover;
  border-radius: 12px; background: var(--soft); cursor: zoom-in; }
.heronav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px;
  border: none; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; font-size: 26px;
  line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
  padding: 0 0 3px; transition: background .15s; }
.heronav:hover { background: rgba(0,0,0,.7); }
.heronav.prev { left: 10px; }
.heronav.next { right: 10px; }
.herocount { position: absolute; bottom: 10px; right: 12px; background: rgba(0,0,0,.55);
  color: #fff; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; }
@media (max-width: 560px) { .guidehero.loading, .heroimg { height: 220px; min-height: 220px; } }

/* full-screen lightbox */
.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.9);
  display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lbimg { max-width: 94vw; max-height: 90vh; object-fit: contain; border-radius: 6px; cursor: default; }
.lbclose { position: absolute; top: 14px; right: 18px; width: 40px; height: 40px; font-size: 22px;
  background: rgba(255,255,255,.15); border: none; border-radius: 50%; color: #fff; cursor: pointer; }
.lbnav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px;
  border: none; border-radius: 50%; background: rgba(255,255,255,.15); color: #fff; font-size: 30px;
  line-height: 1; padding: 0 0 4px; cursor: pointer; }
.lbnav.prev { left: 16px; } .lbnav.next { right: 16px; }
.lbclose:hover, .lbnav:hover { background: rgba(255,255,255,.32); }
.lbcount { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: #fff;
  font-size: 13px; background: rgba(0,0,0,.55); padding: 3px 12px; border-radius: 999px; }
.guidevisa { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin: 0 0 14px; font-size: 13px; color: var(--gray); line-height: 1.5; }
.guidevisa .guidevisa-txt { flex: 1; min-width: 200px; }
.guidevisa b { color: var(--ink); }
.grnum { font-size: 11px; font-weight: 700; color: var(--gray); margin-left: 5px;
  font-variant-numeric: tabular-nums; }
.fareamt { font-size: 12px; font-weight: 700; color: var(--gray);
  font-variant-numeric: tabular-nums; white-space: nowrap; }
/* searchable dropdown (combobox over a native select) */
.combo { position: relative; display: inline-block; }
.combo-input { padding: 6px 10px; border: 1px solid var(--border-input); border-radius: 8px;
  background: var(--card); color: var(--ink); font-size: 14px; min-width: 130px; max-width: 220px; }
.combo-list { position: absolute; z-index: 60; top: 100%; left: 0; min-width: 100%;
  max-height: 280px; overflow-y: auto; margin: 3px 0 0; padding: 4px; list-style: none;
  background: var(--card); border: 1px solid var(--border-input); border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,.16); }
.combo-list[hidden] { display: none; }
.combo-opt { padding: 7px 10px; border-radius: 6px; font-size: 14px; white-space: nowrap; cursor: pointer; }
.combo-opt:hover, .combo-opt.active { background: var(--soft); }
.combo-opt.muted { cursor: default; color: var(--gray); }

/* "Plan with AI" export bar */
.aibar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 4px; }
.aibtn { background: var(--green); color: #fff; border: none; border-radius: 10px;
  padding: 10px 16px; font-size: 14px; font-weight: 700; cursor: pointer; }
.aibtn:hover { filter: brightness(1.06); }
.aihint { font-size: 12px; color: var(--gray); }

/* Explore-the-Data table filters */
.filterbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 16px auto 0; }
.tablefilter { padding: 7px 11px; border: 1px solid var(--border-input); border-radius: 8px;
  font-size: 14px; min-width: 220px; background: var(--card); color: var(--ink); }
.filterbar select { padding: 7px 9px; border: 1px solid var(--border-input); border-radius: 8px;
  background: var(--card); color: var(--ink); }
.filterbar .chk { font-size: 13px; color: var(--gray); display: inline-flex; gap: 6px; align-items: center; }

.farearrow { font-size: 15px; font-weight: 700; cursor: help; }
.farearrow.dn { color: var(--green); }
.farearrow.up { color: var(--red); }
.farearrow.flat { color: var(--gray); }
.hazardline { font-size: 13px; color: var(--gray); margin: 6px 0 0; line-height: 1.45; }

/* ---- picker hierarchy: big question row, quiet filter row ---- */
.pickersmain { margin-top: 12px; }
.pickersmain .pickgroup { padding: 7px 12px; border: 1px solid var(--line); }
.pickersmain select { font-size: 15px; font-weight: 600; }
.pickersfilters { margin-top: 8px; }
.pickersfilters .pickgroup { background: transparent; border: 1px dashed var(--line); }
.pickersfilters select { font-size: 13px; }
.factorchip { cursor: pointer; border-radius: 999px; padding: 2px 9px; font-size: 12px;
  border: 1px solid var(--line); background: var(--soft); color: var(--gray); }
.factorchip.on { background: var(--green-bg); color: var(--green);
  border-color: var(--green); font-weight: 700; }
@media (max-width: 560px) {
  /* phones: picker groups wrap inside themselves instead of overflowing the card */
  .pickgroup { flex-wrap: wrap; white-space: normal; }
  .pickersmain select, .pickersfilters select { max-width: 100%; }
  .gradetable td { padding: 8px 4px; }
  .gradetable td.dest { font-size: 14px; }
  .gr { min-width: 22px; padding: 2px 5px; font-size: 12px; }
  .visa { padding: 2px 6px; font-size: 11px; }
  .gradewrap .gradetable { min-width: 600px; }
}

/* ---- dark theme ---- */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101316;
  --card: #1a1f24;
  --card2: #181d21;
  --soft: #262c31;
  --softer: #2c3338;
  --tablehead: #21262b;
  --mapbg: #161a1e;
  --zebra: #1d2227;
  --chartgrid: #2a3036;
  --border-input: #3a4147;
  --line: #2c3237;
  --ink: #e7eaed;
  --gray: #9aa4ad;
  --green: #3fb95f;
  --green-bg: #14301d;
  --amber: #d4b94e;
  --amber-bg: #33290f;
  --red: #ff7a8a;
}
html[data-theme="dark"] { --doodle: 0.10; }
html[data-theme="dark"] .countrycard .ccfacts { color: var(--ink); }
html[data-theme="dark"] .status.err { background: #3a151c; }
html[data-theme="dark"] .chip2.rm:hover { background: #3a151c; }
html[data-theme="dark"] .chip2.rm.w { background: #16304a; color: #7fb3e6; }
html[data-theme="dark"] .visited-tag { background: #4a5158; }
html[data-theme="dark"] .map svg path { stroke: var(--card); }
html[data-theme="dark"] #check { color: #14181c; }
html[data-theme="dark"] .bars .col.best .fill { outline-color: var(--gray); }
