/* History page (/ and /history) and error pages. */

body {
  background: var(--bg-alt);
}

.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  min-height: 4.5rem;
  padding-block: 0.75rem;
}

.site-header__brand img {
  display: block;
  width: 280px;
}

.site-header__link {
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}

.site-header__link:hover {
  text-decoration: underline;
}

.intro {
  padding-block: 2.5rem 1.75rem;
}

.intro h1 {
  max-width: 24ch;
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 1.1rem + 2vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.intro__abbr {
  color: var(--navy);
  white-space: nowrap;
}

.intro__notice {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1.25rem 0 0;
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--navy-900);
  font-weight: 600;
}

.intro__notice::before {
  content: "";
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--cyan);
}

.lead {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  align-items: start;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.panel {
  margin-bottom: 1.25rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
}

.lead .panel {
  margin-bottom: 0;
}

.panel h2 {
  margin-bottom: 1rem;
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
}

.panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.panel__head h2 {
  margin: 0;
}

.panel--current {
  border-color: var(--border-strong);
  border-top: 4px solid var(--cyan);
}

.panel--current .issues td {
  font-size: 1.0625rem;
}

.panel--notam p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.notam-links {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.notam-links li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.notam-links .button {
  min-width: 5.5rem;
}

.notam-links__updated {
  font-size: 0.8125rem;
  color: var(--muted);
}

.issues {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.issues th {
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid var(--border-strong);
  background: var(--surface-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  text-align: left;
}

.issues td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.issues tbody tr:last-child td {
  border-bottom: 0;
}

.issues tbody tr:hover td {
  background: var(--bg-alt);
}

.issues td:first-child a {
  font-weight: 600;
  white-space: nowrap;
}

.issues td:nth-child(2) {
  white-space: nowrap;
}

.issues .issues__empty {
  color: var(--muted);
}

.site-footer {
  margin-top: 2.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
  font-size: 0.875rem;
  color: var(--muted);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 1.5rem;
}

.site-footer p {
  margin: 0;
}

.error-page {
  display: grid;
  justify-items: center;
  gap: 1rem;
  padding-block: 5rem;
  text-align: center;
}

.error-page h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
  font-weight: 600;
}

.error-page .eyebrow {
  margin: 0;
}

@media (max-width: 860px) {
  .lead {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .site-header__brand img {
    width: 220px;
  }

  .site-header__link {
    font-size: 0.875rem;
  }

  .intro {
    padding-block: 1.75rem 1.25rem;
  }

  .panel {
    padding: 1rem 0.875rem;
  }

  /* Three short columns fit a 360 px screen; .table-wrap scrolls if text is enlarged. */
  .issues th {
    padding: 0.5rem 0.375rem;
    font-size: 0.75rem;
  }

  .issues td,
  .panel--current .issues td {
    padding: 0.625rem 0.375rem;
    font-size: 0.875rem;
  }
}
