@import url("https://fonts.googleapis.com/css2?family=Newsreader:opsz,wght@6..72,500;6..72,700&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap");

:root {
  --paper: #ffffff;
  --ink: #0f141b;
  --muted: #4a5564;
  --accent: #f04a2b;
  --accent-2: #0f3d4c;
  --accent-3: #f1c86a;
  --panel: #fffdf7;
  --stroke: #e6dfd2;
  --shadow: rgba(8, 12, 18, 0.1);
  --wash: rgba(15, 61, 76, 0.08);
  --nav-bg: rgba(245, 246, 248, 0.92);
  --nav-height: 40px;
  --nav-pad-x: 0.4rem;
  --sidebar-width: 360px;
  --sidebar-pad-x: 1rem;
  --topic-insights-width: 320px;
  --topic-table-width: 1000px;
  --table-font-size: 14px;
  --status-coded: #60a5fa;
  --status-funded: #34d399;
  --status-unfunded: #f87171;
  --status-unknown: #9ca3af;
  --timeline-height: 0.9rem;
  --timeline-font-size: 0.8rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Space Grotesk", "Helvetica Neue", Helvetica, sans-serif;
  margin: 0;
  padding: 0 !important;
  padding-top: 0 !important;
  min-height: 100vh;
  overflow-x: hidden;
}

body.nav-fixed {
  padding-top: 0 !important;
}

.quarto-container {
  width: 100%;
  max-width: 100%;
}

.page-columns {
  display: block;
  grid-template-columns: none !important;
  column-gap: 0;
  margin: 0;
  padding: 0;
}

.page-columns .content {
  margin: 0 !important;
  padding: 0;
}

body.nav-fixed #quarto-content {
  padding-top: 0;
}

#quarto-header {
  position: sticky;
  top: 0;
  z-index: 10;
  margin: 0;
  padding: 0;
}

main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 1;
}

#quarto-content,
.page-columns,
.page-columns .content,
main.content,
#quarto-document-content {
  max-width: none !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  display: block !important;
  justify-content: flex-start !important;
  align-items: flex-start !important;
}

.page-grid {
  width: 100%;
  margin: 0;
  padding: 0;
  justify-content: flex-start;
  align-items: flex-start;
}

.quarto-title-block {
  display: none;
}

code,
pre {
  font-family: "JetBrains Mono", "Courier New", monospace;
}

.navbar {
  background: var(--nav-bg) !important;
  border-bottom: 1px solid var(--stroke);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  min-height: var(--nav-height);
  padding: 0 var(--nav-pad-x);
  margin: 0;
  overflow: visible;
}

.navbar-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: nowrap;
  width: 100%;
}

.navbar-brand-container {
  margin: 0 0.4rem 0 0 !important;
}

.navbar .container-fluid {
  min-height: var(--nav-height);
  padding: 0;
  align-items: center;
}

.navbar .navbar-brand,
.navbar .nav-link {
  color: var(--ink) !important;
  line-height: 1.15;
}

.navbar .navbar-brand {
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-size: 0.72rem;
  padding: 0.1rem 0;
  display: inline-flex;
  align-items: center;
}

.navbar .navbar-title .brand-accent {
  color: var(--accent);
}

.navbar .nav-link {
  font-weight: 600;
  padding: 0 0.45rem;
}

.navbar .navbar-nav {
  align-items: center;
}

.navbar .navbar-container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
}

.dev-prototype-body .navbar-container {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  grid-template-areas: "brand filters support";
  align-items: center;
  column-gap: 0.6rem;
  row-gap: 0.35rem;
  overflow: visible;
}

.dev-prototype-body .navbar-brand-container {
  grid-area: brand;
  white-space: nowrap;
  margin: 0 !important;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  min-width: max-content;
  overflow: visible;
}

.dev-prototype-body .global-filter-bar {
  grid-area: filters;
  order: 0;
}

.dev-prototype-body .navbar-container .support-mini {
  grid-area: support;
  margin: 0;
  display: none;
}

.dev-prototype-body .navbar-container .support-mini a {
  padding: 0.2rem 0.5rem;
}

.dev-prototype-body #quarto-search,
.dev-prototype-body .quarto-navbar-tools {
  display: none !important;
}

@media (max-width: 1280px) {
  .dev-prototype-body .navbar-container .support-mini {
    display: inline-flex;
  }
}

