:root {
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #f7f8f4;
  color: #102033;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
}

a {
  color: inherit;
}

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid #d9dfd0;
  background: #ffffff;
}

.site-footer {
  border-top: 1px solid #d9dfd0;
  border-bottom: 0;
  color: #5f6f7d;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.3rem;
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
  line-height: 1.45;
}

.site-footer .emergency-note {
  margin-top: 0.2rem;
  color: #102033;
  font-weight: 700;
}

.brand-wordmark {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-logo {
  flex: 0 0 auto;
  width: 2.625rem;
  height: 2.625rem;
}

.brand-lockup {
  display: inline-flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
}

.brand-name {
  color: #102033;
  font-weight: 800;
}

.portal-name {
  color: #6f5b32;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.visit-link,
.site-footer a,
.back-link {
  color: #102033;
  font-size: 0.92rem;
  font-weight: 700;
  text-underline-offset: 0.25rem;
}

.shell {
  width: min(100% - 2rem, 72rem);
  min-height: calc(100vh - 9rem);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) 0;
}

.directory-hero {
  max-width: 48rem;
  margin-bottom: 1.35rem;
}

.directory-hero h1 {
  max-width: 42rem;
  font-size: 2.5rem;
  line-height: 1.1;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: #6f5b32;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  color: #102033;
  font-size: clamp(2rem, 5vw, 4.1rem);
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1.04;
}

.lead {
  max-width: 40rem;
  margin: 1rem 0 0;
  color: #405166;
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.6;
}

.directory-status {
  margin-bottom: 1rem;
  color: #405166;
  font-weight: 700;
}

.directory-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
  padding: 0 0 0.85rem;
  border-bottom: 1px solid #d9dfd0;
}

.directory-search {
  min-width: min(100%, 22rem);
  flex: 1;
}

.directory-search input,
.directory-prior-filter select {
  width: 100%;
  min-height: 2.15rem;
  border: 1px solid #c9d3dd;
  border-radius: 6px;
  background: #ffffff;
  color: #102033;
  font: inherit;
  font-size: 0.9rem;
}

.directory-search input {
  padding: 0.45rem 0.65rem;
}

.directory-prior-filter select {
  min-width: 11rem;
  padding: 0.4rem 0.6rem;
}

.briefing-directory {
  display: grid;
  gap: 1.35rem;
}

.briefing-card,
.empty-state,
.briefing-panel {
  border: 1px solid #d9dfd0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 1rem 2.5rem rgb(16 32 51 / 8%);
}

.briefing-card {
  display: flex;
  min-height: 17rem;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.1rem;
}

.briefing-card.featured {
  border-color: #9f7d36;
}

.briefing-table-section {
  display: grid;
  min-width: 0;
  gap: 0.45rem;
}

.table-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.table-heading h2 {
  margin: 0;
  color: #102033;
  font-size: 1.05rem;
  line-height: 1.25;
}

.table-count {
  flex: 0 0 auto;
  color: #5f6f7d;
  font-size: 0.76rem;
  font-weight: 800;
}

.table-frame {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d5dce4;
  border-radius: 6px;
  background: #ffffff;
}

.table-scroll {
  overflow-x: auto;
}

.briefing-table {
  width: 100%;
  min-width: 54rem;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.75rem;
  text-align: left;
}

.briefing-table th,
.briefing-table td {
  padding: 0.48rem 0.65rem;
  vertical-align: middle;
}

.briefing-table th {
  border-bottom: 1px solid #d5dce4;
  background: #f8fafc;
  color: #5f6f7d;
  font-size: 0.72rem;
  font-weight: 700;
}

.briefing-table th:nth-child(1) {
  width: 31%;
}

.briefing-table th:nth-child(2) {
  width: 24%;
}

.briefing-table th:nth-child(3) {
  width: 7%;
}

.briefing-table th:nth-child(4) {
  width: 14%;
}

.briefing-table th:nth-child(5) {
  width: 13%;
}

.briefing-table th:nth-child(6) {
  width: 11%;
}

.sort-button {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.sort-button.active {
  color: #102033;
}

.sort-indicator {
  min-width: 0.65rem;
  font-size: 0.78rem;
}

.briefing-table tbody tr {
  border-top: 1px solid #e8ecf0;
}

.briefing-table tbody tr.briefing-description-row {
  border-top: 0;
}

.briefing-table tbody tr:hover {
  background: #fbfcfa;
}

.briefing-table tbody tr:first-child {
  border-top: 0;
}

.briefing-table tbody tr.featured td:first-child {
  box-shadow: inset 3px 0 #9f7d36;
}

.table-primary {
  min-width: 0;
}

.table-title,
.table-action {
  color: #102033;
  font-weight: 700;
  text-underline-offset: 0.2rem;
}

.table-message {
  margin: 0;
  color: #405166;
  font-size: 0.7rem;
  line-height: 1.35;
}

.briefing-description-row td {
  padding-top: 0;
  padding-bottom: 0.55rem;
  vertical-align: top;
}

.briefing-table .table-empty-row {
  border-top: 0;
}

.table-empty-row td {
  padding: 0.9rem 0.65rem;
  color: #5f6f7d;
  font-size: 0.75rem;
}

.table-value {
  color: #405166;
  line-height: 1.25;
}

.briefing-table td:nth-child(3),
.briefing-table td:nth-child(4),
.briefing-table td:nth-child(5),
.briefing-table td:nth-child(6) {
  white-space: nowrap;
}

.table-action-cell {
  text-align: right;
  white-space: nowrap;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0.65rem;
  border-top: 1px solid #d5dce4;
  background: #ffffff;
  color: #5f6f7d;
  font-size: 0.74rem;
  font-weight: 700;
}

.pagination-controls {
  display: inline-flex;
  gap: 0.4rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.card-meta,
.card-footer,
.briefing-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.status-pill,
.featured-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.2rem;
  padding: 0.08rem 0.35rem;
  border: 1px solid #c9d3dd;
  border-radius: 999px;
  color: #405166;
  font-size: 0.66rem;
  font-weight: 800;
}

.status-pill.live {
  border-color: #b42318;
  color: #b42318;
}

.status-pill.waiting {
  border-color: #9f7d36;
  color: #6f5b32;
}

.status-pill.ended {
  border-color: #4d6b7c;
  color: #4d6b7c;
}

.status-pill.unavailable {
  border-color: #b42318;
  color: #b42318;
}

.featured-pill {
  border-color: #9f7d36;
  background: #f8f1df;
  color: #6f5b32;
}

.briefing-card h2 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.25;
}

