/*
 * CIVCNCT / Bürgerpilot static sites.
 * The CSP allows styles only from this file: no style attributes, no <style> elements.
 * Colour tokens: platform/docs/brand/05-identity.md §5 (all pairs WCAG 2.2 AA).
 * Fonts: system stack only. No web fonts, no third-party requests.
 */

:root {
  color-scheme: light dark;
  --ink: #0f172a;
  --muted: #475569;
  --teal: #0b6b63;
  --indigo: #4f46e5;
  --page: #f7f8fb;
  --surface: #ffffff;
  --surface2: #eef1f6;
  --line: #dde3ec;
  --line-strong: #748197;
  --teal-soft: #e0f1ee;
  --indigo-soft: #eef0ff;
  --on-teal: #ffffff;
  --warn: #8a5300;
  --warn-soft: #fbefd9;
  --shadow: rgb(15 23 42 / 0.12);
  --todo-bg: #fff3c4;
  --todo-ink: #5c3b00;
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f1f5f9;
    --muted: #a3b0c2;
    --teal: #5ccfc1;
    --indigo: #a5b4fc;
    --page: #0b1020;
    --surface: #131b2e;
    --surface2: #182238;
    --line: #243049;
    --line-strong: #6b7a96;
    --teal-soft: #12302f;
    --indigo-soft: #1f2350;
    --on-teal: #04201d;
    --warn: #f2b54d;
    --warn-soft: #2f2412;
    --shadow: rgb(0 0 0 / 0.35);
    --todo-bg: #3d2f00;
    --todo-ink: #ffe08a;
  }
}

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

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
}

.wrap {
  width: 100%;
  max-width: 48rem;
  margin: 0 auto;
  padding: 0 1rem;
}

a {
  color: var(--indigo);
  font-weight: 600;
  text-decoration: none;
}

/* A decorative chevron distinguishes links inside prose without changing their accessible name. */
:where(p, dd, dt, figcaption, li) > a:where(:not([class]))::after {
  content: "";
  display: inline-block;
  width: 0.4em;
  height: 0.4em;
  margin-inline: 0.16em 0.12em;
  border-block-start: 1.5px solid currentColor;
  border-inline-end: 1.5px solid currentColor;
  transform: translateY(-0.08em) rotate(45deg);
}

:where(p, dd, dt, figcaption, li) > a:where(:not([class])):hover {
  background: var(--indigo-soft);
}

:where(nav, .picker) li > a::after {
  content: none;
}

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

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
  hyphens: auto;
}

h1 {
  font-size: clamp(1.9rem, 7vw, 2.9rem);
  font-weight: 800;
  margin: 0.4rem 0 1rem;
}

h2 {
  font-size: 1.4rem;
  font-weight: 750;
  margin: 2.5rem 0 0.75rem;
}

h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
}

p,
ul,
dl {
  margin: 0 0 1rem;
}

/* Skip link: visible only on keyboard focus. */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--surface);
  color: var(--ink);
  padding: 0.5rem 1rem;
  border: 2px solid var(--indigo);
  border-radius: 8px;
}

/* Header and brand lockup */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
}

.brand .symbol {
  width: 2.25rem;
  height: 2.25rem;
  flex: none;
}

.brand .wordmark {
  height: 1.9rem;
  width: auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.brand-by {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.header-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.header-nav a {
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  font-size: 0.95rem;
}

.header-nav a:hover,
.header-nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--indigo-soft);
}

/* SVG parts follow the colour scheme. Fill attributes in the markup are the fallback. */
.s-teal {
  fill: var(--teal);
}

.s-indigo {
  fill: var(--indigo);
}

.s-ink {
  fill: var(--ink);
}

/* Main content */
main {
  padding-bottom: 1rem;
}

.hero {
  padding: 2.25rem 0 0.5rem;
}

.search-home h1 {
  hyphens: manual;
  text-wrap: balance;
}

