/*
 * The alert page as a record rather than an article: a header, counted
 * figures, a chart, ranked bars, then a short factual note.
 *
 * Plain white throughout. Separation comes from hairline rules and spacing
 * rather than tinted panels, so the page stays readable next to the rest of
 * the site and prints cleanly.
 */

.alert-record {
  max-width: 820px;
  background: #ffffff;
}

/* Header ------------------------------------------------------------- */

.alert-head {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e6e4dc;
}

.alert-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.alert-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 11px;
  border-radius: 999px;
  background: #ffffff;
}

.alert-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.alert-badge-high { border: 1px solid #e0bdbd; color: #a12b2b; }
.alert-badge-high::before { background: #d03b3b; }

.alert-badge-mid { border: 1px solid #e2cda6; color: #8a5a12; }
.alert-badge-mid::before { background: #e0a02a; }

.alert-badge-low { border: 1px solid #dddbd3; color: #57564f; }
.alert-badge-low::before { background: #b4b2a9; }

.alert-badge-meta {
  font-size: 12px;
  color: #6b6a65;
}

.alert-head h1 {
  font-size: 26px;
  line-height: 1.32;
  font-weight: 600;
  color: #1c1c1a;
  margin: 0 0 10px;
}

.alert-formats {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  color: #52514e;
  margin: 0 0 5px;
}

.alert-dates {
  font-size: 13px;
  color: #898781;
  margin: 0;
}

/* Figures ------------------------------------------------------------ */

.alert-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 0;
  margin: 0 0 28px;
  border: 1px solid #e6e4dc;
  border-radius: 10px;
  overflow: hidden;
}

.alert-stat {
  background: #ffffff;
  padding: 15px 18px;
  border-right: 1px solid #e6e4dc;
}

.alert-stat:last-child { border-right: 0; }

.alert-stat-num {
  display: block;
  font-size: 25px;
  font-weight: 600;
  line-height: 1.2;
  color: #1c1c1a;
}

.alert-stat-of {
  font-size: 15px;
  font-weight: 400;
  color: #898781;
}

.alert-stat-text { font-size: 16px; }

.alert-stat-label {
  display: block;
  font-size: 12px;
  color: #6b6a65;
  margin-top: 4px;
}

/* Panels ------------------------------------------------------------- */

.alert-panel {
  background: #ffffff;
  border-top: 1px solid #e6e4dc;
  padding-top: 24px;
  margin-bottom: 28px;
}

.alert-panel h2 {
  font-size: 17px;
  font-weight: 600;
  color: #1c1c1a;
  margin: 0 0 16px;
}

.alert-chart-wrap {
  position: relative;
  height: 200px;
}

.alert-two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

/* Ranked bars -------------------------------------------------------- */

.alert-bars {
  list-style: none;
  margin: 0;
  padding: 0;
}

.alert-bars li {
  display: grid;
  grid-template-columns: 1fr 92px 26px;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 14px;
}

.alert-bar-label { color: #33322f; }

.alert-bar-track {
  background: #efeee8;
  border-radius: 3px;
  height: 7px;
  overflow: hidden;
}

.alert-bar-fill {
  display: block;
  height: 7px;
  background: #2a78d6;
  border-radius: 3px;
}

.alert-bar-count {
  font-size: 13px;
  color: #6b6a65;
  text-align: right;
}

/* Quote -------------------------------------------------------------- */

.alert-quote {
  background: #ffffff;
  border-left: 3px solid #d6d4ca;
  margin: 0 0 28px;
  padding: 2px 0 2px 18px;
}

.alert-quote p {
  font-size: 17px;
  line-height: 1.6;
  font-style: italic;
  color: #33322f;
  margin: 0 0 6px;
}

.alert-quote cite {
  font-size: 12px;
  color: #898781;
  font-style: normal;
}

/* Body --------------------------------------------------------------- */

.report-body p {
  font-size: 16px;
  line-height: 1.7;
  color: #33322f;
  margin: 0 0 14px;
}

.report-body p:last-child { margin-bottom: 0; }

/* Questions ---------------------------------------------------------- */

.alert-faq details {
  background: #ffffff;
  border-bottom: 1px solid #eceae2;
  padding: 13px 0;
}

.alert-faq details:first-of-type { border-top: 1px solid #eceae2; }

.alert-faq summary {
  cursor: pointer;
  font-weight: 500;
  font-size: 15px;
  color: #1c1c1a;
  list-style: none;
  display: flex;
  gap: 10px;
}

.alert-faq summary::-webkit-details-marker { display: none; }

.alert-faq summary::before {
  content: '+';
  color: #898781;
  width: 12px;
  flex: none;
}

.alert-faq details[open] summary::before { content: '\2212'; }

.alert-faq details p {
  margin: 10px 0 0 22px;
  font-size: 15px;
  line-height: 1.65;
  color: #4a4945;
}

/* Report form dropdowns ---------------------------------------------- */

.community-facets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}

.community-facets select {
  width: 100%;
  background-color: #ffffff;
  border: 1px solid #d8d6cd;
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 14px;
  color: #1c1c1a;
}

/* Small screens ------------------------------------------------------ */

@media (max-width: 640px) {
  .alert-stats { grid-template-columns: repeat(2, 1fr); }
  .alert-stat:nth-child(2n) { border-right: 0; }
  .alert-stat:nth-child(-n+2) { border-bottom: 1px solid #e6e4dc; }
}

@media (max-width: 560px) {
  .alert-head h1 { font-size: 21px; }
  .alert-bars li { grid-template-columns: 1fr 62px 24px; }
}

@media print {
  .alert-stats,
  .alert-panel { border-color: #ccc; }
  .community-box,
  .alert-next-step { display: none; }
}

/* Classic pass ------------------------------------------------------- */
/*
 * A record page reads better as a printed reference than as a dashboard:
 * a serif headline, rules instead of boxes, and figures set in a row rather
 * than in tinted cards.
 */

.alert-record {
  font-size: 16.5px;
  line-height: 1.7;
}

.alert-head h1 {
  font-family: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.28;
}

.alert-panel h2,
.alert-related h2 {
  font-family: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  font-size: 20px;
  font-weight: 600;
}

.alert-head {
  border-bottom: 2px solid #1c1c1a;
  padding-bottom: 18px;
}

.alert-badge {
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 10.5px;
  border-radius: 3px;
}

.alert-badge-meta {
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 10.5px;
}

/* Figures as a plain row, divided by rules rather than boxed in cards. */
.alert-stats {
  border: 0;
  border-bottom: 1px solid #e6e4dc;
  border-radius: 0;
  padding-bottom: 20px;
  gap: 0;
}

.alert-stat {
  padding: 4px 20px;
  border-right: 1px solid #e6e4dc;
  background: none;
}

.alert-stat:first-child { padding-left: 0; }

.alert-stat-num {
  font-family: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  font-size: 30px;
  font-weight: 600;
}

.alert-stat-label {
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 10.5px;
  color: #75736d;
}

.alert-panel {
  border-top: 0;
  padding-top: 0;
  margin-bottom: 34px;
}

.alert-panel + .alert-panel { border-top: 1px solid #e6e4dc; padding-top: 26px; }

.report-body p {
  font-size: 16.5px;
  line-height: 1.75;
}

.report-body p:first-of-type::first-letter {
  font-family: Georgia, serif;
  font-size: 1.05em;
}

.alert-quote {
  border-left: 0;
  border-top: 1px solid #1c1c1a;
  border-bottom: 1px solid #e6e4dc;
  padding: 16px 0;
}

.alert-quote p {
  font-family: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  font-size: 19px;
  font-style: normal;
}

.alert-faq summary {
  font-family: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  font-size: 16px;
}

/* Charts sit on the page rather than in a panel. */
.alert-chart-wrap,
.alert-donut-wrap {
  position: relative;
  height: 240px;
  margin-top: 6px;
}

.alert-donut-wrap { height: 220px; }
.alert-chart-tall { height: 300px; }

.alert-chart-note {
  font-size: 13px;
  color: #75736d;
  margin: 10px 0 0;
}

@media (max-width: 640px) {
  .alert-head h1 { font-size: 23px; }
  .alert-stat { padding: 4px 12px; }
  .alert-stat-num { font-size: 24px; }
}

/* One-tap answer ---------------------------------------------------- */
/*
 * Placed above the figures, because it is the one thing on the page a reader
 * can contribute in a second, and almost nobody scrolls to the written form
 * at the bottom.
 */

.vote-bar {
  border: 1px solid #e6e4dc;
  border-radius: 10px;
  padding: 15px 18px;
  margin: 0 0 24px;
  background: #ffffff;
}

.vote-bar .vote-q {
  display: block;
  margin: 0 0 11px;
  font-size: 16px;
  font-weight: 600;
  color: #1c1c1a;
}

.vote-bar .vote-btns { display: flex; flex-wrap: wrap; gap: 9px; }

 /*
  * The site already styles bare <button>, and those rules were winning on
  * colour, which left white-on-dark text rendering as dark-on-dark: the button
  * looked like an empty blue rectangle. Scoping to .vote-bar raises the
  * specificity enough to take the colour back without touching global styles.
  */
.vote-bar .vote-btn {
  background: #123152;
  color: #ffffff;
  border: 0;
  border-radius: 7px;
  padding: 9px 18px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  cursor: pointer;
  font-family: inherit;
  text-shadow: none;
  min-width: 0;
  width: auto;
}

.vote-bar .vote-btn:hover { background: #1a4370; color: #ffffff; }
.vote-bar .vote-btn:disabled { opacity: .5; cursor: default; }

.vote-bar .vote-btn-alt {
  background: #ffffff;
  border: 1px solid #d5d3ca;
  color: #33322f;
}

.vote-bar .vote-btn-alt:hover { background: #faf9f6; border-color: #8f8d85; color: #33322f; }

.vote-bar .vote-tally { margin: 11px 0 0; font-size: 14px; color: #57564f; }
.vote-bar .vote-done { margin: 11px 0 0; font-size: 15px; color: #1c1c1a; }
.vote-bar [hidden] { display: none !important; }

@media print { .vote-bar { display: none; } }
.alert-facts-panel .alert-fact-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid #e6e3dc;
}

.alert-fact-row {
  display: flex;
  gap: 16px;
  align-items: baseline;
  padding: 11px 2px;
  border-bottom: 1px solid #e6e3dc;
}

.alert-fact-row dt {
  flex: 0 0 44%;
  margin: 0;
  font-size: 14px;
  color: #6b6862;
}

.alert-fact-row dd {
  flex: 1;
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #1d1c1a;
}

.alert-thin-note {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-left: 4px solid #eda100;
  background: #fdf8ec;
  font-size: 15px;
  line-height: 1.55;
  border-radius: 4px;
}

@media (max-width: 560px) {
  .alert-fact-row {
    display: block;
    padding: 10px 2px;
  }
  .alert-fact-row dt {
    margin-bottom: 2px;
  }
}
