/* ============================================================
   startuptax.io — gemeinsames Stylesheet
   A&W Tool Brand Guide v1.2
   ============================================================ */

/* ── FONTS (selbst gehostet, DSGVO) ── */
@font-face {
  font-family: 'DM Sans';
  src: url('/fonts/DMSans.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('/fonts/DMSans-Italic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Playfair Display';
  src: url('/fonts/PlayfairDisplay.woff2') format('woff2');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Playfair Display';
  src: url('/fonts/PlayfairDisplay-Italic.woff2') format('woff2');
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
}

/* ── DESIGN TOKENS ── */
:root {
  --aw-bg: #F0EDE8;
  --aw-surface: #FFFFFF;
  --aw-surface-2: #F7F5F2;
  --aw-orange: #E65D0F;
  --aw-orange-hover: #F06E22;
  --aw-anthrazit: #1C1C1C;
  --aw-text: #1C1C1C;
  --aw-text-2: #5A5550;
  --aw-text-3: #9A948E;
  --aw-border: #DDD9D3;
  --aw-border-light: #EAE7E2;
  --aw-error: #C0392B;
  --aw-success: #27AE60;

  --aw-nav-dim: #6A6A6A;
  --aw-nav-mid: #9A948E;
  --aw-nav-light: #A8A49E;
  --aw-dark-line: #2E2B28;
  --aw-dark-surface: #272727;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--aw-bg);
  color: var(--aw-text);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  background: var(--aw-anthrazit);
  color: var(--aw-bg);
  padding: 0 40px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-left { display: flex; align-items: center; gap: 20px; }
.topbar-right { display: flex; align-items: center; gap: 20px; }

.topbar-logo { display: flex; align-items: center; text-decoration: none; }
.topbar-logo img { height: 24px; width: auto; display: block; }

.topbar-divider { width: 1px; height: 20px; background: #3A3A3A; }

.topbar-back {
  font-size: 13px;
  color: var(--aw-nav-mid);
  text-decoration: none;
  transition: color .2s;
  white-space: nowrap;
}
.topbar-back:hover { color: var(--aw-bg); }

.topbar-nav-links { display: flex; align-items: center; gap: 20px; }
.topbar-nav-links a {
  font-size: 13px;
  color: var(--aw-nav-dim);
  text-decoration: none;
  transition: color .2s;
  white-space: nowrap;
}
.topbar-nav-links a:hover { color: var(--aw-nav-light); }
.topbar-nav-links a[aria-current="page"] { color: var(--aw-bg); }

/* Sprachumschalter — springt zur Partner-URL */
.topbar-lang {
  display: flex; align-items: center; gap: 4px;
  background: var(--aw-dark-surface);
  border-radius: 5px; padding: 3px;
}
.lang-active {
  font-size: 12px; font-weight: 600; letter-spacing: .06em;
  color: #fff; background: var(--aw-orange);
  padding: 4px 10px; border-radius: 3px;
}
.lang-other {
  font-size: 12px; font-weight: 600; letter-spacing: .06em;
  color: #5A5550; text-decoration: none;
  padding: 4px 10px; border-radius: 3px; transition: color .2s;
}
.lang-other:hover { color: var(--aw-nav-light); }

/* ── PDF-Buttons ── */
.print-btn {
  font-size: 12px; font-weight: 600; letter-spacing: .05em;
  color: var(--aw-nav-mid);
  background: none; border: 1px solid #3A3A3A;
  padding: 4px 12px; border-radius: 4px; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: all .2s; text-decoration: none; white-space: nowrap;
  font-family: inherit;
}
.print-btn:hover { color: var(--aw-bg); border-color: #6A6A6A; }
.print-btn svg { flex-shrink: 0; }

.footer-print-btn {
  font-size: 12px; font-weight: 600; letter-spacing: .05em;
  color: var(--aw-orange);
  background: none; border: 1px solid var(--aw-orange);
  padding: 6px 14px; border-radius: 4px; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: all .2s; white-space: nowrap; font-family: inherit;
}
.footer-print-btn:hover { background: var(--aw-orange); color: #fff; }

/* ============================================================
   TOP-DISCLAIMER (unter der Topbar)
   ============================================================ */
.top-disclaimer {
  background: var(--aw-surface-2);
  border-bottom: 1px solid var(--aw-border);
  padding: 11px 40px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--aw-text-2);
  text-align: center;
}
.top-disclaimer-label { font-weight: 600; color: var(--aw-text); }
.top-disclaimer-link {
  color: var(--aw-orange); text-decoration: none; font-weight: 500;
}
.top-disclaimer-link:hover { text-decoration: underline; }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
  max-width: 760px;
  margin: 0 auto;
  padding: 14px 40px 0;
  font-size: 12.5px;
  color: var(--aw-text-3);
  letter-spacing: .01em;
}
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 7px; }
.breadcrumb li { display: flex; align-items: center; gap: 7px; }
.breadcrumb li + li::before { content: '›'; color: var(--aw-border); }
.breadcrumb a { color: var(--aw-text-3); text-decoration: none; transition: color .2s; }
.breadcrumb a:hover { color: var(--aw-orange); }
.breadcrumb [aria-current="page"] { color: var(--aw-text-2); }

/* ============================================================
   HERO (Guides & Unterseiten)
   ============================================================ */
.hero {
  background: var(--aw-anthrazit);
  padding: 68px 40px 60px;
  color: var(--aw-bg);
}
.hero-inner { max-width: 760px; margin: 0 auto; }

.guide-label {
  font-size: 11px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--aw-orange);
  margin-bottom: 20px; display: block;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(30px, 5vw, 50px);
  font-weight: 700;
  line-height: 1.15;
  color: var(--aw-bg);
  margin-bottom: 20px;
  letter-spacing: -.005em;
}
.hero h1 em { font-style: italic; color: var(--aw-orange); }

.hero-lead {
  font-size: 17px; line-height: 1.7;
  color: var(--aw-nav-light); max-width: 600px;
}

.hero-meta {
  margin-top: 36px; padding-top: 24px;
  border-top: 1px solid var(--aw-dark-line);
  display: flex; gap: 32px;
  font-size: 12px; color: #6A6560; letter-spacing: .04em;
}

/* Stand-Vermerk */
.stand-vermerk {
  margin-top: 18px;
  font-size: 12.5px;
  color: #6A6560;
  letter-spacing: .02em;
}

/* ============================================================
   CONTENT
   ============================================================ */
.content-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 40px 72px;
}

