/* Header: links wrap onto a second row on phones, so no page is ever unreachable */
.site-header { position: static; background: #fff; border-bottom: 1px solid var(--border); }
@media (min-width: 720px) { .site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(6px); } }
.site-header__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-block: 12px; }
.brand { font-family: var(--font-serif); font-size: 1.5rem; color: var(--brand); text-decoration: none; }
.nav { display: flex; flex-wrap: wrap; order: 3; flex-basis: 100%; gap: 6px 18px; font-size: 0.95rem; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current='page'] { color: var(--brand); }
@media (min-width: 720px) { .nav { order: 0; flex-basis: auto; gap: 24px; } }

/* Header with a menu button (option 1). The header is a ruler: the rule under it is drawn inside the header, so the mark of the current
   page sits ON the line. Below 1040 px the links open from a "Menü" button (nav.js); without the script they wrap under the name. */
html { scroll-padding-top: 84px; }
.site-header--menu { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(6px); border-bottom: 0; box-shadow: inset 0 -1px 0 var(--border); }
.site-header--menu .site-header__row { flex-wrap: nowrap; align-items: stretch; justify-content: flex-start; gap: 24px; padding-block: 0; min-height: 64px; }
.site-header--menu .brand { display: flex; align-items: center; flex: none; }
.site-header--menu .nav { display: flex; flex-wrap: nowrap; align-items: stretch; order: 0; flex-basis: auto; gap: 24px; margin-left: auto; font-size: 0.95rem; }
.site-header--menu .nav > a:not(.btn) { display: flex; align-items: center; padding-top: 3px; border-bottom: 3px solid transparent; white-space: nowrap; }
.site-header--menu .nav > a:not(.btn):hover { color: var(--brand); border-bottom-color: var(--brand-pale-border); }
.site-header--menu .nav > a[aria-current='page'] { color: var(--brand); font-weight: 600; border-bottom-color: var(--accent); }
.site-header--menu .nav .btn { align-self: center; margin-left: 4px; white-space: nowrap; }
.site-header--menu .nav .btn--primary, .site-header--menu .nav .btn--primary:hover { color: #fff; }   /* the plain link colour of .nav a must not reach the button */
.site-header--menu a:focus-visible, .nav-toggle:focus-visible { outline: 2px solid var(--brand-light); outline-offset: -2px; }

.nav-toggle { display: none; }
.nav-toggle__bars { position: relative; display: inline-block; width: 18px; height: 12px; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ''; position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px; background: currentColor; transition: top 0.18s, transform 0.18s; }
.nav-toggle__bars::before { top: 1px; }
.nav-toggle__bars::after { top: 9px; }
.nav-toggle[aria-expanded='true'] .nav-toggle__bars::before { top: 5px; transform: rotate(45deg); }
.nav-toggle[aria-expanded='true'] .nav-toggle__bars::after { top: 5px; transform: rotate(-45deg); }
@media (prefers-reduced-motion: reduce) { .nav-toggle__bars::before, .nav-toggle__bars::after { transition: none; } }

@media (max-width: 1039px) {
  /* the name and the button share a line; with enlarged text the button drops below the name instead of overflowing */
  html.js .site-header--menu .site-header__row { flex-wrap: wrap; align-items: center; row-gap: 8px; padding-block: 8px; }
  html.js .nav-toggle { display: inline-flex; align-items: center; align-self: center; gap: 10px; margin-left: auto; padding: 9px 14px; font: 600 0.95rem var(--font-sans); color: var(--brand); background: #fff; border: 1px solid var(--brand-pale-border); border-radius: var(--radius-sm); cursor: pointer; }
  html.js .nav-toggle:hover { background: var(--brand-pale); }
  html.js .site-header--menu .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; margin: 0; padding: 4px max(var(--gutter), calc((100% - var(--maxw)) / 2)) 22px; background: #fff; box-shadow: inset 0 1px 0 var(--border), 0 18px 28px rgba(21, 42, 64, 0.1); }
  html.js .site-header--menu .nav.is-open { display: flex; }
  html.js .site-header--menu .nav > a:not(.btn) { padding: 15px 0 15px 14px; border-bottom: 1px solid var(--border); border-left: 3px solid transparent; font-size: 1.05rem; white-space: normal; }
  html.js .site-header--menu .nav > a:not(.btn):hover { border-bottom-color: var(--border); border-left-color: var(--brand-pale-border); }
  html.js .site-header--menu .nav > a[aria-current='page'] { border-bottom-color: var(--border); border-left-color: var(--accent); }
  html.js .site-header--menu .nav .btn { align-self: stretch; margin: 18px 0 0; padding: 13px 18px; font-size: 1rem; text-align: center; white-space: normal; }
  /* without the script the links simply wrap under the name */
  html:not(.js) .site-header--menu .site-header__row { flex-wrap: wrap; align-items: center; padding-block: 10px; min-height: 0; }
  html:not(.js) .site-header--menu .nav { flex-basis: 100%; flex-wrap: wrap; gap: 6px 18px; margin-left: 0; }
  html:not(.js) .site-header--menu .nav > a:not(.btn) { padding-top: 0; border-bottom-width: 2px; }
}

/* Buttons */
.btn { display: inline-block; max-width: 100%; text-align: center; padding: 12px 22px; border-radius: var(--radius-sm); font: 600 1rem/1.2 var(--font-sans); text-decoration: none; border: 2px solid transparent; cursor: pointer; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); color: #fff; }
.btn--ghost { border-color: var(--brand-pale-border); color: var(--brand); background: #fff; }
.btn--ghost:hover { background: var(--brand-pale); color: var(--brand); }
.btn--sm { padding: 9px 14px; font-size: 0.9rem; }

/* Hero */
.hero { padding: 40px 0 56px; }
.hero__grid { display: grid; gap: 36px; align-items: center; }
@media (min-width: 900px) { .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); } .hero { padding: 72px 0 88px; } }
.eyebrow { font: 600 0.8rem/1.3 var(--font-sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 34em; }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 24px; }
.hero__fine { margin: 12px 0 0; font-size: 0.95rem; color: var(--muted); }
.hero__try { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--brand-pale-border); font-size: 1rem; color: var(--ink); }
.hero__try a { font-weight: 600; }
.spots { font-size: 0.95rem; color: var(--muted); }
/* Hero visual: the real app. The week calendar in a window, the phone's start screen hanging over its lower right corner. */
.hero__stage { position: relative; margin-bottom: 40px; }
.appwin { margin: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.hero__apps .phone { position: absolute; right: -6px; bottom: -40px; width: 24%; min-width: 104px; max-width: 170px; border-width: 6px; border-radius: 22px; }
@media (min-width: 900px) { .hero__apps .phone { right: -20px; border-width: 8px; border-radius: 28px; } }
.hero__caption { margin: 0; font-size: 0.82rem; color: var(--muted); }
/* the four functions at a glance, as links to their entries below */
.jumpnav { margin: 24px 0 36px; padding-bottom: 20px; border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 28px; }
.jumpnav p { margin: 0; font-weight: 600; color: var(--brand-dark); }
.jumpnav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.jumpnav a { color: var(--brand); text-decoration: underline; text-decoration-color: var(--brand-pale-border); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.jumpnav a:hover { text-decoration-color: var(--accent); }
.shot { margin: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.shot figcaption, .phone figcaption { font-size: 0.85rem; color: var(--muted); padding: 8px 12px; }
/* looping clips: the page colour is white, the clips fade to white at both ends */
.shot video, .phone video { display: block; width: 100%; height: auto; background: #fff; }
.phone { margin: 0; width: min(220px, 60%); border: 8px solid var(--brand-dark); border-radius: 30px; overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.moment__visual .phone { margin-inline: auto; }

/* Sections */
.section { padding: 56px 0; }
.section--alt { background: var(--surface-alt); }
.band--navy { background: var(--brand-dark); color: #dbe5ef; }
.band--navy h2, .band--navy h3 { color: #fff; }
.band--navy a:not(.btn) { color: #fff; }
.section__head { max-width: 40em; margin-bottom: 32px; }
.section__head p { color: var(--muted); }

.moment { display: grid; gap: 28px; align-items: center; padding: 28px 0; }
@media (min-width: 860px) { .moment { grid-template-columns: 1fr 1fr; gap: 56px; } .moment--reverse .moment__visual { order: -1; } }
.moment__text p { color: var(--muted); }
/* dense app screens (patient record, invoices, the photo scan) get the larger column; the calendar gets the whole width */
@media (min-width: 860px) {
  .moment--big { grid-template-columns: 5fr 7fr; gap: 48px; }
  .moment--big.moment--reverse { grid-template-columns: 7fr 5fr; }
  .moment--wide { grid-template-columns: 1fr; gap: 28px; }
  .moment--wide .moment__text { max-width: 68ch; }
}
.badge { display: inline-block; font: 600 0.75rem/1 var(--font-sans); letter-spacing: 0.04em; padding: 5px 9px; border-radius: 999px; background: var(--warning-bg); color: var(--warning-ink); vertical-align: middle; }
.ticks { list-style: none; padding: 0; margin: 0 0 1em; }
.ticks li { position: relative; padding-left: 28px; margin-bottom: 8px; }
.ticks li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: 600; }

.steps { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 16px; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { display: flex; flex-direction: column; align-items: flex-start; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.step__n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 600; margin-bottom: 10px; }
.step__n--note { background: var(--accent); }
.step h3 { font-size: 1.15rem; }
.step p { flex: 1 1 auto; color: var(--muted); margin: 0; }
.step .btn { margin-top: 20px; }
.step .spots { margin-top: 10px; font-size: 0.9rem; color: var(--muted); }
@media (min-width: 760px) { .steps--data { grid-template-columns: 1fr 1fr 1.6fr; } }   /* the open statement needs the room; the two facts stay short */
.beta__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 0; }

.cards { display: grid; gap: 16px; }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(3, 1fr); } .cards--two { grid-template-columns: repeat(2, 1fr); } }
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.card h3 { font-size: 1.2rem; }
.card p { color: var(--muted); }

.data-block { background: var(--brand-pale); border: 1px solid var(--brand-pale-border); border-radius: var(--radius); padding: 24px; }
.data-block h2 { font-size: 1.5rem; }

.faq details { border-bottom: 1px solid var(--border); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--brand-dark); }
.faq p { margin: 10px 0 0; color: var(--muted); }

.cta-band { text-align: center; padding: 56px 0; background: var(--brand-dark); color: #fff; }
.cta-band h2 { color: #fff; }
.cta-band .spots { color: #c4d2e0; display: block; margin-top: 12px; }

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { background: var(--brand-pale); border: 1px solid var(--brand-pale-border); color: var(--brand-dark); border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: 0.95rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0; font-size: 0.9rem; color: var(--muted); }
.site-footer__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.site-footer nav { display: flex; gap: 20px; }
.site-footer a { color: var(--muted); }

/* Legal and prose pages */
.legal, .prose { padding: 40px 0 64px; overflow-wrap: anywhere; }
.legal h2 { margin-top: 0; }
.legal h3 { font-family: var(--font-sans); font-weight: 600; font-size: 1.1rem; margin-top: 1.6em; }
.legal ul { padding-left: 1.2em; }
.legal .legal-stand { color: var(--muted); font-size: 0.9rem; }
.legal ol { padding-left: 1.4em; }
.legal li { margin-bottom: 0.5em; }
.legal .table-wrap { overflow-x: auto; margin: 1em 0; }
.legal table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.legal caption { text-align: left; color: var(--muted); font-size: 0.9rem; padding-bottom: 6px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.legal thead th { font-weight: 600; border-bottom-width: 2px; }
.legal .founders { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; margin: 1.6em 0; }
.legal .founders figure { margin: 0; }
.legal .founders img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; }
.legal .founders figcaption { margin-top: 8px; font-size: 0.9rem; color: var(--muted); }

/* Pages that were sections of the one-pager now have their own heading */
.section__head h1 { font-size: clamp(1.9rem, 4.6vw, 2.75rem); }

/* Ratgeber: one featured article, then a plain feed; the same feed in compact form under an article */
.article-meta { margin: 0 0 14px; font-size: 0.9rem; color: var(--muted); }
.article-meta a { color: var(--muted); }
.feed-meta { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.feed-cat { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--brand-pale); color: var(--brand); font-weight: 600; font-size: 0.85rem; }
.feed-date { color: var(--muted); font-size: 0.9rem; }
.feed-note { margin-top: 28px; color: var(--muted); }
.feature { padding: 28px; margin-bottom: 36px; background: var(--brand-pale); border: 1px solid var(--brand-pale-border); border-radius: var(--radius); }
.feature h2 { margin: 12px 0 10px; font-size: clamp(1.6rem, 3.6vw, 2.2rem); }
.feature h2 a { color: inherit; text-decoration: none; }
.feature h2 a:hover { color: var(--accent); }
.feature p:not(.feed-meta) { max-width: 40em; margin: 0 0 18px; color: var(--muted); }
.article-feed { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--brand-pale-border); }
.article-feed li { display: grid; gap: 8px 40px; padding: 22px 0; margin: 0; border-bottom: 1px solid var(--brand-pale-border); }
@media (min-width: 760px) { .article-feed li { grid-template-columns: 15rem minmax(0, 1fr); } .article-feed .feed-meta { align-self: start; padding-top: 4px; } }
.article-feed h2 { margin: 0 0 6px; font-size: 1.4rem; line-height: 1.25; }
.article-feed h2 a { color: var(--brand-dark); text-decoration: none; }
.article-feed h2 a:hover { color: var(--accent); }
.article-feed p { margin: 0; color: var(--muted); }
.article-feed--compact li { padding: 16px 0; }
.article-feed--compact h2 { font-size: 1.15rem; margin: 0; }
.legal .article-feed { padding-left: 0; }   /* .legal ul indents plain lists; the feed is not one */
.legal .article-feed h2 { font-size: 1.15rem; }

/* Kontakt: one form, the topic decides what it shows */
.cform { display: grid; gap: 16px; }
@media (min-width: 560px) { .cform { grid-template-columns: 1fr 1fr; } .cform__field--wide, .cform__actions, .cform__note, .cform__status, .cform__topics { grid-column: 1 / -1; } }
.cform__topics { margin: 0; padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.cform__topics legend { padding: 0; margin-bottom: 8px; font-weight: 600; color: var(--brand-dark); font-size: 0.95rem; }
.topic { margin: 0; font-weight: 400; cursor: pointer; }
.topic input { position: absolute; opacity: 0; }
.topic span { display: inline-block; padding: 10px 16px; border: 1px solid var(--brand-pale-border); border-radius: 999px; background: #fff; color: var(--brand-dark); font-weight: 600; }
.topic input:checked + span { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.topic input:focus-visible + span { outline: 2px solid var(--brand-light); outline-offset: 2px; }
.cform [hidden] { display: none; }
.cform label { display: block; margin-bottom: 6px; font-weight: 600; color: var(--brand-dark); font-size: 0.95rem; }
.cform__opt { font-weight: 400; color: var(--muted); }
.cform input[type='text'], .cform input[type='email'], .cform textarea { width: 100%; padding: 11px 14px; min-height: 46px; font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--brand-pale-border); border-radius: var(--radius-sm); }
.cform textarea { resize: vertical; }
.cform input:focus-visible, .cform textarea:focus-visible { outline: 2px solid var(--brand-light); outline-offset: 1px; border-color: var(--brand-light); }
.cform [aria-invalid='true'] { border-color: #b42318; }
.cform__error { margin: 6px 0 0; color: #b42318; font-size: 0.9rem; }
.cform__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }   /* the field only a robot fills */
.cform__note { margin: 0; font-size: 0.9rem; color: var(--muted); }
.cform__status { margin: 0; min-height: 1.2em; font-size: 0.95rem; color: var(--muted); }
.cform__lead { margin: 0 0 14px; }
.cform__done { padding: 18px 20px; border-radius: var(--radius); background: var(--brand-pale); border: 1px solid var(--brand-pale-border); }
.cform__done h3 { margin: 0 0 4px; font-size: 1.2rem; }
.cform__done p { margin: 0; color: var(--muted); }
.cform__done h3:focus { outline: none; }

/* Focus ring that stays visible on the navy band */
.cta-band :focus-visible, .band--navy :focus-visible { outline-color: #fff; }

/* Ratgeber: a Diagnosegruppe as a card, and a checklist to tick */
.legal .group { margin: 14px 0; padding: 16px 18px; background: #fff; border: 1px solid var(--brand-pale-border); border-radius: var(--radius); }
.legal .group p { margin: 8px 0 0; }
.legal .group__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin: 0; }
.group__code { padding: 2px 11px; border-radius: 999px; background: var(--brand-pale); color: var(--brand); font-weight: 700; font-size: 0.9rem; }
.group__title { font-weight: 600; color: var(--brand-dark); }
.legal .group__meta { color: var(--muted); font-size: 0.9rem; }
.legal .jumpnav { margin: 20px 0 8px; }
.legal .jumpnav ul { padding-left: 0; }
.legal ul.checklist { list-style: none; padding: 0; margin: 12px 0 28px; display: grid; gap: 10px; }
.legal .checklist li { margin: 0; }
.checklist label { display: grid; grid-template-columns: 22px 1fr; gap: 14px; align-items: start; margin: 0; padding: 13px 16px; background: #fff; border: 1px solid var(--brand-pale-border); border-radius: var(--radius); cursor: pointer; font-weight: 400; color: var(--ink); }
.checklist label:hover { border-color: var(--brand-light); }
.checklist input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--brand); }
.checklist input:focus-visible { outline: 2px solid var(--brand-light); outline-offset: 2px; }
.checklist input:checked + span { color: var(--muted); }
.checklist small { display: block; margin-top: 4px; color: var(--muted); font-size: 0.85rem; }

/* Printing (the checklist, the guides): no navigation, no closing band, no clips; links show their address */
@media print {
  .site-header, .site-footer, .cta-band, .nav-toggle, .jumpnav, .skip-link, video { display: none !important; }
  body { background: #fff; color: #000; }
  .legal { padding: 0; }
  .legal a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; word-break: break-all; }
  .group, .checklist label { break-inside: avoid; }
  .checklist label { border-color: #999; }
}
