:root {
  --bg: #08090a;
  --bg-2: #0b0c0f;
  --panel: #0f1011;
  --panel-2: #161718;
  --panel-3: #1b1d21;
  --border: #23252a;
  --border-soft: #32353a;
  --text: #f7f8f8;
  --muted: #8a8f98;
  --muted-2: #62666d;
  --accent: #e4f222;
  --accent-2: #b7c800;
  --reports: #6bd3ff;
  --writeups: #f2a9d7;
  --methodology: #87d871;
  --shadow: rgba(0, 0, 0, 0.34) 0 20px 60px;
  --ease-out: cubic-bezier(0.22, 0.99, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", system-ui, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(94, 106, 210, 0.18), transparent 30%),
    radial-gradient(circle at 80% 10%, rgba(228, 242, 34, 0.07), transparent 25%),
    radial-gradient(ellipse 50% 35% at 50% 100%, rgba(107, 211, 255, 0.06), transparent 55%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
  color: var(--text);
  line-height: 1.55;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.3), transparent 85%);
  pointer-events: none;
  z-index: -2;
}

a {
  color: var(--text);
}

code,
.terminal-body,
.inline-chip,
.tag,
.filter-chip,
.library-summary,
.toolbar-link,
.stat-label,
.signal-label,
.note-label,
.eyebrow,
.card-kicker,
.mini-link span {
  font-family: "IBM Plex Mono", monospace;
}

code {
  color: var(--accent);
}

.page-glow {
  position: fixed;
  border-radius: 999px;
  filter: blur(80px);
  pointer-events: none;
  z-index: -1;
}

.page-glow-1 {
  width: 20rem;
  height: 20rem;
  top: 4rem;
  left: -6rem;
  background: rgba(94, 106, 210, 0.12);
}

.page-glow-2 {
  width: 16rem;
  height: 16rem;
  top: 18rem;
  right: -4rem;
  background: rgba(228, 242, 34, 0.09);
}

.site-header,
.hero,
main,
footer {
  width: min(1160px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding-top: 1rem;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  background: rgba(15, 16, 17, 0.8);
  border: 1px solid rgba(50, 53, 58, 0.9);
  border-radius: 14px;
  backdrop-filter: blur(16px);
  box-shadow: rgba(0, 0, 0, 0.22) 0 10px 30px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--accent), #8d9a12);
  box-shadow: 0 0 0 1px rgba(228, 242, 34, 0.3);
}

.top-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.top-nav a,
.toolbar-link {
  color: var(--muted);
  text-decoration: none;
}

.top-nav a:hover,
.toolbar-link:hover,
.core-card a:hover,
.mini-link:hover,
.library-item a:hover {
  color: var(--accent);
}

.hero {
  padding: 2rem 0 2.25rem;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.8fr);
  gap: 1rem;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.stat-card,
.core-card,
.signal-card,
.area-column,
.library-section,
.library-item {
  background: linear-gradient(180deg, rgba(22, 23, 24, 0.95), rgba(15, 16, 17, 0.96));
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), var(--shadow);
}

.hero-copy,
.hero-panel {
  border-radius: 20px;
  padding: 1.4rem;
}

.eyebrow,
.card-kicker,
.stat-label,
.signal-label,
.note-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 0.75rem;
  font-size: 0.74rem;
}

