:root {
  --bg: #000;
  --panel: #0b0b0c;
  --ink: #f4f4f2;
  --muted: #9a9a9a;
  --line: #2a2a2c;
  --card: #f6f5f2;
  --card-ink: #111;
  --card-line: #dedbd4;
  --moon: #f4f4f2;
  --mars: #d9482b;
  --both: #f2c230;
  --serif: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: var(--sans); }
button { font: inherit; cursor: pointer; }
a { color: inherit; }

/* ---------- Layout ---------- */
.app { --sidebar-w: 420px; position: relative; display: grid; grid-template-columns: var(--sidebar-w) 1fr; height: 100vh; }
/* Drag handle on the sidebar's right edge */
.resizer { position: absolute; top: 0; bottom: 0; left: calc(var(--sidebar-w) - 5px); width: 10px; z-index: 900; cursor: col-resize; touch-action: none; }
.resizer::after { content: ""; position: absolute; top: 0; bottom: 0; left: 4px; width: 2px; background: transparent; transition: background .15s; }
.resizer:hover::after, .resizer:focus-visible::after, body.resizing .resizer::after { background: var(--both); }
.resizer::before { content: ""; position: absolute; top: 50%; left: 1px; width: 8px; height: 44px; margin-top: -22px; border-radius: 4px;
  background: #2a2a2c; border: 1px solid #444; opacity: 0; transition: opacity .15s; }
.resizer:hover::before, .resizer:focus-visible::before, body.resizing .resizer::before { opacity: 1; background: var(--both); border-color: var(--both); }
.resizer:focus { outline: none; }
body.resizing { cursor: col-resize; user-select: none; }
body.resizing #globe { pointer-events: none; }
.sidebar {
  background: var(--bg); overflow-y: auto; padding: 28px 30px 40px;
  border-right: 1px solid #111; scrollbar-width: thin; scrollbar-color: #333 transparent;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark { width: 52px; height: 33px; flex: none; }
.brand-name { color: #fff; font-size: 26px; font-weight: 700; letter-spacing: 0.26em; }
.sidebar h1 { font-size: 12.5px; font-weight: 500; line-height: 1.5; margin: 22px 0 12px; letter-spacing: 0.14em; text-transform: uppercase; color: #9a9a9a; }
.sidebar .tagline { font-family: var(--serif); font-size: 22px; line-height: 1.38; color: #fff; margin: 0 0 16px; letter-spacing: -0.005em; }
.sidebar .sub { color: #b9b9b9; font-size: 14.5px; line-height: 1.55; margin: 0 0 26px; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }
.count-row { display: flex; justify-content: space-between; align-items: center; padding: 22px 0 24px; }
.count { font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 15px; }
.reset { background: none; border: 0; color: var(--muted); letter-spacing: 0.1em; font-size: 14px; display: flex; gap: 8px; align-items: center; }
.reset:hover { color: var(--ink); }
.search { position: relative; margin-bottom: 26px; }
.search input {
  width: 100%; padding: 15px 20px 15px 50px; border-radius: 999px; border: 1.5px solid #cfcfcf;
  background: transparent; color: var(--ink); font-size: 16px; outline: none;
}
.search input::placeholder { color: #9d9d9d; }
.search input:focus { border-color: #fff; }
.search svg { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); }
.filter-group { margin-bottom: 24px; }
.filter-group h3 { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: #b9b9b9; font-weight: 500; margin: 0 0 12px; }
.checks { display: grid; grid-template-columns: 1fr; gap: 9px; }
.checks.two { grid-template-columns: 1fr 1fr; }
.check { display: flex; align-items: center; gap: 10px; font-size: 15.5px; cursor: pointer; user-select: none; }
.check input { appearance: none; width: 18px; height: 18px; border: 1.5px solid #8a8a8a; border-radius: 2px; margin: 0; display: grid; place-content: center; flex: none; }
.check input:checked { background: #fff; border-color: #fff; }
.check input:checked::after { content: ""; width: 9px; height: 5px; border: 2px solid #000; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.list-group h3 { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: #b9b9b9; font-weight: 500; margin: 26px 0 10px; }
.list-item { display: flex; align-items: center; gap: 10px; background: none; border: 0; color: #ddd; text-align: left; padding: 7px 0; width: 100%; font-size: 15px; }
.list-item:hover, .list-item.active { color: #fff; }
.list-item.active span:last-child { text-decoration: underline; text-underline-offset: 4px; }
.empty { color: var(--muted); font-size: 14px; padding-top: 14px; }

/* ---------- Map area ---------- */
.map-wrap { position: relative; overflow: hidden; }
#map { position: absolute; inset: 0; background: #1d2027; }
#map.moon, #map.mars { background: #050505; }
.leaflet-container { font-family: var(--sans); }
.topnav { position: absolute; top: 34px; right: 40px; z-index: 600; display: flex; gap: 6px; align-items: center; }
.tab {
  background: rgba(0,0,0,0.55); border: 1px solid rgba(255,255,255,0.18); color: #ddd; padding: 10px 18px; border-radius: 999px;
  letter-spacing: 0.12em; font-size: 13.5px; font-weight: 600; text-transform: uppercase; display: flex; gap: 8px; align-items: center;
  backdrop-filter: blur(6px);
}
.tab:hover { color: #fff; border-color: rgba(255,255,255,0.5); }
.tab.active { background: #fff; color: #000; border-color: #fff; }
.tab .planet { width: 12px; height: 12px; border-radius: 50%; }
.legend {
  position: absolute; left: 30px; bottom: 30px; z-index: 600; background: rgba(0,0,0,0.65); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.12); border-radius: 10px; padding: 12px 16px; font-size: 13px; display: flex; gap: 16px; align-items: center;
}
.legend span { display: flex; align-items: center; gap: 7px; }
.zoom { position: absolute; right: 40px; bottom: 40px; z-index: 600; display: flex; flex-direction: column; gap: 10px; }
.zoom button { width: 64px; height: 64px; border-radius: 50%; background: #000; color: #fff; border: 0; font-size: 30px; line-height: 1; font-weight: 300; }
.zoom button:hover { background: #222; }

/* markers */
.pin-wrap { background: none; border: 0; }
.pin {
  display: block; width: 26px; height: 26px; border-radius: 50%; background: var(--c);
  border: 2px solid rgba(255,255,255,0.85); box-shadow: 0 0 0 1px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.5);
  transition: transform .15s ease;
}
.pin.light { border-color: #555; }
.pin:hover { transform: scale(1.18); }
.pin.selected { transform: scale(1.25); box-shadow: 0 0 0 4px rgba(255,255,255,0.9), 0 0 18px 4px var(--c); }
.pin-label { position: absolute; left: 32px; top: 3px; white-space: nowrap; font-size: 12.5px; color: #fff; text-shadow: 0 1px 3px #000, 0 0 2px #000; pointer-events: none; opacity: 0; transition: opacity .15s; }
.pin-wrap:hover .pin-label, .labels-on .pin-label { opacity: 1; }

/* ---------- Popup card ---------- */
.card {
  position: absolute; left: 34px; top: 120px; width: min(610px, calc(100% - 68px)); max-height: calc(100% - 150px); z-index: 700;
  background: var(--card); color: var(--card-ink); overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: rise .22s ease;
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.card[hidden] { display: none; }
.card-img { position: relative; height: clamp(190px, 34vh, 330px); background: linear-gradient(135deg, #333, #111); background-size: cover; background-position: center; }
.card-img.noimg::after { content: attr(data-caption); position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,0.4); font-family: var(--serif); font-size: 20px; }
.card-close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; background: #000; color: #fff; border: 0; display: grid; place-items: center; }
.card-close:hover { background: #222; }
.credit { position: absolute; right: 10px; bottom: 8px; font-size: 11px; color: rgba(255,255,255,0.8); text-shadow: 0 1px 2px #000; }
.card-body { padding: 26px 34px 34px; }
.card h2 { font-family: var(--serif); font-weight: 400; font-size: 27px; margin: 0 0 20px; line-height: 1.25; }
.rows { border-top: 1px solid var(--card-line); }
.row { display: flex; justify-content: space-between; gap: 24px; padding: 14px 0; border-bottom: 1px solid var(--card-line); }
.row .k { letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; font-size: 12.5px; color: #555; white-space: nowrap; padding-top: 3px; }
.row .v { text-align: right; font-size: 16px; line-height: 1.5; }
.pill { display: inline-block; padding: 5px 14px; border-radius: 999px; font-size: 16px; color: #fff; }
.pill.Moon { background: #e9e7e1; color: #111; border: 1px solid #bdb9af; }
.pill.Mars { background: var(--mars); }
.pill.Both { background: var(--both); color: #2b2100; }
.card .desc { font-size: 18px; line-height: 1.5; margin: 24px 0 28px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.learn {
  display: block; text-align: center; text-decoration: none; border: 1px solid #111; border-radius: 999px; padding: 16px;
  letter-spacing: 0.14em; font-weight: 600; font-size: 14px; color: #111; transition: background .15s, color .15s;
}
.learn:hover { background: #111; color: #fff; }

/* Leaflet attribution */
.leaflet-control-attribution { background: rgba(0,0,0,0.5) !important; color: #888 !important; font-size: 10px; }
.leaflet-control-attribution a { color: #aaa !important; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; grid-template-rows: 60vh auto; height: auto; }
  .sidebar { order: 2; }
  .resizer { display: none; }
  .map-wrap { order: 1; height: 60vh; }
  .topnav { top: 12px; right: 12px; left: 12px; justify-content: center; }
  .tab { padding: 8px 12px; font-size: 12px; }
  .card { left: 8px; right: 8px; width: auto; top: 60px; max-height: calc(100% - 70px); }
  .card-img { height: 180px; }
  .legend { display: none; }
  .zoom { right: 12px; bottom: 12px; }
  .zoom button { width: 44px; height: 44px; font-size: 22px; }
}

/* ---------- Globe (Moon / Mars) ---------- */
#globe { position: absolute; inset: 0; }
#globe[hidden], #map[hidden] { display: none; }
.map-wrap {
  background:
    radial-gradient(1px 1px at 12% 18%, #fff8, transparent), radial-gradient(1px 1px at 72% 12%, #fff9, transparent),
    radial-gradient(1px 1px at 33% 72%, #fff6, transparent), radial-gradient(1.5px 1.5px at 88% 64%, #fffa, transparent),
    radial-gradient(1px 1px at 52% 40%, #fff5, transparent), radial-gradient(1px 1px at 8% 88%, #fff7, transparent),
    radial-gradient(1px 1px at 62% 90%, #fff6, transparent), radial-gradient(1.5px 1.5px at 22% 45%, #fff8, transparent),
    radial-gradient(ellipse at 60% 50%, #0d1018 0%, #000 70%);
}
.globe-pin { position: relative; width: 22px; height: 22px; cursor: pointer; pointer-events: auto; transform: translate(-50%, -50%); }
.globe-pin { z-index: 2 !important; }
.globe-pin:hover, .globe-pin:has(.selected) { z-index: 3 !important; }
.globe-pin .pin { width: 22px; height: 22px; }
.globe-pin .pin-label { left: 28px; top: 2px; }
/* !important beats the depth z-index globe.gl writes inline, so pins stay above labels */
.globe-label { z-index: 1 !important; transform: translate(-50%, -50%); pointer-events: none; white-space: nowrap; font-size: 11.5px; font-weight: 500;
  color: rgba(255,255,255,0.88); text-shadow: 0 0 3px #000, 0 1px 4px rgba(0,0,0,0.9); }
.globe-label.t2 { font-size: 10.5px; font-weight: 400; color: rgba(255,255,255,0.75); }
.globe-label.big { font-size: 11px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(255,232,190,0.85); }
.map-wrap.earth .globe-label { color: rgba(220,226,238,0.8); }
.map-wrap.earth .globe-label.big { color: rgba(140,175,225,0.75); text-shadow: none; }
.legend .hint { color: #999; border-left: 1px solid #444; padding-left: 14px; }
#map { background: #14171d; }

/* ---------- Detail view ---------- */
.detail[hidden], .app[hidden] { display: none; }
body.detail-mode { height: auto; min-height: 100%; background: var(--card); color: var(--card-ink); }
html:has(body.detail-mode) { height: auto; background: var(--card); }
.detail { position: relative; }
.detail .topbar { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; padding: 26px 48px; }
.detail .topbar a { color: #fff; text-decoration: none; letter-spacing: 0.12em; font-size: 13.5px; font-weight: 600; text-transform: uppercase; display: inline-flex; gap: 10px; align-items: center; padding: 10px 18px; border: 1px solid rgba(255,255,255,0.35); border-radius: 999px; background: rgba(0,0,0,0.35); backdrop-filter: blur(6px); }
.detail .topbar a:hover { background: #fff; color: #000; }
.topbar-tabs { display: flex; gap: 8px; }
.hero { position: relative; min-height: 560px; background: #111 center / cover no-repeat; display: flex; align-items: flex-end; color: #fff; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.1) 35%, rgba(0,0,0,0.85) 100%); }
.hero-inner { position: relative; max-width: 1180px; width: 100%; margin: 0 auto; padding: 0 48px 56px; }
.eyebrow { letter-spacing: 0.16em; text-transform: uppercase; font-size: 13.5px; font-weight: 600; opacity: 0.85; }
.hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 5vw, 60px); line-height: 1.1; margin: 14px 0 18px; max-width: 900px; }
.hero .lede { font-size: 19px; line-height: 1.55; max-width: 760px; opacity: 0.92; margin: 0 0 22px; }
.tags { display: flex; gap: 10px; flex-wrap: wrap; }
.pill.ghost { background: rgba(0,0,0,0.35); color: #fff; border: 1px solid rgba(255,255,255,0.4); }
.credit-hero { position: absolute; right: 16px; bottom: 10px; font-size: 11px; opacity: 0.75; color: #fff; text-decoration: none; max-width: 60%; text-align: right; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 56px 48px 80px; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 64px; }
.detail article h2 { font-family: var(--serif); font-weight: 400; font-size: 30px; margin: 0 0 16px; padding-top: 36px; border-top: 1px solid var(--card-line); }
.detail article section:first-child h2 { border-top: 0; padding-top: 0; }
.detail article section { margin-bottom: 40px; }
.detail article p { font-size: 18.5px; line-height: 1.65; margin: 0 0 16px; }
.compare { display: grid; gap: 18px; }
.compare-block { border-left: 4px solid var(--c); padding: 4px 0 4px 22px; }
.compare-block h3 { margin: 0 0 8px; font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
.dims { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.dimtile { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border: 1px solid var(--card-line); background: #fff; font-size: 15.5px; }
.dimtile.off { background: transparent; color: #9a968c; }
.dimtile .mark { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 13px; font-weight: 700; }
.dimtile:not(.off) .mark { background: #111; color: #fff; }
.dimtile.off .mark { border: 1.5px dashed #c8c3b8; }
.links { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.linkcard { display: block; text-decoration: none; background: #fff; border: 1px solid var(--card-line); transition: transform .15s, box-shadow .15s; }
.linkcard:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0,0,0,0.12); }
.linkcard .thumb { height: 140px; background: #222 center / cover; position: relative; }
.linkcard .thumb .badge { position: absolute; left: 10px; top: 10px; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: rgba(0,0,0,0.65); color: #fff; display: flex; gap: 6px; align-items: center; }
.linkcard .lc-body { padding: 14px 16px 18px; }
.linkcard h4 { font-family: var(--serif); font-weight: 400; font-size: 19px; margin: 0 0 6px; line-height: 1.3; }
.linkcard p { font-size: 14.5px; line-height: 1.5; color: #555; margin: 0; }
.detail .note { font-size: 15px; color: #555; margin-top: 14px; }
.limits { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.limits li { font-size: 16px; line-height: 1.55; padding-left: 18px; position: relative; }
.limits li::before { content: ""; position: absolute; left: 0; top: 10px; width: 7px; height: 7px; background: var(--mars); border-radius: 50%; }
.limits b { font-weight: 600; }
.callout { background: #111; color: #eee; padding: 22px 26px; font-size: 17px; line-height: 1.6; margin-bottom: 22px; }
.callout .k { display: block; letter-spacing: 0.12em; text-transform: uppercase; font-size: 12.5px; color: #aaa; margin-bottom: 6px; font-weight: 600; }
aside.glance { position: sticky; top: 24px; align-self: start; }
.glance h3 { letter-spacing: 0.14em; text-transform: uppercase; font-size: 14px; margin: 0 0 6px; }
.glance .row .k { font-size: 12.5px; }
.glance .row .v { font-size: 15px; }
#minimap { position: relative; height: 230px; margin-top: 22px; border: 1px solid var(--card-line); background-color: #14171d; overflow: hidden; }
.backlink { display: block; margin-top: 20px; }
.pager { max-width: 1180px; margin: 0 auto; padding: 0 48px 70px; display: flex; justify-content: space-between; gap: 20px; }
.pager a { text-decoration: none; flex: 1; border-top: 1px solid #111; padding-top: 16px; }
.pager a:last-child { text-align: right; }
.pager small { display: block; letter-spacing: 0.12em; text-transform: uppercase; font-size: 12px; color: #777; margin-bottom: 6px; }
.pager span { font-family: var(--serif); font-size: 21px; }
.detail footer { background: #000; color: #888; font-size: 13px; padding: 28px 48px; line-height: 1.6; }
@media (max-width: 900px) {
  .wrap { grid-template-columns: 1fr; padding: 36px 22px 60px; gap: 30px; }
  .hero-inner, .detail .topbar { padding-left: 22px; padding-right: 22px; }
  .topbar-tabs { display: none; }
  .hero { min-height: 460px; }
  aside.glance { position: static; }
  .dims { grid-template-columns: 1fr; }
  .pager { padding: 0 22px 50px; }
}
.linkcard p { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Compare & rank ---------- */
.cmp-open {
  position: absolute; top: 34px; left: 34px; z-index: 650; display: flex; align-items: center; gap: 10px;
  background: var(--both); color: #2b2100; border: 0; border-radius: 999px; padding: 12px 22px;
  font-weight: 700; font-size: 13.5px; letter-spacing: 0.12em; text-transform: uppercase; box-shadow: 0 6px 24px rgba(0,0,0,0.45);
}
.cmp-open:hover { background: #ffd34d; }
.map-wrap:not(.earth) .cmp-open { display: none; }
.map-wrap.comparing .cmp-open { background: #fff; color: #000; }
.card.compare { padding: 0 0 30px; width: min(640px, calc(100% - 68px)); top: 96px; max-height: calc(100% - 126px); }
.cmp-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  padding: 26px 30px 20px; background: #111; color: #fff; }
.cmp-head h2 { font-family: var(--serif); font-weight: 400; font-size: 25px; line-height: 1.25; margin: 6px 0 0; }
.cmp-head .card-close { position: static; flex: none; width: 46px; height: 46px; background: #2a2a2a; }
.cmp-eyebrow { letter-spacing: 0.16em; text-transform: uppercase; font-size: 12px; font-weight: 700; color: var(--both); }
.cmp-step { padding: 22px 30px 4px; border-bottom: 1px solid var(--card-line); }
.cmp-step:last-of-type { border-bottom: 0; }
.cmp-step h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 13.5px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; }
.cmp-step h3 > span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #111; color: #fff; font-size: 12px; letter-spacing: 0; }
.cmp-n { font-style: normal; font-weight: 500; letter-spacing: 0.04em; text-transform: none; color: #777; font-size: 13px; }
.seg { display: inline-flex; border: 1.5px solid #111; border-radius: 999px; padding: 3px; gap: 3px; margin-bottom: 12px; }
.seg button { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 8px 18px; border-radius: 999px;
  font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; font-size: 13px; color: #111; }
.seg button i { width: 12px; height: 12px; border-radius: 50%; }
.seg button.on { background: #111; color: #fff; }
.cmp-field { display: block; }
.cmp-field.grow { flex: 1; min-width: 200px; }
.cmp-field select { width: 100%; font: inherit; font-size: 15.5px; padding: 11px 40px 11px 14px; border: 1.5px solid #111; border-radius: 10px; background: #fff; color: #111;
  appearance: none; background-image: linear-gradient(45deg, transparent 50%, #111 50%), linear-gradient(135deg, #111 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.cmp-field select:disabled { opacity: 0.5; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.cmp-blurb { font-size: 15px; line-height: 1.55; color: #444; margin: 12px 0 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #cfcbc2; border-radius: 999px; padding: 6px 6px 6px 12px; font-size: 14.5px; }
.chip .dot { width: 10px; height: 10px; box-shadow: 0 0 0 1px #888; }
.chip button { border: 0; background: #eee; width: 22px; height: 22px; border-radius: 50%; line-height: 1; font-size: 16px; color: #333; }
.chip button:hover { background: #111; color: #fff; }
.cmp-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ghost { border: 1.5px solid #111; background: none; color: #111; border-radius: 999px; padding: 10px 16px; font-weight: 600; font-size: 13.5px; }
.ghost:hover:not(:disabled) { background: #111; color: #fff; }
.ghost:disabled { opacity: 0.35; cursor: default; }
.cmp-tip { font-size: 13.5px; color: #777; margin: 12px 0 16px; }
.cmp-weights summary { list-style: none; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.cmp-weights summary::-webkit-details-marker { display: none; }
.cmp-weights summary h3 { margin-bottom: 14px; }
.cmp-sum-hint { font-size: 13.5px; color: #555; text-decoration: underline; margin-bottom: 14px; }
.cmp-weights[open] .cmp-sum-hint { visibility: hidden; }
.cmp-weights .ghost { margin: 6px 0 18px; }
.weights { display: grid; gap: 8px; }
.wrow { display: grid; grid-template-columns: 1fr 160px 34px; align-items: center; gap: 12px; font-size: 14.5px; }
.wrow input { width: 100%; accent-color: #111; }
.wrow output { text-align: right; font-variant-numeric: tabular-nums; color: #555; }
.cmp-empty { background: #ece9e2; border-radius: 10px; padding: 18px; font-size: 15px; color: #444; margin: 0 0 18px; }
.cmp-headline { font-size: 17px; line-height: 1.5; margin: 0 0 16px; }
.rank { list-style: none; margin: 0 0 12px; padding: 0; }
.rank li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; padding: 16px 0; border-top: 1px solid var(--card-line); }
.rank .rk { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid #111; display: grid; place-items: center; font-weight: 700; font-size: 17px; }
.rank li.first .rk { background: #111; color: #fff; }
.rtop { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.rname { display: flex; align-items: center; gap: 9px; font-family: var(--serif); font-size: 18.5px; line-height: 1.3; }
.rname .dot { flex: none; width: 11px; height: 11px; box-shadow: 0 0 0 1px #888; }
.rscore { font-weight: 700; font-size: 24px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rscore small { font-size: 13px; font-weight: 500; color: #777; margin-left: 2px; }
.bar { height: 8px; background: #e4e1d9; border-radius: 4px; margin: 8px 0 8px; overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 4px; transition: width .3s ease; }
.rmeta { font-size: 13.5px; color: #666; }
.listed { color: #1f7a4d; font-weight: 600; }
.rwhy { font-size: 14.5px; line-height: 1.5; margin: 8px 0 6px; color: #333; }
.ractions { display: flex; gap: 18px; }
.link { border: 0; background: none; padding: 0; font-size: 13.5px; font-weight: 600; color: #111; text-decoration: underline; text-underline-offset: 3px; }
.breakdown { margin-top: 12px; display: grid; gap: 6px; background: #fff; border: 1px solid var(--card-line); border-radius: 10px; padding: 12px 14px; }
.brow { display: grid; grid-template-columns: 1fr 120px 42px 34px; gap: 10px; align-items: center; font-size: 13.5px; }
.brow.off { opacity: 0.4; }
.bb { height: 6px; background: #ebe8e1; border-radius: 3px; overflow: hidden; }
.bb span { display: block; height: 100%; background: #111; }
.bv { text-align: right; font-variant-numeric: tabular-nums; }
.bw { text-align: right; color: #888; font-variant-numeric: tabular-nums; }
.cmp-method { font-size: 13px; line-height: 1.55; color: #666; padding: 4px 30px 0; margin: 0; }
.learn-2 { width: 100%; margin-top: 12px; background: var(--both); border-color: var(--both); color: #2b2100; }
.learn-2:hover { background: #111; border-color: #111; color: #fff; }
/* pins while comparing */
.globe-pin.cmp-dim { opacity: 0.45; }
.globe-pin.in-cmp .pin { box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(0,0,0,0.6), 0 0 16px 3px var(--c); }
.globe-pin[data-rank]::after { content: attr(data-rank); position: absolute; top: -12px; right: -12px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: #fff; color: #000; font-size: 12px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0,0,0,0.6); }
@media (max-width: 900px) {
  .cmp-open { top: 60px; left: 12px; padding: 9px 14px; font-size: 12px; }
  .card.compare { left: 8px; right: 8px; width: auto; top: 104px; max-height: calc(100% - 112px); }
  .cmp-head { position: static; padding: 16px 18px; }
  .cmp-head h2 { font-size: 19px; }
  .cmp-step { padding: 16px 18px 2px; }
  .cmp-method { padding: 4px 18px 0; }
  .wrow { grid-template-columns: 1fr 110px 30px; }
  .brow { grid-template-columns: 1fr 70px 40px 30px; }
}

/* ---------- Sources and references ---------- */
.refs-link { display: inline-block; margin: -12px 18px 24px 0; color: #d6d6d6; font-size: 13.5px; letter-spacing: 0.04em; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: #555; }
.refs-link:hover { color: #fff; text-decoration-color: #fff; }
.detail .cites { margin: 0; padding-left: 0; list-style: none; }
.detail .cites li { font-size: 15.5px; line-height: 1.6; margin: 0 0 12px; padding-left: 2em; text-indent: -2em; overflow-wrap: anywhere; }
.detail .cites a { color: #1a4d8f; }
.detail .cites .usedby { display: block; text-indent: 0; font-size: 13px; color: #666; margin-top: 2px; }
.detail .cites .usedby a { color: #555; }
.detail .note a { color: inherit; }
.detail footer a { color: #bbb; }
.refs-head { background: #000; color: #fff; padding: 26px 48px 44px; }
.refs-back { color: #fff; text-decoration: none; letter-spacing: 0.12em; font-size: 13.5px; font-weight: 600; text-transform: uppercase; display: inline-flex; gap: 10px; align-items: center; }
.refs-back:hover { text-decoration: underline; text-underline-offset: 4px; }
.refs-head h1 { font-family: var(--serif); font-weight: 400; font-size: 56px; margin: 56px 0 14px; }
.refs-head p { max-width: 760px; font-size: 18px; line-height: 1.6; color: #cfcfcf; margin: 0 0 26px; }
.refs-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.refs-nav a { color: #fff; font-size: 14px; letter-spacing: 0.06em; text-underline-offset: 4px; }
.refs-wrap { max-width: 980px; margin: 0 auto; padding: 48px 48px 72px; }
.refs-wrap section { margin-bottom: 52px; }
.refs-wrap h2 { font-family: var(--serif); font-weight: 400; font-size: 30px; margin: 0 0 18px; padding-bottom: 12px; border-bottom: 1px solid var(--card-line); }
@media (max-width: 900px) {
  .refs-head { padding: 22px 22px 34px; } .refs-head h1 { font-size: 40px; margin-top: 36px; }
  .refs-wrap { padding: 32px 22px 56px; }
}

/* Compare: what the ranking is built from */
.cmp-rankedby { font-size: 13.5px; line-height: 1.55; color: #444; background: #ecebe6; border-left: 3px solid #111; padding: 10px 12px; margin: 0 0 14px; }
.rank li.unrated { opacity: .72; }
.rank li.unrated .rscore small { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.cmp-method a { color: inherit; }
.refs-wrap.about p { max-width: 720px; font-size: 17px; line-height: 1.7; margin: 0; }

/* Transitions */
#globe { transition: opacity .5s ease; }
#globe.entering { opacity: 0; transition: none; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.detail:not([hidden]) > * { animation: fade-in .35s ease both; }
.detail:not([hidden]) .hero, .detail:not([hidden]) .refs-head h1 { animation: fade-up .45s ease both; }
.app:not([hidden]) { animation: fade-in .35s ease both; }
#list { animation: fade-in .3s ease; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Editorial polish: visible keyboard focus, calmer medium widths */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible, .check:focus-within { outline: 2px solid var(--both); outline-offset: 3px; border-radius: 2px; }
.search input:focus-visible { border-color: var(--both); box-shadow: 0 0 0 1px var(--both); }
.card a:focus-visible, .card button:focus-visible, .detail a:focus-visible { outline-color: #9a6b00; }
@media (max-width: 1200px) and (min-width: 901px) { .app { --sidebar-w: 360px; } .card { left: 20px; top: 96px; width: min(560px, calc(100% - 40px)); max-height: calc(100% - 116px); } }

/* Live sky */
.live { position: absolute; left: 30px; top: 30px; z-index: 600; max-width: 360px; background: rgba(0,0,0,0.65); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.12); border-radius: 10px; padding: 12px 16px; font-size: 13px; line-height: 1.5; color: #ddd; display: grid; gap: 2px; }
.live[hidden] { display: none; }
.live strong { font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: #ffd666; font-weight: 600; }
.live .live-key { color: #999; font-size: 12px; margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.live .live-key i { display: inline-block; width: 16px; height: 2px; background: #ffd666; }
.live .live-key i.sun { width: 8px; height: 8px; border-radius: 50%; margin-left: 4px; }
.live a { color: #fff; font-size: 12.5px; margin-top: 4px; text-underline-offset: 3px; }
.map-wrap:has(.card:not([hidden])) .live { display: none; }
@media (max-width: 900px) { .live { display: none; } }
.sky-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--card-line); border: 1px solid var(--card-line); }
.sky-fig { background: var(--card); padding: 16px 18px; display: grid; gap: 4px; }
.sky-fig .k { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; color: #555; }
.sky-fig .v { font-family: var(--serif); font-size: 24px; line-height: 1.25; }
.sky-fig .n { font-size: 13px; color: #666; }
.sky-frame { margin: 18px 0 8px; aspect-ratio: 16 / 10; background: #000; display: grid; place-items: center; }
.sky-frame .learn { color: #fff; border-color: #fff; padding: 16px 28px; }
.sky-frame .learn:hover { background: #fff; color: #000; }
.sky-frame iframe { width: 100%; height: 100%; border: 0; }
@media (max-width: 600px) { .sky-grid { grid-template-columns: 1fr; } }
