/* Katalog nástrojů: stránka /nastroje/ a blok náhledu pro úvodní stránku webu (vychází z ukázky Nástrojů v3).

   Stejný soubor slouží stránce z Djanga i bloku vloženému do statické úvodní stránky webu, proto mají
   všechny třídy předponu kt- a všechna pravidla platí jen uvnitř obalu .kt. Světlý a tmavý režim řídí
   třída dark na prvku html (má ji sekce článků i úvodní stránka Keystonu). */

/* ---------- Základ ---------- */
.kt *, .kt *::before, .kt *::after { box-sizing: border-box; }
.kt { margin: 0; font-family: 'Funnel Display', system-ui, sans-serif; font-size: 16px; line-height: normal; -webkit-font-smoothing: antialiased; transition: background-color 0.4s ease, color 0.4s ease; }
/* styly okolní stránky (sekce článků, úvodní stránka) nastavují nadpisy a odstavce po svém */
.kt h1, .kt h2, .kt h3 { font-family: inherit; letter-spacing: normal; line-height: normal; }
.kt { --bg: #FFFFFF; --soft: #F5F8FA; --card: #FFFFFF; --border: #E1EAF0; --border-strong: #C9D6DF; --text: #0C1212; --sub: #557791; --muted: #7A93A6; --stone: #365F79; --hero-2: #365F79; --shadow: rgba(12, 18, 18, 0.08);
  --orange-text: #C9481B; --inv: #2B74A8; --inv-weak: #85B5D9; --tl-debt: #F8D0BF; --tl-debt-ink: #0C1212; --tl-inv-ink: #FFFFFF; --tl-weak-ink: #0C1212; }
html.dark .kt { --bg: #0C1212; --soft: #111A1F; --card: #151D22; --border: #23323C; --border-strong: #2E414E; --text: #E9F0F4; --sub: #9DB4C4; --muted: #7F97A8; --stone: #9DB4C4; --hero-2: #E1EAF0; --shadow: rgba(0, 0, 0, 0.35);
  --orange-text: #F0703C; --inv: #4F97CC; --inv-weak: #32698F; --tl-debt: #6A3320; --tl-debt-ink: #F6DED4; --tl-inv-ink: #0C1212; --tl-weak-ink: #E9F0F4; }
.kt { --orange: #EB602D; --orange-dark: #D4501F; --acc-soft: rgba(235, 96, 45, 0.10); --acc-line: rgba(235, 96, 45, 0.25); background: var(--bg); color: var(--text); }
.kt a { color: inherit; text-decoration: none; }
.kt button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.kt [hidden] { display: none !important; }
.kt .kt-wrap { max-width: 1180px; margin: 0 auto; }

/* ---------- Tlačítka (shodná s webem) ---------- */
.kt .kt-btn-submit { display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem; padding: 0.9rem 2rem; border-radius: 9999px; background: var(--orange); color: #FFFFFF; font-weight: 700; transition: background 0.2s ease, transform 0.2s ease; }
.kt .kt-btn-submit:hover { background: var(--orange-dark); transform: translateY(-1px); }
.kt .kt-btn-submit svg, .kt .kt-btn-all svg { width: 16px; height: 16px; transition: transform 0.2s ease; }
.kt .kt-btn-submit:hover svg, .kt .kt-btn-all:hover svg { transform: translateX(3px); }
.kt .kt-btn-all { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 15px; font-weight: 700; transition: border-color 0.2s, color 0.2s; }
.kt .kt-btn-all:hover { border-color: var(--orange); color: var(--orange); }

/* ---------- Společné prvky sekcí ---------- */
.kt .kt-eyebrow { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--orange); margin-bottom: 10px; }
.kt .kt-sec-title { font-size: clamp(28px, 4vw, 40px); font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; margin: 0; }
.kt .kt-sec-lead { margin: 14px 0 0; max-width: 640px; font-size: 18px; font-weight: 500; line-height: 1.5; color: var(--sub); text-wrap: pretty; }
.kt .kt-sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 32px; }

/* ---------- Náhled sekce Nástroje na úvodní stránce ---------- */
.kt .kt-nt { padding: 80px 24px 88px; background: var(--bg); border-top: 1px solid var(--border); scroll-margin-top: 110px; }
.kt .kt-nt-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px; }
.kt .kt-nt-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
.kt .kt-nt-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px var(--shadow); border-color: var(--acc-line); }
.kt .kt-nt-card.is-main { grid-row: span 2; }
.kt .kt-nt-img { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1px solid var(--border); background: var(--soft); container-type: inline-size; container-name: kt-nahled; }
.kt .kt-nt-img svg { width: 100%; height: 100%; display: block; }
.kt .kt-nt-in { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 22px 24px 24px; }
.kt .kt-nt-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kt .kt-nt-chip { display: inline-flex; padding: 4px 12px; border-radius: 999px; background: var(--acc-soft); color: var(--orange); border: 1px solid var(--acc-line); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }

