:root {
  --hf-orange: #ee7100;
  --hf-blue: #0068b4;
  --hf-dark: #263746;
  --text: #253746;
  --muted: #647482;
  --line: #d8e0e7;
  --soft: #f5f7f9;
  --green: #2f9d64;
  --yellow: #e9ad22;
  --red: #d3423a;
  --shadow: 0 14px 36px rgba(38,55,70,.08);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; width: 100%; min-height: 100%; }
body { color: var(--text); font-family: Arial, Helvetica, sans-serif; background: transparent; }
button, a { font: inherit; }
button { border: 0; }
button:focus-visible, a:focus-visible { outline: 4px solid rgba(0,104,180,.25); outline-offset: 3px; }

.app { width: 100%; padding: 8px 0; }
.module-shell {
  position: relative;
  width: min(1180px, 100%);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.module-shell::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--hf-blue) 0 58%, var(--hf-orange) 58% 100%);
  z-index: 2;
}

.module-header {
  min-height: 78px;
  padding: 18px 26px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.module-title { min-width: 0; }
.module-kicker { display: block; color: var(--muted); font-size: 12px; line-height: 1.2; margin-bottom: 4px; }
.module-title strong { display: block; color: var(--hf-dark); font-size: 24px; line-height: 1.1; }
.progress-wrap { width: 290px; display: grid; gap: 6px; }
.progress-label { color: var(--muted); font-size: 13px; text-align: right; }
.progress { height: 8px; border-radius: 999px; background: #e7edf2; overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--hf-blue), var(--hf-orange)); border-radius: inherit; transition: width .18s ease; }
.is-hidden { visibility: hidden; }

.module-content { padding: 40px 42px 44px; }
.module-footer {
  border-top: 1px solid var(--line);
  background: #fbfcfd;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.module-footer p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.35; max-width: 780px; }
.footer-actions { display: flex; gap: 8px; flex-shrink: 0; }

.kicker, .panel-label { color: var(--hf-orange); font-weight: 800; text-transform: uppercase; letter-spacing: .075em; }
.kicker { font-size: 14px; margin-bottom: 10px; }
.panel-label { display: block; font-size: 11px; margin-bottom: 5px; }
h1, h2, h3, p { margin-top: 0; }
h1 { color: var(--hf-dark); font-size: clamp(40px, 5vw, 62px); line-height: 1.02; letter-spacing: -1.6px; margin-bottom: 18px; }
h2 { color: var(--hf-dark); font-size: clamp(34px, 4vw, 50px); line-height: 1.05; letter-spacing: -1.1px; margin-bottom: 14px; }
h3 { color: var(--hf-dark); }
.lead { color: var(--muted); font-size: clamp(20px,2vw,25px); line-height: 1.4; max-width: 760px; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 13px 22px; border-radius: 12px; font-weight: 800; font-size: 18px; cursor: pointer; text-decoration: none; }
.btn.primary { color: #fff; background: var(--hf-orange); box-shadow: 0 9px 22px rgba(238,113,0,.16); }
.btn.ghost { min-height: 38px; padding: 8px 14px; color: var(--hf-dark); background: #edf2f6; border: 1px solid var(--line); font-size: 14px; }
.btn:active { transform: scale(.985); }

.web-start { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(320px,.68fr); gap: 44px; align-items: center; }
.start-btn { margin-top: 26px; display: inline-flex; flex-direction: column; align-items: flex-start; text-align: left; padding: 16px 22px; }
.start-btn strong { font-size: 20px; line-height: 1.1; }
.start-btn span { font-size: 13px; line-height: 1.2; font-weight: 600; margin-top: 5px; opacity: .95; }
.start-panel { padding: 26px; border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(145deg, rgba(0,104,180,.05), rgba(238,113,0,.055)); }
.start-points { display: grid; gap: 13px; margin: 10px 0 18px; }
.start-points div { display: flex; gap: 11px; align-items: flex-start; color: var(--hf-dark); font-size: 17px; line-height: 1.3; }
.start-points span { width: 9px; height: 9px; margin-top: .42em; border-radius: 50%; background: var(--hf-orange); box-shadow: 0 0 0 5px rgba(238,113,0,.09); flex: 0 0 auto; }
.small-note { color: var(--muted); font-size: 13px; line-height: 1.4; padding-top: 14px; border-top: 1px solid rgba(100,116,130,.18); }

.question-wrap { max-width: 940px; }
.question-meta { color: var(--hf-orange); font-size: 15px; font-weight: 900; margin-bottom: 11px; }
.question-text { font-weight: 400; margin-bottom: 0; }
.question-hint { color: var(--muted); font-size: 20px; line-height: 1.35; max-width: 820px; margin: 15px 0 0; }
.answer-grid { width: min(620px,100%); display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 30px; }
.btn.answer { min-height: 72px; border-radius: 15px; color: #fff; font-size: 24px; box-shadow: none; }
.btn.answer.yes { background: var(--hf-blue); }
.btn.answer.no { background: var(--hf-orange); }

.result-layout { display: grid; grid-template-columns: minmax(300px,.7fr) minmax(0,1.3fr); gap: 30px; align-items: start; }
.result-summary { position: sticky; top: 12px; padding: 24px; border-radius: 20px; border: 1px solid var(--line); background: #f8fafc; }
.traffic { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 16px; border-left: 8px solid; margin-bottom: 18px; }
.traffic.green { background: rgba(47,157,100,.11); border-color: var(--green); }
.traffic.yellow { background: rgba(233,173,34,.16); border-color: var(--yellow); }
.traffic.red { background: rgba(211,66,58,.12); border-color: var(--red); }
.traffic-dot { width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto; box-shadow: inset 0 0 0 5px rgba(255,255,255,.7); }
.green .traffic-dot { background: var(--green); }
.yellow .traffic-dot { background: var(--yellow); }
.red .traffic-dot { background: var(--red); }
.traffic span { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; font-weight: 800; margin-bottom: 2px; }
.traffic strong { display: block; color: var(--hf-dark); font-size: 26px; }
.result-summary h2 { font-size: 34px; letter-spacing: -.7px; }
.result-text { color: var(--muted); font-size: 17px; line-height: 1.45; }
.result-note { padding: 11px 12px; border-radius: 10px; background: rgba(211,66,58,.07); color: #7b312d; font-size: 13px; line-height: 1.35; }
.contact-button { width: 100%; margin-top: 12px; text-align: center; }
.result-content { display: grid; gap: 20px; }
.status-section, .reco-section { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.section-heading h3 { margin: 0 0 14px; font-size: 23px; }
.status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.status-card { display: flex; align-items: center; gap: 11px; min-height: 66px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 13px; background: #fafcfd; }
.status-icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; flex: 0 0 auto; }
.status-card strong { display: block; color: var(--hf-dark); font-size: 14px; line-height: 1.2; margin-bottom: 2px; }
.status-card span:not(.status-icon) { display: block; color: var(--muted); font-size: 13px; line-height: 1.2; }
.status-card.ok .status-icon { background: rgba(47,157,100,.14); color: var(--green); }
.status-card.review .status-icon { background: rgba(233,173,34,.18); color: #9a6a00; }
.status-card.action .status-icon { background: rgba(211,66,58,.12); color: var(--red); }
.status-card.na .status-icon { background: #edf1f4; color: #85929c; }
.status-card.na { opacity: .72; }
.reco-list { display: grid; gap: 10px; }
.reco-card { padding: 14px 15px; border: 1px solid var(--line); border-radius: 13px; background: #f7f9fb; }
.reco-card strong { display: block; color: var(--hf-dark); font-size: 16px; line-height: 1.2; margin-bottom: 4px; }
.reco-card span { display: block; color: var(--muted); font-size: 14px; line-height: 1.35; }

@media (max-width: 860px) {
  .app { padding: 0; }
  .module-shell { border-radius: 0; border-left: 0; border-right: 0; box-shadow: none; }
  .module-header { padding: 16px 18px 13px; align-items: flex-start; }
  .module-title strong { font-size: 19px; }
  .module-kicker { font-size: 10.5px; }
  .progress-wrap { width: 130px; }
  .progress-label { font-size: 11px; }
  .module-content { padding: 28px 18px 32px; }
  .module-footer { padding: 12px 18px; flex-direction: column; align-items: flex-start; }
  .footer-actions { width: 100%; flex-wrap: wrap; }
  .footer-actions .btn { flex: 1 1 auto; }
  .web-start, .result-layout { grid-template-columns: 1fr; }
  .web-start { gap: 26px; }
  .result-summary { position: static; }
  .status-grid { grid-template-columns: 1fr; }
  .answer-grid { grid-template-columns: 1fr; }
  .btn.answer { min-height: 66px; }
  .start-btn { width: 100%; align-items: center; text-align: center; }
  .contact-button { width: 100%; }
}

@media (max-width: 520px) {
  .module-header { gap: 12px; }
  .progress-wrap { width: 105px; }
  h1 { font-size: 38px; letter-spacing: -1px; }
  h2 { font-size: 32px; }
  .lead { font-size: 19px; }
  .question-hint { font-size: 17px; }
  .start-panel, .result-summary, .status-section, .reco-section { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

/* v10: Sam als Ausstellungshinweis in der Webversion */
.start-side-stack { display: grid; gap: 16px; }
.sam-web-card { display: grid; grid-template-columns: 92px minmax(0,1fr) 92px; gap: 15px; align-items: center; padding: 15px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.sam-web-image { width: 92px; height: 92px; object-fit: cover; object-position: center 20%; border-radius: 15px; background: #101820; }
.sam-web-copy strong { display: block; color: var(--hf-dark); font-size: 18px; line-height: 1.15; margin-bottom: 5px; }
.sam-web-copy p { margin: 0 0 7px; color: var(--muted); font-size: 13.5px; line-height: 1.3; }
.sam-web-link { color: var(--hf-blue); font-weight: 800; font-size: 13px; text-decoration: none; }
.sam-web-link:hover { text-decoration: underline; }
.sam-web-qr img { width: 92px; height: 92px; display: block; object-fit: contain; padding: 5px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }

/* v10: PDF-Export */
.web-export-card { margin-top: 14px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.web-export-card > strong { display: block; color: var(--hf-dark); font-size: 15px; margin-bottom: 8px; }
.web-export-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn.export-btn { min-height: 42px; padding: 9px 10px; border-radius: 10px; font-size: 13px; background: var(--hf-blue); color: #fff; box-shadow: none; }
.btn.export-btn.secondary { background: #edf2f6; color: var(--hf-dark); border: 1px solid var(--line); }
.export-message { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.3; margin-top: 6px; }

@media (max-width: 860px) {
  .sam-web-card { grid-template-columns: 76px minmax(0,1fr) 80px; }
  .sam-web-image { width: 76px; height: 76px; }
  .sam-web-qr img { width: 80px; height: 80px; }
}

@media (max-width: 520px) {
  .sam-web-card { grid-template-columns: 72px 1fr; align-items: start; }
  .sam-web-image { width: 72px; height: 72px; }
  .sam-web-qr { grid-column: 1 / -1; display: none; }
  .sam-web-link { display: inline-flex; min-height: 40px; align-items: center; padding: 8px 12px; border-radius: 9px; background: #edf4f9; }
  .web-export-actions { grid-template-columns: 1fr; }
}


/* v11: PDF-Download und vorbereiteter E-Mail-Versand */
.web-export-copy { margin:4px 0 10px; color:var(--muted); font-size:13px; line-height:1.3; }
.email-export-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; margin-top:8px; }
.email-export-row input { min-width:0; border:1px solid var(--line); border-radius:11px; padding:10px 12px; font:inherit; color:var(--hf-dark); background:#fff; }
.email-export-row input:focus { outline:2px solid rgba(0,104,180,.18); border-color:var(--hf-blue); }
.email-export-row .btn { white-space:nowrap; }
.email-export-row .btn:disabled { opacity:.55; cursor:wait; }
@media(max-width:700px){.email-export-row{grid-template-columns:1fr}.email-export-row .btn{width:100%}}
