/* ==========================================================================
   PDF Libre – Stylesheet
   ========================================================================== */

@font-face { font-family: "Bricolage Grotesque"; src: url("/fonts/bricolage-grotesque-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("/fonts/bricolage-grotesque-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("/fonts/bricolage-grotesque-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("/fonts/source-sans-3-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("/fonts/source-sans-3-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("/fonts/source-sans-3-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #f3f5f9;
  --surface: #ffffff;
  --ink: #16213d;
  --ink-2: #4a5470;
  --ink-3: #6b7490;
  --line: #dde2ec;
  --line-2: #c8cfdd;
  --brand: #2b4bdb;
  --brand-ink: #1e37a8;
  --brand-tint: #e8edff;
  --danger: #c7322b;
  --danger-tint: #fdecea;
  --ok: #13906a;

  --c-organize: #d9541e;
  --c-optimize: #13906a;
  --c-topdf: #2f62d8;
  --c-frompdf: #7447d1;
  --c-edit: #c23b78;
  --c-security: #243152;

  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 16px;
  --shadow: 0 1px 2px rgba(22, 33, 61, 0.06), 0 6px 20px -8px rgba(22, 33, 61, 0.14);
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.2vw, 3rem); font-weight: 800; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.75rem); font-weight: 700; }
h3 { font-size: 1.125rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-ink); }
button, input, select { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: var(--r-sm); z-index: 100; }
.skip:focus { top: 12px; color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: var(--r); padding: 10px 18px;
  font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: background-color .15s, box-shadow .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn--primary { background: var(--brand); color: #fff; box-shadow: 0 2px 0 var(--brand-ink); }
.btn--primary:hover { background: var(--brand-ink); color: #fff; }
.btn--primary:disabled { background: var(--line-2); box-shadow: none; cursor: not-allowed; }
.btn--lg { padding: 15px 28px; font-size: 1.125rem; border-radius: 12px; }
.btn--block { width: 100%; }
.btn--sm { padding: 7px 12px; font-size: .9375rem; }
.btn--ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); }
.btn--ghost:hover { border-color: var(--ink-3); color: var(--ink); }
.btn--link { background: none; color: var(--ink-2); font-weight: 600; text-decoration: underline; padding: 8px; }
.btn--link:hover { color: var(--ink); }

/* ---------- Header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header__bar { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 800 1.25rem/1 var(--display); letter-spacing: -0.02em; }
.brand:hover { color: var(--ink); }
.brand__mark { width: 26px; height: 30px; color: var(--brand); }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a, .nav__all {
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9875rem;
  padding: 8px 12px; border-radius: var(--r-sm); background: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
}
.nav a:hover, .nav__all:hover, .nav a[aria-current="page"] { background: var(--bg); }
.nav__all { color: var(--brand); }
.nav__all svg, .nav__burger svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.nav__all[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav__burger { display: none; margin-left: auto; background: none; border: 0; padding: 8px; cursor: pointer; border-radius: var(--r-sm); }
.nav__burger svg { width: 26px; height: 26px; }

.mega { border-top: 1px solid var(--line); background: var(--surface); box-shadow: 0 16px 30px -18px rgba(22,33,61,.35); }
.mega__grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 24px; padding: 24px 0 28px; }
.mega__cat { font: 700 .875rem/1.2 var(--display); margin: 0 0 10px; padding-left: 10px; border-left: 3px solid; }
.mega__cat--organize { border-color: var(--c-organize); }
.mega__cat--optimize { border-color: var(--c-optimize); }
.mega__cat--topdf { border-color: var(--c-topdf); }
.mega__cat--frompdf { border-color: var(--c-frompdf); }
.mega__cat--edit { border-color: var(--c-edit); }
.mega__cat--security { border-color: var(--c-security); }
.mega ul { list-style: none; margin: 0; padding: 0; }
.mega li a { display: block; padding: 5px 10px; color: var(--ink-2); text-decoration: none; border-radius: var(--r-sm); font-size: .96875rem; }
.mega li a:hover { background: var(--bg); color: var(--ink); }

@media (max-width: 960px) {
  .nav { display: none; }
  .nav__burger { display: inline-flex; }
  .mega__grid { grid-template-columns: repeat(2, 1fr); max-height: calc(100vh - 64px); overflow: auto; }
}
@media (max-width: 520px) {
  .mega__grid { grid-template-columns: 1fr 1fr; gap: 16px; }
}

/* ---------- File icon ---------- */
.ficon { flex: none; }
.ficon__sheet { fill: var(--fc); }
.ficon__fold { fill: #fff; opacity: .4; }
.ficon__glyph { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ficon--organize { --fc: var(--c-organize); }
.ficon--optimize { --fc: var(--c-optimize); }
.ficon--topdf { --fc: var(--c-topdf); }
.ficon--frompdf { --fc: var(--c-frompdf); }
.ficon--edit { --fc: var(--c-edit); }
.ficon--security { --fc: var(--c-security); }

/* ---------- Startseite ---------- */
.home-hero { padding: 56px 0 28px; }
.home-hero h1 { max-width: 15ch; font-size: clamp(2.2rem, 5.4vw, 3.75rem); line-height: 1.02; margin-bottom: 18px; }
.home-hero__lead { font-size: 1.1875rem; color: var(--ink-2); max-width: 56ch; }
.facts { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 10px 28px; color: var(--ink-2); }
.facts li { display: flex; align-items: center; gap: 8px; }
.facts svg, .privacy svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--ok); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.facts strong { color: var(--ink); }

.tools-index { padding-bottom: 48px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 20px; }
.chip {
  border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px;
  padding: 7px 15px; font-weight: 600; font-size: .9375rem; cursor: pointer; color: var(--ink-2);
}
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.tgrid { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.tcard[hidden] { display: none; }
.tcard a {
  height: 100%; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto 1fr; column-gap: 16px; row-gap: 4px;
  padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.tcard a:hover { border-color: var(--line-2); box-shadow: var(--shadow); color: var(--ink); }
.tcard .ficon { grid-row: span 2; }
.tcard__name { font: 700 1.125rem/1.25 var(--display); align-self: end; }
.tcard__text { font-size: .96875rem; color: var(--ink-2); line-height: 1.45; }
.tgrid--compact { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

.why { padding: 48px 0 16px; border-top: 1px solid var(--line); }
.why__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 16px; }
.why__grid p { color: var(--ink-2); margin: 0; }
@media (max-width: 800px) { .why__grid { grid-template-columns: 1fr; gap: 20px; } }

/* ---------- Werkzeug-Kopf ---------- */
.tool-head { text-align: center; padding: 28px 0 24px; }
.tool-head h1 { margin-bottom: 10px; }
.tool-head__lead { font-size: 1.1875rem; color: var(--ink-2); max-width: 60ch; margin: 0 auto; }
.crumbs { display: flex; justify-content: center; gap: 8px; font-size: .9375rem; color: var(--ink-3); margin-bottom: 14px; }
.crumbs a { color: var(--ink-3); }

/* ---------- Werkzeug-Arbeitsbereich ---------- */
.tool { --tc: var(--brand); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.tool--organize { --tc: var(--c-organize); }
.tool--optimize { --tc: var(--c-optimize); }
.tool--topdf { --tc: var(--c-topdf); }
.tool--frompdf { --tc: var(--c-frompdf); }
.tool--edit { --tc: var(--c-edit); }
.tool--security { --tc: var(--c-security); }
.tool__form { margin: 0; }

.stage--pick { padding: 20px; }
.drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  min-height: 300px; padding: 36px 20px; border: 2px dashed var(--line-2); border-radius: 14px;
  background: color-mix(in srgb, var(--tc) 3%, #fff);
  transition: border-color .15s, background-color .15s;
}
.drop.is-over { border-color: var(--tc); background: color-mix(in srgb, var(--tc) 9%, #fff); }
.drop .ficon { margin-bottom: 20px; }
.drop__btn { cursor: pointer; }
.drop__btn:focus-within { outline: 3px solid var(--brand); outline-offset: 3px; }
.drop__or { margin: 14px 0 2px; font-weight: 600; color: var(--ink-2); }
.drop__hint { margin: 0; font-size: .9375rem; color: var(--ink-3); }
.privacy { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 14px 0 0; font-size: .9375rem; color: var(--ink-2); text-align: left; }
.privacy strong { color: var(--ink); }

.work { display: grid; grid-template-columns: 1fr 340px; min-height: 420px; }
.work__main { padding: 20px; min-width: 0; }
.work__side { padding: 22px; border-left: 1px solid var(--line); background: #fafbfd; border-radius: 0 20px 20px 0; display: flex; flex-direction: column; gap: 16px; }
.work__side .btn--link { align-self: center; }
.work__summary { margin: 0; font: 700 1.0625rem/1.3 var(--display); }
.work__help { margin: 0 0 12px; color: var(--ink-2); font-size: .96875rem; }
@media (max-width: 860px) {
  .work { grid-template-columns: 1fr; }
  .work__side { border-left: 0; border-top: 1px solid var(--line); border-radius: 0 0 20px 20px; }
}

/* Dateiliste */
.files { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.file {
  display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 12px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
}
.files[data-sortable] .file { cursor: grab; }
.file__handle { color: var(--ink-3); display: flex; }
.file__handle svg { width: 18px; height: 18px; fill: currentColor; }
.files:not([data-sortable]) .file__handle { display: none; }
.file__thumb { width: 44px; height: 56px; border-radius: 4px; background: var(--bg); border: 1px solid var(--line); object-fit: cover; }
.file__meta { min-width: 0; }
.file__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.file__size { font-size: .875rem; color: var(--ink-3); }
.icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: var(--r-sm); background: none; border: 1px solid transparent; cursor: pointer; color: var(--ink-3); }
.icon-btn:hover { background: var(--danger-tint); color: var(--danger); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.sortable-ghost { opacity: .35; }
.add-more { margin-top: 12px; cursor: pointer; }
.add-more:focus-within { outline: 3px solid var(--brand); outline-offset: 2px; }

/* Seitenvorschau */
.pages-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px; }
.pages__loading { grid-column: 1 / -1; color: var(--ink-3); padding: 40px 0; text-align: center; }
.page {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 8px 8px; border: 2px solid transparent; border-radius: var(--r); background: var(--bg);
  cursor: pointer; user-select: none; text-align: center; font-size: .875rem; color: var(--ink-2);
}
.page:hover { border-color: var(--line-2); }
.page__canvas { width: 100%; aspect-ratio: 1 / 1.3; display: grid; place-items: center; }
.page canvas { max-width: 100%; max-height: 100%; box-shadow: 0 1px 3px rgba(22,33,61,.25); background: #fff; transition: transform .2s; }
.page__num { font-weight: 600; }
.page.is-selected { border-color: var(--tc); background: color-mix(in srgb, var(--tc) 10%, #fff); }
[data-select="remove"] .page.is-selected { border-color: var(--danger); background: var(--danger-tint); }
[data-select="remove"] .page.is-selected canvas { opacity: .35; }
.page__mark {
  position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--tc); color: #fff; display: none; place-items: center;
}
.page__mark svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.page.is-selected .page__mark { display: grid; }
[data-select="remove"] .page__mark { background: var(--danger); }
.page__tools { display: flex; gap: 2px; }
.page__tools .icon-btn { width: 30px; height: 30px; color: var(--ink-2); }
.page__tools .icon-btn:hover { background: var(--surface); color: var(--ink); }
[data-select="organize"] .page, [data-select="organize"] .page:hover { cursor: grab; }

/* Formularfelder */
.field { display: flex; flex-direction: column; gap: 6px; }
.field[hidden] { display: none; }
.field label, .field legend { font-weight: 700; font-size: .96875rem; }
.field label output { font-weight: 600; color: var(--ink-2); float: right; }
.field input[type="text"], .field input[type="number"], .field input[type="password"], .field select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface);
}
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a5470' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; padding-right: 36px; }
.field input:focus, .field select:focus { border-color: var(--brand); outline: 2px solid var(--brand-tint); }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field input[type="range"] { accent-color: var(--tc); }
.field__hint { color: var(--ink-3); font-size: .875rem; }
.field--choices { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.field--choices legend { margin-bottom: 6px; padding: 0; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); cursor: pointer; }
.choice:has(input:checked) { border-color: var(--tc); box-shadow: inset 0 0 0 1px var(--tc); }
.choice input { margin-top: 4px; accent-color: var(--tc); }
.choice__body { display: flex; flex-direction: column; }
.choice__label { font-weight: 700; }
.choice__hint { font-size: .875rem; color: var(--ink-3); }

.form-error { margin: 0; padding: 10px 12px; border-radius: var(--r-sm); background: var(--danger-tint); color: var(--danger); font-weight: 600; font-size: .96875rem; }

/* Verarbeitung */
.busy { min-height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 40px 20px; text-align: center; }
.busy p { margin: 0; font-weight: 600; color: var(--ink-2); }
.busy__bar { width: min(420px, 100%); height: 10px; border-radius: 99px; background: var(--bg); overflow: hidden; }
.busy__bar span { display: block; height: 100%; width: 0; background: var(--tc); border-radius: inherit; transition: width .2s; }
.busy__bar.is-indeterminate span { width: 35%; animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(300%); } }

/* Ergebnis */
.done { min-height: 320px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 40px 20px; }
.done__title { font-size: 2rem; margin: 0; outline: none; }
.done__info { color: var(--ink-2); margin: 0 0 8px; }
.done__info strong { color: var(--ok); }
.done__next { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); width: min(560px, 100%); }
.done__next p { margin: 0 0 8px; font-weight: 700; }
.done__next ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.done__next a { display: inline-block; padding: 6px 14px; border: 1px solid var(--line-2); border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .9375rem; }
.done__next a:hover { border-color: var(--ink-3); }

/* ---------- Inhalt unter dem Werkzeug ---------- */
.howto { padding: 64px 0 8px; }
.steps { list-style: none; counter-reset: step; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.steps li { counter-increment: step; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--ink); color: #fff; font: 800 1rem/1 var(--display); margin-bottom: 12px;
}
.steps h3 { margin-bottom: 6px; }
.steps p { margin: 0; color: var(--ink-2); font-size: 1rem; }

.article { padding: 48px 0 8px; max-width: 760px; }
.article h2 { margin-top: 1.4em; }
.article h2:first-child { margin-top: 0; }
.article p { color: var(--ink-2); }

.faq { padding: 40px 0 8px; max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 16px 36px 16px 0; font-weight: 700; font-size: 1.0625rem; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2.2px solid var(--ink-2); border-bottom: 2.2px solid var(--ink-2); transform: rotate(45deg); transition: transform .15s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { margin: 0 0 18px; color: var(--ink-2); }

.related { padding: 48px 0 72px; }
.related h2 { margin-bottom: 16px; }

/* ---------- Rechtliches / 404 ---------- */
.legal { max-width: 760px; padding: 40px 0 72px; }
.legal h2 { font-size: 1.3rem; margin-top: 1.6em; }
.legal h3 { margin-top: 1.2em; }
.legal p { color: var(--ink-2); }
.notfound { padding: 64px 0 80px; }
.notfound .tgrid { margin-top: 20px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #c9cfe0; padding: 48px 0 24px; margin-top: 24px; }
.site-footer a { color: #c9cfe0; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr repeat(6, 1fr); gap: 24px; }
.site-footer__about p { font-size: .9375rem; margin-top: 12px; max-width: 32ch; }
.brand--footer, .brand--footer:hover { color: #fff; }
.brand--footer .brand__mark { color: #fff; }
.site-footer__head { font: 700 .9375rem/1.2 var(--display); color: #fff; margin-bottom: 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: .9375rem; }
.site-footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.14); font-size: .9375rem; }
.site-footer__legal p { margin: 0; }
.site-footer__legal a + a { margin-left: 18px; }
@media (max-width: 1000px) { .site-footer__grid { grid-template-columns: repeat(3, 1fr); } .site-footer__about { grid-column: 1 / -1; } }
@media (max-width: 560px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }

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

/* Feinschliff */
.files:not([data-sortable]) .file { grid-template-columns: auto 1fr auto; }
span.file__thumb { display: grid; place-items: center; font: 700 .6875rem/1 var(--display); color: var(--tc); }
.field .choice { font-weight: 400; }
.choice__hint { font-weight: 400; }

/* ==========================================================================
   Konto, Preise, Pro
   ========================================================================== */
.pro-badge {
  display: inline-block; vertical-align: middle; margin-left: 4px; padding: 2px 7px; border-radius: 99px;
  background: var(--ink); color: #fff; font: 700 .6875rem/1.3 var(--body); letter-spacing: .02em;
}
.nav__account {
  margin-left: 8px; padding: 7px 14px; border: 1px solid var(--line-2); border-radius: var(--r);
  color: var(--ink); font-weight: 700; font-size: .9375rem; text-decoration: none; white-space: nowrap;
}
.nav__account:hover { border-color: var(--ink-3); color: var(--ink); }
@media (max-width: 960px) { .nav__account { margin-left: auto; } .nav__burger { margin-left: 4px; } }

.narrow { max-width: 460px; padding: 40px 0 72px; }
.narrow h1 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); }
.narrow .tool-head__lead { font-size: 1.0625rem; margin: 0 0 20px; }
.notice { padding: 14px 16px; border-radius: var(--r); background: var(--brand-tint); color: var(--ink); }

.auth__tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--bg); border-radius: var(--r); margin-bottom: 18px; }
.auth__tabs button { border: 0; background: none; padding: 9px; border-radius: 8px; font-weight: 700; cursor: pointer; color: var(--ink-2); }
.auth__tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(22,33,61,.12); }
.auth__form { display: grid; gap: 14px; }
.auth__form[hidden] { display: none; }
.auth__forgot { justify-self: center; font-size: .9375rem; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9375rem; color: var(--ink-2); cursor: pointer; }
.check input { margin-top: 4px; accent-color: var(--brand); flex: none; }
.field input[type="email"] { width: 100%; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); }

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.plans--page { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
.plan { display: flex; flex-direction: column; gap: 10px; padding: 22px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.plan--main { border: 2px solid var(--brand); }
.plan h2, .plan h3 { margin: 0; font-size: 1.25rem; }
.plan__price { margin: 0; color: var(--ink-2); }
.plan__price strong { font: 800 2rem/1 var(--display); color: var(--ink); letter-spacing: -.02em; }
.plan ul { margin: 0 0 6px; padding-left: 20px; color: var(--ink-2); flex: 1; }
.plan li { margin-bottom: 4px; }
.plans__waiver, .plans .form-error, .plans__note { grid-column: 1 / -1; }
.plans__note { margin: 0; font-size: .875rem; color: var(--ink-3); }
.pricing { padding-bottom: 24px; }
.pricing__note { margin-top: 14px; font-size: .9375rem; color: var(--ink-3); text-align: center; }
@media (max-width: 760px) { .plans, .plans--page { grid-template-columns: 1fr; } }

.account__card { padding: 22px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); margin-bottom: 28px; }
.account__email { font: 700 1.125rem/1.3 var(--display); margin-bottom: 4px; }
.account__status { color: var(--ink-2); }
.account__actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.account h2 { font-size: 1.3rem; }

.modal { width: min(640px, calc(100% - 24px)); max-height: calc(100vh - 32px); padding: 28px; border: 0; border-radius: 20px; box-shadow: 0 30px 80px -20px rgba(22,33,61,.45); color: var(--ink); }
.modal::backdrop { background: rgba(22,33,61,.55); }
.modal h2 { font-size: 1.5rem; margin-right: 32px; }
.modal__lead { color: var(--ink-2); }
.modal__close { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; display: grid; place-items: center; border: 0; background: var(--bg); border-radius: 50%; cursor: pointer; }
.modal__close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.modal .auth { max-width: 420px; }

/* ==========================================================================
   PDF-Editor
   ========================================================================== */
.editor .drop__hint { margin-top: 6px; }
.btn--inline { border: 0; background: none; padding: 0; color: var(--brand); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }

.stage--editor { display: flex; flex-direction: column; }
.stage--editor[hidden] { display: none; }
.ed-bar {
  position: sticky; top: 64px; z-index: 5; display: flex; gap: 12px; align-items: center; justify-content: space-between;
  padding: 10px 12px; background: var(--surface); border-bottom: 1px solid var(--line); border-radius: 20px 20px 0 0;
}
.ed-tools { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: thin; }
.ed-actions { display: flex; gap: 8px; align-items: center; flex: none; }
.ed-tool {
  display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 64px; padding: 6px 8px;
  border: 0; border-radius: var(--r); background: none; cursor: pointer; color: var(--ink-2); font-size: .8125rem; font-weight: 600; white-space: nowrap;
}
.ed-tool[hidden] { display: none; }
.ed-tool svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ed-tool:hover { background: var(--bg); color: var(--ink); }
.ed-tool[aria-pressed="true"] { background: var(--brand-tint); color: var(--brand-ink); }
.ed-tool:disabled { opacity: .35; cursor: default; background: none; }
.ed-tool--icon { min-width: 0; }
.ed-tool[data-ed-tool="redact"] svg { stroke: var(--danger); }

.ed-props {
  position: sticky; top: calc(64px + 66px); z-index: 4; display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center;
  min-height: 52px; padding: 8px 14px; background: #fafbfd; border-bottom: 1px solid var(--line); font-size: .9375rem;
}
.ed-hint { margin: 0; color: var(--ink-3); }
.ed-group { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.ed-group[hidden] { display: none; }
.ed-group label { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink-2); }
.ed-group label[hidden] { display: none; }
.ed-group select, .ed-group input[type="number"] { padding: 5px 8px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); }
.ed-group input[type="number"] { width: 64px; }
.ed-group input[type="color"] { width: 34px; height: 30px; padding: 2px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); cursor: pointer; }
.ed-group input[type="range"] { width: 110px; accent-color: var(--brand); }
.ed-group .is-off input { opacity: .35; }
.ed-check { font-weight: 400 !important; }
.ed-toggle { width: 32px; height: 32px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); cursor: pointer; font-size: 1rem; }
.ed-toggle[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.ed-delete { flex-direction: row; margin-left: auto; color: var(--danger); }
.ed-delete:hover { background: var(--danger-tint); color: var(--danger); }
.ed-delete[hidden] { display: none; }

.ed-canvas { background: #e7eaf1; padding: 20px 16px 28px; border-radius: 0 0 20px 20px; min-height: 480px; }
.ed-pages { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.ed-page { display: flex; flex-direction: column; gap: 6px; }
.ed-page__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .875rem; color: var(--ink-2); font-weight: 600; }
.ed-page__btns { display: flex; gap: 2px; }
.ed-page__btns .btn { padding: 2px 6px; font-size: .8125rem; }
.ed-page__stage { position: relative; background: #fff; box-shadow: 0 1px 3px rgba(22,33,61,.18), 0 10px 30px -12px rgba(22,33,61,.3); }
.ed-page__bg { position: absolute; inset: 0; }
.ed-page__stage .canvas-container { position: absolute !important; inset: 0; }
.ed-textlayer { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.ed-textbox {
  position: absolute; pointer-events: auto; padding: 0; border: 1px dashed rgba(43,75,219,.55); border-radius: 2px;
  background: rgba(43,75,219,.06); cursor: text;
}
.ed-textbox:hover, .ed-textbox:focus-visible { background: rgba(43,75,219,.16); border-style: solid; outline: none; }
.ed-add { display: flex; justify-content: center; gap: 8px; margin-top: 22px; }
.ed-add select { padding: 6px 10px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); }

.ed-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 100; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 600;
  box-shadow: 0 10px 30px rgba(22,33,61,.35); transition: opacity .2s, transform .2s;
}
.ed-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 760px) {
  .ed-bar { top: 64px; flex-wrap: wrap; border-radius: 20px 20px 0 0; }
  .ed-actions { width: 100%; justify-content: space-between; }
  .ed-props { top: auto; position: static; }
  .ed-tool { min-width: 56px; font-size: .75rem; }
  .ed-page__btns .btn { font-size: .75rem; }
}

/* Pro-Hinweis auf der Startseite */
.pro-band {
  display: grid; grid-template-columns: 1fr auto; gap: 24px 40px; align-items: center;
  margin-top: 8px; margin-bottom: 48px; padding: 32px; border-radius: 20px;
  background: var(--ink); color: #dfe4f2;
}
.pro-band h2 { color: #fff; max-width: 26ch; margin-bottom: 10px; }
.pro-band p { margin: 0; max-width: 62ch; }
.pro-band__tag { display: inline-block; margin-bottom: 10px !important; padding: 3px 10px; border-radius: 99px; background: rgba(255,255,255,.12); color: #fff; font-weight: 700; font-size: .875rem; }
.pro-band__actions { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pro-band .btn--link { color: #dfe4f2; }
.pro-band .btn--link:hover { color: #fff; }
.pro-band .btn--primary { box-shadow: none; }
@media (max-width: 760px) { .pro-band { grid-template-columns: 1fr; padding: 24px; } .pro-band__actions { align-items: stretch; } }
.nav__pricing { margin-left: 4px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9875rem; padding: 8px 10px; border-radius: var(--r-sm); }
.nav__pricing:hover { background: var(--bg); color: var(--ink); }
@media (max-width: 960px) { .nav__pricing { margin-left: auto; } .nav__account { margin-left: 4px; } }
.privacy a { color: var(--brand); }
.brand { white-space: nowrap; }
@media (max-width: 420px) { .nav__pricing { display: none; } .nav__account { margin-left: auto; } }