@media (max-width: 1100px) {
  .dev-prototype-body .navbar-container {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand support"
      "filters filters";
    align-items: center;
  }

  .dev-prototype-body .global-filter-bar {
    width: 100%;
    white-space: normal;
    flex-wrap: wrap;
  }
}

.navbar .navbar-brand-container,
.navbar .navbar-brand-container.mx-auto {
  margin-left: 0 !important;
  margin-right: 0.6rem !important;
  flex: 0 0 auto;
  order: 0;
}

.global-filter-bar {
  order: 1;
}

.navbar #quarto-search {
  margin-left: auto;
}

.navbar-toggler {
  padding: 0.1rem 0.35rem;
}

.global-filter-bar {
  display: none;
  align-items: center;
  gap: 0.5rem;
  height: var(--nav-height);
  white-space: nowrap;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  position: relative;
  padding-right: calc(var(--daily-status-width, 0px) + 0.75rem);
}

.global-filter-bar.is-mounted {
  display: flex;
}

.global-filter-bar.is-overflowing {
  flex-wrap: wrap;
  white-space: normal;
  height: auto;
  padding-right: 0;
  row-gap: 0.3rem;
}

.filter-presets {
  display: inline-flex;
  gap: 0.25rem;
  order: 10;
}

.summary-toggle {
  display: inline-flex;
  gap: 0.25rem;
  margin-left: 0.35rem;
  padding-left: 0.35rem;
  border-left: 1px solid var(--stroke);
  order: 20;
}

.sort-toggle {
  display: inline-flex;
  gap: 0.25rem;
  margin-left: 0.35rem;
  padding-left: 0.35rem;
  border-left: 1px solid var(--stroke);
  order: 30;
}

.source-toggle {
  display: inline-flex;
  gap: 0.25rem;
  margin-left: 0.35rem;
  padding-left: 0.35rem;
  border-left: 1px solid var(--stroke);
  order: 35;
}

.global-search {
  display: inline-flex;
  align-items: center;
  margin-left: 0.35rem;
  padding-left: 0.35rem;
  border-left: 1px solid var(--stroke);
  order: 40;
}

.row-visibility {
  display: inline-flex;
  align-items: center;
  margin-left: 0.35rem;
  padding-left: 0.35rem;
  border-left: 1px solid var(--stroke);
  order: 42;
}

.state-filter {
  display: inline-flex;
  align-items: center;
  margin-left: 0.35rem;
  padding-left: 0.35rem;
  border-left: 1px solid var(--stroke);
  order: 45;
}

.daily-status-wrap {
  display: inline-flex;
  position: absolute;
  top: 50%;
  right: var(--daily-status-right-offset, 0px);
  transform: translateY(-50%);
  align-items: center;
  gap: 0.35rem;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0.35rem;
  border-left: 1px solid var(--stroke);
  order: 50;
  width: var(--daily-status-width, calc(var(--sidebar-width) - (var(--sidebar-pad-x) * 2)));
  justify-content: space-between;
  min-width: 0;
  white-space: nowrap;
}

.global-filter-bar.is-overflowing .daily-status-wrap {
  position: static;
  transform: none;
  width: auto;
  margin-left: auto;
  border-left: 1px solid var(--stroke);
}

.daily-status-label-text {
  margin-left: 0;
  padding-left: 0;
  border-left: 0;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.state-filter select {
  height: 22px;
  padding: 0 0.4rem;
  font-size: 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: #fff;
  color: var(--ink);
  width: 94px;
}

.row-visibility select {
  height: 22px;
  padding: 0 0.4rem;
  font-size: 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: #fff;
  color: var(--ink);
  width: 82px;
}
.daily-status {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: var(--timeline-height);
  width: auto;
  min-width: 140px;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  border-left: 0;
  flex: 1 1 auto;
  overflow: hidden;
  border-radius: 2px;
}

.daily-status-canvas {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
}

.daily-status-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
  font-size: var(--timeline-font-size);
  line-height: var(--timeline-height);
  color: rgba(15, 20, 27, 0.8);
  text-shadow: 0 0 2px rgba(255, 255, 255, 0.45);
  z-index: 2;
}

.daily-status-label {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
}

.daily-status-label.is-start {
  left: 0;
  transform: translateX(0);
}

.daily-status-label.is-end {
  left: 100%;
  transform: translateX(-100%);
}

.daily-status-tooltip {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid var(--stroke);
  box-shadow: 0 6px 16px var(--shadow);
  padding: 0.15rem 0.4rem;
  font-size: 0.65rem;
  border-radius: 4px;
  color: var(--ink);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.1s ease;
  pointer-events: none;
  z-index: 20;
}

