/* ==========================================================================
   ANSCHREIBEN-STUDIO — Familie „Kit-Editorial", Trikot „Quantum Blue / Ice Glass"
   Eis-Heimtrikot: eisblauer Grund, tiefblaue Tinte, weiße Dokument-Sheets.
   Quantum Blue nur anfassbar/aktiv + Schrittzahlen. Anton + Schibsted + Geist
   Mono. Radius 0. Der Brief selbst bleibt das nüchterne Geschäftsdokument.
   ========================================================================== */

@font-face {
  font-family: "Anton";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/tools/assets-kit/fonts/anton-400.woff2") format("woff2");
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/tools/assets-kit/fonts/schibsted-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/tools/assets-kit/fonts/schibsted-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/geistmono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+FEFF, U+FFFD;
}

:root {
  --grund: #DFF7FF;
  --ink: #0B1E52;
  --ink-2: #47598F;
  --linie: #B7D9E6;
  --akzent: #2457FF;
  --akzent-tief: #1638A8;
  --papier: #FFFFFF;
  --papier-ink: #1C1E26;
  --warnrot: #B3213C;
  --f-disp: "Anton", "Arial Narrow", sans-serif;
  --f-body: "Schibsted Grotesk", system-ui, sans-serif;
  --f-mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --raster: clamp(16px, 4vw, 48px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 16.5px/1.6 var(--f-body);
  background: var(--grund);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex; flex-direction: column;
}
::selection { background: var(--akzent); color: #fff; }
input, textarea, select, button { font: inherit; color: inherit; }
input, textarea { caret-color: var(--akzent); }
[hidden] { display: none !important; }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; }
.skip-link { position: absolute; left: -9999px; top: 10px; z-index: 99; background: var(--akzent); color: #fff; padding: 10px 18px; font-weight: 700; text-decoration: none; }
.skip-link:focus-visible { left: 12px; }

.pi { width: 17px; height: 17px; fill: currentColor; flex: 0 0 auto; }

* { scrollbar-width: thin; scrollbar-color: #8FB6C9 transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #8FB6C9; border: 3px solid var(--grund); }

/* ---------- Kopf ---------- */
.kopf {
  display: flex; align-items: center; gap: 18px;
  padding: 12px var(--raster);
  border-bottom: 1px solid var(--linie);
}
.zurueck {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 12px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-2); text-decoration: none;
  transition: color .15s var(--ease-out);
}
.zurueck:hover { color: var(--akzent); }
.zurueck .pi { width: 14px; height: 14px; }
.kopf-titel { font: 800 16px/1 var(--f-body); }
.kopf-marke { margin-left: auto; font: 500 11px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.kopf-export { padding: 12px 20px; }

/* ---------- Held ---------- */
main { flex: 1; width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 var(--raster) 56px; }
.held { padding: clamp(30px, 5vh, 58px) 0 clamp(18px, 3vh, 30px); }
.held h1 {
  margin: 0 0 14px;
  font: 400 clamp(2.8rem, 7.5vw, 5.6rem)/0.95 var(--f-disp);
  text-transform: uppercase; letter-spacing: .005em;
}
.sub { margin: 0; max-width: 60ch; font-size: 17px; color: var(--ink-2); }
.sub a { color: var(--akzent); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Tasten ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 0; cursor: pointer; text-decoration: none;
  padding: 15px 24px;
  font: 800 13.5px/1 var(--f-body); letter-spacing: .06em; text-transform: uppercase;
  transition: transform 160ms var(--ease-out), background 160ms var(--ease-out), color 160ms var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn-voll { background: var(--akzent); color: #fff; }
.btn-voll:hover { background: var(--akzent-tief); }
.btn-rand { background: transparent; color: var(--ink); border: 2px solid var(--ink); padding: 13px 20px; }
.btn-rand:hover { background: var(--ink); color: var(--grund); }
.linkish {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--ink); font-weight: 700;
  text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px;
  text-decoration-color: var(--akzent);
  transition: color .15s var(--ease-out);
}
.linkish:hover { color: var(--akzent); }
.linkish.danger { text-decoration-color: var(--warnrot); }
.linkish.danger:hover { color: var(--warnrot); }

@media (prefers-reduced-motion: no-preference) {
  .brief.sheet-in { animation: vorhang .55s cubic-bezier(0.23, 1, 0.32, 1) both; }
  @keyframes vorhang { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0% 0); } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}

/* ---------- Werkbank ---------- */
.werkbank { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 44px); align-items: start; }
.spalte-form { display: grid; min-width: 0; }

.cv-import {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--papier); border: 2px solid var(--akzent);
  padding: 14px 18px; margin-bottom: 22px;
}
.cv-import p { margin: 0; flex: 1; min-width: 220px; font-size: 14.5px; }

.block {
  display: grid; grid-template-columns: 76px 1fr; gap: 0 clamp(10px, 2vw, 22px);
  border-top: 1px solid var(--linie);
  padding: clamp(18px, 3vh, 28px) 0;
}
.schritt {
  font: 400 clamp(44px, 5vw, 64px)/0.9 var(--f-disp);
  color: var(--akzent);
  font-variant-numeric: tabular-nums;
}
.block-in { display: grid; gap: 13px; min-width: 0; }
.block-in h2 { margin: 0 0 2px; font: 400 clamp(1.4rem, 2.4vw, 1.9rem)/1 var(--f-disp); text-transform: uppercase; }
.block-hint { margin: -6px 0 0; font-size: 13.5px; color: var(--ink-2); }

.zeile { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.feld { display: grid; gap: 6px; min-width: 0; }
.feld label { font: 700 12.5px/1.2 var(--f-body); }
.feld .opt { font-weight: 500; color: var(--ink-2); }
.feld input, .feld select, .feld textarea {
  width: 100%; min-width: 0;
  background: var(--papier);
  border: 1.5px solid var(--linie);
  padding: 11px 13px;
  transition: border-color 150ms var(--ease-out);
}
.feld input::placeholder, .feld textarea::placeholder { color: #5C6B99; opacity: 1; }
.feld input:focus-visible, .feld select:focus-visible, .feld textarea:focus-visible { outline: none; border-color: var(--akzent); }
.feld textarea { resize: vertical; line-height: 1.6; }
.feld select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%232457FF'%3E%3Cpath d='M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 14px; padding-right: 38px; }
.check { display: flex; gap: 9px; align-items: center; font-size: 14px; font-weight: 600; cursor: pointer; align-self: end; padding-bottom: 8px; }
.check input { width: 18px; height: 18px; accent-color: var(--akzent); cursor: pointer; }

/* Baustein-Wahl */
.wahl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.wahl {
  border: 1.5px solid var(--linie); cursor: pointer;
  background: var(--papier);
  padding: 11px 13px; display: grid; gap: 3px; text-align: left;
  transition: transform 140ms var(--ease-out), border-color 140ms var(--ease-out), background 140ms var(--ease-out), color 140ms var(--ease-out);
}
.wahl:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) {
  .wahl:hover { border-color: var(--ink); }
}
.wahl[aria-pressed="true"] { background: var(--akzent); border-color: var(--akzent); color: #fff; }
.wahl b { font-size: 14px; line-height: 1.25; }
.wahl small { font-size: 12px; color: var(--ink-2); line-height: 1.35; }
.wahl[aria-pressed="true"] small { color: rgba(255, 255, 255, .95); }

.luecken-status { margin: 0; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.luecken-status.offen { color: #9A5B00; }
.luecken-status.fertig { color: #0B7A3E; }
.werk-aktionen { display: flex; gap: 24px; padding: 18px 0 0 76px; border-top: 1px solid var(--linie); }

/* ---------- Briefvorschau ---------- */
.spalte-brief { position: sticky; top: 16px; display: grid; gap: 12px; min-width: 0; }
.sheet { background: var(--papier); color: var(--papier-ink); border: 2px solid var(--ink); }
.brief {
  padding: clamp(22px, 3.4vw, 50px) clamp(20px, 3.2vw, 46px);
  font-family: "Helvetica Neue", Arial, sans-serif; /* Geschäftsbrief bleibt Geschäftsbrief */
  font-size: 13.5px; line-height: 1.62;
  min-height: 540px;
  overflow-wrap: anywhere;
}
.brief .b-abs { font-size: 10.5px; color: #5a5e6b; border-bottom: .5px solid #c9ccd6; padding-bottom: 3px; margin-bottom: 26px; }
.brief .b-empf { white-space: pre-line; min-height: 68px; margin-bottom: 22px; }
.brief .b-datum { text-align: right; margin-bottom: 26px; }
.brief .b-betreff { font-weight: 700; margin-bottom: 18px; }
.brief .b-text p { margin: 0 0 13px; white-space: pre-line; }
.brief .b-gruss { margin-top: 20px; }
.brief .b-name { margin-top: 34px; }
.brief .b-anlagen { margin-top: 22px; font-size: 12px; color: #5a5e6b; }
.brief .luecke { background: #FFF3C9; padding: 0 4px; box-shadow: inset 0 0 0 1px #E8C55A; }
.brief .leer { color: #6A7080; }
.brief-hinweis { margin: 0; font-size: 12.5px; color: var(--ink-2); }
.cv-cta {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--linie); padding-top: 14px;
}
.cv-cta p { margin: 0; flex: 1; min-width: 220px; font-size: 14px; color: var(--ink-2); }
.cv-cta strong { color: var(--ink); }

.fuss { border-top: 1px solid var(--linie); padding: 16px var(--raster) 26px; }
.fuss p { margin: 0; font-size: 13px; color: var(--ink-2); }
.fuss a { color: var(--ink); font-weight: 600; text-decoration: none; }
.fuss a:hover { color: var(--akzent); }

/* Origin-Sperre */
.sperre { max-width: 560px; margin: 14vh auto; padding: 0 var(--raster); display: grid; gap: 14px; }
.sperre h1 { margin: 0; font: 400 2.4rem/1 var(--f-disp); text-transform: uppercase; }
.sperre p { margin: 0; color: var(--ink-2); }
.sperre .btn { justify-self: start; }

/* ---------- Responsiv ---------- */
@media (max-width: 1060px) {
  .werkbank { grid-template-columns: 1fr; }
  .spalte-brief { position: static; }
  .kopf-export span { display: none; }
  .kopf-export { padding: 12px 14px; }
}
@media (max-width: 640px) {
  .zeile { grid-template-columns: 1fr; }
  .block { grid-template-columns: 1fr; gap: 6px; }
  .schritt { font-size: 38px; }
  .werk-aktionen { padding-left: 0; }
  .kopf-marke { display: none; }
}

/* ---------- Druck: nur der Brief, echtes A4 ---------- */
#print-root { display: none; }
@media print {
  @page { size: A4; margin: 0; }
  body { background: #fff !important; }
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block !important; }
  #print-root .brief {
    width: 210mm; min-height: 296mm; margin: 0; border: 0;
    padding: 27mm 20mm 20mm 25mm;
    font-size: 11pt; line-height: 1.55;
  }
  #print-root .brief .b-abs { font-size: 8pt; margin-bottom: 14mm; }
  #print-root .brief .b-empf { margin-bottom: 12mm; }
  #print-root .brief .luecke { background: none; box-shadow: none; }
}
