:root {
  color-scheme: dark;
  --ink: #041016;
  --deep: #071a23;
  --panel: #0a2028;
  --panel2: #0d2b34;
  --cyan: #5debf1;
  --lime: #c5f06c;
  --magenta: #f06cc4;
  --red: #ff786c;
  --paper: #e8f5e9;
  --steel: #7797a0;
  --line: #5fc8cb;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
}

button, input { font: inherit; }

.scan-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-color: #06151c;
  background-image: linear-gradient(rgba(92, 235, 241, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(92, 235, 241, .055) 1px, transparent 1px);
  background-size: 24px 24px;
}

.portal-banner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  min-height: 34px;
  padding: 9px clamp(16px, 4vw, 56px);
  border-bottom: 1px solid #1fa9b1;
  background: #062a32;
  color: var(--cyan);
  font: 700 11px/1.2 "Courier New", monospace;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.portal-gate {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 34px;
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: clamp(18px, 4vw, 42px);
  padding-bottom: 25px;
  border-bottom: 2px solid var(--cyan);
}

.portal-logo-link { display: inline-flex; flex: 0 0 auto; }
.portal-logo { display: block; width: min(265px, 38vw); height: auto; }

.brand-copy { min-width: 0; }
.classification {
  margin: 0 0 8px;
  color: var(--lime);
  font: 700 11px/1.2 "Courier New", monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.brand-copy h1, .portal-blank h1 {
  margin: 0;
  color: var(--paper);
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1;
  letter-spacing: 0;
}
.brand-copy p:last-child { margin: 10px 0 0; color: #b9cfd0; font-size: 16px; }

.status-console {
  min-height: 28px;
  margin: 18px 0;
  padding: 8px 12px;
  border: 1px solid transparent;
  color: transparent;
  font: 700 12px/1.3 "Courier New", monospace;
}
.status-console:not(:empty) { border-color: #5b7b7c; color: #d9f5e9; background: #09262c; }
.status-console.error { border-color: var(--red); color: #ffd1c9; background: #321718; }
.status-console.success { border-color: var(--lime); color: #e5ffc5; background: #172d1d; }

.auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.auth-panel {
  position: relative;
  border: 1px solid #4d9da0;
  border-radius: 3px;
  padding: 34px 28px 28px;
  background: var(--panel);
  box-shadow: 8px 8px 0 #031015, -1px -1px 0 rgba(232, 245, 233, .2);
}
.registration-panel { border-color: #af75ad; background: #1b1522; }
.panel-tab {
  position: absolute;
  top: 0;
  left: 0;
  padding: 7px 11px;
  background: #185158;
  color: var(--paper);
  font: 700 10px/1 "Courier New", monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.alert-tab { background: #6a315f; }
.auth-panel h2 { margin: 0 0 22px; font-size: 25px; line-height: 1.05; letter-spacing: 0; }
.panel-note { margin: -9px 0 20px; color: #d6c0d5; font-size: 14px; line-height: 1.45; }

form { margin: 0; }
label { display: block; margin: 14px 0 6px; color: #cae8e9; font: 700 11px/1.2 "Courier New", monospace; letter-spacing: .1em; text-transform: uppercase; }
.registration-panel label { color: #ead0e7; }
input:not([type="hidden"]) {
  display: block;
  width: 100%;
  min-height: 45px;
  border: 2px inset #8da1a0;
  border-radius: 0;
  padding: 10px 11px;
  background: #021116;
  color: #dcffff;
  outline: none;
  font: 700 15px/1 "Courier New", monospace;
}
.registration-panel input:not([type="hidden"]) { background: #160d1d; color: #ffe6fa; }
input:focus { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(197, 240, 108, .18); }
.command-button, .provider-button, .logout-button {
  border: 2px outset #b8d1d2;
  border-radius: 2px;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: .07em;
}
.command-button {
  width: 100%;
  min-height: 46px;
  margin-top: 22px;
  color: #061113;
  text-transform: uppercase;
}
.primary-command { background: #72d9dc; }
.register-command { background: #d886bd; }
.command-button:hover, .provider-button:hover, .logout-button:hover { filter: brightness(1.12); }
.command-button:active, .provider-button:active, .logout-button:active { border-style: inset; }
button:disabled { cursor: wait; opacity: .6; }

.divider { display: flex; align-items: center; gap: 11px; margin: 25px 0 14px; color: #98b5b6; font: 700 10px/1 "Courier New", monospace; letter-spacing: .06em; text-transform: uppercase; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: #427a7d; }
.provider-stack { display: grid; width: min(100%, 400px); margin-inline: auto; gap: 9px; }
.provider-button { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 42px; padding: 0 14px; background: #dce7e5; color: #0a1417; }
.apple-provider { background: #d2d4d0; }
.x-provider { background: #101214; color: #f5f7f3; border-color: #768080; }
.google-provider { background: #e6e6e6; }
.google-mark { color: #1a73e8; background: #fff; border-color: #1a73e8; }
.provider-mark { display: inline-grid; place-items: center; width: 20px; height: 20px; border: 1px solid currentColor; font: 800 12px/1 Arial, sans-serif; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.portal-footer { display: flex; justify-content: space-between; gap: 14px; width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 15px 0 28px; border-top: 1px solid #2c676b; color: #84a6a7; font: 700 10px/1.3 "Courier New", monospace; letter-spacing: .08em; text-transform: uppercase; }
.portal-footer a { color: var(--cyan); text-decoration: none; }
.portal-footer a:hover { color: var(--lime); }

.portal-space { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 22px 0 60px; }
.portal-space-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 0; padding-bottom: 12px; border-bottom: 2px solid var(--cyan); }
/* The logo PNG is a 1254x1254 square with ~15% transparent padding baked in
   at the top and ~26% at the bottom (visible art spans y 15%..74%). Crop
   that dead air here instead of editing the shared image: the link becomes
   a window of the visible band (12%..76% of the height = aspect 100:64),
   and the image is pulled up 12% behind it. */
.portal-space-header .portal-logo-link { display: block; overflow: hidden; width: min(235px, 45vw); aspect-ratio: 100 / 64; }
.portal-space-header .portal-logo { width: 100%; margin-top: -12%; }
.portal-space-actions { display: flex; align-items: center; gap: 12px; }
.nav-button { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 16px; border: 1px solid #4d9da0; border-radius: 3px; background: #0a2028; color: var(--cyan); font: 800 11px/1 "Courier New", monospace; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .5); transition: border-color .15s ease, color .15s ease, background .15s ease; }
.nav-button:hover { border-color: var(--lime); color: var(--lime); background: #0d2b34; }
.portal-space-actions .logout-button { min-height: 36px; background: #123038; color: var(--cyan); }
.portal-space-actions .logout-button:hover { color: var(--lime); border-color: var(--lime); }
.portal-blank { min-height: calc(100vh - 200px); padding: 76px 3px; }
.portal-blank h1 { max-width: 520px; font-size: clamp(35px, 6vw, 68px); }

@media (max-width: 760px) {
  .portal-banner { align-items: center; min-height: 42px; padding-inline: 16px; }
  .portal-banner span:nth-child(2) { display: none; }
  .portal-gate { padding-top: 28px; }
  .portal-brand { align-items: flex-start; flex-direction: column; gap: 17px; }
  .portal-logo { width: min(250px, 72vw); }
  .auth-grid { grid-template-columns: 1fr; }
  .auth-panel { padding: 35px 20px 22px; }
  .portal-footer { align-items: flex-start; flex-direction: column; }
  .portal-space { padding-top: 26px; }
  .portal-space-header { align-items: flex-start; flex-direction: column; }
  .portal-space-actions { align-items: flex-start; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}

/* ============================================================
   Fear Index — Current Stats
   ============================================================ */
:root {
  --gold: #ffcf5a;
  --gold-deep: #b8842a;
  --c-low: #43d17a;
  --c-elevated: #ffcf5a;
  --c-high: #ff9f45;
  --c-critical: #ff5040;
}

.fi-section { margin-top: 22px; }
.fi-section-head { margin-bottom: 20px; }
.fi-section-head h1 {
  margin: 0;
  color: var(--paper);
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.05;
  letter-spacing: 0;
}
.fi-section-sub {
  margin: 8px 0 0;
  color: #9ec3c6;
  font: 700 12px/1.4 "Courier New", monospace;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.fi-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(0, 1.35fr);
  gap: 20px;
  align-items: stretch;
}

/* ---- left: gold score panel ---- */
.fi-score-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 26px 24px 22px;
  border: 1px solid var(--gold-deep);
  border-radius: 10px;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 207, 90, .22) 0%, rgba(255, 207, 90, .06) 42%, transparent 72%),
    linear-gradient(180deg, #241b06 0%, #17130a 55%, #0b0f10 100%);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5), inset 0 0 40px rgba(255, 207, 90, .06);
}
.fi-score-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 207, 90, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 207, 90, .05) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}
.fi-score-panel > * { position: relative; z-index: 1; }

.fi-score-kicker {
  color: var(--gold);
  font: 800 12px/1 "Courier New", monospace;
  letter-spacing: .18em;
  text-transform: uppercase;
}

/* Gauge is enlarged (TV-backdrop use); the wrap stays sized to the SVG so
   the absolutely-positioned readout tracks it. The panel centres the whole
   group vertically (see .fi-score-panel justify-content) to absorb the
   height the taller video panel adds. */
.fi-gauge-wrap {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 12px 0;
}
.fi-gauge { display: block; width: 100%; height: auto; overflow: visible; }
.fi-gauge-track { stroke: rgba(255, 255, 255, .08); }
.fi-band { stroke-linecap: butt; opacity: .96; }
.fi-band.low { stroke: var(--c-low); }
.fi-band.elevated { stroke: var(--c-elevated); }
.fi-band.high { stroke: var(--c-high); }
.fi-band.critical { stroke: var(--c-critical); }

/* Tick where the needle meets the ring. */
.fi-mark-dot { fill: #fff5e0; stroke: #0b0f10; stroke-width: 1; }
.fi-mark-dot.low { fill: var(--c-low); }
.fi-mark-dot.elevated { fill: var(--c-elevated); }
.fi-mark-dot.high { fill: var(--c-high); }
.fi-mark-dot.critical { fill: var(--c-critical); }

/* Compass needle. Fixed bold red so it stays the prominent pointer in every
   band state (a band-tinted needle would blend into the amber/gold at
   "elevated"); the band-coloured tick dot already marks the class. Dark
   outline + glow keep it readable across a room, even where the tip crosses
   the red critical band. */
.fi-needle {
  fill: #ff2f22;
  stroke: #260604;
  stroke-width: 1.1;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .55)) drop-shadow(0 0 7px rgba(255, 59, 47, .8));
}
.fi-hub-ring { fill: #17110a; stroke: var(--gold); stroke-width: 2.5; }
.fi-hub { fill: #ffe6a2; stroke: #6f5011; stroke-width: 1; }

.fi-gauge-readout {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.fi-score-value {
  color: var(--gold);
  font: 800 clamp(66px, 7vw, 104px)/0.86 Arial, Helvetica, sans-serif;
  letter-spacing: -1px;
  text-shadow: 0 0 26px rgba(255, 207, 90, .5);
}
.fi-score-outof { color: #b79a5e; font: 700 11px/1 "Courier New", monospace; letter-spacing: .16em; text-transform: uppercase; }

.fi-score-panel.low .fi-score-value { color: var(--c-low); text-shadow: 0 0 22px rgba(67, 209, 122, .4); }
.fi-score-panel.high .fi-score-value { color: var(--c-high); text-shadow: 0 0 22px rgba(255, 159, 69, .45); }
.fi-score-panel.critical .fi-score-value { color: var(--c-critical); text-shadow: 0 0 24px rgba(255, 80, 64, .5); }

.fi-score-foot { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.fi-class-badge {
  padding: 5px 14px;
  border-radius: 999px;
  font: 800 12px/1 "Courier New", monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.fi-class-badge.low { background: rgba(67, 209, 122, .16); color: var(--c-low); border: 1px solid rgba(67, 209, 122, .5); }
.fi-class-badge.elevated { background: rgba(255, 207, 90, .16); color: var(--c-elevated); border: 1px solid rgba(255, 207, 90, .5); }
.fi-class-badge.high { background: rgba(255, 159, 69, .16); color: var(--c-high); border: 1px solid rgba(255, 159, 69, .5); }
.fi-class-badge.critical { background: rgba(255, 80, 64, .18); color: var(--c-critical); border: 1px solid rgba(255, 80, 64, .55); }
.fi-score-meta { color: #b0a279; font: 700 11px/1.3 "Courier New", monospace; letter-spacing: .05em; text-transform: uppercase; }

.fi-band-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255, 207, 90, .18); width: 100%; }
.fi-legend { position: relative; padding-left: 15px; color: #a79a76; font: 700 10px/1.2 "Courier New", monospace; letter-spacing: .06em; text-transform: uppercase; }
.fi-legend::before { content: ""; position: absolute; left: 0; top: 50%; width: 9px; height: 9px; border-radius: 2px; transform: translateY(-50%); }
.fi-legend.low::before { background: var(--c-low); }
.fi-legend.elevated::before { background: var(--c-elevated); }
.fi-legend.high::before { background: var(--c-high); }
.fi-legend.critical::before { background: var(--c-critical); }

/* ---- right: featured video (replaced the CURRENT MONTH stats 2026-07-21;
        the old tiles/trend/regions styles were removed with their markup) ---- */
.fi-stats-unavailable { margin: 0; padding: 20px; border: 1px dashed #3d6f73; border-radius: 6px; color: #a7c8ca; font-size: 14px; }

.fi-video {
  display: flex;
  flex-direction: column;
  padding: 18px 20px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(10, 32, 40, .92), rgba(6, 20, 26, .8));
  box-shadow: inset 0 0 32px rgba(92, 235, 241, .05), 0 0 26px rgba(92, 235, 241, .07);
}
.fi-video-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.fi-video-kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--cyan); font: 800 13px/1 "Courier New", monospace; letter-spacing: .16em; text-transform: uppercase; }
.fi-video-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 8px rgba(255, 120, 108, .9);
  animation: fi-video-blink 1.6s steps(2, start) infinite;
}
@keyframes fi-video-blink { to { opacity: .25; } }
.fi-video-head em { color: #7fa8ab; font: 700 11px/1 "Courier New", monospace; font-style: normal; letter-spacing: .04em; text-transform: uppercase; }

.fi-video-frame {
  flex: 1;
  display: flex;
  align-items: center;
  border: 1px solid rgba(95, 200, 203, .45);
  border-radius: 6px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 0 1px #031015, 0 0 22px rgba(92, 235, 241, .18), inset 0 0 40px rgba(0, 0, 0, .6);
}
.fi-video-player { display: block; width: 100%; height: auto; max-height: 560px; background: #000; }

.fi-video-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 12px; }
.fi-video-title { min-width: 0; color: #eafcff; font: 800 15px/1.3 Arial, Helvetica, sans-serif; letter-spacing: -.2px; }

@media (prefers-reduced-motion: reduce) {
  .fi-video-dot { animation: none; }
}

/* ---- highlighted top story ---- */
.fi-top {
  margin-top: 14px;
  padding: 16px 18px 15px;
  border: 1px solid rgba(255, 207, 90, .32);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(36, 27, 6, .5), rgba(11, 15, 16, .5));
}
.fi-top-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fi-top-kicker { color: var(--gold); font: 800 11px/1 "Courier New", monospace; letter-spacing: .12em; text-transform: uppercase; }
.fi-top-score {
  flex: 0 0 auto;
  min-width: 40px;
  padding: 5px 11px;
  border-radius: 6px;
  font: 800 18px/1 Arial, Helvetica, sans-serif;
  text-align: center;
}
.fi-top-score.low { background: rgba(67, 209, 122, .18); color: var(--c-low); }
.fi-top-score.elevated { background: rgba(255, 207, 90, .18); color: var(--c-elevated); }
.fi-top-score.high { background: rgba(255, 159, 69, .2); color: var(--c-high); }
.fi-top-score.critical { background: rgba(255, 80, 64, .2); color: var(--c-critical); }
.fi-top-title { margin: 11px 0 0; font-size: 17px; line-height: 1.35; }
.fi-top-title a { color: #eafcff; text-decoration: none; border-bottom: 1px solid rgba(126, 255, 164, .35); }
.fi-top-title a:hover { color: var(--lime); border-bottom-color: var(--lime); }
.fi-top-specifics { margin: 9px 0 0; color: #b7d2d3; font-size: 13.5px; line-height: 1.5; }
.fi-top-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 11px 0 0; }
.fi-top-meta span { position: relative; color: #82a6a9; font: 700 11px/1.2 "Courier New", monospace; letter-spacing: .05em; text-transform: uppercase; }
.fi-top-meta span + span::before { content: "\2022"; position: absolute; left: -10px; color: #4a6d70; }

@media (max-width: 900px) {
  .fi-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .fi-score-value { font-size: 54px; }
  .portal-space-actions { flex-direction: row; }
  .fi-video { padding: 14px 14px 12px; }
}

/* ============================================================
   Bob's Global Alert Level V3 (2026-07-20)
   Period slider + year radios + SVG level chart. All chart
   geometry arrives as SVG presentation attributes (strict CSP).
   ============================================================ */
.pv3-section { margin-top: 34px; }

.pv3-panel {
  padding: 20px 22px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(10, 32, 40, .92), rgba(6, 20, 26, .8));
  box-shadow: inset 0 0 32px rgba(92, 235, 241, .05);
}

.pv3-toolbar {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
}
.pv3-readout {
  flex: 0 0 auto;
  min-width: 118px;
  color: var(--gold);
  font: 800 18px/1.1 "Courier New", monospace;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pv3-slider-wrap {
  flex: 1 1 auto;
  min-width: 160px;
  display: grid;
  gap: 3px;
}
#pv3-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 24px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
#pv3-slider::-webkit-slider-runnable-track {
  height: 8px;
  border: 1px solid rgba(95, 200, 203, .5);
  border-radius: 3px;
  background:
    repeating-linear-gradient(90deg, rgba(93, 235, 241, .55) 0, rgba(93, 235, 241, .55) 1px, transparent 1px, transparent 11.1%),
    rgba(7, 26, 35, .9);
  box-shadow: inset 0 0 8px rgba(92, 235, 241, .12);
}
#pv3-slider::-moz-range-track {
  height: 8px;
  border: 1px solid rgba(95, 200, 203, .5);
  border-radius: 3px;
  background:
    repeating-linear-gradient(90deg, rgba(93, 235, 241, .55) 0, rgba(93, 235, 241, .55) 1px, transparent 1px, transparent 11.1%),
    rgba(7, 26, 35, .9);
  box-shadow: inset 0 0 8px rgba(92, 235, 241, .12);
}
#pv3-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 22px;
  margin-top: -8px;
  border: 1px solid #031015;
  border-radius: 3px;
  background: linear-gradient(180deg, #ffe8a5, var(--gold) 55%, var(--gold-deep));
  box-shadow: 0 0 12px rgba(255, 207, 90, .5);
}
#pv3-slider::-moz-range-thumb {
  width: 16px;
  height: 22px;
  border: 1px solid #031015;
  border-radius: 3px;
  background: linear-gradient(180deg, #ffe8a5, var(--gold) 55%, var(--gold-deep));
  box-shadow: 0 0 12px rgba(255, 207, 90, .5);
}
#pv3-slider:focus-visible { outline: 1px solid var(--cyan); outline-offset: 2px; }
.pv3-slider-ends {
  display: flex;
  justify-content: space-between;
  color: var(--steel);
  font: 700 10px/1 "Courier New", monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.pv3-years { flex: 0 0 auto; display: flex; gap: 8px; }
.pv3-years label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border: 1px solid rgba(95, 200, 203, .45);
  border-radius: 3px;
  background: rgba(7, 26, 35, .9);
  color: #cfe9ea;
  font: 700 12px/1 "Courier New", monospace;
  letter-spacing: .06em;
  cursor: pointer;
  user-select: none;
}
.pv3-years label:hover { border-color: var(--cyan); }
.pv3-years label:has(input:checked) {
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 0 12px rgba(255, 207, 90, .28);
}
.pv3-years input { margin: 0; accent-color: var(--gold); }

.pv3-notice {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px dashed #3d6f73;
  border-radius: 6px;
  color: #a7c8ca;
  font: 700 12px/1.4 "Courier New", monospace;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.pv3-meta {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.pv3-stat {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(95, 200, 203, .28);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(13, 43, 52, .7), rgba(7, 26, 35, .7));
}
.pv3-stat span { display: block; color: #86b1b4; font: 700 10px/1.2 "Courier New", monospace; letter-spacing: .09em; text-transform: uppercase; }
.pv3-stat strong { display: block; margin: 6px 0 3px; color: #eafcff; font: 800 24px/1 Arial, Helvetica, sans-serif; letter-spacing: -.5px; }
.pv3-stat em { display: block; color: #7fa3a6; font: 700 9.5px/1.3 "Courier New", monospace; font-style: normal; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pv3-scroll { overflow-x: auto; overflow-y: hidden; }
.pv3-chart { display: block; margin: 0 auto; }
.pv3-grid { stroke: rgba(92, 235, 241, .12); stroke-width: 1; }
.pv3-axis { stroke: rgba(92, 235, 241, .35); stroke-width: 1; }
.pv3-ylab, .pv3-xlab {
  fill: #7fa8ab;
  font: 700 10px/1 "Courier New", monospace;
  letter-spacing: .04em;
}
.pv3-val { fill: #cfe9ea; font: 700 10px/1 "Courier New", monospace; }
.pv3-bar.low { fill: var(--c-low); opacity: .92; }
.pv3-bar.elevated { fill: var(--c-elevated); opacity: .92; }
.pv3-bar.high { fill: var(--c-high); opacity: .95; }
.pv3-bar.critical { fill: var(--c-critical); opacity: .95; }
.pv3-bar.nodata { fill: rgba(127, 163, 166, .35); }
.pv3-bar-g:hover .pv3-bar { opacity: 1; }

/* Still-collecting (provisional) trailing day: keeps its band color so the
   reading is legible, but is hatched and outlined so it never reads as a
   settled bar. It is drawn on the chart yet excluded from the period
   average / low / peak / change - thin data must not masquerade as a drop. */
.pv3-bar-provisional {
  opacity: .55;
  stroke: rgba(207, 233, 234, .85);
  stroke-width: 1;
  stroke-dasharray: 2 2;
}
.pv3-gate-provisional td { opacity: .72; }
.pv3-prov-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 0 5px;
  border: 1px dashed rgba(207, 233, 234, .55);
  border-radius: 8px;
  color: #9fd0d3;
  font: 700 8.5px/1.5 "Courier New", monospace;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Continent rows inside bars (dark chips over the light band colors). */
.pv3-geo-chip { fill: rgba(2, 12, 17, .38); }
.pv3-geo-code { fill: rgba(3, 20, 26, .95); font: 700 8px/1 "Courier New", monospace; }
.pv3-geo-val { fill: #041016; font: 800 8px/1 "Courier New", monospace; }
.pv3-total { fill: rgba(3, 20, 26, .9); font: 800 8.5px/1 "Courier New", monospace; }

.pv3-foot {
  margin: 12px 0 0;
  color: #7fa3a6;
  font: 700 10.5px/1.5 "Courier New", monospace;
  letter-spacing: .03em;
  text-transform: uppercase;
}

/* ---- Gate stats (ported from /admin/alerts-v2/) ---- */
.pv3-gate-scroll { overflow-x: auto; }
.pv3-gate-table {
  width: 100%;
  border-collapse: collapse;
  font: 700 12px/1.4 "Courier New", monospace;
  white-space: nowrap;
}
.pv3-gate-table th, .pv3-gate-table td {
  padding: 6px 9px;
  text-align: right;
  border-bottom: 1px solid rgba(95, 200, 203, .16);
}
.pv3-gate-table th {
  color: var(--cyan);
  font-size: 10.5px;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.pv3-gate-table td { color: #cfe9ea; }
.pv3-gate-table th:first-child, .pv3-gate-table td:first-child { text-align: left; }
.pv3-gate-table tbody tr:hover td { background: rgba(92, 235, 241, .05); }
.pv3-class-low { color: var(--c-low); text-transform: uppercase; }
.pv3-class-elevated { color: var(--c-elevated); text-transform: uppercase; }
.pv3-class-high { color: var(--c-high); text-transform: uppercase; }
.pv3-class-critical { color: var(--c-critical); text-transform: uppercase; }

.pv3-gate-notes { max-width: 1100px; margin-top: 20px; }
.pv3-gate-notes h2 {
  margin: 0 0 10px;
  color: var(--cyan);
  font: 800 13px/1 "Courier New", monospace;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.pv3-gate-notes dl { margin: 0; font-size: 13px; line-height: 1.55; }
.pv3-gate-notes dt {
  margin-top: 12px;
  color: var(--lime);
  font: 700 12px/1.2 "Courier New", monospace;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.pv3-gate-notes dd { margin: 3px 0 0; color: #b7d2d3; }
.pv3-gate-notes dd strong { color: #eafcff; }
.pv3-gate-notes dd em { color: #cfe9ea; font-style: italic; }

@media (max-width: 900px) {
  .pv3-toolbar { flex-wrap: wrap; }
  .pv3-slider-wrap { flex-basis: 100%; order: 3; }
  .pv3-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .pv3-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
