:root {
  --bg: #f4f1eb;
  --surface: #fffef9;
  --text: #1c1917;
  --muted: #57534e;
  --accent: #0f766e;
  --accent-hover: #0d9488;
  --border: #e7e5e4;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(28, 25, 23, 0.06);
  --max: 42rem;
  --wide: 72rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--accent-hover);
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.site-header__inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.lang-switch {
  font-size: 0.9rem;
  color: var(--muted);
}

.lang-switch a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.lang-switch a:hover {
  text-decoration: underline;
}

.lang-switch__sep {
  margin: 0 0.35rem;
  color: var(--border);
}

.lang-switch__current {
  font-weight: 600;
  color: var(--text);
}

.site-logo {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
}

.site-logo:hover {
  color: var(--accent);
}

.nav-main {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  align-items: center;
}

.nav-main a {
  font-size: 0.95rem;
  color: var(--muted);
  text-decoration: none;
}

.nav-main a:hover {
  color: var(--accent);
}

.nav-tools {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  margin-left: 0.2rem;
  padding: 0.28rem 0.55rem 0.28rem 0.45rem;
  background: rgba(15, 118, 110, 0.1);
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 999px;
}

.nav-tools__icon {
  flex-shrink: 0;
  color: var(--accent);
  opacity: 0.92;
}

.nav-main .nav-tools a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 600;
  color: var(--accent);
}

.nav-main .nav-tools a:hover {
  color: var(--accent-hover);
}

main {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.hero {
  max-width: var(--max);
  margin-bottom: 2.5rem;
}

.hero-panorama {
  margin: 0 0 1.35rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  background: #1c1917;
}

.hero-panorama img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 15rem;
  object-fit: cover;
  object-position: center 48%;
}

.hero-panorama__credit {
  font-size: 0.5rem;
  line-height: 1.3;
  color: #a3a3a3;
  margin: 0;
  padding: 0.15rem 0.35rem 0.22rem 0.3rem;
  background: rgba(250, 250, 250, 0.55);
  border-top: 1px solid rgba(229, 229, 229, 0.65);
  letter-spacing: 0.02em;
  text-align: right;
}

.hero-panorama__credit a {
  color: #9ca3af;
  text-decoration: underline;
  text-decoration-color: rgba(156, 163, 175, 0.4);
  text-underline-offset: 0.1em;
}

.hero-panorama__credit a:hover {
  color: #78716c;
  text-decoration-color: rgba(120, 113, 108, 0.45);
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  line-height: 1.2;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.lead {
  font-size: 1.15rem;
  color: var(--muted);
  margin: 0 0 1.25rem;
}

.btn {
  display: inline-block;
  padding: 0.65rem 1.1rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.btn:hover {
  background: var(--accent-hover);
  color: #fff;
}

.global-contact-cta {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 90;
  box-shadow: 0 6px 18px rgba(15, 118, 110, 0.28);
}

.btn--ghost {
  background: var(--surface);
  color: var(--accent);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  background: #f0fdfa;
  color: var(--accent-hover);
}

.section-title {
  font-size: 1.35rem;
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.02em;
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.card p {
  margin: 0;
  font-size: 0.98rem;
  color: var(--muted);
}

.note-week {
  background: linear-gradient(135deg, #ecfdf5 0%, var(--surface) 55%);
  border: 1px solid #99f6e4;
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  margin: 2rem 0;
  max-width: var(--max);
}

.note-week h2 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.note-week p {
  margin: 0;
  color: var(--text);
}

.note-week .meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.75rem;
}

.newsletter {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: var(--max);
  margin-top: 2.5rem;
}

.newsletter h2 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}

.newsletter p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.newsletter form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.newsletter input[type="email"] {
  flex: 1 1 200px;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
}

.newsletter .hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.75rem;
}

.contact-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: var(--max);
  margin-top: 2rem;
}

.contact-block h2 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}

