/* Welcome Map. The look of endurancelearning.com: Roboto, navy for text and
   structure, orange for anything you click. One light look, no dark mode. */
:root {
  --bg: #f4f5f7; --surface: #fff; --ink: #252627; --muted: #54595f; --line: #dadde1; --edge: #c3c9d0;
  --navy: #073244; --navy-soft: #eaf0f6; --blue: #365f92;
  --act: #e58627; --act-ink: #fff; --act-text: #b35f0e; --act-soft: #fdf0e2;
  --ok: #2f6b4c; --ok-soft: #e1f0e7; --alert: #a3291d; --alert-soft: #f8e1de;
  --focus: #2a62c9;
  --sea: #dce9f2; --land: #fdfdfb; --border: #b9c6cf;
  --shadow: 0 1px 2px rgba(7, 50, 68, .08), 0 3px 10px rgba(7, 50, 68, .08);
  --font: Roboto, "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
a { color: var(--blue); }

.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1100px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 14px; }
.topbar img { height: 34px; width: auto; display: block; }
.topbar .app { font-weight: 700; color: var(--navy); font-size: 18px; border-left: 1px solid var(--line); padding-left: 14px; }
.topbar .right { margin-left: auto; display: flex; gap: 10px; align-items: center; }

main { max-width: 1100px; margin: 0 auto; padding: 20px 16px 32px; }
h1 { font-weight: 900; color: var(--navy); font-size: clamp(26px, 4.5vw, 38px); line-height: 1.1; margin: 0 0 6px; }
h2 { font-weight: 800; color: var(--navy); font-size: 20px; margin: 0 0 10px; }
.lead { color: var(--muted); margin: 0 0 18px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.site-footer { max-width: 1100px; margin: 0 auto; padding: 0 16px 24px; color: var(--muted); font-size: 13px; text-align: center; }
.site-footer a { color: inherit; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 20px; }
.narrow { max-width: 560px; margin: 0 auto; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 2px solid var(--act); background: var(--act); color: var(--act-ink);
  font-weight: 700; border-radius: 10px; padding: 10px 18px; cursor: pointer; text-decoration: none; line-height: 1.2; }
.btn:hover { filter: brightness(.95); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.ghost { background: var(--surface); color: var(--act-text); }
.btn.small { padding: 6px 12px; font-size: 14px; border-radius: 8px; }
.btn.danger { border-color: var(--alert); background: var(--surface); color: var(--alert); }
.btn.danger.sure { background: var(--alert); color: #fff; }
.btn.big { font-size: 18px; padding: 13px 22px; width: 100%; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--blue); text-decoration: underline; cursor: pointer; font: inherit; }

.field { margin: 0 0 18px; }
.field > label, .field > .label { display: block; font-weight: 700; margin: 0 0 6px; }
.input { width: 100%; padding: 11px 13px; border: 2px solid var(--edge); border-radius: 10px; background: var(--surface); font-size: 17px; }
.input:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(54, 95, 146, .2); }
.hint { font-size: 14px; color: var(--muted); margin: 6px 0 0; }
.error { margin: 0 0 14px; padding: 10px 14px; border-radius: 8px; background: var(--alert-soft); border-left: 4px solid var(--alert); font-weight: 700; }
.notice { margin: 0 0 14px; padding: 10px 14px; border-radius: 8px; background: var(--ok-soft); border-left: 4px solid var(--ok); font-weight: 700; }

/* city suggestions */
.combo { position: relative; }
.combo ul { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: var(--surface);
  border: 1px solid var(--edge); border-radius: 10px; box-shadow: var(--shadow); max-height: 320px; overflow: auto; }
.combo li { padding: 8px 10px; border-radius: 7px; cursor: pointer; display: flex; gap: 8px; align-items: baseline; }
.combo li .f { font-size: 18px; }
.combo li .w { color: var(--muted); font-size: 14px; }
.combo li[aria-selected="true"], .combo li:hover { background: var(--act-soft); }
.combo li.none { cursor: default; color: var(--muted); background: none; }
.picked { margin: 8px 0 0; font-weight: 700; color: var(--ok); }

/* emoji choice */
.emojis { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; border: 0; padding: 0; margin: 0; }
.emojis legend { font-weight: 700; margin: 0 0 6px; padding: 0; }
.emojis label { position: relative; display: block; }
.emojis input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.emojis span { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; font-size: 26px; border: 2px solid var(--line); border-radius: 10px; background: var(--surface); }
.emojis input:checked + span { border-color: var(--act); background: var(--act-soft); box-shadow: 0 0 0 2px var(--act); }
.emojis input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (max-width: 420px) { .emojis { grid-template-columns: repeat(4, 1fr); } }

/* toggles (°F/°C, fit/world) */
.seg { display: inline-flex; border: 2px solid var(--act); border-radius: 9px; overflow: hidden; }
.seg button { border: 0; background: var(--surface); color: var(--act-text); padding: 5px 11px; font-weight: 700; font-size: 14px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--act); color: var(--act-ink); }

/* stats */
.stats { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: baseline; }
.stat b { font-size: 26px; font-weight: 900; color: var(--navy); margin-right: 5px; font-variant-numeric: tabular-nums; }
.stat { color: var(--muted); }
.extremes { margin: 6px 0 0; color: var(--ink); }

