/* Stundenzettl - Ratgeber-, Vorlagen- und Rechner-Seiten.
   Wird NACH /assets/landing-v1.css geladen (Tokens, Nav, Footer, Buttons, FAQ kommen von dort).
   Keine Inline-Stile, keine data:-URIs (CSP). */

/* ---------- Seitenrahmen ---------- */

.article-page { position: relative; isolation: isolate; }

.article-glow {
  position: absolute;
  inset: 0 0 auto;
  height: 620px;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(38% 60% at 78% 10%, rgb(31 122 255 / 22%), transparent 70%),
    radial-gradient(30% 50% at 12% 0%, rgb(56 200 255 / 16%), transparent 70%),
    radial-gradient(26% 40% at 95% 30%, rgb(122 92 255 / 14%), transparent 70%);
}

.article-head {
  padding: 132px 0 12px;
}
/* Kopf, Fließtext und breite Blöcke teilen dieselbe linke Kante (820px).
   .article-full ist die Ausnahme für sehr breite Tabellen oder Karten-Raster. */
.article-head-inner,
.article-body,
.article-wide {
  width: min(820px, 100% - 40px);
  margin-inline: auto;
}
.article-full {
  width: min(1040px, 100% - 40px);
  margin-inline: auto;
}
.article-wide + .article-wide { margin-top: 24px; }

.article-title {
  margin: 10px 0 0;
  font-family: var(--display);
  font-size: clamp(36px, 5.4vw, 60px);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -.04em;
  text-wrap: balance;
}
.article-lede {
  margin: 20px 0 0;
  max-width: 60ch;
  font-size: clamp(18px, 1.8vw, 21px);
  color: var(--ink-2);
  text-wrap: pretty;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 550;
}
.article-meta { gap: 8px; }
.article-meta li {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink-2);
}