h1 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(2.35rem, 7vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.subhead {
  max-width: 60ch;
  color: var(--muted);
  margin: 1rem 0 0;
}

.hero-actions,
.card-links,
.hero-inline-meta,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-actions {
  margin-top: 1.5rem;
}

.hero-inline-meta {
  margin-top: 1.25rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.72rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
  transition: 160ms ease;
}

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

.button.primary {
  background: linear-gradient(165deg, var(--accent), #c6d420);
  color: #08090a;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 1px rgba(228, 242, 34, 0.25), 0 4px 24px rgba(228, 242, 34, 0.12);
}

.button.ghost {
  background: rgba(255, 255, 255, 0.02);
}

.button.compact {
  min-height: 2.3rem;
  padding: 0.5rem 0.8rem;
}

.inline-chip,
.tag,
.filter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.77rem;
  letter-spacing: 0.04em;
}

.hero-panel {
  display: grid;
  gap: 1rem;
}

.terminal-card,
.hero-note {
  background: linear-gradient(180deg, rgba(11, 12, 15, 0.96), rgba(16, 17, 18, 0.96));
  border: 1px solid var(--border-soft);
  border-radius: 16px;
}

.terminal-top {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid rgba(50, 53, 58, 0.8);
}

.terminal-top p {
  margin: 0 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.terminal-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--muted-2);
}

.terminal-body {
  display: grid;
  gap: 0.45rem;
  padding: 1rem 0.95rem;
}

.terminal-body p,
.hero-note p {
  margin: 0;
}

.terminal-body p {
  color: var(--muted);
  font-size: 0.78rem;
}

.terminal-body p span {
  color: var(--accent);
}

.terminal-body strong {
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.hero-note {
  padding: 1rem;
}

.hero-note p:last-child {
  color: var(--muted);
}

.stats-grid,
.core-grid,
.signal-strip,
.area-breakdown,
.workspace-grid,
.expanded-grid {
  display: grid;
  gap: 1rem;
}

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

.core-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  scroll-margin-top: 6rem;
}

.area-breakdown {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1rem;
}

.workspace-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.8fr);
  margin-top: 1rem;
}

.expanded-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1rem;
}

.stat-card,
.core-card,
.signal-card,
.area-column,
.workspace-card,
.expanded-card,
.library-section,
.library-item {
  border-radius: 18px;
}

.stat-card,
.core-card,
.signal-card,
.area-column,
.workspace-card,
.expanded-card {
  padding: 1.1rem;
}

.value {
  margin: 0.2rem 0 0.45rem;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: -0.06em;
  color: var(--text);
}

.meta,
.core-card p,
.section-head p,
.library-item p,
.empty,
footer p,
.library-summary {
  color: var(--muted);
}

.meta,
.core-card p,
.card-detail,
.library-item p,
.mini-link span {
  font-size: 0.95rem;
}

.core-card {
  position: relative;
  overflow: hidden;
}

.core-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -35% auto;
  width: 12rem;
  height: 12rem;
  border-radius: 999px;
  filter: blur(50px);
  opacity: 0.15;
}

.reports-card::after {
  background: var(--reports);
}

.writeups-card::after {
  background: var(--writeups);
}

.medium-card::after {
  background: var(--methodology);
}

.reports-card {
  border-top: 2px solid var(--reports);
}

.writeups-card {
  border-top: 2px solid var(--writeups);
}

.medium-card {
  border-top: 2px solid var(--methodology);
}

.core-card h3,
.section-head h2,
.area-column h2,
.library-item h3 {
  margin: 0;
  letter-spacing: -0.04em;
}

.card-detail {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(50, 53, 58, 0.65);
}

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

.signal-strip {
  margin-top: 1rem;
}

.workspace-card,
.expanded-card {
  background: linear-gradient(180deg, rgba(17, 18, 19, 0.96), rgba(13, 14, 15, 0.96));
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), var(--shadow);
}

.workspace-points,
.expanded-list {
  display: grid;
  gap: 0.8rem;
}

