/* ===================================================================
   StormTracking — stormtracking.com
   Single-page live storm & winter-weather tracker
   =================================================================== */

:root {
  /* base surfaces */
  --bg:        #0a1120;
  --bg-2:      #0e1830;
  --panel:     #111d38;
  --panel-2:   #16233f;
  --line:      #22314f;
  --line-2:    #2c3f63;

  /* text */
  --ink:       #eaf1ff;
  --ink-soft:  #b7c4de;
  --ink-mute:  #7d8bab;

  /* brand + accents */
  --brand:     #38bdf8;   /* sky */
  --brand-2:   #22d3ee;

  /* severity / category palette */
  --cat5:      #f043a6;   /* magenta - major hurricane */
  --cat3:      #ff5a5f;   /* red */
  --cat1:      #ff8c42;   /* orange */
  --ts:        #ffd23f;   /* yellow - tropical storm */
  --td:        #7dd3fc;   /* light blue - depression */
  --tropwarn:  #ff6b6b;
  --winter:    #8b9dff;   /* icy indigo */
  --winter-2:  #67e8f9;
  --ok:        #34d399;

  --radius:    14px;
  --radius-sm: 10px;
  --shadow:    0 18px 50px -20px rgba(0,0,0,.7);
  --maxw:      1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background:
    radial-gradient(1100px 620px at 80% -8%, rgba(56,189,248,.14), transparent 60%),
    radial-gradient(900px 560px at -5% 10%, rgba(139,157,255,.12), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------------- Top bar ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(10,17,32,.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand__mark { color: var(--brand); display: inline-flex; }
.brand__text { font-weight: 600; font-size: 1.15rem; letter-spacing: -.01em; }
.brand__text strong { font-weight: 800; color: var(--brand); }
.topnav { margin-left: auto; display: flex; gap: 6px; }
.topnav a {
  text-decoration: none; color: var(--ink-soft); font-weight: 500; font-size: .92rem;
  padding: 8px 12px; border-radius: 9px; transition: .15s;
}
.topnav a:hover { color: var(--ink); background: var(--panel); }

.livebox {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--line);
  padding: 6px 8px 6px 12px; border-radius: 999px;
}
.livedot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--ink-mute); flex: none;
  box-shadow: 0 0 0 0 rgba(52,211,153,.6);
}
.livedot.is-live { background: var(--ok); animation: pulse 2s infinite; }
.livedot.is-err  { background: var(--cat3); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52,211,153,.55); }
  70% { box-shadow: 0 0 0 8px rgba(52,211,153,0); }
  100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); }
}
.livebox__txt { display: flex; flex-direction: column; line-height: 1.15; }
#liveLabel { font-size: .78rem; font-weight: 600; }
.livebox__sub { font-size: .68rem; color: var(--ink-mute); font-family: "JetBrains Mono", monospace; }
.refreshbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--ink-soft);
  cursor: pointer; transition: .15s;
}
.refreshbtn:hover { color: var(--ink); border-color: var(--line-2); transform: rotate(-40deg); }
.refreshbtn.is-spin svg { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- Hero ---------------- */
.hero { padding: 52px 0 30px; }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .16em; font-size: .72rem;
  color: var(--brand-2); font-weight: 600; margin: 0 0 12px;
}
.hero__title { font-size: clamp(1.9rem, 4vw, 2.9rem); font-weight: 800; }
.hero__sub { color: var(--ink-soft); font-size: 1.05rem; margin: 16px 0 0; max-width: 46ch; }

.statgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stat {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 18px 16px; position: relative; overflow: hidden;
}
.stat::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--brand);
}
.stat--tropical::before { background: linear-gradient(var(--cat3), var(--cat1)); }
.stat--warn::before { background: var(--tropwarn); }
.stat--severe::before { background: linear-gradient(#fa5252, #ff922b); }
.stat--threat::before { background: linear-gradient(#20c997, #fab005); }
.stat--winter::before { background: var(--winter); }
.stat--sev::before { background: var(--ts); }
.stat__num { font-size: 2.2rem; font-weight: 800; letter-spacing: -.03em; }
.stat__num.is-sev { font-size: 1.35rem; line-height: 2.6rem; }
.stat__label { color: var(--ink-mute); font-size: .82rem; margin-top: 2px; }

/* ---------------- My alert areas bar ---------------- */
.areasbar {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.02); padding: 12px 0;
}
.areasbar__inner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.areasbar__label { font-size: .85rem; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }
.areasbar__chips { display: flex; gap: 6px; flex-wrap: wrap; }
.areachip {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(56,189,248,.12); border: 1px solid rgba(56,189,248,.4);
  color: #bde8ff; font-size: .8rem; font-weight: 600;
  padding: 5px 7px 5px 11px; border-radius: 999px;
}
.areachip__x {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,.12); color: #bde8ff; font-size: .72rem; line-height: 1; padding: 0;
}
.areachip__x:hover { background: rgba(255,90,95,.5); color: #fff; }
.areasbar__searchwrap { position: relative; flex: 1; min-width: 220px; max-width: 340px; }
#areaSearch {
  width: 100%; background: var(--panel); border: 1px solid var(--line); color: var(--ink);
  padding: 8px 13px; border-radius: 10px; font-size: .85rem; font-family: inherit;
}
#areaSearch:focus { outline: none; border-color: var(--brand); }
.areasbar__suggest {
  position: absolute; top: calc(100% + 5px); left: 0; right: 0; z-index: 1200;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px;
  box-shadow: var(--shadow); overflow: hidden; max-height: 260px; overflow-y: auto;
}
.suggest__item {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 9px 13px; color: var(--ink); font-size: .85rem; font-family: inherit;
  border-bottom: 1px solid var(--line);
}
.suggest__item:last-child { border-bottom: none; }
.suggest__item:hover, .suggest__item.is-hi { background: var(--panel-2); }
.suggest__item small { color: var(--ink-mute); }
.suggest__empty { padding: 9px 13px; color: var(--ink-mute); font-size: .82rem; }
.areasbar__toggle {
  background: var(--panel); border: 1px solid var(--line); color: var(--ink-soft);
  padding: 8px 14px; border-radius: 999px; font-size: .8rem; font-weight: 700;
  cursor: pointer; font-family: inherit; white-space: nowrap; transition: .15s;
}
.areasbar__toggle.is-on { background: var(--brand); border-color: var(--brand); color: #05213a; }
.areasbar__toggle:hover { border-color: var(--brand); }
.areasbar__bell { background: var(--panel); border: 1px solid var(--line); color: var(--ink-soft);
  padding: 8px 14px; border-radius: 999px; font-size: .8rem; font-weight: 700; cursor: pointer;
  font-family: inherit; white-space: nowrap; transition: .15s; }
.areasbar__bell:hover { border-color: var(--ok); }
.areasbar__bell.is-on { background: rgba(52,211,153,.14); border-color: rgba(52,211,153,.5); color: #9ff0d2; }
.areasbar__bell:disabled { opacity: .5; cursor: not-allowed; }

/* ---------------- Changes banner ---------------- */
.changes { background: rgba(56,189,248,.07); border-bottom: 1px solid rgba(56,189,248,.25); }
.changes__inner { display: flex; align-items: center; gap: 12px; padding: 10px 22px; font-size: .87rem; color: var(--ink-soft); }
.changes__inner strong { color: var(--ink); }
.changes__inner em { color: var(--ts); font-style: normal; }
.changes__inner small { color: var(--ink-mute); }
.changes__icon { flex: none; }
.changes__close { margin-left: auto; background: none; border: none; color: var(--ink-mute); cursor: pointer;
                  font-size: .85rem; padding: 4px 8px; border-radius: 6px; }
.changes__close:hover { color: var(--ink); background: rgba(255,255,255,.06); }

/* ---------------- Development outlook (TWO) ---------------- */
.outlook { margin-top: 18px; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px;
           background: rgba(255,255,255,.015); }
.outlook__head h3 { font-size: .95rem; color: var(--ink); margin-bottom: 12px; }
.outlook__src { color: var(--ink-mute); font-weight: 500; font-size: .76rem; margin-left: 8px; }
.outlook__grid { display: flex; gap: 12px; flex-wrap: wrap; }
.outlook__item { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
                 padding: 10px 14px; min-width: 190px; }
.outlook__item--lo  { border-left: 3px solid #74c0fc; }
.outlook__item--med { border-left: 3px solid #ffd43b; }
.outlook__item--hi  { border-left: 3px solid #ff8c42; }
.outlook__pct { font-size: 1.4rem; font-weight: 800; font-family: "JetBrains Mono", monospace; }
.outlook__item--lo  .outlook__pct { color: #74c0fc; }
.outlook__item--med .outlook__pct { color: #ffd43b; }
.outlook__item--hi  .outlook__pct { color: #ff8c42; }
.outlook__txt { display: flex; flex-direction: column; font-size: .78rem; color: var(--ink-mute); }
.outlook__txt strong { color: var(--ink-soft); font-size: .85rem; }

/* ---------------- Winter event banner ---------------- */
.eventbanner { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; text-decoration: none;
               background: linear-gradient(90deg, rgba(139,157,255,.12), rgba(139,157,255,.03));
               border: 1px solid rgba(139,157,255,.35); border-radius: var(--radius); padding: 15px 18px; transition: .15s; }
.eventbanner:hover { border-color: rgba(139,157,255,.7); transform: translateY(-1px); }
.eventbanner__icon { font-size: 1.3rem; }
.eventbanner__txt { display: flex; flex-direction: column; color: var(--ink); font-size: .95rem; }
.eventbanner__txt span { color: var(--ink-mute); font-size: .8rem; }
.eventbanner__cta { margin-left: auto; color: var(--winter); font-weight: 600; font-size: .85rem; white-space: nowrap; }

/* ---------------- Card extras: impact detail + sparkline ---------------- */
.card__more { background: none; border: none; color: var(--brand-2); font: inherit; font-size: .82rem;
              font-weight: 600; cursor: pointer; padding: 0; }
.card__more:hover { text-decoration: underline; }
.card__detail { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 12px; }
.card__detail h4 { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-mute); margin: 10px 0 4px; }
.card__detail p { font-size: .84rem; color: var(--ink-soft); margin: 0 0 8px; line-height: 1.55; }
.card__detail-src { font-size: .75rem !important; color: var(--ink-mute) !important; }
.card__detail-src a { color: var(--brand-2); text-decoration: none; }
.card--open { border-color: var(--line-2); }
.card__namelink { color: inherit; text-decoration: none; }
.card__namelink:hover { color: var(--brand-2); }
.card__sparkrow { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.card__spark { display: inline-flex; }
.card__sparklabel { font-size: .72rem; color: var(--ink-mute); }

/* ---------------- Sections ---------------- */
.section { padding: 34px 0; }
.section__head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 20px; flex-wrap: wrap;
}
.section__head h2 { font-size: 1.4rem; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.h2icon { font-size: 1.2rem; }
.section__meta { color: var(--ink-mute); font-size: .85rem; font-family: "JetBrains Mono", monospace; }

/* ---------------- Map ---------------- */
.map {
  height: 500px; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--bg-2);
}
.legend { display: flex; gap: 16px; flex-wrap: wrap; }
.legend__item { display: inline-flex; align-items: center; gap: 7px; font-size: .82rem; color: var(--ink-soft); }
.dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.dot--td { background: #ffd43b; }
.dot--ts { background: #ff922b; }
/* Alert-area swatches (squares — alerts render as polygons on the map) */
.sq { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.sq--tropical { background: #22d3ee; }
.sq--tornado { background: #ffffff; }
.sq--tstorm { background: #a9e34b; }
.sq--flood { background: #20c997; }
.sq--wind { background: #74c0fc; }
.sq--heat { background: #d9480f; }
.sq--winter { background: var(--winter); }
.swatch--hur { width: 30px; height: 11px; display: inline-block; border-radius: 3px;
  background: linear-gradient(90deg, #ff6b4a, #fa5252, #e64980, #be4bdb, #9c36b5); }
.cone { width: 13px; height: 11px; display: inline-block; border: 1px dashed rgba(255,255,255,.55); background: rgba(255,255,255,.06); border-radius: 2px; }
.leaflet-popup-content-wrapper { background: var(--panel); color: var(--ink); border-radius: 10px; }
.leaflet-popup-tip { background: var(--panel); }
.leaflet-popup-content { margin: 12px 14px; font-family: "Inter", sans-serif; }
.leaflet-container { font-family: "Inter", sans-serif; }
/* Layer switcher — dark themed */
.leaflet-control-layers { border: none; border-radius: 10px; box-shadow: var(--shadow); }
.leaflet-control-layers-toggle { filter: invert(0.9) hue-rotate(180deg); border-radius: 9px; }
.leaflet-control-layers-expanded { background: var(--panel); color: var(--ink); border: 1px solid var(--line-2); padding: 10px 12px; }
.leaflet-control-layers-expanded .leaflet-control-layers-toggle { display: none; }
.leaflet-control-layers label { font-size: .82rem; margin: 4px 0; font-weight: 500; }
.leaflet-control-layers-separator { border-top: 1px solid var(--line); margin: 8px 0; }
.leaflet-control-attribution { background: rgba(10,17,32,.72) !important; color: var(--ink-mute) !important; }
.leaflet-control-attribution a { color: var(--brand-2) !important; }
.popup h4 { margin: 0 0 6px; font-size: 1rem; }
.popup p { margin: 2px 0; font-size: .82rem; color: var(--ink-soft); }
.popup a { color: var(--brand-2); }

/* ---------------- Cards ---------------- */
.cardgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; position: relative; overflow: hidden; transition: .18s;
}
.card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card__name { font-size: 1.2rem; font-weight: 700; }
.card__sub { color: var(--ink-mute); font-size: .8rem; margin-top: 2px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .72rem; font-weight: 700; letter-spacing: .02em;
  padding: 5px 10px; border-radius: 999px; white-space: nowrap;
  border: 1px solid transparent;
}
.badge--td   { background: rgba(255,212,59,.16); color: #ffe071; border-color: rgba(255,212,59,.45); }
.badge--ts   { background: rgba(255,146,43,.16); color: #ffc599; border-color: rgba(255,146,43,.45); }
.badge--cat1 { background: rgba(255,107,74,.16); color: #ffb4a2; border-color: rgba(255,107,74,.45); }
.badge--cat2 { background: rgba(250,82,82,.16);  color: #ffa8a8; border-color: rgba(250,82,82,.45); }
.badge--cat3 { background: rgba(230,73,128,.18); color: #ff9ac1; border-color: rgba(230,73,128,.45); }
.badge--cat4 { background: rgba(190,75,219,.18); color: #e6a8f5; border-color: rgba(190,75,219,.45); }
.badge--cat5 { background: rgba(156,54,181,.20); color: #dca8e8; border-color: rgba(156,54,181,.50); }
.badge--extreme { background: rgba(240,67,166,.16); color: #ffa8dc; border-color: rgba(240,67,166,.45); }
.badge--severe  { background: rgba(255,90,95,.16); color: #ff9a9d; border-color: rgba(255,90,95,.4); }
.badge--moderate{ background: rgba(255,140,66,.15); color: #ffc199; border-color: rgba(255,140,66,.4); }
.badge--minor   { background: rgba(125,211,252,.14); color: #bde8ff; border-color: rgba(125,211,252,.4); }
.badge--winter  { background: rgba(139,157,255,.15); color: #c3ccff; border-color: rgba(139,157,255,.4); }

.metrics { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin: 4px 0 14px; }
.metric { background: rgba(0,0,0,.18); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px; }
.metric__v { font-size: 1.05rem; font-weight: 700; font-family: "JetBrains Mono", monospace; }
.metric__k { font-size: .68rem; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .05em; margin-top: 2px; }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; border-top: 1px solid var(--line); padding-top: 12px; }
.card__foot a { color: var(--brand-2); text-decoration: none; font-size: .82rem; font-weight: 600; }
.card__foot a:hover { text-decoration: underline; }
.move { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-soft); font-size: .82rem; }
.move__arrow { display: inline-block; transition: transform .3s; }

.card--winter .card__name { font-size: 1.02rem; }
.card--winter .card__top { margin-bottom: 10px; }
.card__desc { color: var(--ink-soft); font-size: .85rem; margin: 0 0 12px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* empty / info states */
.empty {
  grid-column: 1 / -1; text-align: center; padding: 44px 20px;
  border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--ink-mute);
  background: rgba(255,255,255,.015);
}
.empty h3 { color: var(--ink-soft); font-weight: 600; margin-bottom: 6px; font-size: 1.05rem; }
.empty code { background: var(--panel); padding: 2px 7px; border-radius: 6px; font-size: .82rem; color: var(--brand-2); }
.empty .ok { color: var(--ok); font-size: 2rem; display: block; margin-bottom: 8px; }

/* skeletons */
.skeleton {
  height: 170px; border-radius: var(--radius);
  background: linear-gradient(100deg, var(--panel) 30%, var(--panel-2) 50%, var(--panel) 70%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------------- Alerts table ---------------- */
.filters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
#alertSearch {
  background: var(--panel); border: 1px solid var(--line); color: var(--ink);
  padding: 9px 14px; border-radius: 10px; font-size: .88rem; width: 240px; font-family: inherit;
}
#alertSearch:focus { outline: none; border-color: var(--brand); }
.chips { display: flex; gap: 6px; }
.chip {
  background: var(--panel); border: 1px solid var(--line); color: var(--ink-soft);
  padding: 8px 14px; border-radius: 999px; font-size: .82rem; font-weight: 600; cursor: pointer; transition: .15s;
}
.chip:hover { color: var(--ink); }
.chip.is-active { background: var(--brand); color: #05213a; border-color: var(--brand); }

.alerttable { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.arow {
  display: grid; grid-template-columns: 210px 1fr 120px; gap: 14px;
  padding: 13px 16px; border-bottom: 1px solid var(--line); align-items: center; transition: background .12s;
}
.arow:last-child { border-bottom: none; }
.arow:hover { background: var(--panel); }
.arow__event { font-weight: 600; font-size: .9rem; display: flex; align-items: center; gap: 9px; }
.arow__area { color: var(--ink-soft); font-size: .85rem; }
.arow__sev { justify-self: end; }
.evbar { width: 4px; height: 26px; border-radius: 3px; flex: none; }
.arow__empty { padding: 40px; text-align: center; color: var(--ink-mute); }

/* ---------------- Footer ---------------- */
.foot { border-top: 1px solid var(--line); margin-top: 30px; padding: 36px 0; background: rgba(0,0,0,.22); }
.foot__inner { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.brand--foot { margin-bottom: 10px; }
.foot__disclaimer { color: var(--ink-mute); font-size: .82rem; max-width: 54ch; margin: 0; }
.foot__disclaimer a { color: var(--brand-2); }
.foot__legal { color: var(--ink-mute); font-size: .8rem; margin: 10px 0 0; }
.foot__legal a { color: var(--brand-2); }
.foot__meta { color: var(--ink-mute); font-size: .8rem; text-align: right; }
.foot__meta p { margin: 3px 0; }
#footUpdated { font-family: "JetBrains Mono", monospace; }

/* ---------------- Advisory page ---------------- */
.hero--adv { padding: 34px 0 6px; }
.backlink { color: var(--brand-2); text-decoration: none; font-size: .9rem; font-weight: 600; display: inline-block; margin-bottom: 18px; }
.backlink:hover { text-decoration: underline; }
.adv-title-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.adv-title-row .hero__title { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
.adv-updated { color: var(--ink-mute); font-size: .82rem; font-family: "JetBrains Mono", monospace; margin: 8px 0 0; }
.adv-metrics { grid-template-columns: repeat(6, 1fr); margin-top: 20px; max-width: 760px; }
.adv-metrics .metric__v { font-size: .95rem; }
.adv-section-title { font-size: 1.15rem; font-weight: 700; margin: 30px 0 12px; }
.adv-section-title:first-child { margin-top: 0; }
.advtext {
  white-space: pre-wrap; word-break: break-word;
  font-family: "JetBrains Mono", monospace; font-size: .82rem; line-height: 1.6;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; color: var(--ink-soft); overflow-x: auto;
}
@media (max-width: 720px) { .adv-metrics { grid-template-columns: repeat(3, 1fr); } }

/* ---------------- Family dot (severe/type indicator) ---------------- */
.fam-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }

/* ---------------- Share & embed ---------------- */
.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.share-card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
}
.share-card__title { font-size: 1.12rem; font-weight: 700; }
.share-card__sub { color: var(--ink-mute); font-size: .88rem; margin: 6px 0 16px; }
.sharebtns { display: flex; flex-wrap: wrap; gap: 8px; }
.sbtn {
  display: inline-flex; align-items: center; justify-content: center;
  font: 600 .82rem "Inter", sans-serif; padding: 9px 14px; border-radius: 9px;
  text-decoration: none; cursor: pointer; border: 1px solid var(--line-2);
  background: var(--panel-2); color: var(--ink); transition: .15s;
}
.sbtn:hover { transform: translateY(-1px); filter: brightness(1.12); }
.sbtn--fb { background: #1877f2; border-color: #1877f2; color: #fff; }
.sbtn--x  { background: #000000; border-color: #333; color: #fff; }
.sbtn--bs { background: #1185fe; border-color: #1185fe; color: #fff; }
.sbtn--rd { background: #ff4500; border-color: #ff4500; color: #fff; }
.sbtn--wa { background: #25d366; border-color: #25d366; color: #05231a; }
.sbtn--tg { background: #229ed2; border-color: #229ed2; color: #fff; }
.sbtn--li { background: #0a66c2; border-color: #0a66c2; color: #fff; }
.sbtn--em { background: var(--panel-2); }
.sbtn--ig { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); border-color: transparent; color: #fff; }
.sbtn--copy, .sbtn--native { background: var(--brand); border-color: var(--brand); color: #05213a; }
.share-note { color: var(--ok); font-size: .82rem; margin-top: 12px; min-height: 1em; }

.widget-block { margin-top: 16px; }
.widget-block__head { display: flex; align-items: center; justify-content: space-between; font-size: .82rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 8px; }
.copybtn { background: var(--panel-2); border: 1px solid var(--line-2); color: var(--ink); font: 600 .74rem "Inter", sans-serif; padding: 5px 11px; border-radius: 7px; cursor: pointer; }
.copybtn:hover { color: var(--brand); border-color: var(--brand); }
.widget-preview { padding: 14px; background: rgba(0,0,0,.2); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; display: flex; justify-content: center; }
.demo-badge { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; background: #0e1830; color: #38bdf8; font: 600 14px system-ui; text-decoration: none; border-radius: 10px; border: 1px solid #22314f; }
.codebox { width: 100%; background: var(--bg-2); border: 1px solid var(--line); border-radius: 9px; color: var(--ink-soft); font-family: "JetBrains Mono", monospace; font-size: .74rem; line-height: 1.5; padding: 10px 12px; resize: vertical; }
.codebox:focus { outline: none; border-color: var(--brand); }
@media (max-width: 760px) { .share-grid { grid-template-columns: 1fr; } }

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; gap: 26px; }
  .topnav { display: none; }
  .arow { grid-template-columns: 1fr auto; }
  .arow__area { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .statgrid { grid-template-columns: 1fr; }
  .map { height: 380px; }
  .livebox__txt { display: none; }
}
