/* NOCTULE's own styling. Deliberately NOT ../style.css, which is themed ink-on-paper
   for Supply Lines; a player arriving from the App Store listing should land on
   something that looks like the game they just tapped.

   The palette is lifted from the app, not approximated:
     background  #05030A          lib/ui/*.dart, the cave's black
     ink         hsl(280 30% 92%) PixelTuning.hue 280, the "VIOLET" default
     dim         hsl(280 30% 55%)
     faint       hsl(280 30% 30%)
     pulse       hsl(305 85% 62%) PixelTuning.pulseHue 305, "MAGENTA" — the lit edge
   Two brightness steps do the ranking, as on the board screen; the saturated hue is
   reserved for things that are *lit*, which here means links.

   Dark only, on purpose. This is a game about being in the dark, and a light-mode
   variant would be the one screen in the whole product that is not. Every colour is
   painted explicitly rather than inherited, so a light-mode browser still gets the cave.

   No web fonts, no build step, no external requests. These pages have to keep loading
   for an App Store reviewer years from now; every moving part removed is one that
   cannot fail. */

:root {
  --bg:      #05030a;
  --slab:    #ede4f1;
  --ink:     #ede4f1;
  --dim:     #986aaf;
  --faint:   #543663;
  --pulse:   #f14ce3;
  --rule:    #2a1b33;
  --mono: ui-monospace, "SF Mono", "DejaVu Sans Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 2.5rem 1.25rem 4rem;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.02rem;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}

/* The cell lattice the game renders into, at the threshold of visible. It is a
   background-image rather than an element so it costs nothing and cannot reflow. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    repeating-linear-gradient(to right,  rgba(152,106,175,0.055) 0 1px, transparent 1px 12px),
    repeating-linear-gradient(to bottom, rgba(152,106,175,0.055) 0 1px, transparent 1px 12px);
}

main {
  position: relative;
  z-index: 1;
  max-width: 40rem;
  margin: 0 auto;
}

/* The wordmark slab from the title screen: the light is the bar, and the letters are
   holes punched in it. Same inversion, same tracking. */
h1 {
  display: block;
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem 0.6rem;
  background: var(--slab);
  color: var(--bg);
  font-family: var(--mono);
  font-size: clamp(1.5rem, 6.5vw, 2.1rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h2 {
  margin: 2.5rem 0 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h3 {
  margin: 1.75rem 0 0.4rem;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

p { margin: 0 0 1rem; }

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

.sub {
  margin: 0 0 2.25rem;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

a {
  color: var(--pulse);
  text-decoration: none;
  border-bottom: 1px solid rgba(241,76,227,0.35);
}
a:hover, a:focus { color: #fff; border-bottom-color: #fff; }

ul { padding-left: 1.1rem; margin: 0 0 1rem; }
li { margin-bottom: 0.35rem; }
li::marker { color: var(--faint); }

/* A quoted string as the game renders it — used for the LOCAL BOARD caption and for the
   name-field rules, where the exact characters matter. */
code, .lattice {
  font-family: var(--mono);
  font-size: 0.9em;
  color: var(--ink);
  background: rgba(152,106,175,0.12);
  border: 1px solid var(--rule);
  padding: 0.05em 0.4em;
  letter-spacing: 0.06em;
}

/* A pulled-out statement. The left rule is the lit edge of a wavefront. */
.call {
  margin: 1.5rem 0;
  padding: 0.9rem 1.1rem;
  border-left: 3px solid var(--pulse);
  background: rgba(241,76,227,0.06);
  color: var(--ink);
}
.call p:last-child { margin-bottom: 0; }

.back {
  display: inline-block;
  margin-bottom: 2rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  border-bottom: none;
}
.back:hover { color: var(--ink); }

.links { list-style: none; padding: 0; }
.links li { padding: 0.7rem 0; border-bottom: 1px solid var(--rule); }
.links a { font-family: var(--mono); letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.9rem; }
.links span { display: block; color: var(--dim); font-size: 0.9rem; }

.updated {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Tables (the data summary in the privacy policy) must scroll rather than push the
   page sideways on a phone, which is the width every reviewer opens this at. */
.scroll { overflow-x: auto; margin: 0 0 1.25rem; }

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 26rem;
  font-size: 0.92rem;
}
th, td {
  text-align: left;
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
th {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}