.briefing-card h2 a {
  text-decoration: none;
}

.briefing-card h2 a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}

.card-org,
.card-message {
  margin: 0;
  color: #405166;
  line-height: 1.5;
}

.card-message {
  flex: 1;
}

.card-footer {
  margin-top: auto;
  color: #6f7f8c;
  font-size: 0.88rem;
}

.card-action {
  color: #102033;
  font-weight: 800;
}

.empty-state {
  grid-column: 1 / -1;
  padding: clamp(1.25rem, 4vw, 2rem);
}

.empty-state h2 {
  margin: 0 0 0.5rem;
  color: #102033;
}

.empty-state p {
  max-width: 44rem;
  margin: 0;
  color: #405166;
  line-height: 1.55;
}

.briefing-view {
  max-width: 72rem;
  margin: 0 auto;
}

.briefing-topline {
  margin-bottom: 1rem;
}

.briefing-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(18rem, 1.12fr);
  gap: clamp(1rem, 3vw, 2rem);
  padding: clamp(1.1rem, 4vw, 2rem);
}

.briefing-copy {
  align-self: center;
}

.organization {
  min-height: 1.5rem;
  margin: 0.75rem 0 1.5rem;
  color: #405166;
}

.status-panel {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  padding: 1rem;
  border: 1px solid #c9d3dd;
  border-radius: 8px;
  background: #f9faf8;
}

.status-panel p {
  margin: 0.25rem 0 0;
  color: #405166;
  line-height: 1.5;
}

.status-dot {
  flex: 0 0 auto;
  width: 0.65rem;
  height: 0.65rem;
  margin-top: 0.35rem;
  border-radius: 999px;
  background: #7d8c9a;
}

.status-panel[data-state="live"] .status-dot {
  background: #198754;
  box-shadow: 0 0 0 0.25rem rgb(25 135 84 / 14%);
}

.status-panel[data-state="waiting"] .status-dot {
  background: #9f7d36;
}

.status-panel[data-state="capacity"] .status-dot,
.status-panel[data-state="error"] .status-dot,
.status-panel[data-state="unavailable"] .status-dot {
  background: #b42318;
}

.player-wrap {
  overflow: hidden;
  align-self: center;
  border: 1px solid #102033;
  border-radius: 8px;
  background: #07131f;
}

video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.button {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid #9f7d36;
  border-radius: 6px;
  background: #9f7d36;
  color: #ffffff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.button:hover {
  background: #87682d;
}

.secondary-button {
  display: inline-flex;
  min-height: 2.15rem;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.65rem;
  border: 1px solid #c9d3dd;
  border-radius: 6px;
  background: #ffffff;
  color: #102033;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.secondary-button:hover {
  background: #f8faf8;
}

.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.button:focus-visible,
.brand-wordmark:focus-visible,
.visit-link:focus-visible,
.back-link:focus-visible,
.card-action:focus-visible,
.table-title:focus-visible,
.table-action:focus-visible,
.secondary-button:focus-visible,
.sort-button:focus-visible,
.directory-search input:focus-visible,
.directory-prior-filter select:focus-visible,
.briefing-card h2 a:focus-visible {
  outline: 3px solid #bfa256;
  outline-offset: 3px;
}

.privacy-note,
.noscript {
  color: #5f6f7d;
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: center;
}

.privacy-note {
  margin-top: 1rem;
}

@media (max-width: 48rem) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand-wordmark {
    align-items: center;
  }

  .brand-logo {
    width: 2.4rem;
    height: 2.4rem;
  }

  .shell {
    width: min(100% - 1rem, 72rem);
    padding-top: 1.25rem;
  }

  .directory-hero h1 {
    font-size: 1.85rem;
  }

  .directory-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .directory-search,
  .directory-prior-filter,
  .directory-prior-filter select,
  .secondary-button {
    width: 100%;
  }

  .briefing-panel {
    grid-template-columns: 1fr;
  }

  .player-wrap {
    width: 100%;
  }
}

@media (max-width: 42rem) {
  .table-footer {
    font-size: 0.7rem;
  }

  .pagination-controls {
    flex: 0 0 auto;
  }

  .pagination-controls .secondary-button {
    width: auto;
  }
}
