/*
 * The Terms of Service and Privacy Policy pages (public/terms, public/privacy).
 * Plain static pages in the Sticker Book language: the values below are the
 * tokens of src/theme/tokens.ts, copied because these pages load without the
 * app. Change a colour there and change it here.
 */

@font-face {
  font-family: "Gabarito";
  font-weight: 700;
  font-display: swap;
  src: url("/legal/fonts/Gabarito_700Bold.ttf") format("truetype");
}
@font-face {
  font-family: "Gabarito";
  font-weight: 800;
  font-display: swap;
  src: url("/legal/fonts/Gabarito_800ExtraBold.ttf") format("truetype");
}
@font-face {
  font-family: "Figtree";
  font-weight: 500;
  font-display: swap;
  src: url("/legal/fonts/Figtree_500Medium.ttf") format("truetype");
}
@font-face {
  font-family: "Figtree";
  font-weight: 700;
  font-display: swap;
  src: url("/legal/fonts/Figtree_700Bold.ttf") format("truetype");
}

:root {
  color-scheme: light dark;
  --paper: #fbf6ea;
  --surface: #fffefa;
  --ink: #2b1d12;
  --ink-soft: #705c4a;
  --outline: #2b1d12;
  --rule: #d0cdc7;
  --honey: #ffb52e;
  --on-accent: #2b1d12;
  --post-it: #ffe785;
  --coral-soft: #ffd9ce;
  --link: #1d5f97;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1b1510;
    --surface: #2d2219;
    --ink: #fff1d8;
    --ink-soft: #c4af98;
    --outline: #0c0703;
    --rule: #45362a;
    --coral-soft: #6a2f21;
    --link: #8ccbf5;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 500;
  font-size: 17px;
  line-height: 1.6;
  overflow-wrap: break-word;
}

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 20px 56px;
}

/* The frame: quiet, nothing outlined but the buttons. */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.wordmark {
  font-family: "Gabarito", system-ui, sans-serif;
  font-weight: 800;
  font-size: 26px;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 2px solid var(--outline);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 3px 0 var(--outline);
  color: var(--ink);
  font-family: "Gabarito", system-ui, sans-serif;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  transition: transform 80ms ease-out, box-shadow 80ms ease-out;
}
.pill.primary {
  background: var(--honey);
  color: var(--on-accent);
}
.pill:active {
  transform: translateY(3px);
  box-shadow: 0 0 0 var(--outline);
}

h1,
h2,
h3 {
  font-family: "Gabarito", system-ui, sans-serif;
  line-height: 1.15;
  margin: 0;
}
h1 {
  font-weight: 800;
  font-size: 40px;
  letter-spacing: -0.01em;
}
h2 {
  font-weight: 700;
  font-size: 25px;
  margin-top: 44px;
  padding-top: 28px;
  border-top: 2px dashed var(--rule);
}
h3 {
  font-weight: 700;
  font-size: 19px;
  margin-top: 26px;
}

.dated {
  margin: 10px 0 0;
  color: var(--ink-soft);
}

p,
ul,
ol {
  margin: 14px 0 0;
}
ul,
ol {
  padding-left: 22px;
}
li + li {
  margin-top: 8px;
}
strong {
  font-weight: 700;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}
a:focus-visible {
  outline: 3px solid var(--honey);
  outline-offset: 3px;
  border-radius: 6px;
}

/* The one sticker on the page: the short version, stuck on like a note. */
.summary {
  margin-top: 28px;
  padding: 20px 22px 22px;
  border: 2px solid var(--outline);
  border-radius: 22px 22px 22px 4px;
  background: var(--post-it);
  color: var(--on-accent);
  box-shadow: 0 3px 0 var(--outline);
}
.summary h2 {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 20px;
}
.summary p {
  margin-top: 8px;
}
.summary a {
  color: var(--on-accent);
}

.contents {
  margin-top: 28px;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 28px;
}
.contents li {
  margin: 0 0 6px;
  break-inside: avoid;
}

/* A sentence the owner still has to fill in. Meant to be impossible to miss. */
.placeholder {
  padding: 2px 6px;
  border: 1.5px solid var(--outline);
  border-radius: 8px;
  background: var(--coral-soft);
  font-weight: 700;
}

.table-wrap {
  margin-top: 16px;
  overflow-x: auto;
  border: 2px solid var(--outline);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 3px 0 var(--outline);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  line-height: 1.45;
}
th,
td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
}
th {
  font-family: "Gabarito", system-ui, sans-serif;
  font-weight: 700;
}
tbody tr {
  border-top: 2px dashed var(--rule);
}

.bottom {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 2px dashed var(--rule);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.bottom .small {
  flex-basis: 100%;
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }
  .page {
    padding: 16px 18px 48px;
  }
  h1 {
    font-size: 32px;
  }
  h2 {
    font-size: 22px;
  }
  .contents {
    columns: 1;
  }
  /* The table becomes a list of small cards' worth of rows: one company, then what it does and handles. */
  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  tr,
  td {
    display: block;
  }
  tbody tr:first-child {
    border-top: 0;
  }
  tr {
    padding: 12px 16px;
  }
  td {
    padding: 0;
  }
  td + td {
    margin-top: 4px;
  }
  td:first-child {
    font-family: "Gabarito", system-ui, sans-serif;
    font-weight: 700;
    font-size: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pill {
    transition: none;
  }
  .pill:active {
    transform: none;
    box-shadow: 0 3px 0 var(--outline);
    opacity: 0.7;
  }
}

@media print {
  .top .pill,
  .bottom .pill {
    display: none;
  }
}
