/* Legal pages (/privacy, /refunds).
 *
 * Deliberately plain and self-contained. These are static files in public/, so
 * they are copied verbatim by the build and never touch the app bundle — nothing
 * here can affect the map, checkout or app state.
 *
 * FIRST PASS. Width, type scale and spacing are all set by the handful of
 * variables directly below so they can be tuned in one place without reading the
 * rest of the file.
 */

:root {
  --ink: #ffffff;
  --page: #000000;
  --muted: #9a9a9a;        /* effective date, table headers */
  --rule: #5c5c5c;         /* same stroke colour the app frame uses */

  --measure: 680px;        /* content column width */
  --frame-inset: 12px;     /* matches the app frame */
  --logo-pad: 24px;        /* matches .top-bar__logo padding */

  --size-body: 17px;
  --size-h1: 40px;
  --size-h2: 20px;
  --size-small: 14px;
  --leading: 1.6;
}

@font-face {
  font-family: 'Increments';
  src: url('/fonts/IIIncrementsSans-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Increments';
  src: url('/fonts/IIIncrementsSans-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: 'Increments', sans-serif;
  font-size: var(--size-body);
  line-height: var(--leading);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Wordmark, in the position it occupies in the app: the frame inset plus the
   top bar's own padding. Same face, weight and tracking as .brand. */
.legal-header {
  padding: calc(var(--frame-inset) + 18px) calc(var(--frame-inset) + var(--logo-pad));
}

.brand {
  font: 700 16px/1 'Increments', sans-serif;
  letter-spacing: -0.25px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  display: inline-block;
}

.brand__tm {
  font-size: 0.7em;
  display: inline-block;
  transform: translateY(-0.25em);
}

/* The column is centred on the page; the text inside it stays left-aligned
   (ragged right), never justified. The wordmark above is deliberately NOT
   centred — it stays where it sits in the app, top-left.
   `--measure` sets the column width. */
main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 24px calc(var(--frame-inset) + var(--logo-pad)) 120px;
}

h1 {
  font-size: var(--size-h1);
  line-height: 1.1;
  letter-spacing: -0.5px;
  font-weight: 700;
  margin: 0 0 8px;
}

h2 {
  font-size: var(--size-h2);
  line-height: 1.25;
  letter-spacing: -0.2px;
  font-weight: 700;
  margin: 48px 0 12px;
}

p, li { margin: 0 0 16px; }

ul { padding-left: 20px; margin: 0 0 16px; }

li { margin-bottom: 8px; }

strong { font-weight: 700; }

a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 40px 0;
}

.effective {
  color: var(--muted);
  font-size: var(--size-small);
  margin: 0 0 40px;
}

.lede { margin-bottom: 24px; }

/* The privacy policy's browser-storage table. Scrolls inside itself on a phone
   rather than making the page scroll sideways. */
.table-wrap { overflow-x: auto; margin: 0 0 16px; }

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 460px;
  font-size: var(--size-small);
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--rule);
}

th { color: var(--muted); font-weight: 400; }

.back {
  display: inline-block;
  margin-top: 56px;
  font-size: var(--size-small);
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 640px) {
  :root {
    --size-h1: 30px;
    --size-h2: 18px;
    --size-body: 16px;
  }
  main { padding-bottom: 72px; }
  h2 { margin-top: 36px; }
  hr { margin: 32px 0; }
}
