:root {
  color-scheme: dark;
  --bg: #111513;
  --bg-soft: #171d1a;
  --panel: rgba(20, 25, 23, 0.86);
  --panel-solid: #18201d;
  --text: #f2f1e8;
  --muted: #b9c2bd;
  --line: rgba(242, 241, 232, 0.16);
  --line-strong: rgba(242, 241, 232, 0.28);
  --teal: #42d3bc;
  --amber: #f2b84b;
  --red: #eb6a57;
  --green: #8bd96d;
  --ink: #0c0f0e;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 20;
  transform: translateY(-140%);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--text);
  color: var(--ink);
  padding: 10px 14px;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: 14px 0;
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: rgba(242, 241, 232, 0.08);
  color: var(--teal);
  font-size: 13px;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  padding: 8px 10px;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  border-color: var(--line);
  color: var(--text);
  outline: none;
}

.hero {
  position: relative;
  min-height: 82vh;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(17, 21, 19, 0.98) 0%, rgba(17, 21, 19, 0.78) 42%, rgba(17, 21, 19, 0.32) 100%),
    linear-gradient(180deg, rgba(17, 21, 19, 0.32) 0%, rgba(17, 21, 19, 0.78) 100%);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.58fr);
  align-items: end;
  gap: 32px;
  width: min(100% - 32px, var(--max));
  min-height: calc(82vh - 64px);
  margin: 0 auto;
  padding: 62px 0 58px;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow,
.section-kicker,
.summary-topline {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: 5.4rem;
  line-height: 0.96;
}

h2 {
  margin-bottom: 10px;
  font-size: 2rem;
  line-height: 1.1;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.18rem;
  line-height: 1.2;
}

.hero-lead {
  max-width: 620px;
  margin-bottom: 28px;
  color: #d7ddd7;
  font-size: 1.18rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 11px 16px;
  text-decoration: none;
}

.button-primary {
  background: var(--text);
  color: var(--ink);
  border-color: var(--text);
  font-weight: 800;
}

.button-secondary {
  background: rgba(242, 241, 232, 0.08);
  color: var(--text);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.button-icon {
  min-width: 18px;
  text-align: center;
}

.hero-summary {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 22px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.summary-grid div {
  min-height: 94px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(242, 241, 232, 0.05);
}

.summary-grid dt {
  color: var(--muted);
  font-size: 0.82rem;
}

.summary-grid dd {
  margin: 5px 0 0;
  color: var(--text);
  font-size: 1.45rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.catalog-controls,
.section-band,
.site-footer {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
}

.catalog-controls {
  display: grid;
  grid-template-columns: minmax(220px, 0.36fr) minmax(0, 1fr);
  gap: 28px;
  padding: 42px 0 18px;
}

.controls-row {
  display: grid;
  gap: 14px;
}

.search-field input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #f5f2e7;
  color: #171d1a;
  padding: 0 15px;
  outline: none;
}

.search-field input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(66, 211, 188, 0.16);
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-pill {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(242, 241, 232, 0.04);
  color: var(--muted);
  padding: 7px 12px;
  cursor: pointer;
}

.filter-pill:hover,
.filter-pill:focus-visible,
.filter-pill.is-active {
  border-color: var(--teal);
  color: var(--text);
  outline: none;
}

.section-band {
  padding: 24px 0 64px;
}

.section-muted {
  width: 100%;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #141917;
}

.section-muted > * {
  width: min(100% - 32px, var(--max));
  margin-left: auto;
  margin-right: auto;
}

.section-intro,
.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  color: var(--muted);
}

.section-heading {
  display: block;
  padding-top: 54px;
}

.section-heading p,
.section-intro p {
  max-width: 760px;
}

.result-count {
  min-width: 140px;
  text-align: right;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.service-card {
  display: flex;
  min-height: 276px;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-solid);
  color: var(--text);
  padding: 18px;
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.service-card:hover,
.service-card:focus-visible {
  border-color: var(--line-strong);
  background: #1d2622;
  outline: none;
  transform: translateY(-2px);
}

.card-top,
.card-footer,
.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.service-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(242, 184, 75, 0.12);
  color: var(--amber);
  font-weight: 900;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 800;
}

.status-live {
  background: rgba(139, 217, 109, 0.14);
  color: #baf0a2;
}

.status-restricted {
  background: rgba(242, 184, 75, 0.14);
  color: #f5cd7d;
}

.status-review {
  background: rgba(235, 106, 87, 0.14);
  color: #ffad9e;
}

.status-inactive {
  background: rgba(185, 194, 189, 0.12);
  color: #d0d7d2;
}

.status-archive {
  background: rgba(185, 194, 189, 0.12);
  color: #d0d7d2;
}

.service-card-inactive,
.service-card-inactive:hover {
  border-color: rgba(185, 194, 189, 0.22);
  background: rgba(24, 32, 29, 0.72);
  transform: none;
}

.service-card-inactive {
  cursor: default;
}

.service-card-inactive .open-link {
  color: #d0d7d2;
}

.service-card h3 {
  margin-top: 24px;
}

.service-card p {
  color: var(--muted);
}

.meta-row {
  margin-top: auto;
  color: #dce4de;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
}

.card-footer {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  color: var(--muted);
  font-size: 0.88rem;
}

.open-link {
  color: var(--teal);
  font-weight: 800;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding-bottom: 58px;
}

.archive-card {
  min-height: 146px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(242, 241, 232, 0.04);
  padding: 16px;
}

.archive-card h3 {
  overflow-wrap: anywhere;
  font-size: 1rem;
}

.archive-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.sources-section {
  padding-top: 20px;
}

.source-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.source-list a,
.source-list span {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  padding: 8px 12px;
  text-decoration: none;
}

.source-list a:hover,
.source-list a:focus-visible {
  border-color: var(--teal);
  color: var(--text);
  outline: none;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 22px 0 32px;
}

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

@media (max-width: 980px) {
  .hero-inner,
  .catalog-controls {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    align-items: start;
    padding-top: 44px;
  }

  .hero-summary {
    max-width: 620px;
  }

  h1 {
    font-size: 4rem;
  }

  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero {
    min-height: auto;
  }

  .hero-inner {
    min-height: 0;
    padding: 42px 0 44px;
  }

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  .hero-lead {
    font-size: 1.02rem;
  }

  .summary-grid,
  .service-grid,
  .archive-grid {
    grid-template-columns: 1fr;
  }

  .section-intro,
  .site-footer {
    flex-direction: column;
  }

  .result-count {
    text-align: left;
  }

  .button {
    width: 100%;
  }
}