.workspace-point,
.expanded-item {
  padding: 0.95rem;
  border: 1px solid rgba(50, 53, 58, 0.8);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.workspace-point strong,
.expanded-item strong {
  display: block;
  margin-bottom: 0.35rem;
  letter-spacing: -0.03em;
}

.workspace-point p:last-child,
.expanded-item p:last-child {
  margin-bottom: 0;
}

.voice-card {
  display: grid;
  gap: 1rem;
}

.voice-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.voice-meta {
  display: grid;
  gap: 0.5rem;
}

.voice-meta label {
  color: var(--muted);
  font-size: 0.9rem;
}

.voice-meta input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.signal-card strong {
  font-size: 1rem;
  letter-spacing: -0.03em;
}

.mini-list,
.library-list {
  display: grid;
  gap: 0.75rem;
}

.mini-link {
  display: grid;
  gap: 0.2rem;
  padding: 0.8rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  background: rgba(11, 12, 15, 0.8);
  transition: border-color 160ms ease, transform 160ms ease;
}

.mini-link:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.library-section {
  margin-top: 1rem;
  padding: 1.25rem;
  scroll-margin-top: 6rem;
}

.controls {
  margin: 1rem 0 0.75rem;
}

#library-search {
  width: 100%;
  min-height: 3rem;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: rgba(11, 12, 15, 0.85);
  color: var(--text);
  padding: 0.85rem 0.95rem;
  font: inherit;
}

#library-search:focus,
.filter-chip:focus-visible,
.button:focus-visible,
.top-nav a:focus-visible,
.brand:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.library-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.library-summary {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.filter-chip {
  cursor: pointer;
}

.filter-chip.active {
  color: #08090a;
  background: var(--accent);
  border-color: var(--accent-2);
}

.library-item {
  padding: 1rem;
  background: linear-gradient(180deg, rgba(17, 18, 19, 0.96), rgba(13, 14, 15, 0.96));
}

.library-item p,
.expanded-item p,
.workspace-point p {
  margin-top: 0.35rem;
}

.library-item h3 a {
  text-decoration: none;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.tag {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.empty {
  margin: 0.75rem 0 0;
}

.hidden,
.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;
}

footer {
  padding: 1.25rem 0 2.5rem;
}

footer p {
  margin: 0.25rem 0;
}

.category-section {
  margin-top: 1rem;
}

.expanded-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}

.expanded-head h3 {
  margin: 0;
  letter-spacing: -0.03em;
}

.expanded-item a {
  text-decoration: none;
}

.expanded-meta {
  margin-top: 0.35rem;
}

.expanded-dest {
  font-size: 0.82rem;
  margin: 0.5rem 0 0;
  word-break: break-all;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
}

.expanded-dest a {
  color: var(--reports);
}

.expanded-dest a:hover {
  color: var(--accent);
}

@keyframes rise-fade {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes border-shimmer {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

.library-item {
  transition:
    border-color 0.2s var(--ease-out),
    transform 0.2s var(--ease-out),
    box-shadow 0.2s var(--ease-out);
  animation: rise-fade 0.55s ease backwards;
  animation-delay: calc(var(--stagger, 0) * 45ms);
}

.library-item:hover {
  border-color: rgba(107, 211, 255, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 12px 40px rgba(0, 0, 0, 0.35);
  transform: translateY(-2px);
}

.library-item:focus-within {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(228, 242, 34, 0.2);
}

.library-item-actions {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
}

.library-open-link {
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  color: var(--accent);
  background: rgba(228, 242, 34, 0.06);
  transition: background 0.15s ease, transform 0.15s ease;
}

.library-open-link:hover {
  background: rgba(228, 242, 34, 0.12);
  transform: translateY(-1px);
}

.core-card {
  transition: transform 0.2s var(--ease-out), border-color 0.2s ease;
}

.core-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.12);
}

.signal-card-interactive {
  transition: border-color 0.2s ease, transform 0.2s var(--ease-out);
}

.signal-card-interactive:hover {
  border-color: rgba(228, 242, 34, 0.25);
  transform: translateY(-2px);
}

.signal-hint {
  margin: 0.65rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}

.docs-section {
  margin-top: 1.25rem;
  padding: 1.25rem;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(22, 23, 24, 0.92), rgba(15, 16, 17, 0.94));
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), var(--shadow);
  scroll-margin-top: 5.5rem;
}