.global-search input {
  height: 22px;
  padding: 0 0.4rem;
  font-size: 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: #fff;
  color: var(--ink);
  caret-color: var(--ink);
  width: 130px;
  transition: width 0.15s ease;
}

.global-search input::placeholder {
  color: var(--muted);
}

.global-search input:focus,
.global-search input:hover {
  width: 190px;
}

.filter-btn {
  border: 1px solid var(--stroke);
  background: #fff;
  color: var(--ink);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  line-height: 1;
}

.filter-btn.is-active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.filter-custom {
  display: none;
  align-items: center;
  gap: 0.35rem;
  order: 15;
  margin-left: 0.35rem;
}

.global-filter-bar[data-mode="custom"] .filter-custom {
  display: inline-flex;
}

.filter-custom input {
  height: 24px;
  padding: 0 0.4rem;
  font-size: 0.7rem;
  border-radius: 4px;
  border: 1px solid var(--stroke);
  background: #fff;
  line-height: 1;
}

.filter-apply {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
}

.filter-to {
  font-size: 0.7rem;
  color: var(--muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (min-width: 992px) {
  .navbar-collapse {
    display: flex !important;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: nowrap;
    flex: 1 1 auto;
    min-width: 0;
  }

  .navbar-nav {
    margin-right: 0 !important;
    flex-wrap: nowrap;
  }

  .global-filter-bar {
    margin-left: 0.4rem;
  }
}

.navbar .nav-link.active,
.navbar .nav-link:hover {
  color: var(--accent) !important;
}

.navbar-toggler {
  border-color: var(--stroke);
}

#quarto-search {
  display: none !important;
}

.hero {
  margin-bottom: 2.2rem;
  animation: float-in 0.7s ease-out both;
}

.hero h1 {
  font-family: "Newsreader", "Georgia", serif;
  font-size: clamp(2.6rem, 4.4vw, 4.8rem);
  line-height: 1.08;
  letter-spacing: 0.01em;
  font-kerning: normal;
  font-variant-ligatures: none;
  margin: 0.6rem 0 1rem 0;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.7rem;
  color: var(--accent-2);
  font-weight: 600;
}

.hero-sub {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 60ch;
  margin: 0 0 1.4rem 0;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.pill {
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  border: 1px solid rgba(15, 61, 76, 0.2);
  color: var(--accent-2);
  background: rgba(15, 61, 76, 0.08);
  font-size: 0.8rem;
  font-weight: 600;
}

.page-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--sidebar-width);
  grid-template-areas: "main sidebar";
  gap: 0;
  padding-left: 0;
  padding-right: 0;
}

.support-collapsed .page-grid {
  grid-template-columns: 1fr !important;
  grid-template-areas: "main" !important;
}

.primary {
  grid-area: main;
  margin-right: 0;
  padding: 0 0 0 4px;
  min-width: 0;
  min-height: 100vh;
}

.sidebar {
  grid-area: sidebar;
  position: sticky;
  top: var(--nav-height);
  width: var(--sidebar-width);
  height: calc(100vh - var(--nav-height));
  background: #ffffff;
  border-left: 1px solid rgba(15, 20, 27, 0.12);
  padding: 1.25rem var(--sidebar-pad-x);
  overflow: hidden;
  z-index: 2;
}

.support-collapsed .sidebar {
  display: none;
}

.status-card {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 22px;
  box-shadow: 0 26px 60px var(--shadow);
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.status-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.status-kicker {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.68rem;
  color: var(--muted);
  margin: 0 0 0.35rem 0;
  font-weight: 600;
}

.status-head h2 {
  margin: 0;
  font-size: 1.45rem;
}

.status-badge {
  background: var(--accent);
  color: #fff;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}

.status-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  margin: 0;
}

.status-grid > div {
  min-width: 0;
}

.status-grid dt {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent-2);
  margin-bottom: 0.35rem;
  font-weight: 700;
}