/* the map */
.wm-map { position: relative; overflow: hidden; background: var(--sea); border-radius: 14px; border: 1px solid var(--line); }
.wm-map svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.wm-map { cursor: zoom-in; user-select: none; -webkit-user-select: none; }
.wm-map.dragging { cursor: grabbing; }
.wm-zoom { position: absolute; right: 10px; bottom: 10px; z-index: 8; display: flex; flex-direction: column; border-radius: 9px; overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .2); border: 1px solid var(--edge); }
.wm-zbtn { width: 34px; height: 34px; border: 0; border-bottom: 1px solid var(--line); background: #fff; color: var(--navy); font-size: 20px; font-weight: 700;
  line-height: 1; cursor: pointer; padding: 0; }
.wm-zbtn:last-child { border-bottom: 0; font-size: 17px; }
.wm-zbtn:hover { background: var(--act-soft); }
.wm-land { fill: var(--land); stroke: var(--border); stroke-width: .7px; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.wm-pins { position: absolute; inset: 0; pointer-events: none; }
.wm-pin { position: absolute; left: 0; top: 0; width: 0; height: 0; padding: 0; border: 0; background: none; cursor: pointer; pointer-events: auto; }
.wm-dot { position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; border-radius: 50%; background: var(--navy); border: 2px solid #fff; }
.wm-bubble { position: absolute; left: 0; bottom: 9px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 3px; white-space: nowrap;
  background: #fff; border: 1.5px solid var(--navy); border-radius: 999px; padding: 1px 8px 1px 5px; font-size: 13px; font-weight: 700; color: var(--navy);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18); line-height: 1.5; }
.wm-bubble::after { content: ""; position: absolute; left: 50%; bottom: -6px; margin-left: -5px; border: 5px solid transparent; border-top-color: var(--navy); border-bottom: 0; }
.wm-icon { font-size: 16px; line-height: 1; }
.wm-count { background: var(--act); color: #fff; border-radius: 999px; font-size: 11px; min-width: 18px; padding: 0 5px; text-align: center; margin-left: 2px; }
/* labels that don't fit are hidden; the dot stays and shows its number of
   people, and the label appears on hover or keyboard focus */
.wm-pin:hover, .wm-pin:focus-visible { z-index: 5; }
.wm-pin.nolabel .wm-bubble { display: none; }
.wm-pin.nolabel:hover .wm-bubble, .wm-pin.nolabel:focus-visible .wm-bubble { display: inline-flex; }
.wm-pin.below .wm-bubble { bottom: auto; top: 9px; }
.wm-pin.below .wm-bubble::after { bottom: auto; top: -6px; border-top: 0; border-bottom: 5px solid var(--navy); }
.wm-pin.many.nolabel .wm-dot { left: -10px; top: -10px; width: 20px; height: 20px; font-size: 10px; font-weight: 700; color: #fff;
  display: flex; align-items: center; justify-content: center; line-height: 1; }
.wm-pin:not(.nolabel) .wm-dot { font-size: 0; }
.wm-pin.mine .wm-bubble { border-color: var(--act); box-shadow: 0 0 0 3px rgba(229, 134, 39, .35); }
.wm-pin.mine .wm-dot { background: var(--act); }
.wm-pin:hover .wm-bubble, .wm-pin:focus-visible .wm-bubble { background: var(--act-soft); }
.wm-pin.new .wm-bubble { animation: wm-drop .6s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes wm-drop { from { opacity: 0; transform: translate(-50%, -26px) scale(.6); } to { opacity: 1; transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .wm-pin.new .wm-bubble { animation: none; } }
.wm-popover { position: absolute; z-index: 10; width: 240px; max-height: 60%; overflow: auto; background: #fff; border: 1px solid var(--edge); border-radius: 12px; box-shadow: var(--shadow); padding: 10px 12px; font-size: 14px; }
.wm-pop-head strong { display: block; font-size: 16px; color: var(--navy); }
.wm-pop-head span { color: var(--muted); }
.wm-pop-weather { margin: 4px 0 0; font-weight: 700; }
.wm-popover ul { list-style: none; margin: 8px 0 0; padding: 8px 0 0; border-top: 1px solid var(--line); }
.wm-popover li { padding: 2px 0; }
.wm-popover li.me { font-weight: 700; color: var(--act-text); }
.wm-popover .e { display: inline-block; width: 24px; }

/* list of people */
.people { list-style: none; margin: 0; padding: 0; font-size: 14px; line-height: 1.3; }
.people li { display: flex; align-items: center; gap: 7px; padding: 3px 0; border-bottom: 1px solid #eef0f2; }
.people li:last-child { border-bottom: 0; }
.people .e { font-size: 17px; width: 22px; text-align: center; flex: none; }
.people .who { min-width: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.people .who b { font-weight: 700; }
.people .who span { color: var(--muted); }
.people .wx { white-space: nowrap; font-weight: 700; color: var(--navy); font-size: 13px; }
.people .rm { padding: 1px 8px; font-size: 12px; border-radius: 6px; border-width: 1.5px; }
.people li.me b { color: var(--act-text); }
.people li.fresh { animation: wm-fresh 2.5s ease-out; }
@keyframes wm-fresh { from { background: var(--act-soft); } to { background: transparent; } }

.pill { display: inline-block; font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.pill.open { background: var(--ok-soft); color: var(--ok); }
.pill.closed { background: #eceef1; color: var(--muted); }
