/* Tenance free landlord tools + Ratgeber articles (tenance.de/tools, /ratgeber).
   Content is plain server-rendered HTML; this file only styles it. Built on redesign.css tokens. */

.tl { padding: 112px 0 40px; }
.tl-wrap { max-width: 1060px; }
.tl-narrow { max-width: 780px; }

.tl-crumbs { font-size: 13px; color: var(--muted); margin: 0 0 22px; }
.tl-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.tl-crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.tl-crumbs a { color: var(--forest); text-decoration: none; }
.tl-crumbs a:hover { text-decoration: underline; }

.tl-head h1, .tl-prose h2, .tl-faq h2, .tl-cta h2, .tl-tool h2 { -webkit-hyphens: auto; hyphens: auto; overflow-wrap: break-word; }
.tl-head h1 { font-family: var(--font-display); font-size: clamp(30px, 4.6vw, 52px); line-height: 1.06; color: var(--forest-ink); margin: 6px 0 18px; letter-spacing: -0.01em; }
.tl-meta { font-size: 13px; color: var(--muted); margin: 0 0 22px; }
.tl-meta a { color: var(--forest); }

.tl-answer { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 18px 22px; margin: 0 0 28px; font-size: 16px; line-height: 1.65; color: var(--ink); }
.tl-answer p { margin: 0 0 8px; }
.tl-answer p:last-child, .tl-answer ul:last-child { margin-bottom: 0; }
.tl-answer ul { margin: 6px 0 0; padding-left: 20px; }
.tl-answer li { margin: 3px 0; }
.tl-answer strong { color: var(--forest-ink); }

/* ── Tool card ── */
.tl-tool { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-md); padding: clamp(18px, 3vw, 32px); margin: 8px 0 40px; }
.tl-tool h2 { font-size: 22px; margin: 0 0 4px; color: var(--forest-ink); }
.tl-tool .tl-sub { font-size: 14px; color: var(--muted); margin: 0 0 20px; }
.tl-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.tl-fieldset { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
.tl-fieldset legend { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--forest); margin: 0 0 10px; padding: 0; }
.tl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.tl-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tl-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.tl-field--wide { grid-column: 1 / -1; }
.tl-field label, .tl-lbl { font-size: 13px; font-weight: 600; color: var(--ink); }
.tl-field small { font-size: 12px; color: var(--muted); line-height: 1.45; }
.tl-tool input, .tl-tool select, .tl-tool textarea {
  font: inherit; font-size: 15px; color: var(--ink); background: var(--cream); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; width: 100%; min-width: 0; box-sizing: border-box;
}
.tl-tool textarea { min-height: 90px; resize: vertical; line-height: 1.55; }
.tl-tool input:focus, .tl-tool select:focus, .tl-tool textarea:focus { outline: 2px solid var(--forest); outline-offset: 1px; background: var(--white); }
.tl-check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.tl-check input { width: auto; margin-top: 3px; }

