/* Rueckversicherung.de
   Gestaltungsidee: Die Schichten eines Rückversicherungsprogramms.
   Bernstein = Erstversicherer (Selbstbehalt), Blau = Rückversicherer (Haftstrecke),
   Hellblau = weitere Schicht (Retrozession). Alle Farben und Schriften nur über diese Tokens. */
:root {
  --ink: #14213d;
  --ink-2: #46506a;
  --paper: #ffffff;
  --paper-2: #f2f4f7;
  --line: #d8dde6;
  --line-strong: #9aa3b5;
  --link: #1b4fa8;
  --link-hover: #0d2f6b;
  --layer-ev: #e8b04a;
  --layer-ev-ink: #3d2a00;
  --layer-rv: #1f4e8c;
  --layer-rv2: #9db8dd;
  --focus: #e8b04a;
  --f-head: "Sitka Heading", Charter, "Bitstream Charter", "Iowan Old Style", Cambria, Georgia, serif;
  --f-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 6px;
  --wrap: 1120px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0; background: var(--paper); color: var(--ink); overflow-x: clip;
  font: 17px/1.65 var(--f-body);
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
img, svg { max-width: 100%; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--link-hover); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--f-head); font-weight: 600; line-height: 1.2; color: var(--ink); margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.55rem, 3vw, 2.05rem); }
h3 { font-size: 1.22rem; margin-top: 1.5em; }
p, ul, ol, dl { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: .35em; }
small, .small { font-size: .9rem; color: var(--ink-2); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.wrap.narrow { max-width: 792px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip { position: absolute; left: -999px; top: 0; background: var(--paper); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.num { font-variant-numeric: tabular-nums; }

/* Kopf */
.top { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--f-head); font-weight: 600; font-size: 1.15rem; }
.brand:hover { color: var(--ink); }
.mainnav { display: flex; gap: 24px; }
.mainnav a { color: var(--ink); text-decoration: none; font-size: .97rem; }
.mainnav a:hover, .mainnav a[aria-current="page"] { text-decoration: underline; color: var(--ink); }
.menu-btn { display: none; background: var(--paper); color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 6px 12px; font: inherit; cursor: pointer; }
@media (max-width: 860px) {
  .menu-btn { display: block; }
  .mainnav { display: none; position: absolute; left: 0; right: 0; top: 60px; background: var(--paper); border-bottom: 1px solid var(--line); flex-direction: column; gap: 0; padding: 4px 16px 12px; }
  .mainnav.open { display: flex; }
  .mainnav a { padding: 11px 0; border-bottom: 1px solid var(--line); }
}

/* Brotkrümel */
.crumbs { max-width: var(--wrap); margin: 0 auto; padding: 14px 16px 0; font-size: .9rem; color: var(--ink-2); }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }

/* Abschnitte */
.section { padding: 64px 0; }
section[id], h2[id] { scroll-margin-top: 64px; }
.section.alt { background: var(--paper-2); }
.lead { font-size: 1.2rem; color: var(--ink-2); }
.top-gap { margin-top: 40px; }
.split { display: grid; gap: 40px; grid-template-columns: 1.3fr 1fr; align-items: start; }
.two { display: grid; gap: 48px; grid-template-columns: 1fr 1fr; }
@media (max-width: 820px) { .split, .two { grid-template-columns: 1fr; gap: 24px; } }

.btn { display: inline-block; padding: 12px 20px; border-radius: var(--radius); background: var(--layer-rv); color: #fff; text-decoration: none; font-weight: 600; }
.btn:hover { background: var(--link-hover); color: #fff; }

/* Hero mit Rechner */
.hero { padding: 48px 0 56px; background: var(--paper-2); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; gap: 40px; grid-template-columns: 1fr 1.15fr; align-items: center; }
@media (max-width: 920px) { .hero-grid { grid-template-columns: 1fr; gap: 28px; } }
.hero-text p { max-width: 34em; }
.hero-links { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 24px; }
.calc { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.calc-h { font-size: 1.25rem; margin: 0 0 14px; }
.calc-grid { display: grid; grid-template-columns: 1fr 190px; gap: 24px; }
@media (max-width: 520px) { .calc-grid { grid-template-columns: 1fr; } }
.field { margin: 0 0 16px; }
.field label, .field legend { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; margin-bottom: 6px; font-size: .95rem; padding: 0; }
.field output { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--layer-rv); }
.field input[type=range] { width: 100%; accent-color: var(--layer-rv); }
fieldset.seg { border: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
fieldset.seg legend { width: 100%; }
.seg button { flex: 1; padding: 9px 10px; border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); border-radius: var(--radius); font: inherit; font-size: .95rem; cursor: pointer; }
.seg button:hover { border-color: var(--layer-rv); }
.seg button[aria-pressed="true"] { background: var(--layer-rv); color: #fff; border-color: var(--layer-rv); }
.calc-out { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: stretch; }
.tower { display: flex; flex-direction: column; height: 230px; border: 1px solid var(--line-strong); background: var(--paper); }
.tower span { display: block; min-height: 0; }
.t-over { background: repeating-linear-gradient(135deg, var(--layer-ev) 0 6px, var(--paper) 6px 11px); }
.t-rv { background: var(--layer-rv); }
.t-ev { background: var(--layer-ev); }
@media (prefers-reduced-motion: no-preference) { .tower span { transition: flex-grow .25s ease-out; } }
.result { display: flex; flex-direction: column; justify-content: space-between; margin: 0; }
.result dt { font-size: .9rem; color: var(--ink-2); }
.result dd { margin: 0; font-family: var(--f-head); font-size: 1.6rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.r-rv dd { color: var(--layer-rv); }
.r-ev dd { color: var(--layer-ev-ink); }
.calc-note { font-size: .93rem; color: var(--ink-2); margin: 14px 0 0; min-height: 3em; }

/* Tabellen */
.table-wrap { overflow-x: auto; margin: 1em 0 1.5em; }
table { border-collapse: collapse; width: 100%; min-width: 440px; font-size: .97rem; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-size: .9rem; color: var(--ink-2); font-weight: 600; border-bottom: 2px solid var(--ink); }
tbody th { font-weight: 600; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
caption { caption-side: bottom; text-align: left; font-size: .88rem; color: var(--ink-2); padding-top: 8px; }
table.dir th small, table.dir td small, tbody th small { display: block; font-weight: 400; }
table.dir td.fig .num { font-family: var(--f-head); font-size: 1.1rem; font-weight: 600; }
@media (max-width: 640px) {
  table.cases { min-width: 0; }
  table.cases thead { display: none; }
  table.cases tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  table.cases th, table.cases td { border: 0; padding: 0; text-align: left; }
  table.cases tbody th, table.cases td:nth-child(2) { grid-column: 1 / -1; }
  table.cases td.num:nth-child(3)::before { content: "Schaden "; color: var(--ink-2); }
  table.cases td.num:nth-child(4)::before { content: "Rückversicherer "; color: var(--ink-2); }
}
table.cases button.load { padding: 6px 12px; border: 1px solid var(--layer-rv); background: var(--paper); color: var(--layer-rv); border-radius: var(--radius); font: inherit; font-size: .9rem; cursor: pointer; }
table.cases button.load:hover { background: var(--layer-rv); color: #fff; }

/* Grundlagen */
.chain { margin: 0; }
.chain svg { width: 100%; max-width: 360px; height: auto; display: block; }
.reasons { display: grid; grid-template-columns: 12em 1fr; gap: 10px 20px; }
.reasons dt { font-weight: 600; }
.reasons dd { margin: 0; }
@media (max-width: 600px) { .reasons { grid-template-columns: 1fr; gap: 2px; } .reasons dd { margin-bottom: 10px; } }

/* Arten */
.mini { display: flex; height: 34px; margin: 4px 0 16px; font-size: .82rem; font-weight: 600; }
.mini span { display: flex; align-items: center; padding: 0 8px; overflow: hidden; white-space: nowrap; }
.m-ev { background: var(--layer-ev); color: var(--layer-ev-ink); }
.m-rv { background: var(--layer-rv); color: #fff; }
.m-over { background: repeating-linear-gradient(135deg, var(--layer-ev) 0 6px, var(--paper) 6px 11px); }
.pro, .con { padding-left: 12px; border-left: 3px solid var(--layer-rv); }
.con { border-left-color: var(--layer-ev); }

/* Ablauf */
.steps { list-style: none; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 44px 1fr; column-gap: 12px; margin-bottom: 18px; }
.steps li::before { content: counter(s); grid-row: span 2; font-family: var(--f-head); font-size: 1.7rem; font-weight: 600; color: var(--layer-rv); line-height: 1.1; }
.steps h3 { margin: 0 0 .25em; }
.steps p { margin: 0; }

/* Weltrangliste und Städte */
.ranks { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
@media (max-width: 640px) { .ranks { grid-template-columns: 1fr; gap: 8px; } }
.ranks h3 { margin-top: .5em; margin-bottom: .1em; }
.ranks ol { font-size: 1.05rem; }
.cities { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 40px; }
@media (max-width: 640px) { .cities { grid-template-columns: 1fr; } }
.cities h3 { margin-top: 1em; }

/* Berufe */
.jobs { list-style: none; padding: 0; margin: 24px 0; border-top: 1px solid var(--line); }
.jobs li { margin: 0; border-bottom: 1px solid var(--line); }
.jobs li > a, .jobs li:not(:has(a)) { display: grid; grid-template-columns: 15em 1fr auto; gap: 4px 20px; padding: 14px 0; }
.jobs li:has(a) { padding: 0; }
.jobs a { color: var(--ink); text-decoration: none; }
.jobs a b { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.jobs a:hover b { color: var(--link-hover); }
.jobs b { font-family: var(--f-head); font-size: 1.12rem; font-weight: 600; }
.jobs em { font-style: normal; font-size: .88rem; color: var(--ink-2); white-space: nowrap; }
@media (max-width: 700px) { .jobs li > a, .jobs li:not(:has(a)) { grid-template-columns: 1fr; } }

/* Kästen */
.box { border-left: 4px solid var(--layer-ev); background: var(--paper); padding: 16px 20px; margin: 1.5em 0; border-radius: 0 var(--radius) var(--radius) 0; }
.section:not(.alt) .box, .article .box { background: var(--paper-2); }
.box p:last-child { margin-bottom: 0; }
.box-title { font-weight: 700; margin-bottom: .4em; }
.cta { background: var(--ink); color: #e6eaf2; border-radius: var(--radius); padding: 32px; }
.cta h2 { color: #fff; margin-top: 0; }
.cta a { color: #fff; }

/* Artikel und Profile */
.article { padding: 28px 0 64px; }
.article h2 { margin-top: 1.8em; }
.meta { color: var(--ink-2); font-size: .92rem; margin-bottom: 1.5em; }
.toc { background: var(--paper-2); border-radius: var(--radius); padding: 16px 20px; margin: 1.5em 0 2em; }
.toc p { font-weight: 700; margin-bottom: .4em; }
.toc ol { margin: 0; }
.sources { font-size: .93rem; color: var(--ink-2); }
.sources li { word-break: break-word; }
.profile { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 48px; align-items: start; }
.profile-main { max-width: 720px; }
@media (max-width: 900px) { .profile { grid-template-columns: 1fr; gap: 16px; } }
.facts { border-top: 3px solid var(--layer-rv); padding-top: 8px; }
.facts h2 { font-size: 1.2rem; margin-top: 1.2em; }
.facts h2:first-child { margin-top: .4em; }
.facts table { min-width: 0; font-size: .93rem; }
.facts th { width: 40%; color: var(--ink-2); font-weight: 600; padding: 8px 8px 8px 0; }
.facts td { padding: 8px 0; }
.plain { list-style: none; padding: 0; }

/* Breite Tabelle in schmalen Spalten */
.table-wrap.wide { width: min(1088px, calc(100vw - 32px)); position: relative; left: 50%; transform: translateX(-50%); }

/* Logos */
.dir-logo { display: block; height: 30px; margin-bottom: 6px; }
.dir-logo img { height: 30px; width: auto; max-width: 130px; object-fit: contain; object-position: left center; }
.profile-logo { margin: 8px 0 14px; }
.profile-logo img { height: 44px; width: auto; max-width: 220px; object-fit: contain; object-position: left center; }

/* Weiterführender Link */
.next a { display: block; border: 1px solid var(--line); border-left: 4px solid var(--layer-rv); padding: 14px 18px; text-decoration: none; color: var(--ink); border-radius: 0 var(--radius) var(--radius) 0; }
.next a:hover { border-color: var(--layer-rv); }
.next b { display: block; font-family: var(--f-head); font-size: 1.15rem; color: var(--link); }
.next span { font-size: .95rem; color: var(--ink-2); }

/* Fuß */
.foot { background: var(--ink); color: #c9d0dd; padding: 48px 0 24px; font-size: .95rem; }
.foot a { color: #fff; }
.foot-grid { display: grid; gap: 28px; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot ul { list-style: none; padding: 0; }
.foot-brand { font-family: var(--f-head); font-weight: 600; color: #fff; font-size: 1.15rem; }
.foot-h { font-weight: 700; color: #fff; margin-bottom: .5em; }
.foot-bottom { border-top: 1px solid #2b3858; margin-top: 24px; padding-top: 16px; font-size: .86rem; }

/* Stellenmonitor: Balken */
.bars { margin: 1.2em 0 1.6em; }
.bars ul { list-style: none; margin: 0; padding: 0; }
.bars li { display: grid; grid-template-columns: 8.5em 1fr 2.5em; align-items: center; gap: 10px; padding: 5px 0; }
.bar-name { font-size: .95rem; }
.bar-track { height: 14px; background: var(--line); border-radius: 2px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--layer-rv); }
.bar-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.bars figcaption { font-size: .88rem; color: var(--ink-2); margin-top: 8px; }
thead th small { display: block; font-weight: 400; }
tfoot th, tfoot td { font-weight: 600; border-top: 2px solid var(--ink); border-bottom: 0; }
@media (max-width: 480px) { .bars li { grid-template-columns: 6.5em 1fr 2em; gap: 8px; } }
