/* ==========================================================================
   Modelli — Design system (réutilisable entre sites de niche)
   Tokens → base → composants → sections → print
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/inter-variable-latin.woff2') format('woff2');
}

:root {
  /* Couleurs */
  --c-bg: #ffffff;
  --c-bg-alt: #f8fafc;
  --c-bg-dark: #0f172a;
  --c-text: #0f172a;
  --c-text-2: #475569;
  --c-text-3: #64748b;
  --c-border: #e2e8f0;
  --c-primary: #9a3412;
  --c-primary-hover: #7c2d12;
  --c-primary-soft: #fff7ed;
  --c-accent-2: #b45309;
  --c-success: #059669;
  --c-success-soft: #ecfdf5;
  --grad-primary: linear-gradient(135deg, #9a3412 0%, #b45309 100%);
  /* Typo */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  /* Géométrie */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, .07);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, .1);
  --container: 1120px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section--alt { background: var(--c-bg-alt); }
.section-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.lead { font-size: 1.125rem; color: var(--c-text-2); }
.muted { color: var(--c-text-3); }
:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }

/* ---------- Eyebrow / badges ---------- */
.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--c-primary);
  margin-bottom: 12px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--c-primary-soft);
  color: var(--c-primary);
}
.badge--success { background: var(--c-success-soft); color: var(--c-success); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: 600 1rem var(--font);
  padding: 13px 26px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .15s ease;
  text-decoration: none !important;
  white-space: nowrap;
}
.btn--primary { background: var(--grad-primary); color: #fff; box-shadow: var(--shadow-md); }
.btn--primary:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn--secondary { background: #fff; color: var(--c-text); border-color: var(--c-border); box-shadow: var(--shadow-sm); }
.btn--secondary:hover { border-color: #cbd5e1; background: var(--c-bg-alt); }
.btn--ghost { color: var(--c-primary); padding: 13px 14px; }
.btn--sm { padding: 8px 16px; font-size: .9rem; border-radius: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border);
}
.site-header__in {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--c-text);
  text-decoration: none !important;
}
.logo svg { flex: none; }
.main-nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.main-nav a:not(.btn) {
  color: var(--c-text-2);
  font-weight: 500;
  font-size: .95rem;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  text-decoration: none !important;
}
.main-nav a:not(.btn):hover, .main-nav a:not(.btn)[aria-current="page"] { color: var(--c-text); background: var(--c-bg-alt); }
.main-nav .btn { margin-left: 8px; }
.nav-toggle, .search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--c-text-2);
}
.nav-toggle:hover, .search-toggle:hover { background: var(--c-bg-alt); color: var(--c-text); }
.nav-toggle { display: none; }

/* ---------- Recherche (overlay) ---------- */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 23, 42, .45);
  backdrop-filter: blur(4px);
  display: none;
  padding: 12vh 24px 0;
}
.search-overlay.is-open { display: block; }
.search-box {
  max-width: 560px;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.search-box input {
  width: 100%;
  border: none;
  outline: none;
  font: 500 1.05rem var(--font);
  padding: 18px 20px;
  border-bottom: 1px solid var(--c-border);
}
.search-results { max-height: 320px; overflow-y: auto; padding: 8px; }
.search-results a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  color: var(--c-text);
  text-decoration: none !important;
}
.search-results a:hover { background: var(--c-primary-soft); }
.search-results a small { display: block; color: var(--c-text-3); }
.search-results .no-result { padding: 14px 12px; color: var(--c-text-3); }

/* ---------- Fil d'Ariane ---------- */
.breadcrumbs { padding: 16px 0 0; font-size: .875rem; color: var(--c-text-3); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: '›'; margin-right: 6px; color: #cbd5e1; }
.breadcrumbs a { color: var(--c-text-3); }
.breadcrumbs a:hover { color: var(--c-primary); }
.breadcrumbs [aria-current] { color: var(--c-text); font-weight: 500; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 88px 0 80px;
  text-align: center;
  background:
    radial-gradient(56% 70% at 50% -10%, #fff7ed 0%, rgba(238, 242, 255, 0) 100%),
    var(--c-bg);
  overflow: hidden;
}
.hero h1 { max-width: 800px; margin: 0 auto 20px; }
.hero .lead { max-width: 620px; margin: 0 auto 32px; }
.hero__cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 36px; }
.trust-row {
  display: flex;
  gap: 10px 28px;
  justify-content: center;
  flex-wrap: wrap;
  font-size: .9rem;
  font-weight: 500;
  color: var(--c-text-2);
}
.trust-row span { display: inline-flex; align-items: center; gap: 7px; }
.trust-row svg { color: var(--c-success); flex: none; }
.hero--page { text-align: left; padding: 40px 0 48px; }
.hero--page h1, .hero--page .lead { margin-left: 0; }
.hero--page .hero__cta, .hero--page .trust-row { justify-content: flex-start; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: all .15s ease;
}
a.card { color: var(--c-text); text-decoration: none !important; display: block; }
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #fed7aa; }
.card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: var(--c-primary-soft);
  color: var(--c-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.card h3 { margin-bottom: 6px; }
.card p { color: var(--c-text-2); font-size: .95rem; margin: 0; }
.card .card__more { display: inline-block; margin-top: 14px; font-weight: 600; font-size: .9rem; color: var(--c-primary); }
.card--feature { padding: 24px; }
.steps { counter-reset: step; }
.step::before {
  counter-increment: step;
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--grad-primary);
  color: #fff;
  font-weight: 700;
  margin-bottom: 16px;
}

/* ---------- Emplacements publicitaires (réservés, zéro CLS) ---------- */
.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-bg-alt);
  border: 1px dashed #cbd5e1;
  border-radius: var(--r-md);
  color: #94a3b8;
  font-size: .75rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin: 40px auto;
  max-width: var(--container);
}
.ad-slot--top, .ad-slot--bottom { min-height: 100px; }
.ad-slot--mid, .ad-slot--content { min-height: 250px; max-width: 720px; }
.ad-slot:empty::after { content: 'Anzeige'; }

