/* TALON · Earthquakes page (v1.8.262) — dark, map-first, same glass cards as the radar */
:root { --ink: #f5f5f7; --ink-2: rgba(235, 235, 245, 0.68); --ink-3: rgba(235, 235, 245, 0.42); --line: rgba(255, 255, 255, 0.1); --accent: #0a84ff; --card: rgba(22, 22, 26, 0.86); --side: 372px; --detail: 420px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #000; color: var(--ink); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
a { color: var(--accent); text-decoration: none; }
[hidden] { display: none !important; }
#map { position: fixed; inset: 0; }
.glass { background: var(--card); backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5); border-radius: 18px; box-shadow: 0 0 0 0.5px var(--line), 0 14px 40px rgba(0, 0, 0, 0.45); }
.mut { color: var(--ink-2); } .pad { padding: 14px 4px; }
.note { font-size: 12px; color: var(--ink-3); margin: 8px 0 0; line-height: 1.45; }
.spin { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--ink-3); border-top-color: var(--ink); border-radius: 50%; animation: sp 0.8s linear infinite; vertical-align: -1px; margin-right: 6px; }
@keyframes sp { to { transform: rotate(360deg); } }

/* top bar */
.q-top { position: fixed; top: 12px; left: 12px; width: var(--side); height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 14px; z-index: 5; }
.q-brand { display: flex; align-items: center; gap: 7px; color: var(--ink); font-weight: 800; letter-spacing: 0.06em; font-size: 15px; }
.q-top .q-title { font-size: 15px; font-weight: 600; margin: 0; color: var(--ink-2); padding-left: 10px; border-left: 1px solid var(--line); }
.q-radar { margin-left: auto; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.q-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.q-pill i { width: 7px; height: 7px; border-radius: 50%; background: #30d158; flex: none; }
.q-pill.live i { box-shadow: 0 0 0 0 rgba(48, 209, 88, 0.6); animation: beat 2s infinite; }
.q-pill.warn i { background: #ffd60a; } .q-pill.bad i { background: #ff453a; } .q-pill.bad { color: #ff9f96; }
@keyframes beat { 70% { box-shadow: 0 0 0 7px rgba(48, 209, 88, 0); } 100% { box-shadow: 0 0 0 0 rgba(48, 209, 88, 0); } }

/* side panel */
#q-side { position: fixed; top: 76px; left: 12px; bottom: 12px; width: var(--side); display: flex; flex-direction: column; z-index: 4; overflow: hidden; }
#q-handle { display: none; }
.q-filters { padding: 12px 12px 4px; display: grid; gap: 7px; }
.seg { display: flex; background: rgba(120, 120, 128, 0.2); border-radius: 10px; padding: 2px; }
.seg button { flex: 1; text-align: center; padding: 6px 4px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; min-height: 30px; }
.seg button.on { background: rgba(255, 255, 255, 0.16); color: var(--ink); }
.seg.small button { font-size: 11.5px; padding: 4px 8px; min-height: 26px; }
#q-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 8px 12px 0; border-radius: 12px; overflow: hidden; background: var(--line); }
#q-stats > div { background: rgba(30, 30, 34, 0.9); padding: 8px 10px; min-width: 0; }
#q-stats b { display: block; font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
#q-stats span { font-size: 11px; color: var(--ink-3); }
#q-stats .wide { grid-column: 1 / -1; font-size: 12.5px; color: var(--ink-2); }
#q-stats .wide b { display: inline; font-size: inherit; color: var(--ink); }
.q-link { color: var(--ink-2); text-align: left; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.q-tabs { display: flex; gap: 18px; padding: 12px 16px 0; border-bottom: 1px solid var(--line); }
.q-tabs button { padding: 0 0 9px; font-weight: 600; font-size: 13px; color: var(--ink-3); border-bottom: 2px solid transparent; }
.q-tabs button.on { color: var(--ink); border-bottom-color: var(--accent); }
#q-list, #q-activity, #q-about { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 6px; }
#q-activity { padding: 12px; }
#q-about { padding: 14px 16px 20px; } #q-about h1 { font-size: 18px; margin: 0 0 6px; } #q-about h2 { font-size: 13.5px; margin: 16px 0 4px; } #q-about p { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.q-row { display: flex; gap: 11px; align-items: flex-start; width: 100%; padding: 9px 8px; border-radius: 12px; }
.q-row:hover { background: rgba(255, 255, 255, 0.06); } .q-row.on { background: rgba(10, 132, 255, 0.2); }
.q-mag { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; background: rgba(120, 120, 128, 0.28); color: var(--ink); }
.q-mag.m3 { background: rgba(255, 214, 10, 0.2); color: #ffd60a; } .q-mag.m4 { background: rgba(255, 159, 10, 0.24); color: #ffb340; }
.q-mag.m5 { background: rgba(255, 69, 58, 0.26); color: #ff6961; } .q-mag.m6 { background: #ff453a; color: #fff; }
.q-mag.big { width: 58px; height: 58px; font-size: 22px; border-radius: 16px; }
.q-main { min-width: 0; flex: 1; } .q-main b { display: block; font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-main small { color: var(--ink-3); font-size: 12px; }
.q-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; } .q-chips:empty { display: none; }
.q-chips em { font-style: normal; font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: rgba(120, 120, 128, 0.26); color: var(--ink-2); }
.c-prov { background: rgba(100, 210, 255, 0.2) !important; color: #64d2ff !important; } b.c-prov { background: none !important; }
.c-tsu { background: rgba(10, 132, 255, 0.28) !important; color: #7ab8ff !important; } .c-dim { opacity: 0.7; }
.c-green { color: #30d158 !important; } .c-yellow { color: #ffd60a !important; } .c-orange { color: #ff9f0a !important; } .c-red { background: #ff453a !important; color: #fff !important; }
.q-more { display: block; width: 100%; text-align: center; padding: 12px; color: var(--accent); font-weight: 600; }
#q-scatter, #d-seq, #d-seis, #live-cv { display: block; width: 100%; }
#q-scatter, #d-seq { cursor: pointer; }
#q-bins { margin-top: 14px; display: grid; gap: 6px; }
#q-bins > div { display: grid; grid-template-columns: 62px 1fr 52px; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); }
#q-bins i { height: 8px; border-radius: 4px; background: rgba(120, 120, 128, 0.2); overflow: hidden; } #q-bins i b { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
#q-bins em { font-style: normal; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }

/* map tools */
#q-tools { position: fixed; top: 12px; left: calc(var(--side) + 24px); z-index: 3; padding: 8px 10px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; max-width: calc(100vw - var(--side) - 36px); border-radius: 14px; }
body.has-detail #q-tools { max-width: calc(100vw - var(--side) - var(--detail) - 48px); }
#q-legend { display: flex; gap: 10px; font-size: 11.5px; color: var(--ink-2); flex-wrap: wrap; }
#q-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }
.q-toggles { display: flex; gap: 6px; flex-wrap: wrap; }
.q-toggles button { font-size: 11.5px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: rgba(120, 120, 128, 0.22); color: var(--ink-2); min-height: 28px; }
.q-toggles button.on { background: rgba(10, 132, 255, 0.3); color: #fff; } .q-toggles button.busy { opacity: 0.5; }

/* detail */
#q-detail { position: fixed; top: 12px; right: 12px; bottom: 12px; width: var(--detail); z-index: 6; overflow-y: auto; overscroll-behavior: contain; padding: 16px; }
body.has-detail .maplibregl-ctrl-bottom-right { right: calc(var(--detail) + 14px); }
.d-head { display: flex; gap: 12px; align-items: center; }
.d-head h2 { font-size: 17px; margin: 0; line-height: 1.25; } .d-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-2); } .d-head > div { flex: 1; min-width: 0; }
.d-x { flex: none; width: 32px; height: 32px; border-radius: 50%; background: rgba(120, 120, 128, 0.26); font-size: 20px; line-height: 1; text-align: center; color: var(--ink-2); align-self: flex-start; }
.d-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-radius: 12px; overflow: hidden; margin-top: 14px; }
.d-facts > div { background: rgba(30, 30, 34, 0.9); padding: 9px 11px; min-width: 0; }
.d-facts span, .i-cell span { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); }
.d-facts b { display: block; font-size: 13.5px; font-weight: 600; margin-top: 1px; } .d-facts small { color: var(--ink-3); font-size: 11.5px; }
#q-detail section { margin-top: 18px; }
#q-detail h3 { font-size: 13px; font-weight: 700; margin: 0 0 8px; display: flex; align-items: baseline; gap: 8px; }
#q-detail h3 small { font-weight: 600; font-size: 10.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.05em; }
#q-detail section p { margin: 0; font-size: 13px; color: var(--ink-2); } #q-detail section p b { color: var(--ink); }
#q-detail section p.note { margin-top: 8px; font-size: 12px; color: var(--ink-3); }
.i-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.i-cell { border-radius: 12px; padding: 9px 11px; background: rgba(30, 30, 34, 0.9); box-shadow: inset 3px 0 0 var(--c); min-width: 0; }
.i-cell b { display: block; font-size: 20px; font-weight: 700; } .i-cell small { font-size: 11.5px; color: var(--ink-2); display: block; line-height: 1.3; }
.d-alert { margin-top: 14px; padding: 10px 12px; border-radius: 12px; font-size: 12.5px; color: var(--ink-2); background: rgba(10, 132, 255, 0.16); } .d-alert b { color: var(--ink); display: block; }
.d-table { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.d-table th { font-weight: 600; color: var(--ink-3); font-size: 11px; text-align: right; padding: 4px 6px; } .d-table th:first-child, .d-table td:first-child { text-align: left; color: var(--ink-2); }
.d-table td { text-align: right; padding: 6px; border-top: 1px solid var(--line); font-weight: 600; }
.d-rows { border-radius: 12px; overflow: hidden; background: var(--line); display: grid; gap: 1px; margin-top: 8px; }
.d-rows > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 11px; background: rgba(30, 30, 34, 0.9); font-size: 12.5px; } .d-rows span { color: var(--ink-2); } .d-rows b { font-weight: 600; text-align: right; }
.d-mech { display: flex; gap: 14px; align-items: center; } .d-mech canvas { flex: none; border-radius: 50%; } .d-mech small { display: block; margin-top: 5px; font-size: 11.5px; color: var(--ink-3); line-height: 1.45; }
.d-seqstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; } .d-seqstats b { display: block; font-size: 18px; } .d-seqstats span { font-size: 11px; color: var(--ink-3); }
.d-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 14px; border-radius: 10px; background: rgba(120, 120, 128, 0.26); color: var(--ink); font-size: 13px; font-weight: 600; }
.btn:hover { background: rgba(120, 120, 128, 0.4); }

/* live seismograph */
#q-live { position: fixed; left: calc(var(--side) + 24px); right: 60px; bottom: 12px; z-index: 3; padding: 10px 12px 8px; max-width: 760px; }
body.has-detail #q-live { right: calc(var(--detail) + 70px); }
#q-live.shaking { box-shadow: 0 0 0 2px var(--shake), 0 14px 40px rgba(0, 0, 0, 0.45); }
#live-cv { cursor: crosshair; }
.live-span { flex: none; align-self: flex-start; } .live-head > div:first-child { flex: 1; min-width: 0; }
#live-info { margin: 6px 0 4px; padding: 8px 10px; border-radius: 10px; background: rgba(30, 30, 34, 0.9); font-size: 12.5px; line-height: 1.5; color: var(--ink-2); } #live-info b { color: var(--ink); }
.btn.sm { min-height: 28px; padding: 0 10px; font-size: 12px; margin-left: 6px; vertical-align: baseline; }
.live-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11px; color: var(--ink-3); margin-top: 2px; } .live-legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.live-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 4px; } .live-head b { display: block; font-size: 13px; } .live-head small { color: var(--ink-3); font-size: 11.5px; display: block; } .live-head small strong { color: var(--ink); font-weight: 600; }

/* toast + map popup */
#q-toast { position: fixed; top: 76px; left: 50%; transform: translate(-50%, -20px); opacity: 0; pointer-events: none; transition: 0.25s; z-index: 9; max-width: min(420px, calc(100vw - 24px)); }
#q-toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#q-toast button, #q-toast .plain { display: flex; gap: 11px; align-items: center; padding: 9px 14px 9px 9px; border-radius: 16px; background: rgba(30, 30, 34, 0.96); box-shadow: 0 0 0 0.5px var(--line), 0 12px 34px rgba(0, 0, 0, 0.5); }
#q-toast .plain { padding: 10px 14px; font-size: 13px; } #q-toast b { display: block; font-size: 13.5px; } #q-toast small { color: var(--ink-3); font-size: 12px; }
.maplibregl-popup-content { background: rgba(30, 30, 34, 0.96); color: var(--ink); border-radius: 12px; padding: 9px 12px; font: 12.5px/1.4 var(--font); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5); }
.maplibregl-popup-tip { border-top-color: rgba(30, 30, 34, 0.96) !important; border-bottom-color: rgba(30, 30, 34, 0.96) !important; }
.maplibregl-ctrl-attrib { font-size: 10.5px; }

#q-sum, #q-tools-btn { display: none; }

/* phones (v1.8.271): header · a Layers button that opens the legend and toggles · the map · a bottom sheet with three
   heights. Everything is sized with dvh so it ends at the visible bottom of the screen, above the browser's own bar. */
@media (max-width: 760px) {
  body { height: 100dvh; position: relative; }
  .q-top { position: absolute; left: 8px; right: 8px; top: calc(8px + env(safe-area-inset-top)); width: auto; height: 46px; padding: 0 12px; gap: 8px; }
  .q-top .q-title { font-size: 14px; padding-left: 8px; } .q-pill { font-size: 11px; }
  #q-tools-btn { display: inline-flex; align-items: center; gap: 6px; position: absolute; z-index: 3; top: calc(62px + env(safe-area-inset-top)); right: 8px; height: 38px; padding: 0 13px; border-radius: 12px; font-size: 13px; font-weight: 600; color: var(--ink); }
  body.tools-open #q-tools-btn { background: rgba(10, 132, 255, 0.5); } body.has-detail #q-tools-btn { display: none; }
  #q-tools { display: none; position: absolute; top: calc(108px + env(safe-area-inset-top)); right: 8px; left: auto; width: min(310px, calc(100vw - 16px)); max-width: none; flex-direction: column; align-items: stretch; gap: 10px; padding: 12px; z-index: 7; }
  body.tools-open #q-tools { display: flex; } body.has-detail #q-tools { display: none; }
  #q-legend { gap: 6px 12px; font-size: 12px; } .q-toggles button { flex: 1; text-align: center; min-height: 38px; font-size: 12.5px; white-space: nowrap; }
  #q-side { position: absolute; top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 46dvh; border-radius: 20px 20px 0 0; padding-bottom: env(safe-area-inset-bottom); transition: height 0.26s ease; box-shadow: 0 -0.5px 0 var(--line), 0 -10px 30px rgba(0, 0, 0, 0.4); }
  body.side-full #q-side { height: calc(100dvh - 62px - env(safe-area-inset-top)); }
  body.side-min #q-side { height: calc(134px + env(safe-area-inset-bottom)); }
  #q-handle { display: block; width: 100%; padding: 9px 0 5px; touch-action: none; } #q-handle i { display: block; width: 40px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.32); margin: 0 auto; }
  #q-stats { display: none; }
  #q-sum { display: flex; flex-direction: column; gap: 1px; padding: 2px 16px 0; font-size: 13px; color: var(--ink-2); order: -1; } #q-sum b { color: var(--ink); } #q-sum .q-link { font-size: 12.5px; color: var(--ink-3); }
  #q-side { display: flex; } #q-handle { order: -2; }
  .q-filters { padding: 10px 12px 2px; gap: 6px; }
  .q-filters .seg:nth-child(3) { display: none; } body.side-full .q-filters .seg:nth-child(3) { display: flex; }
  /* the strip keeps the Hour / Day / Week / Month row, so it is always clear which time span the dots are for */
  body.side-min .q-filters .seg:nth-child(n + 2), body.side-min .q-tabs, body.side-min #q-list, body.side-min #q-activity, body.side-min #q-about { display: none; }
  .q-tabs { padding: 10px 16px 0; gap: 20px; } .q-tabs button { padding-bottom: 8px; font-size: 13.5px; }
  #q-list { padding-bottom: 24px; } .q-row { padding: 10px 8px; }
  .seg button { min-height: 36px; font-size: 13px; }
  #q-detail { position: absolute; top: 34dvh; left: 0; right: 0; bottom: 0; width: auto; border-radius: 20px 20px 0 0; padding: 14px 14px calc(28px + env(safe-area-inset-bottom)); box-shadow: 0 -0.5px 0 var(--line), 0 -10px 30px rgba(0, 0, 0, 0.5); }
  .d-x { width: 36px; height: 36px; } .btn { min-height: 42px; }
  #q-live { position: absolute; left: 8px; right: 8px; bottom: calc(46dvh + 8px); max-width: none; } body.side-min #q-live { bottom: calc(142px + env(safe-area-inset-bottom)); } body.side-full #q-live, body.has-detail #q-live { display: none; }
  .live-head { flex-wrap: wrap; } .live-span { order: 3; }
  .maplibregl-ctrl-bottom-right { display: none; }
  #q-toast { top: calc(112px + env(safe-area-inset-top)); }
}
