/* Hilfe-Center (web/help/hilfe.js) – baut auf den Tokens und Bausteinen aus style.css auf */
body.help { min-height: 100vh; }
.help-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.help-title { font-weight: 600; color: var(--ink-muted); padding-left: 12px; border-left: 1px solid var(--border); }
.help-search { flex: 1; max-width: 520px; margin-left: auto; height: 40px; }
.help-progress { position: sticky; top: 64px; z-index: 9; height: 3px; }
.help-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--indigo-bright), var(--pink-bright)); transition: width .15s; }

.help-body { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 32px; max-width: 1240px; margin: 0 auto; padding: 28px 24px 80px; }
.help-nav { position: sticky; top: 92px; align-self: start; display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - 110px); overflow: auto; }
.nav-progress { display: flex; align-items: center; gap: 12px; padding: 14px; margin-bottom: 10px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); }
.ring { --p: 0; width: 52px; height: 52px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--indigo-bright) calc(var(--p) * 1%), var(--surface-raised) 0); transition: background .4s; }
.ring span { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; color: var(--ink); text-decoration: none; font-size: 14px; transition: background .15s; }
.nav-item:hover { background: var(--surface); }
.nav-item.on { background: var(--surface-raised); box-shadow: inset 0 0 0 1px var(--border); font-weight: 500; }
.nav-num { width: 26px; height: 26px; flex: none; border-radius: 8px; display: grid; place-items: center; background: var(--surface-raised); font-size: 12px; font-weight: 600; color: var(--ink-muted); }
.nav-item.read .nav-num { background: var(--green); color: #fff; }
.nav-item.on .nav-num { background: var(--indigo-bright); color: #fff; }
.nav-faq { margin-top: 10px; border-top: 1px solid var(--border); border-radius: 0 0 12px 12px; padding-top: 14px; }

.help-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; font-size: 16px; line-height: 1.6; }
.help-main p { margin: 0; }
.help-main a:not(.btn):not(.pager):not(.topic):not(.search-hit) { color: var(--lavender); font-weight: 500; }
.chapter-hero { display: flex; gap: 20px; align-items: center; padding: 8px 0 4px; }
.chapter-hero h1 { margin: 4px 0 6px; font-size: clamp(28px, 3.4vw, 42px); line-height: 1.1; letter-spacing: -.02em; }
.help-lead { font-size: 19px; line-height: 1.55; }
.help-card { padding: 22px 24px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: 14px; }
.help-card h2 { margin: 0; font-size: 19px; display: flex; align-items: center; gap: 8px; }
.help-list { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.callout { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; font-size: 15px; }
.callout svg { flex: none; margin-top: 3px; }
.callout.tip { background: color-mix(in srgb, var(--indigo-bright) 14%, transparent); border: 1px solid color-mix(in srgb, var(--indigo-bright) 35%, transparent); }
.callout.warn { background: color-mix(in srgb, var(--amber) 14%, transparent); border: 1px solid color-mix(in srgb, var(--amber) 40%, transparent); }
kbd { display: inline-grid; place-items: center; min-width: 1.9em; padding: 1px 7px; border-radius: 7px; background: var(--surface-raised); border: 1px solid var(--border-strong); border-bottom-width: 2px; font: 600 13px/1.6 var(--font-sans); }

.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; counter-reset: s; }
.steps li { display: flex; gap: 14px; align-items: flex-start; }
.step-n { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--indigo-bright); color: #fff; font-weight: 700; font-size: 14px; }
.checklist .check-row { display: flex; gap: 14px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); cursor: pointer; transition: background .15s, border-color .15s; }
.checklist .check-row:hover { background: var(--surface-raised); }
.checklist .check-row input { width: 22px; height: 22px; flex: none; margin-top: 2px; accent-color: var(--green); }
.checklist .check-row:has(input:checked) { border-color: color-mix(in srgb, var(--green) 50%, transparent); }
.checklist .check-row:has(input:checked) b { text-decoration: line-through; opacity: .7; }
.check-meter { position: relative; height: 30px; border-radius: 999px; background: var(--surface-raised); overflow: hidden; display: grid; place-items: center; font-size: 13px; font-weight: 600; }
.check-meter i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--green), color-mix(in srgb, var(--green) 60%, var(--blue))); transition: width .5s var(--ease); }
.check-meter span { position: relative; }

