@font-face {
  font-family: "PixelCode";
  src: url("/static/fonts/PixelCode.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

:root {
  --bg: #0d1015;
  --bg-soft: #161b22;
  --surface: rgba(18, 24, 31, 0.92);
  --surface-soft: rgba(27, 34, 44, 0.86);
  --surface-strong: #1d2630;
  --text: #f4efe7;
  --muted: #b5ab9c;
  --line: rgba(255, 245, 226, 0.12);
  --line-strong: rgba(255, 245, 226, 0.24);
  --teal: #58d1c9;
  --peach: #f08b62;
  --gold: #f1d38a;
  --lavender: #8f92e9;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  --ui-font: "PixelCode", "Lucida Sans Typewriter", "Courier New", monospace;
  --body-font: "Aptos", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --display-font: "Aptos", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 999px;
}

* {
  box-sizing: border-box;
}

img,
canvas {
  max-width: 100%;
}

html {
  background:
    radial-gradient(circle at 12% 18%, rgba(88, 209, 201, 0.18), transparent 22%),
    radial-gradient(circle at 85% 14%, rgba(240, 139, 98, 0.16), transparent 24%),
    radial-gradient(circle at 82% 76%, rgba(143, 146, 233, 0.14), transparent 22%),
    linear-gradient(180deg, #161b22 0%, #0d1015 100%);
  color: var(--text);
  font-family: var(--body-font);
}

body {
  margin: 0;
  min-height: 100vh;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 34px 34px;
}

a {
  color: inherit;
}

.shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0 22px;
  overflow-x: clip;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(13, 16, 21, 0.58);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
  overflow-x: auto;
  scrollbar-width: none;
}

.topbar::-webkit-scrollbar {
  display: none;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  min-width: 0;
  flex: 0 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex: 0 0 auto;
}

.brand__mark {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background:
    linear-gradient(135deg, var(--teal), var(--peach));
  box-shadow:
    0 0 0 3px rgba(88, 209, 201, 0.08),
    0 0 16px rgba(88, 209, 201, 0.16);
}

.brand__text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand__eyebrow,
.eyebrow,
.panel__label,
.card__kicker {
  margin: 0;
  color: var(--muted);
  font-family: var(--ui-font);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brand__name {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav a,
.inline-form button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-decoration: none;
  font-family: var(--ui-font);
  font-size: 0.68rem;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
  white-space: nowrap;
  flex: 0 0 auto;
}

.nav a:hover,
.inline-form button:hover,
.button:hover,
.dashboard-link:hover,
.link-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.18);
}

.nav .is-active,
.button {
  background: linear-gradient(135deg, var(--teal), #2b7f7a);
  border-color: transparent;
  color: #071012;
}

.button--ghost {
  background: transparent;
  color: var(--text);
}

.session-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--ui-font);
  font-size: 0.68rem;
  flex: 0 0 auto;
}

main {
  display: grid;
  gap: 14px;
}

.landing {
  display: grid;
  gap: 14px;
}

.landing--compact {
  gap: 12px;
}

.hero,
.auth-shell {
  display: grid;
  gap: 14px;
}

.hero--hub {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: stretch;
}

.hero__copy,
.project-panel,
.dashboard-hero,
.dashboard-hero__meta,
.auth-shell__copy,
.auth-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 48%),
    var(--surface);
  box-shadow: var(--shadow);
  min-width: 0;
  overflow: hidden;
}

.hero__copy,
.dashboard-hero,
.dashboard-hero__meta,
.auth-shell__copy,
.auth-card {
  padding: 18px;
}

.hero__copy,
.hero__visual,
.hero__aside {
  min-width: 0;
}

.hero__copy {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0;
  height: clamp(320px, 34vw, 390px);
  max-width: none;
}

