/* Page-only styles. Header, footer, and shared tokens stay in the live site CSS. */
.threat-matrix-page {
  background: #f7f9f5;
}

.threat-matrix-page main {
  padding-bottom: 24px;
}

/* The site menu rule positions every nav under the header. Keep social links in the footer. */
.threat-matrix-page .footer-social {
  position: static;
  inset: auto;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  display: flex;
  width: auto;
  max-width: none;
  margin-top: 22px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.tm-intro {
  padding: 72px 0 28px;
}

.tm-intro h1 {
  font-size: clamp(40px, 5vw, 64px);
  max-width: 16ch;
  color: #151a16;
}

.tm-lead {
  max-width: 68ch;
  margin-top: 18px;
  color: #3c4838;
  font-size: 17px;
}

.tm-lead a {
  color: #3d6b22;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tm-status {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  margin-top: 22px;
  color: #3c4838;
  font-size: 14px;
}

.tm-status strong {
  font-weight: 650;
  color: #1d2a18;
}

.tm-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #c9dcc0;
  background: #fff;
  color: #24321e;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
}

.tm-pill[aria-pressed="true"] {
  background: #e5f3d8;
  border-color: #67b346;
  color: #234214;
}

.tm-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #67b346;
}

.tm-dot.warn {
  background: #c47b12;
}

.tm-card {
  background: #fff;
  border: 1px solid #e0e8da;
  border-radius: 28px;
  padding: 24px 24px 20px;
  box-shadow: 0 10px 30px rgba(24, 40, 16, 0.04);
}

.tm-card h2 {
  font-size: clamp(26px, 3vw, 34px);
  margin-bottom: 10px;
}

.tm-card p {
  color: #4d5b49;
  font-size: 15px;
}

.tm-live-frame {
  margin-top: 16px;
  width: 100%;
}

.tm-live-frame iframe {
  display: block;
  width: 100%;
  height: clamp(480px, 62vw, 760px);
  border: 0;
  background: #111814;
}

.tm-map-note {
  margin: 12px 0 0;
  background: #f4f8f1;
  border: 1px solid #d5e3cc;
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 13px;
  color: #24321e;
}

.tm-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 14px;
}

.tm-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 720px;
  overflow: auto;
  padding-right: 4px;
}

.tm-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 12px;
  align-items: start;
  border: 1px solid #e3ebdd;
  border-radius: 18px;
  padding: 12px 14px;
  background: #fbfcf9;
  text-decoration: none;
  color: inherit;
}

.tm-row .tm-sev {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  align-self: start;
  justify-self: start;
  box-sizing: border-box;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
}

.tm-row .tm-sev.critical {
  color: #8d2430;
  background: #fde8ea;
  border-color: #e7a8b0;
}

.tm-row .tm-sev.high {
  color: #7a4e0d;
  background: #fff1d6;
  border-color: #e4c48a;
}

.tm-row .tm-sev.info {
  color: #2f5c22;
  background: #e7f6df;
  border-color: #b7ddb0;
}

.tm-source {
  font-size: 12px;
  font-weight: 700;
  color: #3d6b22;
}

.tm-when,
.tm-place {
  font-size: 12px;
  color: #667260;
}

.tm-row h3 {
  grid-column: 1 / -1;
  font-size: 16px;
  letter-spacing: -0.03em;
  line-height: 1.35;
}

.tm-row h3 a {
  color: #1d2a18;
  text-decoration: underline;
  text-decoration-color: #67b346;
  text-underline-offset: 3px;
}

.tm-row h3 a:hover {
  color: #2f5c22;
}

.tm-row p {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 13px;
  color: #5c6a58;
}

.tm-empty,
.tm-error {
  border-radius: 18px;
  border: 1px solid #e0e8da;
  background: #f7faf5;
  padding: 16px;
  color: #3c4838;
}

.tm-resources {
  padding-top: 28px;
}

.tm-resources .resource-grid {
  margin-top: 8px;
}

.tm-resources .resource-card {
  min-height: 0;
}

.tm-resources .resource-card h3 {
  max-width: none;
  font-size: 22px;
}

.tm-local {
  margin-top: 28px;
  color: #3c4838;
  font-size: 15px;
}

.tm-local a {
  color: #3d6b22;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 900px) {
  .tm-intro {
    padding-top: 48px;
  }
}
