/* ── True Size of Countries — base copied from the Earth suite (tsunami.css):
   tokens in css/shared.css; hero / card / button / section / FAQ / trust patterns. ── */

main { max-width: 940px; margin: 0 auto; padding: 20px; }

/* ── Tool hero: dark accent icon chip + Orbitron h1 + subtitle ──── */
.tool-hero { max-width: 940px; margin: 0 auto; padding: 36px 20px 4px; }
.tool-hero .hero-head { display: flex; align-items: center; gap: 16px; }
.tool-hero .hero-icon { flex-shrink: 0; width: 56px; height: 56px; border-radius: 14px; background: #0f0e1d; display: flex; align-items: center; justify-content: center; }
.tool-hero .hero-icon svg { width: 30px; height: 30px; stroke: var(--accent); fill: none; }
.tool-hero .subtitle { color: var(--muted); font-size: 1.02rem; margin-top: 12px; max-width: 720px; }
.tool-hero .subtitle a { color: var(--accent); text-decoration: none; }
.tool-hero .subtitle a:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ── Card ───────────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 24px; margin-top: 24px; }
.card + .card { margin-top: 16px; }
.card-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 14px; }

/* ── Buttons ────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 11px 20px; font-family: inherit; font-size: .95rem; font-weight: 700; border: none; border-radius: var(--radius); cursor: pointer; background: var(--accent); color: #fff; transition: background .15s, transform .1s; white-space: nowrap; }
.btn:hover { background: var(--accent-h); } .btn:active { transform: scale(.98); } .btn svg { width: 16px; height: 16px; }
/* Fixed-red location button — same across every suite, independent of tool accent */
.btn-loc { background: #dc2626; }
.btn-loc:hover { background: #b91c1c; }
.btn-ghost { background: var(--surface); color: var(--text); border: 1.5px solid var(--border); }
.btn-ghost:hover { background: var(--surface2); border-color: var(--muted); }

/* ── Trust row ──────────────────────────────────────────────────── */
.trust-row { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.trust-item { display: inline-flex; align-items: center; gap: 7px; font-size: .88rem; font-weight: 600; color: var(--muted); }
.trust-item svg { width: 16px; height: 16px; stroke: var(--accent); fill: none; flex-shrink: 0; }

/* ── Content sections (how-it-works / faq) ──────────────────────── */
.section { max-width: 940px; margin: 16px auto; padding: 24px 20px; }
.section > h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 8px; }
.section > .section-sub { color: var(--muted); margin-bottom: 20px; }
.steps { display: grid; gap: 14px; }
.step { display: flex; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow); }
.step-num { flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-bg); color: var(--accent-fg); font-weight: 800; display: flex; align-items: center; justify-content: center; }
.step-body h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; }
.step-body p { font-size: .92rem; color: var(--muted); line-height: 1.6; }
.step-body a { color: var(--accent); }

.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; }
.faq summary { cursor: pointer; padding: 16px 18px; font-weight: 700; font-size: .98rem; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; float: right; color: var(--accent); font-weight: 700; }
.faq details[open] summary::after { content: '\2013'; }
.faq .faq-body { padding: 0 18px 16px; font-size: .92rem; color: var(--muted); line-height: 1.7; }
.faq .faq-body a { color: var(--accent); }

