/* =========================================================
   Paragon State – Regelwerk-Seite
   (baut auf css/style.css auf)
   ========================================================= */

/* ---------- Hero ---------- */
.rw-hero { position: relative; overflow: hidden; background: var(--ink); color: #fff; }
.rw-hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(10,15,44,.94) 0%, rgba(10,15,44,.78) 45%, rgba(10,15,44,.45) 100%),
              linear-gradient(0deg, rgba(10,15,44,.9), transparent 45%),
              url('../img/hero.jpg') center 40% / cover no-repeat;
}
.rw-hero-inner { position: relative; z-index: 2; padding-block: 150px 70px; }
.rw-hero .sticker { background: #fff; transform: rotate(-2deg); }
.rw-hero h1 { margin-top: 18px; }
.rw-hero h1 .pre { display: block; font-size: clamp(22px, 2.6vw, 32px); font-weight: 700; color: rgba(255,255,255,.85); letter-spacing: .03em; }
.rw-hero h1 .main { display: block; font-size: clamp(54px, 7.5vw, 104px); margin-top: 2px; text-shadow: 0 6px 30px rgba(0,0,0,.35); }
.rw-lead { margin-top: 14px; color: rgba(255,255,255,.78); font-size: 15px; }
.rw-meta { display: flex; flex-wrap: wrap; gap: 0; margin-top: 18px; font-size: 13px; color: rgba(255,255,255,.65); }
.rw-meta span + span { margin-left: 14px; padding-left: 14px; border-left: 1px solid rgba(255,255,255,.2); }
.rw-meta b { color: #fff; font-weight: 600; }
.rw-search {
  margin-top: 26px; display: flex; align-items: center; gap: 12px; max-width: 520px;
  padding: 0 10px 0 16px; height: 52px; border-radius: 14px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(10px);
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.rw-search:focus-within { border-color: var(--cyan); background: rgba(255,255,255,.1); box-shadow: 0 0 0 4px rgba(56,200,255,.15); }
.rw-search svg { width: 18px; height: 18px; color: rgba(255,255,255,.6); flex-shrink: 0; }
.rw-search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: #fff; font: inherit; font-size: 14.5px; }
.rw-search input::placeholder { color: rgba(255,255,255,.5); }
.rw-search input::-webkit-search-cancel-button { filter: invert(1); opacity: .6; }
.kbd { display: flex; gap: 4px; }
.kbd kbd { font: 600 11px var(--font); padding: 3px 7px; border-radius: 6px; border: 1px solid rgba(255,255,255,.2); color: rgba(255,255,255,.7); }
.rw-hero-char { position: absolute; z-index: 1; right: max(2%, calc(50% - 680px)); top: 96px; bottom: 0; height: calc(100% - 96px); width: auto; object-fit: contain; object-position: bottom; filter: drop-shadow(0 24px 40px rgba(0,0,0,.6)); pointer-events: none; }

/* ---------- Tabs ---------- */
.rw-main { padding-block: 34px 110px; }
.rw-tabs {
  display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; padding: 8px; border-radius: 16px;
  background: #fff; box-shadow: 0 20px 40px -30px rgba(10,15,44,.5); border: 1px solid var(--line);
}
.rw-tab {
  display: inline-flex; align-items: center; gap: 9px; padding: 10px 18px; border-radius: 11px;
  font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 15px; letter-spacing: .02em; color: #7a839b;
  transition: background .2s, color .2s, box-shadow .2s;
}
.rw-tab svg { width: 16px; height: 16px; }
.rw-tab .cnt { font-family: var(--font); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--paper); color: #7a839b; }
.rw-tab:hover { color: var(--ink); }
.rw-tab.active { background: var(--blue); color: #fff; box-shadow: 0 5px 0 #0a3fb8; }
.rw-tab.active .cnt { background: rgba(255,255,255,.22); color: #fff; }

/* ---------- Layout ---------- */
.rw-grid { display: grid; grid-template-columns: 250px 1fr; gap: 26px; margin-top: 34px; align-items: start; }
.rw-grid > * { min-width: 0; }

/* Inhaltsverzeichnis */
.rw-toc { position: sticky; top: 92px; }
.rw-toc-card { background: #fff; border-radius: 16px; padding: 14px 10px 10px; border: 1px solid var(--line); box-shadow: 0 20px 40px -30px rgba(10,15,44,.45); max-height: calc(100vh - 120px); overflow-y: auto; }
.rw-toc-title { display: block; padding: 0 8px 8px; font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 12px; letter-spacing: .08em; color: var(--muted); }
.rw-toc li a {
  display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 8px; padding: 8px 8px; border-radius: 9px;
  font-size: 13px; font-weight: 600; color: var(--ink); transition: background .15s, color .15s;
}
.rw-toc li a .n { font-family: var(--display); font-weight: 800; font-size: 12px; color: #9aa3b8; }
.rw-toc li a .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rw-toc li a .c { font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--paper); color: #7a839b; }
.rw-toc li a:hover { background: var(--paper); }
.rw-toc li a.active { background: var(--ink); color: #fff; }
.rw-toc li a.active .n { color: var(--yellow); }
.rw-toc li a.active .c { background: rgba(255,255,255,.15); color: #fff; }

/* Kopf über der Liste */
.rw-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.rw-head h2 { font-size: 26px; color: var(--ink); }
.rw-head p { font-size: 13px; color: var(--muted); margin-top: 4px; }
.rw-head-actions { display: flex; gap: 8px; }
.btn-outline { background: #fff; color: var(--ink); border: 1.5px solid var(--ink); box-shadow: none; }
.btn-outline:hover { background: var(--ink); color: #fff; }

/* ---------- Kapitel (Akkordeon) ---------- */
.rw-sec { background: #fff; border-radius: 18px; border: 1.5px solid var(--line); margin-bottom: 12px; box-shadow: 0 18px 36px -30px rgba(10,15,44,.45); overflow: hidden; transition: border-color .25s, box-shadow .25s; scroll-margin-top: 96px; }
.rw-sec.open { border-color: var(--blue); box-shadow: 0 24px 46px -30px rgba(30,99,255,.45); }
.rw-sec-head { width: 100%; display: flex; align-items: center; gap: 14px; padding: 16px 18px; text-align: left; }
.rw-sec-num { flex-shrink: 0; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--blue); color: #fff; font-family: var(--display); font-weight: 800; font-size: 16px; }
.rw-sec-title { flex: 1; min-width: 0; }
.rw-sec-title b { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 19px; line-height: 1.1; color: var(--ink); }
.rw-sec-title small { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12px; color: var(--muted); }
.rw-sec-title small::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.rw-flag { font-family: var(--font); font-size: 10px; font-weight: 700; letter-spacing: .04em; padding: 3px 8px; border-radius: 999px; background: rgba(255,210,63,.25); color: #8a6a00; text-transform: uppercase; }
.rw-chev { flex-shrink: 0; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--paper); color: var(--ink); transition: transform .3s var(--ease), background .2s; }
.rw-chev svg { width: 15px; height: 15px; }
.rw-sec.open .rw-chev { transform: rotate(180deg); background: rgba(30,99,255,.1); color: var(--blue); }
.rw-sec-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease); }
.rw-sec.open .rw-sec-body { grid-template-rows: 1fr; }
.rw-sec-inner { overflow: hidden; }
.rw-sec-pad { padding: 0 14px 14px; }

/* Einzelne Regel */
.rw-rule { display: grid; grid-template-columns: 52px 1fr; gap: 14px; padding: 16px 14px; border-radius: 12px; scroll-margin-top: 110px; transition: background .2s; }
.rw-rule:nth-child(odd) { background: #f7f8fc; }
.rw-rule.flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 40% { background: rgba(255,210,63,.35); } 100% { background: transparent; } }
.rw-rule-num {
  align-self: start; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--ink); color: #fff;
  font-family: var(--display); font-weight: 800; font-size: 13px; cursor: pointer; transition: background .2s;
}
.rw-rule-num:hover { background: var(--blue); }
.rw-rule-body { font-size: 14px; line-height: 1.65; color: #283049; }
.rw-rule-body p + p, .rw-rule-body p + ul, .rw-rule-body ul + p, .rw-rule-body .rw-note { margin-top: 10px; }
.rw-rule-body ul, .rw-block ul { display: grid; gap: 8px; margin-top: 10px; }
.rw-rule-body li, .rw-block li { position: relative; padding-left: 18px; font-size: 13.5px; color: #3a4158; }
.rw-rule-body li::before, .rw-block li::before { content: ""; position: absolute; left: 3px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.rw-note { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 10px; background: rgba(56,200,255,.08); border: 1px solid rgba(30,99,255,.18); border-left: 3px solid var(--blue); font-size: 13px; color: #2b3150; }
.rw-note svg { flex-shrink: 0; width: 16px; height: 16px; color: var(--blue); margin-top: 2px; }
.rw-block { padding: 14px; font-size: 14px; color: #283049; }
.rw-block .intro { font-weight: 600; color: var(--ink); }
.rw-block.cols ul { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
mark { background: rgba(255,210,63,.55); color: inherit; padding: 0; border-radius: 3px; box-shadow: 0 0 0 2px rgba(255,210,63,.55); }

.rw-empty[hidden] { display: none; }
.rw-empty { display: grid; gap: 4px; place-items: center; text-align: center; padding: 50px 20px; border-radius: 18px; background: #fff; border: 1.5px dashed #c9cfdd; }
.rw-empty b { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 20px; color: var(--ink); }
.rw-empty span { font-size: 13.5px; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) { .rw-hero-char { opacity: .35; right: -6%; } }
@media (max-width: 980px) {
  .rw-grid { grid-template-columns: 1fr; }
  .rw-toc { position: static; }
  .rw-toc-card { max-height: none; }
  .rw-toc ol { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .rw-toc ol::-webkit-scrollbar { display: none; }
  .rw-toc li { flex-shrink: 0; }
  .rw-toc li a { grid-template-columns: auto auto auto; white-space: nowrap; background: var(--paper); }
  .rw-toc li a .t { overflow: visible; }
  .rw-hero-char { display: none; }
}
@media (max-width: 720px) {
  .rw-hero-inner { padding-block: 120px 50px; }
  .kbd { display: none; }
  .rw-tab { padding: 9px 12px; font-size: 13px; }
  .rw-rule { grid-template-columns: 1fr; gap: 8px; padding: 14px 10px; }
  .rw-rule-num { justify-self: start; padding: 0 10px; }
  .rw-sec-head { padding: 14px; }
  .rw-sec-title b { font-size: 17px; }
  .rw-meta span + span { margin-left: 10px; padding-left: 10px; }
}

/* aktiver Menüpunkt "Regelwerke" */
.dd-toggle.is-active { opacity: 1; font-weight: 600; position: relative; }
.dd-toggle.is-active::after { content: ""; position: absolute; left: 12px; right: 30px; bottom: 0; height: 2px; border-radius: 2px; background: var(--blue); }

/* "Paragon" im Titel in Babyblau – wie auf der Startseite */
.rw-hero h1 .pg-blue {
  background: linear-gradient(180deg, #d4f0ff 0%, #8fd3ff 45%, #4fb6ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none;
  filter: drop-shadow(0 4px 0 rgba(10,15,44,.35)) drop-shadow(0 0 22px rgba(120,200,255,.45));
}
.rw-rule-body p.sub { margin-top: 14px; font-weight: 600; color: var(--ink); }
