
:root {
  color-scheme: dark;
  --bg: #050912;
  --bg-2: #0a1221;
  --panel: rgba(8, 14, 25, 0.78);
  --panel-2: rgba(10, 17, 30, 0.92);
  --panel-3: rgba(7, 12, 23, 0.95);
  --ink: #edf8ff;
  --muted: #8ea3b5;
  --line: rgba(124, 213, 255, 0.16);
  --line-strong: rgba(124, 213, 255, 0.34);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
  --accent: #4de2ff;
  --accent-2: #ff7a18;
  --accent-3: #b8ff4d;
  --positive: #52ffae;
  --radius: 28px;
  --radius-sm: 16px;
  --display: "Avenir Next Condensed", "Franklin Gothic Medium", "Arial Narrow", sans-serif;
  --sans: "Trebuchet MS", "Gill Sans", "Segoe UI Variable", sans-serif;
  --mono: "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  position: relative;
  background:
    radial-gradient(circle at 12% 10%, rgba(77, 226, 255, 0.12), transparent 24%),
    radial-gradient(circle at 86% 4%, rgba(255, 122, 24, 0.14), transparent 26%),
    radial-gradient(circle at 50% 100%, rgba(184, 255, 77, 0.08), transparent 30%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 45%, #04070e 100%);
  color: var(--ink);
  font-family: var(--sans);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

body::before {
  opacity: 0.32;
  background-image:
    linear-gradient(rgba(124, 213, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 213, 255, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at center, black 34%, transparent 92%);
}

body::after {
  background:
    radial-gradient(circle at 25% 20%, rgba(77, 226, 255, 0.16), transparent 18%),
    radial-gradient(circle at 75% 12%, rgba(255, 122, 24, 0.14), transparent 22%),
    radial-gradient(circle at 50% 86%, rgba(184, 255, 77, 0.08), transparent 20%);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.page-shell {
  width: min(1440px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 72px;
}

.hero,
.controls,
.detail-hero,
.section,
.topbar {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(12, 19, 35, 0.88), rgba(7, 12, 23, 0.86)),
    rgba(8, 14, 25, 0.84);
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero::before,
.controls::before,
.detail-hero::before,
.section::before,
.topbar::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(77, 226, 255, 0.78), transparent);
}

.hero {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 28px;
  padding: 40px;
  border-radius: 34px;
  overflow: hidden;
}

.hero::after,
.detail-hero::after {
  content: "";
  position: absolute;
  inset: auto -110px -120px auto;
  width: 340px;
  height: 340px;
  background:
    radial-gradient(circle, rgba(77, 226, 255, 0.20), transparent 42%),
    radial-gradient(circle, rgba(255, 122, 24, 0.18), transparent 64%);
  filter: blur(16px);
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 12px;
  color: #88dfff;
}

h1,
h2,
h3 {
  font-family: var(--display);
  line-height: 0.92;
  margin: 0;
  letter-spacing: 0.02em;
}

h1 {
  font-size: clamp(42px, 7vw, 86px);
  max-width: 11ch;
  text-transform: uppercase;
  text-shadow: 0 0 30px rgba(77, 226, 255, 0.16);
}

.hero-text,
.lede,
.card-summary,
.prose p {
  color: #d5e6f4;
  line-height: 1.72;
  font-size: 16px;
}

.hero-text {
  max-width: 64ch;
  margin-top: 18px;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-self: end;
}

.stat-card {
  border-radius: 22px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(15, 25, 43, 0.96), rgba(9, 15, 28, 0.88));
  border: 1px solid rgba(124, 213, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.stat-card strong {
  display: block;
  font-size: 38px;
  font-family: var(--display);
  color: #f4fbff;
}

.stat-card span {
  color: var(--muted);
  font-size: 14px;
}

.controls,
.section,
.topbar {
  border-radius: 26px;
  padding: 24px;
  margin-top: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-family: var(--display);
  font-size: 30px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: #f4fbff;
}

.topnav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.topnav a,
.mini-link {
  color: #8edfff;
  text-decoration: none;
}

.search {
  display: grid;
  gap: 10px;
}

.search span,
.filter-block h2,
.section h2 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 10px;
}

.search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(4, 10, 20, 0.84);
  padding: 16px 18px;
  font-size: 16px;
  color: var(--ink);
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.search input:focus {
  border-color: rgba(77, 226, 255, 0.52);
  box-shadow:
    0 0 0 4px rgba(77, 226, 255, 0.10),
    0 0 28px rgba(77, 226, 255, 0.12);
}

.filter-block + .filter-block {
  margin-top: 18px;
}

.filter-row,
.chip-row,
.toolbar,
.card-meta,
.card-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.toolbar {
  justify-content: space-between;
  margin-top: 18px;
}

.chip,
.filter-chip,
.badge {
  border-radius: 999px;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1;
}

.chip {
  background: rgba(10, 18, 32, 0.82);
  color: #d3ebf9;
}

.badge-kind {
  background: rgba(77, 226, 255, 0.10);
  color: #97ecff;
}

.badge-active {
  background: rgba(82, 255, 174, 0.12);
  color: #9effcf;
}

.badge-scheduled {
  background: rgba(255, 122, 24, 0.12);
  color: #ffb175;
}

.badge-standby,
.badge-legacy,
.badge-archived,
.badge-cataloged {
  background: rgba(141, 163, 184, 0.08);
  color: #c7d7e5;
}

.filter-chip {
  appearance: none;
  cursor: pointer;
  background: rgba(10, 18, 32, 0.74);
  color: #d7ecf8;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.filter-chip.active {
  border-color: rgba(77, 226, 255, 0.72);
  background: rgba(77, 226, 255, 0.12);
  box-shadow: 0 0 24px rgba(77, 226, 255, 0.16);
}

.filter-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(77, 226, 255, 0.40);
}

.filter-chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
}

.button {
  border-radius: 999px;
  padding: 12px 18px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 14px;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button-primary {
  background: linear-gradient(90deg, var(--accent), #85f3ff 46%, var(--accent-3));
  color: #03101a;
  box-shadow: 0 0 30px rgba(77, 226, 255, 0.18);
}

.button-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.button:hover {
  transform: translateY(-1px);
}

.button-secondary:hover {
  border-color: var(--line-strong);
  box-shadow: 0 0 24px rgba(77, 226, 255, 0.10);
}

.result-counter {
  color: var(--muted);
  font-size: 14px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.card {
  background: linear-gradient(180deg, rgba(10, 18, 32, 0.90), rgba(7, 12, 22, 0.94));
  border: 1px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  position: relative;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(77, 226, 255, 0.78), transparent);
  opacity: 0.72;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(77, 226, 255, 0.30);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.54),
    0 0 32px rgba(77, 226, 255, 0.10);
}

.card-cover-link {
  display: block;
  background:
    radial-gradient(circle at top left, rgba(77, 226, 255, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(8, 13, 25, 0.92), rgba(5, 8, 16, 0.98));
}

.card-cover {
  aspect-ratio: 16 / 10;
  width: 100%;
  object-fit: cover;
  filter: saturate(1.06);
}

.card-body {
  padding: 18px;
}

.card-title {
  margin-top: 8px;
  font-size: 30px;
}

.card-title a {
  text-decoration: none;
}

.metric-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.metric-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(124, 213, 255, 0.12);
  background: rgba(5, 12, 22, 0.78);
  color: #d6ecf8;
  font-size: 12px;
  line-height: 1;
}

.metric-pill strong {
  color: #88dfff;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.card-summary {
  margin: 12px 0 10px;
}

.card-family {
  margin: 0 0 12px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.mini-link {
  font-size: 14px;
}

.detail-layout {
  display: grid;
  gap: 24px;
}

.detail-hero {
  margin-top: 24px;
  border-radius: 34px;
  padding: 28px;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}

.detail-cover-wrap {
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(6, 11, 21, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.detail-cover {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.detail-main h1 {
  font-size: clamp(34px, 5vw, 62px);
  max-width: 14ch;
}

.lede {
  margin: 16px 0 18px;
  max-width: 60ch;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.profile-grid div {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  background: rgba(10, 17, 30, 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.profile-grid dt {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-size: 12px;
}

.profile-grid dd {
  margin: 10px 0 0;
  font-size: 16px;
  line-height: 1.5;
}

.prose {
  max-width: 78ch;
}

.prose p + p {
  margin-top: 14px;
}

.columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.flat-list,
.relation-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.flat-list li,
.relation-list li {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px 14px;
  background: rgba(10, 16, 29, 0.72);
}

.relation-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.relation-list span,
.empty {
  color: var(--muted);
}

.preview {
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(6, 11, 21, 0.92);
}

.preview img {
  width: 100%;
  max-height: 560px;
  object-fit: cover;
}

code {
  font-family: var(--mono);
  font-size: 13px;
  color: #9fe9ff;
}

.is-hidden {
  display: none !important;
}

::selection {
  background: rgba(77, 226, 255, 0.24);
  color: #f4fbff;
}

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

@media (max-width: 720px) {
  .page-shell {
    width: min(100vw - 20px, 1440px);
    padding-top: 12px;
  }

  .hero,
  .controls,
  .detail-hero,
  .section,
  .topbar {
    padding: 18px;
    border-radius: 22px;
  }

  h1 {
    font-size: clamp(34px, 13vw, 58px);
  }

  .brand {
    font-size: 22px;
  }

  .toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
}
