:root{
  --rv-shadow-soft:0 18px 40px rgba(15,23,42,.08);
  --rv-shadow-button:0 10px 24px rgba(37,99,235,.18);
}
html{scroll-behavior:smooth;}
html:focus-within{scroll-behavior:smooth;}
body{
  overflow-wrap:anywhere;
  overflow-x:hidden;
}
img{
  max-width:100%;
  height:auto;
}
iframe{max-width:100%;}
.topnav{align-items:center;}
.topnav a[aria-current="page"]{
  color:var(--primary,#2563eb)!important;
  font-weight:800!important;
}
.topnav a[aria-current="page"],
.topnav a:hover{
  text-underline-offset:3px;
}
.topnav a:focus-visible,
.footer a:focus-visible,
footer a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible{
  outline:3px solid rgba(37,99,235,.24);
  outline-offset:2px;
}
a[href^="tel:"], a[href^="mailto:"]{white-space:nowrap;}
.back-to-top{
  box-shadow:var(--rv-shadow-soft);
}
.table-scroll{
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
.table-scroll > table{
  min-width:640px;
}
.hero,
.section,
.content-section,
.calculator-card,
.results-card,
.content-card,
.card{
  scroll-margin-top:96px;
}
.footer,
footer{
  content-visibility:auto;
}
@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto!important;}
  *,*::before,*::after{
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    transition-duration:.01ms!important;
  }
}
@media (max-width: 820px){
  .topbar{
    position:static!important;
    top:auto!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
  }
  html{scroll-padding-top:16px;}
  .hero, .section, .content-section, .calculator-card, .results-card, .content-card, .card{
    scroll-margin-top:16px!important;
  }
  .container{width:min(100% - 24px, var(--maxw, 1120px))!important;}
  .topbar-inner{
    padding-top:14px!important;
    padding-bottom:14px!important;
    gap:12px!important;
  }
  .topnav{
    width:100%;
    row-gap:8px!important;
    column-gap:14px!important;
  }
  .field input,
  .field select,
  .field textarea,
  input[type="number"],
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  select,
  textarea{
    min-height:52px;
    font-size:16px!important;
  }
  .btn-primary,
  .btn-secondary,
  .btn-ghost,
  .btn,
  .button-link,
  button[type="button"],
  button[type="submit"]{
    min-height:50px;
    justify-content:center;
  }
  .actions,
  .cta-actions,
  .site-cta-actions,
  .hero-actions{
    gap:10px!important;
  }
  .results-grid,
  .form-grid,
  .hero-grid,
  .layout,
  .footer-main,
  .footer-grid-top,
  .footer-grid-bottom,
  .footer-inner{
    gap:16px!important;
  }
  .footer,
  footer{
    margin-top:36px!important;
  }
}
/* === MOBILE HARDENING PATCH === */
@media (max-width: 768px) {

  html, body {
    overflow-x: hidden;
  }

  img,
  svg,
  video,
  canvas,
  iframe {
    max-width: 100%;
  }

  .topbar-inner > *,
  .topnav > *,
  .hero-grid > *,
  .layout > *,
  .form-grid > *,
  .results-grid > *,
  .site-cta-card > *,
  .cta-actions > *,
  .site-cta-actions > *,
  .hero-actions > *,
  .actions > *,
  .category-top > *,
  .tool-row-top > *,
  .info-row > *,
  .footer-grid-top > *,
  .footer-grid-bottom > *,
  .footer-inner > * {
    min-width: 0;
  }

  /* dlaždice / button cards */
  .mode-card,
  .agreement-choice,
  .scenario-card,
  .check-card {
    display: block;
    width: 100%;
    text-align: left;
  }

  .mode-card strong,
  .mode-card span,
  .agreement-choice strong,
  .agreement-choice span {
    width: 100%;
    display: block;
  }

  /* form */
  input, select, textarea {
    width: 100%;
    max-width: 100%;
  }

  /* tabulky */
  .table-wrap,
  .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-wrap > table,
  .table-scroll > table {
    min-width: 600px;
  }

  /* sticky (iPhone fix) */
  .sticky-mobile-result {
    bottom: calc(12px + env(safe-area-inset-bottom));
  }

  .back-to-top {
    bottom: calc(18px + env(safe-area-inset-bottom));
  }

  /* nav */
  .topnav {
    flex-wrap: wrap;
    gap: 8px;
  }

  /* text overflow */
  h1, h2, h3, p {
    word-break: break-word;
  }
}


@media (max-width: 480px){
  .info-row{
    flex-direction:column;
    align-items:flex-start;
  }
  .tool-row-tag,
  .category-badge,
  .footer-links-row a,
  .site-cta-link{
    white-space:normal;
  }
  .result-value,
  .result-label,
  .tool-row-title,
  .tool-row-desc,
  .hero-pill,
  .site-cta-copy,
  .site-cta-actions,
  .badge,
  .footer-links-row a{
    overflow-wrap:anywhere;
    word-break:break-word;
  }
}


/* === TOOL MASTER LAYOUT PRIMITIVES === */
.rv-tool-layout{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(280px,.75fr);gap:28px;align-items:start;}
.rv-tool-primary,.rv-tool-support{min-width:0;display:grid;gap:20px;align-self:start;}
.rv-tool-support-sticky{position:sticky;top:94px;display:grid;gap:20px;}
.rv-tool-trust-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;}
.rv-tool-trust-item{padding:16px 18px;border-radius:16px;border:1px solid rgba(37,99,235,.12);background:linear-gradient(180deg,rgba(255,255,255,.98) 0%,rgba(244,248,255,.98) 100%);box-shadow:0 10px 26px rgba(15,23,42,.04);}
.rv-ad-slot{border:1px dashed rgba(95,107,133,.45);border-radius:18px;background:linear-gradient(180deg,rgba(255,255,255,.9) 0%,rgba(245,248,253,.95) 100%);padding:14px;min-height:140px;}
.rv-ad-slot[data-size="rail"]{min-height:250px;}
.rv-ad-slot[data-size="inline"]{min-height:128px;}
@media (max-width:980px){.rv-tool-layout,.rv-tool-trust-grid{grid-template-columns:1fr;}.rv-tool-support-sticky{position:static;top:auto;}}
