/* Orbit's public atlas. Shared presentation for the live and research editions. */
:root {
  --bg: #101310;
  --bg-deep: #11170f;
  --surface: #191d18;
  --surface-raised: #22291f;
  --surface-soft: #252e21;
  --line: #32392f;
  --line-strong: #4b5742;
  --ink: #f1f3eb;
  --ink-soft: #c8d1c0;
  --ink-muted: #a0ac98;
  --mint: #c2ed83;
  --mint-soft: #b4db7d;
  --teal: #86b8a1;
  --blue: #85a9b8;
  --amber: #d1b575;
  --rose: #d3a3a6;
  --danger: #d3a3a6;
  --radius: 16px;
  --header-height: 88px;
  --shadow: 0 20px 60px #0006;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

@media screen {
  html, body { height: auto; min-height: 100%; }
  body { overflow: auto; font-size: 1rem; line-height: 1.5; }
  ::selection { color: var(--bg); background: var(--mint); }
  button, a, select { transition: color .18s, background-color .18s, border-color .18s; }
  button, input, select, textarea { font-size: 1rem; }
  .atlas-app { height: auto; min-height: 100svh; max-width: 1680px; margin: 0 auto; padding: 0 36px; overflow: visible; }
  .atlas-header { height: var(--header-height); padding: 0; gap: 28px; background: transparent; z-index: 2; }
  .brand { gap: 11px; }
  .brand-mark { width: 37px; height: 37px; }
  .brand-mark ellipse { stroke-width: 1.65; }
  .brand-mark .brand-satellite { fill: var(--mint); stroke: var(--bg); stroke-width: 1.4; }
  .brand strong { font-size: 1.4rem; letter-spacing: -.045em; text-transform: none; line-height: 1.2; font-weight: 650; }
  .brand-period { color: var(--mint); }
  .header-note { width: auto; height: auto; margin-left: auto; color: var(--ink-muted); font-size: .8125rem; gap: 9px; }
  .header-note i { width: 6px; height: 6px; box-shadow: none; }
  .header-actions { gap: 12px; }
  .quiet-button { height: 42px; font-size: .875rem; padding: 0 12px; border-radius: 8px; }
  .tools-button { border-color: transparent; padding-right: 0; }
  .tools-button:hover { background: transparent; border-color: transparent; color: var(--mint); }
  .tools-button svg { width: 19px; height: 19px; }
  .tools-button svg circle { fill: var(--bg); }
  .atlas-main { height: auto; display: block; }
  .atlas-intro { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 34px 0 29px; }
  .atlas-intro h1 { margin: 0; font-size: clamp(1.8rem, 2.6vw, 2.6rem); font-weight: 480; line-height: 1.2; letter-spacing: -.045em; }
  .atlas-intro h1 span { color: var(--mint); }
  .atlas-intro > p { margin: 0; color: var(--ink-muted); font-size: .9375rem; }
  .atlas-workspace { display: grid; grid-template-columns: 304px minmax(0, 1fr); align-items: start; gap: 24px; }
  .question-bar { min-height: 0; min-width: 0; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 24px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; z-index: 1; }
  .explore-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .explore-heading h2, .eyebrow { margin: 0; font-size: .75rem; font-weight: 550; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-muted); }
  .explore-heading svg { width: 18px; height: 18px; fill: none; stroke: var(--ink-muted); stroke-width: 1.5; }
  .question-control { gap: 9px; }
  .question-control > span:first-child, .question-control > label { color: var(--ink-soft); font-size: .875rem; font-weight: 450; }
  .select-row { grid-template-columns: minmax(0, 1fr) 42px; gap: 8px; }
  .select-wrap { height: 49px; border-color: var(--line-strong); border-radius: 8px; background: var(--bg-deep); }
  .select-wrap:hover, .select-wrap:focus-within { background: var(--bg-deep); border-color: var(--mint-soft); }
  .select-wrap select { padding: 0 32px 0 12px; font-size: .9375rem; font-weight: 450; }
  .select-wrap select option, .select-wrap select optgroup { background: var(--surface); color: var(--ink); }
  .select-wrap > svg { right: 11px; width: 15px; height: 15px; }
  .add-passport { width: 42px; height: 49px; border: 1px solid var(--line-strong); border-radius: 8px; background: #222b1c; color: var(--mint); font-size: 1.4rem; }
  .add-passport:hover { background: #303e23; border-color: var(--mint-soft); }
  .explore-result { margin: 0 -24px; padding: 23px 24px; background: #1d251a; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .map-summary { position: static; max-width: none; margin: 12px 0 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--ink-muted); font-size: .875rem; line-height: 1.7; white-space: normal; overflow: visible; pointer-events: auto; }
  .map-summary strong { display: block; color: var(--ink); font-size: 1.65rem; font-weight: 480; letter-spacing: -.035em; line-height: 1.25; margin-bottom: 10px; }
  .explore-next > p { margin: 0 0 18px; color: var(--ink-muted); font-size: .875rem; line-height: 1.6; }
  .browse-button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 10px 13px; color: #1d2914; background: var(--mint); border: 1px solid var(--mint); border-radius: 8px; font-size: .875rem; font-weight: 600; cursor: pointer; }
  .browse-button:hover { background: #d3f4a5; border-color: #d3f4a5; }
  .browse-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; }
  .browse-button > span:last-child { margin-left: auto; font-size: 1.1rem; }
  .map-column { min-width: 0; }
  .map-shell { height: auto; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #161e19; }
  .map-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 63px; padding: 16px 20px; background: #1a211b; border-bottom: 1px solid var(--line); }
  .map-toolbar h2 { display: flex; align-items: center; gap: 9px; margin: 0; font-size: .875rem; font-weight: 500; }
  .map-toolbar svg { width: 18px; height: 18px; fill: none; stroke: var(--ink-muted); stroke-width: 1.4; }
  .atlas-caption { display: flex; align-items: center; gap: 8px; color: var(--ink-muted); font-size: .75rem; }
  .atlas-caption i { width: 6px; height: 6px; border-radius: 50%; background: var(--mint-soft); }
  .map-stage { height: clamp(390px, 35vw, 570px); background: #131e1c; }
  .map-stage::after { display: none; }
  .map-loading { color: var(--ink-muted); font-size: .9375rem; letter-spacing: 0; background: #131e1c; }
  .map-loading span { width: 30px; height: 30px; }
  .map-graticule path { stroke: #93ad9933; stroke-width: .6; }
  .map-countries path { stroke: #61755a; stroke-width: .65; }
  .map-countries path[data-state="strong"], .map-countries path[data-travel="visa_free"], .map-countries path[data-layer="positive"], .map-countries path[data-layer="2027"] { fill: #b4db7d; stroke: #718d53; }
  .map-countries path[data-travel="eta"] { fill: #86b8a1; stroke: #4a7867; }
  .map-countries path[data-travel="visa_on_arrival"] { fill: #769baa; stroke: #456472; }
  .map-countries path[data-state="conditional"], .map-countries path[data-travel="e_visa"], .map-countries path[data-layer="partial"], .map-countries path[data-layer="2028"], .map-countries path[data-layer="model2"] { fill: #bda56b; stroke: #796b48; }
  .map-countries path[data-travel="conditional"] { fill: #9b8ba9; stroke: #655770; }
  .map-countries path[data-state="poor"], .map-countries path[data-travel="visa_required"], .map-countries path[data-layer="negative"] { fill: #7e6b70; stroke: #b19498; }
  .map-countries path[data-state="unavailable"], .map-countries path[data-travel="no_admission"] { fill: #3c3435; stroke: #846b6e; }
  .map-countries path[data-state="na"], .map-countries path[data-layer="not_listed"] { fill: #334332; stroke: #69795d; }
  .map-countries path[data-state="stale"], .map-countries path[data-travel="stale"] { fill: url(#pattern-stale); stroke: #a68e58; }
  .map-countries path:hover, .map-countries path:focus-visible, .map-countries path.focused { stroke: var(--ink); stroke-width: 1.6; }
  .map-marker circle:first-child { fill: #19261c; stroke: #94ac7f; }
  .map-tools { top: auto; bottom: 20px; right: 16px; gap: 5px; }
  .map-tools button { width: 38px; height: 38px; border: 1px solid #4c5b47; border-radius: 6px; background: #202c25; color: var(--ink-soft); box-shadow: none; font-size: 1.25rem; }
  .map-tools button:hover { background: #35432b; border-color: var(--mint-soft); }
  .north-label { position: absolute; top: 18px; right: 28px; color: var(--ink-muted); pointer-events: none; font: .75rem ui-monospace, monospace; }
  .north-label svg { width: 17px; height: 17px; margin: 3px 0 0 -4px; fill: none; stroke: currentColor; stroke-width: 1.5; }
  .map-instruction { top: auto; bottom: 20px; left: 20px; transform: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: #adbbab; font-size: .75rem; letter-spacing: 0; }
  .map-bottom-bar { position: static; display: block; padding: 17px 20px; min-height: 63px; background: #1a211b; border-top: 1px solid var(--line); pointer-events: auto; }
  .map-legend-wrap { width: 100%; position: static; }
  .map-legend, .map-legend.is-open { position: static; display: flex; width: auto; max-width: none; gap: 10px 16px; padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
  .legend-item { gap: 7px; color: var(--ink-soft); font-size: .75rem; }
  .legend-item i { width: 10px; height: 10px; border-color: #ffffff20; border-radius: 3px; }
  .legend-item i.strong, .legend-item i.visa_free { background: #b4db7d; }
  .legend-item i.eta { background: #86b8a1; }
  .legend-item i.arrival { background: #769baa; }
  .legend-item i.conditional, .legend-item i.evisa { background: #bda56b; }
  .legend-item i.travel_conditional { background: #9b8ba9; }
  .legend-item i.poor, .legend-item i.visa { background: #7e6b70; }
  .legend-item i.unavailable { background: #3c3435; }
  .legend-item i.na { background: #334332; }
  .legend-item i.unknown { background: repeating-linear-gradient(135deg, #28382f 0 3px, #4c5b47 3px 4px); }
  .legend-item i.stale { background: repeating-linear-gradient(135deg, #3a382a 0 3px, #a68e58 3px 4px); }
  .atlas-note { display: flex; align-items: flex-start; gap: 10px; padding: 19px 2px 0; }
  .atlas-note > svg { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 2px; fill: none; stroke: #acc98a; stroke-width: 1.5; }
  .map-evidence { padding: 0; margin: 0; background: transparent; color: var(--ink-muted); font-size: .8125rem; white-space: normal; text-align: left; line-height: 1.65; }
  .atlas-footer { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-top: 32px; padding: 23px 0 25px; border-top: 1px solid var(--line); color: var(--ink-muted); font-size: .75rem; }

  /* Details remain available on demand, with the same readable type scale. */
  dialog::backdrop { background: #060a06b8; }
  .map-tooltip { width: min(380px, calc(100% - 16px)); max-height: min(440px, calc(100% - 16px)); background: #1b2319fa; border-color: var(--line-strong); border-radius: 12px; padding: 18px; }
  .preview-country h2 { font-size: 1.125rem; }
  .preview-country p, .preview-caveat, .preview-point, .preview-footer small, .preview-fact span { font-size: .75rem; line-height: 1.55; }
  .preview-why { font-size: .875rem; line-height: 1.6; margin: 14px 0; }
  .preview-grid { margin: 12px 0; }
  .preview-fact { grid-template-columns: 108px minmax(0, 1fr); padding: 8px 0; }
  .preview-fact span { letter-spacing: .02em; text-transform: none; }
  .preview-fact strong { font-size: .8125rem; font-weight: 500; }
  .preview-point { grid-template-columns: 16px 1fr; gap: 6px; }
  .preview-open { min-height: 42px; font-size: .875rem; }
  .status-badge, .country-row .status-badge { font-size: .75rem; letter-spacing: .02em; line-height: 1.4; padding: 4px 7px; text-align: center; white-space: normal; }
  .sheet-dialog { width: min(670px, 100vw); }
  .sheet-dialog.compact-sheet { width: min(540px, 100vw); }
  .sheet-heading { padding: 25px 26px 20px; }
  .sheet-content, .browse-list, .saved-list, .orbit-content { padding-left: 26px; padding-right: 26px; }
  .dialog-heading h2, .sheet-heading h2 { font-size: 1.5rem; font-weight: 500; }
  .dialog-heading small, .sheet-heading small { font-size: .75rem; }
  .sheet-heading p, .fine-print, .sheet-footer > span, .detail-tags span, .glance-item span, .source-list small, .country-row small, .menu-list small, .profile-form summary small, .member-card label > span, .saved-row small, .orbit-card span, .orbit-card p { font-size: .8125rem; }
  .detail-hero > p, .detail-block p, .detail-block li, .reading-section p, .reading-section li, .info-content { font-size: 1rem; line-height: 1.7; }
  .detail-block h3, .info-content h3 { font-size: 1rem; font-weight: 600; }
  .detail-block { padding: 22px 0; }
  .detail-hero { padding: 24px 0; }
  .glance-item { padding: 14px; }
  .glance-item strong, .gate-row strong, .gate-row p, .reading summary, .reading-section h4, .source-list strong, .country-row strong, .menu-list strong, .profile-form summary span, .saved-row strong, .dialog-field > span, .profile-grid label > span:first-child, .check-grid label, .empty-state, .toast { font-size: .875rem; }
  .gate-row { padding: 12px; }
  .source-list b { font-size: .75rem; }
  .source-list a { padding: 13px 10px; }
  .reading { margin-top: 22px; }
  .reading summary { padding: 10px 15px; gap: 14px; }
  .reading-body { padding: 0 16px 16px; }
  .reading-section { padding: 18px 0; }
  .country-row { min-height: 74px; padding: 12px; }
  .browse-search { height: 48px; margin: 16px 26px; }
  .menu-dialog { margin: 78px 24px auto auto; }
  .menu-card, .dialog-card { padding: 24px; }
  .menu-list { gap: 8px; }
  .menu-list > button { min-height: 70px; padding: 12px 9px; }
  .menu-links { gap: 6px 18px; }
  .menu-links button { font-size: .875rem; min-height: 40px; }
  .profile-form summary { min-height: 85px; }
  .profile-grid { gap: 16px; }
  .check-grid label { padding: 10px; }
  .saved-actions button { font-size: .8125rem; padding: 8px; min-height: 40px; }
  .passport-chip { height: auto; min-height: 34px; max-width: 100%; gap: 6px; padding: 4px 5px 4px 10px; font-size: .8125rem; }
  .passport-chip button { width: 28px; height: 28px; }
  .primary-button:hover { background: #d3f4a5; }
  .primary-button, .secondary-button { font-size: .875rem; min-height: 44px; }
  .close-button { color: var(--ink-soft); }
  .orbit-card { min-height: 150px; padding: 18px; }
  .orbit-card strong { font-size: 2rem; }
  .brief-doc p, .brief-doc li, .brief-doc h3, .brief-doc header p, .brief-table th, .brief-table td { font-size: .875rem; }
  .brief-doc header small { font-size: .75rem; }
}

@media screen and (min-width: 1500px) {
  .atlas-workspace { grid-template-columns: 324px minmax(0, 1fr); gap: 28px; }
}
@media screen and (max-width: 1120px) {
  .atlas-app { padding: 0 24px; }
  .atlas-workspace { grid-template-columns: 278px minmax(0, 1fr); gap: 18px; }
  .question-bar { padding: 20px; }
  .explore-result { margin: 0 -20px; padding: 22px 20px; }
  .atlas-intro { align-items: flex-start; }
  .atlas-intro > p { max-width: 220px; }
  .header-note { font-size: .75rem; }
  .atlas-caption { display: none; }
  .map-toolbar { padding: 15px 18px; }
  .map-stage { height: 450px; }
  .map-instruction span { display: none; }
}
@media screen and (max-width: 820px) {
  :root { --header-height: 74px; }
  .atlas-app { padding: 0 18px; }
  .atlas-header { gap: 14px; }
  .header-note { display: none; }
  .header-actions { margin-left: auto; }
  .atlas-intro { flex-direction: column; gap: 9px; padding: 25px 0; }
  .atlas-intro > p { max-width: none; font-size: .875rem; }
  .atlas-workspace { grid-template-columns: minmax(0, 1fr); }
  .question-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
  .explore-heading { grid-column: 1 / -1; }
  .explore-result { grid-column: 1; margin: 0; padding: 16px 0 0; border-bottom: 0; background: transparent; }
  .explore-result > .eyebrow { display: none; }
  .map-summary { margin: 0; font-size: .8125rem; }
  .map-summary strong { font-size: 1.125rem; margin-bottom: 5px; }
  .explore-next { align-self: stretch; display: flex; align-items: center; padding-top: 16px; border-top: 1px solid var(--line); }
  .explore-next > p { display: none; }
  .map-stage { height: 430px; }
  .atlas-caption { display: flex; }
  .atlas-footer { margin-top: 24px; flex-direction: column; gap: 8px; }
  .map-tooltip { position: fixed; z-index: 80; left: 12px !important; right: 12px !important; bottom: 12px !important; top: auto !important; width: auto; max-height: min(65svh, 500px); transform: none !important; }
}
@media screen and (max-width: 520px) {
  .atlas-app { padding: 0 12px; }
  .brand { gap: 7px; }
  .brand strong { font-size: 1.2rem; }
  .brand-mark { width: 30px; height: 30px; }
  .tools-button { padding: 0 0 0 6px; font-size: .8125rem; gap: 6px; }
  .tools-button svg { width: 17px; height: 17px; }
  .atlas-intro h1 { font-size: clamp(1.65rem, 6.7vw, 2rem); }
  .question-bar { grid-template-columns: minmax(0, 1fr); padding: 18px; gap: 16px; }
  .explore-heading { display: none; }
  .question-control { gap: 7px; }
  .select-wrap select { font-size: 1rem; }
  .explore-result { grid-column: 1; padding-top: 14px; }
  .map-summary { line-height: 1.6; }
  .map-summary strong { display: inline; margin: 0 4px 0 0; font-size: 1rem; font-weight: 550; letter-spacing: -.01em; }
  .explore-next { grid-column: 1; padding: 0; border: 0; }
  .map-toolbar { min-height: 53px; padding: 14px; }
  .atlas-caption { display: none; }
  .map-stage { height: 345px; }
  .map-instruction { display: block; left: 14px; bottom: 18px; max-width: calc(100% - 75px); font-size: .75rem; }
  .map-tools { bottom: 14px; right: 12px; }
  .map-tools button { width: 36px; height: 36px; }
  .north-label { top: 16px; right: 25px; }
  .map-bottom-bar { padding: 15px 14px; }
  .map-legend { gap: 10px 14px; }
  .atlas-note { padding-top: 15px; gap: 8px; }
  .map-evidence { font-size: .75rem; }
  .sheet-dialog, .sheet-dialog.compact-sheet { width: 100vw; }
  .sheet-heading { padding: 20px 18px 17px; }
  .sheet-content, .browse-list, .saved-list, .orbit-content { padding-left: 18px; padding-right: 18px; }
  .browse-search { margin: 14px 18px; }
  .menu-dialog { margin: 70px 8px auto; }
  .menu-card { padding: 20px; }
  .preview-head { gap: 8px; }
  .preview-country { flex: 1; }
  .preview-head .status-badge { max-width: 130px; }
  .country-row { gap: 8px; }
  .country-row .status-badge { max-width: 135px; }
}
@media screen and (max-width: 360px) {
  .brand strong { font-size: 1.0625rem; }
  .brand-mark { width: 27px; height: 27px; }
  .tools-button { font-size: .75rem; }
  .atlas-header { gap: 8px; }
}
