:root {
  color-scheme: dark;
  --bg: #101216;
  --surface: #181b21;
  --surface-raised: #20242b;
  --text: #f4f1ea;
  --muted: #a9adb7;
  --line: #30343d;
  --orange: #ff6b35;
  --lime: #b9f227;
  --blue: #77a7ff;
  --red: #ff7474;
  --mono: Consolas, "SFMono-Regular", monospace;
  --sans: Arial, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --display: "Arial Black", Arial, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px),
    var(--bg);
  background-size: 32px 32px;
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.55;
}

button, input, select { font: inherit; }
a { color: inherit; }

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 20;
  background: var(--lime);
  color: #111;
  padding: 10px 14px;
  font-weight: 800;
}
.skip-link:focus { top: 16px; }

.masthead {
  min-height: 72px;
  padding: 0 3vw;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(16, 18, 22, .92);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
}

.wordmark {
  text-decoration: none;
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: -.02em;
}

.wordmark::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 10px;
  background: var(--orange);
}

.masthead-note,
.section-number,
.eyebrow,
.controls label > span,
.card-kicker,
.card-meta,
.privacy-note {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .07em;
  font-size: .72rem;
}

.masthead-note { color: var(--muted); }

.layout {
  display: grid;
  grid-template-columns: minmax(280px, 4fr) minmax(0, 8fr);
  max-width: 1580px;
  margin: 0 auto;
}

.intro {
  min-height: calc(100vh - 72px);
  padding: clamp(40px, 7vw, 104px) clamp(28px, 5vw, 72px) 56px 3vw;
  border-right: 1px solid var(--line);
  position: sticky;
  top: 72px;
  align-self: start;
}

.eyebrow { color: var(--orange); margin: 0 0 26px; }

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

h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3rem, 6.5vw, 7rem);
  line-height: .91;
  letter-spacing: -.075em;
}

h1 span { color: var(--lime); }

.lede {
  max-width: 34rem;
  margin: 36px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.45vw, 1.22rem);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 48px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.metrics div { padding: 18px 10px 18px 0; }
.metrics div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.metrics dt { color: var(--muted); font-size: .72rem; }
.metrics dd { margin: 3px 0 0; font-family: var(--display); font-size: 1.8rem; }

.privacy-note { margin: 22px 0 0; color: var(--muted); }
.privacy-note span { color: var(--lime); margin-right: 7px; }

.directory { padding: clamp(40px, 6vw, 88px) 3vw 80px; min-width: 0; }

.directory-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 3px solid var(--text);
}

.section-number { color: var(--orange); margin: 0 0 8px; }

h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2rem, 3.8vw, 4rem);
  letter-spacing: -.055em;
  line-height: 1;
}

#result-count { margin: 0; color: var(--muted); white-space: nowrap; }

.controls {
  display: grid;
  grid-template-columns: minmax(200px, 1.7fr) repeat(3, minmax(130px, 1fr));
  gap: 1px;
  margin: 24px 0;
  background: var(--line);
  border: 1px solid var(--line);
}

.controls label { background: var(--surface); padding: 11px 14px 13px; }
.controls label > span { display: block; color: var(--muted); margin-bottom: 5px; }

.controls input,
.controls select {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.controls input::placeholder { color: #717783; }
.controls select option { background: var(--surface); }
.controls input:focus,
.controls select:focus { border-bottom-color: var(--lime); }

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

.deployment-card {
  display: flex;
  flex-direction: column;
  min-height: 300px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.deployment-card:hover {
  transform: translateY(-3px);
  border-color: #565d69;
  background: var(--surface-raised);
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.card-kicker { margin: 0; color: var(--muted); }

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 700;
}

.status::before { content: ""; width: 7px; height: 7px; background: currentColor; border-radius: 50%; }
.status-live { color: var(--lime); }
.status-legacy { color: var(--blue); }
.status-retired { color: var(--red); }

.card-body { padding: 24px 18px; flex: 1; }
.card-body h3 { margin: 0; font-size: clamp(1.28rem, 2vw, 1.65rem); line-height: 1.2; letter-spacing: -.035em; }
.card-description { margin: 16px 0 24px; color: var(--muted); }
.card-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; color: #c8cbd2; }

.card-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
}

.card-actions a,
.card-actions button,
.empty-state button {
  min-height: 48px;
  border: 0;
  border-radius: 0;
  padding: 0 16px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
}

.card-actions a { display: flex; align-items: center; justify-content: space-between; }
.card-actions a::after { content: "↗"; color: var(--orange); font-size: 1.2rem; }
.card-actions a:hover,
.card-actions button:hover,
.empty-state button:hover { background: var(--text); color: var(--bg); }

:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }

.empty-state,
.error-state {
  padding: 48px 24px;
  border: 1px dashed #565d69;
  text-align: center;
  color: var(--muted);
}

.empty-state button { margin-top: 8px; border: 1px solid var(--line); }
.error-state { color: var(--red); }

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 3vw;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .82rem;
}

footer p { margin: 0; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 30;
  transform: translate(-50%, 150%);
  background: var(--lime);
  color: #111;
  padding: 12px 18px;
  font-weight: 800;
  box-shadow: 0 12px 36px rgba(0,0,0,.32);
  transition: transform .22s ease;
}

.toast.is-visible { transform: translate(-50%, 0); }

@media (max-width: 1100px) {
  .controls { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 920px) {
  .layout { grid-template-columns: 1fr; }
  .intro {
    min-height: auto;
    position: static;
    padding: 64px 5vw;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  h1 { font-size: clamp(3.5rem, 13vw, 6.5rem); }
  .directory { padding-inline: 5vw; }
}

@media (max-width: 680px) {
  .masthead { padding-inline: 18px; }
  .masthead-note { display: none; }
  .intro, .directory { padding-left: 18px; padding-right: 18px; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metrics div:last-child { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .controls { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .deployment-card { min-height: 280px; }
  .directory-heading { align-items: start; flex-direction: column; }
  footer { padding-inline: 18px; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