.hero__copy h1,
.auth-shell__copy h1,
.dashboard-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(2.2rem, 4.2vw, 3.7rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  font-weight: 700;
  font-family: var(--display-font);
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.hero__tagline {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  max-width: 34ch;
}

.lead {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.58;
  max-width: 60ch;
  font-family: var(--body-font);
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.hero__actions,
.tag-row,
.auth-pill-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero__actions {
  margin-top: 14px;
}

.hero__copy .hero__facts {
  margin-top: auto;
}

.hero__aside {
  flex: 0 0 clamp(250px, 30vw, 320px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  height: clamp(320px, 34vw, 390px);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 44%),
    rgba(18, 24, 31, 0.82);
  box-shadow: none;
}

.hero__facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 0;
}

.hero__facts div {
  padding: 10px 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
}

.hero__facts dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-family: var(--ui-font);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero__facts dd {
  margin: 0;
  line-height: 1.35;
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.hero__aside-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
  margin-top: auto;
}

.project-panel h3,
.auth-card h2 {
  margin: 0 0 6px;
  font-size: clamp(1.02rem, 1.55vw, 1.28rem);
  line-height: 1.1;
  font-family: var(--display-font);
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.dashboard-link p {
  margin: 0;
  color: var(--muted);
  line-height: 1.44;
  font-size: 0.88rem;
  font-family: var(--body-font);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.95fr);
  gap: 12px;
  align-items: start;
}

.section-head--tight {
  gap: 10px;
}

.section-head--stacked {
  grid-template-columns: 1fr;
  max-width: 70ch;
}

.section-head--micro {
  grid-template-columns: 1fr;
  gap: 4px;
}

.section-head h2 {
  margin: 4px 0 0;
  font-size: clamp(1.3rem, 2.1vw, 1.8rem);
  line-height: 1.04;
  font-family: var(--display-font);
  max-width: 24ch;
  overflow-wrap: anywhere;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.hub-index {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(240px, 0.72fr);
  gap: 8px;
  align-items: start;
}

.hub-index__column {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.index-list {
  display: grid;
  gap: 2px;
}

.index-list--compact {
  gap: 0;
}

.index-row {
  display: grid;
  grid-template-columns: minmax(0, 200px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 245, 226, 0.08);
  text-decoration: none;
}

.index-row:first-child {
  border-top: 0;
}

.index-row--compact {
  grid-template-columns: 1fr;
  gap: 2px;
  padding: 8px 0;
}

.index-row__main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.index-row__main strong {
  font-size: 0.94rem;
  line-height: 1.2;
}

.index-row__main span,
.index-row__meta {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.34;
  overflow-wrap: anywhere;
}

.visual-lab {
  display: grid;
  gap: 12px;
}

.visual-lab__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
}

.viz-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 48%),
    var(--surface);
  box-shadow: var(--shadow);
  min-width: 0;
  overflow: hidden;
}

.viz-card--maze .viz-card__canvas-wrap {
  background:
    linear-gradient(135deg, rgba(88, 209, 201, 0.08), rgba(240, 139, 98, 0.08)),
    rgba(0, 0, 0, 0.24);
}

.viz-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.viz-card__meta {
  color: var(--gold);
  font-family: var(--ui-font);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.viz-card__canvas-wrap {
  aspect-ratio: 1;
  width: 100%;
  padding: 10px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 18% 18%, rgba(88, 209, 201, 0.14), transparent 32%),
    radial-gradient(circle at 80% 76%, rgba(143, 146, 233, 0.14), transparent 28%),
    rgba(0, 0, 0, 0.24);
}

.viz-card__canvas {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  background: #0f1114;
}

.viz-card__body {
  margin: 0;
  color: var(--muted);
  line-height: 1.42;
  font-size: 0.84rem;
  overflow-wrap: anywhere;
}

.tag-row span,
.auth-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(88, 209, 201, 0.1);
  color: var(--teal);
  font-family: var(--ui-font);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stack-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.34;
  font-size: 0.8rem;
}

.dashboard-hero {
  grid-template-columns: minmax(0, 1.05fr) minmax(240px, 0.95fr);
  display: grid;
  gap: 12px;
  align-items: stretch;
}

.dashboard-hero--classic .dashboard-hero__copy,
.dashboard-hero--classic .dashboard-hero__meta {
  display: grid;
  align-content: start;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 48%),
    var(--surface);
  box-shadow: var(--shadow);
  padding: 18px;
}

.dashboard-hero__meta {
  padding: 18px;
}

.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  align-items: stretch;
}

.project-panel--dashboard {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto 1fr auto;
  gap: 8px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(88, 209, 201, 0.04), transparent 38%),
    rgba(20, 27, 35, 0.94);
  box-shadow: var(--shadow);
  align-self: start;
  height: 100%;
}

.project-panel--dashboard .project-panel__head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.project-panel--dashboard h3,
.project-panel--dashboard p {
  margin: 0;
}

.dashboard-card__footer {
  display: flex;
  justify-content: flex-end;
}

