:root {
  --bg: #07110f;
  --panel: rgba(12, 31, 27, .76);
  --panel-solid: #0b1d1a;
  --line: rgba(132, 245, 205, .18);
  --line-bright: rgba(132, 245, 205, .42);
  --mint: #74f1c5;
  --cyan: #72dff1;
  --text: #eefbf6;
  --muted: #9ab8ae;
  --gold: #f2c66d;
  --shadow: 0 24px 80px rgba(0, 0, 0, .38);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}
button, input, select { font: inherit; }
a { color: inherit; }
button, a, select, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.ambient {
  position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background:
    radial-gradient(circle at 78% 4%, rgba(27, 164, 138, .19), transparent 32rem),
    radial-gradient(circle at 8% 38%, rgba(37, 113, 134, .12), transparent 28rem),
    linear-gradient(rgba(116, 241, 197, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(116, 241, 197, .025) 1px, transparent 1px);
  background-size: auto, auto, 42px 42px, 42px 42px;
  mask-image: linear-gradient(to bottom, #000 0, rgba(0,0,0,.6) 70%, transparent 100%);
}

.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; padding: .7rem 1rem; background: var(--mint); color: #03100c; border-radius: .5rem; }
.skip-link:focus { top: 1rem; }

.site-header {
  width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: 1.3rem 0;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; gap: .85rem; align-items: center; text-decoration: none; }
.brand-mark { width: 2.8rem; aspect-ratio: 1; border: 1px solid var(--line-bright); border-radius: 14px; display: grid; place-content: center; gap: 4px; box-shadow: inset 0 0 22px rgba(116,241,197,.07); }
.brand-mark i { display: block; width: 1.25rem; height: 1px; background: var(--mint); box-shadow: 0 0 8px var(--mint); transform: rotate(-12deg); }
.brand strong { display: block; font-size: .84rem; letter-spacing: .18em; }
.brand small { display: block; color: var(--mint); font-size: .63rem; letter-spacing: .13em; margin-top: .12rem; }
.header-actions { display: flex; align-items: center; gap: 1.1rem; }
.header-actions > a { color: var(--muted); text-decoration: none; font-size: .82rem; }
.header-actions > a:hover { color: var(--mint); }
.language-switch { display: flex; padding: .2rem; border: 1px solid var(--line); border-radius: 99px; }
.language-switch button { border: 0; background: transparent; color: var(--muted); border-radius: 99px; padding: .3rem .55rem; cursor: pointer; font-size: .75rem; }
.language-switch button.active { background: var(--mint); color: #05120e; font-weight: 750; }

main { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; }
.hero { min-height: 510px; display: flex; flex-direction: column; justify-content: center; padding: 5rem 0 3rem; border-bottom: 1px solid var(--line); }
.eyebrow { display: flex; align-items: center; gap: .65rem; color: var(--mint); font-size: .68rem; letter-spacing: .18em; }
.eyebrow span { width: 34px; height: 1px; background: var(--mint); }
.hero h1 { max-width: 980px; margin: 1.4rem 0 1rem; font-size: clamp(3.5rem, 10vw, 8.6rem); letter-spacing: -.07em; line-height: .84; font-weight: 780; }
.hero h1 em { display: block; color: transparent; -webkit-text-stroke: 1px rgba(238,251,246,.58); font-style: normal; font-weight: 400; }
.hero > p { max-width: 660px; color: var(--muted); font-size: clamp(1rem, 2vw, 1.22rem); }
.hero-metrics { display: flex; flex-wrap: wrap; gap: .9rem 3.4rem; margin-top: 2.2rem; }
.hero-metrics div { border-left: 1px solid var(--line-bright); padding-left: .8rem; }
.hero-metrics strong, .hero-metrics span { display: block; }
.hero-metrics strong { font-size: 1.1rem; color: var(--mint); }
.hero-metrics span { font-size: .68rem; text-transform: uppercase; color: var(--muted); letter-spacing: .12em; }

.explorer-shell, .map-section { padding: 4.5rem 0; border-bottom: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.6rem; }
.section-heading span { font-size: .65rem; color: var(--mint); letter-spacing: .18em; }
.section-heading h2 { margin: .25rem 0 0; font-size: clamp(1.6rem, 4vw, 2.5rem); letter-spacing: -.04em; }
.section-heading > p { color: var(--muted); margin: 0; }
.search-wrap { position: relative; display: flex; align-items: center; }
.search-wrap svg { position: absolute; left: 1rem; width: 1.2rem; fill: none; stroke: var(--mint); stroke-width: 1.7; pointer-events: none; }
.search-wrap input { width: 100%; padding: 1.05rem 4rem 1.05rem 3rem; color: var(--text); background: rgba(3, 15, 12, .72); border: 1px solid var(--line-bright); border-radius: .75rem; }
.search-wrap input::placeholder { color: #6f9085; }
.search-wrap kbd { position: absolute; right: .8rem; color: var(--muted); border: 1px solid var(--line); border-radius: .35rem; padding: .2rem .4rem; font-size: .7rem; }
.filters { display: grid; grid-template-columns: 1fr 1fr auto; gap: .8rem; margin: .9rem 0 2rem; align-items: end; }
.filters label span { display: block; color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; margin: 0 0 .35rem .1rem; }
.filters select, .filters button { min-height: 46px; border-radius: .65rem; border: 1px solid var(--line); color: var(--text); background: var(--panel-solid); padding: 0 .9rem; }
.filters button { color: var(--mint); cursor: pointer; }
.filters button:hover { border-color: var(--mint); }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(290px, .85fr); gap: 1rem; align-items: start; }
.entity-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.entity-card { position: relative; min-height: 220px; text-align: left; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: .9rem; padding: 1.15rem; cursor: pointer; overflow: hidden; transition: transform .2s ease, border-color .2s ease, background .2s ease; }
.entity-card::after { content: ""; position: absolute; inset: auto -30% -70% 10%; height: 110%; background: radial-gradient(circle, rgba(116,241,197,.14), transparent 67%); opacity: 0; transition: opacity .2s; }
.entity-card:hover, .entity-card.selected { transform: translateY(-2px); border-color: var(--line-bright); background: rgba(14, 40, 34, .92); }
.entity-card:hover::after, .entity-card.selected::after { opacity: 1; }
.card-top { display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font: 650 .62rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; text-transform: uppercase; }
.card-dot { width: .5rem; height: .5rem; margin-top: .1rem; border-radius: 50%; background: var(--mint); box-shadow: 0 0 12px rgba(116,241,197,.8); }
.entity-card h3 { margin: 2.3rem 0 .5rem; font-size: 1.35rem; letter-spacing: -.03em; }
.entity-card p { margin: 0; color: var(--muted); font-size: .88rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.detail-panel { position: sticky; top: 1rem; min-height: 448px; background: linear-gradient(160deg, rgba(14,40,34,.98), rgba(5,20,17,.98)); border: 1px solid var(--line-bright); border-radius: .9rem; padding: 1.35rem; box-shadow: var(--shadow); }
.detail-empty { min-height: 418px; display: grid; place-content: center; text-align: center; color: var(--muted); }
.orb { display: block; width: 92px; aspect-ratio: 1; margin: 0 auto 1.2rem; border-radius: 50%; background: radial-gradient(circle at 38% 35%, var(--mint), #156b5a 30%, #07110f 70%); box-shadow: 0 0 50px rgba(116,241,197,.22); }
.detail-top { display: flex; justify-content: space-between; color: var(--mint); font: 650 .68rem ui-monospace, monospace; }
.detail-top button { border: 0; background: transparent; color: var(--muted); font-size: 1.5rem; cursor: pointer; }
.detail-type { display: inline-block; margin: 3.2rem 0 .6rem; color: var(--cyan); font-size: .66rem; text-transform: uppercase; letter-spacing: .14em; }
.detail-content h2 { margin: 0; font-size: 2rem; line-height: 1.05; }
.detail-description { color: var(--muted); font-size: .93rem; margin: 1.2rem 0 2rem; }
.detail-content dl { margin: 0; border-top: 1px solid var(--line); }
.detail-content dl div { padding: .75rem 0; border-bottom: 1px solid var(--line); }
.detail-content dt { color: var(--muted); font-size: .62rem; text-transform: uppercase; letter-spacing: .12em; }
.detail-content dd { margin: .18rem 0 0; font-size: .84rem; }
.detail-content dd a { color: var(--mint); }
.empty-state { text-align: center; color: var(--muted); padding: 5rem 1rem; border: 1px dashed var(--line); border-radius: .9rem; }
.empty-state > span { font-size: 3rem; color: var(--mint); }
.empty-state h3 { color: var(--text); }
.domain-map { display: flex; flex-wrap: wrap; gap: .65rem; }
.domain-map button { color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 99px; padding: .65rem .85rem; cursor: pointer; }
.domain-map button:hover { border-color: var(--mint); color: var(--mint); }
.domain-map b { color: var(--mint); margin-left: .4rem; }
footer { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: 2rem 0 3rem; display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .72rem; }
footer span { color: var(--mint); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 820px) {
  .header-actions > a { display: none; }
  .hero { min-height: 450px; }
  .content-grid { grid-template-columns: 1fr; }
  .detail-panel { position: fixed; inset: auto .75rem .75rem; z-index: 20; min-height: 0; max-height: 78vh; overflow: auto; transform: translateY(calc(100% + 1rem)); transition: transform .28s ease; }
  .detail-panel.open { transform: translateY(0); }
  .detail-empty { display: none; }
  .detail-type { margin-top: 1.5rem; }
}

@media (max-width: 560px) {
  .site-header, main, footer { width: min(100% - 1.25rem, 1180px); }
  .brand strong { font-size: .72rem; }
  .brand small { font-size: .55rem; }
  .hero { min-height: 420px; padding-top: 3.5rem; }
  .hero h1 { font-size: clamp(3.3rem, 20vw, 5.4rem); }
  .hero-metrics { gap: .85rem 1.4rem; }
  .explorer-shell, .map-section { padding: 3.4rem 0; }
  .section-heading { align-items: start; flex-direction: column; }
  .filters { grid-template-columns: 1fr; }
  .entity-grid { grid-template-columns: 1fr; }
  .entity-card { min-height: 188px; }
  .search-wrap kbd { display: none; }
  .search-wrap input { padding-right: 1rem; }
  footer { flex-direction: column; }
}

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