/* Bewerbung schreiben (public/anschreiben.js): nur die eigenen Bildschirme in der Fragekarte. Gerüst und Blätter: builder.css. Farben, Schrift, Abstände nur als Tokens aus styles.css. */
.as-start, .as-mat, .as-fein, .as-fertig, .as-wahl, .as-edit { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); } /* nie breiter als die Karte */

/* Vorschlag von Zusi: eine große Karte, ein Tipp */
.as-vorschlag { all: unset; box-sizing: border-box; display: grid; gap: var(--s2); padding: var(--s5); border-radius: var(--r-m); background: var(--night); color: #fff; cursor: pointer; box-shadow: var(--sh-2); transition: transform var(--fast) var(--ease); }
.as-vorschlag:hover { transform: translateY(-2px); }
.as-vorschlag:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
.as-vorschlag .kicker { color: var(--lime); display: flex; align-items: center; gap: var(--s1); }
.as-vorschlag .kicker svg { width: 16px; height: 16px; }
.as-vorschlag b { font-size: var(--t-l); line-height: 1.2; }
.as-vorschlag small { color: var(--night-muted); font-size: var(--t-s); }
.as-vorschlag .btn { justify-self: start; margin-top: var(--s2); }
/* Auf der dunklen Karte: Knopf in Lime, Note-Ring hell, sonst sieht man beides nicht */
.as-vorschlag:not(.leise) .btn { background: var(--lime); color: var(--ink); }
.as-vorschlag:not(.leise) .btn svg { color: var(--ink); }
.as-vorschlag:not(.leise) .ring .t { stroke: var(--night-2); }
.as-vorschlag:not(.leise) .ring .v { stroke: var(--lime); }

/* Feinschliff und Absatz ändern: Teile aus coach.css, die die Seite ohne Konto (gast.html) nicht lädt */
.as-fein .ue-res-top { display: flex; align-items: center; gap: var(--s5); }
.as-fein .ue-res-top h2 { font-size: var(--t-l); letter-spacing: -.03em; outline: none; margin: 2px 0 6px; }
.as-fein .ue-bal { display: grid; gap: var(--s2); padding: var(--s4); border-radius: var(--r-m); background: var(--night); }
.as-fein .rp-bar { display: grid; grid-template-columns: 150px minmax(0, 1fr) 36px; gap: var(--s3); align-items: center; font-size: var(--t-xs); font-weight: 700; color: var(--night-muted); }
.as-fein .rp-bar div { height: 10px; border-radius: 10px; background: var(--night-2); overflow: hidden; }
.as-fein .rp-bar i { display: block; height: 100%; width: var(--w); border-radius: 10px; background: var(--lime); }
.as-fein .rp-bar b { color: #fff; text-align: right; font-size: var(--t-s); }
.as-fein .ue-vn { display: grid; gap: var(--s2); }
.as-fein .ue-vn > div { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.as-fein .ue-vn p { padding: var(--s3) var(--s4); border-radius: var(--r-m); font-size: var(--t-s); }
.as-fein .ue-vn small { display: flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.as-fein .ue-vn small svg { width: 13px; height: 13px; }
.as-fein .ue-vn .vor { background: var(--soft); color: var(--ink-2); }
.as-fein .ue-vn .vor small { color: var(--muted); }
.as-fein .ue-vn .nach { background: var(--night); color: #fff; }
.as-fein .ue-vn .nach small { color: var(--lime); }
.as-fein .ue-vn .btn { grid-column: 1 / -1; justify-self: start; }
.as-fein .ue-fehler { display: grid; gap: 6px; list-style: none; font-size: var(--t-s); }
.as-fein .ue-fehler li { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.as-fein .ue-fehler svg { width: 14px; height: 14px; color: var(--muted); }
.as-fein .ue-fehler s { color: var(--muted); }
.as-edit .ue-live:empty { display: none; }
.as-edit .ue-live { padding: var(--s3) var(--s4); border-radius: var(--r-m); background: var(--lime-soft); font-size: var(--t-s); }
.as-edit .ue-live ul { padding-left: 1.2em; display: grid; gap: 4px; }
@media (max-width: 720px) {
  .as-fein .ue-vn > div { grid-template-columns: 1fr; }
  .as-fein .rp-bar { grid-template-columns: 110px minmax(0, 1fr) 30px; }
  .as-fein .ue-res-top { gap: var(--s3); }
}

/* Absender: wer schreibt? (ohne Lebenslauf) */
.as-absender { display: grid; gap: var(--s3); padding: var(--s4); border-radius: var(--r-m); background: var(--lime-soft); }
.as-absender h3 { font-size: var(--t-m); }
.as-absender, .as-absender > *, .as-absender .field, [data-absbox] { min-width: 0; }
.as-absender .input { width: 100%; min-width: 0; }
.as-absender-ok { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2); padding: var(--s3) var(--s4); border-radius: var(--r-m); background: var(--soft); font-size: var(--t-s); }
.as-absender-ok svg { display: inline-block; width: 16px; height: 16px; margin-right: 4px; vertical-align: -3px; }
.as-vorschlag.leise { background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.as-vorschlag.leise .kicker { color: var(--muted); }
.as-vorschlag.leise small { color: var(--muted); }
.as-v-kopf { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.as-v-kopf > span:not(.ring) { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; min-width: 0; flex: 1; }
.as-v-kopf > .ring { flex: none; } /* sonst nahm der Ring die halbe Karte und „Koch/Köchin“ brach am Handy mitten im Wort um */
@media (max-width: 480px) { .as-v-kopf.lang { flex-direction: column; align-items: flex-start; } .as-v-kopf.lang b { font-size: var(--t-m); } } /* „Serverinfrastruktur“ passt nicht neben den Ring */
.as-vorschlag { grid-template-columns: minmax(0, 1fr); }
.as-vorschlag b { overflow-wrap: break-word; hyphens: auto; } /* lange Jobtitel („IT-Systemtechniker/in …“) brechen in der Karte um */
.as-grund { font-style: normal; }

.as-mehr summary { cursor: pointer; color: var(--ink-2); font-size: var(--t-s); padding: var(--s2) 0; }
.as-liste { display: grid; gap: var(--s1); }
.as-liste > * { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: var(--s3); padding: var(--s3); border-radius: var(--r-s); cursor: pointer; }
.as-liste > *:hover, .as-liste > *:focus-visible { background: var(--soft); }
.as-liste span:not(.ring) { display: grid; grid-template-columns: minmax(0, 1fr); flex: 1; min-width: 0; overflow-wrap: break-word; }
.as-liste .ring { flex: none; width: 44px; height: 44px; } /* kleiner Ring, damit „Frühstückskoch“ am Handy ganz in die Zeile passt */
.as-liste .ring b { font-size: 15px; }
.as-liste b { hyphens: auto; }
.as-liste small { color: var(--muted); }
.as-liste > * > svg { width: 18px; height: 18px; color: var(--muted); }

/* Andere Wege: drei Kacheln, darunter das passende Feld */
.as-wege { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: var(--s2); } /* Handy: untereinander statt aus dem Bild */
.as-wege button { all: unset; box-sizing: border-box; display: grid; justify-items: start; gap: 2px; padding: var(--s3); border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface); cursor: pointer; }
.as-wege button svg { width: 20px; height: 20px; margin-bottom: var(--s1); }
.as-wege button small { color: var(--muted); font-size: var(--t-xs); }
.as-wege button[aria-selected="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.as-wege button:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
.as-weg { display: grid; gap: var(--s3); }
.as-datei { cursor: pointer; }

/* Was du schon hast */
.as-hab, .as-check { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.as-hab li, .as-check li { display: flex; align-items: center; gap: var(--s2); color: var(--muted); }
.as-hab li svg, .as-check li svg { width: 18px; height: 18px; flex: none; }
.as-hab li.ok, .as-check li.ok { color: var(--ink); }
.as-hab li.ok svg, .as-check li.ok svg { color: var(--lime-ink); }
.as-check li span { flex: 1; }
.as-drop { display: grid; justify-items: center; text-align: center; gap: var(--s1); padding: var(--s5); border: 2px dashed var(--line); border-radius: var(--r-m); background: var(--soft); cursor: pointer; transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease); }
.as-drop svg { width: 24px; height: 24px; }
.as-drop small { color: var(--muted); }
.as-drop:hover, .as-drop.over { border-color: var(--ink); background: var(--lime-soft); }
.as-drop:focus-within { outline: 3px solid var(--lime); outline-offset: 2px; }
.as-notiz { display: grid; gap: var(--s2); }
.as-weiter { align-items: center; }

/* Selbst schreiben: zwei Fassungen */
.as-note { display: flex; align-items: center; gap: var(--s3); }
.as-fassung { all: unset; box-sizing: border-box; display: grid; gap: var(--s2); padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); cursor: pointer; }
.as-fassung p { margin: 0; line-height: 1.55; }
.as-fassung.staerker { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink), var(--sh-1); }
.as-fassung.staerker .kicker { color: var(--lime-ink); }
.as-fassung:hover { background: var(--soft); }
.as-fassung:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }

/* Lernen unter dem Blatt */
.as-lernen { padding: var(--s3) var(--s4); border-radius: var(--r-s); background: var(--surface); border: 1px solid var(--line); }
.as-lernen ul { list-style: none; margin: var(--s2) 0 0; padding: 0; display: grid; gap: var(--s1); }
.as-lernen button { all: unset; cursor: pointer; font-size: var(--t-s); line-height: 1.45; text-decoration: underline dotted var(--field); text-underline-offset: 3px; }
.as-lernen button b { margin-right: var(--s1); }
.as-lernen button:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }

/* Fertig: Ausgaben und Angebote */
.as-aus { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
.as-fertig > * { min-width: 0; }
.as-aus-k b { overflow-wrap: anywhere; hyphens: auto; }
.as-aus-k { all: unset; box-sizing: border-box; display: grid; gap: 2px; align-content: start; padding: var(--s4); border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); cursor: pointer; color: var(--ink); text-decoration: none; }
.as-aus-k:first-child { background: var(--night); color: #fff; border-color: var(--night); }
.as-aus-k:first-child small { color: var(--night-muted); }
.as-aus-k svg { width: 22px; height: 22px; margin-bottom: var(--s1); }
.as-aus-k small { color: var(--muted); font-size: var(--t-xs); }
.as-aus-k[disabled] { opacity: .5; cursor: not-allowed; }
.as-aus-k:hover:not([disabled]) { box-shadow: var(--sh-2); }
.as-aus-k:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
.as-mail { padding: var(--s3) var(--s4); background: var(--soft); border-radius: var(--r-s); font-size: var(--t-s); }
.as-zeug { display: grid; gap: var(--s3); }
.as-zliste { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s1); }
.as-zliste li { display: flex; align-items: center; gap: var(--s2); }
.as-zliste li span { flex: 1; }
.as-zliste svg { width: 18px; height: 18px; }
.as-danach-k { margin: var(--s3) 0 0; }
.as-danach { display: grid; gap: var(--s2); }
.as-angebot { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--r-m); border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.as-angebot > svg { width: 22px; height: 22px; flex: none; }
.as-angebot > svg:last-child { width: 18px; height: 18px; color: var(--muted); }
.as-angebot span { display: grid; gap: 2px; flex: 1; }
.as-angebot small { color: var(--muted); font-size: var(--t-xs); line-height: 1.4; }
.as-angebot:hover { background: var(--soft); }
.as-angebot:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
.as-angebot[disabled] { opacity: .6; cursor: default; }

/* Ersatz-Blatt, solange die Satz-Engine fehlt */
.as-papier { font: 10.5px/1.5 Helvetica, Arial, sans-serif; color: #121412; display: grid; gap: 10px; }
.as-papier .abs { font-weight: 700; font-size: 13px; }
.as-papier .dat { text-align: right; }
.as-papier .mark { background: var(--lime-soft); box-shadow: 0 0 0 4px var(--lime-soft); }
.as-papier .ph { display: block; height: 7px; margin: 5px 0; border-radius: 4px; background: #e4e4de; }

@media (max-width: 560px) {
  .as-wege, .as-aus { grid-template-columns: 1fr; }
  .as-wege button { grid-template-columns: auto 1fr; align-items: center; column-gap: var(--s2); }
  .as-wege button svg { grid-row: span 2; margin: 0; }
}
/* Schmale Fragekarte (Panel mit Seitenleiste): Wege untereinander wie am Handy */
.as-start, .as-fertig { container-type: inline-size; }
@container (max-width: 380px) {
  .as-wege, .as-aus { grid-template-columns: 1fr; }
  .as-wege button { grid-template-columns: auto 1fr; align-items: center; column-gap: var(--s2); }
  .as-wege button svg { grid-row: span 2; margin: 0; }
}
@media (prefers-reduced-motion: reduce) { .as-vorschlag, .as-drop { transition: none; } .as-vorschlag:hover { transform: none; } }

/* Stelle im Detail (panel.js), Reiter „Bewerbung“: Hinweis auf den Assistenten über der schnellen E-Mail */
.as-hin { display: grid; gap: var(--s3); justify-items: start; padding: var(--s4) var(--s5); margin-bottom: var(--s5); border-radius: var(--r-m); background: var(--soft); }
.as-hin p { margin: 0; }
.as-hin-h { margin: 0 0 var(--s2); font-size: var(--t-m); }

/* Ohne Konto (panel/gast.html): eigene Ansicht statt der Treffer */
.schreib:not([hidden]) { display: grid; gap: var(--s4); }
.schreib-zurueck { justify-self: start; }
.schreib-msg { margin: 0; }

/* Fertig: drei klare nächste Schritte (herunterladen, per E-Mail senden, als beworben markieren) */
.as-schritte { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.as-schritte > li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: var(--s3); padding: var(--s4); border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); }
.as-schritte > li:first-child { border-color: var(--ink); box-shadow: var(--sh-1); }
.as-nr { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--night); color: #fff; font-weight: 800; font-size: var(--t-s); }
.as-schritte b { display: block; font-size: var(--t-m); }
.as-schritte small { display: block; margin-top: 2px; color: var(--muted); font-size: var(--t-xs); overflow-wrap: break-word; }
.as-schritte .btns { margin-top: var(--s3); }
.as-schritte .btns p { margin: 0; font-size: var(--t-s); }
.as-schritte > li > div { min-width: 0; }
.as-schritte .btn { max-width: 100%; white-space: normal; text-align: left; overflow-wrap: break-word; }
/* Runde 6: Hinweis zum Anhängen, Schritt „Abgeschickt?“ leuchtet nach „E-Mail öffnen“, Wiedereinstieg mit zwei Knöpfen */
.as-anhang { display: flex; gap: var(--s2); align-items: flex-start; margin-top: var(--s2); padding: var(--s2) var(--s3); border-radius: var(--r-s); background: var(--soft); font-size: var(--t-xs); font-weight: 600; color: var(--ink-2); }
.as-anhang svg { flex: none; width: 16px; height: 16px; margin-top: 1px; }
.as-schritte > li.jetzt { border-color: var(--night); background: var(--lime-soft); box-shadow: var(--sh-1); }
.as-schritte .btns p svg { width: 16px; height: 16px; vertical-align: -3px; }
.as-wieder { margin-top: var(--s2); }

/* Bewerbung bearbeiten wie in Word (dokumentBearbeiten in anschreiben.js): weißes Blatt in der Schrift des Briefs, Felder zum Hineinschreiben */
.as-doc { position: fixed; inset: 0; z-index: 80; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); justify-items: center; overflow: hidden; background: rgba(18, 20, 18, .55); }
.as-doc-in { display: grid; grid-template-rows: auto minmax(0, 1fr); min-width: 0; min-height: 0; width: min(980px, 100%); height: 100%; background: var(--soft); }
.as-doc-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); background: var(--surface); }
.as-doc-kopf h2 { display: flex; align-items: center; gap: var(--s2); font-size: var(--t-l); letter-spacing: -.02em; }
.as-doc-kopf h2 svg { width: 20px; height: 20px; }
.as-doc-kopf p { flex: 1 1 200px; color: var(--muted); }
.as-doc-kopf .btns { display: flex; gap: var(--s2); margin-left: auto; }
.as-doc-scroll { overflow: auto; overscroll-behavior: contain; padding: var(--s5) var(--s4) var(--s7); }
.as-doc-blatt { display: grid; gap: 14px; width: min(100%, 760px); margin: 0 auto; padding: clamp(24px, 6vw, 72px); background: #fff; color: #111; box-shadow: var(--sh-2); font-family: "Times New Roman", Times, Georgia, serif; font-size: 17px; line-height: 1.5; }
.as-doc-ro { color: #555; }
.as-doc-name { margin-top: var(--s4); color: #111; }
.as-doc-f { min-height: 1.5em; padding: 2px 6px; margin: 0 -6px; border-radius: 6px; outline: 1px dashed transparent; white-space: pre-wrap; overflow-wrap: anywhere; cursor: text; }
.as-doc-f:hover { outline-color: var(--ring); }
.as-doc-f:focus { outline: 2px solid var(--lime-ink); background: var(--lime-soft); }
.as-doc-f.betreff { font-weight: 700; }
.as-doc-f.text { min-height: 12em; }
.as-doc-beilagen { display: grid; gap: 2px; margin-top: var(--s4); }
@media (max-width: 640px) {
  .as-doc-kopf p { display: none; }
  .as-doc-scroll { padding: var(--s3) 0 var(--s6); }
  .as-doc-blatt { font-size: 16px; box-shadow: none; }
}

/* Bewerbung bearbeiten abgerundet (Paul 28.10.2026: „sieht so eckig aus“): ab Tablet ein Fenster mit Abstand und runden Ecken wie die
   anderen Fenster, das Blatt mit leichten Ecken; am Handy ganzer Bildschirm, oben rund */
.as-doc-in { overflow: hidden; }
.as-doc-blatt { border-radius: 6px; }
@media (min-width: 641px) {
  .as-doc { padding: var(--s4); }
  .as-doc-in { border-radius: var(--r-l); box-shadow: var(--sh-3); }
  .as-doc-kopf { padding: var(--s3) var(--s5); }
}
@media (max-width: 640px) {
  .as-doc { padding-top: var(--s2); }
  .as-doc-in { border-radius: var(--r-l) var(--r-l) 0 0; }
  .as-doc-blatt { border-radius: 0; }
}
