/* Kundenbereich von VANDS MEDIA
   Werte aus src/scss/abstracts/_tokens.scss im Repo der Website, nur die,
   die der Bereich braucht; test/static.test.mjs vergleicht sie, wenn
   WEBSITE_DIR gesetzt ist. Bewusst nur hell wie die Website (dort Regel
   1.2).
   Layout: Seitenleiste links, Arbeitsflaeche auf Sand, Karten aus Papier;
   auf dem Telefon wird die Seitenleiste zur Zeile ueber dem Inhalt. */

@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/fonts/fraunces-latin.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 400 600; font-display: swap; src: url("/fonts/fraunces-italic-latin.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/fonts/open-sans-latin.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/fonts/dm-sans-latin.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --ink: #1a140f;
  --ink-2: #3a312a;
  --muted: #6a5e56;
  --sand: #f6ede5;
  --sand-2: #ede1d8;
  --paper: #fefaf6;
  --accent: #0f5fc7;
  --accent-2: #044597;
  --accent-soft: #e6effd;
  /* Die beiden Toene des Zeichens im Logo, wie auf der Website. */
  --logo-a: #297df3;
  --logo-b: #2c86f2;
  --amber: #8f541a;
  --amber-soft: #f9ece0;
  --moss: #4c7133;
  --moss-soft: #e9f2e4;
  --ink-rgb: 26 20 15;
  --accent-rgb: 15 95 199;
  --line: rgb(var(--ink-rgb) / .13);
  --line-soft: rgb(var(--ink-rgb) / .08);

  --font-heading: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-brand: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --text-2xs: .6875rem;
  --text-xs: .75rem;
  --text-s: .8125rem;
  --text-m: .9375rem;
  --text-body: 1.0625rem;
  --text-l: 1.25rem;

  --radius-xs: 4px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-pill: 999px;

  --shadow-2: 0 1px 2px rgb(var(--ink-rgb) / .05), 0 18px 34px -24px rgb(var(--ink-rgb) / .28);
  --duration-fast: .25s;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--sand); color: var(--ink); font: 400 var(--text-m)/1.6 var(--font-body); }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--accent-2); }
button { font: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-xs); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* Typografie */
h1 { font-family: var(--font-heading); font-weight: 600; font-size: clamp(1.75rem, 3.2vw, 2.5rem); line-height: 1.12; letter-spacing: -.022em; text-wrap: balance; }
h1 em, .h-sm em { font-style: italic; font-weight: 400; }
h1:focus { outline: none; }
.h-sm { font-family: var(--font-heading); font-weight: 600; font-size: var(--text-l); line-height: 1.3; letter-spacing: -.01em; text-wrap: balance; }
.h-xs { font-weight: 600; font-size: var(--text-m); line-height: 1.35; }
.lead { font-size: var(--text-body); color: var(--ink-2); max-width: 62ch; }
.eyebrow { font-size: var(--text-xs); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.meta { font-size: var(--text-s); color: var(--muted); }
.prose { display: grid; gap: 12px; max-width: 68ch; font-size: var(--text-body); }
.prose ul { display: grid; gap: 6px; }
.prose li { position: relative; padding-left: 18px; }
.prose li::before { content: ""; position: absolute; left: 2px; top: .66em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* Marke */
/* Das Logo wie in der Kopfleiste der Website (organisms/_header.scss
   dort): Zeichen aus i-logo und die Wortmarke in DM Sans, Laufweite .16em.
   Das Zeichen ist 2,11 zu 1, Breite und Hoehe gehoeren zusammen. Darunter
   der Name des Bereichs, eingerueckt auf die Wortmarke. */
.brand { display: inline-grid; justify-items: start; gap: 6px; color: var(--ink); text-decoration: none; }
.brand__logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-brand); font-weight: 700; font-size: var(--text-m); line-height: 1; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; }
.brand__mark { flex: none; width: 46px; height: 21.8px; }
.brand__mark svg { display: block; width: 100%; height: 100%; color: var(--logo-a); fill: var(--logo-b); }
.brand small { padding-left: 56px; font-family: var(--font-body); font-weight: 600; font-size: var(--text-2xs); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* Schale */
.shell { display: grid; grid-template-columns: 268px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 22px; padding-block: 24px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: 16px; background: var(--paper); border-right: 1px solid var(--line); }
.side__top { display: grid; gap: 16px; }
.firm { display: grid; gap: 2px; padding: 12px; border-radius: var(--radius-sm); background: var(--sand); }
.firm strong { font-weight: 600; line-height: 1.35; }
.firm span { font-size: var(--text-xs); color: var(--muted); overflow-wrap: anywhere; }
.nav { position: relative; display: grid; gap: 2px; }
.nav-link { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--ink-2); font-weight: 500; text-decoration: none; transition: background-color var(--duration-fast), color var(--duration-fast); }
.nav-link:hover { background: var(--sand); }
.nav-link[aria-current="page"] { background: var(--accent-soft); color: var(--accent-2); }
.nav-label { margin-top: 14px; padding: 0 10px 4px; font-size: var(--text-2xs); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.nav-link--locked { color: var(--muted); }
.nav-lock { margin-left: auto; display: inline-flex; }
.nav-lock .i { width: 16px; height: 16px; }
.locked { display: grid; gap: 14px; justify-items: start; max-width: 620px; }
.locked__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--sand-2); color: var(--ink-2); }
.locked__icon .i { width: 26px; height: 26px; }
.side__foot { margin-top: auto; display: grid; justify-items: start; gap: 8px; font-size: var(--text-xs); color: var(--muted); overflow-wrap: anywhere; }