.kt .kt-nt-card h3 { margin: 2px 0 0; font-size: 21px; font-weight: 700; line-height: 1.25; color: var(--text); }
.kt .kt-nt-card.is-main h3 { font-size: 28px; letter-spacing: -0.01em; }
.kt .kt-nt-card p { margin: 0; font-family: 'Funnel Sans', 'Funnel Display', sans-serif; font-size: 16px; line-height: 1.55; color: var(--sub); text-wrap: pretty; }
.kt .kt-nt-card.is-main p { font-size: 17px; max-width: 560px; }
.kt .kt-nt-feats { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 4px; }
.kt .kt-nt-feats span { padding: 4px 11px; border-radius: 999px; border: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--sub); }
.kt .kt-nt-more { display: inline-flex; align-items: center; gap: 7px; margin-top: auto; padding-top: 10px; font-size: 14px; font-weight: 700; color: var(--orange); }
.kt .kt-nt-more svg { width: 14px; height: 14px; transition: transform 0.2s ease; }
.kt .kt-nt-card:hover .kt-nt-more svg { transform: translateX(3px); }

/* Karta „připravujeme“: přerušovaný rámeček a znak klenáku */
.kt .kt-nt-soon { display: flex; align-items: center; gap: 20px; padding: 22px 24px; border: 1.5px dashed var(--border-strong); border-radius: 18px; }
.kt .kt-nt-soon .arch { flex: none; width: 44px; height: 62px; overflow: visible; }
.kt .kt-nt-soon .arch .stone { fill: var(--stone); }
.kt .kt-nt-soon .arch .key { fill: var(--orange); transition: transform 0.4s cubic-bezier(0.3, 1.4, 0.5, 1); }
.kt .kt-nt-soon:hover .arch .key { transform: translateY(-4px); }
.kt .kt-nt-soon h3 { margin: 0 0 6px; font-size: 18px; font-weight: 700; line-height: 1.25; }
.kt .kt-nt-soon p { margin: 0; font-family: 'Funnel Sans', 'Funnel Display', sans-serif; font-size: 15px; line-height: 1.55; color: var(--sub); text-wrap: pretty; }
.kt .kt-nt-soon a { color: var(--orange); font-family: 'Funnel Display', sans-serif; font-weight: 700; white-space: nowrap; }
.kt .kt-nt-soon a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Nástroj, který se teprve chystá ----------
   Zašedlá karta bez odkazu a bez zvednutí při najetí. Jediná barva je štítek „Již brzy“. */
