/* ============================================================
   ABMAHN-CHECKER · V5 · COMPONENTS
   Komponenten-Vokabular. tokens-v3.css 1:1 prefixfrei portiert
   (.v3-Scope entfällt) + Garnishings aus Handoff §Creative Direction.
   Lädt nach base.css.
   ============================================================ */

/* ---- Eyebrow ------------------------------------------------ */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--moss);
  box-shadow: 0 0 0 3px var(--moss-ring);
}
.eyebrow.brand { color: var(--red); }
.eyebrow.brand .dot { background: var(--red); box-shadow: 0 0 0 3px var(--red-ring); }
.eyebrow .dot.live { animation: pulse 1.6s var(--ease) infinite; }

/* ---- Button ------------------------------------------------- */
.btn {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.005em;
  border-radius: var(--r-3);
  height: 44px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  transition: background var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; }
.btn-lg { height: 52px; padding: 0 22px; font-size: 15px; }
.btn-xl { height: 60px; padding: 0 26px; font-size: 15px; }
.btn-block { width: 100%; }

.btn-primary   { background: var(--ink); color: var(--card); }
.btn-primary:hover   { background: var(--red); }
.btn-red       { background: var(--red); color: #fff; }
.btn-red:hover       { background: var(--red-ink); }
.btn-ghost     { background: transparent; color: var(--ink); border-color: var(--rule-2); }
.btn-ghost:hover     { background: var(--card); border-color: var(--ink); }
.btn-gold      { background: var(--gold); color: var(--ink); }
.btn-gold:hover      { background: var(--gold-ink); color: #fff; }
.btn-ink-light { background: var(--card); color: var(--ink); border-color: var(--rule-2); }
.btn-ink-light:hover { border-color: var(--ink); }
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.45; pointer-events: none; cursor: not-allowed;
}

/* ---- Input -------------------------------------------------- */
.input {
  font-family: var(--font-sans);
  background: var(--card);
  border: 1px solid var(--rule-2);
  border-radius: var(--r-3);
  height: 48px;
  padding: 0 14px;
  font-size: 15px;
  color: var(--ink);
  width: 100%;
  outline: none;
  transition: border-color var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease);
}
.input::placeholder { color: var(--ink-4); }
.input:focus, .input:focus-visible {
  border-color: var(--ink);
  outline: none;
  box-shadow: 0 0 0 3px var(--rule-1);
}
.input.mono { font-family: var(--font-mono); font-size: 13.5px; letter-spacing: 0.02em; }
.input.is-invalid { border-color: var(--red); }
.input.is-valid   { border-color: var(--moss); }
.input-lg { height: 52px; }
.input-xl { height: 58px; font-size: 16px; }
textarea.input { height: auto; padding: 12px 14px; line-height: 1.5; resize: vertical; }
select.input { appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-4) 50%),
                    linear-gradient(135deg, var(--ink-4) 50%, transparent 50%);
  background-position: calc(100% - 18px) center, calc(100% - 13px) center;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
  padding-right: 36px;
}
.field-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-4);
  font-weight: 500;
  margin-bottom: 8px;
}

/* ---- Checkbox ----------------------------------------------- */
.cb {
  width: 18px; height: 18px;
  border: 1.5px solid var(--rule-3);
  border-radius: var(--r-2);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; background: var(--card);
  transition: background var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease);
}
.cb svg { width: 11px; height: 11px; opacity: 0; }
.cb.checked, .cb:has(input:checked) {
  background: var(--ink); border-color: var(--ink); color: #fff;
}
.cb.checked svg, .cb:has(input:checked) svg { opacity: 1; }
.cb input { position: absolute; opacity: 0; width: 0; height: 0; }
/* Tastatur-Fokus sichtbar machen — die echte <input> ist unsichtbar,
   ohne diese Regel sähe ein Tastatur-Nutzer den Fokus nicht (WCAG 2.2 AA). */
.cb:has(input:focus-visible) {
  outline: 2px solid var(--ink); outline-offset: 2px;
}

/* ---- Badge -------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--r-2);
  border: 1px solid var(--rule-2);
  background: var(--card);
  color: var(--ink-2);
  letter-spacing: -0.01em;
  font-weight: 500;
  white-space: nowrap;
}
.badge.red    { background: var(--red-tint);    color: var(--red-ink);    border-color: rgba(214,48,49,0.25); }
.badge.gold   { background: var(--gold-tint);   color: var(--gold-ink);   border-color: rgba(198,138,18,0.30); }
.badge.indigo { background: var(--indigo-tint);  color: var(--indigo);     border-color: rgba(58,63,177,0.25); }
.badge.moss   { background: var(--moss-tint);    color: var(--moss-ink);   border-color: rgba(39,122,74,0.25); }
.badge.ink    { background: var(--ink);          color: var(--card);       border-color: var(--ink); }

/* ---- Mono-Tag / Pill (Check-IDs, Rechtsgrundlagen) --------- */
.mono-tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.02em;
  color: var(--ink-3);
  background: var(--card-2);
  border: 1px solid var(--rule-1);
  border-radius: var(--r-1);
  padding: 3px 6px;
  white-space: nowrap;
}
.mono-tag.red { color: var(--red-ink); background: var(--red-tint); border-color: rgba(214,48,49,0.20); }