.tl-rows { display: flex; flex-direction: column; gap: 8px; }
.tl-row { display: grid; gap: 8px; align-items: center; }
.tl-row--nk { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1fr) 36px; }
.tl-row--meter { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) minmax(0, 1fr) 36px; }
.tl-row--key { grid-template-columns: minmax(0, 2fr) minmax(0, .7fr) 36px; }
.tl-row--room { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr) minmax(0, 2fr) 36px; }
.tl-row--cmp { grid-template-columns: minmax(0, 2.2fr) minmax(0, .8fr) minmax(0, .9fr) 36px; }
.tl-rowhead { font-size: 12px; font-weight: 600; color: var(--muted); }
.tl-del { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); color: var(--muted); cursor: pointer; font-size: 18px; line-height: 1; }
.tl-del:hover { color: var(--terracotta-ink); border-color: var(--terracotta); }
.tl-add { margin-top: 10px; background: none; border: 1px dashed var(--forest); color: var(--forest); border-radius: 10px; padding: 8px 14px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.tl-add:hover { background: var(--cream); }

.tl-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.tl-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: 15px; font-weight: 600; border-radius: var(--r-pill); padding: 12px 20px; cursor: pointer; border: 1px solid var(--forest); background: var(--forest); color: #fff; text-decoration: none; }
.tl-btn:hover { background: var(--forest-deep); }
.tl-btn--ghost { background: transparent; color: var(--forest); }
.tl-btn--ghost:hover { background: var(--cream); }

/* result panel */
.tl-result { background: var(--cream); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 20px; position: sticky; top: 96px; }
.tl-result h3 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--forest); margin: 0 0 12px; }
.tl-big { font-family: var(--font-display); font-size: clamp(28px, 4vw, 40px); line-height: 1.05; color: var(--forest-ink); margin: 0 0 4px; }
.tl-big.is-neg { color: var(--terracotta-ink); }
.tl-biglbl { font-size: 14px; color: var(--muted); margin: 0 0 16px; }
.tl-kv { display: grid; grid-template-columns: 1fr auto; gap: 7px 12px; font-size: 14px; margin: 0; }
.tl-kv dt { color: var(--body, var(--ink)); margin: 0; }
.tl-kv dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; color: var(--forest-ink); }
.tl-kv .tl-sep { grid-column: 1 / -1; border-top: 1px solid var(--line); margin: 4px 0; }
.tl-msgs { margin: 14px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.tl-msgs li { font-size: 13px; line-height: 1.5; padding: 9px 12px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); }
.tl-msgs li.is-warn { border-color: rgba(224, 155, 107, .6); background: #fdf1e7; }
.tl-msgs li.is-ok { border-color: rgba(36, 75, 54, .3); }
.tl-inline-cta { margin-top: 16px; font-size: 14px; line-height: 1.5; }
.tl-inline-cta a { color: var(--forest); font-weight: 600; }

.tl-letter { width: 100%; min-height: 420px; font-family: var(--font-body); font-size: 14px; line-height: 1.6; }
.tl-out { margin-top: 24px; }
.tl-hidden { display: none !important; }

/* ── Prose (articles + content below tools) ── */
.tl-prose { max-width: 780px; color: var(--ink); font-size: 16.5px; line-height: 1.75; }
.tl-prose h2 { font-family: var(--font-display); font-size: clamp(23px, 3vw, 31px); line-height: 1.2; color: var(--forest-ink); margin: 48px 0 14px; scroll-margin-top: 96px; }
.tl-prose h3 { font-size: 19px; line-height: 1.35; color: var(--forest-ink); margin: 30px 0 8px; scroll-margin-top: 96px; }
.tl-prose p { margin: 0 0 14px; }
.tl-prose ul, .tl-prose ol { margin: 0 0 16px; padding-left: 22px; }
.tl-prose li { margin: 5px 0; }
.tl-prose a { color: var(--forest); text-decoration: underline; text-underline-offset: 2px; }
.tl-prose strong { color: var(--forest-ink); }
.tl-prose code { font-size: .92em; background: var(--cream); padding: 1px 5px; border-radius: 5px; }
.tl-toc { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px 20px; margin: 0 0 8px; font-size: 15px; }
.tl-toc strong { display: block; margin-bottom: 6px; }
.tl-toc ol { margin: 0; padding-left: 20px; }
.tl-toc a { color: var(--forest); }

.tl-tablewrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 6px 0 22px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--white); }
.tl-table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; }
.tl-table caption { text-align: left; font-size: 13px; color: var(--muted); padding: 10px 14px 0; caption-side: top; }
.tl-table th, .tl-table td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); }
.tl-table thead th { background: var(--cream); font-size: 13px; font-weight: 700; color: var(--forest-ink); white-space: nowrap; }
.tl-table tbody tr:last-child td, .tl-table tbody tr:last-child th { border-bottom: 0; }
.tl-table td.num, .tl-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl-table tfoot td, .tl-table tfoot th { font-weight: 700; border-top: 2px solid var(--line); }
.tl-table tr.is-us td, .tl-table tr.is-us th { background: rgba(36, 75, 54, .05); }
.tl-table--vpi td, .tl-table--vpi th { padding: 8px 10px; font-size: 13.5px; }

.tl-note { font-size: 14px; line-height: 1.6; color: var(--muted); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px 18px; margin: 18px 0; }
.tl-note strong { color: var(--ink); }

.tl-faq { max-width: 780px; margin-top: 56px; }
.tl-faq h2 { font-family: var(--font-display); font-size: clamp(23px, 3vw, 31px); color: var(--forest-ink); margin: 0 0 8px; }
.tl-faq h3 { font-size: 17.5px; color: var(--forest-ink); margin: 24px 0 6px; line-height: 1.4; }
.tl-faq p { margin: 0; font-size: 16px; line-height: 1.7; color: var(--ink); }