/* One government question is the primary action. The terminal is a selectable example. */
body:has(.gateway-home) .wrap { max-width: 74rem; padding-inline: clamp(1rem, 4vw, 3rem); }
.gateway-home .search-home {
  padding-block: clamp(2rem, 5vw, 4.8rem) 0;
  display: grid;
  gap: 1rem;
  grid-template-areas: "intro" "query" "terminal";
}
.gateway-intro { grid-area: intro; }
.gateway-query { grid-area: query; min-width: 0; }
.gateway-home .search-home h1 {
  max-width: 18ch;
  margin: 0 0 .7rem;
  font-size: clamp(2.1rem, 5vw, 3.9rem);
  line-height: 1.04;
  letter-spacing: -.055em;
}
.gateway-home h1 em { color: var(--teal); font-style: normal; }
.gateway-home:lang(ja) h1 { max-width: 14em; line-height: 1.24; letter-spacing: -.03em; }
.gateway-home .lead { max-width: 49ch; margin: 0; font-size: 1.05rem; line-height: 1.5; color: var(--muted); }
.gateway-home .catalogue-search {
  margin: 0;
  padding: .8rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: 0 3px 16px var(--shadow);
}
.gateway-home .query-modes { margin-bottom: .55rem; }
.gateway-home .catalogue-search .search-bar { align-items: stretch; }
.gateway-home .gateway-actions { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin-top: .35rem; font-size: .88rem; }
.gateway-actions a { padding: .45rem 0; }
.gateway-actions a:hover { color: var(--teal); }
.gateway-terminal {
  grid-area: terminal;
  align-self: center;
  min-width: 0;
  margin: .25rem 0 0;
  color: #e2f6f3;
  background: linear-gradient(140deg, #142c34, #0d1a25 75%);
  border: 1px solid #35545c;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 .75rem 2rem -.9rem #102e4350;
}
.gateway-terminal figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .72rem 1rem;
  border-bottom: 1px solid #385058;
  font: 600 .84rem/1.4 var(--font);
  color: #edf8f7;
}
.gateway-terminal figcaption b { color: #99babd; font: .75rem var(--mono); }
.gateway-terminal pre {
  margin: 0;
  padding: 1.15rem 1rem;
  background: transparent;
  border: 0;
  color: inherit;
  font: .81rem/1.65 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.gateway-terminal code { font: inherit; background: transparent; color: inherit; padding: 0; }
.gateway-terminal code span { display: inline; }
.gateway-terminal code span:first-child { color: #88ddcb; }
.terminal-result { padding: .8rem 1rem; display: grid; gap: .2rem; border-top: 1px solid #385058; }
.terminal-result samp { color: #a3f6cf; font: 600 .88rem/1.4 var(--mono); }
.terminal-result samp::before { content: "› "; }
.terminal-result a { width: fit-content; color: #d5e8ec; font-size: .83rem; }
.terminal-result a:hover { color: white; }
@media (min-width: 56rem) {
  .gateway-home .search-home {
    grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr);
    grid-template-areas: "intro terminal" "query terminal";
    column-gap: clamp(2rem, 5vw, 4.5rem);
  }
  .gateway-terminal { margin: 0; }
}
@keyframes terminal-type {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0); }
}
@keyframes terminal-answer { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: no-preference) and (min-width: 30rem) {
  .gateway-terminal code span { display: inline-block; max-width: 100%; vertical-align: top; animation: terminal-type .4s steps(18,end) backwards; }
  .gateway-terminal code span:nth-child(2) { animation-delay: .35s; }
  .gateway-terminal code span:nth-child(3) { animation-delay: .7s; }
  .gateway-terminal code span:nth-child(4) { animation-delay: 1.05s; }
  .gateway-terminal code span:nth-child(5) { animation-delay: 1.4s; }
  .terminal-result { animation: terminal-answer .3s 1.85s backwards; }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.catalogue-search .query-modes {
  display: inline-flex;
  gap: 0.2rem;
  margin: 0 0 0.75rem;
  padding: 0.2rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 0.75rem;
}

.catalogue-search .mode-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.5rem;
  padding: 0.3rem 0.8rem;
  margin: 0;
  border-radius: 0.5rem;
  cursor: pointer;
}

.mode-option input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--teal);
}

.mode-option:has(input:checked) {
  color: var(--on-teal);
  background: var(--teal);
}

.mode-option:has(input:focus-visible) {
  outline: 3px solid var(--indigo);
  outline-offset: 2px;
}

.catalogue-search .search-bar {
  align-items: end;
}

.catalogue-search textarea,
.catalogue-search select {
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  background: var(--surface);
  font: inherit;
}

.catalogue-search textarea {
  flex: 1 1 12rem;
  min-width: 0;
  line-height: 1.4;
  resize: vertical;
}

.catalogue-search .chat-country {
  margin-bottom: 0.65rem;
}

.chat-country select {
  max-width: 100%;
}

.catalogue-search .mode-hint {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.catalogue-search .chat-reply {
  display: block;
  width: 100%;
  height: 5rem;
  min-height: 5rem;
  max-height: 75vh;
  margin-top: 0.75rem;
  resize: vertical;
  overflow: auto;
  color-scheme: light dark;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 0.5rem;
}

.catalogue-search .chat-active {
  height: clamp(18rem, 52vh, 32rem);
}

.chat-waiting {
  padding: 0.75rem 1rem;
  color: var(--muted);
  background: var(--surface);
}

.chat-waiting p {
  margin: 0;
}

.catalogue-search:has(#mode-search:checked) :is(.chat-submit, .chat-hint, .chat-country, .chat-reply),
.catalogue-search:has(#mode-chat:checked) :is(.search-submit, .search-hint) {
  display: none;
}

@media (min-width: 32rem) {
  .catalogue-search .chat-country {
    display: flex;
    align-items: center;
    gap: 0.65rem;
  }

  .catalogue-search .chat-country label {
    margin: 0;
  }
}

.gateway-home .search-examples a {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
}

.gateway-evidence,
.gateway-directory,
.gateway-guide,
.gateway-contact {
  margin-block-start: clamp(1.75rem, 4vw, 2.75rem);
  padding-block-start: 1.2rem;
  border-block-start: 1px solid var(--line);
}

.gateway-home :is(.coverage-snapshot, .gateway-directory, .gateway-guide, .gateway-contact) h2 {
  margin-block-start: 0;
}

.gateway-evidence .facts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-block: 0.85rem 0.5rem;
}

.gateway-evidence .facts > li {
  padding: clamp(0.65rem, 2vw, 1rem);
}

.gateway-evidence .facts strong {
  font-size: clamp(1.55rem, 4vw, 2rem);
  font-variant-numeric: tabular-nums;
}

.gateway-directory .country-apps {
  margin-block-end: 0.65rem;
}

.gateway-more-countries > summary {
  width: fit-content;
  padding: 0.65rem 0.25rem;
  color: var(--indigo);
  font-weight: 650;
  cursor: pointer;
}

.gateway-more-countries > summary:hover {
  background: var(--indigo-soft);
  border-radius: 4px;
}

@media (min-width: 40rem) {
  .gateway-evidence .facts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .gateway-directory .country-arrow {
    transition: transform 140ms ease-out;
  }

  .gateway-directory .country-app:is(:hover, :focus-visible) .country-arrow {
    transform: translateX(0.15rem);
  }
}

.badge {
  display: inline-block;
  margin: 0;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: var(--indigo-soft);
  color: var(--indigo);
  font-size: 0.85rem;
  font-weight: 700;
}

.tagline {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.5em;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--teal);
}

.lead {
  font-size: 1.15rem;
}

.note {
  border-left: 4px solid var(--indigo);
  background: var(--surface2);
  padding: 0.75rem 1rem;
  border-radius: 0 8px 8px 0;
}

.note > p:last-child,
.callout > p:last-child {
  margin-bottom: 0;
}

.catalogue-search {
  padding: 1.2rem;
  margin: 1.3rem 0 .65rem;
  color: var(--ink);
  background: var(--teal-soft);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
}
.catalogue-search :is(.question-label, .chat-country label) { display: block; margin-bottom: .45rem; font-weight: 700; }
.search-bar { display: flex; flex-wrap: wrap; gap: .5rem; }
.search-bar input, .search-bar button {
  padding: .7rem .9rem;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  background: var(--surface);
  font: inherit;
}
.search-bar input { flex: 1 1 12rem; min-width: 0; }
.search-bar button { color: var(--on-teal); background: var(--teal); border-color: var(--teal); cursor: pointer; font-weight: 700; }
.search-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.search-examples a {
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.9rem;
}

.search-examples a:hover {
  border-color: var(--indigo);
  background: var(--indigo-soft);
}

/* Prominent link to the web app ("Bürgerpilot starten"). The app runs on its own host. */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin: 0.25rem 0 1.25rem;
}

