:root {
  --bg: #0a0c0d;
  --bg-alt: #0c0e0f;
  --panel: #0d1011;
  --line: #1c2124;
  --line-strong: #262d31;
  --line-bright: #39424a;
  --text: #e6e9e6;
  --text-2: #a9b2af;
  --dim: #7a8582;
  --faint: #5b6562;
  --accent: #ff3b45;
  --accent-hover: #ff5a62;
  --ok: #5fd38d;
  --warn: #ffb020;
  --wrap: 1280px;
  --display: "Chakra Petch", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
a:hover { color: var(--accent-hover); }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
.mono { font-family: var(--mono); }
.label { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; color: var(--dim); text-transform: uppercase; }
.redact { background: var(--text); color: var(--text); user-select: none; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--accent); color: #fff; padding: 8px 14px; }

/* HUD corner brackets */
.hud { position: relative; }
.hud::before, .hud::after { content: ""; position: absolute; width: 14px; height: 14px; pointer-events: none; z-index: 1; }
.hud::before { top: -1px; left: -1px; border-top: 2px solid var(--accent); border-left: 2px solid var(--accent); }
.hud::after { bottom: -1px; right: -1px; border-bottom: 2px solid var(--accent); border-right: 2px solid var(--accent); }

.blink { color: var(--accent); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px;
  font: 600 14px/1 var(--mono); letter-spacing: .02em; text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-ghost { border: 1px solid var(--line-bright); font-weight: 500; }
.btn-ghost:hover { border-color: var(--text-2); color: var(--text); }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 13px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(10, 12, 13, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand:hover { color: var(--text); }
.brand-mark { font: 700 17px/1 var(--display); letter-spacing: .1em; border: 1.5px solid var(--text); padding: 4px 8px; }
.brand-mark span { color: var(--accent); }
.brand-name { font: 400 13px/1 var(--mono); letter-spacing: .08em; color: var(--text-2); }
.nav { display: flex; align-items: center; gap: 28px; font: 400 13px/1 var(--mono); letter-spacing: .04em; }
.nav a { text-decoration: none; color: var(--text-2); padding: 10px 2px; border-bottom: 1px solid transparent; }
.nav a:hover { color: var(--text); border-bottom-color: var(--accent); }
.nav a span { color: var(--faint); margin-right: 6px; }
.nav .nav-cta { color: var(--bg); background: var(--text); padding: 11px 14px; font-weight: 600; border: 0; }
.nav .nav-cta:hover { color: var(--bg); background: #fff; }
.nav-toggle { display: none; width: 44px; height: 44px; padding: 12px 10px; background: none; border: 1px solid var(--line-strong); cursor: pointer; }
.nav-toggle span { display: block; height: 2px; background: var(--text); transition: transform .2s; }
.nav-toggle span + span { margin-top: 6px; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* Hero */
.hero {
  border-bottom: 1px solid var(--line);
  background-image:
    linear-gradient(rgba(230, 233, 230, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(230, 233, 230, .04) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: -1px -1px;
}
.hero-inner { padding-top: 112px; padding-bottom: 104px; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 56px; }
.hero-copy { flex: 3 1 560px; min-width: 0; }
.eyebrow { margin-bottom: 28px; font: 400 13px/1.4 var(--mono); letter-spacing: .08em; color: var(--dim); }
.eyebrow .dot { color: var(--accent); }
.hero h1 { font: 700 clamp(48px, 7.6vw, 112px)/.92 var(--display); letter-spacing: -.015em; text-transform: uppercase; }
.hero-lede { margin-top: 32px; max-width: 560px; font-size: 19px; line-height: 1.55; color: var(--text-2); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }

.status { flex: 2 1 360px; min-width: 0; border: 1px solid var(--line-strong); background: var(--panel); font: 400 13px/1.5 var(--mono); }
.status-head { display: flex; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line-strong); color: var(--dim); letter-spacing: .06em; }
.status-rows { padding: 6px 0; }
.status-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; text-decoration: none; transition: background .15s; }
.status-row:hover { background: #111517; color: var(--text); }
.status-row .num { color: var(--faint); }
.status-row .name { flex-grow: 1; font-weight: 600; letter-spacing: .04em; }
.state-restricted { color: var(--accent); }
.state-ok { color: var(--ok); }
.state-warn { color: var(--warn); }
.status-log { display: flex; flex-direction: column; gap: 6px; padding: 14px 18px; border-top: 1px solid var(--line-strong); color: var(--dim); font-size: 12px; }

/* Sections */
.section { border-bottom: 1px solid var(--line); }
.section-alt { background: var(--bg-alt); }
.section-inner { padding-top: 112px; padding-bottom: 112px; }
.section-index { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-bottom: 20px; font: 400 13px/1.4 var(--mono); letter-spacing: .08em; color: var(--dim); text-transform: uppercase; }
.section-index .n { color: var(--accent); }
.section-index .rule { flex: 1 1 120px; height: 1px; background: var(--line); }
.section-index a { text-decoration: none; color: var(--text-2); }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 64px; margin-bottom: 48px; }
.section-head h2 { flex: 1 1 520px; font: 700 clamp(34px, 4.6vw, 60px)/1 var(--display); text-transform: uppercase; }
.section-head p { flex: 1 1 360px; max-width: 440px; color: var(--text-2); }

.panel { border: 1px solid var(--line-strong); background: var(--panel); }

/* Image slots: striped placeholder until an image is added */
.slot {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: repeating-linear-gradient(135deg, #101415 0 16px, #0c0f10 16px 32px);
  font: 400 12px/1.4 var(--mono); letter-spacing: .1em; color: #4c5654; text-transform: uppercase;
}
.slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slot:has(img) { background: #0b0d0e; }
.slot-contain img { object-fit: contain; }

/* Games */
.games { display: flex; flex-wrap: wrap; gap: 20px; }
.game-main { flex: 3 1 560px; min-width: 0; }
.game-side { flex: 2 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.classified-frame {
  position: relative; aspect-ratio: 16 / 7; border-bottom: 1px solid var(--line-strong); overflow: hidden;
  background:
    radial-gradient(ellipse 60% 80% at 70% 40%, rgba(255, 59, 69, .12), transparent 70%),
    repeating-linear-gradient(0deg, rgba(230, 233, 230, .025) 0 1px, transparent 1px 3px),
    #0c0f10;
  display: flex; align-items: center; justify-content: center;
}
.stamp { font: 700 clamp(22px, 4vw, 44px)/1 var(--display); letter-spacing: .14em; color: var(--accent); border: 3px solid var(--accent); padding: 8px 22px; transform: rotate(-6deg); opacity: .9; }
.game-meta { padding: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.game-meta h3, .game-card h3 { margin-top: 8px; font: 700 32px/1.1 var(--display); }
.tag { font: 400 12px/1 var(--mono); letter-spacing: .06em; padding: 7px 10px; border: 1px solid; white-space: nowrap; }
.tag-red { color: var(--accent); border-color: var(--accent); }
.tag-amber { color: var(--warn); border-color: #6b5420; }
.game-card { flex-grow: 1; padding: 28px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; gap: 24px; }
.notify { display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px dashed var(--line-bright); padding: 22px 28px; text-decoration: none; transition: border-color .15s; }
.notify:hover { border-color: var(--accent); color: var(--text); }
.notify strong { display: block; font-weight: 500; }
.notify .arrow { font-family: var(--mono); color: var(--accent); }

/* Tools */
.tools { display: flex; flex-direction: column; gap: 20px; }
.tool { display: flex; flex-wrap: wrap; }
.tool-reverse { flex-wrap: wrap-reverse; }
.tool .slot { flex: 1 1 480px; min-width: 0; min-height: 320px; padding: 24px; }
.tool-body { flex: 1 1 440px; min-width: 0; padding: 36px; display: flex; flex-direction: column; gap: 18px; border-left: 1px solid var(--line-strong); }
.tool-reverse .tool-body { border-left: 0; border-right: 1px solid var(--line-strong); }
.tool-body h3 { font: 700 clamp(26px, 3vw, 40px)/1.05 var(--display); }
.tool-body > p:not(.label) { color: var(--text-2); }
.specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); font-family: var(--mono); }
.specs div { padding: 14px 0 14px 16px; border-left: 1px solid var(--line-strong); }
.specs div:first-child { padding-left: 0; border-left: 0; }
.specs dt { font-size: 11px; letter-spacing: .08em; color: var(--dim); }
.specs dd { margin-top: 4px; font-size: 15px; }
.tool-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: auto; padding-top: 8px; }
.tool-foot span { font: 400 12px/1.4 var(--mono); color: var(--dim); }

/* Art */
.viewer { display: flex; flex-wrap: wrap; }
.viewer .slot { flex: 3 1 600px; min-width: 0; min-height: 480px; padding: 24px; }
.viewer-info { flex: 1 1 300px; min-width: 0; border-left: 1px solid var(--line-strong); display: flex; flex-direction: column; font: 400 13px/1.5 var(--mono); }
.viewer-title { padding: 20px 22px; border-bottom: 1px solid var(--line-strong); }
.viewer-title p:last-child { margin-top: 6px; font: 700 24px/1.2 var(--display); }
.viewer-info dl { padding: 8px 22px; }
.viewer-info dl div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.viewer-info dl div:last-child { border-bottom: 0; }
.viewer-info dt { color: var(--dim); }
.viewer-link { margin-top: auto; display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-top: 1px solid var(--line-strong); text-decoration: none; }
.viewer-link span { color: var(--accent); }
.thumbs { margin-top: 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 16px; }
.thumb { display: flex; flex-direction: column; text-decoration: none; transition: border-color .15s; }
.thumb:hover { border-color: var(--line-bright); color: var(--text); }
.thumb .slot { aspect-ratio: 4 / 3; font-size: 11px; }
.thumb-cap { display: flex; justify-content: space-between; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line-strong); font: 400 12px/1.4 var(--mono); color: var(--dim); }
.thumb-cap span:first-child { color: var(--text); }

/* Contact */
.contact { display: flex; flex-direction: column; gap: 48px; }
.contact-main { min-width: 0; }
.contact-main .prompt { margin-bottom: 16px; font: 400 14px/1.4 var(--mono); color: var(--dim); }
.contact-mail { display: inline-block; font: 700 clamp(28px, 5vw, 68px)/1.05 var(--display); text-decoration: none; }
.channels { max-width: 640px; list-style: none; margin: 0; padding: 0; font: 400 14px/1.4 var(--mono); border-top: 1px solid var(--line-strong); }
.channels li { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line-strong); }
.channels li span:first-child { color: var(--dim); }
.channels a { text-decoration: none; }

.site-footer { border-top: 1px solid var(--line); }
.footer-inner { padding-top: 22px; padding-bottom: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; font: 400 12px/1.5 var(--mono); letter-spacing: .06em; color: var(--dim); }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 24px; }
.footer-inner a { text-decoration: none; color: var(--text-2); }

/* 404 */
.notfound { min-height: calc(100vh - 130px); display: flex; align-items: center; }
.notfound h1 { font: 700 clamp(72px, 14vw, 160px)/1 var(--display); color: var(--accent); }
.notfound p { margin: 16px 0 32px; color: var(--text-2); font-size: 18px; }

/* Responsive */
@media (max-width: 860px) {
  .tool-body, .tool-reverse .tool-body, .viewer-info { border: 0; border-top: 1px solid var(--line-strong); }
  .tool-reverse .tool-body { border-top: 0; border-bottom: 1px solid var(--line-strong); }
  .viewer .slot { min-height: 300px; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .brand-name { display: none; }
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 20px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 16px 0; font-size: 15px; border-bottom: 1px solid var(--line); }
  .nav .nav-cta { margin-top: 16px; text-align: center; }
  .hero-inner { padding-top: 72px; padding-bottom: 64px; gap: 40px; }
  .hero-lede { font-size: 17px; }
  .section-inner { padding-top: 76px; padding-bottom: 76px; }
  .section-head { margin-bottom: 32px; }
  .tool .slot { min-height: 220px; }
  .tool-body, .game-meta, .game-card { padding: 24px 20px; }
  .tool-body h3 { font-size: 28px; }
  .specs dd { font-size: 13px; }
  .notify { padding: 20px; }
  .contact-mail { font-size: clamp(20px, 6.6vw, 28px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