.docs-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1rem;
}

.docs-card {
  padding: 1.1rem;
  border-radius: 16px;
  border: 1px solid rgba(50, 53, 58, 0.85);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.02), transparent 40%),
    rgba(11, 12, 15, 0.85);
  transition: border-color 0.2s ease, transform 0.2s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.docs-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 40%,
    rgba(228, 242, 34, 0.04) 50%,
    transparent 60%
  );
  background-size: 200% 100%;
  animation: border-shimmer 4s linear infinite;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.docs-card:hover {
  border-color: rgba(107, 211, 255, 0.35);
  transform: translateY(-2px);
}

.docs-card:hover::before {
  opacity: 1;
}

.docs-card h3 {
  margin: 0 0 0.5rem;
  letter-spacing: -0.03em;
}

.docs-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.docs-kicker {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--accent-2);
  margin: 0 0 0.5rem;
}

.docs-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--reports);
  text-decoration: none;
}

.docs-link:hover {
  color: var(--accent);
}

.docs-code {
  font-size: 0.85em;
}

.hub-main {
  width: min(1160px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
}

.hub-hero {
  margin-bottom: 1.5rem;
}

.hub-hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: -0.05em;
  margin: 0.25rem 0;
  max-width: 20ch;
  line-height: 1.05;
}

.hub-lead {
  max-width: 70ch;
}

.hub-inline-meta {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.hub-inline-meta strong {
  color: var(--text);
}

.hub-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.hub-card {
  padding: 1.15rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(17, 18, 19, 0.96), rgba(13, 14, 15, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), var(--shadow);
  transition: transform 0.2s var(--ease-out), border-color 0.2s ease;
}

.hub-card:hover {
  transform: translateY(-3px);
  border-color: rgba(228, 242, 34, 0.22);
}

.hub-card h3 {
  margin: 0;
  letter-spacing: -0.03em;
}

.hub-card h3 a {
  text-decoration: none;
}

.hub-card-desc {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.hub-card-meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  color: var(--muted-2);
}

.hub-card-actions {
  margin-top: 1rem;
}

.voice-settings {
  display: grid;
  gap: 1rem;
  margin-top: 0.5rem;
}

.voice-field label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
}

.voice-val {
  font-family: "IBM Plex Mono", monospace;
  color: var(--accent);
  font-size: 0.8rem;
}

.voice-sliders {
  display: grid;
  gap: 0.85rem;
}

#voice-select {
  width: 100%;
  min-height: 2.75rem;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: rgba(11, 12, 15, 0.9);
  color: var(--text);
  font: inherit;
  padding: 0.5rem 0.75rem;
}

#voice-select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.voice-status-line {
  margin-top: 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(50, 53, 58, 0.6);
}

#areas,
#library,
#docs {
  scroll-margin-top: 5.5rem;
}

@media (prefers-reduced-motion: reduce) {
  .library-item,
  .docs-card::before {
    animation: none;
  }

  .library-item,
  .core-card,
  .signal-card-interactive,
  .docs-card,
  .hub-card {
    transition: none;
  }

  .library-item:hover,
  .core-card:hover,
  .signal-card-interactive:hover,
  .docs-card:hover,
  .hub-card:hover {
    transform: none;
  }
}

@media (max-width: 980px) {
  .hero,
  .stats-grid,
  .core-grid,
  .signal-strip,
  .area-breakdown,
  .workspace-grid,
  .expanded-grid,
  .docs-grid {
    grid-template-columns: 1fr;
  }

  .header-inner,
  .library-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .site-header,
  .hero,
  main,
  footer {
    width: min(100% - 1rem, 1160px);
  }

  .hero-copy,
  .hero-panel,
  .library-section {
    padding: 1rem;
  }

  h1 {
    max-width: 10ch;
    font-size: 2.5rem;
  }

  .top-nav {
    gap: 0.75rem;
  }
}
