/* Schibsted Grotesk (SIL Open Font License, schibsted-grotesk-OFL.txt), served from here so
   no font service sees visitors. Latin only, every weight in one file. */
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/schibsted-grotesk.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --bg: #121116;
  --card: #1b1a21;
  --card-hover: #24222b;
  --text: #ecebf0;
  --muted: #9a97a3;
  --accent: #6a52c9;
  --accent-hover: #5b44b0;
  --accent-text: #b4a4f2;
  --on-accent: #fff;
  --line: #2c2a33;
  --radius: 6px;
  --wide: 1160px;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f6f2;
    --card: #ffffff;
    --card-hover: #eeece6;
    --text: #18171c;
    --muted: #5d5a63;
    --accent-text: #5b44b0;
    --line: #dcd9d1;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-text); text-underline-offset: 0.18em; }
h1, h2, h3 { letter-spacing: -0.015em; }

.moved {
  background: var(--accent);
  color: var(--on-accent);
  padding: 12px 16px;
  text-align: center;
}
.moved a { color: inherit; font-weight: 600; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 18px 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
}
.top-links { display: flex; align-items: center; gap: 24px; font-size: 0.95rem; }
.top-links > a:not(.button) { color: var(--muted); text-decoration: none; }
.top-links > a:not(.button):hover { color: var(--text); }

.button {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  background: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 11px 18px;
  text-align: left;
  line-height: 1.3;
}
.button:hover { background: var(--accent-hover); }
.button strong { font-size: 1rem; font-weight: 600; }
.button span { font-size: 0.82rem; opacity: 0.8; }
.button.small { padding: 7px 13px; font-weight: 600; font-size: 0.92rem; }
.button.secondary { background: transparent; color: var(--text); border-color: var(--line); }
.button.secondary:hover { background: var(--card-hover); }