.main { min-width: 0; padding-block: 32px 72px; padding-left: max(16px, clamp(16px, 3.4vw, 52px)); padding-right: max(clamp(16px, 3.4vw, 52px), env(safe-area-inset-right, 0px)); }
.main__in { max-width: 1080px; margin-inline: auto; }
.view { display: none; gap: 24px; }
.view.is-active { display: grid; }
.view-head { display: grid; gap: 10px; }
.loading { padding: 48px 0; color: var(--muted); }

/* Bausteine */
.card { display: grid; gap: 16px; align-content: start; min-width: 0; padding: clamp(16px, 2.2vw, 28px); border: 1px solid var(--line-soft); border-radius: var(--radius-md); background: var(--paper); }
.card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 20px; align-items: stretch; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 24px; align-items: start; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.stack { display: grid; gap: 12px; }

.tile { display: grid; grid-template-rows: auto auto 1fr auto; gap: 10px; color: inherit; text-decoration: none; transition: border-color var(--duration-fast); }
a.tile:hover { border-color: var(--line); }
.tile__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-2); }
.tile__text { color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tile--empty .tile__icon { background: var(--sand-2); color: var(--muted); }

.chip { display: inline-flex; align-items: center; gap: 5px; justify-self: start; padding: 3px 10px; border-radius: var(--radius-pill); background: var(--sand); color: var(--ink-2); font-size: var(--text-xs); font-weight: 600; line-height: 1.4; white-space: nowrap; }
.chip .i { width: 14px; height: 14px; }
.chip--wait { background: var(--amber-soft); color: var(--amber); }
.chip--done { background: var(--moss-soft); color: var(--moss); }
.chip--work { background: var(--accent-soft); color: var(--accent-2); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 7px 7px 7px 20px; border: 1px solid var(--ink); border-radius: var(--radius-pill); background: var(--paper); color: var(--ink); font: 500 var(--text-m)/1.2 var(--font-body); text-decoration: none; cursor: pointer; transition: background-color var(--duration-fast), color var(--duration-fast), border-color var(--duration-fast); }
.btn:hover { background: var(--sand); }
.btn:disabled { opacity: .55; cursor: progress; }
/* Der rechte Rand von .btn laesst Platz fuer den Pfeil im Kreis. Ohne
   Pfeil stuende der Text sonst rechts, deshalb dann gleich viel Rand auf
   beiden Seiten. :where haelt die Spezifitaet bei .btn, so gelten
   .btn--plain und .btn--sm darunter weiter. */
.btn:where(:not(:has(.btn__arrow))) { padding-inline: 18px; }
.btn__arrow { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--paper); }
.btn__arrow .i { width: 16px; height: 16px; }
.btn--filled { border-color: var(--accent-2); background: var(--accent-2); color: var(--paper); }
.btn--filled .btn__arrow { background: var(--paper); color: var(--accent-2); }
.btn--filled:hover { border-color: var(--accent); background: var(--accent); }
.btn--plain { padding: 7px 18px; }
.btn--quiet { border-color: var(--line); }
.btn--sm { min-height: 36px; padding: 5px 14px; font-size: var(--text-s); }
.btn--danger { border-color: var(--amber); color: var(--amber); }
.btn .i { width: 18px; height: 18px; }
.link-btn { appearance: none; min-height: 24px; padding: 0; border: 0; background: none; color: var(--accent-2); font-weight: 500; font-size: var(--text-s); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link { color: var(--accent-2); font-weight: 500; font-size: var(--text-s); text-underline-offset: 3px; }

.empty { padding: 16px; border-radius: var(--radius-sm); background: var(--sand); color: var(--ink-2); font-size: var(--text-s); }
.error { color: var(--amber); font-size: var(--text-s); font-weight: 600; }

/* Ansprechpartner: links Bild und Name, rechts die Wege zu ihm als
   ganze Zeilen zum Antippen; schmal untereinander. */
.contact-card { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); align-items: center; gap: 20px 32px; }
.contact-card__person { display: flex; align-items: center; gap: 18px; }
.contact-card__photo { flex: none; width: 88px; height: 88px; border-radius: 50%; object-fit: cover; background: var(--sand-2); box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px var(--line); }
.contact-card__name { display: grid; gap: 2px; }
.contact-card__ways { display: grid; gap: 10px; }
.contact-way { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 10px 14px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--sand); color: var(--ink); text-decoration: none; transition: border-color var(--duration-fast), background-color var(--duration-fast); }
.contact-way:hover { border-color: var(--accent); background: var(--accent-soft); }
.contact-way__icon { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--paper); color: var(--accent-2); }
.contact-way__text { display: grid; min-width: 0; }
.contact-way__label { font-size: var(--text-xs); color: var(--muted); }
.contact-way__value { font-weight: 600; overflow-wrap: anywhere; }
.contact-way__go { margin-left: auto; color: var(--muted); }
.contact-way:hover .contact-way__go { color: var(--accent-2); }