.dashboard-card__signal {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-family: var(--ui-font);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.auth-shell__copy,
.auth-shell__panel {
  display: grid;
}

.auth-shell__copy {
  padding: 22px;
  align-content: start;
}

.auth-pill-row {
  margin-top: 24px;
}

.auth-card--dark {
  background:
    linear-gradient(180deg, rgba(88, 209, 201, 0.06), transparent 34%),
    rgba(15, 19, 25, 0.96);
}

.stack-form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.stack-form label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.stack-form input {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: inherit;
}

.stack-form input:focus,
.button:focus,
.nav a:focus,
.inline-form button:focus,
.dashboard-link:focus,
.link-card:focus {
  outline: 3px solid rgba(88, 209, 201, 0.22);
  outline-offset: 2px;
}

.error-box {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(240, 139, 98, 0.24);
  border-radius: var(--radius-md);
  background: rgba(240, 139, 98, 0.12);
  color: #ffd3bf;
}

.footer {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.blinkies {
  margin-top: 18px;
  overflow: hidden;
}

.blinkies__viewport {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}

.blinkies__track {
  display: flex;
  width: max-content;
  padding: 9px 0;
  animation: blinkies-scroll 34s linear infinite;
}

.blinkies__group {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
  padding: 0 10px;
}

.blinkies__viewport:hover .blinkies__track {
  animation-play-state: paused;
}

.blinkie-link {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.blinkie {
  display: block;
  width: 88px;
  height: 31px;
  image-rendering: pixelated;
}

@keyframes blinkies-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .blinkies__track {
    animation: none;
  }

  .nav a,
  .inline-form button,
  .button,
  .dashboard-link,
  .link-card {
    transition: none;
  }
}

@media (max-width: 1040px) {
  .hero--hub,
  .hub-index,
  .section-head,
  .dashboard-hero,
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .hero__copy,
  .hero__aside {
    height: auto;
  }
}

@media (max-width: 900px) {
  .topbar {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    overflow-x: visible;
  }

  .brand__eyebrow {
    display: none;
  }

  .topbar > .nav,
  .topbar__right {
    width: 100%;
    min-width: 0;
  }

  .topbar__right {
    justify-content: space-between;
  }

  .nav {
    width: 100%;
    padding-bottom: 2px;
  }

  .section-head {
    grid-template-columns: 1fr;
  }

  .hero__facts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100%, calc(100% - 20px));
    padding-top: 8px;
  }

  .topbar {
    padding: 8px 10px;
    gap: 8px;
  }

  .nav {
    gap: 5px;
  }

  .nav a,
  .inline-form button,
  .button {
    min-height: 30px;
    padding: 0 10px;
    font-size: 0.62rem;
  }

  .brand__name {
    font-size: 0.76rem;
  }

  .hero__copy,
  .viz-card,
  .dashboard-hero,
  .dashboard-hero__meta,
  .dashboard-hero--classic .dashboard-hero__copy,
  .dashboard-hero--classic .dashboard-hero__meta,
  .project-panel--dashboard,
  .auth-shell__copy,
  .auth-card {
    padding: 16px;
  }

  .hero__copy h1,
  .auth-shell__copy h1,
  .dashboard-hero h1 {
    font-size: clamp(2rem, 11vw, 3rem);
  }

  .hero__facts {
    grid-template-columns: 1fr;
  }

  .visual-lab__grid {
    grid-template-columns: 1fr;
  }

  .hub-index,
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .index-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .tag-row,
  .hero__actions,
  .auth-pill-row {
    gap: 8px;
  }

  .tag-row span,
  .auth-pill {
    font-size: 0.6rem;
  }
}

@media (max-width: 520px) {
  .shell {
    width: calc(100% - 16px);
  }

  .topbar {
    padding: 8px;
  }

  .topbar__right {
    gap: 6px;
  }

  .session-chip {
    width: 30px;
    min-width: 30px;
    min-height: 30px;
  }

  .hero__copy,
  .dashboard-hero,
  .dashboard-hero__meta,
  .dashboard-hero--classic .dashboard-hero__copy,
  .dashboard-hero--classic .dashboard-hero__meta,
  .project-panel--dashboard,
  .auth-shell__copy,
  .auth-card {
    padding: 14px;
  }

  .hero__copy h1,
  .auth-shell__copy h1,
  .dashboard-hero h1 {
    font-size: clamp(1.7rem, 10vw, 2.5rem);
  }

  .section-head h2,
  .auth-card h2 {
    font-size: 1.12rem;
  }
}