.kt .kt-nt-card.is-soon { cursor: default; }
.kt .kt-nt-card.is-soon:hover { transform: none; box-shadow: none; border-color: var(--border); }
.kt .kt-nt-card.is-soon .kt-nt-img svg { filter: grayscale(1); opacity: 0.55; }
.kt .kt-nt-card.is-soon .kt-nt-chip { background: transparent; border-color: var(--border-strong); color: var(--muted); }
.kt .kt-nt-card.is-soon h3 { color: var(--sub); }
.kt .kt-nt-card.is-soon p { color: var(--muted); }
.kt .kt-nt-card.is-soon .kt-nt-feats span { color: var(--muted); }
.kt .kt-nt-tag { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px; background: var(--orange-text); color: var(--card); font-size: 12.5px; font-weight: 700; line-height: 1.4; white-space: nowrap; }

/* ---------- Náhled Hypotečního plánovače ----------
   Není to obrázek: je to kus stránky složený z prvků kalkulačky (věta zadání, časová osa plánu, táhlo).
   Všechny rozměry jsou v jednotkách cqw, tedy v procentech šířky náhledu, takže se celý zmenšuje s kartou.
   Pod 540 px šířky se náhled zjednoduší: věta na dva řádky, dvě cesty místo tří, větší písmo.
   Krok svislých linek (--kt-step) a polohy pruhů počítá server z výchozích hodnot nástroje. */
.kt .pv { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 0 5.2cqw 0.6cqw; color: var(--text); }
.kt .kt-nt-img .pv .kt-pv-say { max-width: none; margin: 0; font-family: 'Funnel Display', sans-serif; font-size: 3.8cqw; font-weight: 500; line-height: 1.3; letter-spacing: -0.008em; white-space: nowrap; color: var(--text); }
.kt .kt-nt-img .pv .kt-pv-say b { font-weight: 600; box-shadow: inset 0 -0.32cqw 0 var(--orange); }
.kt .kt-pv-plan { display: grid; grid-template-columns: 4.4cqw minmax(0, 1fr); row-gap: 2cqw; margin-top: 2.6cqw; }
.kt .kt-pv-rule { grid-column: 2; position: relative; height: 3.3cqw; border-bottom: 1px solid var(--text); }
.kt .kt-pv-rule i { position: absolute; bottom: 0; width: 1px; height: 0.9cqw; background: var(--text); }
.kt .kt-pv-rule i span { position: absolute; bottom: 1.4cqw; left: 0; transform: translateX(-50%); font-family: 'Funnel Sans', sans-serif; font-size: 1.9cqw; font-style: normal; line-height: 1; color: var(--sub); white-space: nowrap; }
.kt .kt-pv-rule i:first-child span { transform: none; }
.kt .kt-pv-rule i:last-child span { transform: translateX(-100%); }
.kt .kt-pv-k { grid-column: 1; align-self: center; font-family: 'Funnel Display', sans-serif; font-size: 3.3cqw; font-weight: 700; line-height: 1; }
.kt .kt-pv-rows { grid-column: 2; position: relative; height: 9.6cqw; background-image: linear-gradient(to right, var(--border) 1px, transparent 1px); background-size: var(--kt-step, 16.6667%) 100%; }
.kt .kt-pv-rows::after { content: ""; position: absolute; top: 0; bottom: 0; right: 0; width: 1px; background: var(--border); }
.kt .kt-pv-b { position: absolute; z-index: 1; height: 4.5cqw; display: flex; align-items: center; padding: 0 1.2cqw; overflow: hidden; font-family: 'Funnel Sans', sans-serif; font-size: 2.05cqw; font-style: normal; font-weight: 500; line-height: 1; white-space: nowrap; border-radius: 0 0.6cqw 0.6cqw 0; }
.kt .kt-pv-b.r1 { top: 0; }
.kt .kt-pv-b.r2 { top: 5.1cqw; }
.kt .kt-pv-debt { background: var(--tl-debt); color: var(--tl-debt-ink); }
.kt .kt-pv-weak { background: var(--inv-weak); color: var(--tl-weak-ink); }
.kt .kt-pv-inv { background: var(--inv); color: var(--tl-inv-ink); }
.kt .kt-pv-weak + .kt-pv-inv { border-left: 2px solid var(--soft); }
.kt .kt-pv-h { position: absolute; z-index: 2; top: 2.25cqw; width: 4.6cqw; height: 4.6cqw; margin: -2.3cqw 0 0 -2.3cqw; border-radius: 50%; background: var(--card); border: 0.3cqw solid var(--orange); box-shadow: 0 0.3cqw 1.2cqw var(--shadow); display: flex; align-items: center; justify-content: center; color: var(--orange-text); }
.kt .kt-pv-h svg { width: 2.4cqw; height: 2.4cqw; }
@container kt-nahled (max-width: 539px) {
  .kt .pv { padding: 0 5.6cqw 0.8cqw; }
  .kt .kt-nt-img .pv .kt-pv-say { font-size: 4.7cqw; line-height: 1.28; white-space: normal; text-wrap: balance; }
  .kt .kt-pv-l3, .kt .kt-pv-b small, .kt .kt-pv-rule i.minor span { display: none; }
  .kt .kt-pv-plan { grid-template-columns: 6.2cqw minmax(0, 1fr); row-gap: 3.2cqw; margin-top: 3.4cqw; }
  .kt .kt-pv-rule { height: 4.7cqw; }
  .kt .kt-pv-rule i { height: 1.2cqw; }
  .kt .kt-pv-rule i span { bottom: 1.9cqw; font-size: 3cqw; }
  .kt .kt-pv-k { font-size: 4.8cqw; }
  .kt .kt-pv-rows { height: 12.6cqw; }
  .kt .kt-pv-b { height: 5.9cqw; padding: 0 1.7cqw; font-size: 3.2cqw; border-radius: 0 0.9cqw 0.9cqw 0; }
  .kt .kt-pv-b.r2 { top: 6.7cqw; }
  .kt .kt-pv-h { top: 2.95cqw; width: 6cqw; height: 6cqw; margin: -3cqw 0 0 -3cqw; border-width: 0.45cqw; }
  .kt .kt-pv-h svg { width: 3.1cqw; height: 3.1cqw; }
}
.kt .kt-pv-b small { font: inherit; }
.kt .kt-pv-b span { overflow: hidden; }
/* Starší prohlížeče bez jednotek cqw náhled nevykreslí (zůstane prázdná plocha), než aby ho vykreslily rozbitý. */
@supports not (width: 1cqw) { .kt .pv { display: none; } }

