/* legal.css — the shared look of the static legal pages (privacy.html, terms.html, privacy-web.html).
   Copied from the game repo (miner-game/public/legal.css) — keep the two in step.
   Mirrors the game's neon tokens from index.html (title-screen backdrop, settings panel, wordmark)
   but none of its game-only rules: no user-select lock, no overflow lock, no zoom lock, so these
   pages scroll, select, zoom and print like documents. No JavaScript, no cookies.
   Deliberately NO `filter`/`backdrop-filter` on the long panel: on a document thousands of pixels
   tall either one asks the GPU for a full-size offscreen surface, which mobile browsers can drop. */

:root {
  --ac: #2be8ff;
  --acStrong: rgba(43, 232, 255, 0.7);
  --acDim: rgba(43, 232, 255, 0.35);
  --acFaint: rgba(43, 232, 255, 0.07);
  --glow: rgba(43, 232, 255, 0.75);
  --violet: #8a6cff;
  --text: #dcebff;
  --body: #c4cdf0;
  --muted: #7e88b4;
  --label: #6f7aa8;
  --hairline: rgba(120, 150, 255, 0.12);
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --sans: 'Chakra Petch', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 20px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #04050d;
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
}

/* Backdrop — the title screen's descent shaft (.pl-base + .pl-grid), held still. */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: -2;
  background:
    radial-gradient(420px 420px at 14% 22%, rgba(43, 232, 255, 0.12), transparent 70%),
    radial-gradient(460px 460px at 86% 30%, rgba(138, 108, 255, 0.12), transparent 70%),
    radial-gradient(125% 85% at 50% 12%, #0c1334 0%, #080b1e 42%, #04050d 78%);
}

body::after {
  z-index: -1;
  background-image:
    linear-gradient(rgba(120, 150, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 150, 255, 0.04) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, #000, transparent 80%);
  mask-image: radial-gradient(70% 60% at 50% 30%, #000, transparent 80%);
}

::selection {
  background: rgba(43, 232, 255, 0.3);
  color: #fff;
}

a {
  color: var(--ac);
  text-decoration: underline;
  text-decoration-color: var(--acDim);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
  transition: text-shadow 0.15s, text-decoration-color 0.15s;
}

a:hover {
  text-decoration-color: var(--ac);
  text-shadow: 0 0 10px var(--glow);
}

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

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  padding: 8px 14px;
  background: var(--ac);
  color: #04121a;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 2px;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

/* ---- Top bar ---- */
.top,
.wrap,
.foot {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: calc(20px + env(safe-area-inset-top));
  padding-bottom: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand:hover {
  text-shadow: none;
}

/* The favicon's diamond, drawn in CSS. */
.brand-mark {
  width: 13px;
  height: 13px;
  transform: rotate(45deg);
  background: linear-gradient(45deg, var(--ac), var(--violet));
  box-shadow: 0 0 12px var(--glow);
}

.brand-word {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 6px;
  line-height: 1;
  background: linear-gradient(176deg, #eafcff 0%, #56e9ff 40%, #8a6cff 72%, #ff4fd8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav {
  display: flex;
  flex-wrap: wrap; /* website copy: a third chip (Web privacy) must wrap on the narrowest phones */
  gap: 8px;
}

/* Chamfered chips, after the game's .panel-close / play button. */
.nav a {
  padding: 7px 14px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-decoration: none;
  color: #9aa3d0;
  background: rgba(30, 34, 60, 0.6);
  border: 1px solid var(--acDim);
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}

.nav a:hover {
  color: #dcebff;
  background: rgba(46, 52, 88, 0.7);
  text-shadow: none;
}

.nav a[aria-current='page'] {
  color: #04121a;
  background: var(--ac);
  border-color: var(--ac);
}

/* ---- Hero ---- */
.hero {
  padding: 40px 0 28px;
}

.tagline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 3px;
  color: #7e86b8;
  font-weight: 600;
  text-transform: uppercase;
}

.tagline .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ac);
  box-shadow: 0 0 8px var(--glow);
}

.tagline .ac {
  color: var(--ac);
}

.tagline .sep {
  opacity: 0.4;
}

/* The wordmark gradient, at headline size. */
.title {
  margin: 14px 0 0;
  font-weight: 700;
  font-size: clamp(34px, 7.4vw, 60px);
  line-height: 1.02;
  letter-spacing: clamp(2px, 0.6vw, 6px);
  text-transform: uppercase;
  background: linear-gradient(176deg, #eafcff 0%, #56e9ff 40%, #8a6cff 72%, #ff4fd8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 28px rgba(86, 233, 255, 0.35)) drop-shadow(0 0 60px rgba(255, 79, 216, 0.2));
}

.subtitle {
  margin: 14px 0 0;
  font-size: clamp(13px, 2.2vw, 16px);
  letter-spacing: clamp(3px, 0.8vw, 6px);
  text-transform: uppercase;
  color: #aeb9e0;
}

.meta {
  margin: 10px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--label);
}

/* ---- Panel: the settings modal's gradient frame + glass ---- */
.panel {
  padding: 1px;
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
  background: linear-gradient(135deg, var(--acStrong), rgba(138, 108, 255, 0.4) 50%, rgba(43, 232, 255, 0.12));
}

.panel-glass {
  clip-path: polygon(0 0, calc(100% - 21px) 0, 100% 21px, 100% 100%, 21px 100%, 0 calc(100% - 21px));
  background: linear-gradient(160deg, rgba(10, 12, 26, 0.96), rgba(6, 7, 17, 0.98));
  padding: 34px 40px 34px;
}

.lead {
  margin: 0 0 26px;
  font-size: 17.5px;
  line-height: 1.6;
  color: var(--text);
}

/* ---- The short version: HUD-style fact tiles ---- */
.label {
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 3px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--label);
}

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.facts li {
  margin: 0;
  padding: 11px 14px 12px;
  background: rgba(18, 21, 42, 0.55);
  border: 1px solid rgba(120, 90, 230, 0.16);
  border-left: 2px solid var(--ac);
  border-radius: 6px;
}

