/* vorlagenfix.de – Office-Stil */
:root {
  --blue: #2b579a; --blue-d: #1e3f73; --blue-l: #e8eef8; --acc: var(--blue);
  --ink: #201f1e; --muted: #605e5c; --line: #e1dfdd; --bg: #f3f2f1; --card: #fff;
  --radius: 6px; --shadow: 0 1.6px 3.6px rgba(0,0,0,.13), 0 .3px .9px rgba(0,0,0,.1);
  --shadow-l: 0 6.4px 14.4px rgba(0,0,0,.14), 0 1.2px 3.6px rgba(0,0,0,.1);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
.c-kuendigung { --acc: #2b579a; --acc-l: #e8eef8; }
.c-bewerbung { --acc: #b7472a; --acc-l: #fbece7; }
.c-rechnung { --acc: #217346; --acc-l: #e6f3ec; }
.c-planer { --acc: #7719aa; --acc-l: #f3e8f9; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 16px/1.55 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
a { color: var(--blue); }
a:hover { color: var(--blue-d); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; font-weight: 600; }
:focus-visible { outline: 2px solid #0f6cbd; outline-offset: 2px; }
.wrap { width: min(1140px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 8px 14px; z-index: 99; }
.skip:focus { left: 8px; top: 8px; }

/* Kopf */
.site-head { background: #fff; border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 20px; height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.15rem; letter-spacing: -.2px; }
.logo svg { width: 30px; height: 30px; flex: none; }
.logo span { color: var(--muted); font-weight: 400; }
.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a { color: var(--ink); text-decoration: none; padding: 8px 12px; border-radius: 4px; font-size: .95rem; }
.nav a:hover, .nav a[aria-current] { background: var(--blue-l); color: var(--blue-d); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 4px; padding: 6px 10px; font: inherit; cursor: pointer; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 600; font-size: .95rem; padding: 10px 18px; border-radius: 4px; border: 1px solid transparent; background: var(--blue); color: #fff; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--blue-d); color: #fff; }
.btn-ghost { background: #fff; color: var(--blue-d); border-color: #c8c6c4; }
.btn-ghost:hover { background: var(--blue-l); color: var(--blue-d); }

/* Hero */
.hero { background: linear-gradient(180deg, #dfe9f7 0%, #f3f2f1 100%); padding: 56px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2rem, 4.2vw, 3rem); letter-spacing: -.8px; font-weight: 700; margin-bottom: .4em; }
.hero p.lead { font-size: 1.15rem; color: #3b3a39; max-width: 34em; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 18px; }
.ticks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; color: var(--muted); font-size: .92rem; }
.ticks li::before { content: "✓"; color: #107c10; font-weight: 700; margin-right: 6px; }
.mock { background: #fff; border-radius: 8px; box-shadow: var(--shadow-l); overflow: hidden; border: 1px solid var(--line); }
.mock-bar { background: var(--blue); color: #fff; font-size: .8rem; padding: 7px 12px; display: flex; gap: 8px; align-items: center; }
.mock-bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.55); display: inline-block; }
.mock-body { display: grid; grid-template-columns: 42% 58%; min-height: 280px; }
.mock-form { padding: 14px; background: #faf9f8; border-right: 1px solid var(--line); }
.mock-form b { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-bottom: 8px; }
.mock-form span { display: block; height: 22px; border: 1px solid #c8c6c4; background: #fff; border-radius: 3px; margin-bottom: 9px; }
.mock-form span.s { width: 60%; }
.mock-sheet { background: #d0d0cf; padding: 14px; display: flex; justify-content: center; }
.mock-paper { background: #fff; width: 100%; max-width: 190px; padding: 14px 12px; box-shadow: var(--shadow); }
.mock-paper i { display: block; height: 5px; background: #d2d0ce; margin-bottom: 6px; border-radius: 2px; }
.mock-paper i.d { background: #2b579a; width: 55%; height: 6px; }
.mock-paper i.m { width: 70%; }
.mock-paper i.sm { width: 40%; }
.mock-paper i.gap { background: none; height: 10px; }

/* Abschnitte */
.sec { padding: 44px 0; }
.sec.white { background: #fff; }
.sec h2 { font-size: 1.6rem; letter-spacing: -.3px; }
.sec .sub { color: var(--muted); margin: -.2em 0 1.6em; max-width: 44em; }
.search { display: flex; margin: 0 0 24px; max-width: 460px; }
.search input { flex: 1; font: inherit; padding: 10px 14px; border: 1px solid #8a8886; border-radius: 4px; background: #fff; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--acc); border-radius: var(--radius); padding: 18px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-l); color: var(--ink); }
.card .ico { width: 40px; height: 40px; border-radius: 8px; background: var(--acc-l); color: var(--acc); display: grid; place-items: center; margin-bottom: 12px; }
.card .ico svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 1.05rem; margin-bottom: .3em; }
.card p { margin: 0 0 14px; font-size: .92rem; color: var(--muted); flex: 1; }
.card .go { color: var(--acc); font-weight: 600; font-size: .9rem; }
.card[hidden] { display: none; }
.cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.cat { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-decoration: none; color: var(--ink); }
.cat:hover { border-color: var(--acc); background: var(--acc-l); color: var(--ink); }
.cat .ico { width: 44px; height: 44px; border-radius: 8px; background: var(--acc); color: #fff; display: grid; place-items: center; flex: none; }
.cat .ico svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cat b { display: block; }
.cat small { color: var(--muted); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; counter-reset: s; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; position: relative; }
.step::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 700; margin-bottom: 10px; }
.step h3 { font-size: 1.05rem; }
.step p { margin: 0; color: var(--muted); font-size: .94rem; }
.feat { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.feat h3 { font-size: 1.02rem; }
.feat p { margin: 0; color: var(--muted); font-size: .94rem; }

/* FAQ */
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; }
.faq summary { cursor: pointer; padding: 14px 18px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; color: var(--blue); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq summary::-webkit-details-marker { display: none; }
.faq details p { margin: 0; padding: 0 18px 16px; color: #3b3a39; }

/* Seitenkopf Unterseiten */
.crumbs { font-size: .88rem; color: var(--muted); padding: 18px 0 0; }
.crumbs a { color: var(--muted); }
.page-head { padding: 8px 0 28px; }
.page-head h1 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); letter-spacing: -.5px; margin-bottom: .3em; }
.page-head p { color: var(--muted); max-width: 46em; margin: 0; font-size: 1.05rem; }
.prose { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px clamp(18px, 4vw, 40px); max-width: 860px; margin: 0 auto 40px; }
.prose h1 { font-size: 1.9rem; }
.prose h2 { font-size: 1.25rem; margin-top: 1.6em; }
.prose h3 { font-size: 1.05rem; margin-top: 1.2em; }
.prose p, .prose li { color: #323130; }

/* Editor-Seite */
.appbar { background: var(--acc); color: #fff; }
.appbar .wrap { display: flex; align-items: center; gap: 14px; min-height: 48px; padding: 6px 0; flex-wrap: wrap; }
.appbar .doc-ico { width: 26px; height: 26px; background: #fff; color: var(--acc); border-radius: 4px; display: grid; place-items: center; flex: none; }
.appbar .doc-ico svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.appbar h1 { margin: 0; font-size: 1rem; font-weight: 600; letter-spacing: 0; }
.appbar .crumb { margin-left: auto; font-size: .85rem; opacity: .9; }
.appbar .crumb a { color: #fff; }
.ribbon { background: #fff; border-bottom: 1px solid var(--line); }
.ribbon .wrap { display: flex; gap: 0; align-items: stretch; padding: 8px 0; overflow-x: auto; }
.rgroup { display: flex; flex-direction: column; justify-content: space-between; padding: 0 14px; border-right: 1px solid var(--line); }
.rgroup:first-child { padding-left: 0; }
.rgroup:last-child { border-right: 0; }
.rbtns { display: flex; gap: 4px; }
.rlabel { text-align: center; font-size: .7rem; color: var(--muted); margin-top: 4px; }
.rb { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 76px; padding: 6px 8px; font: inherit; font-size: .78rem; background: none; border: 1px solid transparent; border-radius: 4px; cursor: pointer; color: var(--ink); text-align: center; white-space: nowrap; }
.rb:hover { background: var(--acc-l, var(--blue-l)); border-color: #c8c6c4; }
.rb svg { width: 26px; height: 26px; stroke: var(--acc); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.rb.primary { background: var(--acc); color: #fff; }
.rb.primary svg { stroke: #fff; }
.rb.primary:hover { filter: brightness(.92); background: var(--acc); }

.workspace { display: grid; grid-template-columns: minmax(340px, 430px) 1fr; height: max(560px, calc(100vh - 210px)); background: #e1dfdd; }
.form-panel { background: #faf9f8; border-right: 1px solid #c8c6c4; overflow-y: auto; padding: 14px 18px 40px; }
.preview-panel { overflow: auto; padding: 24px 16px 40px; }
.sheet-wrap { margin: 0 auto; }
.sheet { box-shadow: var(--shadow-l); }
.grp { margin-bottom: 18px; }
.grp h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .6px; color: var(--acc); border-bottom: 2px solid var(--acc); padding-bottom: 4px; margin: 14px 0 10px; }
.grp .grid, .list-card .grid { display: flex; flex-wrap: wrap; gap: 10px 10px; }
.field { flex: 1 1 100%; min-width: 0; }
.field.w-half { flex: 1 1 calc(50% - 5px); }
.field.w-third { flex: 1 1 calc(33% - 7px); }
.field label { display: block; font-size: .83rem; font-weight: 600; color: #323130; margin-bottom: 3px; }
.field input[type=text], .field input[type=date], .field select, .field textarea { width: 100%; font: inherit; font-size: .95rem; padding: 8px 10px; border: 1px solid #8a8886; border-radius: 3px; background: #fff; color: var(--ink); }
.field textarea { resize: vertical; min-height: 70px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--acc); outline-offset: -1px; border-color: transparent; }
.field.check { display: flex; align-items: flex-start; gap: 9px; }
.field.check input { margin-top: 4px; width: 17px; height: 17px; accent-color: var(--acc); flex: none; }
.field.check label { font-weight: 400; margin: 0; flex: 1; }
.field.check .hint { flex-basis: 100%; }
.hint { font-size: .78rem; color: var(--muted); margin: 3px 0 0; }
.field[hidden] { display: none; }
.list-card { border: 1px solid var(--line); background: #fff; border-radius: 4px; padding: 10px; margin-bottom: 10px; }
.list-head { display: flex; justify-content: space-between; align-items: center; font-size: .78rem; font-weight: 700; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .4px; }
.btn-add { font: inherit; font-size: .88rem; color: var(--acc); background: #fff; border: 1px dashed var(--acc); border-radius: 4px; padding: 8px 12px; cursor: pointer; width: 100%; font-weight: 600; }
.btn-add:hover { background: var(--acc-l, var(--blue-l)); }
.btn-rm { font: inherit; font-size: .78rem; color: #a4262c; background: none; border: 0; cursor: pointer; text-decoration: underline; padding: 0; text-transform: none; letter-spacing: 0; font-weight: 400; }
.imgpick img { display: block; max-width: 110px; margin: 8px 0; border: 1px solid var(--line); }
.imgpick img[hidden], .btn-rm[hidden] { display: none; }
.view-tabs { display: none; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: #323130; color: #fff; padding: 10px 18px; border-radius: 4px; opacity: 0; pointer-events: none; transition: .2s; z-index: 50; font-size: .92rem; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.content { padding: 40px 0 20px; }
.content .cols { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; }
.content article { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px clamp(18px, 3vw, 34px); }
.content h2 { font-size: 1.3rem; margin-top: 1.4em; }
.content h2:first-child { margin-top: 0; }
.content p, .content li { color: #323130; }
.content aside .box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.content aside h2 { font-size: 1rem; margin: 0 0 .6em; }
.content aside ul { list-style: none; padding: 0; margin: 0; }
.content aside li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.content aside li:last-child { border: 0; }
.content aside a { text-decoration: none; }
.disclaimer { font-size: .85rem; color: var(--muted); background: #fff8e5; border: 1px solid #f0d78c; border-radius: var(--radius); padding: 12px 14px; }

/* Fuß */
.foot { background: #fff; border-top: 1px solid var(--line); margin-top: 40px; padding: 32px 0 24px; font-size: .92rem; color: var(--muted); }
.foot .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.foot h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .5px; color: var(--ink); margin-bottom: .6em; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { padding: 3px 0; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--blue-d); text-decoration: underline; }
.foot .legal { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .82rem; }

.notfound { text-align: center; padding: 90px 0; }
.notfound h1 { font-size: 4rem; margin: 0; color: var(--blue); }

@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .mock { display: none; }
  .content .cols { grid-template-columns: 1fr; }
  .foot .cols { grid-template-columns: 1fr 1fr; }
  .workspace { display: block; height: auto; background: var(--bg); }
  .view-tabs { display: flex; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
  .view-tabs button { flex: 1; font: inherit; font-weight: 600; padding: 12px; background: none; border: 0; border-bottom: 3px solid transparent; cursor: pointer; color: var(--muted); }
  .view-tabs button[aria-selected=true] { color: var(--acc); border-bottom-color: var(--acc); }
  .workspace[data-show=form] .preview-panel, .workspace[data-show=preview] .form-panel { display: none; }
  .form-panel { border: 0; }
  .preview-panel { padding: 16px 8px 30px; background: #e1dfdd; }
}
@media (max-width: 720px) {
  .nav { display: none; position: absolute; left: 0; right: 0; top: 60px; background: #fff; flex-direction: column; padding: 8px 16px 14px; border-bottom: 1px solid var(--line); z-index: 30; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav-toggle { display: block; }
  .site-head { position: relative; }
  .appbar .crumb { display: none; }
  .foot .cols { grid-template-columns: 1fr; }
}
@media print { .site-head, .appbar, .ribbon, .view-tabs, .content, .foot, .toast, .crumbs { display: none !important; } }

/* SEO-Bereiche */
.linklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 24px; }
.linklist li { border-bottom: 1px solid var(--line); padding: 8px 0; }
.linklist a { text-decoration: none; font-weight: 600; }
.linklist a:hover { text-decoration: underline; }
.seo-text { max-width: 860px; }
.seo-text h2 { margin-top: 1.4em; }
.seo-text h2:first-child { margin-top: 0; }
.seo-text p { color: #323130; }
.tablewrap { overflow-x: auto; margin: 0 0 8px; }
.ft { width: 100%; border-collapse: collapse; font-size: .94rem; }
.ft th, .ft td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ft th { background: var(--acc-l, var(--blue-l)); color: var(--acc); }
.hint-small { font-size: .82rem; color: var(--muted); }
.muster { border: 1px solid var(--line); background: #fff; border-radius: var(--radius); padding: 22px clamp(14px, 3vw, 30px); margin: 0 0 8px; overflow-x: auto; box-shadow: var(--shadow); font-size: .9em; }
.muster .doc { min-width: 0; }
.also { font-size: .88rem; color: var(--muted); margin-top: 20px; }
.foot .cols { grid-template-columns: 1.3fr 1fr 1fr 1fr; }
@media (max-width: 960px) { .foot .cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .foot .cols { grid-template-columns: 1fr; } }
