/* Renditerechner – integrated styles for optimus.partners
   Adapted palette: warm navy/cream to match the main site. */

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/fonts/cormorant-300-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/fonts/cormorant-300-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 300 400;
  font-display: swap;
  src: url('/fonts/outfit-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 300 400;
  font-display: swap;
  src: url('/fonts/outfit-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --surface: #ffffff;
  --border: #e0ddd8;
  --border-strong: #d0ccc5;
  --input-border: #7c8493; /* 3.76:1 on white — WCAG 1.4.11 non-text contrast */
  --text: #1e3a5f;
  --text-muted: #6b7589;
  --text-soft: #5b6473;
  --accent: #4a7396;
  --accent-text: #3f6485;
  --accent-soft: #eaf0f6;
  --accent-border: #b5c8d8;
  --positive: #047857;
  --negative: #b91c1c;
  --row-total: #f0efec;
  --row-result: #eaf0f6;
  --row-positive: #ecfdf5;
  --shadow-sm: 0 1px 2px rgba(30, 58, 95, 0.04);
  --shadow: 0 4px 14px rgba(30, 58, 95, 0.06);
  --radius: 14px;
  --radius-sm: 8px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* Visually hidden but available to assistive technology */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(74, 115, 150, 0.15);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  background: var(--bg, #f7f6f3);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#rechner {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
}

/* Layout */
.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 24px 80px;
  padding-bottom: max(80px, env(safe-area-inset-bottom));
  padding-left: max(24px, env(safe-area-inset-left));
  padding-right: max(24px, env(safe-area-inset-right));
}

@media (max-width: 640px) {
  .page {
    padding: 20px 16px 60px;
    padding-bottom: max(60px, env(safe-area-inset-bottom));
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
}

/* Header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.page-header h1 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.3rem, 2.8vw, 1.9rem);
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
}

.subtitle {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 15px;
}

.header-actions {
  display: flex;
  gap: 8px;
}

/* Buttons */
.btn {
  appearance: none;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: white;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.btn-ghost:focus-visible {
  outline-color: var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  background: var(--surface);
}

/* KPI Strip */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 28px;
}

@media (max-width: 900px) {
  .kpi-strip { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 460px) {
  .kpi-strip { grid-template-columns: 1fr; }
}

.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease;
}

.kpi-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft);
  font-weight: 600;
  margin-bottom: 4px;
}

.kpi-value {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.kpi-highlight {
  background: var(--accent-soft);
  border-color: var(--accent-border);
}

.kpi-highlight .kpi-value { color: var(--accent); }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.card-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.card-total {
  font-size: 13px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.card-total strong {
  color: var(--text);
  font-weight: 700;
  margin-left: 4px;
}

.card-body {
  padding: 18px 22px 20px;
}

/* Grid layouts */
.grid {
  display: grid;
  gap: 14px;
}

.grid-2 { grid-template-columns: 1fr 1fr; }

@media (max-width: 640px) {
  .grid-2 { grid-template-columns: 1fr; }
}

/* Fields */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.field input[type="text"],
.field input[type="number"] {
  width: 100%;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font: inherit;
  font-size: 14px;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.calc-table input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(74, 115, 150, 0.15);
}

/* Tables */
.table-wrap {
  margin: -4px -6px 0;
  overflow-x: auto;
}

.calc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 560px;
}

.calc-table thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: transparent;
}

.calc-table thead .col-pct,
.calc-table thead .col-chf { text-align: right; }
.calc-table thead .col-basis { text-align: left; color: var(--text-soft); }

.calc-table tbody th,
.calc-table tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

/* Row-header cells (first column, scope="row") render like the old <td>:
   left-aligned, regular weight — total/result rows keep <td> and stay bold. */
.calc-table tbody th {
  text-align: left;
  font-weight: 400;
}

.calc-table tbody tr:last-child th,
.calc-table tbody tr:last-child td {
  border-bottom: none;
}

.calc-table th small,
.calc-table td small {
  color: var(--text-soft);
  font-weight: 400;
  font-size: 12px;
  margin-left: 4px;
}

.calc-table .col-label { width: 38%; }
.calc-table .col-pct { width: 14%; text-align: right; }
.calc-table .col-basis { width: 18%; color: var(--text-soft); font-size: 13px; }
.calc-table .col-chf { width: 30%; text-align: right; }