.facts li::before {
  display: none;
}

.fact-k {
  display: block;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ac);
  text-shadow: 0 0 10px rgba(43, 232, 255, 0.45);
}

.fact-v {
  display: block;
  margin-top: 3px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--body);
}

/* ---- Contents ---- */
.toc {
  margin: 0 0 6px;
  padding: 16px 18px;
  background: rgba(8, 10, 22, 0.6);
  border: 1px solid var(--hairline);
  border-radius: 6px;
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 28px;
}

.toc li {
  margin: 0;
  padding: 3px 0;
  break-inside: avoid;
  font-size: 14px;
  line-height: 1.45;
}

.toc li::before {
  display: none;
}

.toc a {
  color: var(--body);
  text-decoration: none;
}

.toc a:hover {
  color: #fff;
}

.toc .n {
  display: inline-block;
  min-width: 2.4em;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ac);
}

/* ---- Sections ---- */
section {
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--hairline);
}

h2 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 2.5px;
  line-height: 1.35;
  text-transform: uppercase;
  color: #fff;
}

h2 .n {
  flex: none;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--ac);
  text-shadow: 0 0 10px var(--glow);
}

h3 {
  margin: 20px 0 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #aeb9e0;
}

p,
li {
  color: var(--body);
}

p {
  margin: 0 0 12px;
}

strong {
  color: #fff;
  font-weight: 600;
}

ul {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

li {
  position: relative;
  margin: 0 0 8px;
  padding-left: 22px;
}

/* Neon diamond bullets — the favicon's mark again. */
li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.62em;
  width: 6px;
  height: 6px;
  transform: rotate(45deg);
  background: var(--ac);
  box-shadow: 0 0 8px var(--glow);
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
  color: #aab3dc;
  padding: 1px 6px;
  background: rgba(8, 10, 22, 0.8);
  border: 1px solid rgba(120, 150, 255, 0.18);
  border-radius: 4px;
  overflow-wrap: anywhere;
}

.note {
  margin: 14px 0;
  padding: 12px 16px;
  background: rgba(138, 108, 255, 0.07);
  border: 1px solid rgba(138, 108, 255, 0.22);
  border-left: 2px solid var(--violet);
  border-radius: 6px;
}

.note p:last-child {
  margin-bottom: 0;
}

.contact {
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.5px;
}

/* ---- Footer ---- */
.foot {
  padding-top: 28px;
  padding-bottom: calc(40px + env(safe-area-inset-bottom));
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--label);
}

.foot p {
  margin: 0 0 8px;
  color: var(--label);
}

.foot a {
  color: #9aa3d0;
  text-decoration: none;
}

.foot a:hover {
  color: var(--ac);
}

.foot .sep {
  opacity: 0.4;
  margin: 0 8px;
}

/* ---- Phones ---- */
@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .hero {
    padding: 28px 0 22px;
  }

  .panel-glass {
    padding: 24px 18px 26px;
  }

  .lead {
    font-size: 16px;
  }

  .facts {
    grid-template-columns: 1fr;
  }

  .toc ol {
    columns: 1;
  }

  h2 {
    font-size: 16px;
    letter-spacing: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  a {
    transition: none;
  }
}

/* ---- Print: plain black on white ---- */
@media print {
  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  body::before,
  body::after,
  .skip,
  .nav,
  .toc {
    display: none;
  }

  .panel,
  .panel-glass {
    clip-path: none;
    background: none;
    padding: 0;
  }

  .title,
  .brand-word {
    background: none;
    color: #000;
    filter: none;
  }

  p,
  li,
  h2,
  h3,
  strong,
  .lead,
  .fact-v,
  .meta,
  .subtitle,
  .tagline,
  .foot,
  .foot p {
    color: #000;
  }

  .fact-k,
  h2 .n {
    color: #000;
    text-shadow: none;
  }

  .facts li {
    background: none;
    border-color: #999;
  }

  li::before {
    background: #000;
    box-shadow: none;
  }

  a {
    color: #000;
  }
}
