:root {
  --bg: #111822;
  --card: #f6f0e9;
  --ink: #0c0f14;
  --muted: #6b7280;
  --burnt: #bf5700;
  --teal: #3caea3;
  --maize: #f7c948;
  --border: rgba(255,255,255,0.08);
  --shadow: 0 18px 36px rgba(0,0,0,0.35);
  --radius: 10px;
  --body: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Press Start 2P', system-ui, monospace;
  --mono: 'Syne Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--card);
  font-family: var(--body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0, rgba(255,255,255,0.05) 2px, transparent 2px, transparent 8px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.05) 0, rgba(255,255,255,0.05) 2px, transparent 2px, transparent 8px),
    radial-gradient(rgba(191,87,0,0.08) 1px, transparent 1px);
  background-size: 12px 12px, 12px 12px, 60px 60px;
  overflow-x: hidden;
  box-sizing: border-box;
}

html { overflow-x: hidden; }

*, *::before, *::after { box-sizing: inherit; }

a { color: var(--maize); text-decoration: none; }
a:hover { color: var(--teal); }
a:visited { color: #c77bff; }

.shell { width: min(960px, 100%); margin: 0 auto; padding: clamp(12px, 3vw, 18px); box-sizing: border-box; }

.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  width: 100%;
}

.brand {
  font-family: var(--display);
  font-size: 12px;
  color: var(--maize);
  padding: 10px 12px;
  border: 2px solid var(--burnt);
  border-radius: 10px;
  background: rgba(12,15,20,0.9);
  box-shadow: var(--shadow);
}

.top-nav {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 6px;
  background: rgba(12,15,20,0.9);
  border: 2px solid var(--burnt);
  border-radius: 12px;
  padding: 8px;
  box-shadow: var(--shadow);
  width: 100%;
}

.nav-link {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 12px;
  background: linear-gradient(180deg, #fefefe, #e7e2d7);
  border: 2px solid var(--ink);
  border-radius: 10px;
  box-shadow: 0 6px 0 #0c0f14;
  font-family: var(--display);
  font-size: 11px;
  color: var(--ink);
  text-transform: uppercase;
  text-align: center;
  transition: transform 80ms ease, box-shadow 80ms ease;
}

.nav-link:hover { transform: translateY(-1px); box-shadow: 0 8px 0 #0c0f14; }
.nav-link:active { transform: translateY(2px); box-shadow: 0 4px 0 #0c0f14; }

.page { display: grid; gap: 16px; }

.page * { box-sizing: border-box; }

.card {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin-bottom: 0;
  width: 100%;
  box-sizing: border-box;
}

.grid-2 { display: grid; grid-template-columns: 1fr; gap: 14px; }

h1, h2, h3 { font-family: var(--mono); margin: 0 0 12px; color: var(--ink); }
h1 { font-size: 26px; }
h2 { font-size: 20px; }
h3 { font-size: 18px; }

p { margin: 0 0 12px; }

.accent {
  font-family: var(--display);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--burnt);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.badge { background: var(--burnt); color: var(--card); padding: 6px 10px; border-radius: 6px; font-family: var(--display); font-size: 10px; }

.hero { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: center; }

.hero-img { position: relative; }
.hero-img { display: flex; justify-content: center; }
.hero-img .frame {
  background: var(--card);
  border: 2px solid var(--burnt);
  border-radius: var(--radius);
  padding: 4px;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 5;
  width: 100%;
  max-width: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  position: relative;
  overflow: hidden;
}
.hero-img img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 6px;
  object-fit: cover;
  object-position: center top;
}
.hero-img .pixel { position: absolute; bottom: 10px; right: 10px; background: var(--ink); color: var(--card); padding: 8px 10px; font-family: var(--display); font-size: 10px; border: 1px solid var(--burnt); box-shadow: 0 6px 14px rgba(0,0,0,0.4); }

.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }

.btn { border: 2px solid var(--ink); background: linear-gradient(180deg, var(--maize), #f2b134); color: var(--ink); padding: 10px 14px; font-family: var(--display); font-size: 11px; border-radius: 8px; box-shadow: 0 10px 20px rgba(0,0,0,0.28); text-transform: uppercase; letter-spacing: 0.3px; cursor: pointer; transition: transform 120ms ease, box-shadow 120ms ease; display: inline-flex; align-items: center; gap: 8px; }

.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 22px rgba(0,0,0,0.32); }

.btn.secondary { background: var(--card); color: var(--ink); border: 2px dashed var(--burnt); }

.meta { color: var(--muted); font-size: 14px; }

.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.list li { border: 1px dashed rgba(0,0,0,0.08); border-radius: 8px; padding: 10px 12px; background: rgba(255,255,255,0.6); }

.marquee { font-family: var(--display); font-size: 11px; background: linear-gradient(90deg, rgba(191,87,0,0.16), rgba(60,174,163,0.16)); border: 1px dashed var(--burnt); padding: 8px 10px; overflow: hidden; border-radius: 8px; margin-bottom: 12px; }
.marquee span { display: inline-block; padding-left: 100%; animation: scroll 18s linear infinite; white-space: nowrap; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
label { font-family: var(--mono); color: var(--ink); }
input, textarea { font-family: var(--body); padding: 10px 12px; border-radius: 8px; border: 1px solid rgba(0,0,0,0.12); background: rgba(255,255,255,0.9); }
textarea { resize: vertical; }
.honeypot { display: none; }

.tags { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.tag { background: var(--ink); color: var(--card); padding: 2px 8px; border-radius: 999px; font-family: var(--mono); font-size: 12px; }

footer .btn-row img { border-radius: 4px; border: 1px solid rgba(255,255,255,0.1); background: #0b0f16; }

table { width: 100%; border-collapse: collapse; margin: 12px 0; }
th, td { border: 1px dashed rgba(0,0,0,0.14); padding: 8px 10px; font-family: var(--mono); font-size: 14px; }
th { background: rgba(191,87,0,0.1); text-align: left; }

.topbar,
.top-nav,
.card,
.hero,
.grid-2,
.list,
.btn-row { max-width: 100%; overflow: hidden; }

h1, h2, h3 { word-break: break-word; }

article a { word-break: break-word; }

img { max-width: 100%; height: auto; }

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

@media (min-width: 960px) {
  .shell { padding: 24px 18px 80px; }
  .topbar { gap: 12px; }
  .top-nav { gap: 10px; }
  .nav-link { flex: 0 0 auto; min-width: 120px; }
  .page { gap: 18px; }
  .hero { grid-template-columns: 1.1fr 0.9fr; gap: 18px; }
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .nav-link { flex: 1 1 100%; min-width: 0; }
  .grid-2 { grid-template-columns: 1fr; }
  .btn-row { flex-direction: column; }
  .marquee span { padding-left: 0; animation: none; white-space: normal; }
}

@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr; }
  .top-nav { gap: 6px; }
  .nav-link { flex: 1 1 100%; min-width: 0; }
  .btn-row { flex-direction: column; }
  .topbar { flex-direction: column; align-items: stretch; }
  .brand { width: 100%; text-align: center; }
  .top-nav { width: 100%; }
  .marquee span { padding-left: 0; animation: none; white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .marquee span { padding-left: 0; }
}