/* ── Safety banner (NOT an early-warning system) ────────────────── */
.safety-note { display: flex; gap: 12px; align-items: flex-start; background: #fff7ed; border: 1px solid #fdba74; border-radius: var(--radius-lg); padding: 14px 18px; margin-top: 24px; }
.safety-note svg { flex-shrink: 0; width: 22px; height: 22px; stroke: #c2410c; fill: none; margin-top: 1px; }
.safety-note p { font-size: .9rem; color: #7c2d12; line-height: 1.6; }
.safety-note a { color: #9a3412; font-weight: 700; text-decoration: underline; }


/* ── Earth sub-nav (copied from tsunami.css) ── */
/* ── Per-tool sub-nav ([Tracker] | Magnitude | Articles | Blogs) ── */
.sub-link { display: inline-flex; align-items: center; min-height: 38px; padding: 6px 16px; border-radius: 999px; font-size: .9rem; font-weight: 600; color: var(--muted); border: 1.5px solid var(--border); background: var(--surface); text-decoration: none; transition: background .15s, color .15s, border-color .15s; }
.sub-link:hover { color: var(--accent-fg); background: var(--accent-bg); border-color: var(--accent); text-decoration: none; }
.sub-link.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Tool pages: single contextual bar in the header (logo = back to tracker).
   On mobile the .sub-link pills collapse into the ☰ MENU hamburger; the pill
   row shows from 720px up — matching the other /tools/ suites. */
body.tool-page .site-header { height: auto; min-height: 56px; padding-top: 8px; padding-bottom: 8px; }
body.tool-page .site-nav .sub-link { display: none; }
@media (min-width: 720px) {
  body.tool-page .site-header { flex-wrap: wrap; row-gap: 8px; }
  body.tool-page .site-nav { flex-wrap: wrap; gap: 8px; }
  body.tool-page .site-nav .sub-link { display: inline-flex; min-height: 36px; }
}
.sub-link-home { margin-left: 6px; }
@media (min-width: 560px) { .sub-link-home { margin-left: 14px; } }
/* Keep the theme toggle on the top row with the logo. The header stays a
   single flex line; the dense pill nav flex-grows and wraps its OWN pills
   (right-aligned) instead of pushing the toggle onto a new row. */
@media (min-width: 720px) {
  body.tool-page .site-header { flex-wrap: nowrap; }
  body.tool-page .site-nav { flex: 1 1 auto; min-width: 0; justify-content: flex-end; }
  body.tool-page .theme-toggle { flex-shrink: 0; align-self: center; }
}

/* ── True size of countries ──────────────────────────────────────── */
body[data-tool="truesize"] { --accent:#0f766e; --accent-h:#115e59; --accent-bg:#ccfbf1; --accent-fg:#134e4a; --ring:15,118,110; }
.ts-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.ts-add { display: flex; gap: 8px; flex: 1 1 320px; }
.ts-add input { flex: 1 1 auto; min-width: 0; font: inherit; font-size: 1rem; padding: 11px 14px; border: 1.5px solid var(--border-control, #7a7fb5); border-radius: var(--radius); background: var(--surface); color: var(--text); }
.ts-add input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--ring),.14); }
.ts-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.ts-chip, .ts-proj, .ts-preset { font: inherit; font-size: .84rem; font-weight: 700; padding: 7px 12px; border-radius: 999px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; min-height: 36px; }
.ts-chip:hover, .ts-preset:hover { border-color: var(--accent); color: var(--accent-fg); }
.ts-proj[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.ts-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.ts-row-label { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-right: 4px; }
/* Dark map stage in both themes, matching the other LK Forge maps */
.ts-stage { position: relative; isolation: isolate; margin-top: 12px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); background: radial-gradient(120% 90% at 50% 45%, #13233a 0%, #0b1220 55%, #070b14 100%); }
.ts-stage:fullscreen { border-radius: 0; border: 0; display: flex; align-items: center; justify-content: center; }
.ts-map { background: transparent; touch-action: none; width: 100%; }
.ts-map svg { display: block; width: 100%; height: auto; }
.ts-stage:fullscreen .ts-map svg { max-height: 100vh; }
.ts-sphere { fill: #0f2440; stroke: #2a4a70; }
.ts-grat { fill: none; stroke: rgba(160,200,240,.12); stroke-width: .6; }
.ts-land { fill: #3b4a5c; stroke: #5b6b80; stroke-width: .5; cursor: pointer; }
.ts-land:hover { fill: #4b5d73; }
.ts-fs { position: absolute; top: 12px; right: 12px; z-index: 5; width: 36px; height: 36px; border-radius: 10px; border: 0; background: rgba(15,23,42,.85); color: #e2e8f0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.ts-fs:hover { background: rgba(30,41,59,.95); color: #fff; }
.ts-fs:focus-visible { outline: 2px solid #38bdf8; outline-offset: 2px; }
.ts-fs svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ts-hintbar { position: absolute; left: 12px; bottom: 12px; z-index: 5; max-width: calc(100% - 24px); padding: 8px 12px; border-radius: 12px; background: rgba(15,23,42,.84); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 8px 24px rgba(0,0,0,.35); color: #e2e8f0; font-weight: 600; font-size: .78rem; pointer-events: none; }
@media (max-width: 600px) { .ts-hintbar { font-size: .7rem; padding: 6px 10px; } }
.ts-moved { fill-opacity: .55; stroke-width: 1.4; cursor: grab; }
.ts-moved.is-dragging { cursor: grabbing; fill-opacity: .7; }
.ts-moved:focus { outline: none; stroke-width: 3; }
.ts-status { font-size: .88rem; font-weight: 600; color: var(--muted); min-height: 1.2em; margin-top: 8px; }
.ts-note { color: var(--muted); font-size: .92rem; margin-top: 10px; line-height: 1.55; min-height: 1.2em; }
.ts-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; margin-top: 14px; }
.ts-card { border: 1px solid var(--border); border-left: 5px solid var(--c); border-radius: var(--radius); padding: 12px 14px; font-size: .9rem; line-height: 1.5; }
.ts-card p { margin-top: 4px; color: var(--muted); }
.ts-card p strong { color: var(--text); }
.ts-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ts-x { font: inherit; font-size: 1.2rem; line-height: 1; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; }
.ts-x:hover { color: var(--text); border-color: var(--text); }
.ts-cmp { color: var(--accent-fg) !important; font-weight: 700; }
.ts-empty { color: var(--muted); margin-top: 12px; }
.pt-table { width: 100%; border-collapse: collapse; font-size: .92rem; margin-top: 12px; }
.pt-table th, .pt-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.pt-table thead th { font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.pt-table-wrap { overflow-x: auto; }
.pt-num { font-family: 'JetBrains Mono', monospace; white-space: nowrap; }
/* Collapsible "Options" wrapper (matches health calculators) */
.opts { margin-top: 12px; }
.opts > summary {
  display: flex; align-items: center; gap: 8px; width: 100%; box-sizing: border-box;
  min-height: 44px; padding: 10px 20px; list-style: none; cursor: pointer;
  font-family: inherit; font-size: .92rem; font-weight: 700; color: #1e40af;
  background: #eaf1ff; border: 1.5px solid #c7dbff; border-radius: 14px;
  -webkit-user-select: none; user-select: none;
  transition: background .15s, border-color .15s, transform .1s;
}
.opts > summary::-webkit-details-marker { display: none; }
.opts > summary::marker { content: ""; }
.opts > summary:hover { background: #dbe7ff; border-color: #a9c7ff; }
.opts > summary:active { transform: scale(.99); }
.opts > summary .caret {
  order: 2; margin-left: auto; width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0; background: #2563eb; transition: transform .18s;
}
.opts > summary .caret::after { content: "+"; font-size: 1.3rem; font-weight: 700; line-height: 1; color: #fff; }
.opts[open] > summary .caret { transform: rotate(45deg); }
.opts-body.ts-row { margin-top: 0; padding-top: 12px; }
/* Glass header strip joined to the top of the map: projection tabs + fullscreen (same frame as the other LK Forge maps) */
.ts-stage { display: flex; flex-direction: column; }
.ts-glass { position: relative; z-index: 6; display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: rgba(15,23,42,.84); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255,255,255,.08); }
.ts-projs { display: flex; gap: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.ts-projs::-webkit-scrollbar { display: none; }
.ts-glass .ts-proj { flex: none; white-space: nowrap; min-height: 36px; padding: 6px 14px; border: 1px solid rgba(203,213,225,.3); background: rgba(255,255,255,.06); color: #e2e8f0; }
.ts-glass .ts-proj:hover { background: rgba(255,255,255,.14); color: #fff; }
.ts-glass .ts-proj[aria-pressed="true"] { background: #2563eb; border-color: #2563eb; color: #fff; }
.ts-glass .ts-proj:focus-visible { outline: 2px solid #38bdf8; outline-offset: 2px; }
.ts-glass .ts-fs { position: static; flex: none; margin-left: auto; background: rgba(255,255,255,.08); }
.ts-glass .ts-fs:hover { background: rgba(255,255,255,.16); }
.ts-stage:fullscreen { justify-content: flex-start; align-items: stretch; }
.ts-stage:fullscreen .ts-map { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; }
.ts-stage:fullscreen .ts-map svg { max-height: calc(100vh - 57px); }

/* [hidden]-guard (2026-09-29): an author display rule must never beat the hidden attribute (bit 4x: weather, timer, whats-my-ip, image converters). */
[hidden] { display: none !important; }