.section {
  background: var(--aw-surface);
  border: 1px solid var(--aw-border-light);
  border-radius: 10px;
  padding: 36px 40px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(28,28,28,.04);
}

.section-label {
  font-size: 11px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--aw-orange);
  margin-bottom: 10px; display: block;
}

.section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 26px; font-weight: 600; line-height: 1.28;
  margin-bottom: 18px; scroll-margin-top: 76px;
}

.section h3 {
  font-family: 'Playfair Display', serif;
  font-size: 19px; font-weight: 600;
  margin: 26px 0 10px;
}

.section p { margin-bottom: 15px; color: var(--aw-text-2); }
.section p:last-child { margin-bottom: 0; }
.section strong { color: var(--aw-text); font-weight: 600; }

.section ul, .section ol { margin: 0 0 15px 20px; color: var(--aw-text-2); }
.section li { margin-bottom: 7px; }

.section a { color: var(--aw-orange); text-decoration: none; border-bottom: 1px solid rgba(230,93,15,.28); }
.section a:hover { border-bottom-color: var(--aw-orange); }

/* ── Intro-Karte ── */
.intro-card {
  background: var(--aw-surface);
  border: 1px solid var(--aw-border-light);
  border-left: 3px solid var(--aw-orange);
  border-radius: 10px;
  padding: 28px 32px;
  margin-bottom: 20px;
}
.intro-card p { color: var(--aw-text-2); margin-bottom: 12px; }
.intro-card p:last-child { margin-bottom: 0; }

/* ============================================================
   ANTWORTBLOCK „Kurz gefasst"  (Answer-First)
   ============================================================ */
.answer-box {
  background: var(--aw-surface-2);
  border-left: 3px solid var(--aw-orange);
  border-radius: 0 6px 6px 0;
  padding: 20px 24px;
  margin: 0 0 22px;
}
.answer-label {
  font-size: 10px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--aw-orange);
  display: block; margin-bottom: 8px;
}
.answer-box p {
  margin: 0 !important;
  color: var(--aw-text) !important;
  font-size: 15.5px;
  line-height: 1.65;
}

/* ============================================================
   INHALTSVERZEICHNIS (Sprungmarken)
   ============================================================ */
.toc {
  background: var(--aw-surface);
  border: 1px solid var(--aw-border-light);
  border-radius: 10px;
  padding: 26px 32px;
  margin-bottom: 20px;
}
.toc-label {
  font-size: 10px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--aw-text-3);
  display: block; margin-bottom: 14px;
}
.toc ol { list-style: none; margin: 0; counter-reset: toc; }
.toc li { counter-increment: toc; margin-bottom: 9px; display: flex; gap: 12px; }
.toc li:last-child { margin-bottom: 0; }
.toc li::before {
  content: counter(toc, decimal-leading-zero);
  font-size: 11px; font-weight: 600; color: var(--aw-text-3);
  padding-top: 3px; flex-shrink: 0; letter-spacing: .04em;
}
.toc a {
  color: var(--aw-text); text-decoration: none;
  font-size: 15px; line-height: 1.45;
  border-bottom: 1px solid transparent; transition: all .2s;
}
.toc a:hover { color: var(--aw-orange); border-bottom-color: rgba(230,93,15,.3); }