.status-grid dd {
  margin: 0;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.status-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.status-link:hover {
  text-decoration: underline;
}

.topics {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0;
  padding: 0;
  width: 100%;
}

.sitrep {
  border: 1px solid var(--stroke);
  background: #fff;
  padding: 0.5rem 0.7rem;
  margin: 0 0 0.45rem;
  width: var(--topic-table-width);
  max-width: 100%;
  box-shadow: 0 6px 18px rgba(8, 12, 18, 0.06);
  font-size: var(--table-font-size);
}

.dev-prototype {
  --topic-insights-width: clamp(260px, 24vw, 440px);
}

.dev-js-error {
  background: #fdecea;
  color: #7a1d1a;
  border: 1px solid #f5c2c0;
  font-size: 0.75rem;
  padding: 0.4rem 0.6rem;
  margin: 0.4rem 0.6rem;
  border-radius: 0.4rem;
}

.dev-prototype.page-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) var(--sidebar-width) !important;
  grid-template-areas: "main sidebar";
}

.dev-prototype .primary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, var(--topic-insights-width));
  grid-template-areas:
    "support support"
    "sitrep inlay"
    "topics topics"
    "mobile mobile";
  column-gap: 0.8rem;
  row-gap: 0.6rem;
  align-items: start;
  align-content: start;
}

.dev-prototype.support-in-nav .primary {
  grid-template-areas:
    "sitrep inlay"
    "topics topics"
    "mobile mobile";
}

.dev-prototype.support-in-nav .support-mini {
  display: none !important;
}

.dev-prototype .support-mini {
  grid-area: support;
}

.dev-prototype .sitrep {
  grid-area: sitrep;
}

.dev-prototype .sitrep-inlay {
  grid-area: inlay;
}

.dev-prototype .topics {
  grid-area: topics;
}

.dev-prototype .mobile-footer {
  grid-area: mobile;
}

.dev-prototype .sitrep-row {
  display: contents;
}

.dev-prototype .sitrep-inlay.is-hidden {
  display: none;
}

.dev-prototype .sitrep-row .sitrep {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
}

.dev-prototype .sitrep-inlay {
  width: 100%;
  min-width: 0;
  grid-column: auto !important;
  border: 1px solid rgba(15, 20, 27, 0.18);
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(8, 12, 18, 0.06);
  min-height: 160px;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  text-align: center;
  padding: 1rem 1.2rem;
}

