/* The pages of the secure download and the QR hosts, after the Figma draft (IH-Drafting,
   „download.interviahealth.de · Entwurf Claude 2026-12-02“), with the tokens of the IH design
   system as the draft uses them. Mobile first; from 900px the desktop layout of D1 and D9. */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/assets/plus-jakarta-sans.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/source-sans-3.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}

:root {
  --background-app: #ffffff;
  --surface-default: #ffffff;
  --surface-soft: #e6f6f6;
  --surface-scrim: rgba(11, 42, 48, 0.45);
  --text-primary: #0a1a1d;
  --text-secondary: #364c52;
  --text-tertiary: #5c6f75;
  --text-inverse: #ffffff;
  --text-link: #006f8b;
  --brand-teal-deep: #073945;
  --border-control: #a8c5ca;
  --border-subtle: #d4eaea;
  --border-card: #b2cdd1;
  --state-info-soft: #d2ecee;
  --state-info-dark: #064a4e;
  --state-warning-soft: #fae1ae;
  --state-warning-dark: #7a4a00;
  --button-primary: #007795;
  --button-secondary: #bfeaeb;
  --heading: "Plus Jakarta Sans", system-ui, sans-serif;
  --text: "Source Sans 3", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--background-app);
  color: var(--text-primary);
  font-family: var(--text);
  font-feature-settings: "liga" 0;
}
h1, h2, p, dl, dd, figure { margin: 0; }

/* ---- page frame ---- */

.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 18px 16px 34px;
  max-width: 420px;
  margin: 0 auto;
}
.head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 40px;
}
.logo { width: 88.237px; height: 28px; display: block; }
.address {
  font: 400 13px/1.2 var(--text);
  color: var(--text-tertiary);
  white-space: nowrap;
}
.body {
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1 0 auto;
}
.body[data-screen="D4"], .body[data-screen="D5"], .body[data-screen="D7"] { flex: 0 0 auto; }
.foot {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  width: 100%;
}
.foot form { width: 100%; display: flex; justify-content: center; }
.stack { display: flex; flex-direction: column; gap: 24px; }

/* ---- toolbar ---- */

.toolbar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 10px;
}
.controls { display: flex; justify-content: space-between; align-items: center; }
.back {
  width: 44px;
  height: 44px;
  border-radius: 1000px;
  background: var(--surface-default);
  box-shadow: 0 3px 10px 0 rgba(41, 70, 76, 0.12), 0 0 0 1px rgba(41, 70, 76, 0.11);
  display: flex;
  align-items: center;
  justify-content: center;
}
.titles { display: flex; flex-direction: column; gap: 6px; }
h1 {
  font: 700 28px/1.2 var(--heading);
  letter-spacing: -0.05px;
  color: var(--text-primary);
  font-feature-settings: "liga" 0, "calt" 0;
  overflow-wrap: anywhere;
}
.subtitle {
  font: 700 16px/1.24 var(--heading);
  color: var(--text-tertiary);
  overflow-wrap: anywhere;
}

/* ---- text field ---- */

.field { display: flex; flex-direction: column; gap: 4px; }
.label {
  height: 22px;
  display: flex;
  align-items: center;
  padding-left: 20px;
  font: 600 12px/1.2 var(--heading);
  letter-spacing: 0.72px;
  text-transform: uppercase;
  color: var(--text-secondary);
  white-space: nowrap;
}
.input {
  width: 100%;
  background: var(--surface-default);
  border: 1.5px solid var(--border-control);
  border-radius: 28px;
  padding: 16px 20px;
  font: 500 17px/1.2 var(--text);
  color: var(--text-primary);
  filter: drop-shadow(0 2px 6px rgba(9, 92, 108, 0.12));
  appearance: none;
}
.input:focus { outline: 2px solid var(--text-link); outline-offset: 2px; }

/* ---- buttons ---- */

.button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 52px;
  padding: 0 28px;
  border: 0;
  border-radius: 40px;
  font: 600 16px/1.2 var(--heading);
  letter-spacing: 0.2px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.button.primary {
  background: var(--button-primary);
  color: var(--text-inverse);
  box-shadow: 0 0 12px 2px rgba(9, 92, 108, 0.26);
  text-shadow: 0 0 12px rgba(9, 92, 108, 0.26);
}
.button.primary img { filter: drop-shadow(0 0 6px rgba(9, 92, 108, 0.26)); }
.button.secondary {
  background: var(--button-secondary);
  color: var(--brand-teal-deep);
  box-shadow: 0 2px 12px 1px rgba(9, 92, 108, 0.11);
}
.button.link {
  width: auto;
  height: 44px;
  padding: 0;
  background: none;
  font: 600 14px/16.5px var(--heading);
  color: var(--text-link);
}
.button.link.start { align-self: flex-start; }
.button:focus-visible { outline: 2px solid var(--brand-teal-deep); outline-offset: 3px; }