.hero {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 64px 24px 48px;
}
.hero h1 {
  font-size: clamp(2.6rem, 7.5vw, 5.2rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 0 0 18px;
}
.lead { color: var(--muted); font-size: 1.2rem; margin: 0 0 28px; max-width: 40ch; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* The computer's picture across the page, the phone's over its bottom right corner. */
.shots {
  position: relative;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 24px 56px;
}
.shots img { display: block; height: auto; border: 1px solid var(--line); }
.shot-desktop { width: 100%; border-radius: var(--radius); }
.shot-phone {
  position: absolute;
  right: 56px;
  bottom: 0;
  width: 19%;
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

main { max-width: var(--wide); margin: 0 auto; padding: 0 24px; }

/* Each section: its title on the left, the rest beside it (one column on phones). */
.features, .honest, .download {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
  gap: 16px 40px;
  border-top: 1px solid var(--text);
  padding: 20px 0 72px;
}
.features > h2, .honest > h2, .download > h2 { font-size: 1.05rem; font-weight: 700; margin: 0; }

.feature-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}
.feature-list h3 { font-size: 1.05rem; font-weight: 600; margin: 0 0 4px; }
.feature-list p { margin: 0; color: var(--muted); }

.honest p { margin: 0; font-size: 1.35rem; line-height: 1.4; max-width: 36ch; }

.download-body { max-width: 640px; }
.download-body > :first-child { margin-top: 0; }
.download h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 28px 0 6px;
}
.download ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.download ul > li { border-bottom: 1px solid var(--line); }
.download ul > li > a, .download li.soon {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  padding: 11px 2px;
}
.download ul > li > a:hover { color: var(--accent-text); }
.download li small { color: var(--muted); font-size: 0.9rem; text-align: right; }
.download li.soon { color: var(--muted); }
.note { color: var(--muted); font-size: 0.93rem; }

.tester { scroll-margin-top: 16px; margin-top: 40px; }
.steps { color: var(--muted); padding-left: 1.3em; }
.steps li { margin: 4px 0; }
.tester-form { display: flex; flex-direction: column; gap: 12px; margin: 20px 0; }
.tester-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 0.95rem; }
.tester-form small { color: var(--muted); font-weight: 400; }
.tester-form input, .tester-form textarea {
  font: inherit;
  font-weight: 400;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 11px;
  width: 100%;
}
.tester-form textarea { resize: vertical; }
.tester-form input:focus, .tester-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.tester-form .trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.tester-send { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tester-send .button { cursor: pointer; font: inherit; font-weight: 600; font-size: 0.92rem; }
.tester-send .button:disabled { opacity: 0.6; cursor: default; }
.form-status { margin: 0; color: var(--muted); font-size: 0.93rem; }
.tester-done { border-left: 3px solid var(--accent); padding: 4px 0 4px 14px; }

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 20px 24px 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
footer a { color: var(--muted); }
footer span { margin-left: auto; }
/* The docs' footer spans the docs' wider grid. */
.docs-page footer { max-width: 1280px; margin-top: 80px; }

@media (max-width: 900px) {
  .features, .honest, .download { grid-template-columns: minmax(0, 1fr); }
  .feature-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .top { padding: 14px 16px; }
  .top-links > a:not(.button) { display: none; }
  .hero { padding: 40px 16px 32px; }
  .actions .button { width: 100%; }
  .shots { padding: 0 16px 40px; }
  /* The computer's picture is unreadable this small: the phone's alone. */
  .shots .shot-desktop { display: none; }
  .shot-phone { position: static; width: 72%; margin: 0 auto; }
  main { padding: 0 16px; }
  .feature-list { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .honest p { font-size: 1.2rem; }
  footer { padding: 20px 16px 40px; }
  footer span { margin-left: 0; }
}

/* ---- The bot API docs (/developers/docs/, website/src/developers) ---- */
.brand-sub { color: var(--muted); font-weight: 500; }
.docs-page .top { max-width: 1280px; }
.docs {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 200px;
  gap: 40px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 16px 0;
  align-items: start;
}
.docs-nav, .docs-toc { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
.docs-nav summary { display: none; }
.docs-nav nav, .docs-toc { display: flex; flex-direction: column; gap: 2px; }
.docs-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: var(--radius);
  font-size: 0.95rem;
}
.docs-nav a:hover { color: var(--text); background: var(--card-hover); }
.docs-nav a[aria-current="page"] { color: var(--text); background: var(--card); border: 1px solid var(--line); font-weight: 600; }
.docs-toc strong {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 6px;
}
.docs-toc a { color: var(--muted); text-decoration: none; font-size: 0.88rem; padding: 3px 0; }
.docs-toc a:hover { color: var(--text); }

/* Not the home page's `main` (centred, 1080px): a grid column here. */
.docs-main { min-width: 0; max-width: none; margin: 0; padding: 0; }
.docs-content { font-size: 1rem; }
.docs-content h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); line-height: 1.2; margin: 8px 0 20px; }
.docs-content h2 { font-size: 1.45rem; margin: 44px 0 12px; padding-top: 4px; scroll-margin-top: 16px; }
.docs-content h3 { font-size: 1.1rem; margin: 28px 0 8px; scroll-margin-top: 16px; }
.docs-content .lead-in { font-size: 1.1rem; color: var(--muted); }
.docs-content li { margin: 4px 0; }
.docs-content code {
  font: 0.88em/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
  overflow-wrap: anywhere;
}
.docs-content pre {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  overflow-x: auto;
  line-height: 1.5;
}
.docs-content pre code { background: none; border: 0; padding: 0; font-size: 0.86rem; overflow-wrap: normal; white-space: pre; }
.docs-content .table { overflow-x: auto; margin: 12px 0; border: 1px solid var(--line); border-radius: var(--radius); }
.docs-content table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
.docs-content th, .docs-content td { text-align: left; vertical-align: top; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.docs-content tr:last-child td { border-bottom: 0; }
.docs-content th { background: var(--card); font-weight: 600; }
.docs-content table.endpoints td:first-child { min-width: 300px; }
.docs-content table.endpoints td:first-child code { background: none; border: 0; padding: 0; overflow-wrap: anywhere; }
.method {
  display: inline-block;
  min-width: 54px;
  text-align: center;
  font: 700 0.72rem/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  border-radius: 5px;
  padding: 1px 6px;
  margin-right: 4px;
  color: #fff;
}
.method.get { background: #2f7d4f; }
.method.post { background: #2f63b5; }
.method.put { background: #8a5a12; }
.method.patch { background: #6a52c9; }
.method.delete { background: #b03a3a; }
.callout {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  background: var(--card);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin: 16px 0;
}
.callout.warning { border-left-color: #d9822b; }
.callout strong { display: block; margin-bottom: 2px; }
.docs-pager { display: flex; justify-content: space-between; gap: 12px; margin: 48px 0 0; }
.docs-pager a {
  display: flex;
  flex-direction: column;
  flex: 1;
  max-width: 48%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--text);
  text-decoration: none;
}
.docs-pager a:hover { background: var(--card-hover); }
.docs-pager .next { text-align: right; margin-left: auto; }
.docs-pager small { color: var(--muted); font-size: 0.8rem; }

@media (max-width: 1100px) {
  .docs { grid-template-columns: 200px minmax(0, 1fr); }
  .docs-toc { display: none; }
}
@media (max-width: 860px) {
  .docs { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .docs-nav { position: static; max-height: none; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); margin-bottom: 8px; }
  .docs-nav summary { display: list-item; padding: 10px 14px; cursor: pointer; font-weight: 600; }
  .docs-nav nav { padding: 0 6px 8px; }
  .docs-nav a[aria-current="page"] { background: var(--card-hover); border-color: transparent; }
  .docs-content table.endpoints td:first-child { min-width: 220px; }
}
/* On a phone, each endpoint is a card: the path, then what it needs, then the notes. */
@media (max-width: 600px) {
  .docs-content table.endpoints, .docs-content table.endpoints tbody,
  .docs-content table.endpoints tr, .docs-content table.endpoints td { display: block; }
  .docs-content table.endpoints tr:first-child { display: none; }
  .docs-content table.endpoints tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .docs-content table.endpoints tr:last-child { border-bottom: 0; }
  .docs-content table.endpoints td { border-bottom: 0; padding: 2px 12px; }
  .docs-content table.endpoints td:first-child { min-width: 0; padding-bottom: 4px; }
  .docs-content table.endpoints td:empty { display: none; }
  .docs-content table.endpoints:not(.plain) td:nth-child(2)::before { content: "Needs: "; color: var(--muted); }
}

/* ---- Policies (/privacy/, /terms/, /delete-account/, website/src/legal) ---- */
/* One readable column; the docs' text styles (.docs-content). */
main.legal { max-width: 760px; margin: 0 auto; padding: 8px 16px 64px; }
.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  border-top: 1px solid var(--line);
  margin-top: 48px;
  padding-top: 16px;
}
.legal-links a { color: var(--muted); }
.legal-links a[aria-current="page"] { color: var(--text); font-weight: 600; }