/* ============================================================
   BOXEN
   ============================================================ */
.info-box, .warning-box, .tip-box, .verdict-box {
  border-radius: 8px;
  padding: 20px 24px;
  margin: 22px 0;
}
.info-box    { background: #F2F6F7; border-left: 3px solid #4A90A4; }
.warning-box { background: #FDF3EE; border-left: 3px solid var(--aw-orange); }
.tip-box     { background: #F3F8F4; border-left: 3px solid var(--aw-success); }
.verdict-box { background: var(--aw-surface-2); border-left: 3px solid var(--aw-anthrazit); }

.info-label, .warning-label, .tip-label, .verdict-label {
  font-size: 10px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; display: block; margin-bottom: 8px;
}
.info-label    { color: #3D7A8C; }
.warning-label { color: var(--aw-orange); }
.tip-label     { color: #1F8A4C; }
.verdict-label { color: var(--aw-text); }

.info-box p, .warning-box p, .tip-box p, .verdict-box p {
  margin-bottom: 10px; font-size: 15px;
}
.info-box p:last-child, .warning-box p:last-child,
.tip-box p:last-child, .verdict-box p:last-child { margin-bottom: 0; }

/* ── Rechner-Hinweis ── */
.tool-hint {
  background: var(--aw-surface-2);
  border: 1px dashed var(--aw-border);
  border-radius: 8px;
  padding: 18px 22px;
  margin: 22px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
}
.tool-hint-label {
  font-size: 10px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--aw-text-3);
  display: block; margin-bottom: 6px;
}
.tool-hint-text { font-size: 14.5px; color: var(--aw-text-2); line-height: 1.6; }
.tool-hint-link {
  font-size: 13px; font-weight: 600; color: var(--aw-orange);
  text-decoration: none; white-space: nowrap;
  border: 1px solid var(--aw-orange); padding: 7px 14px; border-radius: 5px;
  transition: all .2s;
}
.tool-hint-link:hover { background: var(--aw-orange); color: #fff; }
/* Zustand: Tool noch nicht gebaut */
.tool-hint-pending {
  font-size: 11px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--aw-text-3);
  border: 1px solid var(--aw-border); padding: 7px 14px; border-radius: 5px;
  white-space: nowrap;
}

/* ── Tabellen ── */
.aw-table, .rechtsform-table {
  width: 100%; border-collapse: collapse;
  margin: 22px 0; font-size: 14.5px;
}
.aw-table th, .rechtsform-table th {
  background: var(--aw-surface-2);
  text-align: left; padding: 11px 14px;
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--aw-text-3);
  border-bottom: 1px solid var(--aw-border);
}
.aw-table td, .rechtsform-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--aw-border-light);
  color: var(--aw-text-2); vertical-align: top;
}
.aw-table tr:last-child td, .rechtsform-table tr:last-child td { border-bottom: none; }

/* ============================================================
   AUTORENBOX
   ============================================================ */
.author-box {
  background: var(--aw-surface);
  border: 1px solid var(--aw-border-light);
  border-radius: 10px;
  padding: 28px 32px;
  margin-bottom: 20px;
  display: flex; gap: 24px; align-items: flex-start;
}
.author-photo {
  width: 76px; height: 76px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  background: var(--aw-surface-2);
  border: 1px solid var(--aw-border-light);
}
.author-label {
  font-size: 10px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--aw-text-3);
  display: block; margin-bottom: 8px;
}
.author-name {
  font-family: 'Playfair Display', serif;
  font-size: 19px; font-weight: 600; margin-bottom: 8px;
}
.author-bio { font-size: 14.5px; line-height: 1.7; color: var(--aw-text-2); }
.author-link {
  display: inline-block; margin-top: 10px;
  font-size: 13.5px; font-weight: 600; color: var(--aw-orange);
  text-decoration: none;
}
.author-link:hover { text-decoration: underline; }

/* ============================================================
   DISCLAIMER (Fuß des Guides)
   ============================================================ */
