/*
 * Static pages served alongside the app at nucleartoolkit.com.
 *
 * Tokens mirror data/theme.ts so the site and the app read as one product.
 * Deliberately single-theme: the app is dark-only (control-room instrumentation),
 * so these pages commit to the same ground rather than following the OS.
 * Every colour is stated explicitly — nothing is inherited from the browser.
 */

:root {
  --bg1:  #080b14;   /* page ground   (C.bg1)  */
  --bg2:  #11151f;   /* panel surface (C.bg2)  */
  --bg3:  #222a3a;   /* hairline      (C.bg3)  */
  --t0:   #eef1f8;   /* headings      (C.t0)   */
  --t1:   #c4cbdc;   /* body          (C.t1)   */
  --t2:   #7c8698;   /* secondary     (C.t2)   */
  --t3:   #545e6e;   /* tertiary      (C.t3)   */
  --blue: #5aa2f7;   /* links, accent (C.blue) */
  --navy: #2f63d6;   /* solid action  (C.navy) */
  --amber:#e0901c;   /* live readout  (C.amber)*/

  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas,
          "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;

  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg1);
  color: var(--t1);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ── Header ─────────────────────────────────────────────────────────────── */

.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  background: rgba(8, 11, 20, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bg3);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--t0);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.2px;
  text-decoration: none;
}

.wordmark .glyph {
  font-family: var(--mono);
  color: var(--blue);
  font-size: 17px;
}

.bar a.back {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--t2);
  text-decoration: none;
  white-space: nowrap;
}

.bar a.back:hover { color: var(--blue); }

/* ── Layout ─────────────────────────────────────────────────────────────── */

main {
  max-width: 68ch;
  margin: 0 auto;
  padding: 48px 22px 96px;
}

h1 {
  color: var(--t0);
  font-size: clamp(26px, 5vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.4px;
  margin: 0;
  text-wrap: balance;
}

.effective {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--t3);
  margin: 8px 0 0;
}

h2 {
  color: var(--t0);
  font-size: 17px;
  letter-spacing: 0.1px;
  margin: 40px 0 10px;
  padding-top: 20px;
  border-top: 1px solid var(--bg3);
  text-wrap: balance;
}

/* The Terms are a numbered instrument in the app; the numbers are real, so
   they are set as an index rather than decoration. The privacy policy has no
   numbering in the source and gets none here. */
h2 .idx {
  font-family: var(--mono);
  color: var(--blue);
  font-size: 13px;
  margin-right: 8px;
}

p { margin: 0 0 14px; }

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

li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 7px;
}

li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.72em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--bg3);
}

a { color: var(--blue); }
a:hover { color: #7fb8ff; }

code, .mono {
  font-family: var(--mono);
  font-size: 0.92em;
  color: var(--t0);
  background: var(--bg2);
  border: 1px solid var(--bg3);
  border-radius: 5px;
  padding: 1px 6px;
}

strong { color: var(--t0); font-weight: 600; }

/* ── Components ─────────────────────────────────────────────────────────── */

.lede {
  color: var(--t1);
  font-size: 17px;
  margin-top: 22px;
}

.panel {
  background: var(--bg2);
  border: 1px solid var(--bg3);
  border-radius: 12px;
  padding: 20px 22px;
  margin: 24px 0;
}

.panel h2 {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  font-size: 15px;
}

.panel p:last-child, .panel ul:last-child { margin-bottom: 0; }

/* Advisory callout — amber left rule, matching the app's assumption banners. */
.note {
  background: rgba(224, 144, 28, 0.06);
  border-left: 3px solid rgba(224, 144, 28, 0.30);
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  margin: 24px 0;
  font-size: 14.5px;
  color: var(--t1);
}

.note strong { color: var(--amber); }

.btn {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: 0.2px;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 10px;
  margin-top: 4px;
}

.btn:hover { background: #3a72e8; color: #fff; }

/* Definition rows — label in mono, value in prose. */
.rows { display: grid; gap: 12px; margin: 0; }

.row {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 4px 16px;
  align-items: baseline;
}

.row dt {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--t2);
  letter-spacing: 0.3px;
}

.row dd { margin: 0; color: var(--t1); }

@media (max-width: 34rem) {
  .row { grid-template-columns: 1fr; }
}

footer {
  border-top: 1px solid var(--bg3);
  margin-top: 56px;
  padding-top: 22px;
  font-size: 13px;
  color: var(--t3);
}

footer a { color: var(--t2); text-decoration: none; }
footer a:hover { color: var(--blue); }

footer .links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 12px;
  font-family: var(--mono);
  font-size: 12px;
}

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

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
