/*
 * Shared by index.html, methodology.html and download.html. The colours are the app's own
 * (app/src/index.css): #7B61FF for filled accents, #AD9FFF for accent TEXT on
 * dark, because #7B61FF text on near-black does not reach contrast.
 *
 * System fonts only, on purpose: a web-font request is a third-party request
 * from a page whose whole subject is what we do and do not collect.
 */
:root {
  --bg: #0b0b0f;
  --surface: #15151c;
  --border: #2a2a35;
  --text: #ececf1;
  --muted: #a3a3b2;
  --faint: #767688;
  --accent: #7B61FF;
  --accent-strong: #6a4fe0;
  --accent-text: #AD9FFF;
  --error: #ff8a8a;
  --ok: #8fe3b0;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

header.site { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; }
header.site img { width: 56px; height: auto; }
header.site a { color: var(--text); text-decoration: none; font-weight: 600; font-size: 18px; }

h1 { font-size: 30px; line-height: 1.2; margin: 0 0 12px; letter-spacing: -0.01em; }
h2 { font-size: 20px; line-height: 1.3; margin: 40px 0 8px; }
h3 { font-size: 16px; margin: 24px 0 4px; }
p, ul { margin: 0 0 14px; }
ul { padding-left: 20px; }
li { margin-bottom: 6px; }
a { color: var(--accent-text); }
a:hover { color: #c4b8ff; }
strong { color: #fff; font-weight: 600; }

.lede { font-size: 18px; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.faint { color: var(--faint); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin: 24px 0;
}
.card h2:first-child, .card h3:first-child { margin-top: 0; }

/* Form */
form { display: flex; flex-direction: column; gap: 22px; }
label.field, fieldset { display: flex; flex-direction: column; gap: 8px; border: 0; margin: 0; padding: 0; }
.field-label, legend { font-weight: 600; padding: 0; }
.hint { font-size: 14px; color: var(--muted); margin: -2px 0 2px; }

input[type=email], select {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}
input[type=email]:focus, select:focus, .chips input:focus-visible + span, button:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chips span {
  display: inline-block;
  min-width: 44px;
  text-align: center;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  cursor: pointer;
  user-select: none;
}
.chips input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }

button[type=submit] {
  align-self: flex-start;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 8px;
  padding: 11px 20px;
  cursor: pointer;
}
button[type=submit]:hover { background: var(--accent-strong); }
button[type=submit]:disabled { opacity: 0.5; cursor: default; }

/* Kept out of sight and out of the tab order; a person never fills it. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.status { min-height: 1.6em; margin: 0; }
.status.error { color: var(--error); }
.status.ok { color: var(--ok); }

footer.site { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 14px; color: var(--faint); }

/* methodology */
.toc { font-size: 15px; }
.toc ol { padding-left: 20px; margin: 0; }
.plain-table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 8px 0 16px; }
.plain-table th, .plain-table td { text-align: left; vertical-align: top; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--border); }
.plain-table th { color: var(--muted); font-weight: 600; }
.todo { background: #3a2a00; color: #ffd98a; padding: 0 4px; border-radius: 4px; }

/* download */
a.dl {
  display: inline-block;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: 8px;
  padding: 11px 20px;
  text-decoration: none;
  margin-right: 8px;
}
a.dl:hover { background: var(--accent-strong); color: #fff; }
a.dl:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.card.warn { border-color: #6b5200; }
pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 0 0 14px;
  font-size: 14px;
  overflow-x: auto;
}
pre.hash { white-space: pre-wrap; word-break: break-all; }