.dev-prototype .sitrep-funding {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.dev-prototype .sitrep-funding-label {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dev-prototype .sitrep-inlay .daily-status-wrap {
  position: static;
  transform: none;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  align-self: center;
  flex: 0 1 auto;
  padding-left: 0;
  border-left: 0;
  gap: 0;
  justify-content: center;
  white-space: nowrap;
}

.dev-prototype .sitrep-inlay .daily-status {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.dev-prototype .sitrep-inlay .daily-status.is-static {
  height: auto;
  overflow: visible;
}

.dev-prototype .sitrep-inlay .daily-status-img {
  width: 100%;
  height: auto;
  display: block;
  max-width: 100%;
}

.dev-prototype .sitrep-inlay-content {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  color: #9b3633;
  font-family: "Space Grotesk", "Helvetica Neue", Helvetica, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.2;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 100%;
  justify-content: center;
  text-align: center;
}

.dev-prototype .sitrep-inlay-content p {
  margin: 0;
}

@media (max-width: 1400px) {
  .dev-prototype .primary {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "support"
      "sitrep"
      "topics"
      "mobile";
  }

  .dev-prototype.support-in-nav .primary {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "sitrep"
      "topics"
      "mobile";
  }

  .dev-prototype .sitrep-inlay {
    display: none;
  }
}

@media (max-width: 1999px) {
  .dev-prototype.page-grid {
    grid-template-columns: 1fr !important;
    grid-template-areas: "main";
  }

  .dev-prototype .sidebar {
    display: none;
  }

  .dev-prototype-body .navbar-container .support-mini {
    display: inline-flex;
  }
}

@media (max-width: 1399px) {
  .dev-prototype .topic-insights {
    display: none;
  }
}

@media (max-width: 1280px) {
  .dev-prototype.page-grid {
    grid-template-columns: 1fr !important;
    grid-template-areas: "main";
  }

  .dev-prototype .sidebar {
    display: none;
  }

  .dev-prototype .support-mini {
    display: block;
  }
}

.sitrep-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
}

.sitrep-title {
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

.sitrep-meta {
  font-size: 0.62rem;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sitrep-body {
  display: grid;
  gap: 0.45rem;
}

.sitrep-line {
  font-size: inherit;
  line-height: 1.45;
  color: var(--ink);
  display: grid;
  gap: 0.2rem;
}

.sitrep-label {
  font-weight: 700;
  font-size: inherit;
}

.sitrep-text {
  font-size: inherit;
  color: var(--ink);
}

.sitrep.is-loading .sitrep-body {
  opacity: 0.6;
}

.topic-block {
  border: 0;
  background: transparent;
  padding: 0.15rem 0;
  margin: 0;
}

.topic-block + .topic-block {
  border-top: 1px solid var(--stroke);
}

.topic-block.is-empty {
  display: none;
}

.topic-head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.1rem 0;
  background: transparent;
  border-bottom: 0;
  flex-wrap: wrap;
  max-width: 100%;
}

.topic-title {
  font-size: 0.8rem;
  font-weight: 700;
  min-width: 0;
  flex: 1 1 auto;
}

.topic-stats {
  font-size: 0.65rem;
  color: var(--muted);
}

.topic-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topic-search {
  padding: 0.15rem 0.3rem;
  border-radius: 2px;
  border: 1px solid var(--stroke);
  font-size: 0.65rem;
  background: #fff;
}

.topic-toggle {
  border: 1px solid var(--stroke);
  background: #fff;
  color: var(--ink);
  padding: 0.1rem 0.35rem;
  border-radius: 2px;
  font-size: 0.6rem;
  font-weight: 600;
  cursor: pointer;
}

.topic-toggle.is-hidden {
  display: none;
}

.topic-table {
  padding: 0;
  background: transparent;
  width: 100%;
  min-width: 0;
  margin: 0;
}

.topic-body {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.8rem;
  align-items: start;
  width: 100%;
}

.topic-main {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  max-width: var(--topic-table-width);
  min-width: 0;
}

.topic-table-wrap {
  display: block;
  width: 100%;
  max-width: var(--topic-table-width);
  overflow-x: auto;
}

.topic-insights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
  align-items: start;
  width: var(--topic-insights-width, 320px);
  flex: 0 0 auto;
}

.topic-insights.is-hidden {
  display: none;
}

.topic-insight {
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, #ffffff 0%, #fffdf7 100%);
  padding: 0.25rem 0.4rem;
  box-shadow: 0 10px 22px rgba(8, 12, 18, 0.08);
  display: flex;
  flex-direction: column;
  height: var(--insight-card-height, 130px);
}

.topic-sparkline-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.topic-map-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.topic-chart-label {
  font-family: "Space Grotesk", "Helvetica Neue", Helvetica, sans-serif;
  font-size: 0.56rem;
  fill: var(--muted);
}

.topic-axis path,
.topic-axis line {
  stroke: var(--stroke);
}

.topic-axis text {
  font-family: "Space Grotesk", "Helvetica Neue", Helvetica, sans-serif;
  font-size: 0.58rem;
  fill: var(--muted);
}

.topic-map-state {
  stroke: #ffffff;
  stroke-width: 0.7;
}

.topic-list {
  display: none;
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

.topic-item {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  font-size: 0.72rem;
  padding: 0.2rem 0;
  border-bottom: 1px solid var(--stroke);
}

.topic-item::before {
  content: "•";
  color: var(--accent);
  font-size: 0.65rem;
}

.topic-date {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  min-width: 42px;
}

.topic-summary {
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topic-summary:hover {
  color: var(--accent);
  text-decoration: underline;
}

.control-block {
  width: 100%;
}

.topic-search {
  width: 100%;
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--stroke);
  font-size: 0.8rem;
  font-family: inherit;
  background: #f8f9fb;
}

.topic-search:focus {
  outline: 2px solid rgba(15, 61, 76, 0.15);
  border-color: var(--accent);
}

.meta {
  font-size: 0.8rem;
  color: var(--muted);
  justify-self: start;
}

.empty {
  padding: 1rem;
  color: var(--muted);
}

.chip {
  display: inline-flex;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(15, 61, 76, 0.12);
  color: var(--accent-2);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.severity-1 {
  background: #dff3e6;
  color: #1c6b45;
}

.severity-2 {
  background: #f7efd6;
  color: #7b5a12;
}

.severity-3 {
  background: #fde3c7;
  color: #a24508;
}

.severity-4 {
  background: #fbd1c8;
  color: #9c2e27;
}

.severity-5 {
  background: #f4c6d1;
  color: #8b2246;
}

.status-planned {
  background: #dfeaff;
  color: #1f4a92;
}

.status-ongoing {
  background: #fff0c8;
  color: #8b5c00;
}

.status-resolved {
  background: #e6f6ee;
  color: #1b6a41;
}

.status-unknown {
  background: #eeeef2;
  color: #4c4c57;
}

.tabulator {
  border: 1px solid var(--stroke);
  border-radius: 0;
  overflow: hidden;
  font-size: var(--table-font-size) !important;
  background: #fff;
  box-shadow: none;
  margin: 0;
  width: 100%;
  max-width: var(--topic-table-width);
  min-width: 0;
  display: block;
}

.tabulator .tabulator-header {
  background: #f5f6f7;
  border-bottom: 1px solid var(--stroke);
  color: var(--ink);
}

.tabulator .tabulator-col {
  border-right: 1px solid var(--stroke);
  font-weight: 600;
}

.tabulator .tabulator-col .tabulator-col-content {
  padding: 0.15rem 0.3rem;
}

.tabulator .tabulator-col-title {
  color: var(--ink);
  font-size: 0.66rem;
}

.tabulator .tabulator-row {
  border-bottom: 1px solid var(--stroke);
  transition: background-color 0.2s ease;
  background: #fff;
}

.tabulator .tabulator-row:hover {
  background-color: #f4f6f8;
}

.tabulator .tabulator-row.tabulator-row-even {
  background-color: #fff;
}

.tabulator .tabulator-row .tabulator-cell {
  padding: 0.15rem 0.3rem;
  font-size: inherit;
}

.tabulator .tabulator-tableholder,
.tabulator .tabulator-table,
.tabulator .tabulator-placeholder {
  background: #fff;
}

.tabulator .tabulator-tableholder {
  overflow-x: auto;
}

.support-mini {
  display: none;
  margin: 0.2rem 0 0.35rem;
}

.support-collapsed .support-mini {
  display: block;
}

@media (max-width: 1180px) {
  .page-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "main";
  }

  .sidebar {
    display: none;
  }

  .support-mini {
    display: block;
  }
}

.support-mini a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  color: var(--ink);
  background: #fff;
  text-decoration: none;
}

.mobile-footer {
  display: none;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0 0.2rem 1rem;
}

.mobile-support-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.mobile-support-links .about-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  color: var(--ink);
  background: #fff;
  text-decoration: none;
}

.mobile-footer .support-mini {
  display: block;
  margin: 0;
}

.mobile-footer .support-mini a {
  padding: 0.2rem 0.55rem;
}

.tabulator .summary-cell {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  text-decoration: none;
}

.tabulator .summary-cell:hover {
  text-decoration: underline;
  color: var(--accent);
}

.tabulator .tabulator-footer {
  border-top: 1px solid var(--stroke);
  background: #fff;
}

.support-panel {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  height: 100%;
}

.support-embed iframe {
  border-radius: 0;
  box-shadow: none;
  height: min(712px, calc(100vh - var(--nav-height) - 2rem));
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero,
  .support-panel,
  details.topic {
    animation: none;
  }
}

@media (max-width: 1100px) {
  .global-filter-bar {
    position: static;
    transform: none;
    width: 100%;
    height: auto;
    padding: 0.25rem 0 0.4rem;
  }

  .filter-presets,
  .filter-custom,
  .summary-toggle,
  .sort-toggle,
  .row-visibility,
  .state-filter,
  .global-search,
  .daily-status {
    flex-wrap: wrap;
  }

  .page-grid {
    grid-template-columns: 1fr;
  }

  .primary {
    margin-right: 0;
    padding: 0 0.2rem 2rem 0;
  }

  .sidebar {
    display: none;
  }

  .support-mini {
    display: block;
  }

  .dev-prototype.page-grid {
    grid-template-columns: 1fr !important;
  }

  .dev-prototype .sitrep-inlay {
    display: none;
  }
}

@media (max-width: 900px) {
  .primary {
    padding: 0 0.2rem 2rem 0;
  }

  .summary-toggle,
  .sort-toggle,
  .row-visibility,
  .state-filter,
  .global-search,
  .daily-status {
    display: none;
  }

  .topic-table {
    display: none;
  }

  .topic-list {
    display: block;
  }

  .topic-insights {
    display: none;
  }

  .mobile-footer {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .mobile-inlay-slot {
    width: 100%;
  }

  .mobile-footer .sitrep-inlay {
    width: 100%;
    min-width: 0;
    margin-left: 0;
  }
}

@media (max-width: 720px) {
  .primary {
    padding: 0 0.2rem 1.5rem 0;
  }

  .topic-controls {
    grid-template-columns: 1fr;
  }

  .meta {
    justify-self: start;
  }
}