.calc-table td:nth-child(2),
.calc-table td:nth-child(4) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.stress-table td:nth-child(3),
.stress-table td:nth-child(5) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.calc-table input[type="number"],
.calc-table input[type="text"][data-chf] {
  width: 100%;
  max-width: 140px;
  border: 1px solid var(--input-border);
  border-radius: 6px;
  padding: 6px 10px;
  font: inherit;
  font-size: 14px;
  text-align: right;
  background: var(--surface);
  color: var(--text);
  font-variant-numeric: tabular-nums;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Hide spin buttons */
.calc-table input[type="number"]::-webkit-inner-spin-button,
.calc-table input[type="number"]::-webkit-outer-spin-button,
.field input[type="number"]::-webkit-inner-spin-button,
.field input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.calc-table input[type="number"],
.field input[type="number"] { -moz-appearance: textfield; }

@media (max-width: 768px) {
  .field input[type="text"],
  .field input[type="number"],
  .calc-table input[type="text"],
  .calc-table input[type="number"] {
    font-size: 16px;
  }
}

.calc-table output {
  display: inline-block;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

/* Special row styles */
.row-positive th,
.row-positive td {
  background: var(--row-positive);
}

.row-positive td:nth-child(4) {
  font-weight: 600;
  color: var(--positive);
}

.row-subhead td {
  background: var(--row-total);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-soft);
  padding: 6px 12px !important;
}

.row-total td {
  background: var(--row-total);
  font-weight: 700;
  border-top: 2px solid var(--border-strong);
}

.row-result td {
  background: var(--row-result);
  font-weight: 700;
  color: var(--accent-text);
}

.row-result td output {
  color: var(--accent-text);
}

/* Metrics grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.metric {
  background: var(--row-total);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.metric-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-soft);
  font-weight: 600;
}

.metric-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.metric-formula {
  font-size: 12px;
  color: var(--text-soft);
}

.metric-highlight {
  background: var(--accent-soft);
  border-color: var(--accent-border);
}
.metric-highlight .metric-value { color: var(--accent); }

/* Hints */
.hint {
  margin: 12px 4px 0;
  font-size: 13px;
  color: var(--text-soft);
}

.hint-warning {
  color: var(--negative);
  font-weight: 500;
}

.hint-positive {
  color: var(--positive);
  font-weight: 500;
}

/* Footer */
.page-footer {
  margin-top: 32px;
  text-align: center;
  color: var(--text-soft);
  font-size: 12px;
}

.legal-links {
  margin-top: 6px;
}
.legal-links a {
  color: var(--text-soft);
  text-decoration: none;
}
.legal-links a:hover {
  text-decoration: underline;
  color: var(--accent);
}

.tools-link {
  margin-top: 14px;
}
.tools-link a {
  color: var(--accent-text);
  text-decoration: none;
  font-weight: 500;
}
.tools-link a:hover {
  text-decoration: underline;
}

/* Off-screen helper for clipboard fallback */
.copy-fallback {
  position: absolute;
  left: -9999px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: max(24px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: white;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Negative / Positive value highlights */
.is-negative { color: var(--negative) !important; }
.is-positive { color: var(--positive) !important; }

/* Tablet (768-1024px) */
@media (max-width: 1024px) {
  .card-body { padding: 14px 16px 16px; }
  .card-header { padding: 14px 16px; }
  .calc-table { font-size: 13px; }
  .calc-table .col-label { width: 34%; }
  .calc-table .col-chf { width: 32%; }
  .metric-value { font-size: 20px; }
  .kpi-value { font-size: 20px; }
}

/* Phone — collapse "Basis" column, remove min-width, tighten spacing */
@media (max-width: 640px) {
  .calc-table { min-width: 0; font-size: 13px; }
  .calc-table:not(.stress-table) .col-basis,
  .calc-table:not(.stress-table) tbody td:nth-child(3) {
    width: 0; max-width: 0; padding: 0; font-size: 0;
    line-height: 0; overflow: hidden; border: none;
  }
  .calc-table .col-label { width: auto; }
  .calc-table .col-pct { width: 22%; }
  .calc-table .col-chf { width: 36%; }
  .calc-table thead th { padding: 6px 8px; font-size: 10px; }
  .calc-table tbody td { padding: 7px 8px; }
  .calc-table input[type="number"],
  .calc-table input[type="text"][data-chf] { max-width: 120px; padding: 6px 8px; }
  .card-body { padding: 12px 12px 14px; }
  .card-header { padding: 12px 14px; }
  .card-header h2 { font-size: 14px; }
  .card-total { font-size: 12px; }
  .metrics-grid { grid-template-columns: 1fr; }
  .metric { padding: 10px 12px; }
  .metric-value { font-size: 18px; }
  .header-actions .btn { padding: 7px 10px; font-size: 13px; }
}

/* Narrow phone — stress table stacks */
@media (max-width: 460px) {
  .stress-table { min-width: 0; font-size: 12px; }
  .stress-table thead th { font-size: 10px; padding: 6px 6px; }
  .stress-table tbody td { padding: 6px 6px; }
}

/* Print-Header */
.print-header { display: none; }

/* Print */
@media print {
  @page {
    size: A4 portrait;
    margin: 14mm 12mm;
  }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body {
    background: white;
    color: black;
    font-size: 10.5pt;
  }

  .page {
    padding: 0;
    max-width: 100%;
  }

  .page-header,
  .header-actions,
  .toast {
    display: none !important;
  }

  .print-header {
    display: block;
    margin-bottom: 8mm;
    padding-bottom: 3mm;
    border-bottom: 2px solid var(--text);
  }

  .print-title {
    font-size: 18pt;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
  }

  .print-meta {
    margin-top: 2mm;
    font-size: 9pt;
    color: var(--text-soft);
    display: flex;
    justify-content: space-between;
    gap: 8mm;
  }

  .print-meta span:empty { display: none; }

  .card {
    box-shadow: none;
    border: 1px solid var(--border-strong);
    margin-bottom: 4mm;
    break-inside: avoid;
    page-break-inside: avoid;
    border-radius: 6px;
  }

  .card-header {
    padding: 5px 10px;
    background: var(--row-total);
  }

  .card-header h2 {
    font-size: 11pt;
    font-weight: 700;
  }

  .card-total { font-size: 9pt; }
  .card-body { padding: 8px 10px; }

  .kpi-strip {
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    margin-bottom: 4mm;
    break-inside: avoid;
  }

  .kpi {
    padding: 6px 8px;
    background: white;
    border: 1px solid var(--border-strong);
    box-shadow: none;
    border-radius: 4px;
  }

  .kpi-label { font-size: 7pt; margin-bottom: 1px; }
  .kpi-value { font-size: 12pt; }
  .kpi-highlight { background: var(--accent-soft); }
  .kpi-highlight .kpi-value { color: var(--accent); }

  .table-wrap { overflow: visible !important; }

  .calc-table {
    min-width: 0;
    font-size: 9pt;
  }

  .calc-table thead th {
    padding: 3px 8px;
    font-size: 7pt;
    border-bottom: 1px solid var(--border-strong);
  }

  .calc-table tbody th,
  .calc-table tbody td {
    padding: 3px 8px;
    border-bottom: 1px solid #e8e6e2; /* no matching token */
  }

  .calc-table th small,
  .calc-table td small { font-size: 7.5pt; }

  .calc-table input[type="number"],
  .calc-table input[type="text"],
  .field input[type="text"],
  .field input[type="number"] {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
    color: black;
    width: auto !important;
    max-width: none !important;
    font-weight: 500;
  }

  .row-positive th,
  .row-positive td { background: var(--row-positive) !important; }
  .row-positive td:nth-child(4) { color: var(--positive); font-weight: 700; }
  .row-subhead td { background: var(--row-total) !important; }
  .row-total td { background: var(--row-total) !important; font-weight: 700; }
  .row-result td { background: var(--row-result) !important; color: var(--accent-text); font-weight: 700; }
  .row-result td output { color: var(--accent-text); }

  .metrics-grid {
    margin-top: 6px;
    gap: 6px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .metric {
    padding: 6px 10px;
    border: 1px solid var(--border-strong);
    background: white;
  }

  .metric-highlight { background: var(--accent-soft); }
  .metric-value { font-size: 12pt; }
  .metric-label { font-size: 7pt; }
  .metric-formula { font-size: 7.5pt; }

  .stress-table { break-inside: avoid; }

  .page-footer {
    margin-top: 6mm;
    border-top: 1px solid var(--border-strong);
    padding-top: 2mm;
    font-size: 8pt;
  }

  .legal-links { display: none; }
  .tools-link { display: none; }

  .hint { font-size: 8.5pt; margin-top: 4px; }

  .is-negative { color: var(--negative) !important; }
  .is-positive { color: var(--positive) !important; }
  .hint-warning { color: var(--negative); }
  .hint-positive { color: var(--positive); }
}

/* ============================================================
   Experimentelle Tools (/tools) — shared shell + reverse-solver.
   Inline-frei (Styles hier, JS extern) → strikte CSP ohne Per-Page-Hash.
   Headings spiegeln die Cormorant-Identität des Hauptrechners.
   ============================================================ */
.tool-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 56px 24px 96px;
  padding-left: max(24px, env(safe-area-inset-left));
  padding-right: max(24px, env(safe-area-inset-right));
}
@media (max-width: 640px) {
  .tool-page { padding: 36px 18px 64px; }
}

.tool-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-bottom: 44px;
  font-size: 13px;
  letter-spacing: 0.01em;
}
.tool-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}
.tool-back:hover { color: var(--accent-text); }
.tool-back:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Header — matches the calculator's Cormorant uppercase identity */
.tool-header { margin-bottom: 40px; }
.tool-eyebrow {
  margin: 0 0 16px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.tool-header h1 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 300;
  font-size: clamp(2.1rem, 5.5vw, 3.1rem);
  line-height: 1.04;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text);
}
.tool-divider {
  width: 46px;
  height: 1px;
  margin: 22px 0;
  background: var(--text);
  opacity: 0.22;
}
.tool-header .subtitle {
  margin: 0;
  max-width: 58ch;
  color: var(--text-muted);
  font-size: 15.5px;
  line-height: 1.6;
}