.contact-block__intro {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.contact-block__form .contact-block__field {
  margin-bottom: 1rem;
}

.contact-block__form label {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.contact-block__form input[type="email"],
.contact-block__form textarea {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}

.contact-block__form textarea {
  resize: vertical;
  min-height: 8rem;
  line-height: 1.5;
}

.contact-block__fineprint {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 1rem;
}

.contact-block .hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}

/* Datenauskunft orientation tool — neutral "certificate" layout, not Schufa branding */
.dc-tool__box {
  background: #faf8f4;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin: 1rem 0;
  font-size: 0.95rem;
}

.dc-tool__box summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}

.dc-cert {
  margin-top: 1rem;
}

.dc-cert__frame {
  background: linear-gradient(165deg, #fffdf8 0%, #f7f4ee 100%);
  border: 3px double rgba(28, 25, 23, 0.35);
  border-radius: 4px;
  padding: 1.5rem 1.35rem 1.25rem;
  box-shadow: var(--shadow);
  font-family: Georgia, "Times New Roman", serif;
}

.dc-cert__kicker {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.dc-cert__title {
  margin: 0 0 0.65rem;
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: #1c1917;
}

.dc-cert__lead {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #44403c;
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.dc-cert__warn {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.85rem;
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
  padding: 0.6rem 0.75rem;
  margin-bottom: 1rem;
  border-radius: 6px;
}

.dc-cert__section {
  margin-bottom: 1.1rem;
}

.dc-cert__section h3 {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  color: var(--accent);
}

.dc-cert__section p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  font-family: ui-sans-serif, system-ui, sans-serif;
  color: #292524;
}

.dc-cert__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.dc-cert__table th,
.dc-cert__table td {
  border: 1px solid #d6d3d1;
  padding: 0.45rem 0.55rem;
  text-align: left;
  vertical-align: top;
}

.dc-cert__table th {
  width: 34%;
  background: rgba(15, 118, 110, 0.06);
  font-weight: 600;
}

.dc-cert__list {
  margin: 0.35rem 0 0;
  padding-left: 1.2rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.9rem;
}

.dc-cert__legal {
  border-top: 1px dashed var(--border);
  padding-top: 0.85rem;
  margin-top: 0.5rem;
}

.dc-cert__footer {
  margin: 1rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, sans-serif;
  line-height: 1.45;
}

.prose {
  max-width: var(--max);
}

.prose h1 {
  font-size: clamp(1.6rem, 3.5vw, 2rem);
  margin-bottom: 0.75rem;
}

.prose h2 {
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
}

.prose ul,
.prose ol {
  padding-left: 1.35rem;
}

.prose li {
  margin-bottom: 0.35rem;
}

.breadcrumb {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.breadcrumb a {
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding: 1.5rem 1.25rem;
  font-size: 0.9rem;
  color: var(--muted);
  max-width: var(--wide);
  margin-left: auto;
  margin-right: auto;
}

.checklist fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  background: var(--surface);
}

.checklist legend {
  font-weight: 600;
  padding: 0 0.35rem;
}

.checklist label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0.5rem 0;
  cursor: pointer;
}

.checklist input {
  margin-top: 0.35rem;
}

.tool-page main {
  max-width: var(--wide);
}

.tool-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 960px) {
  .tool-layout {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.tool-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.tool-panel h2 {
  margin-top: 0;
  font-size: 1.15rem;
}

.tool-form label.span-2 {
  grid-column: 1 / -1;
}

.tool-form .field-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.tool-form input[type="text"],
.tool-form input[type="email"],
.tool-form input[type="tel"],
.tool-form input[type="number"],
.tool-form input[type="date"],
.tool-form select,
.tool-form textarea {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}

.tool-form textarea {
  min-height: 4rem;
  resize: vertical;
}

.tool-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
}

.tool-form-grid .full {
  grid-column: 1 / -1;
}

.tool-hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.25rem 0 0;
}

/* Mieterselbstauskunft — screen + print/PDF layout */
.msa-doc {
  --msa-doc-font: ui-sans-serif, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-family: var(--msa-doc-font);
  font-size: 0.95rem;
  line-height: 1.5;
  color: #1a1a1a;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem 1.75rem;
  min-height: 14rem;
  max-width: 48rem;
  margin: 0 auto;
}

.msa-doc__sheet {
  max-width: 40rem;
  margin: 0 auto;
}

.msa-doc__title {
  font-family: var(--msa-doc-font);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.15rem;
  line-height: 1.25;
  color: #111;
}

