/* Ratgeber „Fristen der Heilmittelverordnung“ (scripts/seiten/rg_fristen.py). Präfix rgf-. */

/* ---------- Kopf: Antwort und Rechner ---------- */
body .hero-stage.rgf-kopf:not(#_) { padding-top: 56px; }
body .hero-stage.rgf-kopf h1:not(#_):not(#__) { font-size: clamp(31px, 4.2vw, 54px); line-height: 1.08; max-width: 21ch; margin-bottom: 22px; hyphens: manual; -webkit-hyphens: manual; text-wrap: balance; }
body .hero-stage.rgf-kopf .lede:not(#_) { max-width: 760px; font-size: clamp(17px, 1.5vw, 19.5px); line-height: 1.6; }
.rgf-kopf .lede strong { color: var(--ink); font-weight: 600; }
.rgf-stand { margin: 16px 0 0; font-size: 13.5px; color: var(--ink-3); }

.rgf-tool { max-width: 1000px; margin: 40px auto 0; padding: 28px; border-radius: 28px; border: 1px solid var(--hair); background: linear-gradient(180deg, #F6F4EE, #EFECE4); text-align: left; scroll-margin-top: 90px; }
.rgf-form { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.rgf-feld { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; min-width: 0; padding: 14px 16px 12px; border-radius: 16px; background: #fff; border: 1px solid var(--hair); cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.rgf-feld:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.rgf-feld > span { font-size: 13.5px; line-height: 1.3; font-weight: 500; color: var(--ink-2); }
.rgf-feld input[type="date"] { display: block; width: 100%; min-width: 0; min-height: 34px; padding: 0; border: 0; background: none; font: inherit; font-size: 20px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); text-align: left; -webkit-appearance: none; appearance: none; outline: none; cursor: pointer; }
.rgf-feld input[type="date"]::-webkit-date-and-time-value { text-align: left; }
.rgf-sw { flex-direction: row; align-items: center; gap: 14px; }
.rgf-sw > span { font-size: 15.5px; font-weight: 600; color: var(--ink); }
.rgf-sw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rgf-sw > i { position: relative; flex: 0 0 auto; width: 52px; height: 32px; border-radius: 16px; background: #D9D6CC; transition: background .2s; }
.rgf-sw > i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.28); transition: transform .22s var(--ease); }
.rgf-sw input:checked + i { background: var(--accent); }
.rgf-sw input:checked + i::after { transform: translateX(20px); }

.rgf-out { margin-top: 12px; border-radius: 20px; background: #fff; border: 1px solid var(--hair); box-shadow: 0 24px 44px -34px rgba(20,22,27,.35); }
.rgf-res { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; gap: 36px; padding: 28px 30px; }
.rgf-res + .rgf-res { border-top: 1px solid var(--hair); }
.rgf-say { margin: 0; display: flex; flex-direction: column; }
.rgf-say span { font-size: 14.5px; font-weight: 500; color: var(--ink-2); }
.rgf-say b { margin: 4px 0 6px; font-family: var(--serif); font-size: clamp(23px, 2.5vw, 31px); font-weight: 500; line-height: 1.15; letter-spacing: -.02em; color: var(--ink); text-wrap: balance; }
.rgf-say b i { font-style: normal; white-space: nowrap; }
.rgf-say em { font-style: normal; font-size: 15px; line-height: 1.45; color: var(--green); font-weight: 600; }
.rgf-res.spaet .rgf-say em { color: #B3261E; }
.rgf-res.leer .rgf-say b { font-family: var(--sans); font-size: 18px; font-weight: 600; letter-spacing: -.01em; color: var(--ink-3); }
.rgf-res.leer .rgf-say em { color: var(--ink-3); font-weight: 400; }

.rgf-bar { display: flex; align-items: center; gap: 2px; height: 34px; margin-top: 18px; }
.rgf-d0 { flex: 0 0 auto; width: 12px; height: 12px; margin-right: 3px; border-radius: 50%; background: var(--ink); }
.rgf-d { position: relative; flex: 1 1 0; min-width: 0; height: 30px; border-radius: 3px; background: #CFE8DA; }
.rgf-d.we { height: 16px; }
@media (prefers-reduced-motion: no-preference) {
  .rgf-d { animation: rgfIn .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 14ms); }
  @keyframes rgfIn { from { transform: scaleY(.25); opacity: 0; } to { transform: none; opacity: 1; } }
}
.rgf-d.weg { background: #D6D2C6; }
.rgf-d.ziel { background: var(--green); border-radius: 3px 8px 8px 3px; height: 34px; }
.rgf-d.heute { background: var(--ink); }
.rgf-d.heute::before, .rgf-d0.heute::before { content: "heute"; position: absolute; left: 50%; bottom: calc(100% + 5px); transform: translateX(-50%); font-size: 11.5px; font-weight: 600; font-style: normal; line-height: 1; color: var(--ink); white-space: nowrap; }
.rgf-d.we.heute::before { bottom: calc(100% + 12px); }
.rgf-d0 { position: relative; }
.rgf-d0.heute { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--ink); margin: 0 7px 0 5px; }
.rgf-res.spaet .rgf-d { background: #EFD3CF; }
.rgf-res.spaet .rgf-d.ziel { background: #B3261E; }
.rgf-res.leer .rgf-d { background: #ECE9E0; }
.rgf-res.leer .rgf-d0 { background: #D6D2C6; }
.rgf-ends { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; font-size: 12.5px; line-height: 1.3; color: var(--ink-3); }
.rgf-ends span { display: flex; flex-direction: column; }
.rgf-ends span:last-child { text-align: right; align-items: flex-end; }
.rgf-ends b { font-size: 15px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.rgf-ann { margin: 16px 4px 0; font-size: 13.5px; line-height: 1.55; color: var(--ink-3); max-width: 820px; }

/* ---------- Abschnitte ---------- */
.rgf-sec .sec-head p { max-width: 660px; }
.rgf-karte { max-width: 1000px; margin: 40px auto 0; padding: 40px 44px; border-radius: 24px; border: 1px solid var(--hair); background: #fff; }
.rgf-klein { max-width: 660px; margin: 20px auto 0; text-align: center; font-size: 16px; line-height: 1.6; color: var(--ink-2); }

/* Tabelle */
.rgf-tab { width: 100%; max-width: 1000px; margin: 40px auto 0; border-collapse: separate; border-spacing: 0; border-radius: 20px; border: 1px solid var(--hair); background: #fff; overflow: hidden; text-align: left; font-size: 15.5px; line-height: 1.5; }
.rgf-tab thead th { padding: 14px 22px; font-size: 13px; font-weight: 600; color: var(--ink-3); background: var(--paper-2); border-bottom: 1px solid var(--hair); }
.rgf-tab tbody th, .rgf-tab td { padding: 18px 22px; vertical-align: top; border-bottom: 1px solid var(--hair); }
.rgf-tab tbody tr:last-child > * { border-bottom: 0; }
.rgf-tab tbody th { width: 27%; font-weight: 600; color: var(--ink); }
.rgf-tab td { color: var(--ink-2); }
.rgf-tab td:nth-child(2) { width: 38%; }
.rgf-tab td b { display: block; margin-bottom: 2px; font-family: var(--serif); font-size: 21px; font-weight: 500; letter-spacing: -.015em; color: var(--ink); }

/* Unterbrechung: 21 Tage */
.rgf-ub { display: grid; grid-template-columns: repeat(21, minmax(0, 1fr)); column-gap: 4px; row-gap: 8px; }
.rgf-u { grid-row: 2; grid-column: var(--c); position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.rgf-u small { font-size: 11.5px; line-height: 1; color: var(--ink-3); }
.rgf-u.we small { opacity: .55; }
.rgf-uz { position: relative; display: block; width: 100%; height: 40px; border-radius: 7px; background: #F1EEE6; }
.rgf-u.pause .rgf-uz { background: none; box-shadow: inset 0 0 0 1px rgba(154,91,11,.16); }
.rgf-u.zu .rgf-uz { background: repeating-linear-gradient(135deg, #F3DAD6 0 3px, #FBEDEB 3px 6px); }
.rgf-t { position: absolute; inset: 3px; display: grid; place-items: center; border-radius: 6px; background: var(--ink); color: #fff; transform: scale(.5); }
.k-flow .rgf-t.on { transform: none; }
.rgf-t svg { width: 60%; max-width: 18px; height: auto; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.rgf-t.plan { background: #fff; box-shadow: inset 0 0 0 2px var(--ink); }
.rgf-t.ab { background: #fff; box-shadow: inset 0 0 0 2px #C9C5B8; }
.rgf-t.ab::before, .rgf-t.ab::after { content: ""; position: absolute; left: 22%; right: 22%; top: 50%; height: 2px; margin-top: -1px; border-radius: 1px; background: #A29E92; transform: rotate(45deg); }
.rgf-t.ab::after { transform: rotate(-45deg); }
.rgf-t.neu { background: var(--green); }
.rgf-uband { grid-row: 2; grid-column: var(--a) / var(--e); align-self: end; height: 40px; border-radius: 7px; background: #FBEFD9; transform-origin: left center; transform: scaleX(0); }
.k-flow .rgf-uband[data-at] { opacity: 1; transition: transform 2.2s linear; }
.k-flow .rgf-uband.on { transform: none; }
@media (prefers-reduced-motion: reduce) { .k-flow .rgf-uband[data-at] { transition: none; } }
.rgf-ug { grid-row: 2; grid-column: var(--c); align-self: end; justify-self: start; width: 2px; height: 56px; margin: 0 0 -8px -3px; border-radius: 1px; background: #B3261E; z-index: 2; }
.rgf-uk { grid-row: 1; grid-column: var(--a) / var(--e); display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: #9A5B0B; }
.rgf-uk i { flex: 1; height: 1px; background: currentColor; opacity: .5; }
.rgf-uk b { font-weight: 600; white-space: nowrap; }
.rgf-ul { grid-row: 3; grid-column: var(--c); justify-self: center; margin-top: 4px; font-size: 13.5px; font-weight: 600; line-height: 1.2; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rgf-ul.neu { color: var(--green); }
.rgf-ul.grenze { color: #B3261E; }
.rgf-ul time { display: block; }
.rgf-tkf { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; max-width: 1000px; margin: 22px auto 0; padding: 0; list-style: none; }
.rgf-tkf li { display: flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border-radius: 999px; border: 1px solid var(--hair); background: #fff; font-size: 15px; color: var(--ink); }
.rgf-tkf b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; }

/* Blankoverordnung */
.rgf-blanko { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; gap: 56px; max-width: 1000px; margin: 0 auto; padding: 44px; border-radius: 24px; background: var(--paper-2); border: 1px solid var(--hair); }
.rgf-blanko h2 { font-size: clamp(26px, 2.8vw, 36px); line-height: 1.1; letter-spacing: -.025em; font-weight: 500; margin: 0 0 16px; }
.rgf-blanko p { margin: 0 0 12px; font-size: 16.5px; line-height: 1.6; color: var(--ink-2); }
.rgf-blanko p:last-child { margin-bottom: 0; }
.rgf-bflow { padding: 28px 26px 24px; border-radius: 18px; background: #fff; border: 1px solid var(--hair); }
.rgf-wo { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 5px; }
.rgf-w { display: grid; place-items: center; height: 44px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-deep); font-style: normal; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; transform: scale(.8); }
.k-flow .rgf-w.on { transform: none; }
.rgf-w.pause { background: repeating-linear-gradient(135deg, #EDEAE1 0 3px, #F7F5EF 3px 6px); color: var(--ink-3); }
.rgf-w.ende { background: var(--accent); color: #fff; }
.rgf-bflow .rgf-ends { margin-top: 16px; }

/* Praxishub */
.rgf-link { margin-top: 16px !important; }
.rgf-link a { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 600; color: var(--accent-deep); }
.rgf-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rgf-karte-ph { max-width: 860px; padding: 14px; background: linear-gradient(180deg, #F6F4EE, #EFECE4); }
.rgf-vl { display: grid; gap: 8px; text-align: left; }
.rgf-vz { display: grid; grid-template-columns: minmax(0, 1fr) 250px 190px; align-items: center; gap: 4px 20px; padding: 18px 22px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px #e6e8ee; font-size: 15px; color: #3d4659; }
.rgf-vz > b { grid-column: 1; grid-row: 1; font-size: 16px; font-weight: 600; color: #131722; }
.rgf-vz > small { grid-column: 1; grid-row: 2; font-size: 13px; }
.rgf-vamp { grid-column: 2; grid-row: 1 / 3; justify-items: start; }
.rgf-termin { grid-column: 3; grid-row: 1 / 3; justify-self: end; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 9px; background: var(--green-soft); color: var(--green); font-style: normal; font-size: 13.5px; font-weight: 600; white-space: nowrap; transform: translateY(6px); }
.k-flow .rgf-termin.on { transform: none; }
.rgf-termin svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.rgf-amp { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; white-space: nowrap; }
.rgf-amp::before { content: ""; flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background: #1a9b59; }
.rgf-amp.gelb::before { background: #d9900f; }
.rgf-amp.anfrage::before { background: #4f46e5; }
.rgf-quellen { max-width: 860px; margin: 44px auto 0; text-align: center; font-size: 13px; line-height: 1.6; color: var(--ink-3); }
.rgf-ph-sec { padding-bottom: 104px; }

@media (max-width: 860px) {
  .rgf-form { grid-template-columns: 1fr 1fr; }
  .rgf-sw { grid-column: 1 / -1; grid-row: 2; }
  .rgf-res { grid-template-columns: 1fr; gap: 6px; }
  .rgf-blanko { grid-template-columns: 1fr; gap: 26px; }
}
@media (max-width: 720px) {
  body .hero-stage.rgf-kopf:not(#_) { padding-top: 36px; }
  body .hero-stage.rgf-kopf .hs-copy:not(#_) { text-align: left; }
  body .hero-stage.rgf-kopf h1:not(#_):not(#__) { margin-left: 0; margin-bottom: 16px; }
  .rgf-stand { margin-top: 12px; }
  .rgf-tool { margin-top: 26px; padding: 10px; border-radius: 22px; }
  .rgf-form { grid-template-columns: 1fr; gap: 8px; }
  .rgf-sw { grid-column: auto; grid-row: auto; justify-content: space-between; min-height: 60px; }
  .rgf-feld { padding: 12px 16px 10px; border-radius: 14px; }
  .rgf-feld input[type="date"] { min-height: 36px; }
  .rgf-out { margin-top: 8px; border-radius: 16px; }
  .rgf-res { padding: 20px 16px 18px; }
  .rgf-bar { gap: 1.5px; margin-top: 22px; }
  .rgf-d { border-radius: 2px; }
  .rgf-ann { margin: 12px 6px 6px; font-size: 13px; }

  .rgf-sec .sec-head { text-align: left; }
  .rgf-sec .sec-head p { margin-left: 0; font-size: 16.5px; }
  .rgf-karte { margin-top: 24px; padding: 22px 12px 18px; border-radius: 18px; }
  .rgf-klein { margin-top: 16px; text-align: left; font-size: 15.5px; }

  .rgf-tab { margin-top: 24px; display: block; border: 0; border-radius: 0; background: none; overflow: visible; }
  .rgf-tab thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .rgf-tab tbody { display: grid; gap: 8px; }
  .rgf-tab tr { display: grid; grid-template-columns: 1fr; gap: 4px; padding: 16px 16px 14px; border-radius: 16px; border: 1px solid var(--hair); background: #fff; }
  .rgf-tab tbody th, .rgf-tab td { display: block; width: auto !important; padding: 0; border: 0; }
  .rgf-tab tbody th { font-size: 14px; font-weight: 600; color: var(--ink-2); }
  .rgf-tab td { font-size: 15px; }
  .rgf-tab td b { font-size: 22px; }
  .rgf-tab td:last-child { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--hair); color: var(--ink); }

  .rgf-ub { column-gap: 2px; row-gap: 7px; }
  .rgf-u { gap: 6px; }
  .rgf-u small { font-size: 10.5px; }
  .rgf-uz, .rgf-uband { height: 48px; border-radius: 4px; }
  .rgf-t { inset: 0; border-radius: 4px; }
  .rgf-t svg { width: 78%; stroke-width: 3.4; }
  .rgf-t.ab::before, .rgf-t.ab::after { left: 12%; right: 12%; }
  .rgf-ug { height: 62px; margin: 0 0 -7px -2px; }
  .rgf-uk { font-size: 13px; gap: 6px; }
  .rgf-ul { font-size: 12.5px; }
  .rgf-tkf { justify-content: flex-start; gap: 8px; margin-top: 16px; }
  .rgf-tkf li { font-size: 14.5px; }

  .rgf-blanko { padding: 24px 14px 14px; border-radius: 20px; }
  .rgf-blanko-t { padding: 0 6px; }
  .rgf-blanko p { font-size: 16px; }
  .rgf-bflow { padding: 16px 14px 14px; border-radius: 14px; }
  .rgf-w { height: 38px; font-size: 13.5px; }

  .rgf-link { text-align: left; }
  .rgf-karte-ph { padding: 8px; }
  .rgf-vz { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 14px 16px; }
  .rgf-vamp { grid-column: 1 / -1; grid-row: 3; margin-top: 8px; padding-top: 11px; border-top: 1px solid #eef0f4; }
  .rgf-termin { grid-column: 2; grid-row: 1 / 3; padding: 6px 9px; font-size: 13px; }
  .rgf-quellen { margin-top: 28px; text-align: left; font-size: 12.5px; }
  .rgf-ph-sec { padding-bottom: 64px; }
}
