/*
 * Vertragsseiten unter /vertrag/ (E98). Fester Pfad, weil das Backend vor der App ausgeliefert wird.
 * Außerhalb des Designsystems der App, aber mit denselben Farben: Die Werte unten sind die aus
 * frontend/src/styles/theme.css (hell und dunkel); core/test_contract.py bricht ab, wenn sie auseinanderlaufen.
 * Schrift: Figtree (OFL, siehe figtree-LICENSE.txt), ohne fremde Server.
 */
@font-face {
  font-family: 'Figtree Variable';
  src: url('figtree.woff2') format('woff2');
  font-weight: 300 900;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  --color-bg: #ffffff;
  --color-surface: #f2f4fa;
  --color-line: #e4e7f0;
  --color-border: #7c8098;
  --color-text: #14162b;
  --color-muted: #565a73;
  --color-ink: #14162b;
  --color-on-ink: #ffffff;
  --color-accent: #2b50e6;
  --color-notice-text: #8f3300;
  --color-notice-surface: #ffe2cc;
  --color-focus-halo: #dce3fc;
  --color-done: #178a57;
  --font-weight-regular: 400;

  --font-body: 'Figtree Variable', system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0f1020;
    --color-surface: #1b1d33;
    --color-line: #2c2f4a;
    --color-border: #8388a6;
    --color-text: #f2f3fa;
    --color-muted: #a9adc6;
    --color-ink: #f2f3fa;
    --color-on-ink: #14162b;
    --color-accent: #8fa2ff;
    --color-notice-text: #ffb37a;
    --color-notice-surface: #2e2219;
    --color-focus-halo: #2e3356;
    --color-done: #3ddc97;
    --font-weight-regular: 450;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: var(--font-weight-regular);
  font-size: 1.0625rem;
  line-height: 1.5rem;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--color-accent);
  font-weight: 600;
}

.topbar {
  border-bottom: 1px solid var(--color-line);
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text);
  font-weight: 800;
  font-size: 1.25rem;
  text-decoration: none;
}

main.wrap {
  padding-top: 40px;
  padding-bottom: 72px;
}

h1 {
  font-size: clamp(2rem, 1.6rem + 1.6vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}

h2 {
  font-size: 1.25rem;
  line-height: 1.625rem;
  margin: 36px 0 8px;
}

p,
ul,
ol,
dl {
  margin: 0 0 12px;
}

ul,
ol {
  padding-left: 22px;
}

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

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

.box {
  background: var(--color-surface);
  border-radius: 20px;
  padding: 20px 24px;
  margin: 20px 0;
}

.price {
  font-size: 1.75rem;
  line-height: 2.25rem;
  font-weight: 800;
}

.notice {
  background: var(--color-notice-surface);
  color: var(--color-notice-text);
  border-radius: 16px;
  padding: 14px 18px;
  font-weight: 600;
  margin: 16px 0;
}

.done {
  color: var(--color-done);
  font-weight: 700;
}

form {
  margin: 24px 0;
}

label {
  display: block;
  font-weight: 600;
  margin: 16px 0 6px;
}

label.check,
label.choice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-weight: var(--font-weight-regular);
}

input[type='text'],
input[type='email'],
textarea {
  width: 100%;
  font: inherit;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 12px 14px;
}

input[type='checkbox'],
input[type='radio'] {
  width: 22px;
  height: 22px;
  margin-top: 1px;
  flex: none;
  accent-color: var(--color-ink);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 28px;
  margin-top: 20px;
  border: 0;
  border-radius: 999px;
  background: var(--color-ink);
  color: var(--color-on-ink);
  font: 700 1.0625rem/1.5rem var(--font-body);
  text-decoration: none;
  cursor: pointer;
}

table {
  border-collapse: collapse;
  width: 100%;
  margin: 8px 0 16px;
}

th,
td {
  text-align: left;
  padding: 8px 8px 8px 0;
  border-bottom: 1px solid var(--color-line);
  vertical-align: top;
}

footer {
  border-top: 1px solid var(--color-line);
  padding: 24px 0 40px;
  color: var(--color-muted);
  font-size: 0.9375rem;
}

footer a {
  margin-right: 16px;
}
