[hidden] { display: none !important; }
:root {
  color-scheme: dark;
  --bg: #070a12;
  --bg2: #0a0f1b;
  --panel: #0e1424;
  --line: #1d2842;
  --text: #d9e1ee;
  --muted: #8b97ac;
  --green: #34d399;
  --cyan: #22d3ee;
  --magenta: #e879f9;
  --amber: #fbbf24;
  --red: #ff3b5c;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  background-image:
    linear-gradient(rgba(52, 211, 153, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(52, 211, 153, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--text);
  font: 17px/1.62 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); }
b { color: #fff; font-weight: 650; }
h1, h2, h3, .eyebrow, .brand, .btn, .fine, figcaption, .demo, .foot { font-family: var(--mono); }
h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -0.01em; }
p { margin: 0 0 0.9em; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 20; background: var(--green); color: #04120c; padding: 8px 12px; border-radius: 6px; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }

/* header */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px max(var(--gutter), calc((100% - 1120px) / 2));
  background: rgba(7, 10, 18, 0.9); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.brand { color: #fff; text-decoration: none; font-weight: 800; letter-spacing: 0.06em; font-size: 18px; }
.brand span { color: var(--green); }
.top nav { display: flex; align-items: center; gap: 4px 18px; font: 600 13px var(--mono); }
.top nav a:not(.btn) { color: var(--muted); text-decoration: none; padding: 6px 0; }
.top nav a:not(.btn):hover { color: #fff; }
.top nav a.lang { color: var(--cyan); border: 1px solid var(--line); border-radius: 4px; padding: 2px 7px; font-size: 12px; }
.top nav a.lang:hover { border-color: var(--cyan); }

/* buttons */
.btn {
  display: inline-block; padding: 13px 22px; border-radius: 6px;
  background: var(--green); color: #04120c; border: 1px solid var(--green);
  font-weight: 800; font-size: 15px; letter-spacing: 0.02em; text-decoration: none; cursor: pointer;
}
.btn:hover { background: #6ee7b7; border-color: #6ee7b7; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--green); color: #fff; background: rgba(52, 211, 153, 0.08); }
.btn.small { padding: 7px 14px; font-size: 13px; }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }

/* layout */
main > section { width: min(1120px, calc(100% - 2 * var(--gutter))); margin: 0 auto; }
.block { padding: 72px 0 8px; }
.block h2 { font-size: clamp(26px, 4vw, 36px); margin-bottom: 14px; }
.block h2::before { content: "// "; color: var(--green); }
.sub { color: var(--muted); max-width: 62ch; margin-bottom: 28px; }
.eyebrow { color: var(--green); font-size: 13px; text-transform: uppercase; letter-spacing: 0.14em; margin: 0 0 14px; }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr); gap: 48px; align-items: center; padding: 64px 0 24px; }
.hero h1 { font-size: clamp(38px, 6.2vw, 68px); font-weight: 800; color: #fff; }
.cursor { display: inline-block; width: 0.5em; height: 0.9em; margin-left: 0.12em; background: var(--green); vertical-align: -0.08em; animation: blink 1.1s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }
.lead { font-size: 19px; color: #c1cbdc; margin: 22px 0 28px; max-width: 46ch; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.fine { color: var(--muted); font-size: 12.5px; line-height: 1.55; margin-top: 18px; max-width: 52ch; }

/* screenshots */
.shot { margin: 0; }
.shot img { border: 1px solid var(--line); border-radius: 8px; background: #000; box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.06), 0 24px 60px rgba(0, 0, 0, 0.6); }
.shot figcaption { color: var(--muted); font-size: 12px; margin-top: 10px; }
.hero-shot img { box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.12), 0 0 70px rgba(34, 211, 238, 0.07), 0 24px 60px rgba(0, 0, 0, 0.6); }

/* live status and map */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 20px 0 0; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.tile.wide { grid-column: span 2; }
.tile dt { font: 600 11px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.tile dd { margin: 0; font: 800 22px/1.2 var(--mono); color: #fff; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tile dd span { font-weight: 700; }
.tile dd small { font: 500 12px var(--sans); color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #566178; display: inline-block; flex: none; }
.ok .dot { background: var(--green); box-shadow: 0 0 10px var(--green); }
.bad .dot { background: var(--red); box-shadow: 0 0 10px var(--red); }
.bad span { color: var(--red); }
.map-title { font-size: 18px; margin: 34px 0 14px; color: #fff; }
.map-wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.map-scroll { max-height: 560px; overflow: auto; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; }
#map { display: block; width: 100%; height: auto; min-width: 360px; }
#map .block-g { cursor: pointer; outline: none; }
#map .block-g rect { stroke-width: 1.5; transition: stroke 0.15s, fill 0.15s; }
#map .block-g:hover rect, #map .block-g:focus-visible rect, #map .block-g.sel rect { stroke: #fff; }
#map .block-g text { font: 700 9px var(--mono); fill: #dbe3f1; pointer-events: none; }
#map .block-g .tag { font-size: 12px; fill: #fff; }
#map .siege rect { animation: siege 1.1s ease-in-out infinite alternate; }
@keyframes siege { from { stroke: #e879f9; } to { stroke: #ff3b5c; } }
#map .plaza { fill: #0e1830; stroke: #1d2842; }
#map .plaza-label { font: 700 8px var(--mono); fill: #566178; letter-spacing: 0.2em; }
#map .side-label { font: 700 9px var(--mono); letter-spacing: 0.12em; }
.map-detail { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; min-height: 120px; font-size: 15px; }
.map-detail h4 { margin: 0 0 8px; font: 800 16px var(--mono); color: #fff; }
.map-detail p { margin: 0 0 4px; color: #c1cbdc; }
.map-legend { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font: 600 12px var(--mono); color: var(--muted); }
.swatch { display: inline-block; width: 11px; height: 11px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; border: 1px solid #fff3; }

/* cards and lists */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.cards article, .mechanics article { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 20px; }
.cards h3, .mechanics h3 { font-size: 16px; color: var(--green); margin-bottom: 10px; }
.cards p:last-child, .mechanics p:last-child { margin-bottom: 0; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; align-items: start; }
.split.reverse .shot { order: -1; }
.mechanics { display: grid; gap: 12px; }
.mechanics article { padding: 16px 18px; }
.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.facts li { padding-left: 16px; border-left: 2px solid var(--line); }
.facts li:hover { border-left-color: var(--green); }
.facts.wide { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 36px; }
.prose p { max-width: 56ch; }

/* breach demo */
.demo { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 20px; }
.demo h3 { font-size: 16px; color: var(--cyan); }
.demo-note { color: var(--muted); font-size: 12px; margin: 6px 0 14px; }
.demo-guesses { display: grid; gap: 6px; min-height: 28px; margin-bottom: 12px; }
.demo-row { display: flex; align-items: center; gap: 6px; }
.chip, .slot, .key { font: 800 15px var(--mono); border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; }
.chip { width: 28px; height: 28px; font-size: 13px; }
.demo-row .pips { margin-left: 8px; display: inline-flex; gap: 4px; }
.pip { width: 10px; height: 10px; border-radius: 50%; display: inline-block; border: 1px solid #44506a; }
.pip.exact { background: var(--green); border-color: var(--green); }
.pip.near { background: transparent; border-color: var(--amber); box-shadow: inset 0 0 0 2px var(--amber); }
.demo-slots { display: flex; gap: 8px; margin-bottom: 12px; }
.slot { width: 48px; height: 48px; border: 1px dashed #36425e; color: var(--muted); font-size: 20px; }
.slot.filled { border-style: solid; }
.demo-keys { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.key { width: 44px; height: 44px; border: 1px solid transparent; cursor: pointer; font-size: 18px; }
.key:hover { filter: brightness(1.2); }
.demo-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.demo-status { margin: 14px 0 6px; font-size: 14px; min-height: 22px; color: var(--text); }
.demo-status.win { color: var(--green); }
.demo-status.lose { color: var(--red); }
.demo-legend { color: var(--muted); font-size: 12px; margin: 0; }
.demo-legend .pip { margin: 0 4px 0 10px; vertical-align: -1px; }
.demo-legend .pip:first-child { margin-left: 0; }
.sym-A { background: #1e3a5f; color: #7cc4ff; } .sym-B { background: #4a1d2b; color: #ff8fa6; }
.sym-C { background: #1f4630; color: #7ef0a8; } .sym-D { background: #4d3a12; color: #ffd36b; }
.sym-E { background: #3a2557; color: #d3a8ff; } .sym-F { background: #164650; color: #7eeaf5; }

.honest .facts li { border-left-color: var(--amber); }

.final { text-align: center; padding: 96px 0 72px; }
.final h2 { font: 800 clamp(30px, 5vw, 48px) var(--mono); color: #fff; }
.final p { color: var(--muted); margin: 10px 0 26px; }

.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding: 22px max(var(--gutter), calc((100% - 1120px) / 2)); border-top: 1px solid var(--line);
  color: var(--muted); font-size: 12px;
}
.foot a { color: var(--muted); margin-left: 16px; }
.foot a:hover { color: #fff; }
.foot .trust { flex-basis: 100%; }

@media (max-width: 900px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map-wrap { grid-template-columns: 1fr; }
  .hero, .split { grid-template-columns: 1fr; }
  .hero { gap: 32px; padding-top: 40px; }
  .split.reverse .shot { order: 0; }
  .cards { grid-template-columns: 1fr; }
  .facts.wide { grid-template-columns: 1fr; }
  .block { padding-top: 56px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .top nav a:not(.btn):not(.lang) { display: none; }
  .lead { font-size: 17px; }
  .btn { padding: 12px 18px; }
  .slot { width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cursor { animation: none; }
}

/* The city is the setting; the playable hack is the invitation. */
body { background-image: radial-gradient(ellipse at 85% 0%, #45206055, transparent 45%), linear-gradient(#22d3ee06 1px, transparent 1px), linear-gradient(90deg, #22d3ee06 1px, transparent 1px); }
.hero h1 { font-size: clamp(36px, 5vw, 60px); }
.hero h1 em { font-style: normal; color: var(--cyan); }
.hero-shot { position: relative; }
.hero-shot::before { content: ''; position: absolute; inset: -8px -8px 20px 8px; border: 1px solid #e879f933; border-radius: 10px; z-index: -1; }
.hero .lead { font-size: 18px; }
#hacken .split, #hacking .split { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
#hacken .demo, #hacking .demo { order: -1; border-color: #22d3ee66; box-shadow: 0 0 45px #22d3ee0a; }
.mechanics summary { cursor: pointer; color: var(--cyan); font: 700 16px/1.5 var(--mono); padding: 16px; border: 1px solid var(--line); border-radius: 8px; }
.mechanics article { margin-top: 12px; }
.demo h3 { font-size: 22px; }
.demo-note { font-size: 14px; }
.demo-status { min-height: 44px; }
.demo-keys .key { min-width: 44px; min-height: 44px; }
.demo-legend { line-height: 1.8; }
.demo-play { display: block; margin-top: 18px; text-align: center; }
@media (max-width: 900px) {
  #hacken .split, #hacking .split { grid-template-columns: 1fr; }
  .hero { padding-top: 28px; gap: 24px; }
  .hero h1 { font-size: clamp(34px, 7vw, 52px); }
}
@media (prefers-reduced-motion: reduce) { #map .siege rect { animation: none; } }

body { background-size: auto, 32px 32px, 32px 32px; background-repeat: no-repeat, repeat, repeat; }
