/* 2ecure website: the only stylesheet. No external resources, no JavaScript.
   Colours are CSS variables; --brand is a placeholder until the brand assets arrive.
   If --brand changes, re-check --link and --on-brand contrast in both schemes (WCAG AA 4.5:1). */

:root {
  --brand: #0B5FFF;
  --on-brand: #ffffff;
  --bg: #ffffff;
  --surface: #f4f6fa;
  --text: #16181d;
  --muted: #545b67;
  --border: #d8dce4;
  --link: var(--brand);
  --focus: var(--brand);
  --warn: #b45309;
  --note-bg: #fff5d1;
  --note-text: #4d3b00;
  --note-border: #e0c25a;
  --radius: 12px;
  --max: 68rem;
  --prose: 44rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1116;
    --surface: #171b22;
    --text: #e7eaf0;
    --muted: #a6adba;
    --border: #2b313c;
    --link: #8db2ff;
    --focus: #8db2ff;
    --warn: #f59e0b;
    --note-bg: #2d2608;
    --note-text: #f2dc8c;
    --note-border: #6e5c19;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

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

main:focus { outline: none; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 10;
  padding: 0.5rem 1rem;
  background: var(--bg);
  color: var(--link);
  border: 2px solid var(--focus);
  border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; }

/* Header */

.site-header { border-bottom: 1px solid var(--border); }

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.brand { display: inline-flex; }
.brand img { display: block; width: 120px; height: 40px; }

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

.site-nav a {
  display: inline-block;
  padding: 0.35rem 0;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--link);
  text-decoration: underline;
}

/* Content */

main {
  padding-top: 2rem;
  padding-bottom: 3rem;
  overflow-wrap: break-word;
}

main :where(p, ul, ol, dl, h1, h2, h3) { max-width: var(--prose); }

h1 {
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
}
h2 { font-size: 1.5rem; line-height: 1.3; margin: 2.5rem 0 0.75rem; }
h3 { font-size: 1.15rem; line-height: 1.35; margin: 1.5rem 0 0.5rem; }

p, ul, ol, dl { margin: 0 0 1rem; }
li + li { margin-top: 0.35rem; }

[id] { scroll-margin-top: 1rem; }

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

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.05em 0.3em;
  overflow-wrap: anywhere;
}

/* Landing */

.hero { padding: 1.5rem 0 1rem; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.button {
  display: inline-block;
  padding: 0.7rem 1.2rem;
  border: 2px solid var(--brand);
  border-radius: 999px;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 600;
  text-decoration: none;
}
.button:hover { text-decoration: underline; }
.button.secondary {
  background: transparent;
  color: var(--link);
  border-color: currentColor;
}

main .cards {
  list-style: none;
  max-width: none;
  margin: 1.25rem 0 1.5rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
}
.cards > li { margin: 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

.badge {
  display: inline-block;
  padding: 0.1rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

/* Numbered steps */

ol.steps {
  list-style: none;
  padding: 0;
  counter-reset: step;
}
ol.steps > li {
  position: relative;
  counter-increment: step;
  padding-left: 2.6rem;
  margin: 0 0 0.9rem;
}
ol.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.8rem;
  height: 1.8rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: var(--on-brand);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
}

/* Notes */

.draft-note {
  display: inline-block;
  margin: 0 0 1.25rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--note-border);
  border-radius: 6px;
  background: var(--note-bg);
  color: var(--note-text);
  font-size: 0.9rem;
  font-weight: 600;
}

.note {
  max-width: var(--prose);
  margin: 0 0 1rem;
  padding: 0.8rem 1rem;
  border-left: 4px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--surface);
}
.note.warning { border-left-color: var(--warn); }
.note > :last-child { margin-bottom: 0; }

/* Help centre */

.toc {
  max-width: var(--prose);
  margin: 1.5rem 0 1rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.toc h2 { font-size: 1.05rem; margin: 0 0 0.5rem; }
.toc ul { columns: 2 14rem; margin: 0; padding-left: 1.2rem; }
.toc li { break-inside: avoid; }

.help > section:target {
  border-left: 4px solid var(--brand);
  padding-left: 1rem;
}

/* Tables */

.table-wrap {
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
caption {
  padding: 0.6rem 0.8rem;
  text-align: left;
  font-weight: 600;
}
th, td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
thead th { background: var(--surface); }
tbody tr:last-child > * { border-bottom: 0; }

/* Key facts (Impressum) */

dl.facts {
  display: grid;
  grid-template-columns: minmax(9rem, max-content) 1fr;
  gap: 0.4rem 1.25rem;
}
dl.facts dt { font-weight: 600; }
dl.facts dd { margin: 0; }

@media (max-width: 30rem) {
  dl.facts { grid-template-columns: 1fr; gap: 0; }
  dl.facts dd { margin-bottom: 0.6rem; }
}

/* Footer */

.site-footer {
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.92rem;
}
.site-footer p { max-width: var(--prose); margin: 1rem 0 0; }

@media print {
  .skip-link, .site-nav, .site-footer nav { display: none; }
  a { color: inherit; }
}