/* Wie geht es weiter: zwei Wege nebeneinander, schmal untereinander.
   Der Weg zum Auftrag ist eine Folge von zwei Schritten, deshalb die
   Nummern. */
.next-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; align-items: stretch; }
.next-step { display: grid; gap: 14px; align-content: start; padding: 20px; border-radius: var(--radius-sm); background: var(--sand); }
.next-step--agree { background: var(--accent-soft); }
.steps { display: grid; gap: 10px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; }
.steps__no { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-2); color: var(--paper); font-size: var(--text-xs); font-weight: 700; }
.steps strong { font-weight: 600; white-space: nowrap; }

/* Formulare */
.field { display: grid; gap: 6px; }
.label { font-weight: 600; font-size: var(--text-s); }
.field--narrow { max-width: 14rem; }
input[type="text"], input[type="email"], input[type="date"], textarea, select {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--paper); color: var(--ink); font: inherit;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: var(--text-s); }
.check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent-2); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px; }
.file-input { display: grid; gap: 6px; padding: 16px; border: 1.5px dashed var(--line); border-radius: var(--radius-sm); background: var(--sand); }
.file-input input { font: inherit; font-size: var(--text-s); max-width: 100%; }
progress { width: 100%; height: 8px; accent-color: var(--accent-2); }

/* PDF */
.pdf-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.pdf { display: grid; justify-items: center; gap: 14px; padding: clamp(8px, 2vw, 20px); border-radius: var(--radius-md); background: var(--sand-2); }
/* Breite setzt pdf-viewer.js, damit die Seite ganz ins Fenster passt. Ein
   Wisch zur Seite blaettert, nach oben und unten scrollt die Seite. */
.pdf-page { max-width: 100%; background: var(--paper); box-shadow: var(--shadow-2); border-radius: 2px; overflow: hidden; touch-action: pan-y pinch-zoom; }
.pdf-page canvas { display: block; width: 100%; height: 100%; }
.pdf-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 16px; }
.pdf-nav .btn:disabled { cursor: default; }
.pdf-status { padding: 32px 16px; text-align: center; color: var(--ink-2); font-size: var(--text-s); }

/* Tabellen */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--text-s); font-variant-numeric: tabular-nums; }
th { padding: 8px 12px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: var(--text-2xs); font-weight: 600; letter-spacing: .08em; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
.mark { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--sand-2); color: var(--muted); }
.mark--on { background: var(--moss-soft); color: var(--moss); }
.mark .i { width: 14px; height: 14px; stroke-width: 2.25; }
.firm-link { font-weight: 600; color: var(--ink); text-decoration: none; }
.firm-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.feedback-list { display: grid; }
.feedback-list li { display: grid; gap: 2px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.feedback-list li:first-child { border-top: 0; padding-top: 0; }
.feedback-list p { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Anmelden */
.login { min-height: 100vh; display: grid; place-items: center; padding-block: 48px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.login__wrap { width: min(100%, 460px); display: grid; gap: 20px; }
.login__card { display: grid; gap: 20px; padding: clamp(20px, 5vw, 36px); border: 1px solid var(--line-soft); border-radius: var(--radius-md); background: var(--paper); box-shadow: var(--shadow-2); }

.toast { position: fixed; z-index: 50; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); width: max-content; max-width: min(92vw, 520px); padding: 12px 18px; border-radius: var(--radius-sm); background: var(--ink); color: var(--paper); font-size: var(--text-s); box-shadow: var(--shadow-2); }

@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; gap: 12px; padding-block: 14px 10px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); border-right: 0; border-bottom: 1px solid var(--line); }
  .side__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
  .firm { padding: 6px 10px; }
  .firm span { display: none; }
  .side__foot { margin-top: 0; display: flex; justify-content: space-between; }
  .side__foot span { display: none; }
  .nav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
  .nav-link { flex: none; min-height: 38px; white-space: nowrap; border: 1px solid var(--line-soft); }
  .nav-label { display: none; }
  .main { padding-block: 24px 64px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