.disclaimer {
  background: var(--aw-surface-2);
  border: 1px solid var(--aw-border);
  border-radius: 8px;
  padding: 22px 26px;
  margin-bottom: 20px;
}
.disclaimer-label {
  font-size: 10px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--aw-text-3);
  display: block; margin-bottom: 8px;
}
.disclaimer p { font-size: 13.5px; line-height: 1.7; color: var(--aw-text-2); }
.disclaimer a { color: var(--aw-orange); text-decoration: none; font-weight: 500; }
.disclaimer a:hover { text-decoration: underline; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--aw-anthrazit);
  border-top: 1px solid #2A2724;
  padding: 44px 40px 24px;
}
.footer-inner {
  max-width: 1160px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 48px;
  padding-bottom: 30px; border-bottom: 1px solid #2A2724;
}
.footer-col-title {
  font-size: 10px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: #5A5550; margin-bottom: 16px;
}
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
  color: var(--aw-nav-light); text-decoration: none;
  font-size: 13px; font-weight: 300; transition: color .2s;
}
.footer-links a:hover { color: #fff; }
.footer-links .coming { color: #3A3733; font-size: 13px; font-weight: 300; }

.footer-desc { font-size: 13px; color: #5A5550; line-height: 1.75; font-weight: 300; }
.footer-desc a {
  color: var(--aw-nav-light); text-decoration: none;
  border-bottom: 1px solid #3A3733; transition: all .2s;
}
.footer-desc a:hover { color: #fff; border-color: #5A5550; }

.footer-bottom {
  max-width: 1160px; margin: 22px auto 0;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.footer-legal { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.footer-legal a { color: #3A3733; text-decoration: none; font-size: 12px; transition: color .2s; }
.footer-legal a:hover { color: #5A5550; }
.footer-legal .sep { color: #2A2724; font-size: 12px; }
.footer-version { font-size: 11px; color: #2E2B28; white-space: nowrap; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-inner .footer-col:last-child { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .topbar { padding: 0 20px; }
  .topbar-nav-links, .topbar-divider { display: none; }
  .top-disclaimer { padding: 11px 20px; text-align: left; }
  .breadcrumb { padding: 12px 20px 0; }
  .hero { padding: 44px 20px 40px; }
  .hero-meta { flex-wrap: wrap; gap: 16px; }
  .content-wrap { padding: 28px 20px 56px; }
  .section { padding: 26px 22px; }
  .intro-card, .toc { padding: 22px 22px; }
  .answer-box { padding: 18px 20px; }
  .author-box { flex-direction: column; gap: 16px; padding: 24px 22px; }
  .tool-hint { flex-direction: column; align-items: flex-start; gap: 12px; }
  .aw-table, .rechtsform-table { font-size: 13px; }
  .aw-table th, .aw-table td,
  .rechtsform-table th, .rechtsform-table td { padding: 9px 11px; }
  .site-footer { padding: 34px 20px 22px; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-inner .footer-col:last-child { grid-column: auto; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 12px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 27px; }
  .section h2 { font-size: 22px; }
  .topbar-back { display: none; }
}

/* ============================================================
   PRINT — A4-tauglich, keine abgeschnittenen Blöcke
   ============================================================ */
@media print {
  @page { size: A4; margin: 18mm 16mm; }

  html, body { background: #fff !important; font-size: 10.5pt; line-height: 1.55; }

  .topbar, .site-footer, .print-btn, .footer-print-btn,
  .toc, .breadcrumb, .tool-hint, .top-disclaimer { display: none !important; }

  .hero {
    background: #fff !important; color: #000 !important;
    padding: 0 0 14pt; margin-bottom: 14pt;
    border-bottom: 1.5pt solid var(--aw-orange);
  }
  .hero h1 { color: #000 !important; font-size: 21pt; }
  .hero h1 em { color: var(--aw-orange) !important; }
  .hero-lead { color: #333 !important; font-size: 11pt; }
  .hero-meta { color: #666 !important; border-top-color: #ccc; }
  .guide-label { color: var(--aw-orange) !important; }
  .stand-vermerk { color: #666 !important; }

  .content-wrap { max-width: none; padding: 0; }

  .section, .intro-card, .answer-box, .info-box, .warning-box,
  .tip-box, .verdict-box, .author-box, .disclaimer {
    box-shadow: none !important;
    margin-bottom: 12pt;
  }
  /* Nur kompakte Blöcke nie zerreißen — Abschnitte dürfen umbrechen,
     sonst entstehen halbleere Seiten. */
  .answer-box, .info-box, .warning-box, .tip-box, .verdict-box,
  .author-box, .disclaimer, .intro-card, figure, li {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .section { border: none; border-top: .5pt solid #ddd; border-radius: 0; padding: 12pt 0 0; }
  .section h2 { font-size: 14pt; break-after: avoid; page-break-after: avoid; }
  .section h3 { font-size: 12pt; break-after: avoid; page-break-after: avoid; }
  .section p, .section li { color: #222 !important; orphans: 3; widows: 3; }

  .answer-box { background: #f6f4f1 !important; border-left: 2pt solid var(--aw-orange); }

  table, .aw-table, .rechtsform-table { break-inside: auto; page-break-inside: auto; }
  thead { display: table-header-group; }
  tr { break-inside: avoid; page-break-inside: avoid; }

  a { color: #000 !important; border-bottom: none !important; text-decoration: underline; }
  .section a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; color: #666; }
}
