/* Finanzierungs-Check (November 2026): on the financing pages and on /rechner/.
   Built from the existing tokens, card language and form sizes (16 px inputs on phones). */
@layer check {
  .check {
    --check-good: #2f7a55; --check-fair: #c5901f; --check-tight: #b04a2e; --check-none: #b9c6be;
    display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    background: #fff; border: 1px solid var(--line); border-radius: var(--finish-radius); overflow: hidden;
    box-shadow: 0 2px 4px #10251e04, 0 12px 28px #10251e06;
  }

  /* Inputs */
  .check-form { display: grid; align-content: start; gap: 20px; padding: clamp(24px, 3vw, 40px); }
  .check-field { display: grid; gap: 8px; min-width: 0; }
  .check-field label { color: var(--ink); font-size: .875rem; font-weight: 600; line-height: 1.4; }
  .check-field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .check-input { position: relative; display: flex; align-items: center; }
  .check-input input, .check-input select {
    width: 100%; min-width: 0; min-height: 52px; padding: 12px 70px 12px 16px;
    border: 1px solid #cdd8d0; border-radius: 8px; background: #fff;
    color: var(--ink); font-size: 1rem; font-variant-numeric: tabular-nums;
    transition: border-color 200ms ease, box-shadow 200ms ease;
  }
  .check-input input::placeholder { color: #8a9a91; }
  .check-input > span { position: absolute; right: 16px; color: var(--muted); font-size: .875rem; pointer-events: none; }
  .check-input input:hover, .check-input select:hover { border-color: #a9bab0; }
  .check-input input:focus-visible, .check-input select:focus-visible { outline: none; border-color: var(--forest); box-shadow: 0 0 0 4px #132f2814; }
  .check-input input[aria-invalid=true] { border-color: var(--check-tight); box-shadow: 0 0 0 4px #b04a2e14; }
  .check-select select { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer; }
  .check-select::after {
    content: ''; position: absolute; right: 19px; top: 50%; width: 7px; height: 7px; margin-top: -6px;
    border-right: 1.5px solid var(--forest); border-bottom: 1.5px solid var(--forest); transform: rotate(45deg); pointer-events: none;
  }
  .check-hint { color: var(--muted); font-size: .8125rem; line-height: 1.5; }

  /* Result */
  .check-result { display: flex; flex-direction: column; gap: 22px; min-width: 0; padding: clamp(24px, 3vw, 40px); background: var(--soft); border-left: 1px solid var(--line); }
  .check-verdict { display: flex; align-items: flex-start; gap: 16px; min-height: 76px; }
  .check-signal { flex: none; width: 14px; height: 14px; margin-top: 9px; border-radius: 50%; background: var(--check-none); box-shadow: 0 0 0 5px #b9c6be33; transition: background 300ms ease, box-shadow 300ms ease; }
  .check[data-state=good] .check-signal { background: var(--check-good); box-shadow: 0 0 0 5px #2f7a5522; }
  .check[data-state=fair] .check-signal { background: var(--check-fair); box-shadow: 0 0 0 5px #c5901f26; }
  .check[data-state=tight] .check-signal { background: var(--check-tight); box-shadow: 0 0 0 5px #b04a2e22; }
  .check-verdict-title { color: var(--ink); font-size: clamp(1.35rem, 1.9vw, 1.65rem); font-weight: 600; line-height: 1.25; letter-spacing: -.03em; }
  .check-verdict-text { margin-top: 6px; color: var(--muted); font-size: .9375rem; line-height: 1.6; text-wrap: pretty; }

  .check-figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
  .check-figures > div { display: grid; align-content: start; gap: 6px; min-width: 0; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
  .check-figures dt { color: var(--muted); font-size: .75rem; font-weight: 600; line-height: 1.4; letter-spacing: .02em; }
  .check-figures dd { display: grid; gap: 4px; margin: 0; }
  .check-figures strong { color: var(--ink); font-size: 1.375rem; font-weight: 650; line-height: 1.25; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .check-level { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); font-size: .8125rem; font-weight: 600; line-height: 1.4; }
  .check-level:empty { display: none; }
  .check-level::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--check-none); }
  [data-level='0'] > dd > .check-level::before { background: var(--check-good); }
  [data-level='1'] > dd > .check-level::before { background: var(--check-fair); }
  [data-level='2'] > dd > .check-level::before { background: var(--check-tight); }
  .check-figures .check-hint { font-size: .75rem; }

  .check-room { display: grid; gap: 4px; padding-top: 20px; border-top: 1px solid #d9e2dc; }
  .check-room > span:first-child { color: var(--muted); font-size: .8125rem; font-weight: 600; }
  .check-room strong { color: var(--ink); font-size: 1.375rem; font-weight: 650; line-height: 1.3; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
  .check-room > span:last-child { color: var(--muted); font-size: .875rem; line-height: 1.5; }

  .check-action { display: grid; justify-items: start; gap: 10px; }
  .check-cta { gap: 14px; min-height: 52px; padding: 14px 20px; font-size: .9375rem; }
  .check-minimum { color: #7a3a1d; font-size: .8125rem; line-height: 1.5; }
  .check-fineprint { margin-top: -8px; color: var(--muted); font-size: .75rem; line-height: 1.6; }
  .check-method { border-top: 1px solid #d9e2dc; padding-top: 14px; }
  .check-method summary { display: inline-flex; align-items: center; min-height: 32px; color: var(--ink); font-size: .8125rem; font-weight: 600; cursor: pointer; text-decoration: underline; text-decoration-color: #a5b6ab; text-underline-offset: 3px; }
  .check-method summary:hover { color: var(--copper); }
  .check-method p { margin-top: 8px; color: var(--muted); font-size: .8125rem; line-height: 1.7; }
  .check-noscript { color: var(--muted); }

  /* /rechner/ */
  .tools-hub { padding-block: 28px clamp(72px, 7vw, 104px); }
  .tools-hub .breadcrumbs { margin-bottom: clamp(36px, 4vw, 52px); }
  .tools-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: 64px; align-items: end; margin-bottom: clamp(32px, 4vw, 52px); }
  .tools-heading .section-label { margin-bottom: 20px; }
  .tools-heading h1 { margin: 0; font-size: clamp(2.6rem, 4.6vw, 4rem); line-height: 1.08; }
  .tools-heading h1 em { color: var(--muted); }
  .tools-intro { padding-bottom: 6px; color: var(--muted); font-size: 1.0625rem; line-height: 1.8; }

  @media (max-width: 1100px) {
    .check-figures { grid-template-columns: minmax(0, 1fr); }
    .check-figures > div { grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 16px; }
    .check-figures dd { justify-items: end; text-align: right; }
    .check-figures .check-hint { display: none; }
  }
  @media (max-width: 980px) {
    .check { grid-template-columns: minmax(0, 1fr); }
    .check-result { border-left: 0; border-top: 1px solid var(--line); }
    .check-figures { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .check-figures > div { grid-template-columns: minmax(0, 1fr); }
    .check-figures dd { justify-items: start; text-align: left; }
    .check-figures .check-hint { display: block; }
    .tools-heading { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .tools-intro { max-width: 560px; padding-bottom: 0; }
  }
  @media (max-width: 680px) {
    .check-figures { grid-template-columns: minmax(0, 1fr); }
    .check-figures > div { grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 16px; padding: 14px 16px; }
    .check-figures dd { justify-items: end; text-align: right; }
    .check-figures .check-hint { display: none; }
  }
  @media (max-width: 600px) {
    .tools-hub { padding-top: 20px; }
    .tools-heading h1 { font-size: min(2.6rem, 9.2vw); }
    .check { border-radius: 10px; }
    .check-form, .check-result { padding: 22px 20px; }
    .check-form { gap: 18px; }
    .check-verdict { min-height: 0; }
    .check-action, .check-cta { width: 100%; }
    .check-cta { justify-content: space-between; }
  }
  @media (max-width: 380px) {
    .check-field-row { grid-template-columns: minmax(0, 1fr); }
    .check-form, .check-result { padding-inline: 16px; }
  }
}
