/* NOEMA Contract – Ergänzungen zum NOEMA-Website-Stylesheet (noema-site.css).
   Nutzt ausschließlich die Website-Variablen (--bg, --panel, --text, --muted, --gold, --gold-soft, --cyan, --line).
   Mobile-first: einspaltig, große Touchflächen; ab 900px zweispaltig mit Schrittleiste. */

:root {
  --danger: #e5484d;
  --danger-soft: #ff8a8d;
  --field-bg: #0f1116;
  --tap: 52px;
}

.nc-main { padding: 28px 0 80px; }
/* Einheitlicher Modulabstand für /vertrag/, /widerruf/ und /unterschreiben/.
   Direkte Karten haben keine zusätzlichen Einzel-Margins; jedes folgende Modul
   beginnt mit demselben Abstand, auch wenn zwischen #app und Karte ein noscript-Element steht. */
.nc-main > .nc-card { margin-block: 0; }
.nc-main > #app ~ .nc-card,
.nc-main > .nc-card + .nc-card { margin-top: 28px; }
@media (min-width: 900px) {
  .nc-main > #app ~ .nc-card,
  .nc-main > .nc-card + .nc-card { margin-top: 40px; }
}

.nc-hero { padding: 18px 0 22px; }
.nc-hero h1 { margin: 0; font-size: clamp(30px, 7vw, 46px); line-height: 1.1; letter-spacing: -.035em; }
.nc-hero .page-lead { margin-top: 14px; font-size: 17px; }
.nc-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.nc-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #a8d9e5; border: 1px solid rgba(66,211,255,.28); background: rgba(66,211,255,.06); }
.nc-chip.gold { color: var(--gold-soft); border-color: rgba(214,163,42,.4); background: rgba(214,163,42,.07); }

