/* legal.css — the privacy policy and the terms of use.

   Two long documents read top to bottom, so this is a reading room, not a
   scene: the deck's palette and type, one column of text at a comfortable
   measure, and a contents list that stays beside it on a wide screen.
   Shared rather than inlined because the two pages are one design and a
   second copy is a copy that drifts. */

:root {
  --void: #04050a;
  --surface: #0b0f1a;
  --edge: rgba(255, 255, 255, 0.09);
  --edge-lift: rgba(255, 255, 255, 0.16);
  --ink: rgba(255, 255, 255, 0.92);
  --ink-body: rgba(226, 231, 240, 0.84);
  --ink-dim: rgba(198, 206, 222, 0.72);
  --atmos: #8fc2e8;
  --ember: #f0a85c;

  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-6: 1.5rem;
  --s-8: 2rem;
  --s-12: 3rem;
  --s-16: 4rem;

  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --ease-cine: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  color-scheme: dark;
  background: var(--void);
  scroll-padding-top: var(--s-8);
  -webkit-text-size-adjust: 100%;
  /* Every control below has its own :active state, so the grey flash
     the browser would add on tap is redundant. */
  -webkit-tap-highlight-color: transparent;
}

a, button { touch-action: manipulation; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--void);
  color: var(--ink-body);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 16.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* The same two pools of light as the project page, fixed so the room
   stays lit while the text scrolls. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(70% 50% at 50% -10%, rgba(143, 194, 232, 0.09), transparent 70%),
    radial-gradient(80% 60% at 50% 110%, rgba(240, 168, 92, 0.05), transparent 70%);
}

a { color: inherit; }
:focus-visible {
  outline: 2px solid var(--atmos);
  outline-offset: 3px;
  border-radius: 4px;
}

.u-visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: var(--s-2) var(--s-4);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}
.skip:focus { top: var(--s-3); }

/* ---------- the bar: the mark, home ---------- */
.bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-6);
  height: 74px;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}

.home {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-2) var(--s-3);
  margin-left: calc(var(--s-3) * -1);
  border-radius: 10px;
  text-decoration: none;
}
.home:hover, .home:focus-visible { background: rgba(255, 255, 255, 0.07); }
.home:active { background: rgba(255, 255, 255, 0.1); }
.home__arrow { display: block; transition: transform 0.35s var(--ease-cine); }
.home:hover .home__arrow { transform: translateX(-4px); }

.mark { position: relative; display: block; }
.mark__img { display: block; height: 46px; width: auto; }
.mark__accent {
  position: absolute;
  inset: 0;
  background-color: var(--ember);
  -webkit-mask: url("/assets/images/brand/logo-accent-240.png") center / 100% 100% no-repeat;
          mask: url("/assets/images/brand/logo-accent-240.png") center / 100% 100% no-repeat;
}

.bar__other {
  font-size: 0.9rem;
  color: var(--ink-dim);
  text-decoration: none;
  padding: var(--s-2) var(--s-3);
  border-radius: 8px;
}
.bar__other:hover { color: var(--ink); background: rgba(255, 255, 255, 0.06); }
.bar__other:active { background: rgba(255, 255, 255, 0.1); }

/* ---------- the page ---------- */
.page {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin-inline: auto;
  padding: var(--s-8) max(var(--gutter), env(safe-area-inset-right)) var(--s-16) max(var(--gutter), env(safe-area-inset-left));
}

.head { max-width: 68ch; margin-bottom: var(--s-12); }

h1 {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 800;
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  color: var(--ink);
}

.updated {
  margin: var(--s-4) 0 0;
  font-size: 0.9rem;
  color: var(--ink-dim);
}

.intro {
  margin: var(--s-6) 0 0;
  font-size: 1.08rem;
  color: var(--ink-body);
}

/* Contents beside the text from 1000px; above it on anything narrower. */
.layout {
  display: grid;
  gap: var(--s-12);
}
@media (min-width: 1000px) {
  .layout { grid-template-columns: 220px minmax(0, 68ch); gap: var(--s-16); }
}