/* ---- divider „oder“ ---- */

.divider {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 32px;
}
.divider span {
  flex: 1;
  height: 8px;
  background: url("/assets/divider.svg") right center / 100% 8px no-repeat;
}
.divider span:last-child { transform: scaleX(-1); }
.divider em {
  font: 600 12px/1.2 var(--text);
  font-style: normal;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

/* ---- alerts ---- */

.alert {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  border-radius: 12px;
  font: 400 13px/1.2 var(--text);
}
.alert.info { background: var(--state-info-soft); color: var(--state-info-dark); }
.alert.warning { background: var(--state-warning-soft); color: var(--state-warning-dark); }
.alert-title { font: 600 15px/1.2 var(--text); }
.desktop-only { display: none; }

/* ---- the document ---- */

.edition {
  display: flex;
  background: var(--surface-soft);
  border-radius: 999px;
  padding: 6px;
}
.edition span {
  flex: 1;
  height: 40px;
  border-radius: 999px;
  background: var(--surface-default);
  box-shadow: 0 2px 8px 0 rgba(7, 57, 69, 0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  font: 600 16px/1.2 var(--heading);
  letter-spacing: 0.2px;
  color: var(--text-primary);
}
.document { display: flex; flex-direction: column; gap: 24px; }
.sheet { display: flex; flex-direction: column; gap: 12px; }
.sheet img {
  width: 100%;
  aspect-ratio: 210 / 297;
  object-fit: contain;
  background: var(--surface-default);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font: 400 13px/1.2 var(--text);
  color: var(--text-tertiary);
}
.sheet figcaption {
  text-align: center;
  font: 400 13px/1.2 var(--text);
  color: var(--text-secondary);
}

/* ---- dialog (D5) ---- */

.scrim { position: fixed; inset: 0; background: var(--surface-scrim); }
.dialog {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(342px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--surface-default);
  border-radius: 38px;
  padding: 8px;
  filter: drop-shadow(0 0 8px rgba(15, 95, 114, 0.12));
  display: flex;
  flex-direction: column;
}
.dialog-content { display: flex; flex-direction: column; gap: 8px; padding: 24px 20px 40px; }
.dialog h2 {
  font: 700 22px/1.2 var(--heading);
  letter-spacing: -0.05px;
  color: var(--text-primary);
}
.dialog-content p { font: 500 17px/1.2 var(--text); color: var(--text-secondary); }
.dialog-actions { display: flex; flex-direction: column; gap: 12px; padding: 0 20px 20px; }

/* ---- summary card (D9) ---- */

.summary {
  background: var(--surface-default);
  border: 1px solid var(--border-card);
  border-radius: 32px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.summary h2 {
  font: 600 12px/1.2 var(--heading);
  letter-spacing: 0.2px;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.summary dl { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; gap: 12px; align-items: flex-start; }
.row dt { width: 100px; flex: none; font: 400 15px/1.2 var(--text); color: var(--text-secondary); }
.row dd { flex: 1; font: 600 15px/1.2 var(--text); color: var(--text-primary); overflow-wrap: anywhere; }

/* ---- desktop ---- */

@media (min-width: 900px) {
  .page { max-width: none; padding: 0 0 48px; gap: 0; }
  .head { height: 80px; padding: 24px 80px; }
  .logo { width: 100.842px; height: 32px; }
  .body, .foot { width: 520px; margin: 0 auto; }
  .body { padding-top: 64px; flex: 0 0 auto; }
  .foot { padding-top: 24px; }
  .body.card {
    margin-top: 64px;
    padding: 32px;
    border: 1px solid var(--border-card);
    border-radius: 32px;
    gap: 24px;
  }
  .body.card + .foot { padding-top: 24px; }
  .card .toolbar { padding-bottom: 0; }
  .card .titles { gap: 8px; }
  .subtitle { font: 500 17px/1.2 var(--text); color: var(--text-secondary); }
  .alert { padding: 16px 24px; }
  .mobile-only { display: none; }
  .desktop-only { display: block; }
  .summary { padding: 24px; }
}