/* ---------- Breadcrumb ---------- */

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 0;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.breadcrumb li { display: inline-flex; align-items: center; }
.breadcrumb li + li::before {
  content: "";
  width: 6px;
  height: 6px;
  margin: 0 12px 0 10px;
  border: solid currentColor;
  border-width: 1.6px 1.6px 0 0;
  rotate: 45deg;
  opacity: .55;
}
.breadcrumb a { color: var(--ink-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: var(--muted); }

/* ---------- Fließtext ---------- */

.article-body { padding: 24px 0 40px; }

.prose { font-size: 18px; line-height: 1.65; color: var(--ink); }
.prose > * + * { margin-top: 1.05em; }
.prose p, .prose ul, .prose ol { margin-block: 0; }
.prose h2 {
  margin: 2.4em 0 0;
  font-family: var(--display);
  font-size: clamp(26px, 3.2vw, 36px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -.03em;
  scroll-margin-top: 100px;
  text-wrap: balance;
}
.prose h3 {
  margin: 1.8em 0 0;
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -.015em;
  scroll-margin-top: 100px;
}
.prose h2 + *, .prose h3 + * { margin-top: .6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--blue); font-weight: 700; }
.prose strong { font-weight: 700; }
.prose a { text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.prose code, .prose kbd {
  padding: 2px 7px;
  border-radius: 7px;
  background: var(--line);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: .9em;
}
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2.4em 0; }
.prose .num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Nummerierte Schritte */
.step-list {
  list-style: none;
  padding: 0 !important;
  counter-reset: s;
  display: grid;
  gap: 14px;
}
.step-list > li {
  counter-increment: s;
  position: relative;
  margin: 0 !important;
  padding: 18px 20px 18px 70px;
  border-radius: 20px;
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.step-list > li::before {
  content: counter(s);
  position: absolute;
  left: 18px;
  top: 16px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  color: #fff;
  font-weight: 800;
  font-size: 17px;
}
.step-list > li > strong:first-child { display: block; margin-bottom: 2px; }

/* ---------- Inhaltsverzeichnis ---------- */

.toc {
  margin: 8px 0 0;
  padding: 20px 24px;
  border-radius: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.toc-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2 240px;
  column-gap: 28px;
}
.toc li { break-inside: avoid; margin: 0 0 6px; }
.toc a {
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 600;
  font-size: 15.5px;
}
.toc a:hover { color: var(--blue); text-decoration: underline; }

/* ---------- Kästen ---------- */

.callout {
  position: relative;
  padding: 20px 22px 20px 64px;
  border-radius: 20px;
  background: rgb(31 122 255 / 8%);
  border: 1px solid rgb(31 122 255 / 18%);
  font-size: 17px;
}
.callout > :first-child { margin-top: 0; }
.callout > * + * { margin-top: .6em; }
.callout ul, .callout ol { margin: .5em 0 0; }
.callout-icon {
  position: absolute;
  left: 18px;
  top: 18px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgb(31 122 255 / 14%);
  font-size: 17px;
  line-height: 1;
}
.callout-title { display: block; font-weight: 750; margin-bottom: 2px; }

.callout-tip { background: rgb(34 197 94 / 9%); border-color: rgb(34 197 94 / 24%); }
.callout-tip .callout-icon { background: rgb(34 197 94 / 16%); }

.callout-warn { background: rgb(245 158 11 / 10%); border-color: rgb(245 158 11 / 30%); }
.callout-warn .callout-icon { background: rgb(245 158 11 / 18%); }

/* „Kurz gesagt"-Kasten mit Häkchen-Liste */
.summary-box {
  padding: 26px 28px;
  border-radius: 26px;
  background:
    linear-gradient(var(--bg-2), var(--bg-2)) padding-box,
    linear-gradient(135deg, var(--blue), var(--cyan), var(--violet)) border-box;
  border: 2px solid transparent;
  box-shadow: 0 30px 60px -40px rgb(31 122 255 / 50%);
}
.summary-box h2 {
  margin: 0 0 14px;
  font-family: var(--text);
  font-size: 14px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blue);
}
.summary-box .checks { margin-top: 0; }
.summary-box .checks li { color: var(--ink); }

/* Rechtlicher Hinweis */
.legal-note {
  margin-top: 2.4em;
  padding: 16px 20px;
  border-radius: 16px;
  border: 1px dashed var(--line);
  background: var(--bg-2);
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.55;
}
.legal-note strong { color: var(--ink-2); }

/* Quellen */
.sources { font-size: 15px; color: var(--ink-2); }
.sources li + li { margin-top: .3em; }

/* ---------- Tabellen ---------- */

.table-wrap {
  margin-block: 1.2em 0;
  overflow-x: auto;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  -webkit-overflow-scrolling: touch;
}
.table-wrap:focus-visible { outline-offset: 2px; }
.prose table,
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}
.data-table caption {
  caption-side: top;
  padding: 16px 18px 4px;
  text-align: left;
  font-weight: 700;
  color: var(--ink);
}
.data-table th,
.data-table td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.data-table td.wrap, .data-table th.wrap { white-space: normal; min-width: 14ch; }
.data-table thead th {
  position: sticky;
  top: 0;
  background: var(--bg-2);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
.data-table tbody tr:last-child > * { border-bottom: 0; }
.data-table tbody tr:nth-child(even) { background: rgb(31 122 255 / 3.5%); }
.data-table tbody tr:hover { background: rgb(31 122 255 / 7%); }
.data-table .r, .data-table td.num, .data-table th.num { text-align: right; }
.data-table tfoot td, .data-table tfoot th {
  border-top: 2px solid var(--ink);
  border-bottom: 0;
  font-weight: 800;
}
.data-table .hl { color: var(--blue); font-weight: 750; }
@media (prefers-color-scheme: dark) {
  .data-table tbody tr:nth-child(even) { background: rgb(255 255 255 / 3%); }
  .data-table tbody tr:hover { background: rgb(111 176 255 / 8%); }
}

/* Mehrspaltige Tabelle 1-60 Minuten */
.table-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.table-grid .table-wrap { margin: 0; }
.table-grid .data-table th, .table-grid .data-table td { padding: 8px 14px; }

/* ---------- Download-Karten ---------- */

.downloads {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
  margin-top: 8px;
}
.download-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border-radius: 24px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  transition: transform .3s ease, box-shadow .3s ease;
}
.download-card:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -30px rgb(15 40 90 / 40%); }
.download-thumb {
  aspect-ratio: 210 / 297;
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  object-fit: cover;
  object-position: top;
  box-shadow: 0 16px 30px -22px rgb(15 40 90 / 45%);
}
.download-card.is-landscape .download-thumb { aspect-ratio: 297 / 210; }
.download-card h3 { margin: 2px 0 0; font-size: 19px; letter-spacing: -.015em; line-height: 1.2; }
.download-card p { margin: 0; color: var(--ink-2); font-size: 15px; }
.download-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.download-meta li {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--line);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 650;
}
.download-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.btn-download {
  min-height: 44px;
  padding: 0 14px;
  font-size: 14.5px;
  background: var(--blue);
  color: #fff;
  box-shadow: 0 10px 24px -12px rgb(31 122 255 / 70%);
}
.btn-download:hover { transform: translateY(-2px); background: var(--blue-2); }
.btn-download::before {
  content: "";
  width: 12px;
  height: 12px;
  border: solid currentColor;
  border-width: 0 2.2px 2.2px 0;
  rotate: 45deg;
  translate: 0 -3px;
}
.btn-secondary {
  min-height: 44px;
  padding: 0 14px;
  font-size: 14.5px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
}
.btn-secondary:hover { background: var(--line); }
.badge-soft {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  color: #fff;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .03em;
}

