:root {
  --bg: #101417;
  --text: #f5f7f2;
  --muted: rgba(245, 247, 242, 0.68);
  --quiet: rgba(245, 247, 242, 0.45);
  --panel: #171d21;
  --panel-2: #1e252a;
  --line: rgba(245, 247, 242, 0.13);
  --green: #66d3a4;
  --amber: #e7b858;
  --blue: #75a7ff;
  --rose: #ff7f9b;
  --ink: #0c1012;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(117, 167, 255, 0.1), transparent 24rem),
    linear-gradient(90deg, rgba(102, 211, 164, 0.05), rgba(231, 184, 88, 0.06)),
    var(--bg);
  color: var(--text);
  overflow-x: hidden;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input,
select {
  font: inherit;
}

button,
input,
select {
  min-height: 2.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(245, 247, 242, 0.08);
  color: var(--text);
}

button {
  padding: 0 1rem;
  cursor: pointer;
  background: var(--green);
  border-color: var(--green);
  color: var(--ink);
  font-weight: 800;
}

button.secondary {
  background: rgba(117, 167, 255, 0.16);
  border-color: rgba(117, 167, 255, 0.35);
  color: var(--text);
}

input,
select {
  padding: 0 0.85rem;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 2rem);
  border-bottom: 1px solid var(--line);
  background: rgba(16, 20, 23, 0.86);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar h1,
.hero h2,
.section-head h3,
.project-card h4 {
  margin: 0;
  letter-spacing: 0;
}

.topbar h1 {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
}

.eyebrow {
  margin: 0 0 0.3rem;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-size: 0.72rem;
  font-weight: 850;
}

.quick-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.22rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(245, 247, 242, 0.06);
}

.lang-toggle button {
  min-height: 2rem;
  padding: 0 0.65rem;
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}

.lang-toggle button.active {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--ink);
}

main {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.4rem 0 3rem;
}

main > *,
.hero > *,
.content-grid > *,
.controls > * {
  min-width: 0;
}

.hero {
  min-height: 18rem;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(18rem, 0.6fr);
  gap: 1rem;
  align-items: end;
  padding: clamp(1rem, 4vw, 2rem) 0;
}

.hero h2 {
  max-width: 58rem;
  font-size: clamp(2rem, 5vw, 4.3rem);
  line-height: 1;
  overflow-wrap: anywhere;
}

.hero p {
  max-width: 48rem;
  color: var(--muted);
  line-height: 1.7;
}

.status-panel {
  display: grid;
  gap: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  background: rgba(23, 29, 33, 0.82);
}

.stats-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.7rem;
}

.stat {
  min-height: 5rem;
  display: grid;
  align-content: center;
  gap: 0.2rem;
  padding: 0.8rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stat strong {
  font-size: 1.65rem;
}

.stat span,
.muted {
  color: var(--quiet);
}

.controls {
  display: grid;
  grid-template-columns: minmax(16rem, 1fr) 12rem 14rem 12rem auto auto;
  gap: 0.7rem;
  margin: 1rem 0;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.38fr);
  gap: 1rem;
  align-items: start;
}

.section-head,
.project-head,
.meta-row,
.link-row,
.evidence-row,
.radar-tags {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.section-head,
.project-head {
  justify-content: space-between;
}

.pill,
.score {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.6rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.score {
  color: var(--ink);
  background: var(--amber);
  border-color: var(--amber);
  font-weight: 850;
}

.project-list {
  display: grid;
  gap: 0.8rem;
  margin-top: 0.85rem;
}

.project-card,
.review-panel,
.empty {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(23, 29, 33, 0.9);
}

.project-card {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
}

.project-card h4 {
  font-size: 1.15rem;
}

.tagline {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.meta-row span,
.evidence {
  display: inline-flex;
  align-items: center;
  min-height: 1.65rem;
  border-radius: 999px;
  padding: 0 0.55rem;
  font-size: 0.82rem;
}

.meta-row span {
  background: rgba(117, 167, 255, 0.13);
  color: var(--blue);
}

.evidence.ready {
  background: rgba(102, 211, 164, 0.14);
  color: var(--green);
}

.evidence.gap {
  background: rgba(255, 127, 155, 0.13);
  color: var(--rose);
}

.radar-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 1.65rem;
  border: 1px solid rgba(117, 167, 255, 0.24);
  border-radius: 999px;
  padding: 0 0.55rem;
  color: var(--blue);
  font-size: 0.82rem;
}

.link-row a,
.resource-list a {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 0.6rem;
  background: rgba(245, 247, 242, 0.06);
}

.review-panel {
  position: sticky;
  top: 6rem;
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

pre {
  min-height: 18rem;
  overflow: auto;
  white-space: pre-wrap;
  margin: 0;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d1113;
  color: var(--muted);
}

.resource-list {
  display: grid;
  gap: 0.55rem;
}

.empty {
  padding: 1rem;
  color: var(--muted);
}

@media (max-width: 860px) {
  .topbar,
  .hero,
  .content-grid,
  .controls {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
  }

  .quick-links {
    justify-content: flex-start;
  }

  .hero h2 {
    max-width: 20ch;
    font-size: 1.7rem;
    line-height: 1.08;
  }

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

  .review-panel {
    position: static;
  }
}