/* ---- Card --------------------------------------------------- */
.card {
  background: var(--card);
  border: 1px solid var(--rule-1);
  border-radius: var(--r-5);
}
.card-2     { background: var(--card-2); }
.card-pad   { padding: var(--s-10); }
.card-raised { box-shadow: var(--shadow-card); }
.card-float  { box-shadow: var(--shadow-float); }
.card-accent-top { border-top: 3px solid var(--red); }
.card-accent-top.gold   { border-top-color: var(--gold); }
.card-accent-top.indigo { border-top-color: var(--indigo); }
.card-dark {
  background: var(--ink); color: var(--card-2);
  border: 1px solid var(--ink);
}
.card-dark h1, .card-dark h2, .card-dark h3 { color: #fff; }

/* ---- Severity-Dot ------------------------------------------ */
.sev-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.sev-dot.critical { background: var(--red); }
.sev-dot.high     { background: var(--gold); }
.sev-dot.medium   { background: var(--indigo); }
.sev-dot.low      { background: var(--ink-4); }
.sev-dot.pass     { background: var(--moss); }
.sev-dot.lg { width: 22px; height: 22px; }

/* ---- Terminal-Chrome (3 Punkte + Pfad) --------------------- */
.terminal-chrome {
  display: flex; align-items: center; gap: 10px;
  height: 38px; padding: 0 14px;
  background: var(--card-2);
  border-bottom: 1px solid var(--rule-1);
  border-top-left-radius: inherit; border-top-right-radius: inherit;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-4);
}
.terminal-chrome .dots { display: flex; gap: 6px; }
.terminal-chrome .dots i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.terminal-chrome .dots i:nth-child(1) { background: var(--red); }
.terminal-chrome .dots i:nth-child(2) { background: var(--gold); }
.terminal-chrome .dots i:nth-child(3) { background: var(--moss); }
.terminal-chrome .path { color: var(--ink-3); }
.terminal-chrome .spacer { margin-left: auto; }

/* ---- Status-Strip (Hero-Top-Leiste) ------------------------ */
.status-strip {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 30px; padding: 6px 0;
  border-bottom: 1px solid var(--rule-1);
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink-4);
}
.status-strip .left, .status-strip .right { display: flex; align-items: center; gap: 14px; }
.status-strip .live {
  display: inline-flex; align-items: center; gap: 7px; color: var(--ink-3);
}
.status-strip .live::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--moss); box-shadow: 0 0 0 3px var(--moss-ring);
  animation: pulse 1.6s var(--ease) infinite;
}

/* ---- Section-Header · „02 / 12"-Pattern -------------------- */
.section-header {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: var(--s-14);
}
.section-header .count {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.04em; color: var(--red);
}
.section-header .tick { width: 32px; height: 1px; background: var(--rule-3); }
.section-header .label {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-4);
}
.section-header .rule { flex: 1; height: 1px; background: var(--rule-1); }

/* ---- Stepper (1 / 2 / 3) ----------------------------------- */
.stepper { display: flex; align-items: center; gap: 0; }
.stepper .step {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-4);
}
.stepper .step .num {
  width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--rule-2); background: var(--card);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--ink-3);
}
.stepper .step.active { color: var(--ink); }
.stepper .step.active .num { background: var(--ink); color: #fff; border-color: var(--ink); }
.stepper .step.done .num { background: var(--moss); color: #fff; border-color: var(--moss); }
.stepper .sep { width: 40px; height: 1px; background: var(--rule-2); margin: 0 16px; }

/* ---- Scanner-Log / Live-Log -------------------------------- */
.scanner-log {
  background: var(--bg);
  border: 1px solid var(--rule-1);
  border-radius: var(--r-4);
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 11.5px; line-height: 1.7; color: var(--ink-3);
}
.scanner-log .ok   { color: var(--moss); }
.scanner-log .warn { color: var(--gold-ink); }
.scanner-log .run  { color: var(--ink-3); }
.scanner-log .cursor {
  display: inline-block; width: 7px; height: 13px;
  background: var(--red); vertical-align: middle;
  animation: blink 1s step-end infinite;
}

/* ---- KPI-Card ---------------------------------------------- */
.kpi {
  background: var(--card);
  border: 1px solid var(--rule-1);
  border-radius: var(--r-5);
  padding: var(--s-8);
}
.kpi .label {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-4);
}
.kpi .value {
  font-size: 40px; font-weight: 700; letter-spacing: -0.03em;
  color: var(--ink); margin-top: 10px;
  font-variant-numeric: tabular-nums lining-nums;
}
.kpi .desc { font-size: 12px; color: var(--ink-4); margin-top: 6px; }

/* ---- Stat (Riesen-Zahl-Reihe) ------------------------------ */
.stat .value {
  font-size: clamp(40px, 6vw, 64px);  /* Phase 7: fluid */
  font-weight: 700; letter-spacing: -0.04em;
  color: var(--ink); font-variant-numeric: tabular-nums lining-nums;
}
.stat .label { font-size: 13.5px; color: var(--ink-3); margin-top: 8px; }
.stat .sub {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink-4); margin-top: 4px;
}