/* ---------- Générateur ---------- */
.generator {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.generator__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px 28px;
  border-bottom: 1px solid var(--c-border);
  background: var(--c-bg-alt);
}
.generator__head h2, .generator__head h3 { margin: 0; font-size: 1.1rem; }
.generator__head-right { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.gen-switch { font-size: .9rem; font-weight: 600; white-space: nowrap; }
.generator__body { display: grid; grid-template-columns: 380px 1fr; }
.gen-form { padding: 24px 28px; border-right: 1px solid var(--c-border); }
.gen-form fieldset { border: none; padding: 0; margin: 0 0 22px; }
.gen-form legend {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--c-text-3);
  margin-bottom: 10px;
  padding: 0;
}
.gen-form label { display: block; font-size: .85rem; font-weight: 500; margin-bottom: 4px; color: var(--c-text-2); }
.gen-form input, .gen-form select, .gen-form textarea {
  width: 100%;
  font: 400 .95rem var(--font);
  padding: 9px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  margin-bottom: 12px;
  background: #fff;
  color: var(--c-text);
}
.gen-form input:focus, .gen-form select:focus, .gen-form textarea:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(154, 52, 18, .12);
}
.gen-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gen-items .gen-item { display: grid; grid-template-columns: 1fr 64px 88px 32px; gap: 8px; align-items: start; }
.gen-item button {
  border: none;
  background: none;
  color: #94a3b8;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 8px 4px;
  line-height: 1;
}
.gen-item button:hover { color: #dc2626; }
.gen-add { background: none; border: 1px dashed #cbd5e1; color: var(--c-text-2); width: 100%; padding: 9px; border-radius: var(--r-sm); font: 500 .9rem var(--font); cursor: pointer; }
.gen-add:hover { border-color: var(--c-primary); color: var(--c-primary); }
.gen-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.gen-history { display: flex; flex-direction: column; gap: 8px; }
.gen-chip { text-align: left; border: 1px solid var(--c-border); background: var(--c-bg-alt); border-radius: var(--r-sm); padding: 8px 12px; cursor: pointer; font: 500 .85rem var(--font); color: var(--c-text); display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.gen-chip:hover { border-color: var(--c-primary); background: var(--c-primary-soft); }
.gen-chip small { color: var(--c-text-3); font-weight: 600; }

/* Aperçu type "feuille" */
.gen-preview-wrap { padding: 28px; background: #f1f5f9; display: flex; align-items: flex-start; justify-content: center; }
.doc-paper {
  background: #fff;
  width: 100%;
  max-width: 640px;
  min-height: 760px;
  padding: 44px 48px;
  box-shadow: var(--shadow-lg);
  border-radius: 4px;
  font-size: .85rem;
  line-height: 1.55;
  color: #1e293b;
}
.doc-paper__top { display: flex; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.doc-paper__type { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; color: var(--c-primary); margin: 0 0 4px; }
.doc-paper__meta { font-size: .8rem; color: #475569; }
.doc-paper__parties { display: flex; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.doc-paper__parties h4 { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #94a3b8; margin: 0 0 6px; }
.doc-paper table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.doc-paper th { text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: #64748b; border-bottom: 2px solid #e2e8f0; padding: 8px 6px; }
.doc-paper td { padding: 9px 6px; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.doc-paper .num { text-align: right; white-space: nowrap; }
.doc-totals { margin-left: auto; width: 240px; }
.doc-totals div { display: flex; justify-content: space-between; padding: 4px 6px; }
.doc-totals .doc-total { font-weight: 800; font-size: 1rem; border-top: 2px solid var(--c-text); margin-top: 4px; padding-top: 8px; }
.doc-mentions { margin-top: 28px; padding-top: 16px; border-top: 1px solid #e2e8f0; font-size: .72rem; color: #64748b; }
.doc-credit { margin-top: 14px; font-size: .68rem; color: #94a3b8; }
.doc-credit a { color: #64748b; text-decoration: underline; }

/* ---------- Téléchargements ---------- */
.dl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.dl-card { text-align: center; }
.dl-card .card__icon { margin: 0 auto 14px; }
.dl-card .btn { margin-top: 14px; width: 100%; }

/* ---------- Contenu éditorial ---------- */
.prose { max-width: 720px; margin: 0 auto; }
.prose h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.6em; }
.prose ul li, .prose ol li { margin-bottom: .4em; }
.prose .callout {
  background: var(--c-primary-soft);
  border-left: 3px solid var(--c-primary);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: 16px 20px;
  margin: 1.5em 0;
}
.prose .callout p:last-child { margin: 0; }
table.table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: .95rem; }
table.table th { text-align: left; background: var(--c-bg-alt); padding: 10px 14px; border-bottom: 2px solid var(--c-border); }
table.table td { padding: 10px 14px; border-bottom: 1px solid var(--c-border); }

/* ---------- FAQ ---------- */
.faq { max-width: 720px; margin: 0 auto; }
.faq details {
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  margin-bottom: 12px;
  background: #fff;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 18px 22px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.3rem; font-weight: 400; color: var(--c-text-3); transition: transform .15s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 22px 18px; color: var(--c-text-2); }

/* ---------- CTA final ---------- */
.cta-band {
  background: var(--grad-primary);
  border-radius: var(--r-lg);
  color: #fff;
  text-align: center;
  padding: 56px 32px;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, .85); max-width: 540px; margin: 0 auto 28px; }
.cta-band .btn--primary { background: #fff; color: var(--c-primary); }

/* ---------- Footer ---------- */
.site-footer { background: var(--c-bg-dark); color: #94a3b8; margin-top: 72px; font-size: .92rem; }
.site-footer__main {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 56px 0 40px;
}
.site-footer .logo { color: #fff; margin-bottom: 14px; }
.site-footer h4 { color: #e2e8f0; font-size: .85rem; text-transform: uppercase; letter-spacing: .07em; margin: 0 0 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: #94a3b8; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer__bottom {
  border-top: 1px solid #1e293b;
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: .85rem;
}

/* ---------- Index par métier (hubs) ---------- */
.metier-index { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 40px; }
.metier-group h3 { font-size: 1rem; margin-bottom: 6px; }
.metier-group p { color: var(--c-text-2); font-size: .92rem; line-height: 1.95; margin: 0; }
@media (max-width: 640px) { .metier-index { grid-template-columns: 1fr; } }

/* ---------- Pages liées ---------- */
.related h2 { text-align: center; margin-bottom: 36px; }

/* ---------- 404 ---------- */
.page-404 { text-align: center; padding: 96px 24px; }
.page-404 .code { font-size: 5rem; font-weight: 800; background: var(--grad-primary); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; margin-bottom: 16px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .generator__body { grid-template-columns: 1fr; }
  .gen-form { border-right: none; border-bottom: 1px solid var(--c-border); }
  .site-footer__main { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .section { padding: 52px 0; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .main-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    border-bottom: 1px solid var(--c-border);
    padding: 12px 16px;
    box-shadow: var(--shadow-md);
  }
  .main-nav.is-open { display: flex; }
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .search-toggle { margin-left: 0; }
  .site-header__in { gap: 8px; }
  .hero { padding: 56px 0; }
  .dl-grid { grid-template-columns: 1fr; }
  .doc-paper { padding: 28px 22px; min-height: auto; }
  .gen-preview-wrap { padding: 14px; }
}

/* ---------- Impression : on clone la feuille seule (1 page, zéro page blanche) ---------- */
.print-root { display: none; }
@media print {
  @page { margin: 14mm; }
  html.printing body > *:not(.print-root) { display: none !important; }
  html.printing .print-root { display: block; }
  html.printing .print-root .doc-paper {
    width: 100%;
    max-width: none;
    min-height: 0;
    box-shadow: none;
    border-radius: 0;
    margin: 0;
    padding: 0;
  }
}

/* ---------- Aperçu du modèle dans le hero (image-document, SEO pack d'images) ---------- */
.hero--page .hero__grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 48px; align-items: center; }
.hero__text { min-width: 0; }
.doc-preview { margin: 0; max-width: 360px; }
.hero__media { justify-self: end; width: 100%; }
.doc-preview a { display: block; border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid var(--c-border); transition: transform .2s ease, box-shadow .2s ease; }
.doc-preview a:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(15, 23, 42, .16); }
.doc-preview img { width: 100%; height: auto; display: block; }
@media (max-width: 820px) {
  .hero--page .hero__grid { grid-template-columns: 1fr; gap: 28px; }
  .hero__media { justify-self: start; max-width: 300px; }
  .doc-preview { max-width: 300px; }
}
/* Móvil: el texto ocupa todo el ancho y el aperçu va debajo de los botones como franja recortada (la parte
   de arriba del documento), sin apilarse junto al H1. Sigue en el HTML para Google Imágenes; alto fijo = sin CLS. */
@media (max-width: 640px) {
  .hero--page { padding: 24px 0 20px; }
  .hero--page .hero__grid { grid-template-columns: 1fr; gap: 16px; }
  .hero--page .hero__grid .hero__cta { margin-bottom: 4px; }
  .hero--page .hero__grid .hero__media { max-width: none; justify-self: stretch; }
  .doc-preview { max-width: none; }
  .doc-preview a { box-shadow: var(--shadow-md); height: 168px; }
  .doc-preview img { height: 100%; object-fit: cover; object-position: top; }
  .hero--page .lead { font-size: 1rem; margin-bottom: 18px; }
  .hero--page .trust-row { display: none; }
}

/* ===== Contenido v2 (2026-10): firma, points clés, ejemplo calculado, tablas, fuentes ===== */
.byline { font-size: .9rem; color: var(--c-text-3); margin: -8px 0 16px; }
.byline a { color: var(--c-text-2); text-decoration: underline; text-underline-offset: 2px; }
.section--tight { padding: 8px 0 24px; }
.key-points { max-width: 820px; border: 1px solid #fed7aa; background: var(--c-primary-soft); border-radius: var(--r-md); padding: 20px 24px; }
.key-points__title { font-weight: 700; margin: 0 0 8px; color: var(--c-primary-hover); text-transform: uppercase; letter-spacing: .04em; font-size: .8rem; }
.key-points ul { margin: 0; padding-left: 1.1em; }
.key-points li { margin: .35em 0; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.2em 0; }
.table-wrap table.table { margin: 0; min-width: 520px; }
table.table td.num, table.table th.num { text-align: right; white-space: nowrap; }
.table-note { font-size: .85rem; color: var(--c-text-3); margin-top: .4em; }
.example-doc { border: 1px solid var(--c-border); border-radius: var(--r-md); padding: 18px 20px; margin: 1.4em 0; background: var(--c-bg); box-shadow: var(--shadow-sm); }
.example-doc__head { margin: 0 0 .4em; color: var(--c-text-2); }
.example-doc__head strong { color: var(--c-text); }
.example-doc__totals { margin: 0 0 0 auto; max-width: 340px; }
.example-doc__totals div { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; }
.example-doc__totals dt { color: var(--c-text-2); }
.example-doc__totals dd { margin: 0; font-variant-numeric: tabular-nums; }
.example-doc__totals .is-total { border-top: 1px solid var(--c-border); font-weight: 700; }
.example-doc__totals .is-total dt { color: var(--c-text); }
.example-doc__notes { font-size: .88rem; color: var(--c-text-3); margin: .8em 0 0; padding-left: 1.1em; }
.example-doc__cta { margin: 1em 0 0; }
.error-list { padding-left: 1.1em; }
.error-list li { margin: .7em 0; }
.error-list em { display: block; font-style: normal; color: var(--c-success); margin-top: .2em; }
.sources ul { padding-left: 1.1em; }
.sources li { margin: .35em 0; }
.related--v2 h2 { text-align: left; margin: 0 0 18px; font-size: 1.25rem; }
.related--v2 .grid + h2 { margin-top: 40px; }

/* ===== Document prêt (2026-10) ===== */
.ready { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
.ready__label { font-weight: 600; color: var(--c-text-2); margin: 0 0 10px; }
.ready__side { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 88px; }
.ready__check { border: 1px solid var(--c-border); border-radius: var(--r-md); padding: 14px 16px; font-size: .92rem; background: var(--c-bg-alt); }
.ready__check ul { margin: .4em 0 0; padding-left: 1.1em; }
.ready__check li { margin: .3em 0; }
.dl-ready .btn { margin-top: 4px; }
@media (max-width: 820px) { .ready { grid-template-columns: 1fr; } .ready__side { position: static; } }
.example-figure { margin: 1.2em auto; max-width: 420px; }
.example-figure img { width: 100%; height: auto; border: 1px solid var(--c-border); border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
.example-figure figcaption { font-size: .85rem; color: var(--c-text-3); text-align: center; margin-top: .4em; }

/* ===== Blog (2026-10) ===== */
.card--post { padding: 0; overflow: hidden; }
.card--post img { width: 100%; height: auto; display: block; border-bottom: 1px solid var(--c-border); }
.card--post .card__cat { display: inline-block; margin: 14px 18px 0; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--c-primary); }
.card--post h3 { margin: 6px 18px 6px; font-size: 1.05rem; }
.card--post p { margin: 0 18px 18px; font-size: .9rem; }
.post__grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 40px; align-items: start; }
.post__main.prose { max-width: none; margin: 0; }
.post__image { margin: 0 0 1.4em; }
.post__image img { width: 100%; height: auto; border-radius: var(--r-md); }
.post__side { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 18px; }
.toc { border: 1px solid var(--c-border); border-radius: var(--r-md); padding: 14px 16px; font-size: .9rem; background: var(--c-bg-alt); }
.toc__title { font-weight: 700; margin: 0 0 6px; }
.toc ol { margin: 0; padding-left: 1.2em; }
.toc li { margin: .3em 0; }
.stat-callout { margin: 1.6em 0; padding: 18px 22px; border-left: 4px solid var(--c-primary); background: var(--c-primary-soft); border-radius: var(--r-sm); }
.stat-callout__value { font-size: 2rem; font-weight: 800; color: var(--c-primary-hover); margin: 0; }
.stat-callout figcaption { color: var(--c-text-2); font-size: .92rem; }
.callout--cta { border-color: #fed7aa; }
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 32px; }
.pagination a { padding: 6px 12px; border: 1px solid var(--c-border); border-radius: var(--r-sm); }
.pagination a[aria-current] { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.ad-slot--side { min-height: 250px; }
@media (max-width: 900px) { .post__grid { grid-template-columns: minmax(0, 1fr); } .post__side { position: static; } }

/* ===== Lettres de recouvrement (2026-10) ===== */
.doc-paper--letter { font-size: .92rem; line-height: 1.55; }
.doc-paper--letter p { margin: 0 0 .8em; }
.letter__from { margin-bottom: 18px; }
.letter__to { margin: 0 0 18px auto; max-width: 50%; text-align: left; }
.letter__date { text-align: right; color: var(--c-text-2); }
.letter__sign { margin-top: 28px; font-weight: 600; }

/* ---------- Calculatrice de TVA (blog, fabrica/blog.py calc_tva_html) ---------- */
.vat-calc { margin: 0 0 1.6em; padding: 20px 22px; border: 1px solid #fed7aa; border-radius: var(--r-md); background: var(--c-primary-soft); }
.vat-calc__title { margin: 0 0 12px; font-weight: 700; font-size: 1.05rem; }
.vat-calc__fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.vat-calc label { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: .85rem; font-weight: 600; color: var(--c-text-2); }
.vat-calc input, .vat-calc select { font: inherit; font-size: 1rem; font-weight: 400; color: var(--c-text); padding: 10px 12px; border: 1px solid var(--c-border); border-radius: var(--r-sm); background: #fff; min-width: 0; width: 100%; box-sizing: border-box; }
.vat-calc input:focus-visible, .vat-calc select:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 1px; }
.vat-calc__out { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0 0; }
.vat-calc__out div { background: #fff; border: 1px solid var(--c-border); border-radius: var(--r-sm); padding: 10px 12px; }
.vat-calc__out dt { font-size: .8rem; color: var(--c-text-2); }
.vat-calc__out dd { margin: 2px 0 0; font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.vat-calc__out .is-total dd { color: var(--c-primary-hover); }
.vat-calc__note { margin: 12px 0 0; font-size: .82rem; color: var(--c-text-2); }
@media (max-width: 640px) {
  .vat-calc { padding: 16px; }
  .vat-calc__fields { grid-template-columns: 1fr 1fr; }
  .vat-calc__fields label:first-child { grid-column: 1 / -1; }
  .vat-calc__out { grid-template-columns: 1fr; gap: 8px; }
  .vat-calc__out div { display: flex; justify-content: space-between; align-items: baseline; }
}

/* Tablas de artículos: scroll horizontal propio en móvil (fórmulas o celdas que no se pueden cortar) */
.post__main table { display: block; max-width: 100%; overflow-x: auto; }
.post__main td, .post__main th { word-break: normal; }

/* ---------- Modelli: modello compilabile, esempi, catalogo ---------- */
.doc-paper--text { white-space: pre-wrap; font-size: .92rem; line-height: 1.6; color: #1e293b; }
.doc-paper--text .mo-empty { background: #fef9c3; color: #854d0e; border-radius: 3px; padding: 0 3px; }
.doc-paper__title { font-size: 1rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--c-primary); margin: 0 0 18px; white-space: normal; }
.gen-form textarea { min-height: 96px; resize: vertical; font-family: inherit; }
.gen-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.gen-status { font-size: .8rem; color: var(--c-success); min-height: 1.2em; margin-top: 8px; }
.mo-examples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.mo-example { background: #fff; border: 1px solid var(--c-border); border-radius: var(--r-md); padding: 22px 24px; box-shadow: var(--shadow-sm); min-width: 0; }
.mo-example h3 { font-size: 1rem; margin: 0 0 12px; }
.mo-example__text { white-space: pre-wrap; font-size: .9rem; line-height: 1.6; color: #334155; margin: 0 0 14px; overflow-wrap: anywhere; }
.mo-catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.mo-catalog a { display: block; padding: 16px 18px; border: 1px solid var(--c-border); border-radius: var(--r-md); background: #fff; color: var(--c-text); text-decoration: none; font-weight: 600; transition: border-color .15s ease, box-shadow .15s ease; }
.mo-catalog a:hover { border-color: var(--c-primary); box-shadow: var(--shadow-md); }
.mo-catalog small { display: block; font-weight: 400; color: var(--c-text-3); margin-top: 4px; font-size: .8rem; }
@media (max-width: 820px) { .mo-examples { grid-template-columns: 1fr; } }

/* Palabras compuestas largas del alemán: cortar con guion en lugar de desbordar en móvil */
h1, h2, h3, .mo-catalog a { overflow-wrap: break-word; hyphens: auto; }
@media (max-width: 640px) { h1 { font-size: 1.75rem; } }

.prose table { display: block; max-width: 100%; overflow-x: auto; }

/* ---------- Vorlagen: Werkzeuge ---------- */
.generator__body { grid-template-columns: 340px minmax(0, 1fr); }
.gen-form { max-height: 880px; overflow-y: auto; border-right: none; }
.gen-preview-wrap { border-left: 1px solid var(--c-border); }
.gen-actions { position: sticky; bottom: -24px; background: #fff; padding: 12px 0 14px; z-index: 2; border-top: 1px solid var(--c-border); }
.gen-check { display: flex !important; gap: 8px; align-items: center; margin-bottom: 10px !important; }
.gen-check input { width: auto; margin: 0; }
.tool-hint { font-size: .8rem; color: var(--c-text-3); margin: 0 0 12px; line-height: 1.45; }
.tool-count { font-size: .85rem; color: var(--c-text-2); text-align: center; margin: 10px 0 0; }
.gen-preview-wrap { flex-direction: column; align-items: center; min-width: 0; overflow: hidden; }
.doc-paper { max-width: none; }
.sheet-holder { overflow: hidden; flex: none; }
.sheet { background: #fff; color: #1e293b; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.sheet--a4 { width: 210mm; min-height: 297mm; }
.mv { display: block; width: 100%; height: 100%; }

/* Lebenslauf */
.cv-entry { border: 1px solid var(--c-border); border-radius: var(--r-sm); padding: 10px; margin-bottom: 10px; }
.cv-entry input, .cv-entry textarea { margin-bottom: 6px; }
.cv-entry textarea { min-height: 60px; }
.cv-del { border: none; background: none; color: var(--c-text-3); font: 500 .8rem var(--font); cursor: pointer; padding: 2px 0; }
.cv-del:hover { color: #b91c1c; }
.cv { font-size: 10pt; line-height: 1.38; padding: 15mm 18mm 10mm; }
.cv p { margin: 0 0 .5em; }
.cv h2 { font-size: 11pt; letter-spacing: 0; margin: 10pt 0 4pt; padding-bottom: 2pt; border-bottom: 1px solid #94a3b8; break-after: avoid; page-break-after: avoid; }
.cv ul { margin: 0; padding-left: 1.1em; columns: 2; column-gap: 8mm; }
.cv aside ul { columns: 1; }
.cv-tab tr { break-inside: avoid; page-break-inside: avoid; }
.cv-name { font-size: 22pt; font-weight: 800; line-height: 1.1; margin: 0 0 2pt !important; }
.cv-titel { font-size: 12pt; color: #475569; }
.cv-kontakt { font-size: 9.5pt; color: #475569; }
.cv-kopf { display: flex; gap: 6mm; align-items: flex-start; justify-content: space-between; flex-direction: row-reverse; }
.cv-kopf > div { flex: 1; min-width: 0; }
.cv-foto { width: 32mm; height: 42mm; object-fit: cover; border-radius: 1mm; flex: none; }
.cv-tab { width: 100%; border-collapse: collapse; }
.cv-tab td { vertical-align: top; padding: 2.5pt 0; }
.cv-zeit { width: 30mm; padding-right: 4mm !important; color: #475569; white-space: nowrap; font-size: 9.5pt; }
.cv-det { color: #334155; font-size: 9.5pt; }
.cv-unter { margin-top: 12pt !important; color: #475569; }
.cv-doc { font-size: 15pt; font-weight: 700; text-align: center; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 8mm !important; }
.cv--klassisch { font-family: Georgia, 'Times New Roman', serif; }
.cv--klassisch h2 { border-bottom: 1.5px solid #1e293b; }
.cv--tabellarisch h2 { color: var(--c-primary); border-color: var(--c-primary); }
.cv--europass h2 { color: #1e3a8a; border-color: #1e3a8a; }
.cv--europass .cv-zeit { width: 42mm; text-align: right; }
.cv--ats { font-family: Arial, Helvetica, sans-serif; }
.cv--ats h2 { text-transform: uppercase; border-bottom: 1px solid #000; }
.cv--modern, .cv--kreativ { display: grid; grid-template-columns: 62mm minmax(0, 1fr); padding: 0; min-height: 297mm; }
.cv--modern aside, .cv--kreativ aside { padding: 14mm 8mm; background: #f1f5f9; font-size: 9.5pt; overflow-wrap: anywhere; }
.cv--modern main, .cv--kreativ main { padding: 14mm 12mm 14mm 10mm; min-width: 0; }
.cv--modern aside .cv-foto, .cv--kreativ aside .cv-foto { width: 100%; height: auto; aspect-ratio: 3/4; margin-bottom: 6mm; }
.cv--modern .cv-name, .cv--kreativ .cv-name { font-size: 17pt; }
.cv--modern .cv-zeit, .cv--kreativ .cv-zeit { width: 24mm; white-space: normal; }
.cv--kreativ aside { background: var(--c-primary); color: #fff; }
.cv--kreativ aside .cv-titel { color: #fed7aa; }
.cv--kreativ aside h2 { border-color: #fdba74; }
.cv--kreativ main h2 { color: var(--c-primary); border: none; font-size: 13pt; }

/* Tabellen */
.doc-paper--table { min-height: 0; padding: 28px; width: 100%; }
.tb-title { font-size: 1.15rem; font-weight: 800; margin: 0 0 8px; }
.tb-head { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: .85rem; margin: 0 0 14px; }
.tb-blank { display: inline-block; min-width: 90px; border-bottom: 1px solid #94a3b8; }
.doc-paper table.tb { width: 100%; border-collapse: collapse; margin: 0 0 8px; table-layout: fixed; font-size: .85rem; }
.doc-paper table.tb th, .doc-paper table.tb th.num { white-space: normal; }
.doc-paper table.tb th { background: #f1f5f9; border: 1px solid #94a3b8; padding: 6px; color: #1e293b; font-size: .78rem; text-transform: none; letter-spacing: 0; overflow-wrap: anywhere; }
.doc-paper table.tb td { border: 1px solid #94a3b8; padding: 0; height: 26px; }
.doc-paper table.tb--print td { padding: 5px 6px; height: 25px; overflow-wrap: anywhere; }
.tb tfoot td { background: #f8fafc; padding: 4px 6px !important; }
.tb-c { text-align: center; }
.tb-in { width: 100%; height: 100%; min-height: 26px; border: none; background: transparent; font: inherit; padding: 3px 6px; color: inherit; }
.tb-in:focus { outline: 2px solid var(--c-primary); outline-offset: -2px; background: var(--c-primary-soft); }
.doc-paper--table { overflow-x: auto; }
.doc-paper--table .tb-sheet { min-width: 520px; }

/* Etiketten */
.lb-grid { display: grid; justify-content: center; align-content: center; height: 100%; }
.lb { display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 1.5mm; }
.lb--cut { outline: 0.2mm dashed #94a3b8; outline-offset: -0.1mm; }
.lb-text { max-width: 100%; max-height: 100%; line-height: 1.2; overflow-wrap: anywhere; }
.lb-l { display: block; }
.lb-b { font-weight: 700; }

/* Karten */
.ka-grid { display: flex; flex-wrap: wrap; justify-content: center; align-content: center; height: 100%; }
.ka { position: relative; display: flex; outline: 0.2mm dashed #cbd5e1; overflow: hidden; }
.ka-in { flex: 1; margin: 5mm; padding: 5mm 7mm; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-width: 0; overflow: hidden; }
.ka-t { font-size: 22pt; font-weight: 800; line-height: 1.1; margin: 0 0 2mm; }
.ka-u { font-size: 12pt; margin: 0 0 3mm; color: #475569; }
.ka-x { font-size: 11pt; line-height: 1.4; white-space: pre-line; margin: 0 0 3mm; }
.ka-f { font-size: 9pt; color: #475569; white-space: pre-line; margin: 0; }
.ka--klassisch { font-family: Georgia, 'Times New Roman', serif; }
.ka--klassisch .ka-in { border: 0.6mm double #1e293b; }
.ka--festlich { font-family: Georgia, 'Times New Roman', serif; background: #fffbeb; }
.ka--festlich .ka-in { border: 0.5mm solid #b45309; outline: 0.2mm solid #b45309; outline-offset: -2mm; }
.ka--festlich .ka-t { color: #92400e; }
.ka--modern .ka-in { align-items: flex-start; text-align: left; border-left: 3mm solid var(--c-primary); }
.ka--modern .ka-t { color: var(--c-primary); }
.ka--natur { background: #f0fdf4; }
.ka--natur .ka-in { border: 0.4mm solid #166534; border-radius: 8mm; }
.ka--natur .ka-t { color: #166534; }
.ka--verspielt { background: #eff6ff; }
.ka--verspielt .ka-in { border: 1mm dashed #1d4ed8; border-radius: 4mm; }
.ka--verspielt .ka-t { color: #be185d; font-size: 25pt; }
.ka--schlicht .ka-in { margin: 0; }

/* Kalender */
.kl-page { padding: 9mm 10mm 6mm; height: 100%; display: flex; flex-direction: column; }
.kl-title { font-size: 18pt; font-weight: 800; margin: 0 0 3mm; }
.kl { width: 100%; border-collapse: collapse; table-layout: fixed; flex: 1; font-size: 7pt; }
.kl th { background: #1e293b; color: #fff; font-size: 8pt; padding: 1mm; border: 0.2mm solid #1e293b; }
.kl td { border: 0.15mm solid #94a3b8; padding: 0 1mm; height: 4.9mm; white-space: nowrap; overflow: hidden; }
.kl td i { float: right; font-style: normal; color: #64748b; font-size: 5.5pt; }
.kl-leer { background: #f1f5f9; }
.kl-sa { background: #f1f5f9; }
.kl-so { background: #e2e8f0; }
.kl-ft { background: #fed7aa !important; font-weight: 700; }
.kl-note { font-size: 6.5pt; color: #475569; margin: 2mm 0 0; line-height: 1.3; }
.kl--m { font-size: 10pt; }
.kl--m td { height: auto; vertical-align: top; padding: 1.5mm; white-space: normal; }
.kl--m td b { font-size: 13pt; }
.kl--m td span { display: block; font-size: 7.5pt; font-weight: 600; }
.kl--m td i { font-size: 7pt; }

/* Rechnung */
.re { padding: 16mm 18mm 10mm; font-size: 10pt; line-height: 1.4; }
.re p { margin: 0 0 .4em; }
.re-from { font-size: 9.5pt; color: #475569; text-align: right; min-height: 20mm; }
.re-to { min-height: 24mm; margin: 2mm 0 8mm; }
.re-title { font-size: 18pt; font-weight: 800; margin-bottom: 1mm !important; }
.re-meta { color: #475569; font-size: 9.5pt; margin-bottom: 6mm !important; }
.re-tab { width: 100%; border-collapse: collapse; margin-bottom: 4mm; }
.re-tab th { text-align: left; border-bottom: 1.5px solid #1e293b; padding: 1.5mm 1mm; font-size: 9pt; }
.re-tab td { border-bottom: 1px solid #e2e8f0; padding: 1.5mm 1mm; vertical-align: top; }
.re-tab .num { text-align: right; white-space: nowrap; }
.re .doc-totals { width: 90mm; }
.re-notes { margin-top: 7mm; font-size: 9.5pt; }

/* Vorschaubild im Kopfbereich */
.hero--page .hero__grid { grid-template-columns: minmax(0, 1fr) 240px; }
.doc-preview { max-width: 240px; }
.doc-preview img { aspect-ratio: 600 / 848; }

/* Beispiele */
.mo-example__text { white-space: pre-wrap; }

/* Con cinco secciones el menú ya no cabe en tablet: se pliega antes que en la referencia */
@media (max-width: 960px) {
  .main-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: #fff; border-bottom: 1px solid var(--c-border); padding: 12px 16px; box-shadow: var(--shadow-md); }
  .main-nav.is-open { display: flex; }
  .nav-toggle { display: inline-flex; margin-left: auto; }
}
@media (max-width: 960px) { .gen-form { max-height: none; } .gen-actions { position: static; } .gen-preview-wrap { border-left: none; } }
@media (max-width: 820px) { .hero--page .hero__grid { grid-template-columns: 1fr; } }

/* Druck */
@media print {
  html.printing .print-root .sheet { box-shadow: none; transform: none !important; page-break-after: always; break-after: page; margin: 0; }
  html.printing .print-root .sheet:last-child { page-break-after: auto; break-after: auto; }
  html.printing .print-root .sheet--a4 { min-height: 0; width: 210mm; }
  html.printing .print-root .cv--modern, html.printing .print-root .cv--kreativ { min-height: 296mm; }
  html.printing .print-root .doc-paper--table { padding: 0; overflow: visible; }
  html.printing .print-root .tb-sheet { min-width: 0; }
  html.printing .print-root * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ===== R1: bloques del chasis (fabrica/chasis/bloques.css) ===== */
:root { --c-border-accent: color-mix(in srgb, var(--c-primary) 30%, #fff); }
/* Chips sobre el H1: reemplazan al eyebrow y a la fila de checks (altura neta cero, visibles también en móvil) */
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 0; }
.chips li { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600;
  line-height: 1.35; color: var(--c-primary-hover); background: var(--c-primary-soft); border: 1px solid var(--c-border-accent); }
.chips li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--c-success, #16a34a); flex: none; }
.hero:not(.hero--page) .chips { justify-content: center; }
@media (max-width: 640px) {
  .hero--page .chips { gap: 4px; margin-bottom: 10px; }
  .hero--page .chips li { padding: 2px 8px; font-size: .72rem; }
  .hero--page h1 { margin-bottom: 12px; }
  .hero--page .hero__grid { gap: 12px; }
  .hero--page .doc-preview a { height: 128px; }
}

/* Franja de privacidad, disclaimer y licencia al pie de la tarjeta de la herramienta */
.tool-franja { display: flex; align-items: flex-start; gap: 8px; margin: 14px 0 0; font-size: .82rem; line-height: 1.45; color: var(--c-text-3); }
.tool-franja svg { flex: none; margin-top: 2px; color: var(--c-success, #16a34a); }
.tool-franja a { color: var(--c-text-2); text-decoration: underline; text-underline-offset: 2px; }

/* Pie de verificación: una línea al final del texto, sin H2 */
.page-verified { margin: 0; }
.page-verified a { color: var(--c-text-2); text-decoration: underline; text-underline-offset: 2px; }


/* Motor v2 (vt2-*). Clases propias; de la base usa solo:
   - variables --c-primary, --c-primary-hover, --c-primary-soft, --c-border, --c-text, --c-text-2, --c-bg-alt, --r-sm, --r-md, --shadow-lg, --font (con valores de reserva);
   - .btn, .btn--primary, .btn--secondary, .btn--ghost, .btn--sm en el diálogo de firma (si faltan, los botones siguen funcionando sin estilo de marca);
   - .gen-status (texto de estado) y .sheet-holder/.sheet/.sheet--a4 (contrato §6; aquí se redefinen dentro de .vt2).
   Impresión: html.printing + .print-root (contrato con fabrica/qa_browser.py). */
.vt2 { --vt2-p: var(--c-primary, #0f766e); --vt2-ph: var(--c-primary-hover, #115e59); --vt2-soft: var(--c-primary-soft, #f0fdfa);
  --vt2-b: var(--c-border, #e2e8f0); --vt2-tx: var(--c-text, #0f172a); --vt2-tx2: var(--c-text-2, #475569);
  position: relative; border: 1px solid var(--vt2-b); border-radius: var(--r-md, 12px); background: #fff; color: var(--vt2-tx); overflow: clip; }
.vt2 *, .vt2 *::before, .vt2 *::after { box-sizing: border-box; }

/* Barra de acciones en tres grupos */
.vt2-bar { display: flex; align-items: stretch; gap: 4px; padding: 10px 12px 6px; border-bottom: 1px solid var(--vt2-b); overflow-x: auto; scrollbar-width: thin; }
.vt2-grp { display: flex; flex-direction: column; align-items: center; padding: 0 10px; border-left: 1px solid var(--vt2-b); flex: none; }
.vt2-grp:first-child { border-left: 0; padding-left: 0; }
.vt2-grp__btns { display: flex; gap: 2px; align-items: center; flex: 1; }
.vt2-grp__lbl { font-size: 12px; color: var(--vt2-tx2); margin-top: 4px; white-space: nowrap; }
.vt2-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 76px; max-width: 108px; min-height: 64px;
  padding: 8px 8px; border: 0; border-radius: var(--r-sm, 8px); background: none; color: var(--vt2-tx); font: inherit; font-size: 13px; line-height: 1.25;
  text-align: center; cursor: pointer; }
.vt2-btn .vt2-ico { color: var(--vt2-p); flex: none; }
.vt2-btn:hover { background: var(--vt2-soft); }
.vt2-btn:focus-visible, .vt2-gaps__next:focus-visible, .vt2-tabs [role=tab]:focus-visible, .vt2-menu button:focus-visible { outline: 3px solid var(--vt2-p); outline-offset: 2px; }
.vt2-btn--primary { background: var(--vt2-p); color: #fff; box-shadow: 0 2px 6px rgba(15, 23, 42, .15); }
.vt2-btn--primary .vt2-ico { color: #fff; }
.vt2-btn--primary:hover { background: var(--vt2-ph); }
.vt2-font { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--vt2-tx2); }
.vt2-font select { min-height: 44px; min-width: 170px; padding: 6px 10px; border: 1px solid var(--vt2-b); border-radius: var(--r-sm, 8px); background: #fff; color: var(--vt2-tx); font: inherit; font-size: 14px; }
.vt2-grp--save, .vt2-grp:nth-child(2) { position: relative; }
.vt2 .gen-status { margin: 0; padding: 0 16px; min-height: 0; font-size: 14px; color: var(--vt2-ph); }
.vt2 .gen-status:not(:empty) { padding: 8px 16px; background: var(--vt2-soft); }

/* Menú de ejemplos */
.vt2-menu { display: none; position: absolute; z-index: 20; min-width: 240px; padding: 6px; background: #fff; border: 1px solid var(--vt2-b);
  border-radius: var(--r-sm, 8px); box-shadow: var(--shadow-lg, 0 12px 32px rgba(15, 23, 42, .12)); }
.vt2-menu.is-open { display: block; }
.vt2-menu button { display: block; width: 100%; min-height: 44px; padding: 8px 12px; border: 0; background: none; text-align: left; font: inherit; font-size: 14px; cursor: pointer; border-radius: 6px; }
.vt2-menu button:hover { background: var(--vt2-soft); }

/* Pestañas (solo móvil) */
.vt2-tabs { display: none; border-bottom: 1px solid var(--vt2-b); }
.vt2-tabs [role=tab] { flex: 1; min-height: 52px; border: 0; border-bottom: 3px solid transparent; background: none; font: inherit; font-weight: 700; font-size: 17px;
  color: var(--vt2-tx2); cursor: pointer; }
.vt2-tabs [aria-selected=true] { color: var(--vt2-p); border-bottom-color: var(--vt2-p); }
.vt2-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 6px; margin-left: 4px; border-radius: 12px;
  background: #c2410c; color: #fff; font-size: 13px; vertical-align: 1px; }
.vt2-badge[hidden] { display: none; }

/* Cuerpo: formulario | hoja */
.vt2-body { display: grid; grid-template-columns: minmax(280px, 400px) minmax(0, 1fr); align-items: start; background: #f5f5f4; }
.vt2-form { padding: 16px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.vt2-block { margin: 0; padding: 16px; border: 1px solid var(--vt2-b); border-radius: var(--r-md, 12px); background: #fff; min-width: 0; }
.vt2-block legend { float: left; width: 100%; display: flex; align-items: center; gap: 10px; margin: 0 0 10px; padding: 0; font-weight: 700; font-size: 16px; }
.vt2-num { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--vt2-p); color: #fff; font-size: 14px; flex: none; }
.vt2-field { clear: both; margin-top: 12px; }
.vt2-field:first-of-type { margin-top: 0; }
.vt2-field label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 14px; }
.vt2-opt { font-weight: 400; color: var(--vt2-tx2); }
.vt2-field input[type=text], .vt2-field textarea { display: block; width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: var(--r-sm, 8px);
  background: #fff; color: var(--vt2-tx); font: inherit; font-size: 16px; line-height: 1.4; }
.vt2-field textarea { resize: vertical; }
.vt2-field input:focus, .vt2-field textarea:focus, .vt2-font select:focus { outline: 3px solid var(--vt2-soft); border-color: var(--vt2-p); }
.vt2-field--check { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.vt2-field--check input { width: 22px; height: 22px; accent-color: var(--vt2-p); }
.vt2-field--check label { margin: 0; font-weight: 500; }

.vt2-pv { padding: 12px 20px 24px; min-width: 0; background: #e7e5e4; position: sticky; top: 0; max-height: 100vh; overflow: auto; }
.vt2-pv__lbl { margin: 4px 0 10px; text-align: center; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: #57534e; }
.vt2-gaps { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; margin: 0 auto 14px; padding: 8px 14px; max-width: 210mm;
  border: 1px solid #fcd34d; border-radius: var(--r-sm, 8px); background: #fffbeb; color: #713f12; font-size: 15px; }
.vt2-gaps__next { min-height: 44px; padding: 6px 18px; border: 0; border-radius: 22px; background: #713f12; color: #fff; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.vt2-gaps.is-done { border-color: #86efac; background: #f0fdf4; color: #14532d; }
.vt2-gaps.is-done .vt2-gaps__next { display: none; }

/* Hoja A4 en milímetros; crece si el texto pasa de una página (línea guía cada 297 mm). */
.vt2 .sheet-holder { margin: 0 auto; overflow: hidden; max-width: 100%; }
.vt2:not(.is-ready) .sheet-holder { overflow-x: auto; }
.vt2 .sheet { position: relative; width: 210mm; min-height: 297mm; padding: 27mm 20mm 20mm 25mm; background: #fff; color: #111827; box-shadow: 0 4px 18px rgba(0, 0, 0, .12);
  transform-origin: top left; font-size: 11pt; line-height: 1.5; overflow: hidden;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(297mm - 1px), #cbd5e1 calc(297mm - 1px), #cbd5e1 297mm); }
.vt2-doc p { margin: 0 0 1em; overflow-wrap: anywhere; }
.vt2-font--sans { font-family: Arial, 'Helvetica Neue', Helvetica, 'Liberation Sans', sans-serif; }
.vt2-font--serif { font-family: 'Times New Roman', Times, 'Liberation Serif', serif; }
.vt2-font--georgia { font-family: Georgia, 'DejaVu Serif', serif; }
.vt2-font--verdana { font-family: Verdana, 'DejaVu Sans', sans-serif; }
.vt2-gap { background: #fef08a; color: #713f12; padding: 0 2px; border-radius: 2px; }
.vt2-gap.is-hit { background: #f59e0b; color: #111; outline: 2px solid #b45309; }
.vt2-sigslot:empty { display: none; }
.vt2-sig { display: block; width: 60mm; height: auto; margin: -4mm 0 -2mm; }
.vt2-credit { position: absolute; left: 25mm; right: 20mm; bottom: 8mm; margin: 0; font-size: 7.5pt; color: #94a3b8; font-family: Arial, sans-serif; }
.vt2-noscript { padding: 12px 16px; margin: 0; }
.vt2-foot { padding: 12px 16px; border-top: 1px solid var(--vt2-b); background: #fff; }

/* Diálogo de firma */
.vt2-dlg { width: min(640px, calc(100vw - 24px)); padding: 0; border: 0; border-radius: var(--r-md, 12px); box-shadow: var(--shadow-lg, 0 12px 32px rgba(15, 23, 42, .2)); }
.vt2-dlg::backdrop { background: rgba(15, 23, 42, .5); }
.vt2-dlg__in { padding: 18px; }
.vt2-dlg h3 { margin: 0 0 6px; font-size: 18px; }
.vt2-dlg__hint { margin: 0 0 12px; font-size: 14px; color: var(--vt2-tx2); }
.vt2-dlg__type { display: flex; gap: 8px; align-items: center; margin: 10px 0 0; font-size: 14px; color: var(--vt2-tx2); }
.vt2-dlg__type input { flex: 1; min-height: 44px; padding: 6px 10px; font: inherit; border: 1px solid #94a3b8; border-radius: var(--r-sm, 8px); }
.vt2-canvas { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1; border: 2px dashed #94a3b8; border-radius: var(--r-sm, 8px); background: #fff; touch-action: none; cursor: crosshair; }
.vt2-dlg__acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.vt2-dlg__acts button { min-height: 44px; }
.vt2-dlg__sp { flex: 1; }

/* Móvil y tableta estrecha: pestañas Entrada / Vista previa */
@media (max-width: 899px) {
  .vt2-tabs { display: flex; }
  .vt2-body { grid-template-columns: minmax(0, 1fr); }
  .vt2-pv { position: static; max-height: none; padding: 12px; }
  .vt2.is-ready[data-tab=in] .vt2-pv, .vt2.is-ready[data-tab=pv] .vt2-form { display: none; }
  .vt2-form { padding: 12px; }
  .vt2-bar { padding: 8px 8px 4px; }
  .vt2-grp { padding: 0 6px; }
  .vt2-btn { min-width: 70px; font-size: 12.5px; }
}

/* Impresión: solo el clon en .print-root (vt2-core.js print()). */
.vt2-print { display: none; }
@media print {
  html.printing body > *:not(.print-root) { display: none !important; }
  html.printing .vt2-print { display: block; }
  .vt2-print .sheet { width: auto; min-height: 0; padding: 0; margin: 0; box-shadow: none; transform: none !important; background: none; font-size: 11pt; line-height: 1.5; color: #000; }
  .vt2-print .vt2-doc p { margin: 0 0 1em; orphans: 3; widows: 3; }
  .vt2-print .vt2-gap { background: none; color: inherit; outline: 0; }
  .vt2-print .vt2-sig { width: 60mm; break-inside: avoid; }
}

/* Motor v2 «etiketten» (et2-*). Usa las variables de .vt2 (v2.css). Pliego A4 vertical o apaisado (.is-quer) con las etiquetas
   a tamaño real, centradas; mismas reglas que .lb-* de tools.css (v1). */
.vt2 .sheet.et2-paper { height: 297mm; min-height: 0; padding: 0; background-image: none; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; }
.vt2 .sheet.et2-paper.is-quer { width: 297mm; height: 210mm; }
.et2-doc { height: 100%; }
.et2-grid { display: grid; justify-content: center; align-content: center; height: 100%; }
.et2 { display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 1.5mm; color: #111827; }
.et2--cut { outline: .2mm dashed #94a3b8; outline-offset: -.1mm; }
.et2--round { border-radius: 50%; }
.et2-flip { transform: rotate(180deg); }
.et2-text { max-width: 100%; max-height: 100%; line-height: 1.2; text-align: center; overflow-wrap: anywhere; }
.et2-text--v { writing-mode: vertical-rl; transform: rotate(180deg); }
.et2-left { text-align: left; }
.et2-l { display: block; }
.et2-b { font-weight: 700; }
.et2-count { margin: 10px 0 0; text-align: center; font-size: 14px; color: var(--vt2-tx2); }
.et2-hint { margin: 8px 0 0; font-size: 14px; color: var(--vt2-tx2); }
.vt2-form > .et2-hint { margin: 0; }
.et2-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; clear: both; }
.et2-row .vt2-field { margin-top: 0; }
.vt2 .et2-ctl { display: block; width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: var(--r-sm, 8px);
  background: #fff; color: var(--vt2-tx); font: inherit; font-size: 16px; }
.vt2 .et2-ctl:focus { outline: 3px solid var(--vt2-soft); border-color: var(--vt2-p); }
@media print {
  .vt2-print .sheet.et2-paper { width: 210mm; height: 296.5mm; padding: 0; font-size: 11pt; line-height: 1.2; overflow: hidden; }
  .vt2-print .sheet.et2-paper.is-quer { width: 297mm; height: 209.5mm; }
}

/* Motor v2 «kalender» (kl2-*). Usa las variables de .vt2 (v2.css). Hoja A4 apaisada: año en una página o un mes por página. */
.vt2 .sheet.kl2-paper { width: 297mm; min-height: 0; height: 210mm; padding: 9mm 10mm 6mm; background-image: none; font-family: Arial, Helvetica, sans-serif; line-height: 1.2; }
.kl2-doc { height: 100%; display: flex; flex-direction: column; }
.kl2-title { margin: 0 0 3mm; font-size: 18pt; font-weight: 800; }
.kl2 { width: 100%; flex: 1; border-collapse: collapse; table-layout: fixed; font-size: 7pt; }
.kl2 th { padding: 1mm; border: .2mm solid #1e293b; background: #1e293b; color: #fff; font-size: 8pt; }
.kl2 td { height: 4.9mm; padding: 0 1mm; border: .15mm solid #94a3b8; white-space: nowrap; overflow: hidden; }
.kl2 td i { float: right; font-style: normal; color: #64748b; font-size: 5.5pt; }
.kl2-leer, .kl2-sa { background: #f1f5f9; }
.kl2-so { background: #e2e8f0; }
.kl2 .kl2-ft { background: #fed7aa; font-weight: 700; }
.kl2-note { margin: 2mm 0 0; font-size: 6.5pt; line-height: 1.3; color: #475569; }
.kl2--m { font-size: 10pt; }
.kl2--m td { height: auto; padding: 1.5mm; vertical-align: top; white-space: normal; }
.kl2--m td b { font-size: 13pt; }
.kl2--m td span { display: block; font-size: 7.5pt; font-weight: 600; }
.kl2--m td i { font-size: 7pt; }
.kl2-sel { display: block; width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: var(--r-sm, 8px); background: #fff; color: var(--vt2-tx); font: inherit; font-size: 16px; }
.kl2-sel:focus { outline: 3px solid var(--vt2-soft); border-color: var(--vt2-p); }
.kl2-f + .kl2-f { margin-top: 12px; }
.kl2-f[hidden] { display: none; }
.kl2-hint { margin: 0; font-size: 14px; color: var(--vt2-tx2); }
@media print {
  .vt2-print .kl2-doc, .vt2-print .kl2-doc * { box-sizing: border-box; }
  .vt2-print .kl2-doc { display: block; height: auto; }
  .vt2-print .kl2 { flex: none; }
  .vt2-print .kl2 td { height: 4.6mm; line-height: 1.1; }
  .vt2-print .sheet.kl2-paper { box-sizing: border-box; width: 297mm; height: 209mm; padding: 9mm 10mm 6mm; overflow: hidden; font-size: 11pt; line-height: 1.2; }
  .vt2-print .sheet.kl2-paper + .sheet.kl2-paper { break-before: page; }
  .vt2-print .kl2 th, .vt2-print .kl2 td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Motor v2 «karte» (ka2-*). Usa las variables de .vt2 (v2.css). Pliego A4 vertical o apaisado (.is-quer) con tarjetas a tamaño real.
   Diseños con las mismas medidas y colores que .ka--* de tools.css (v1). */
.vt2 .sheet.ka2-paper { height: 297mm; min-height: 0; padding: 0; background-image: none; }
.vt2 .sheet.ka2-paper.is-quer { width: 297mm; height: 210mm; }
.ka2-doc { display: flex; flex-wrap: wrap; justify-content: center; align-content: center; height: 100%; }
.ka2 { position: relative; display: flex; flex: none; outline: .2mm dashed #cbd5e1; overflow: hidden; color: #1e293b;
  font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; line-height: 1.4; }
.ka2-in { flex: 1; margin: 5mm; padding: 5mm 7mm; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-width: 0; overflow: hidden; }
.ka2-in p { overflow-wrap: anywhere; }
.ka2-t { margin: 0 0 2mm; font-size: 22pt; font-weight: 800; line-height: 1.1; }
.ka2-u { margin: 0 0 3mm; font-size: 12pt; color: #475569; }
.ka2-x { margin: 0 0 3mm; font-size: 11pt; line-height: 1.4; white-space: pre-line; }
.ka2-f { margin: 0; font-size: 9pt; color: #475569; white-space: pre-line; }
.ka2--klassisch, .ka2--festlich { font-family: Georgia, 'Times New Roman', serif; }
.ka2--klassisch .ka2-in { border: .6mm double #1e293b; }
.ka2--festlich { background: #fffbeb; }
.ka2--festlich .ka2-in { border: .5mm solid #b45309; outline: .2mm solid #b45309; outline-offset: -2mm; }
.ka2--festlich .ka2-t { color: #92400e; }
.ka2--modern .ka2-in { align-items: flex-start; text-align: left; border-left: 3mm solid var(--c-primary, #0f766e); }
.ka2--modern .ka2-t { color: var(--c-primary, #0f766e); }
.ka2--natur { background: #f0fdf4; }
.ka2--natur .ka2-in { border: .4mm solid #166534; border-radius: 8mm; }
.ka2--natur .ka2-t { color: #166534; }
.ka2--verspielt { background: #eff6ff; }
.ka2--verspielt .ka2-in { border: 1mm dashed #1d4ed8; border-radius: 4mm; }
.ka2--verspielt .ka2-t { color: #be185d; font-size: 25pt; }
.ka2--schlicht .ka2-in { margin: 0; }
.ka2-count { margin: 10px 0 0; text-align: center; font-size: 14px; color: var(--vt2-tx2); }
.ka2-hint { margin: 0; font-size: 14px; color: var(--vt2-tx2); }
.vt2 #vt2-f-text { min-height: 9em; }
.ka2-grp .vt2-grp__btns { gap: 10px; }
@media print {
  .vt2-print .sheet.ka2-paper { width: 210mm; height: 296.5mm; padding: 0; font-size: 11pt; line-height: 1.4; overflow: hidden; }
  .vt2-print .sheet.ka2-paper.is-quer { width: 297mm; height: 209.5mm; }
  .vt2-print .ka2 { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Motor v2 «lebenslauf» (lb2-*). Usa las variables de .vt2 (v2.css). Seis diseños sobre la hoja A4; la foto queda en memoria. */
.vt2 .sheet.lb2-paper { padding: 0; font-family: Arial, 'Helvetica Neue', Helvetica, 'Liberation Sans', sans-serif; font-size: 10pt; line-height: 1.38; }
.lb2-paper .vt2-credit { left: 18mm; right: 18mm; bottom: 5mm; }
.lb2 { padding: 15mm 18mm 12mm; }
.lb2 p { margin: 0 0 .5em; overflow-wrap: anywhere; }
.lb2 h2 { margin: 10pt 0 4pt; padding-bottom: 2pt; border-bottom: 1px solid #94a3b8; font-size: 11pt; letter-spacing: 0; break-after: avoid; }
.lb2 ul { margin: 0 0 .5em; padding-left: 1.1em; columns: 2; column-gap: 8mm; }
.lb2 aside ul { columns: 1; }
.lb2-tab { width: 100%; border-collapse: collapse; }
.lb2-tab tr { break-inside: avoid; }
.lb2-tab td { padding: 2.5pt 0; vertical-align: top; overflow-wrap: anywhere; }
.lb2 .lb2-name { margin: 0 0 2pt; font-size: 22pt; font-weight: 800; line-height: 1.1; }
.lb2-titel { font-size: 12pt; color: #475569; }
.lb2-kontakt { font-size: 9.5pt; color: #475569; }
.lb2-kopf { display: flex; flex-direction: row-reverse; justify-content: space-between; align-items: flex-start; gap: 6mm; }
.lb2-kopf > div { flex: 1; min-width: 0; }
.lb2-foto { flex: none; width: 32mm; height: 42mm; object-fit: cover; border-radius: 1mm; }
.lb2-tab .lb2-zeit { width: 30mm; padding-right: 4mm; color: #475569; white-space: nowrap; font-size: 9.5pt; }
.lb2-det { color: #334155; font-size: 9.5pt; }
.lb2 .lb2-unter { margin-top: 12pt; color: #475569; }
.lb2 .lb2-doc { margin-bottom: 8mm; font-size: 15pt; font-weight: 700; text-align: center; letter-spacing: .12em; text-transform: uppercase; }
.lb2--klassisch { font-family: Georgia, 'Times New Roman', serif; }
.lb2--klassisch h2 { border-bottom: 1.5px solid #1e293b; }
.lb2--tabellarisch h2 { color: var(--vt2-p); border-color: var(--vt2-p); }
.lb2--europass h2 { color: #1e3a8a; border-color: #1e3a8a; }
.lb2--europass .lb2-zeit { width: 42mm; text-align: right; }
.lb2--ats h2 { text-transform: uppercase; border-bottom: 1px solid #000; }
.lb2--modern, .lb2--kreativ { display: grid; grid-template-columns: 62mm minmax(0, 1fr); min-height: 297mm; padding: 0; }
.lb2--modern aside, .lb2--kreativ aside { padding: 14mm 8mm; background: #f1f5f9; font-size: 9.5pt; overflow-wrap: anywhere; }
.lb2--modern main, .lb2--kreativ main { min-width: 0; padding: 14mm 12mm 14mm 10mm; }
.lb2--modern aside .lb2-foto, .lb2--kreativ aside .lb2-foto { width: 100%; height: auto; aspect-ratio: 3 / 4; margin-bottom: 6mm; }
.lb2--modern .lb2-name, .lb2--kreativ .lb2-name { font-size: 17pt; }
.lb2--modern .lb2-zeit, .lb2--kreativ .lb2-zeit { width: 24mm; white-space: normal; }
.lb2--kreativ aside { background: var(--vt2-p); color: #fff; }
.lb2--kreativ aside .lb2-titel { color: #fed7aa; }
.lb2--kreativ aside h2 { border-color: #fdba74; }
.lb2--kreativ main h2 { color: var(--vt2-p); border: none; font-size: 13pt; }

/* Formulario */
.lb2-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; clear: both; }
.lb2-row > .vt2-field, .lb2-entry > .vt2-field { margin-top: 10px; }
.lb2-entry { margin: 0 0 10px; padding: 8px 12px 6px; border: 1px solid var(--vt2-b); border-radius: var(--r-sm, 8px); min-width: 0; }
.lb2-entry legend { padding: 0 4px; font-size: 13px; font-weight: 700; color: var(--vt2-tx2); }
.lb2-fotofield input[type=file] { display: block; width: 100%; min-height: 44px; padding: 8px 0; font: inherit; font-size: 15px; }
.lb2-del, .lb2-add { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 12px; border: 0; border-radius: 22px; background: none;
  color: var(--vt2-tx2); font: inherit; font-size: 14px; cursor: pointer; }
.lb2-del[hidden] { display: none; }
.lb2-del .vt2-ico, .lb2-add .vt2-ico { color: var(--vt2-p); }
.lb2-del:hover { color: #b91c1c; background: #fef2f2; }
.lb2-add { border: 1px solid var(--vt2-b); background: #fff; color: var(--vt2-tx); }
.lb2-add:hover { background: var(--vt2-soft); }
.lb2-del:focus-visible, .lb2-add:focus-visible { outline: 3px solid var(--vt2-p); outline-offset: 2px; }
@media (max-width: 420px) { .lb2-row { grid-template-columns: minmax(0, 1fr); } }
@media print {
  .vt2-print .lb2-paper { width: auto; min-height: 0; padding: 0; font-size: 10pt; line-height: 1.38; }
  .vt2-print .lb2--modern, .vt2-print .lb2--kreativ { min-height: 296mm; }
  .vt2-print .lb2--modern aside, .vt2-print .lb2--kreativ aside { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Motor v2 «motiv» (mv2-*). Usa las variables de .vt2 (v2.css). Hoja A4 vertical con un SVG en milímetros reales. */
.vt2 .sheet.mv2-paper { width: 210mm; min-height: 0; height: 297mm; padding: 0; background-image: none; }
.mv2-doc, .mv2 { display: block; width: 100%; height: 100%; }
.mv2-sel, .mv2-num { display: block; width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: var(--r-sm, 8px); background: #fff;
  color: var(--vt2-tx); font: inherit; font-size: 16px; }
.mv2-sel:focus, .mv2-num:focus { outline: 3px solid var(--vt2-soft); border-color: var(--vt2-p); }
.mv2-hint { margin: 0; font-size: 14px; color: var(--vt2-tx2); }
@media print {
  .vt2-print .sheet.mv2-paper { box-sizing: border-box; width: 210mm; height: 296mm; padding: 0; overflow: hidden; }
}

/* Motor v2 «rechnung» (re2-*). Usa las variables de .vt2 (v2.css). Hoja A4 con remitente, destinatario, posiciones y sumas. */
.vt2 .sheet.re2-paper { padding: 16mm 18mm 14mm; font-family: Arial, 'Helvetica Neue', Helvetica, 'Liberation Sans', sans-serif; font-size: 10pt; line-height: 1.4; }
.re2-paper .vt2-credit { left: 18mm; right: 18mm; bottom: 6mm; }
.re2-doc p { margin: 0 0 .4em; overflow-wrap: anywhere; }
.re2-from { min-height: 20mm; font-size: 9.5pt; color: #475569; text-align: right; overflow-wrap: anywhere; }
.re2-to { min-height: 24mm; margin: 2mm 0 8mm; overflow-wrap: anywhere; }
.re2-doc .re2-title { margin-bottom: 1mm; font-size: 18pt; font-weight: 800; line-height: 1.2; }
.re2-doc .re2-meta { margin-bottom: 6mm; font-size: 9.5pt; color: #475569; }
.re2-tab { width: 100%; margin-bottom: 4mm; border-collapse: collapse; }
.re2-tab th { padding: 1.5mm 1mm; border-bottom: 1.5px solid #1e293b; font-size: 9pt; text-align: left; }
.re2-tab td { padding: 1.5mm 1mm; border-bottom: 1px solid #e2e8f0; vertical-align: top; overflow-wrap: anywhere; }
.re2-tab .num { text-align: right; white-space: nowrap; }
.re2-totals { width: 90mm; margin-left: auto; }
.re2-totals > div { display: flex; justify-content: space-between; gap: 4mm; padding: 1mm 0; }
.re2-totals > div > span:last-child { white-space: nowrap; }
.re2-total { margin-top: 1mm; border-top: 1.5px solid #1e293b; font-weight: 700; font-size: 11pt; }
.re2-notes { margin-top: 7mm; font-size: 9.5pt; }

/* Formulario */
.vt2[data-engine=rechnung] .vt2-field select { display: block; width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: var(--r-sm, 8px);
  background: #fff; color: var(--vt2-tx); font: inherit; font-size: 16px; }
.vt2[data-engine=rechnung] .vt2-field select:focus { outline: 3px solid var(--vt2-soft); border-color: var(--vt2-p); }
.re2-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; clear: both; }
.re2-row > .vt2-field { margin-top: 12px; }
.re2-hint { clear: both; margin: 12px 0 0; font-size: 14px; color: var(--vt2-tx2); }
.re2-hint[hidden], [data-rc][hidden] { display: none; }
.re2-entry { margin: 0 0 10px; padding: 10px 12px 6px; border: 1px solid var(--vt2-b); border-radius: var(--r-sm, 8px); min-width: 0; }
.re2-entry legend { padding: 0 4px; font-size: 13px; font-weight: 700; color: var(--vt2-tx2); }
.re2-del, .re2-add { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 12px; border: 0; border-radius: 22px; background: none;
  color: var(--vt2-tx2); font: inherit; font-size: 14px; cursor: pointer; }
.re2-del .vt2-ico, .re2-add .vt2-ico { color: var(--vt2-p); }
.re2-del:hover { color: #b91c1c; background: #fef2f2; }
.re2-add { border: 1px solid var(--vt2-b); background: #fff; color: var(--vt2-tx); }
.re2-add:hover { background: var(--vt2-soft); }
.re2-del:focus-visible, .re2-add:focus-visible { outline: 3px solid var(--vt2-p); outline-offset: 2px; }
@media (max-width: 420px) { .re2-row { grid-template-columns: minmax(0, 1fr); } }
@media print {
  .vt2-print .re2-paper { width: auto; min-height: 0; padding: 0; font-size: 10pt; line-height: 1.4; }
  .vt2-print .re2-tab thead { display: table-header-group; }
  .vt2-print .re2-tab tr, .vt2-print .re2-totals { break-inside: avoid; }
}

/* Motor v2 «tabelle» (tb2-*). Usa las variables de .vt2 (v2.css). Hoja A4 vertical o apaisada (.is-quer) con celdas editables. */
.vt2 .sheet.tb2-paper { padding: 12mm; font-size: 10pt; line-height: 1.35; }
.vt2 .sheet.tb2-paper.is-quer { width: 297mm; min-height: 210mm;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(210mm - 1px), #cbd5e1 calc(210mm - 1px), #cbd5e1 210mm); }
.vt2 .sheet-holder.is-scroll { overflow-x: auto; overflow-y: hidden; width: auto; height: auto; }
.tb2-paper .vt2-credit { left: 12mm; right: 12mm; bottom: 4mm; }
.tb2-title { margin: 0 0 3mm; font-size: 15pt; font-weight: 700; line-height: 1.2; }
.tb2-head { display: flex; flex-wrap: wrap; gap: 2mm 8mm; margin: 0 0 4mm; }
.tb2-blank { display: inline-block; width: 35mm; border-bottom: 1px solid #94a3b8; vertical-align: -2px; }
.tb2 { width: 100%; border-collapse: collapse; table-layout: fixed; }
.tb2 th, .tb2 td { border: 1px solid #9ca3af; padding: 0; text-align: left; vertical-align: middle; overflow-wrap: anywhere; }
.tb2 th { padding: 1.5mm 2mm; background: #f1f5f9; font-size: 9.5pt; }
.tb2 .num { text-align: right; }
.tb2 tfoot td { padding: 1.5mm 2mm; background: #f8fafc; }
.tb2-in { display: block; width: 100%; min-height: 8mm; padding: 1mm 2mm; border: 0; border-radius: 0; background: transparent; color: inherit; font: inherit; }
.tb2-in:focus { outline: 2px solid var(--vt2-p); outline-offset: -2px; background: var(--vt2-soft); }
.tb2-in.num { text-align: right; }
.tb2 .tb2-c { text-align: center; }
.tb2-c input { width: 18px; height: 18px; margin: 0; vertical-align: middle; accent-color: var(--vt2-p); cursor: pointer; }
.tb2-hint { margin: 0; font-size: 14px; color: var(--vt2-tx2); }
.tb2-rows { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.tb2-rowbtn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 16px; border: 1px solid var(--vt2-b); border-radius: 22px;
  background: #fff; color: var(--vt2-tx); font: inherit; font-size: 14px; cursor: pointer; }
.tb2-rowbtn .vt2-ico { color: var(--vt2-p); }
.tb2-rowbtn:hover { background: var(--vt2-soft); }
.tb2-rowbtn:focus-visible { outline: 3px solid var(--vt2-p); outline-offset: 2px; }
@media (max-width: 899px) {
  .tb2-in { min-height: 44px; font-size: 16px; }
  .tb2-c input { width: 26px; height: 26px; }
}
@media print {
  .vt2-print .tb2-paper { width: auto; min-height: 0; padding: 0; font-size: 10pt; line-height: 1.3; }
  .vt2-print .tb2 thead { display: table-header-group; }
  .vt2-print .tb2 tr { break-inside: avoid; }
  .vt2-print .tb2 td { height: 7mm; padding: 1mm 2mm; }
  .vt2-print .tb2 th, .vt2-print .tb2 tfoot td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
