/* KADU site: the Privacy, Terms, Support and 404 pages (the home page has its own home.css).
   Colours from the app (src/constants/theme.ts); fonts are the app's own OFL files, self-hosted. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/BricolageGrotesque_800ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("/fonts/Geist_400Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("/fonts/Geist_600SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/GeistMono_500Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #fbf8f3;
  --canvas: #f3eee6;
  --card: #ffffff;
  --line: #eae4da;
  --edge: #e2dacd;
  --edge-dark: #d6ccbc;
  --dash: #d8d0c4;
  --ink: #141414;
  --ink-soft: #5e5a55;
  --ink-muted: #6b655e;
  --violet: #9d7cff;
  --violet-edge: #6f4fd8;
  --violet-ink: #4b33a8;
  --violet-tint: #ece4ff;
  --violet-tint-edge: #b7a0f5;
  --butter: #fff1b8;
  --butter-edge: #dcc46c;
  --butter-ink: #6b4e00;
  --mint: #d8f4e2;
  --mint-edge: #8fcda9;
  --pink: #ffdbe7;
  --pink-edge: #e79bb6;
  --food: #ff7a1a;
  --food-back: #ffd3b0;
  --food-dark: #c2551c;
  --around: #2f8cff;
  --around-back: #c6deff;
  --around-dark: #1f64c4;
  --home: #22c55e;
  --home-back: #bfebd0;
  --home-dark: #15924a;
  --fun: #ff6fa5;
  --fun-back: #ffcfe0;
  --fun-dark: #d94a82;
  --display: "Bricolage Grotesque", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  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: var(--body);
  font-size: 17px;
  line-height: 1.6;
}

.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 800;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.03em;
}
.brand img {
  display: block;
  width: 26px;
  height: 34px;
  transform: rotate(-6deg);
}
.site-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 8px 12px;
  border-radius: 13px;
}
.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
  background: var(--canvas);
}
.site-nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--card);
  box-shadow: 0 0 0 1px var(--line), 0 3px 0 var(--edge);
}

/* Type */
/* main is also .wrap, whose side padding must stay: only top and bottom are set here. */
main {
  padding-top: 32px;
  padding-bottom: 48px;
}
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.1;
  margin: 0;
}
h1 {
  font-size: 34px;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
h2 {
  font-size: 23px;
  letter-spacing: -0.02em;
  margin: 40px 0 10px;
}
h3 {
  font-size: 18px;
  letter-spacing: -0.01em;
  margin: 24px 0 6px;
}
p,
ul,
ol {
  margin: 0 0 14px;
}
ul,
ol {
  padding-left: 22px;
}
li {
  margin-bottom: 6px;
}
a {
  color: var(--violet-ink);
  text-underline-offset: 2px;
}
a:hover {
  color: var(--ink);
}
strong {
  font-weight: 600;
}
code,
.mono {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--canvas);
  border-radius: 6px;
  padding: 1px 5px;
}
.meta {
  color: var(--ink-muted);
  font-size: 15px;
  margin-bottom: 24px;
}
.lead {
  font-size: 19px;
  color: var(--ink-soft);
}

/* Table of contents */
.toc {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 4px 0 var(--edge);
  padding: 14px 18px;
  margin: 0 0 12px;
  font-size: 15px;
}
.toc p {
  margin: 0 0 6px;
  font-weight: 600;
}
.toc ol {
  margin: 0;
  columns: 2;
  column-gap: 24px;
}
.toc li {
  margin-bottom: 2px;
  break-inside: avoid;
}
@media (max-width: 480px) {
  .toc ol {
    columns: 1;
  }
}

/* Boxes */
.box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 4px 0 var(--edge);
  padding: 16px 18px;
  margin: 0 0 20px;
}
.box > :last-child {
  margin-bottom: 0;
}
.box.violet {
  background: var(--violet-tint);
  border-color: var(--violet-tint-edge);
  box-shadow: 0 4px 0 var(--violet-tint-edge);
}
.box.butter {
  background: var(--butter);
  border-color: var(--butter-edge);
  box-shadow: 0 4px 0 var(--butter-edge);
}
.box.mint {
  background: var(--mint);
  border-color: var(--mint-edge);
  box-shadow: 0 4px 0 var(--mint-edge);
}

/* Tables become stacked cards on phones */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 15px;
  margin: 0 0 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.table th,
.table td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}
.table thead th {
  border-top: 0;
  background: var(--canvas);
  font-weight: 600;
}
@media (max-width: 560px) {
  .table thead {
    display: none;
  }
  .table,
  .table tbody,
  .table tr,
  .table td {
    display: block;
    width: 100%;
  }
  .table tr {
    border-top: 1px solid var(--line);
    padding: 6px 0;
  }
  .table tr:first-child {
    border-top: 0;
  }
  .table td {
    border-top: 0;
    padding: 4px 14px;
  }
  .table td:first-child {
    font-weight: 600;
  }
}

/* Numbered steps */
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 40px;
  min-height: 28px;
  margin-bottom: 10px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--butter);
  box-shadow: 0 0 0 1px var(--butter-edge), 0 2px 0 var(--butter-edge);
  color: var(--butter-ink);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 28px;
  text-align: center;
}

/* The 404 page */
.hero {
  text-align: center;
  padding: 8px 0 8px;
}
.hero-art {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  margin: 0 auto;
}
.hero h1 {
  font-size: 44px;
  margin: 18px 0 10px;
}
.hero .lead {
  max-width: 30em;
  margin: 0 auto 18px;
}
/* The amount drawn inside the 404 receipt */
.r-amt {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 15px;
  fill: var(--ink);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: 14px;
  padding: 20px 0 36px;
}
.site-footer p {
  margin: 0 0 6px;
}
.site-footer a {
  color: var(--ink-muted);
}

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