:root {
  color-scheme: dark;
  --bg: #0f1317;
  --panel: #171d24;
  --panel-2: #1d242d;
  --text: #edf4f9;
  --muted: #a7b5c4;
  --line: #2b3541;
  --blue: #5b59cf;
  --green: #53c3ff;
  --red: #ff6b78;
  --yellow: #ffc534;
  font-family: "Fixedsys Excelsior", Fixedsys, "Lucida Console", "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

img,
canvas,
video,
svg {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

body {
  margin: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 18%, rgba(91, 89, 207, .2), transparent 28%),
    radial-gradient(circle at 88% 82%, rgba(83, 195, 255, .16), transparent 26%),
    linear-gradient(145deg, #0a0d11, var(--bg));
  color: var(--text);
  text-rendering: optimizeSpeed;
  -webkit-font-smoothing: none;
  font-smooth: never;
}

a {
  color: inherit;
}

.tablet-stage {
  height: 100vh;
  height: 100svh;
  display: grid;
  align-items: start;
  justify-items: center;
  padding: 10px;
}

.tablet-device {
  position: relative;
  width: min(calc(100vw - 20px), 1203px, calc((100vh - 20px) * 1.4815));
  width: min(calc(100vw - 20px), 1203px, calc((100svh - 20px) * 1.4815));
  aspect-ratio: 1203 / 812;
  margin-top: clamp(0px, 1.25svh, 14px);
  filter: drop-shadow(12px 12px 0 rgba(0, 0, 0, .46));
}

.tablet-frame {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.tablet-screen {
  position: absolute;
  left: 2.826267%;
  top: 4.187192%;
  width: 94.347465%;
  height: 91.748768%;
  z-index: 1;
  overflow: hidden;
  background:
    linear-gradient(rgba(83, 195, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(83, 195, 255, .045) 1px, transparent 1px),
    linear-gradient(180deg, #111820, #0e1218 72%);
  background-size: 8px 8px, 8px 8px, auto;
}

.tablet-content {
  height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: #526780 rgba(255, 255, 255, .05);
  scrollbar-width: thin;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 28px;
  border-bottom: 2px solid #334151;
  background: #0f1317;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 18px;
  font-weight: 800;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 0;
  background:
    linear-gradient(135deg, var(--yellow), #ffe07d 42%, transparent 43%),
    linear-gradient(315deg, var(--blue), var(--green));
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, .22) inset,
    3px 3px 0 rgba(0, 0, 0, .45);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link,
.nav-button,
.button {
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  padding: 0 13px;
  text-decoration: none;
  border: 2px solid transparent;
  font-size: 14px;
  font-weight: 700;
  image-rendering: pixelated;
}

.nav-link {
  color: var(--muted);
}

.nav-link.active,
.nav-link:hover {
  color: var(--text);
  background: #1d242d;
  border-color: #334151;
}

.nav-button,
.button.primary {
  color: #08131f;
  background: var(--blue);
  border-color: #7775ff;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .55);
}

.nav-button.ghost,
.button.secondary {
  color: var(--text);
  background: #253141;
  border-color: #334151;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .55);
}

.button.full {
  width: 100%;
}

.inline-form {
  margin: 0;
}

button {
  cursor: pointer;
  font: inherit;
}

.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 58px 46px 72px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background:
    radial-gradient(circle at 80% 20%, rgba(83, 195, 255, .24), transparent 34%),
    linear-gradient(180deg, #141b23, #0f1317 72%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 38%;
  background:
    linear-gradient(90deg, rgba(255, 197, 52, .22), transparent 18%, rgba(83, 195, 255, .12) 54%, transparent),
    linear-gradient(180deg, transparent, rgba(15, 19, 23, .94));
  pointer-events: none;
}

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

.hero-copy h1,
.page-heading h1,
.auth-card h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 78px);
  letter-spacing: 0;
  line-height: .94;
}

.lead {
  width: min(620px, 100%);
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.city-grid {
  position: absolute;
  inset: 4% -10% -18% 34%;
  background:
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, transparent 0 44%, rgba(255, 197, 52, .16) 45% 55%, transparent 56%);
  background-size: 42px 42px;
  opacity: .95;
  transform: perspective(760px) rotateX(62deg) rotateZ(-10deg) translateY(150px) scale(1.4);
  transform-origin: center bottom;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.metric strong {
  display: block;
  margin-top: 4px;
  font-size: 28px;
}

.section-grid {
  width: calc(100% - 56px);
  margin: 0 auto 48px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.surface,
.post-card,
.auth-card,
.metric {
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, .36);
}

.surface {
  padding: 20px;
}

.surface h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

.surface p,
.post-card p,
.page-heading p,
.form-note {
  color: var(--muted);
  line-height: 1.55;
}

.page-shell {
  width: calc(100% - 56px);
  margin: 0 auto;
  padding: 36px 0;
}

.page-shell.narrow {
  width: min(760px, calc(100% - 56px));
}

.page-heading {
  margin-bottom: 24px;
}

.page-heading h1 {
  font-size: clamp(34px, 5vw, 64px);
}

.feed-placeholder {
  display: grid;
  gap: 12px;
}

.post-card {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 14px;
  padding: 16px;
}

.post-card.muted {
  opacity: .78;
}

.avatar {
  width: 54px;
  height: 54px;
  border-radius: 0;
  background: linear-gradient(135deg, var(--blue), var(--green));
}

.avatar.square {
  border-radius: 0;
}

.auth-shell {
  min-height: 560px;
  display: grid;
  place-items: center;
  padding: 32px 20px;
}

.auth-card {
  width: min(430px, 100%);
  display: grid;
  gap: 14px;
  padding: 24px;
}

.auth-card h1 {
  font-size: 34px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 2px solid #344250;
  border-radius: 0;
  background: #10161c;
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .34) inset;
}

input {
  height: 42px;
}

textarea {
  resize: vertical;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.flash {
  padding: 11px 12px;
  border-radius: 0;
  font-size: 13px;
  border: 1px solid #74313a;
  color: #ffc0c7;
  background: #2b171b;
}

.flash.success {
  border-color: #2d6b49;
  color: #baf6d3;
  background: #13251b;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric {
  padding: 16px;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid #28333f;
  text-align: left;
  color: var(--muted);
}

th {
  color: var(--text);
  font-size: 12px;
}

@media (max-width: 860px) {
  .tablet-stage {
    padding: 10px;
  }

  .site-header {
    height: auto;
    min-height: 68px;
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 18px;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .hero {
    min-height: auto;
    padding: 64px 20px 82px;
  }

  .section-grid,
  .admin-metrics {
    grid-template-columns: 1fr;
  }
}