.cta {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  background: var(--teal);
  color: var(--on-teal);
  font-size: 1.1rem;
  font-weight: 750;
  text-decoration: none;
}

.cta:hover {
  box-shadow: 0 0 0 3px var(--line-strong);
}

/* Second link in the row (civcnct.com: "API and MCP"). Outline, so the web app link stays the main one. */
.cta-alt {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  border: 2px solid var(--indigo);
  border-radius: 999px;
  color: var(--indigo);
  font-weight: 700;
  text-decoration: none;
}

.cta-alt:hover {
  background: var(--indigo-soft);
}

/*
 * civcnct.com API and MCP (wave 6): key figures, small print with the basis of each number, endpoint lists,
 * code snippets (wrapped, never a sideways scroll at 320 px) and the country list of the developer page.
 */
.subhead {
  margin-top: -0.35rem;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--teal);
}

.endpoint-line {
  color: var(--muted);
  font-size: 0.95rem;
}

.facts {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0.4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.facts > li {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  padding: 0.8rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.facts strong {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--teal);
}

.facts span {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
  overflow-wrap: break-word;
  hyphens: auto;
}

.fineprint {
  color: var(--muted);
  font-size: 0.9rem;
}

section.fineprint h2 {
  font-size: 1.1rem;
}

section.fineprint ul {
  padding-left: 1.2rem;
}

section.fineprint li {
  margin-bottom: 0.4rem;
}

pre {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 0.88rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

pre code {
  font-size: inherit;
}

.endpoints dt {
  font-weight: 650;
  overflow-wrap: anywhere;
}

.endpoints dd {
  margin: 0 0 0.75rem;
}

.countries {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
}

.countries > li {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  padding: 0.7rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.countries .country {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.countries .code {
  flex: none;
  padding: 0.05rem 0.4rem;
  border-radius: 6px;
  background: var(--indigo-soft);
  color: var(--indigo);
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
}

.planned {
  color: var(--muted);
}

/* The entire country row opens its assistant, including its flag and ISO code. */
.country-apps {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 0.5rem;
}

.country-app {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  height: 100%;
  min-height: 2.85rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  text-decoration: none;
}

.country-app:hover,
.picker > li > a:hover {
  border-color: var(--indigo);
  background: var(--indigo-soft);
}

.country-flag {
  flex: none;
  font-size: 1.25rem;
  line-height: 1;
}

.country-app .code {
  font-family: var(--mono);
  font-size: 0.83rem;
  color: var(--muted);
}

.country-name {
  font-weight: 650;
}

.country-arrow {
  margin-inline-start: auto;
  color: var(--indigo);
  font-size: 1.2rem;
  line-height: 1;
}

.coverage-snapshot h2 {
  margin: 1.5rem 0 0.25rem;
  font-size: 1.18rem;
}

.coverage-snapshot > p {
  margin: 0.25rem 0 0.6rem;
}

.activity-heading {
  display: flex;
  flex-direction: column;
}

.activity-scope {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.activity-panel {
  margin: 1rem 0;
  padding: 0.3rem 0.75rem 0.65rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
}

.activity-details summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.35rem 0.2rem;
  border-radius: 4px;
  list-style: none;
  cursor: pointer;
  font-weight: 700;
}

.activity-details summary::-webkit-details-marker { display: none; }

.activity-details summary:hover { background: var(--indigo-soft); }

.activity-toggle {
  margin-inline-start: auto;
  color: var(--indigo);
  text-align: end;
  font-size: 0.85rem;
}

.activity-details summary::after {
  content: "";
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  margin-inline: 0.15rem 0.4rem;
  border-inline-end: 2px solid var(--indigo);
  border-block-end: 2px solid var(--indigo);
  transform: translateY(-0.12rem) rotate(45deg);
}

.activity-details[open] summary::after { transform: translateY(0.12rem) rotate(225deg); }

.activity-details p,
.activity-panel > p {
  margin: 0.3rem 0 0.6rem;
  font-size: 0.92rem;
}

.source-activity {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 0.45rem;
}

.source-activity p {
  position: relative;
  margin: 0;
  padding: 0.4rem 0.6rem 0.45rem 1.45rem;
  border-radius: 6px;
  background: var(--surface2);
  font-size: 0.9rem;
}

.activity-check::before,
.activity-dataset::before {
  content: "";
  position: absolute;
  inset-inline-start: 0.55rem;
  inset-block-start: 0.94rem;
  width: 0.42rem;
  height: 0.42rem;
}

.activity-check::before {
  border: 2px solid var(--teal);
  border-radius: 50%;
}

.activity-dataset::before {
  background: var(--indigo);
  transform: rotate(45deg);
}

code {
  font-family: var(--mono);
  font-size: 0.92em;
  overflow-wrap: anywhere;
}

.callout {
  background: var(--teal-soft);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}

.cards {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.cards > li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}

.cards > li p {
  margin: 0;
}

.checks {
  list-style: none;
  padding: 0;
}

.checks > li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.5rem;
}

.checks > li::before {
  content: "\2713";
  position: absolute;
  left: 0.2rem;
  top: 0;
  font-weight: 800;
  color: var(--teal);
}

/* Country and language pickers */
.picker {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

/* The card is the direct link of the item; a link in a .hint line stays a plain link. */
.picker > li > a {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
}

.picker .code {
  flex: none;
  min-width: 2.6rem;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  background: var(--indigo-soft);
  color: var(--indigo);
  font-family: var(--mono);
  font-weight: 700;
  text-align: center;
}

.picker .label {
  display: flex;
  flex-direction: column;
}

.picker .label strong {
  font-size: 1.1rem;
}

.picker .label span {
  color: var(--muted);
  font-size: 0.95rem;
}

.picker .hint {
  margin: 0.4rem 0 0 0.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* "So funktioniert es" / "How it works": numbered cards. The numbers come from a counter. */
.steps {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  counter-reset: step;
}

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

.steps > li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.6rem;
  border-radius: 50%;
  background: var(--teal);
  color: var(--on-teal);
  font-weight: 800;
}

.steps > li p {
  margin: 0;
}

/*
 * Product preview: a static mock of the planned app, built from HTML and this file only.
 * Every frame shows the label "Beispiel". The mock holds no links, buttons or form controls,
 * so nothing in it looks clickable to the keyboard. tests/check_static.py checks both rules.
 */
.preview {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 0 0 1rem;
}

.preview figcaption {
  color: var(--muted);
  font-size: 0.95rem;
}

.mock {
  min-width: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 1px 2px var(--shadow), 0 12px 28px -14px var(--shadow);
  font-size: 0.92rem;
  line-height: 1.45;
  overflow-wrap: break-word;
  cursor: default;
}

.mock p,
.mock ul,
.mock dl {
  margin: 0;
}

.mock .icon {
  flex: none;
  width: 1.1rem;
  height: 1.1rem;
}

.mock-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.6rem 0.9rem;
  background: var(--surface2);
  border-bottom: 1px solid var(--line);
}

.mock-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.mock-brand .symbol {
  flex: none;
  width: 1.35rem;
  height: 1.35rem;
}

.mock-label {
  flex: none;
  padding: 0.05rem 0.55rem;
  border: 1px dashed var(--indigo);
  border-radius: 999px;
  background: var(--indigo-soft);
  color: var(--indigo);
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mock-body {
  display: grid;
  gap: 0.85rem;
  padding: 1rem 0.95rem 1.1rem;
}

.mock-title {
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.mock-field {
  position: relative;
  min-height: 4.6rem;
  padding: 0.7rem 3.1rem 0.7rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  color: var(--muted);
}

.mock-send {
  position: absolute;
  right: 0.55rem;
  bottom: 0.55rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--teal);
  color: var(--on-teal);
}

.mock-place {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.7rem 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 0.85rem;
  font-weight: 650;
}

.mock-place .icon {
  width: 0.95rem;
  height: 0.95rem;
}

.mock-kicker {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.mock-kicker + p,
.mock-kicker + ul {
  margin-top: 0.3rem;
}

.mock-chips {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.mock-chips li {
  padding: 0.2rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.mock-entry {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  background: var(--teal-soft);
}

.mock-entry strong,
.mock-sub {
  display: block;
}

.mock-sub {
  color: var(--muted);
  font-size: 0.85rem;
}

.mock-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  background: var(--teal);
  color: var(--on-teal);
}

.mock-trust {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.mock-trust .icon {
  color: var(--teal);
}

.mock-meta {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.2rem 0.75rem;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  background: var(--surface2);
}

.mock-meta dt {
  color: var(--muted);
}

.mock-meta dd {
  margin: 0;
  font-weight: 650;
}

.mock-due {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.6rem;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  background: var(--warn-soft);
  color: var(--warn);
  font-weight: 700;
}

.mock-action {
  margin-left: auto;
  padding: 0.05rem 0.65rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.8rem;
}

.mock-todo {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.mock-todo li {
  position: relative;
  padding-left: 1.65rem;
}

.mock-todo li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--line-strong);
  border-radius: 4px;
}

.mock-note {
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

/* FAQ: <details> per question, no script. The chevron is drawn from two borders (no text). */
.faq {
  display: grid;
  gap: 0.6rem;
  margin: 0 0 1rem;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.faq summary {
  position: relative;
  padding: 0.85rem 3rem 0.85rem 1.15rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  position: absolute;
  right: 1.25rem;
  top: 1.15rem;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--indigo);
  border-bottom: 2px solid var(--indigo);
  transform: rotate(45deg);
}

.faq summary:hover {
  color: var(--indigo);
}

.faq details[open] > summary {
  border-bottom: 1px solid var(--line);
}

.faq details[open] > summary::after {
  top: 1.4rem;
  transform: rotate(-135deg);
}

.faq .answer {
  padding: 0.8rem 1.15rem 0.1rem;
}

/*
 * Privacy architecture ("So schützen wir Ihre Daten"): the path of a question, one step per
 * system. The numbers come from a counter; a line joins them. The label above each heading says
 * on whose systems the step runs (class where-<kind>; all pairs WCAG 2.2 AA in both schemes).
 */
.flow {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  counter-reset: flow;
}

.flow > li {
  counter-increment: flow;
  position: relative;
  padding: 0 0 1.25rem 3rem;
}

.flow > li::before {
  content: counter(flow);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--teal);
  color: var(--on-teal);
  font-weight: 800;
}

.flow > li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(1rem - 1px);
  top: 2.4rem;
  bottom: 0.4rem;
  width: 2px;
  background: var(--line-strong);
}

.flow > li > p:last-child {
  margin-bottom: 0;
}

.flow .where {
  display: inline-block;
  margin: 0.2rem 0 0.4rem;
  padding: 0.1rem 0.65rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--teal-soft);
  color: var(--teal);
}

.flow .where-server {
  background: var(--indigo-soft);
  color: var(--indigo);
}

.flow .where-model {
  background: var(--warn-soft);
  color: var(--warn);
}

.flow .where-sources {
  background: var(--surface2);
  color: var(--muted);
}

/* Legal pages */
.legal h1 {
  font-size: clamp(1.75rem, 6.5vw, 2.4rem);
}

.legal h2 {
  font-size: 1.2rem;
  margin-top: 2rem;
}

.legal address {
  font-style: normal;
}

.meta {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Open items that block the launch. They stay visible until somebody resolves them. */
mark.todo {
  background: var(--todo-bg);
  color: var(--todo-ink);
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
  font-weight: 600;
}

/* Footer */
.site-footer {
  margin-top: 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer .wrap {
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
}

.site-footer p {
  margin: 0 0 0.75rem;
}

.site-footer nav ul {
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
}

@media (min-width: 40rem) {
  .cards {
    grid-template-columns: 1fr 1fr;
  }

  .facts {
    grid-template-columns: repeat(3, 1fr);
  }

  .search-home .facts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .countries {
    grid-template-columns: 1fr 1fr;
  }

  .preview {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .preview figcaption {
    grid-column: 1 / -1;
  }
}

@media (min-width: 46rem) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Contact addresses and the public operator footer. */
.contact-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-links li > a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  height: 100%;
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
}

.contact-links li > a:hover {
  border-color: var(--indigo);
  background: var(--indigo-soft);
}

.contact-role {
  color: var(--ink);
  font-size: 0.97rem;
  font-weight: 700;
}

.contact-address {
  grid-column: 1;
  overflow-wrap: anywhere;
  font-size: 0.9rem;
}

.contact-links li > a::after {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  margin-inline-start: 0.6rem;
}

.site-footer {
  background: var(--surface);
}

.site-footer .footer-brand {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.footer-brand a {
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 750;
}

.footer-brand > a::after {
  content: none;
}

.site-footer .footer-products ul,
.site-footer .footer-legal ul {
  column-gap: 1.1rem;
}

.footer-products a,
.footer-legal a {
  display: inline-block;
  padding-block: 0.15rem;
}

.footer-legal {
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
}
