:root {
  color-scheme: dark;
  --bg: #101113;
  --panel: #15171c;
  --paper: #f7f7f2;
  --muted: #acaeb9;
  --line: #33343f;
  --accent: #eaff4b;
  --purple: #c2b5ff;
  --mono: "IBM Plex Mono", Consolas, monospace;
  font-family: "Segoe UI", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--paper); background: var(--bg); }
a { color: inherit; text-underline-offset: .24em; }
a:hover { color: var(--accent); }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.skip { position: absolute; top: .7rem; left: .7rem; z-index: 4; padding: .8rem; background: var(--bg); transform: translateY(-160%); }
.skip:focus { transform: none; }
.wrap { width: min(1200px, calc(100% - 5rem)); margin-inline: auto; }
.dim { color: var(--muted); }
.top { min-height: 76px; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; border-bottom: 1px solid var(--line); }
.wordmark, .eyebrow, .network, .terminal, .button { font-family: var(--mono); }
.wordmark { display: inline-flex; gap: .55rem; align-items: center; line-height: 1; text-decoration: none; white-space: nowrap; font-size: 1rem; letter-spacing: -.035em; font-weight: 700; }
.wordmark img { object-fit: contain; image-rendering: pixelated; }
nav { display: flex; gap: clamp(.85rem, 3vw, 2.4rem); }
nav a { text-decoration: none; font-size: .94rem; color: var(--muted); }
.network { margin: 0; color: var(--muted); font-size: .8rem; white-space: nowrap; }
.network span, .status-dot { display: inline-block; background: var(--accent); width: .43rem; height: .43rem; border-radius: 50%; margin-right: .38rem; vertical-align: .12em; }
.network b { color: var(--purple); }
.hero { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1fr); align-items: center; gap: clamp(2.4rem, 6vw, 6rem); padding-block: clamp(3rem, 6vw, 5.2rem); }
.eyebrow { color: var(--purple); margin: 0 0 1.45rem; font-size: .875rem; line-height: 1.5; letter-spacing: .07em; font-weight: 700; }
.signal { display: inline-block; width: .5rem; height: .5rem; margin-right: .35rem; background: currentColor; }
h1 { margin: 0; font-size: clamp(4.5rem, 9.65vw, 8.6rem); line-height: .80; letter-spacing: -.095em; font-weight: 900; }
h1 em { font-style: normal; }
h1 span, h2 span { color: var(--accent); }
.tagline { margin: 1.8rem 0 .6rem; font-size: clamp(1.25rem, 2.6vw, 1.8rem); line-height: 1.18; letter-spacing: -.04em; font-weight: 700; }
.summary { color: var(--muted); margin: 0 0 1.55rem; max-width: 39ch; font-size: 1.08rem; line-height: 1.6; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 1.3rem; padding: .8rem 1rem; min-height: 48px; border: 1px solid transparent; border-radius: .2rem; text-decoration: none; font-size: .94rem; font-weight: 700; }
.primary { background: var(--accent); color: #141609; }
.primary:hover { color: #141609; background: #f3ff8b; }
.button span { opacity: .68; }
.terminal { margin: 0; border: 1px solid #44435b; background: #15151f; border-radius: .62rem; overflow: hidden; box-shadow: 0 20px 70px #08080d99; }
.terminal-head, .terminal-foot { display: flex; align-items: center; justify-content: space-between; gap: .4rem .8rem; flex-wrap: wrap; padding: .82rem 1rem; font-size: .81rem; }
.terminal-foot { color: var(--accent); }
.scan-control { background: transparent; border: 1px solid var(--line); border-radius: .2rem; color: var(--muted); padding: .35rem .55rem; }
.scan-control:hover { color: var(--paper); border-color: var(--purple); }
.monitor { position: relative; display: grid; place-items: center; isolation: isolate; overflow: hidden; aspect-ratio: 1.19; border-block: 1px solid #39374b; background: radial-gradient(ellipse at 50% 49%, #282443, #12121c 68%); }
.monitor::before { content: ""; position: absolute; inset: 0; opacity: .68; background: linear-gradient(#67608b32 1px, transparent 1px), linear-gradient(90deg, #67608b32 1px, transparent 1px); background-size: 30px 30px; background-position: center; mask-image: radial-gradient(ellipse, black 44%, #0009 76%); }
.radar { position: absolute; width: 73%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; border: 1px solid #a798ff55; }
.radar::before, .radar::after { content: ""; position: absolute; background: #a798ff55; }
.radar::before { width: 115%; height: 1px; }
.radar::after { width: 1px; height: 115%; }
.rings { position: absolute; inset: 13%; border: 1px solid #a798ff66; border-radius: 50%; }
.rings::before, .rings::after { position: absolute; content: ""; border: inherit; border-radius: inherit; }
.rings::before { inset: 15%; }
.rings::after { inset: 30%; }
.sweep { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 2deg, transparent 0 76%, #a48dff00 76%, #a48dff47 99.5%, #c4b5ff 100%); animation: rotate 13s linear infinite paused; }
@keyframes rotate { to { transform: rotate(360deg); } }
.radar-running .sweep { animation-play-state: running; }
.ping { position: absolute; z-index: 1; width: .5rem; height: .5rem; border-radius: 50%; background: var(--purple); box-shadow: 0 0 0 .28rem #c2b5ff2c, 0 0 .85rem #c2b5ffb3; }
.ping-one { top: 21%; right: 23%; }
.ping-two { bottom: 23%; left: 18%; }
.monitor img { z-index: 2; width: 56%; height: auto; image-rendering: pixelated; filter: drop-shadow(0 10px 24px #14130aab) drop-shadow(0 0 15px #eaff4b34); }
.corner { position: absolute; width: 13px; height: 13px; border: solid var(--purple); opacity: .72; }
.tl { top: 14px; left: 14px; border-width: 1px 0 0 1px; }
.tr { top: 14px; right: 14px; border-width: 1px 1px 0 0; }
.bl { bottom: 14px; left: 14px; border-width: 0 0 1px 1px; }
.br { bottom: 14px; right: 14px; border-width: 0 1px 1px 0; }
.radar-label { position: absolute; bottom: 1.6rem; left: 1.55rem; color: #bbb0ea; letter-spacing: .12em; font-size: .75rem; }
.hero-actions, .overlay-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.secondary { background: #251e34; color: var(--paper); border-color: #5d506f; }
.secondary:hover { color: var(--accent); border-color: var(--accent); }
.trader-section { background: #16151d; border-block: 1px solid var(--line); padding-block: clamp(2.8rem, 5vw, 4.7rem); }
.section-head, .manifesto { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .68fr); align-items: end; gap: 1.8rem 3rem; }
.section-head { margin-bottom: 1.8rem; }
.section-head > p, .prose { color: var(--muted); font-size: 1.04rem; line-height: 1.65; }
.section-head > p { margin: 0 0 .25rem; max-width: 46ch; }
h2 { margin: 0; font-size: clamp(2.65rem, 6.4vw, 5.3rem); line-height: .96; font-weight: 850; letter-spacing: -.075em; }
.section-head .eyebrow { margin-bottom: .95rem; }
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; border: 1px solid #494055; background: #494055; border-radius: .55rem; overflow: hidden; }
.value-grid article { background: #1b1924; padding: 1.15rem clamp(1.05rem, 3vw, 1.85rem); }
.value-grid article > span { color: var(--accent); font: 1.7rem/1 var(--mono); display: inline-block; }
.value-grid h3 { margin: .55rem 0 .44rem; font-size: clamp(1.15rem, 2.2vw, 1.5rem); letter-spacing: -.04em; }
.value-grid p { margin: 0; color: var(--muted); line-height: 1.55; }
.manifesto { padding-block: clamp(3rem, 7vw, 5.8rem); }
.prose p { margin: 0; }
.prose p + p { margin-top: .9rem; }
.game-section { position: relative; background: radial-gradient(ellipse at 75% 0, #241e3699, transparent 56%), #14141b; border-block: 1px solid var(--line); padding-block: clamp(3rem, 5vw, 4.7rem); }
#gioco { position: absolute; top: 0; }
.mission-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .58rem; margin-bottom: .65rem; }
.mission-button, .perk-button { min-width: 0; display: grid; align-content: start; gap: .35rem; padding: .8rem .85rem; text-align: left; color: var(--paper); background: #211a2d; border: 1px solid #55466a; border-radius: .4rem; line-height: 1.35; }
.mission-button:hover:enabled, .perk-button:hover:enabled { border-color: var(--purple); }
.mission-button[aria-pressed="true"], .perk-button[aria-pressed="true"] { border-color: var(--accent); background: #302a38; }
.mission-button[aria-pressed="true"] strong, .perk-button[aria-pressed="true"] strong { color: var(--accent); }
.mission-kind, .mission-best { color: var(--muted); font: .83rem/1.35 var(--mono); }
.mission-kind { color: var(--purple); }
.loadout { border: 1px solid #55466a; border-radius: .4rem; background: #191624; margin-bottom: .8rem; }
.loadout summary { cursor: pointer; display: flex; align-items: center; gap: .65rem; list-style-type: none; padding: .75rem .85rem; font-weight: 700; }
.loadout summary::-webkit-details-marker { display: none; }
.loadout summary::before { content: "+"; color: var(--purple); font: 1.3rem/1 var(--mono); }
.loadout[open] summary::before { content: "−"; }
#feather-total { margin-left: auto; color: var(--purple); font: .86rem var(--mono); }
.loadout p { color: var(--muted); margin: 0 .85rem .75rem; }
.perk-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: .55rem; padding: 0 .85rem .85rem; }
.perk-button span { font-size: .85rem; }
.perk-button:disabled { opacity: .63; cursor: default; }
.arcade { border: 1px solid #514762; border-radius: .75rem; background: #17151f; overflow: hidden; box-shadow: 0 14px 60px #08080d66; }
.game-hud, .game-deck { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .75rem 1.5rem; padding: .8rem 1.2rem; }
.game-route { display: flex; align-items: center; color: var(--purple); font: 700 .88rem/1.3 var(--mono); }
.game-route .status-dot { flex-shrink: 0; background: var(--purple); margin-right: .55rem; }
.game-stats { display: grid; grid-template-columns: repeat(6, minmax(3.2rem, 1fr)); gap: .65rem clamp(.8rem, 2.25vw, 1.8rem); margin: 0; }
.game-stats dt { color: var(--muted); font-size: .82rem; }
.game-stats dd { margin: .2rem 0 0; font: 700 .98rem/1.1 var(--mono); color: var(--paper); white-space: nowrap; }
.game-stats div:first-child dd, .game-stats dd.urgent { color: #ffb7bb; }
.game-screen { display: grid; position: relative; aspect-ratio: 2.095; border-block: 1px solid #453955; background: #14142a; }
.game-screen canvas { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; }
.game-screen canvas:focus { outline: none; }
.game-screen:focus-within { outline: 1px solid var(--purple); outline-offset: -1px; }
.game-overlay { display: grid; place-items: center; position: absolute; inset: 0; padding: .7rem; background: #0d0b1a59; }
.game-card { width: min(460px, 100%); border: 1px solid #81709b; border-radius: .52rem; background: #161222f5; box-shadow: 0 0 2.6rem #100b21cc; text-align: center; padding: clamp(.85rem, 2.8vw, 1.65rem); }
.game-kicker { color: var(--purple); font: 700 .85rem/1.2 var(--mono); letter-spacing: .06em; margin: 0 0 .5rem; }
.game-card h3 { margin: 0; font-size: clamp(1.65rem, 4vw, 2.7rem); letter-spacing: -.065em; line-height: 1; }
.game-card #game-summary { color: #d3ccdb; line-height: 1.4; margin: .65rem auto .9rem; max-width: 40ch; }
.overlay-actions { justify-content: center; }
.game-deck { background: #14121d; }
kbd { border: 1px solid #544965; border-radius: .2rem; padding: .1rem .28rem; color: var(--paper); font: .85rem var(--mono); white-space: nowrap; }
.flight-controls, .utility-controls { display: flex; flex-wrap: wrap; gap: .4rem; }
.flight-controls button, .utility-controls button { border: 1px solid #645677; border-radius: .28rem; background: #241e32; color: var(--paper); min-width: 2.85rem; min-height: 44px; padding: .35rem .62rem; font-weight: 650; }
.flight-controls button:enabled { touch-action: none; }
.flight-controls button:hover:enabled, .flight-controls button.held, .utility-controls button:hover:enabled { color: var(--accent); border-color: var(--accent); }
.flight-controls button:disabled, .utility-controls button:disabled { opacity: .48; cursor: default; }
.game-notes { padding: .75rem 1.2rem; border-top: 1px solid #3c334a; }
.game-notes p { margin: 0; color: var(--muted); font-size: .91rem; line-height: 1.6; }
.game-notes #game-message { margin-top: .3rem; color: var(--purple); }
.footer { display: flex; align-items: center; justify-content: space-between; gap: .8rem; min-height: 75px; color: var(--muted); font-size: .91rem; }
@media (max-width: 900px) {
  .wrap { width: calc(100% - 3rem); }
  .hero { gap: 2rem; }
}
@media (max-width: 760px) {
  .network { display: none; }
  .hero, .section-head, .manifesto { grid-template-columns: 1fr; }
  .hero { padding-block: 3.25rem; }
  h1 { font-size: clamp(4rem, 15vw, 7.5rem); }
  .terminal { max-width: 560px; }
  .section-head { gap: .9rem; }
  .value-grid { grid-template-columns: 1fr; }
  .mission-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game-screen { aspect-ratio: 1.7; min-height: 240px; }
  .game-stats { width: 100%; }
  .game-hud, .game-deck, .game-notes { padding-inline: .85rem; }
}
@media (max-width: 460px) {
  .wrap { width: calc(100% - 2rem); }
  .top { column-gap: .6rem; flex-wrap: wrap; justify-content: flex-start; padding-block: .7rem; min-height: 0; }
  .top nav { flex-basis: 100%; gap: 1.15rem; }
  .top nav a { min-height: 32px; display: flex; align-items: center; }
  .terminal-head, .terminal-foot, .game-hud, .game-deck, .game-notes { padding-inline: .65rem; }
  .game-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .flight-controls { flex: 1 1 100%; }
  .flight-controls button { flex: 1; }
  .game-card { padding: .75rem; }
  .game-card #game-summary { font-size: .93rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
