/* One stylesheet for every page. Brand colour is the logo's purple (#A800BC). Every text colour
   pair here passes WCAG AA contrast in both light and dark mode. The stylesheet loads nothing
   else: the Content-Security-Policy and a test forbid it from pulling in images or fonts. */
:root {
  --bg: #fbf9fc;
  --surface: #ffffff;
  --text: #1a1620;
  --muted: #544d5c;
  --line: #ddd6e3;
  --primary: #a800bc;
  --primary-text: #ffffff;
  --tint: #f5e8f8;
  --danger: #b3261e;
  --danger-bg: #fdecea;
  --ok-bg: #e8f5ec;
  --focus: #1a73e8;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #130f16;
    --surface: #1d1822;
    --text: #eee9f2;
    --muted: #b7aec2;
    --line: #3a3243;
    --primary: #e08ceb;
    --primary-text: #1b0420;
    --tint: #2a1d30;
    --danger: #ff8a80;
    --danger-bg: #3a1e1c;
    --ok-bg: #17301f;
    --focus: #8ab4f8;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 4.5rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
.page {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
}
.wide { max-width: 64rem; }

/* ---- header and footer, the same on every page ---- */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: var(--primary-text);
  padding: 0.6rem 1rem;
  z-index: 10;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-header-inner {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.logo { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: 0.02em; font-size: 1.15rem; }
.logo img { width: 2rem; height: 2rem; background: #fff; border: 1px solid var(--line); border-radius: 0.5rem; padding: 0.2rem; display: block; }
.main-nav { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.main-nav a { color: var(--text); text-decoration: none; font-weight: 600; padding: 0.4rem 0; border-bottom: 2px solid transparent; }
.main-nav a:hover { border-bottom-color: var(--primary); }
.main-nav a[aria-current="page"] { border-bottom-color: var(--primary); }
.site-footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 2rem; }
.site-footer-inner { max-width: 64rem; margin: 0 auto; padding: 1.4rem 1rem 2rem; }
.footer-links { display: flex; gap: 1.2rem; flex-wrap: wrap; margin: 0 0 0.8rem; padding: 0; list-style: none; }
.footer-links li { margin: 0; }
.site-footer p { margin: 0.3rem 0; }

/* ---- text ---- */
h1 { font-size: 1.9rem; line-height: 1.25; margin: 0 0 1rem; }
h2 { font-size: 1.3rem; margin: 2.2rem 0 0.6rem; }
h3 { font-size: 1.05rem; margin: 1.2rem 0 0.3rem; }
p, ul, ol { margin: 0.6rem 0; }
ul, ol { padding-left: 1.4rem; }
li { margin: 0.3rem 0; }
a { color: var(--primary); }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.lead { font-size: 1.1rem; color: var(--muted); }
.small { font-size: 0.9rem; color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

/* ---- home page ---- */
.hero { background: var(--tint); border-bottom: 1px solid var(--line); }
.hero-inner {
  max-width: 64rem;
  margin: 0 auto;
  padding: 2.6rem 1rem 3rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
}
.hero h1 { font-size: 2.5rem; line-height: 1.15; }
.hero-mark { width: 11rem; height: 11rem; background: #fff; border: 1px solid var(--line); border-radius: 1.6rem; padding: 1.2rem; }
.hero-mark img { width: 100%; height: 100%; display: block; }
@media (max-width: 40rem) {
  .hero-inner { grid-template-columns: 1fr; padding: 1.8rem 1rem 2.2rem; }
  .hero h1 { font-size: 2rem; }
  .hero-mark { display: none; }
}
.badges { display: flex; gap: 0.8rem; flex-wrap: wrap; margin: 1.4rem 0 0.4rem; }
.badge {
  display: inline-flex;
  flex-direction: column;
  min-width: 11rem;
  padding: 0.6rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
}
.badge span:first-child { font-size: 0.78rem; color: var(--muted); }
.badge strong { font-size: 1.05rem; }
.badge[aria-disabled="true"] { opacity: 0.85; border-style: dashed; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; margin: 1.2rem 0; }
.grid .card { margin: 0; }
.steps { counter-reset: step; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1rem; margin: 0; }
.steps li::before {
  content: counter(step);
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-text);
  font-weight: 800;
  margin-bottom: 0.4rem;
}
.pill-list { display: flex; gap: 0.5rem; flex-wrap: wrap; padding: 0; list-style: none; }
.pill-list li { margin: 0; padding: 0.3rem 0.8rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }

/* ---- boxes and notices ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.1rem 1.1rem 1.2rem;
  margin: 1rem 0;
}
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.notice {
  border-radius: 10px;
  padding: 0.8rem 1rem;
  margin: 1rem 0;
  background: var(--ok-bg);
}
.notice.bad { background: var(--danger-bg); }
.notice strong { display: block; }
.flag {
  border: 1px dashed var(--danger);
  border-radius: 10px;
  padding: 0.8rem 1rem;
  margin: 1rem 0;
  background: var(--danger-bg);
}
.flag strong { display: block; }

/* ---- forms (the account-deletion page) ---- */
label { display: block; font-weight: 600; margin: 0.9rem 0 0.3rem; }
input[type="email"], input[type="password"], input[type="text"] {
  width: 100%;
  font: inherit;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
}
.check { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 400; margin: 1rem 0; }
.check input { margin-top: 0.35rem; width: 1.1rem; height: 1.1rem; }
.row { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1rem; }
button, .button {
  font: inherit;
  font-weight: 700;
  padding: 0.75rem 1.2rem;
  border-radius: 10px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: var(--primary-text);
  cursor: pointer;
  min-height: 2.75rem;
  text-decoration: none;
  display: inline-block;
}
button.secondary { background: transparent; color: var(--primary); }
button.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
button:disabled { opacity: 0.55; cursor: not-allowed; }
details { margin: 0.6rem 0; }
summary { cursor: pointer; font-weight: 600; }
details[open] > summary { margin-bottom: 0.3rem; }

/* ---- tables and page lists ---- */
nav[aria-label="On this page"] ul { columns: 2; column-gap: 1.5rem; }
nav[aria-label="On this page"] li { break-inside: avoid; }
@media (max-width: 34rem) { nav[aria-label="On this page"] ul { columns: 1; } }
.page-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; margin: 0.8rem 0 1.2rem; }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; background: var(--surface); }
th, td { text-align: left; vertical-align: top; padding: 0.55rem 0.7rem; border: 1px solid var(--line); }
th { background: var(--bg); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
@media (max-width: 40rem) {
  .table-wrap { overflow: visible; }
  table, tbody, tr, td { display: block; }
  thead { position: absolute; left: -9999px; }
  tr { border: 1px solid var(--line); border-radius: 10px; margin: 0 0 0.8rem; padding: 0.4rem 0.8rem; background: var(--surface); }
  td { border: 0; padding: 0.3rem 0; }
  td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--muted);
  }
}
