/* ============================================================
   ALERTS.CSS  -  Power Alerts section
   Uses the tokens defined in main.css. Every value falls back
   so the section still renders if loaded standalone.
   ============================================================ */

#powerAlerts { margin: 56px 0; }

.pa-head { margin-bottom: 22px; }

.pa-heading {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--ink, #EDF1F8);
  margin: 0 0 6px;
}

.pa-sub {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-dim, #8994AC);
  margin: 0;
  max-width: 62ch;
}

.pa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
  /* start, not stretch: expanding one card's evidence panel must not
     leave a tall empty gap inside its row-mates. */
  align-items: start;
}

.pa-card {
  background: var(--surface, #0E1524);
  border: 1px solid var(--hairline, #263048);
  border-radius: 12px;
  padding: 16px 16px 14px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.pa-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.pa-badge {
  font-family: var(--mono, 'IBM Plex Mono', monospace);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent-bright, #5B8DEF);
}

.pa-dismiss {
  background: none;
  border: 0;
  color: var(--ink-dim, #8994AC);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  /* 44px target without disturbing the 20px glyph */
  width: 44px; height: 44px;
  margin: -12px -12px -12px 0;
  display: flex; align-items: center; justify-content: flex-end;
}
.pa-dismiss:hover { color: var(--ink, #EDF1F8); }

.pa-title {
  font-size: 16.5px;
  font-weight: 620;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--ink, #EDF1F8);
  margin: 0 0 7px;
}

.pa-desc {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-dim, #8994AC);
  margin: 0 0 13px;
}

.pa-metrics {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 13px;
}

.pa-delta {
  font-family: var(--mono, 'IBM Plex Mono', monospace);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.pa-up { color: var(--green, #4ADE80); }
.pa-down { color: var(--red, #F87171); }
.pa-flat { color: var(--ink, #EDF1F8); }

.pa-basis {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono, 'IBM Plex Mono', monospace);
  font-size: 12.5px;
  color: var(--ink-dim, #8994AC);
}
.pa-arrow { opacity: 0.55; }

.pa-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 11px;
  border-top: 1px solid var(--hairline, #263048);
}

.pa-period {
  font-size: 11.5px;
  color: var(--ink-dim, #8994AC);
  line-height: 1.35;
}

.pa-view {
  background: none;
  border: 0;
  padding: 6px 0;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--accent-bright, #5B8DEF);
  cursor: pointer;
  white-space: nowrap;
}
.pa-view:hover { text-decoration: underline; }

/* ---- evidence panel ---- */
.pa-evidence {
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px dashed var(--hairline, #263048);
}

.pa-ev-table { width: 100%; border-collapse: collapse; }
.pa-ev-table th,
.pa-ev-table td {
  text-align: left;
  vertical-align: top;
  padding: 4px 0;
  font-size: 12px;
  line-height: 1.45;
}
.pa-ev-table th {
  font-weight: 500;
  color: var(--ink-dim, #8994AC);
  width: 42%;
  padding-right: 10px;
}
.pa-ev-table td {
  font-family: var(--mono, 'IBM Plex Mono', monospace);
  color: var(--ink, #EDF1F8);
  word-break: break-word;
}

.pa-ev-list { margin-top: 11px; }
.pa-ev-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-dim, #8994AC);
  margin-bottom: 6px;
}
.pa-ev-list ul { margin: 0; padding-left: 16px; }
.pa-ev-list li {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink, #EDF1F8);
  margin-bottom: 2px;
}

.pa-ev-note {
  margin: 11px 0 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ink-dim, #8994AC);
  font-style: italic;
}

/* ---- empty + meta ---- */
.pa-empty {
  border: 1px dashed var(--hairline, #263048);
  border-radius: 12px;
  padding: 26px 20px;
  text-align: center;
}
.pa-empty p { margin: 0; font-size: 14px; color: var(--ink, #EDF1F8); }
.pa-empty-sub { margin-top: 6px !important; font-size: 12.5px !important; color: var(--ink-dim, #8994AC) !important; }

.pa-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  font-size: 11.5px;
  color: var(--ink-dim, #8994AC);
}
.pa-meta-sep { opacity: 0.5; }

.pa-reset {
  background: none;
  border: 0;
  padding: 0;
  font-family: inherit;
  font-size: 11.5px;
  color: var(--accent-bright, #5B8DEF);
  cursor: pointer;
}
.pa-reset:hover { text-decoration: underline; }

@media (max-width: 640px) {
  #powerAlerts { margin: 40px 0; }
  .pa-grid { grid-template-columns: 1fr; }
}

.pa-basis-label {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 11px;
  opacity: 0.75;
}


/* ============================================================
   POWER ALERTS 2.0
   Priority, read state, following, and the section split. Uses
   existing tokens only, so it follows the theme switcher.
   ============================================================ */

/* --- follow control (firm profile) --- */
.pf-follow {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 10px 0 2px; padding: 6px 13px;
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 3px; color: var(--ink);
  font-family: var(--mono); font-size: 11px; letter-spacing: .05em;
  text-transform: uppercase; cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.pf-follow:hover { border-color: var(--accent); color: var(--accent); }
.pf-follow:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pf-follow.is-following { border-color: var(--accent); color: var(--accent); }
.pf-follow-icon { font-size: 12px; line-height: 1; }

/* --- header bar --- */
.pa2-bar {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 14px; padding-bottom: 12px;
  border-bottom: 1px solid var(--hairline);
}
.pa2-unread-count {
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--accent);
}
.pa2-mark-all {
  margin-left: auto; padding: 6px 12px; cursor: pointer;
  background: none; border: 1px solid var(--hairline); border-radius: 3px;
  color: var(--ink-dim); font-family: var(--mono); font-size: 10.5px;
  letter-spacing: .05em; text-transform: uppercase;
}
.pa2-mark-all:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.pa2-mark-all:disabled { opacity: .4; cursor: default; }

/* --- type filters --- */
.pa2-filters { margin-bottom: 18px; }
.pa2-filters-label {
  display: block; margin-bottom: 7px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .09em;
  text-transform: uppercase; color: var(--ink-dim);
}
.pa2-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pa2-chip {
  padding: 4px 10px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 20px; color: var(--ink);
  font-family: var(--mono); font-size: 10px; letter-spacing: .03em;
}
.pa2-chip:hover { border-color: var(--accent); }
/* A muted type is struck through as well as dimmed, so "off" is not
   carried by colour alone. */
.pa2-chip.is-off { color: var(--ink-dim); text-decoration: line-through; opacity: .65; }
.pa2-chip-n { color: var(--ink-dim); }

/* --- sections --- */
.pa2-section { margin-bottom: 26px; }
.pa2-section-head { display: flex; align-items: baseline; gap: 9px; margin-bottom: 6px; }
.pa2-section-head h3 {
  margin: 0; font-family: var(--mono); font-size: 11px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink);
}
.pa2-section-n {
  font-family: var(--mono); font-size: 10px; color: var(--ink-dim);
  border: 1px solid var(--hairline); border-radius: 2px; padding: 1px 6px;
}
.pa2-section-note, .pa2-empty-inline {
  margin: 0 0 12px; font-size: 12.5px; line-height: 1.55; color: var(--ink-dim);
}
.pa2-onboard {
  padding: 14px 16px; margin-bottom: 22px;
  background: var(--surface); border: 1px solid var(--hairline);
  border-left: 2px solid var(--accent); border-radius: 3px;
  font-size: 13px; line-height: 1.6; color: var(--ink-dim);
}
.pa2-onboard strong { color: var(--ink); }

/* --- card additions --- */
.pa2-priority {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .07em;
  text-transform: uppercase; padding: 2px 6px;
  border: 1px solid var(--hairline); border-radius: 2px; color: var(--ink-dim);
}
.pa2-p-critical .pa2-priority { color: var(--accent); border-color: var(--accent); font-weight: 600; }
.pa2-p-high .pa2-priority { color: var(--ink); }
.pa2-following {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--accent);
}
.pa2-unread { color: var(--accent); font-size: 15px; line-height: 1; }
.pa-card.is-read { opacity: .72; }
.pa-card.is-followed { border-left: 2px solid var(--accent); }
.pa2-firm {
  display: inline-block; margin-bottom: 6px;
  font-size: 12px; color: var(--accent); text-decoration: none;
}
.pa2-firm:hover { text-decoration: underline; }

.pa2-roadmap {
  margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--hairline);
  font-size: 11.5px; line-height: 1.6; color: var(--ink-dim);
}

@media (max-width: 640px) {
  .pa2-bar { flex-wrap: wrap; }
  .pa2-chip { font-size: 9.5px; }
}
@media (prefers-reduced-motion: reduce) { .pf-follow { transition: none; } }

/* ============================================================
   POWER ALERTS REPORT
   ------------------------------------------------------------
   Editorial rather than dashboard: serif body, a measure that
   stops around 68 characters, and generous leading. The cards
   below it stay in the product's mono-and-grid language, so the
   two read as what they are - the story, and the working.
   ============================================================ */
.par {
  margin: 22px 0 28px;
  padding: 30px 32px 26px;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 4px;
}
.par-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--hairline);
}
.par-kicker {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.par-date {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  white-space: nowrap;
}
/* The lede is the only element allowed to be larger than the body.
   Everything after it is the same size, because a report that
   shouts every paragraph has no lede at all. */
.par-lede {
  font-family: var(--serif, Georgia, serif);
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink);
  margin: 0 0 22px;
  max-width: 68ch;
}
.par-section { margin-bottom: 18px; }
.par-section:last-child { margin-bottom: 0; }
.par-h {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin: 0 0 7px;
}
/* Footnote to a paragraph, not a sentence in it. Smaller and dimmer
   so it reads as apparatus rather than as the next fact. */
.par-note {
  font-family: var(--sans);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-dim);
  margin: 7px 0 0;
  padding-left: 11px;
  border-left: 2px solid var(--hairline);
  max-width: 68ch;
}
.par-p {
  font-family: var(--serif, Georgia, serif);
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink);
  margin: 0;
  max-width: 68ch;
}

/* ---------- the toggle back to the raw signals ---------- */
.pa2-toggle-data {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  background: none;
  border: 1px solid var(--hairline);
  border-radius: 3px;
  padding: 5px 11px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.pa2-toggle-data:hover { color: var(--accent-bright); border-color: var(--accent); }

/* ============================================================
   FOLLOWED-FIRM NOTIFICATION
   ============================================================ */
.pa-navbadge {
  display: inline-block;
  margin-left: 6px;
  min-width: 17px;
  padding: 1px 5px;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 15px;
  text-align: center;
  color: var(--bg);
  background: var(--accent);
  border-radius: 9px;
  vertical-align: 1px;
}

.pa-notify {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 22px;
  background: var(--surface);
  border-bottom: 1px solid var(--accent);
  font-size: 13.5px;
  color: var(--ink-dim);
}
.pa-notify-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.pa-notify-text { flex: 1 1 auto; min-width: 0; }
.pa-notify-text strong { color: var(--ink); font-weight: 600; }
.pa-notify-go {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}
.pa-notify-go:hover { color: var(--accent-bright); text-decoration: underline; }
.pa-notify-x {
  background: none; border: none; cursor: pointer;
  color: var(--ink-dim); font-size: 17px; line-height: 1;
  padding: 2px 4px; border-radius: 3px;
}
.pa-notify-x:hover { color: var(--ink); }

@media (max-width: 700px) {
  .par { padding: 22px 18px 20px; }
  .par-head { flex-direction: column; gap: 4px; }
  .par-lede { font-size: 17px; }
  .pa-notify { padding: 9px 14px; gap: 9px; flex-wrap: wrap; }
  /* The link keeps its own line rather than squeezing the sentence
     into two words per row. */
  .pa-notify-go { flex: 1 0 100%; }
}
