/*
 * SEO-Check ohne Konto (docs/seo-optimierung.md §14.2, Phase C3): Start-Formular auf /seo-check und die
 * Gast-Seiten /seo-check/{gesendet,bestaetigen,nachweis,ergebnis}. Kennfarben der Bereiche kommen als
 * --c aus Services\SeoTools\Ui\Palette (Inline-Stil), Ampel mit Symbol — nie nur Farbe.
 * Klassen der Diagramme (Ui\Charts: Wertring, Balken) wie im Kundenportal (seo-tools.css).
 */
.sg { --sg-border: var(--border, #e5e7eb); --sg-muted: var(--muted, #64748b); --sg-soft: #f8fafc; }
.sg-wrap { max-width: 860px; margin: 0 auto; padding: 1.4rem 16px 3rem; }
.sg-wrap--narrow { max-width: 640px; }
.sg-card { background: var(--surface, #fff); border: 1px solid var(--sg-border); border-radius: 16px; padding: 1.2rem 1.25rem; margin: 0 0 1rem; }
.sg-card h2 { margin: 0 0 .5rem; font-size: 1.15rem; }
.sg-card h3 { margin: 0 0 .35rem; font-size: 1rem; }
.sg-card p { line-height: 1.6; }
.sg-head { text-align: center; margin: .4rem 0 1.2rem; }
.sg-head h1 { margin: .2rem 0 .4rem; font-size: clamp(1.45rem, 4vw, 2rem); line-height: 1.2; overflow-wrap: anywhere; }
.sg-head p { margin: 0 auto; max-width: 600px; color: var(--sg-muted); line-height: 1.6; }
.sg-kicker { display: inline-block; padding: .2rem .7rem; border-radius: 999px; background: #eef2ff; color: #3730a3; font-weight: 700; font-size: .8rem; letter-spacing: .02em; }
.sg-steps { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; list-style: none; padding: 0; margin: 0 0 1.2rem; }
.sg-steps li { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .65rem; border-radius: 999px; font-size: .82rem; background: var(--sg-soft); border: 1px solid var(--sg-border); color: var(--sg-muted); }
.sg-steps li.is-done { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.sg-steps li.is-now { background: #eff6ff; border-color: #93c5fd; color: #1e3a8a; font-weight: 700; }
.sg-steps .sg-n { display: inline-flex; width: 1.25rem; height: 1.25rem; border-radius: 50%; align-items: center; justify-content: center; font-size: .72rem; font-weight: 800; background: rgba(0,0,0,.06); }

/* Formulare */
.sg-form { display: grid; gap: .9rem; }
.sg-field label { display: block; font-weight: 600; margin: 0 0 .3rem; }
.sg-field input[type=text], .sg-field input[type=email], .sg-field select { width: 100%; max-width: 100%; box-sizing: border-box; }
.sg-field .sg-help { font-size: .85rem; color: var(--sg-muted); margin: .25rem 0 0; }
.sg-field.has-error input, .sg-field.has-error select { border-color: #dc2626; }
.sg-error { color: #b91c1c; font-size: .88rem; margin: .3rem 0 0; }
.sg-error::before { content: "● "; }
.sg-row2 { display: grid; grid-template-columns: 1fr; gap: .9rem; }
.sg-choice { display: grid; grid-template-columns: 1fr; gap: .6rem; }
.sg-choice label { display: flex; gap: .6rem; align-items: flex-start; padding: .8rem .9rem; border: 1px solid var(--sg-border); border-radius: 12px; cursor: pointer; background: var(--surface, #fff); }
.sg-choice label:has(input:checked) { border-color: var(--lp-primary, #1d4ed8); box-shadow: 0 0 0 2px color-mix(in srgb, var(--lp-primary, #1d4ed8) 18%, transparent); }
.sg-choice input { margin-top: .3rem; flex: none; width: auto; }
.sg-choice strong { display: block; }
.sg-choice span span { display: block; font-size: .87rem; font-weight: 400; color: var(--sg-muted); margin-top: .15rem; }
.sg-check { display: flex; gap: .6rem; align-items: flex-start; font-size: .92rem; font-weight: 400; line-height: 1.5; cursor: pointer; }
.sg-check input { margin-top: .25rem; flex: none; width: auto; }
.sg-terms { max-height: 11rem; overflow-y: auto; border: 1px solid var(--sg-border); border-radius: 10px; padding: .6rem .9rem; background: var(--sg-soft); font-size: .85rem; line-height: 1.55; }
.sg-terms ol { margin: 0; padding-left: 1.1rem; }
.sg-note { font-size: .86rem; color: var(--sg-muted); line-height: 1.55; }
.sg-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }

/* Nachweis */
.sg-ways { display: grid; gap: .8rem; }
.sg-way { border: 1px solid var(--sg-border); border-left: 4px solid var(--c, #2563eb); border-radius: 12px; padding: .9rem 1rem; background: var(--surface, #fff); }
.sg-way h3 { display: flex; gap: .5rem; align-items: center; }
.sg-code { display: block; width: 100%; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; background: #0f172a; color: #e2e8f0; border-radius: 10px; padding: .65rem .8rem; overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; border: 0; resize: none; min-height: 0; field-sizing: content; }
.sg-way .sg-actions { margin-top: .5rem; }
.sg-status { padding: .7rem .9rem; border-radius: 12px; margin: 0 0 1rem; line-height: 1.55; }
.sg-status.is-ok { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.sg-status.is-warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.sg-status.is-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; }

/* Fortschritt */
.sg-progress { height: 12px; border-radius: 999px; background: #e5e7eb; overflow: hidden; margin: .6rem 0 .3rem; }
.sg-progress > span { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #2563eb, #7c3aed, #0d9488); transition: width .6s ease; }
@media (prefers-reduced-motion: reduce) { .sg-progress > span { transition: none; } }

/* Ergebnis */
.sg-score { display: grid; grid-template-columns: 1fr; gap: 1rem; align-items: center; }
.sg-score__ring { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .3rem; }
.seo-ring-track, .seo-bar-track { stroke: #e5e7eb; fill: #e5e7eb; }
.seo-ring-track { fill: none; }
.seo-ring-num { font-size: 34px; font-weight: 800; fill: var(--text, #0f172a); font-family: inherit; }
.seo-ring-of { font-size: 11px; fill: var(--sg-muted, #64748b); font-family: inherit; }
.seo-bar { display: block; width: 100%; height: 12px; }
.seo-bar-target { stroke: #0f172a; stroke-width: 1.5; stroke-dasharray: 2 2; opacity: .5; }
.sg-areas { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.sg-areas li { display: grid; grid-template-columns: auto 1fr auto; gap: .2rem .5rem; align-items: center; font-size: .9rem; }
.sg-areas li .seo-bar { grid-column: 1 / -1; }
.sg-dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; background: var(--c, #2563eb); }
.sg-areas b { font-variant-numeric: tabular-nums; }
.sg-measure { border: 1px solid var(--sg-border); border-left: 5px solid var(--s, #f59e0b); border-radius: 14px; padding: .9rem 1rem; margin: 0 0 .8rem; background: var(--surface, #fff); }
.sg-measure__head { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; margin: 0 0 .35rem; }
.sg-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: color-mix(in srgb, var(--c, #2563eb) 12%, #fff); border: 1px solid color-mix(in srgb, var(--c, #2563eb) 30%, #fff); color: #0f172a; }
.sg-chip::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--c, #2563eb); }
.sg-sev { font-weight: 700; font-size: .84rem; }
.sg-sev span { color: var(--s, #f59e0b); }
.sg-measure h3 { margin: .2rem 0 .4rem; font-size: 1.02rem; }
.sg-measure dl { margin: 0; display: grid; gap: .4rem; }
.sg-measure dt { font-weight: 700; font-size: .85rem; }
.sg-measure dd { margin: 0; font-size: .92rem; line-height: 1.55; color: #334155; }
.sg-urls { margin: .2rem 0 0; padding-left: 1.1rem; font-size: .86rem; overflow-wrap: anywhere; }
.sg-more { position: relative; border: 1px dashed #cbd5e1; border-radius: 14px; padding: 1rem; overflow: hidden; }
.sg-more__blur { filter: blur(5px); opacity: .55; pointer-events: none; user-select: none; display: grid; gap: .5rem; }
.sg-more__blur span { display: block; height: .8rem; border-radius: 6px; background: #cbd5e1; }
.sg-more__blur span:nth-child(3n+1) { width: 92%; } .sg-more__blur span:nth-child(3n+2) { width: 74%; } .sg-more__blur span:nth-child(3n) { width: 58%; }
.sg-more__text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 1rem; gap: .4rem; }
.sg-more__text strong { font-size: 1.05rem; }
.sg-more__areas { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: center; }
.sg-pages { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; font-size: .9rem; }
.sg-pages li { display: flex; justify-content: space-between; gap: .6rem; padding: .45rem .6rem; border-radius: 10px; background: var(--sg-soft); overflow-wrap: anywhere; }
.sg-pages code { font-size: .85rem; }
.sg-badge { flex: none; font-size: .78rem; font-weight: 700; padding: .05rem .5rem; border-radius: 999px; background: #e2e8f0; color: #0f172a; }
.sg-badge.is-ok { background: #dcfce7; color: #166534; }
.sg-badge.is-bad { background: #fee2e2; color: #991b1b; }
.sg-offer { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.sg-offer__box { border: 2px solid var(--lp-primary, #1d4ed8); border-radius: 18px; padding: 1.2rem 1.25rem; background: var(--surface, #fff); }
.sg-offer__box--soft { border: 1px solid var(--sg-border); }
.sg-price { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; margin: .1rem 0; }
.sg-price small { font-size: .9rem; font-weight: 600; color: var(--sg-muted); letter-spacing: 0; }
.sg-offer ul { margin: .5rem 0 0; padding-left: 1.1rem; line-height: 1.65; font-size: .93rem; }
.sg-legal { display: grid; gap: .55rem; margin: .4rem 0 .8rem; }
@media (min-width: 720px) {
  .sg-score { grid-template-columns: 220px 1fr; }
  .sg-row2 { grid-template-columns: 1fr 1fr; }
  .sg-choice { grid-template-columns: 1fr 1fr; }
  .sg-offer { grid-template-columns: 1.3fr 1fr; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sg-measure dd { color: inherit; }
}