/* ---- Score-Block (Result) ---------------------------------- */
.score-block {
  width: 144px; height: 144px; border-radius: var(--r-6);
  background: var(--ink); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
}
.score-block .grade {
  font-size: 72px; font-weight: 700; line-height: 1; color: var(--gold);
}
.score-block .out {
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-4);
  font-variant-numeric: tabular-nums;
}

/* ---- Finding-Row ------------------------------------------- */
.finding {
  display: flex; gap: 16px;
  padding: var(--s-8) 0;
  border-bottom: 1px solid var(--rule-1);
}
.finding .meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 6px;
}
.finding .fid {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.02em; color: var(--ink-4);
}
.finding .title { font-size: 15px; font-weight: 600; color: var(--ink); }
.finding .body  { font-size: 13.5px; line-height: 1.6; color: var(--ink-3); margin-top: 6px; }
.finding .reco {
  background: var(--bg); border-radius: var(--r-3);
  padding: 12px 14px; margin-top: 10px;
  font-size: 13px; color: var(--ink-3);
}

/* ---- Pricing-Tier ------------------------------------------ */
.tier {
  background: var(--card);
  border: 1px solid var(--rule-1);
  border-radius: var(--r-5);
  padding: var(--s-10);
  display: flex; flex-direction: column; gap: 14px;
}
.tier.featured { border: 1.5px solid var(--red); position: relative; }
.tier .top-badge {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--red); color: #fff;
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: var(--r-1);
}
.tier .price {
  font-size: clamp(40px, 5vw, 56px);  /* Phase 7: fluid */
  font-weight: 700; letter-spacing: -0.04em; color: var(--ink);
  font-variant-numeric: tabular-nums lining-nums;
}
.tier .key-format {
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-4);
  background: var(--card-2); border: 1px dashed var(--rule-2);
  border-radius: var(--r-2); padding: 8px 10px; text-align: center;
}

/* ---- Glow-Callout (dunkel · Upgrade / CTA) ----------------- */
.glow-callout {
  position: relative; overflow: hidden;
  background: var(--ink); color: var(--card-2);
  border-radius: var(--r-6); padding: var(--s-14);
}
.glow-callout.red::before, .glow-callout.gold::before {
  content: ""; position: absolute; inset: -40% 30% auto -10%;
  height: 220px; border-radius: 50%;
  filter: blur(80px); opacity: 0.5; pointer-events: none;
}
.glow-callout.red::before  { background: var(--red); }
.glow-callout.gold::before { background: var(--gold); }
.glow-callout > * { position: relative; }
.glow-callout h2, .glow-callout h3 { color: #fff; }

/* ---- Pflicht-Hinweis-Box (juristisch · Footer/Result) ------ */
.legal-note {
  border-left: 2px solid var(--ink);
  padding: 4px 0 4px 16px;
  font-size: 12.5px; line-height: 1.6; color: var(--ink-3);
}

/* ---- Spinner ------------------------------------------------ */
.spinner {
  width: 72px; height: 72px; border-radius: 50%;
  border: 3px solid var(--rule-2); border-top-color: var(--ink);
  animation: spin 1.2s linear infinite;
}
.spinner.sm { width: 20px; height: 20px; border-width: 2px; }

/* ---- Progress-Bar ------------------------------------------ */
.progress { height: 6px; background: var(--rule-1); border-radius: var(--r-full); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--ink); border-radius: inherit;
  transition: width 240ms var(--ease); }

/* ---- Divider ----------------------------------------------- */
.rule { height: 1px; background: var(--rule-1); border: 0; }
.rule.strong { background: var(--rule-2); }