/* Hub list */
.tool-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.tool-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.06s ease;
}
a.tool-item:hover {
  border-color: var(--accent-border);
  box-shadow: var(--shadow);
}
a.tool-item:hover .tool-item-arrow {
  transform: translateX(4px);
  color: var(--accent-text);
}
a.tool-item:active { transform: translateY(1px); }
a.tool-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.tool-item-text { min-width: 0; }
.tool-item h2 {
  margin: 0 0 5px;
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text);
}
.tool-item p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.5;
}
.tool-item-arrow {
  flex: none;
  font-size: 22px;
  line-height: 1;
  color: var(--accent-border);
  transition: transform 0.15s ease, color 0.15s ease;
}

/* "Geplant" — clearly de-emphasised, non-interactive */
.tool-item-soon {
  background: transparent;
  box-shadow: none;
  border-style: dashed;
  border-color: var(--border-strong);
}
.tool-item-soon h2 { color: var(--text-soft); }
.tool-soon-tag {
  flex: none;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--row-total);
  color: var(--text-soft);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.tool-foot {
  margin-top: 32px;
  color: var(--text-soft);
  font-size: 12.5px;
  line-height: 1.55;
}

/* Reverse-solver result */
.tool-result {
  margin-top: 26px;
  padding: 30px 28px 24px;
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}
.tool-result .result-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.tool-result .result-price {
  display: block;
  margin-top: 10px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 300;
  font-size: clamp(2.6rem, 8vw, 3.6rem);
  line-height: 1;
  letter-spacing: 0.005em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.tool-result.is-unreachable { border-top-color: var(--negative); }
.tool-result.is-unreachable .result-price {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--negative);
}

.tool-result-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 26px;
  border-top: 1px solid var(--border);
}
@media (max-width: 560px) {
  .tool-result-kpis { grid-template-columns: repeat(2, 1fr); }
}
.rs-kpi {
  padding: 16px 8px 6px;
  border-right: 1px solid var(--border);
}
.rs-kpi:last-child { border-right: none; }
@media (max-width: 560px) {
  .rs-kpi:nth-child(2) { border-right: none; }
  .rs-kpi:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
}
.rs-kpi-label {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 5px;
}
.rs-kpi-value {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.tool-open-calc {
  display: inline-block;
  margin-top: 24px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--accent-text);
  text-decoration: none;
}
.tool-open-calc:hover { text-decoration: underline; }
.tool-open-calc:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* <select> styled to match .field inputs */
.field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
.field select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