.table-wrap { overflow-x: auto; }
.help-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.help-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-muted); padding: 0 12px 8px 0; }
.help-table td { padding: 10px 12px 10px 0; border-top: 1px solid var(--border); vertical-align: top; }
.help-table td:first-child { font-weight: 500; white-space: nowrap; }
.kbd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.kbd-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-raised); transition: background .2s, transform .2s; }
.kbd-row.hit { animation: keyhit .9s var(--ease); }
@keyframes keyhit { 0% { background: var(--indigo-bright); color: #fff; transform: scale(1.04); } 100% { background: var(--surface-raised); transform: none; } }

.help-figure { margin: 0; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.help-figure img { max-width: 100%; border-radius: 18px; border: 1px solid var(--border); box-shadow: var(--shadow-2); }
.help-figure.phone-shot img { max-height: 520px; border-radius: 34px; border: 8px solid #17171c; }

.case { border-left: 4px solid var(--indigo-bright); }
.tone-edge-pink { border-left-color: var(--pink-bright); } .tone-edge-blue { border-left-color: var(--blue); } .tone-edge-amber { border-left-color: var(--amber); } .tone-edge-indigo { border-left-color: var(--indigo-bright); }
.case-head { display: flex; align-items: center; gap: 12px; }
.case-flow { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }

/* Live-Demos */
.demo { background: linear-gradient(160deg, color-mix(in srgb, var(--indigo-bright) 10%, var(--surface)), var(--surface)); }
.demo-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.demo-body { display: flex; flex-direction: column; gap: 14px; }
.demo-grid { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 20px; align-items: center; }
.demo-stage { width: 100%; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: var(--bg); border: 1px solid var(--border); }
.demo-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.phone { position: relative; height: 420px; border-radius: 36px; border: 9px solid #17171c; background: var(--frame); padding: 34px 14px 16px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow-2); }
.phone-notch { position: absolute; top: 8px; left: 50%; width: 70px; height: 18px; border-radius: 999px; background: #17171c; transform: translateX(-50%); }
.phone-brand { font-weight: 800; font-size: 15px; } .phone-brand i { color: var(--pink-bright); font-style: normal; }
.phone-q { font-weight: 600; font-size: 16px; line-height: 1.3; }
.phone-opts { display: flex; flex-direction: column; gap: 8px; }
.phone-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; text-align: left; cursor: pointer; transition: transform .12s, border-color .15s; }
.phone-opt:hover { border-color: var(--indigo-bright); } .phone-opt:active { transform: scale(.97); }
.phone-opt .letter { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-raised); font-size: 12px; font-weight: 700; }
.type-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.type-btn { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.type-btn .chip-icon { width: 26px; height: 26px; border-radius: 50%; }
.type-btn.on { border-color: var(--indigo-bright); box-shadow: 0 0 0 1px var(--indigo-bright); }
.resize-area { padding: 6px; border-radius: 16px; background: repeating-linear-gradient(45deg, var(--surface-raised) 0 10px, transparent 10px 20px); min-height: 380px; }
.resize-frame { resize: both; overflow: hidden; width: 640px; height: 360px; min-width: 220px; min-height: 140px; max-width: 100%; border-radius: 12px; background: var(--bg); border: 2px dashed var(--indigo-bright); }
.resize-label { font-size: 13px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }

/* Kapitelende und FAQ */
.chapter-end { display: flex; justify-content: space-between; gap: 14px; margin-top: 12px; }
.pager { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); color: var(--ink); text-decoration: none; font-weight: 600; transition: transform .15s, border-color .15s; }
.pager:hover { transform: translateY(-2px); border-color: var(--indigo-bright); }
.pager.next { margin-left: auto; text-align: right; }
.faq-topics { display: flex; flex-wrap: wrap; gap: 8px; }
.topic { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); text-decoration: none; font-size: 14px; }
.topic.on { background: var(--surface-inverse); color: var(--ink-inverse); }
.faq-item { border-top: 1px solid var(--border); }
.faq-item:first-of-type { border-top: 0; }
.faq-item summary { list-style: none; display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; cursor: pointer; font-weight: 500; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary svg { transition: transform .2s; flex: none; margin-top: 4px; }
.faq-item[open] summary svg { transform: rotate(180deg); }
.faq-a { padding: 0 0 14px; color: var(--ink-muted); }
.faq-a b { color: var(--ink); }
.search-hit { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 14px; color: var(--ink); text-decoration: none; }
.search-hit:hover { background: var(--surface-raised); }

@media (max-width: 980px) {
  .help-body { grid-template-columns: 1fr; }
  .help-nav { position: static; max-height: none; }
  .help-title, .help-top .btn span { display: none; }
  .demo-grid { grid-template-columns: 1fr; }
  .phone { height: auto; max-width: 320px; margin: 0 auto; }
}
@media (max-width: 640px) { .help-top { flex-wrap: wrap; } .help-search { order: 5; max-width: none; flex-basis: 100%; } }
