/* ===== Článok blogu (app/blog.php) =====
   Bloky v texte článku majú triedu ar-…: ar-answer (stručná odpoveď), ar-stats (karty s číslami),
   ar-table (tabuľka), ar-callout(--warn|--tip|--law), ar-steps (postup), ar-dark (z praxe),
   ar-takeaways (zhrnutie), ar-faq (otázky), ar-sources (zdroje), ar-figure (obrázok s popisom). */

.ar-preview { background: #fff4d6; color: #6b4e00; text-align: center; font: 600 14px/1.4 var(--font-body); padding: 10px 16px; }

/* ---- Úvodný pás ---- */
.ar-hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(1200px 400px at 85% -10%, rgba(240, 53, 64, .35), transparent 60%),
    linear-gradient(160deg, #1b2023 0%, #121517 100%);
}
.ar-hero::after {   /* jemný vzor dezénu */
  content: ""; position: absolute; inset: 0; opacity: .07; pointer-events: none;
  background: repeating-linear-gradient(115deg, #fff 0 10px, transparent 10px 34px),
              repeating-linear-gradient(65deg, #fff 0 10px, transparent 10px 34px);
  mask-image: linear-gradient(90deg, transparent 40%, #000 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 40%, #000 100%);
}
.ar-hero-in { position: relative; z-index: 1; max-width: 980px; margin: 0 auto; padding: 56px 24px 48px; }
.ar-kicker { margin: 0 0 14px; font: 700 12.5px/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: #ff9aa0; }
.ar-kicker a { color: inherit; text-decoration: none; }
.ar-kicker a:hover { text-decoration: underline; }
.ar-hero h1 { margin: 0; max-width: 22ch; font: 800 clamp(30px, 4.6vw, 50px)/1.08 var(--font-heading); letter-spacing: -.02em; text-wrap: balance; }
.ar-standfirst { margin: 18px 0 0; max-width: 62ch; font: 400 clamp(17px, 1.6vw, 19.5px)/1.6 var(--font-body); color: #d7dbdd; }
.ar-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 28px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .14); }
.ar-avatar { display: inline-grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%; background: var(--red); color: #fff; font: 800 16px/1 var(--font-heading); }
.ar-avatar--lg { width: 56px; height: 56px; font-size: 20px; }
.ar-author { display: flex; flex-direction: column; font: 700 15px/1.3 var(--font-body); }
.ar-author span { font-weight: 400; font-size: 13.5px; color: #b9c0c3; }
.ar-dates { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-left: auto; font: 400 13.5px/1.4 var(--font-body); color: #b9c0c3; }
.ar-dates .ar-upd { color: #fff; font-weight: 600; }

/* ---- Rozloženie ---- */
.ar-layout { max-width: 1180px; margin: 0 auto; padding: 40px 24px 24px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 56px; }
@media (min-width: 1100px) { .ar-layout { grid-template-columns: 250px minmax(0, 740px); justify-content: center; } }
.ar-side { min-width: 0; }
.ar-toc { position: sticky; top: 182px; max-height: calc(100vh - 200px); overflow-y: auto; font-family: var(--font-body); }   /* pod lepiacou hlavičkou webu */
.ar-toc details { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px 16px; background: var(--surface-alt); }
.ar-toc summary { cursor: pointer; font: 800 13px/1.2 var(--font-heading); letter-spacing: .08em; text-transform: uppercase; color: var(--text); list-style: none; }
.ar-toc summary::-webkit-details-marker { display: none; }
.ar-toc summary::after { content: "▾"; float: right; transition: transform .2s; }
.ar-toc details:not([open]) summary::after { transform: rotate(-90deg); }
.ar-toc ol { margin: 12px 0 0; padding: 0; list-style: none; counter-reset: toc; }
.ar-toc li { counter-increment: toc; }
.ar-toc a { display: grid; grid-template-columns: 22px 1fr; padding: 7px 0 7px 10px; border-left: 2px solid transparent; color: var(--text-muted); font-size: 14px; line-height: 1.4; text-decoration: none; transition: color .15s, border-color .15s; }
.ar-toc a::before { content: counter(toc) "."; font-weight: 600; color: #a7aeb1; }
.ar-toc a:hover, .ar-toc a.is-on { color: var(--text); border-left-color: var(--red); }
@media (max-width: 1099px) { .ar-toc { position: static; max-height: none; margin-bottom: 28px; } }

/* ---- Text článku ---- */
.ar-body { min-width: 0; font: 400 18px/1.72 var(--font-body); color: #262d30; }
.ar-body > * { margin-top: 0; margin-bottom: 1.15em; }
.ar-body h2 { margin: 2.2em 0 .6em; font: 800 clamp(23px, 2.6vw, 29px)/1.2 var(--font-heading); letter-spacing: -.015em; color: var(--text); scroll-margin-top: 190px; text-wrap: balance; }
.ar-body h3 { margin: 1.7em 0 .4em; font: 700 20px/1.3 var(--font-heading); color: var(--text); }
.ar-body a { color: var(--red-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.ar-body a:hover { color: var(--red); }
.ar-body strong { color: var(--text); }
.ar-body ul, .ar-body ol { padding-left: 1.3em; }
.ar-body li { margin-bottom: .4em; }
.ar-body li::marker { color: var(--red); }
.ar-body img { max-width: 100%; height: auto; border-radius: var(--radius-md); }
.ar-body blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--red); font: 500 21px/1.5 var(--font-heading); color: var(--text); }
.ar-cover { margin: 0 0 32px; }
.ar-cover img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; }

/* Stručná odpoveď */
.ar-answer { position: relative; margin: 0 0 2em; padding: 22px 24px 20px; border-radius: var(--radius-md); background: #fff3f4; border: 1px solid #f6c9cd; }
.ar-answer > :last-child { margin-bottom: 0; }
.ar-label { display: inline-block; margin: 0 0 8px !important; font: 800 12px/1 var(--font-heading); letter-spacing: .12em; text-transform: uppercase; color: var(--red-dark); }
.ar-answer p { margin: 0 0 .7em; }
.ar-answer ul { margin: .4em 0 0; }

/* Karty s číslami */
.ar-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin: 1.6em 0 2em; }
.ar-stat { padding: 18px 18px 16px; border: 1px solid var(--border); border-radius: var(--radius-md); background: #fff; box-shadow: 0 1px 0 rgba(0, 0, 0, .03); }
.ar-stat b, .ar-stat strong { display: block; font: 800 34px/1 var(--font-heading); letter-spacing: -.02em; color: var(--red); }
.ar-stat span { display: block; margin-top: 8px; font-size: 14.5px; line-height: 1.45; color: #4b5457; }
.ar-stat small { display: block; margin-top: 8px; font-size: 12px; color: #8a9396; }

/* Tabuľky */
.ar-table { margin: 1.6em 0 2em; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius-md); }
.ar-body table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.45; font-variant-numeric: tabular-nums; }
.ar-body caption { caption-side: bottom; padding: 10px 14px; text-align: left; font-size: 12.5px; color: #7c8588; background: var(--surface-alt); border-top: 1px solid var(--border); }
.ar-body th { padding: 12px 14px; background: #1b2023; color: #fff; font: 700 13.5px/1.3 var(--font-heading); text-align: left; letter-spacing: .01em; }
.ar-body td { padding: 12px 14px; border-top: 1px solid var(--border); vertical-align: top; }
.ar-body tbody tr:nth-child(even) td { background: #fafafb; }
.ar-body td strong { color: var(--text); }
.ar-yes { color: #18794e; font-weight: 700; }
.ar-no { color: var(--red-dark); font-weight: 700; }

/* Upozornenia */
.ar-callout { display: grid; grid-template-columns: 28px 1fr; gap: 0 12px; margin: 1.6em 0; padding: 16px 18px; border-radius: var(--radius-md); font-size: 16.5px; line-height: 1.6; background: var(--surface-alt); border: 1px solid var(--border); }
.ar-callout::before { content: "i"; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #5b6669; color: #fff; font: 800 14px/1 var(--font-heading); }
.ar-callout > * { grid-column: 2; margin: 0 0 .5em; }
.ar-callout > :last-child { margin-bottom: 0; }
.ar-callout--warn { background: #fff8eb; border-color: #f5d9a6; }
.ar-callout--warn::before { content: "!"; background: #c27803; }
.ar-callout--tip { background: #eef8f2; border-color: #c4e6d2; }
.ar-callout--tip::before { content: "✓"; background: #18794e; }
.ar-callout--law { background: #fff; border: 1.5px solid var(--red); }
.ar-callout--law::before { content: "§"; background: var(--red); }

/* Postup */
.ar-steps { list-style: none; padding: 0 !important; counter-reset: step; margin: 1.4em 0 2em; }
.ar-steps > li { position: relative; counter-increment: step; padding: 0 0 18px 56px; margin: 0; }
.ar-steps > li::before { content: counter(step); position: absolute; left: 0; top: -2px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--text); color: #fff; font: 800 17px/1 var(--font-heading); }
.ar-steps > li:not(:last-child)::after { content: ""; position: absolute; left: 18px; top: 42px; bottom: 4px; width: 2px; background: var(--border); }

/* Z praxe (tmavý blok) */
.ar-dark { margin: 2.2em 0; padding: 28px 28px 24px; border-radius: var(--radius-lg); background: linear-gradient(150deg, #1d2326, #121517); color: #dfe3e5; font-size: 17px; }
.ar-dark .ar-label { color: #ff9aa0; }
.ar-dark strong, .ar-dark h3 { color: #fff; }
.ar-dark h3 { margin-top: 0; }
.ar-dark a { color: #ffb3b8; }
.ar-dark > :last-child { margin-bottom: 0; }

/* Zhrnutie */
.ar-takeaways { margin: 2.2em 0; padding: 22px 24px; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface-alt); }
.ar-takeaways ul { list-style: none; padding: 0; margin: 0; }
.ar-takeaways li { position: relative; padding-left: 30px; margin-bottom: .55em; }
.ar-takeaways li::before { content: "✓"; position: absolute; left: 0; top: 1px; display: grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; background: var(--red); color: #fff; font-size: 12px; font-weight: 800; }

/* Otázky */
.ar-faq { margin: 1.2em 0 2em; border-top: 1px solid var(--border); }
.ar-faq details { border-bottom: 1px solid var(--border); }
.ar-faq summary { position: relative; padding: 18px 40px 18px 0; cursor: pointer; list-style: none; font: 700 17.5px/1.4 var(--font-heading); color: var(--text); }
.ar-faq summary::-webkit-details-marker { display: none; }
.ar-faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; border-right: 2.5px solid var(--red); border-bottom: 2.5px solid var(--red); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.ar-faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.ar-faq details > :not(summary) { margin: 0 0 18px; color: #3d4649; }

/* Zdroje */
.ar-sources { margin-top: 2.4em; padding-top: 18px; border-top: 1px solid var(--border); font-size: 14.5px; line-height: 1.55; color: #5d676a; }
.ar-sources h2, .ar-sources h3 { margin-top: 0 !important; font-size: 17px !important; }
.ar-sources ol { padding-left: 1.2em; }

/* Obrázok s popisom */
.ar-figure { margin: 1.8em 0 2.2em; }
.ar-figure img { display: block; width: 100%; border: 1px solid var(--border); background: #fff; }
.ar-figure figcaption { margin-top: 10px; font-size: 14px; line-height: 1.5; color: #6b7478; }

/* Produkty v článku */
.ar-products { margin: 2.2em 0; padding: 22px; border-radius: var(--radius-lg); background: var(--surface-alt); border: 1px solid var(--border); }
.ar-products-h { margin: 0 0 14px !important; font: 800 17px/1.3 var(--font-heading); color: var(--text); }
.ar-products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.ar-prod { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: var(--radius-md); background: #fff; border: 1px solid var(--border); color: var(--text) !important; text-decoration: none !important; transition: box-shadow .15s, transform .15s; }
.ar-prod:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); }
.ar-prod img { align-self: center; width: 120px; height: 120px; object-fit: contain; margin-bottom: 6px; border-radius: 0; }
.ar-prod-tier { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8a9396; }
.ar-prod strong { font: 700 15.5px/1.3 var(--font-heading); }
.ar-prod-size { font-size: 13.5px; color: #5d676a; }
.ar-prod-price { margin-top: 6px; font: 800 20px/1.1 var(--font-heading); color: var(--text); }
.ar-prod-price s { font-size: 13px; font-weight: 500; color: #9aa2a5; }
.ar-prod-cta { margin-top: auto; padding-top: 8px; font-size: 13.5px; font-weight: 600; color: var(--red-dark); }
.ar-products-all { display: inline-block; margin-top: 14px; font-weight: 700; font-size: 15px; }

/* Vyhľadávač podľa auta (tlačidlo .tf-pickcar zo styles.css, sprievodca car-finder.js) */
.ar-carfinder { margin: 2.2em 0; padding: 22px; border-radius: var(--radius-lg); background: var(--surface-alt); border: 1px solid var(--border); }
.ar-carfinder-h { margin: 0 0 4px !important; font: 800 19px/1.3 var(--font-heading); color: var(--text); }
.ar-carfinder-p { margin: 0 0 14px !important; font-size: 15.5px; line-height: 1.55; color: #4b5457; }
.ar-carfinder .tf-pickcar { font-size: 17px; }

/* Autor, výzva, súvisiace */
.ar-authorcard { display: flex; gap: 16px; align-items: flex-start; margin: 3em 0 0; padding: 22px; border-radius: var(--radius-md); border: 1px solid var(--border); font-size: 15px; line-height: 1.6; }
.ar-authorcard strong { display: flex; flex-direction: column; font: 700 16px/1.35 var(--font-heading); }
.ar-authorcard strong span { font: 400 14px/1.4 var(--font-body); color: #6b7478; }
.ar-authorcard p { margin: 6px 0 0; color: #4b5457; }
.ar-final { margin: 28px 0 0; padding: 28px; border-radius: var(--radius-lg); background: var(--red); color: #fff; }
.ar-final .ar-final-h { margin: 0 0 6px !important; color: #fff; font-size: 24px !important; }
.ar-final p { margin: 0 0 16px; color: #ffe4e6; }
.ar-final-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.ar-btn { display: inline-flex; align-items: center; min-height: 46px; padding: 0 20px; border-radius: 999px; background: #fff; color: var(--red-dark) !important; font: 700 15px/1 var(--font-heading); text-decoration: none !important; }
.ar-btn--ghost { background: transparent; color: #fff !important; border: 1.5px solid rgba(255, 255, 255, .7); }
.ar-btn:hover { filter: brightness(.96); }
.ar-related-wrap { margin-top: 48px; padding: 44px 24px 56px; background: var(--surface-alt); border-top: 1px solid var(--border); }
.ar-related-in { max-width: 1060px; margin: 0 auto; }
.ar-related-in h2 { margin: 0 0 18px; font: 800 24px/1.2 var(--font-heading); }
.ar-related { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.ar-rel { display: flex; flex-direction: column; gap: 8px; padding: 20px; border-radius: var(--radius-md); background: #fff; border: 1px solid var(--border); color: var(--text); text-decoration: none; transition: box-shadow .15s; }
.ar-rel:hover { box-shadow: var(--shadow-card); }
.ar-rel strong { font: 700 17px/1.35 var(--font-heading); }
.ar-rel span { font-size: 14.5px; line-height: 1.5; color: #5d676a; }

/* Ukazovateľ čítania (len prehliadače s scroll-timeline, inde sa nezobrazí) */
@supports (animation-timeline: scroll()) {
  .ar-hero::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1000; background: var(--red); transform-origin: 0 50%; transform: scaleX(0); animation: ar-progress linear both; animation-timeline: scroll(root); }
  @keyframes ar-progress { to { transform: scaleX(1); } }
}

@media (max-width: 640px) {
  .ar-hero-in { padding: 36px 16px 32px; }
  .ar-dates { margin-left: 0; width: 100%; }
  .ar-layout { padding: 28px 16px 16px; }
  .ar-body { font-size: 17px; }
  .ar-answer, .ar-dark, .ar-products, .ar-final { padding-left: 18px; padding-right: 18px; }
  .ar-stat b, .ar-stat strong { font-size: 28px; }
  .ar-steps > li { padding-left: 50px; }
  .ar-related-wrap { padding: 32px 16px 40px; }
}
@media (prefers-reduced-motion: reduce) { .ar-prod, .ar-toc summary::after { transition: none; } }