/* ---------- Ilustrace nástrojů (statické SVG) ---------- */
.kt .il text { font-family: 'Funnel Display', sans-serif; }
.kt .il .kt-il-grid { stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 5; }
.kt .il .kt-il-line { fill: none; stroke: var(--stone); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.kt .il .kt-il-line.l2 { opacity: 0.6; }
.kt .il .kt-il-line.l3 { opacity: 0.35; }
.kt .il .kt-il-line.hot { stroke: var(--orange); stroke-width: 3.5; opacity: 1; }
.kt .il .kt-il-area { fill: var(--orange); opacity: 0.08; }
.kt .il .kt-il-dot { fill: var(--card); stroke: var(--orange); stroke-width: 3; }
.kt .il .kt-il-pill { fill: none; stroke: var(--border-strong); }
.kt .il .kt-il-pill.on { fill: var(--orange); stroke: var(--orange); }
.kt .il .kt-il-pill-t { fill: var(--sub); font-size: 13px; font-weight: 600; }
.kt .il .kt-il-pill-t.on { fill: #FFFFFF; }

/* ---------- Stránka Nástroje ---------- */
.kt .kt-tp-head { padding: 56px 24px 44px; }
.kt .kt-crumbs { display: flex; gap: 8px; margin-bottom: 28px; font-size: 13px; font-weight: 600; color: var(--muted); }
.kt .kt-crumbs a:hover { color: var(--orange); }
.kt .kt-crumbs span[aria-current] { color: var(--sub); }
.kt .kt-tp-head h1 { margin: 0; font-size: clamp(34px, 5vw, 52px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; }
.kt .kt-tp-head .kt-sec-lead { max-width: 720px; font-size: clamp(18px, 2vw, 20px); }
.kt .kt-tp-list { padding: 0 24px 80px; }
.kt .kt-tp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.kt .kt-tp-grid .kt-nt-card h3 { font-size: 24px; }
.kt .kt-tp-grid .kt-nt-soon { grid-column: 1 / -1; }
.kt .kt-tp-note { margin: 28px 0 0; font-family: 'Funnel Sans', 'Funnel Display', sans-serif; font-size: 13px; line-height: 1.7; color: var(--muted); }
.kt .kt-tp-note a { color: var(--sub); text-decoration: underline; text-decoration-color: rgba(85, 119, 145, 0.45); text-underline-offset: 3px; }
.kt .kt-tp-note a:hover { color: var(--orange); }

.kt .kt-why { padding: 80px 24px 88px; background: var(--soft); border-top: 1px solid var(--border); }
.kt .kt-why-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px 72px; align-items: start; }
.kt .kt-why p.txt { margin: 18px 0 0; font-family: 'Funnel Sans', 'Funnel Display', sans-serif; font-size: 17px; line-height: 1.65; color: var(--sub); text-wrap: pretty; }
.kt .kt-why-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.kt .kt-why-list li { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 18px; padding: 22px 0; border-top: 1px solid var(--border); }
.kt .kt-why-list li:first-child { border-top: 0; padding-top: 4px; }
.kt .kt-why-list .ico { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--card); border: 1px solid var(--border); color: var(--orange); }
.kt .kt-why-list .ico svg { width: 20px; height: 20px; }
.kt .kt-why-list h3 { margin: 0 0 4px; font-size: 19px; font-weight: 700; line-height: 1.3; }
.kt .kt-why-list p { margin: 0; font-family: 'Funnel Sans', 'Funnel Display', sans-serif; font-size: 16px; line-height: 1.55; color: var(--sub); text-wrap: pretty; }

.kt .kt-cta { padding: 72px 24px 80px; border-top: 1px solid var(--border); text-align: center; }
.kt .kt-cta h2 { margin: 0 0 12px; font-size: clamp(26px, 3.5vw, 36px); font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.kt .kt-cta p { margin: 0 0 28px; font-size: 18px; font-weight: 500; color: var(--sub); }

/* ---------- Menší obrazovky ---------- */
@media (max-width: 960px) {
  .kt .kt-nt-grid, .kt .kt-why-grid { grid-template-columns: 1fr; }
  .kt .kt-nt-card.is-main { grid-row: auto; }
}
@media (max-width: 640px) {
  .kt .kt-nt, .kt .kt-why { padding: 56px 16px 64px; }
  .kt .kt-tp-head { padding: 40px 16px 32px; }
  .kt .kt-tp-list { padding: 0 16px 56px; }
  .kt .kt-cta { padding: 56px 16px 64px; }
  .kt .kt-sec-lead { font-size: 16px; }
  .kt .kt-tp-grid { grid-template-columns: 1fr; }
  .kt .kt-nt-in { padding: 18px 18px 20px; }
  .kt .kt-nt-card.is-main h3, .kt .kt-tp-grid .kt-nt-card h3 { font-size: 22px; }
  .kt .kt-nt-card.is-main p { font-size: 16px; }
  .kt .kt-nt-soon { align-items: flex-start; padding: 20px 18px; gap: 16px; }
  .kt .kt-nt-soon .arch { width: 34px; height: 48px; }
  .kt .kt-btn-all { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .kt .kt-nt-card, .kt .kt-nt-more svg, .kt .kt-btn-submit, .kt .kt-nt-soon .arch .key { transition: none; }
}