.msa-doc__subtitle {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  margin: 0 0 1rem;
}

.msa-doc__intro {
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0 0 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  color: #292524;
}

.msa-doc__sec {
  margin: 0 0 1.1rem;
  break-inside: avoid;
}

.msa-doc__h2 {
  font-family: var(--msa-doc-font);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #44403c;
  margin: 0 0 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 2px solid #0f766e;
}

.msa-doc__dl {
  margin: 0;
  display: grid;
  gap: 0.35rem 0;
}

.msa-doc__dl dt {
  font-size: 0.78rem;
  font-weight: 600;
  color: #57534e;
  margin: 0;
  padding-top: 0.35rem;
}

.msa-doc__dl dd {
  margin: 0 0 0.15rem;
  padding: 0.2rem 0 0.45rem;
  border-bottom: 1px solid #e7e5e4;
  font-size: 0.95rem;
  min-height: 1.35rem;
}

.msa-doc__dl dt:first-of-type + dd {
  padding-top: 0;
}

.msa-doc__block {
  font-size: 0.95rem;
  line-height: 1.55;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e7e5e4;
}

.msa-doc__muted {
  color: #78716c;
  font-style: italic;
}

.msa-doc__legal {
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 1.25rem 0 0.75rem;
  padding: 0.75rem 0.85rem;
  background: #fafaf9;
  border-left: 3px solid #0d9488;
  border-radius: 0 6px 6px 0;
}

.msa-doc__place {
  margin: 1rem 0 0.25rem;
  font-size: 0.95rem;
}

.msa-doc__sign {
  margin-top: 2rem;
  break-inside: avoid;
}

.msa-doc__sign-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #57534e;
  margin: 0 0 0.35rem;
}

.msa-doc__sign-line {
  height: 2.75rem;
  border-bottom: 1px solid #1c1917;
  max-width: 22rem;
}

/* Inside main.prose — отменить глобальные .prose h1/h2 для документа */
.prose .msa-doc h1.msa-doc__title {
  font-size: 1.35rem;
  margin: 0 0 0.15rem;
}

.prose .msa-doc h2.msa-doc__h2 {
  font-size: 0.8rem;
  margin: 0 0 0.5rem;
}

.tool-panel-msa {
  background: #fff;
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tool-disclaimer {
  font-size: 0.88rem;
  color: var(--muted);
  border-left: 3px solid var(--border);
  padding-left: 0.75rem;
  margin-top: 1rem;
}

.tracker-wrap {
  overflow-x: auto;
  margin: 1rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.tracker-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.tracker-table th,
.tracker-table td {
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0.65rem;
  text-align: left;
  vertical-align: top;
}

.tracker-table th {
  font-weight: 600;
  background: #faf9f6;
}

.tracker-table tr:last-child td {
  border-bottom: none;
}

.tracker-notes {
  max-width: 14rem;
  word-break: break-word;
}

.tracker-actions {
  white-space: nowrap;
}

.tracker-empty {
  color: var(--muted);
  text-align: center;
  padding: 1rem !important;
}

.btn-small {
  padding: 0.35rem 0.55rem;
  font-size: 0.9rem;
}

@media print {
  @page {
    size: A4;
    margin: 14mm 16mm;
  }

  .site-header,
  .nav-main,
  .newsletter,
  .contact-block,
  .skip-link,
  .site-footer,
  .tool-no-print {
    display: none !important;
  }

  .tool-print-only {
    display: block !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .dc-cert__frame {
    box-shadow: none;
    border: 2px solid #000;
    background: #fff;
  }

  .card {
    break-inside: avoid;
  }

  .tool-page main {
    max-width: none;
    padding: 0;
  }

  .tool-layout {
    display: block;
  }

  .tool-panel {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
  }

  .msa-doc {
    border: none;
    border-radius: 0;
    padding: 0;
    min-height: 0;
    max-width: none;
    margin: 0;
    font-size: 10.5pt;
    line-height: 1.45;
  }

  .msa-doc__title {
    font-size: 14pt;
  }

  .msa-doc__h2 {
    font-size: 9pt;
  }

  .msa-doc__sign {
    margin-top: 1.25rem;
  }
}
