/*
 * getheadcount.app — one stylesheet, no framework, no web fonts, no imports.
 *
 * Colours are lifted from src/theme/index.ts so the site and the app match.
 * Two deliberate departures: --accent-text is a lightened accent used for text
 * and links, because #7C5CFF against #0B0B0F lands at 4.45:1 and misses AA for
 * body copy; and --accent-solid is used only for fills and borders, never for
 * text on the dark background.
 */

:root {
  --bg: #0b0b0f;
  --surface: #15151c;
  --surface-raised: #1e1e28;
  --border: #2a2a36;
  --border-strong: #3a3a4a;

  --text: #f5f5f7;
  --text-muted: #9a9aa8;

  --accent-solid: #7c5cff;
  --accent-text: #a48cff;
  --accent-soft: rgba(124, 92, 255, 0.16);
  --streak: #ff8a3d;

  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  --measure: 68ch;
  --page: 1040px;
  --radius: 14px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent-text);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- layout scaffolding ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  padding: 12px 18px;
  background: var(--accent-solid);
  color: #0b0b0f;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  left: 0;
}

.shell {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 24px;
}

.site-header {
  padding: 28px 0 8px;
}

.site-header .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.wordmark {
  display: inline-flex;
  border-radius: 8px;
}

.wordmark img {
  display: block;
  width: 178px;
  height: auto;
}

.site-nav {
  display: flex;
  gap: 22px;
  font-size: 15px;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
}

main {
  display: block;
}

.site-footer {
  margin-top: 96px;
  border-top: 1px solid var(--border);
  padding: 32px 0 56px;
  color: var(--text-muted);
  font-size: 15px;
}

.site-footer .shell {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px 28px;
  flex-wrap: wrap;
}

.site-footer nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* ---------- landing ---------- */

.hero {
  padding: 72px 0 24px;
}

.hero h1 {
  margin: 0;
  /* Held short on purpose so the headline breaks into three or four lines. */
  max-width: 17ch;
  font-size: clamp(2.4rem, 7vw, 3.9rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.hero p {
  margin: 24px 0 0;
  max-width: 46ch;
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.hero .availability {
  margin-top: 32px;
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
}

.section {
  padding: 64px 0 0;
}

.section > h2 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section > .lede {
  margin: 0 0 32px;
  max-width: 56ch;
  color: var(--text-muted);
}

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
}

.card {
  margin: 0;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
}

.steps > li {
  counter-increment: step;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.steps > li::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-solid);
  color: var(--accent-text);
  font-size: 0.95rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.steps h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.steps p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.note {
  margin-top: 40px;
  padding: 24px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--streak);
  border-radius: var(--radius);
  background: var(--surface);
  max-width: var(--measure);
}

.note h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.note p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.note p + p {
  margin-top: 12px;
}

/* ---------- support ---------- */

.page-head {
  padding: 56px 0 8px;
}

.page-head h1 {
  margin: 0;
  font-size: clamp(2rem, 5.5vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.page-head p {
  margin: 20px 0 0;
  max-width: var(--measure);
  color: var(--text-muted);
  font-size: 1.1rem;
}

.contact-card {
  margin: 32px 0 0;
  padding: 28px;
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  max-width: var(--measure);
}

.contact-card h2 {
  margin: 0 0 4px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contact-card .email {
  display: inline-block;
  margin: 4px 0 0;
  font-size: clamp(1.25rem, 4.2vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent-text);
  word-break: break-word;
}

.contact-card p {
  margin: 16px 0 0;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.commitment {
  margin: 24px 0 0;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--streak);
  border-radius: var(--radius);
  background: var(--surface);
  max-width: var(--measure);
  color: var(--text);
  font-size: 0.98rem;
}

.commitment strong {
  color: var(--streak);
}

/* ---------- 404 ---------- */

.notfound {
  padding: 96px 0 24px;
  max-width: var(--measure);
}

.notfound h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.notfound p {
  margin: 20px 0 0;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.notfound ul {
  margin: 24px 0 0;
  padding: 0 0 0 20px;
  color: var(--text-muted);
}

.notfound li + li {
  margin-top: 6px;
}

/* ---------- rendered markdown ---------- */

.prose {
  padding: 48px 0 0;
  max-width: var(--measure);
}

.prose > *:first-child {
  margin-top: 0;
}

.prose h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 5.5vw, 2.9rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.prose h2 {
  margin: 56px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 1.5rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.prose h3 {
  margin: 36px 0 10px;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.prose h4 {
  margin: 28px 0 8px;
  font-size: 1rem;
}

.prose p,
.prose li {
  color: #dededf;
}

.prose p {
  margin: 0 0 18px;
}

.prose ul,
.prose ol {
  margin: 0 0 18px;
  padding-left: 24px;
}

.prose li {
  margin-bottom: 8px;
}

.prose li::marker {
  color: var(--text-muted);
}

.prose strong {
  color: var(--text);
  font-weight: 700;
}

.prose hr {
  margin: 48px 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.prose blockquote {
  margin: 24px 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--accent-solid);
  color: var(--text-muted);
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.88em;
  word-break: break-word;
}

.prose pre {
  margin: 0 0 18px;
  padding: 16px 18px;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.prose pre code {
  padding: 0;
  border: 0;
  background: none;
}

/*
 * The provider and legal-basis tables in the privacy policy are three columns of
 * prose. Rather than crushing them on a phone, the build wraps every table in a
 * scroll container — tabindex="0" on it so the scroll region is reachable by
 * keyboard, which is why it also carries a role and a label.
 */
.table-scroll {
  margin: 0 0 18px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.table-scroll:focus-visible {
  outline-offset: -3px;
}

.prose table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.prose th,
.prose td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.prose thead th {
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
}

.prose tbody td {
  color: #dededf;
}

.prose tbody tr:last-child td {
  border-bottom: 0;
}

/* ---------- print ---------- */

@media print {
  :root {
    --bg: #fff;
    --text: #000;
    --text-muted: #333;
    --border: #bbb;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .site-nav,
  .site-footer nav,
  .skip-link {
    display: none;
  }

  .prose p,
  .prose li,
  .prose tbody td {
    color: #000;
  }

  .prose a {
    color: #000;
  }

  .prose h2 {
    break-after: avoid;
  }

  .table-scroll {
    overflow: visible;
  }
}