/* ---------- Rechner ---------- */

.calc {
  margin-top: 8px;
  padding: clamp(18px, 3vw, 30px);
  border-radius: 30px;
  background:
    linear-gradient(var(--bg-2), var(--bg-2)) padding-box,
    linear-gradient(135deg, var(--blue), var(--cyan), var(--violet)) border-box;
  border: 2px solid transparent;
  box-shadow: 0 40px 80px -46px rgb(31 122 255 / 60%);
}
.calc-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 16px;
  background: var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.calc-tabs::-webkit-scrollbar { display: none; }
.calc-tab {
  flex: 1 0 auto;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
}
.calc-tab:hover { color: var(--ink); }
.calc-tab[aria-selected="true"] {
  background: var(--bg-2);
  color: var(--ink);
  box-shadow: 0 4px 14px -6px rgb(0 0 0 / 30%);
}
.calc-panel { padding-top: 22px; }
.calc-panel[hidden] { display: none; }
.calc-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  align-items: end;
}
.field { display: grid; gap: 6px; }
.field label, .field .label {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-2);
}
.field input,
.field select {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 22px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgb(31 122 255 / 18%);
}
.field input[aria-invalid="true"] { border-color: #e5484d; }
.field .hint { font-size: 13px; color: var(--muted); }
.field-error { margin: 8px 0 0; font-size: 14px; font-weight: 600; color: #d23a3f; }
@media (prefers-color-scheme: dark) { .field-error { color: #ff7b80; } }

.calc-result {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  padding: 20px 22px;
  border-radius: 20px;
  background: rgb(31 122 255 / 8%);
  border: 1px solid rgb(31 122 255 / 18%);
}
.calc-result-label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.calc-result-value {
  display: block;
  font-family: var(--display);
  font-size: clamp(36px, 6vw, 52px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
}
.calc-result-sub { display: block; margin-top: 4px; color: var(--ink-2); font-size: 15px; }
.calc-result .btn { margin-left: auto; }
.copy-btn {
  min-height: 44px;
  padding: 0 18px;
  font-size: 15px;
  border: 0;
  cursor: pointer;
  background: var(--ink);
  color: var(--bg);
  font-family: inherit;
}
.copy-btn.is-done { background: #16a34a; color: #fff; }
.calc-note { margin: 14px 0 0; font-size: 14px; color: var(--muted); }

/* ---------- App-Hinweis ---------- */

.app-cta {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  margin-top: 2.4em;
  padding: 28px 30px;
  border-radius: 30px;
  background: #070a12;
  color: #f2f5fb;
  overflow: hidden;
  isolation: isolate;
}
.app-cta::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto 30%;
  height: 420px;
  z-index: -1;
  background: radial-gradient(45% 50% at 60% 40%, rgb(31 122 255 / 50%), transparent 70%);
}
.app-cta h2, .app-cta h3 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -.03em;
  color: #fff;
}
.app-cta p { margin: 10px 0 0; color: #aeb7c8; font-size: 16.5px; }
.app-cta .btn { margin-top: 20px; }
.app-cta .btn-dark { background: #fff; color: #05070d; }
.app-cta a:not(.btn) { color: #9cc7ff; }
.app-cta-visual {
  width: 150px;
  margin: -10px 0 -90px;
  transform: rotate(4deg);
}
.app-cta-visual.phone { padding: 7px; border-radius: 30px; }
.app-cta-visual.phone::before { top: 13px; width: 50px; height: 15px; }
.app-cta-visual.phone img { border-radius: 24px; }
@media (max-width: 620px) {
  .app-cta { grid-template-columns: 1fr; padding: 24px; }
  .app-cta-visual { display: none; }
}

/* ---------- Weiterlesen ---------- */

.related {
  padding: 40px 0 80px;
}
.related-title {
  margin: 0 0 18px;
  font-family: var(--display);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: -.03em;
}
.related-grid,
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.related-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 50px 22px 22px;
  border-radius: 22px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.related-card:hover {
  transform: translateY(-3px);
  border-color: rgb(31 122 255 / 35%);
  box-shadow: 0 22px 44px -30px rgb(15 40 90 / 45%);
}
.related-card::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 26px;
  width: 9px;
  height: 9px;
  border: solid var(--blue);
  border-width: 2.2px 2.2px 0 0;
  rotate: 45deg;
  transition: translate .3s ease;
}
.related-card:hover::after { translate: 3px 0; }
.related-card strong { font-size: 18px; letter-spacing: -.01em; line-height: 1.25; }
.related-card span { color: var(--ink-2); font-size: 15px; line-height: 1.45; }
.related-card .related-emoji { font-size: 26px; line-height: 1; margin-bottom: 4px; }

/* FAQ innerhalb eines Artikels: Optik von landing-v1 (.faq details) */
.article-faq .faq-title { margin-bottom: 8px; }
.article-faq details:first-of-type { margin-top: 18px; }

/* ---------- Druck ---------- */

@media print {
  .nav, .footer, .app-cta, .related, .calc-tabs, .copy-btn, .skip-link, .article-glow { display: none !important; }
  body { background: #fff; color: #000; }
  .article-head { padding-top: 0; }
}

@media (max-width: 560px) {
  .article-head { padding-top: 112px; }
  .prose { font-size: 17px; }
  .step-list > li { padding: 16px 16px 16px 62px; }
  .step-list > li::before { left: 14px; }
  .callout { padding: 18px 18px 18px 58px; }
  .callout-icon { left: 14px; }
  .calc-result .btn { margin-left: 0; }
  .calc-tabs { flex-wrap: wrap; }
  .calc-tab { flex: 1 1 auto; }

  /* Download-Karten: kleines Vorschaubild links, Text rechts */
  .downloads { grid-template-columns: 1fr; }
  .download-card {
    display: grid;
    grid-template-columns: 92px 1fr;
    column-gap: 16px;
    row-gap: 6px;
    align-items: start;
  }
  .download-thumb { grid-column: 1; grid-row: 1 / span 5; }
  .download-card > :not(.download-thumb):not(.badge-soft) { grid-column: 2; }
  .download-actions { margin-top: 6px; }
}