.nc-layout { display: grid; gap: 20px; }
.nc-card { border: 1px solid var(--line); border-radius: 18px; background: var(--panel, #15181e); padding: 20px; }
.nc-card > h2 { margin: 0 0 6px; font-size: clamp(22px, 5vw, 30px); letter-spacing: -.025em; line-height: 1.2; }
.nc-card > h2:focus { outline: none; }
.nc-card h3 { margin: 28px 0 10px; font-size: 19px; color: var(--gold-soft); letter-spacing: -.01em; }
.nc-card h4 { margin: 18px 0 8px; font-size: 16px; }
.nc-doc-label { color: var(--cyan); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 8px; }
.nc-text p, .nc-card p { color: #c8cdd5; line-height: 1.7; }
.nc-muted { color: var(--muted); font-size: 14px; }

/* Fortschritt */
.nc-progress { position: sticky; top: 72px; z-index: 20; margin: 0 -14px; padding: 10px 14px; background: rgba(11,12,15,.94); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nc-progress-bar { height: 6px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.nc-progress-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-soft)); transition: width .25s ease; }
.nc-progress-label { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); margin-top: 8px; }
.nc-progress-label strong { color: var(--text); }
.nc-steps { list-style: none; margin: 0; padding: 0; display: none; }
.nc-steps li { margin: 0; }
.nc-steps button { width: 100%; text-align: left; display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: center; min-height: 48px; padding: 8px 10px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); cursor: pointer; font-weight: 650; }
.nc-steps button:disabled { cursor: not-allowed; opacity: .55; }
.nc-steps button:not(:disabled):hover { background: rgba(255,255,255,.04); color: var(--text); }
.nc-steps .num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); font-size: 13px; }
.nc-steps [aria-current="step"] { color: var(--text); background: rgba(214,163,42,.08); }
.nc-steps [aria-current="step"] .num { border-color: var(--gold); color: var(--gold-soft); }
.nc-steps .done .num { background: rgba(88,200,140,.14); border-color: rgba(88,200,140,.5); color: #9de0ba; }

/* Formularelemente */
.nc-form { display: grid; gap: 22px; margin-top: 14px; }
.nc-field { display: grid; gap: 8px; }
.nc-field > label:not(.nc-option), .nc-fieldset > legend { display: block; color: #e2e6eb; font-weight: 650; font-size: 15px; line-height: 1.45; }
.nc-req { color: var(--gold-soft); margin-left: 4px; }
.nc-opt { color: var(--muted); font-weight: 400; font-size: 13px; margin-left: 6px; }
.nc-field input, .nc-field textarea { min-height: var(--tap); font-size: 16px; border-radius: 12px; }
.nc-field textarea { min-height: 112px; }
.nc-field input[readonly] { color: var(--muted); background: rgba(255,255,255,.03); border-style: dashed; }
.nc-help { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.nc-count { justify-self: end; color: var(--muted); font-size: 12px; }
.nc-fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; min-width: 0; }
.nc-fieldset > legend { padding: 0; margin-bottom: 10px; }
.nc-option { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; padding: 14px; min-height: var(--tap); border: 1px solid var(--line); border-radius: 14px; background: var(--field-bg); cursor: pointer; font-weight: 500; color: #d7dbe1; line-height: 1.5; transition: border-color .15s ease, background .15s ease; }
.nc-option:hover { border-color: rgba(214,163,42,.4); }
.nc-option:has(input:checked) { border-color: rgba(214,163,42,.75); background: rgba(214,163,42,.07); }
.nc-option:has(input:focus-visible) { outline: 2px solid var(--gold-soft); outline-offset: 3px; }
.nc-option input { width: 22px; height: 22px; margin: 1px 0 0; padding: 0; border: 0; box-shadow: none; accent-color: var(--gold); cursor: pointer; }
.nc-option small { display: block; margin-top: 6px; color: var(--muted); font-size: 13.5px; font-weight: 400; }
.nc-invalid input, .nc-invalid textarea, .nc-invalid .nc-option { border-color: var(--danger) !important; }
.nc-error { margin: 0; color: var(--danger-soft); font-size: 14px; font-weight: 650; display: flex; gap: 8px; }
.nc-error::before { content: "!"; flex: 0 0 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--danger); color: #fff; font-size: 12px; font-weight: 900; }

.nc-summary { border: 1px solid var(--danger); background: rgba(229,72,77,.08); border-radius: 14px; padding: 16px 18px; }
.nc-summary h3 { margin: 0 0 8px; color: var(--danger-soft); font-size: 16px; }
.nc-summary ul { margin: 0; padding-left: 18px; }
.nc-summary a { color: var(--text); text-decoration: underline; }
.nc-note { border: 1px solid rgba(66,211,255,.28); background: rgba(66,211,255,.05); border-radius: 14px; padding: 14px 16px; color: #cfe9f1; font-size: 14.5px; line-height: 1.6; }
.nc-note.gold { border-color: rgba(214,163,42,.45); background: rgba(214,163,42,.06); color: #eadbb4; }
.nc-note.warn { border-color: rgba(255,170,80,.5); background: rgba(255,170,80,.07); color: #f3d6b1; }
.nc-note p { margin: 0; color: inherit; }
.nc-note p + p { margin-top: 8px; }

/* Vertragstexte */
.nc-legal { border: 1px solid var(--line); border-radius: 14px; background: rgba(0,0,0,.18); }
.nc-legal > summary { cursor: pointer; padding: 14px 16px; min-height: var(--tap); font-weight: 700; color: var(--gold-soft); list-style-position: inside; }
.nc-prefill-body { padding: 4px 16px 18px; margin-top: 0; }
.nc-legal-body { padding: 0 16px 16px; max-height: 60vh; overflow-y: auto; }
.nc-legal-body h4 { color: var(--text); font-size: 15px; margin: 18px 0 6px; }
.nc-legal-body p, .nc-legal-body li { color: #c3c9d1; font-size: 14.5px; line-height: 1.75; margin: 6px 0; }
.nc-legal-body ul { padding-left: 20px; }


/* Eigenständiger KI-Risikohinweis mit ausdrücklicher, nicht vorausgewählter Bestätigung. */
.nc-ki-dialog { box-sizing: border-box; width: min(650px, calc(100vw - 24px)); max-height: calc(100dvh - 28px); overflow-y: auto; padding: 0; border: 2px solid #e45a60; border-radius: 18px; background: #1e1116; color: #fff; box-shadow: 0 22px 70px rgba(0,0,0,.75); }
.nc-ki-dialog::backdrop { background: rgba(0,0,0,.78); }
.nc-ki-dialog-inner { display: grid; gap: 14px; padding: clamp(18px, 4vw, 28px); }
.nc-ki-dialog h2 { margin: 0; color: #ffb5b9; font-size: clamp(20px, 4vw, 25px); line-height: 1.25; }
.nc-ki-subtitle { margin: 0; font-weight: 700; color: #ffe1e1; }
.nc-ki-notice-text { margin: 0; font-size: 15px; line-height: 1.6; color: #f4e5e5; }
.nc-ki-check { border-color: #dc6870; background: rgba(220,70,85,.09); color: #fff; }
.nc-ki-dialog.acknowledged { border-color: #52b885; background: #11231d; }
.nc-ki-dialog.acknowledged h2 { color: #aeedcb; }
.nc-ki-dialog.acknowledged .nc-ki-check { border-color: #52b885; background: rgba(70,190,120,.12); }
.nc-ki-buttons { display: grid; grid-template-columns: 1fr; gap: 10px; }
.nc-ki-buttons .btn { width: 100%; min-height: var(--tap); white-space: normal; }
.nc-ki-status { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid #e45a60; border-radius: 14px; background: rgba(228,90,96,.09); }
.nc-ki-status.approved { border-color: #52b885; background: rgba(82,184,133,.1); }
.nc-ki-status p { margin: 0; }
.nc-ki-status .nc-link-btn { justify-self: start; min-height: var(--tap); }
.nc-ki-status.pending strong { color: #ffb5b9; }
.nc-ki-status.approved strong { color: #aeedcb; }
@media(min-width: 560px) { .nc-ki-buttons { grid-template-columns: minmax(0,1fr) minmax(0,1fr); } }

/* Navigation */
.nc-actions { display: flex; flex-direction: column-reverse; gap: 10px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.nc-actions .btn { min-height: var(--tap); font-size: 15px; width: 100%; }
.nc-save { color: var(--muted); font-size: 13px; min-height: 18px; margin: 10px 0 0; }

.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #f2555a; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* Zusammenfassung */
.nc-review { display: grid; gap: 14px; }
.nc-review section { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: rgba(255,255,255,.02); }
.nc-review header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.nc-review h3 { margin: 0; font-size: 16px; color: var(--text); }
.nc-review dl { margin: 10px 0 0; display: grid; gap: 8px; }
.nc-review dt { color: var(--muted); font-size: 13px; }
.nc-review dd { margin: 0 0 4px; color: #e6e9ee; white-space: pre-wrap; overflow-wrap: anywhere; }
.nc-link-btn { background: none; border: 1px solid var(--line); color: var(--gold-soft); border-radius: 10px; padding: 8px 12px; min-height: 40px; cursor: pointer; font-weight: 700; }

/* Unterschrift */
.nc-sig { display: grid; gap: 10px; }
.nc-sig-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.nc-sig-pad { position: relative; border: 1px dashed rgba(214,163,42,.55); border-radius: 14px; background: #f7f7f5; touch-action: none; }
.nc-sig-pad canvas { display: block; width: 100%; height: 200px; border-radius: 14px; cursor: crosshair; touch-action: none; }
.nc-sig-pad .baseline { position: absolute; left: 18px; right: 18px; bottom: 44px; border-bottom: 1px solid #c9c9c4; pointer-events: none; }
.nc-sig-pad .hint { position: absolute; left: 18px; bottom: 14px; color: #8b8b86; font-size: 13px; pointer-events: none; }
.nc-sig-typed { font-family: "Brush Script MT", "Segoe Script", cursive; font-size: 30px; color: #16181d; background: #f7f7f5; border-radius: 12px; padding: 18px; min-height: 80px; }
.nc-blocks { display: grid; gap: 10px; }

/* Eigenständiger Einstieg: /unterschreiben/ */
.nc-sign-entry { margin-bottom: 20px; }
.nc-sign-entry > h2, .nc-sign-info > h2 { margin-top: 0; }
.nc-sign-process { list-style: none; counter-reset: sign-step; padding: 0; margin: 20px 0 26px; display: grid; gap: 16px; }
.nc-sign-process li { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: start; gap: 14px; min-width: 0; }
.nc-sign-process h3 { margin: 1px 0 5px; font-size: 17px; color: var(--text); }
.nc-sign-process p { margin: 0; color: var(--muted); line-height: 1.6; overflow-wrap: anywhere; }
.nc-sign-number { border: 1px solid rgba(214, 163, 42, .55); background: rgba(214, 163, 42, .08); color: var(--gold-soft); border-radius: 50%; width: 40px; height: 40px; font-weight: 800; display: grid; place-items: center; }
.nc-sign-actions { display: grid; gap: 10px; }
.nc-sign-actions .btn { text-align: center; min-height: var(--tap); display: flex; justify-content: center; align-items: center; padding-inline: 14px; white-space: normal; overflow-wrap: anywhere; }
.nc-sign-info p { line-height: 1.65; }
@media (min-width: 720px) {
  .nc-sign-process { gap: 20px; }
  .nc-sign-actions { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* Ergebnis */
.nc-success { border-color: rgba(88,200,140,.45); }
.nc-success-icon { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: rgba(88,200,140,.14); color: #9de0ba; font-size: 28px; font-weight: 900; margin-bottom: 12px; }
.nc-docs { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 10px; }
.nc-docs li { display: grid; gap: 8px; border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.nc-hash { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.nc-kv { display: grid; grid-template-columns: 1fr; gap: 2px 16px; margin: 12px 0; }
.nc-kv dt { color: var(--muted); font-size: 13px; }
.nc-kv dd { margin: 0 0 8px; font-weight: 650; overflow-wrap: anywhere; }

.nc-loading { display: grid; place-items: center; min-height: 40vh; color: var(--muted); }
.nc-widerruf-link { margin-top: 18px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nc-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

@media (min-width: 600px) {
  .nc-card { padding: 28px; }
  .nc-actions { flex-direction: row; justify-content: space-between; }
  .nc-actions .btn { width: auto; min-width: 180px; }
  .nc-kv { grid-template-columns: minmax(160px, auto) 1fr; }
  .nc-kv dd { margin: 0; }
}
@media (min-width: 900px) {
  .nc-main { padding-top: 36px; }
  .nc-layout { grid-template-columns: 270px minmax(0, 1fr); align-items: start; gap: 28px; }
  .nc-progress { position: sticky; top: 100px; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel, #15181e); }
  .nc-steps { display: grid; gap: 4px; margin-top: 14px; }
  .nc-card { padding: 36px; }
}
@media (max-width: 720px) {
  .nc-progress { top: 72px; }
}
@media print {
  .site-header, .site-footer, .nc-progress, .nc-actions, .nc-widerruf-link { display: none !important; }
  body { background: #fff; color: #000; }
  .nc-card { border: 0; background: #fff; color: #000; }
  .nc-card p, .nc-kv dd, .nc-kv dt { color: #000; }
}
@media (prefers-reduced-motion: reduce) { .nc-progress-bar span { transition: none; } }
.nc-receipt { white-space: pre-wrap; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.6; color: #dfe3e8; background: rgba(0,0,0,.25); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.nc-widerruf-info { margin-top: 20px; }