.toc {
  font-size: 0.9rem;
  line-height: 1.5;
}
@media (min-width: 1000px) {
  .toc { position: sticky; top: var(--s-8); align-self: start; }
}
.toc__title {
  margin: 0 0 var(--s-3);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-dim);
}
.toc ol {
  list-style: none;
  margin: 0;
  padding: 0 0 0 var(--s-4);
  border-left: 1px solid var(--edge);
  display: grid;
  gap: var(--s-2);
}
.toc a {
  color: var(--ink-dim);
  text-decoration: none;
}
.toc a:hover { color: var(--ink); }
.toc a:active { color: var(--atmos); }

/* ---------- the text ---------- */
.doc { max-width: 68ch; }

.doc h2 {
  margin: var(--s-12) 0 var(--s-4);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  font-size: 1.45rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.doc > section:first-child h2 { margin-top: 0; }

.doc h3 {
  margin: var(--s-8) 0 var(--s-2);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}

.doc p, .doc ul, .doc dl { margin: 0 0 var(--s-4); }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: var(--s-2); }
.doc li::marker { color: var(--ink-dim); }
.doc strong { color: var(--ink); font-weight: 600; }

.doc a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: rgba(143, 194, 232, 0.55);
  text-underline-offset: 3px;
}
.doc a:hover { text-decoration-color: var(--atmos); }

/* The short version: the one raised surface on the page. */
.summary {
  margin: 0 0 var(--s-4);
  padding: var(--s-6) var(--s-6) var(--s-2);
  border: 1px solid var(--edge);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(18, 24, 38, 0.72), rgba(11, 15, 26, 0.72));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 24px 48px -32px rgba(2, 6, 18, 0.9);
}
.summary h2 { margin-top: 0; font-size: 1.2rem; }

/* One processing activity: what, why, on what basis, for how long. A
   definition list rather than a table so it stays readable on a phone. */
.record {
  margin: 0 0 var(--s-4);
  padding: var(--s-4) 0 0;
  border-top: 1px solid var(--edge);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-1) var(--s-6);
}
@media (min-width: 640px) {
  .record { grid-template-columns: 9.5rem minmax(0, 1fr); }
}
.record dt {
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ink-dim);
  padding-top: 0.15em;
}
.record dd { margin: 0 0 var(--s-3); }

.details {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-1) var(--s-6);
  padding: var(--s-6);
  border: 1px solid var(--edge);
  border-radius: 14px;
  background: rgba(11, 15, 26, 0.6);
}
@media (min-width: 640px) {
  .details { grid-template-columns: 12rem minmax(0, 1fr); }
}
.details dt { font-size: 0.86rem; font-weight: 500; color: var(--ink-dim); padding-top: 0.15em; }
.details dd { margin: 0 0 var(--s-3); color: var(--ink); }

/* A detail only the business can supply. Loud on purpose: it must not
   ship unnoticed, and build.mjs reports every one still on a page. */
.fill {
  padding: 0 0.3em;
  border-radius: 4px;
  background: rgba(240, 168, 92, 0.14);
  color: #f6c98f;
  border-bottom: 1px dashed rgba(240, 168, 92, 0.8);
}

/* ---------- foot ---------- */
.legal-foot {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--edge);
}
.legal-foot__inner {
  max-width: 1180px;
  margin-inline: auto;
  padding: var(--s-6) max(var(--gutter), env(safe-area-inset-right)) max(var(--s-8), env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3) var(--s-8);
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--ink-dim);
}
.legal-foot p { margin: 0; }
.legal-foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-6);
}
.legal-foot a {
  color: var(--ink-dim);
  text-decoration: none;
}
.legal-foot a:hover, .legal-foot a[aria-current="page"] { color: var(--ink); }
.legal-foot a:active { color: var(--atmos); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  html { scroll-behavior: auto; }
}

@media print {
  body::before, .bar, .toc, .legal-foot, .skip { display: none; }
  body { background: #fff; color: #111; font-size: 11pt; }
  h1, .doc h2, .doc h3, .doc strong, .details dd { color: #111; }
  .summary, .details { border-color: #ccc; background: none; box-shadow: none; }
  .layout { display: block; }
}