.tl-sources { max-width: 780px; margin-top: 44px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.tl-sources h2 { font-size: 15px; color: var(--ink); margin: 0 0 6px; }
.tl-sources ul { margin: 0 0 12px; padding-left: 18px; }
.tl-sources a { color: var(--forest); }

.tl-cta { margin: 56px 0 0; background: var(--forest-ink); color: #f3efe6; border-radius: var(--r-lg); padding: clamp(26px, 4vw, 44px); display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.tl-cta h2 { font-family: var(--font-display); font-size: clamp(22px, 3vw, 32px); line-height: 1.15; margin: 0 0 8px; color: #fff; }
.tl-cta p { margin: 0; font-size: 15.5px; line-height: 1.6; color: rgba(243, 239, 230, .82); }
.tl-cta .tl-btn { background: var(--terracotta); border-color: var(--terracotta); color: var(--forest-ink); white-space: nowrap; }
.tl-cta .tl-btn:hover { background: #ecb48a; }

/* hub cards */
.tl-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin: 14px 0 36px; }
.tl-card { display: flex; flex-direction: column; gap: 8px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px; text-decoration: none; color: var(--ink); transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out); }
.tl-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.tl-card h3 { margin: 0; font-size: 18px; color: var(--forest-ink); line-height: 1.3; }
.tl-card p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--muted); }
.tl-card span { margin-top: auto; font-size: 14px; font-weight: 600; color: var(--forest); }

/* print target (filled by tools.js, a direct child of <body>) */
#tl-print { display: none; }

@media (max-width: 860px) {
  .tl { padding-top: 96px; }
  .tl-cols { grid-template-columns: 1fr; }
  .tl-result { position: static; }
  .tl-cta { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .container.tl-wrap { padding: 0 16px; }
  .tl-grid, .tl-grid--3 { grid-template-columns: 1fr; }
  .tl-row--nk { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 36px; }
  .tl-row--nk > :nth-child(1) { grid-column: 1 / -1; }
  .tl-row--nk > :nth-child(5) { grid-column: 3; grid-row: 2; }
  .tl-row--nk > :nth-child(3) { grid-column: 1 / 3; }
  .tl-row--nk > :nth-child(4) { grid-column: 1 / 3; }
  .tl-row--room, .tl-row--cmp, .tl-row--meter { grid-template-columns: minmax(0, 1fr) 36px; }
  .tl-row--room > :not(.tl-del), .tl-row--cmp > :not(.tl-del), .tl-row--meter > :not(.tl-del) { grid-column: 1; }
  .tl-row--room > .tl-del, .tl-row--cmp > .tl-del, .tl-row--meter > .tl-del { grid-column: 2; grid-row: 1; }
  .tl-rowhead { display: none; }
  .tl-row { padding: 10px; border: 1px solid var(--line-soft); border-radius: 12px; }
  .tl-prose { font-size: 16px; }
  .tl-head h1 { font-size: 30px; }
}

@media print {
  body.tl-printing > *:not(#tl-print) { display: none !important; }
  body.tl-printing #tl-print { display: block; font-family: Arial, Helvetica, sans-serif; color: #000; font-size: 11pt; line-height: 1.45; }
  body.tl-printing { background: #fff !important; }
  #tl-print h1 { font-size: 16pt; margin: 0 0 6pt; }
  #tl-print h2 { font-size: 12pt; margin: 14pt 0 5pt; }
  #tl-print table { width: 100%; border-collapse: collapse; margin: 4pt 0 8pt; }
  #tl-print th, #tl-print td { border: 1px solid #999; padding: 4pt 6pt; text-align: left; vertical-align: top; }
  #tl-print td.num, #tl-print th.num { text-align: right; }
  #tl-print .p-letter { white-space: pre-wrap; font-family: Arial, Helvetica, sans-serif; font-size: 11pt; }
  #tl-print .p-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 28pt; margin-top: 34pt; }
  #tl-print .p-sign div { border-top: 1px solid #000; padding-top: 4pt; font-size: 9pt; }
  #tl-print .p-foot { margin-top: 18pt; font-size: 8pt; color: #555; }
  #tl-print tr { break-inside: avoid; }
}
