/* ============================================================
   READING — článek + průvodce detail (catalogue/views/reading.php)
   and the TinyMCE editor canvas (cmsadmin/_editor.php loads this
   file, so editors see what readers get).

   System
   - Literata for content headings, Inter for running text and UI.
   - One 40rem column dead-centre; rails only at 1280px+ (outline left,
     ad right). The title alone may run wider (52rem): same left edge.
   - Vertical rhythm on a 4px grid: every line-height and every gap
     below is a multiple of 4px (0.25rem). Body line = 28px / 32px.
   - Type scale (mobile → ≥768): body 17→19, lead 19→22, H3 20→24,
     H2 24→32, H1 34→52 (≥1024). Ratios ≈1.25 per step.
   Measured from claude.com/resources articles; tables after GOV.UK.
   Why + numbers: devnotes/decisions.md, 2026-11-10 "Čtení" + "část 2".
   ============================================================ */

:root {
  --rd-col: 40rem;
  --rd-title-col: 52rem;
  --rd-gap: 3rem;
  --rd-ink: #171717;               /* neutral-900 */
  --rd-text: #262626;              /* neutral-800 */
  --rd-soft: #525252;              /* neutral-600 */
  --rd-mute: #737373;              /* neutral-500 */
  --rd-faint: #a3a3a3;             /* neutral-400 */
  --rd-line: #e5e5e5;              /* neutral-200 */
  --rd-line-strong: #d4d4d4;       /* neutral-300 */
  --rd-ease: cubic-bezier(0.2, 0, 0, 1);
  --rd-scroll-offset: 6rem;
  --rd-serif: 'Literata', 'Literata Fallback', Georgia, serif;
  --rd-sans: 'InterVariable', Inter, system-ui, sans-serif;

  /* rhythm tokens (mobile) */
  --rd-body: 1.0625rem;  --rd-body-lh: 1.75rem;   /* 17 / 28 */
  --rd-p: 1.25rem;                                /* 20 between paragraphs */
}
@media (min-width: 768px) {
  :root {
    --rd-body: 1.1875rem; --rd-body-lh: 2rem;     /* 19 / 32 */
    --rd-p: 1.5rem;                               /* 24 */
  }
}

/* ── Grid ─────────────────────────────────────────────────── */
.rd-grid {
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
  display: grid;
  grid-template-columns: minmax(0, var(--rd-col));
  justify-content: center;
}
@media (min-width: 1280px) {
  .rd-grid {
    grid-template-columns: minmax(0, 1fr) var(--rd-col) minmax(0, 1fr);
    column-gap: var(--rd-gap);
  }
  .rd-grid > * { grid-column: 2; }
}

/* ── Header ───────────────────────────────────────────────── */
.rd-head { padding-top: 3rem; }                       /* 48 */
@media (min-width: 768px) { .rd-head { padding-top: 5rem; } }   /* 80 */
@media (min-width: 1280px) { .rd-head > .rd-head-main { grid-column: 2 / 4; } }

.rd-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 0.5rem;
  margin-bottom: 1.25rem;                             /* 20 */
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  color: var(--rd-mute);
}
@media (min-width: 768px) { .rd-crumbs { margin-bottom: 1.5rem; } }
.rd-crumbs a {
  padding-block: 0.75rem;                             /* 44px target, text doesn't move */
  margin-block: -0.75rem;
  border-radius: 4px;
  transition: color 150ms ease;
}
.rd-crumbs-sep { color: var(--rd-line-strong); font-weight: 400; }
@media (hover: hover) { .rd-crumbs a:hover { color: var(--rd-ink); } }

.rd-title {
  max-width: var(--rd-title-col);
  margin: 0;
  font-family: var(--rd-serif);
  font-optical-sizing: auto;
  font-weight: 600;
  color: var(--rd-ink);
  font-size: 2.125rem;  line-height: 2.5rem;          /* 34 / 40 */
  letter-spacing: -0.02em;
  text-wrap: balance;
}
@media (min-width: 768px)  { .rd-title { font-size: 2.75rem; line-height: 3.25rem; } }   /* 44 / 52 */
@media (min-width: 1024px) { .rd-title { font-size: 3.25rem; line-height: 3.75rem; letter-spacing: -0.025em; } } /* 52 / 60 */

.rd-lead {
  max-width: var(--rd-col);
  margin-top: 1.25rem;                                /* 20 */
  font-size: 1.1875rem;  line-height: 1.75rem;        /* 19 / 28 */
  color: var(--rd-soft);
  text-wrap: pretty;
}
@media (min-width: 768px) {
  .rd-lead { margin-top: 1.5rem; font-size: 1.375rem; line-height: 2.25rem; letter-spacing: -0.005em; } /* 22 / 36 */
}

/* Byline: author (who) · facts (label above value) · share — one row,
   all on the lead's left edge, share on the column's right edge. */
.rd-byline {
  max-width: var(--rd-col);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 2rem;
  margin-top: 2rem;                                   /* 32 */
}
@media (min-width: 768px) { .rd-byline { margin-top: 2.5rem; } }  /* 40 */

.rd-by-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  border-radius: 9999px;
  -webkit-tap-highlight-color: transparent;
}
.rd-by-author img { width: 2.5rem; height: 2.5rem; border-radius: 9999px; object-fit: cover; flex: none; background: #f5f5f5; }
.rd-by-name { display: block; font-size: 0.9375rem; line-height: 1.25rem; font-weight: 600; color: var(--rd-ink); }
.rd-by-role { display: block; font-size: 0.8125rem; line-height: 1.25rem; color: var(--rd-mute); }
@media (hover: hover) { .rd-by-author:hover .rd-by-name { text-decoration: underline; text-decoration-color: var(--rd-faint); text-underline-offset: 0.2em; } }

.rd-by-facts { display: flex; gap: 2rem; }
.rd-by-facts dt { font-size: 0.8125rem; line-height: 1.25rem; color: var(--rd-mute); }
.rd-by-facts dd { font-size: 0.9375rem; line-height: 1.25rem; color: var(--rd-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* phones: author on its own line, facts + share share the next one */
@media (max-width: 639px) {
  .rd-by-author { flex-basis: 100%; }
}

.rd-share-wrap { position: relative; margin-left: auto; display: flex; align-items: center; }
.rd-share {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  border: 1px solid var(--rd-line);
  background: #fff;
  color: var(--rd-text);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 150ms ease, background-color 150ms ease, transform 160ms var(--rd-ease);
}
@media (hover: hover) { .rd-share:hover { border-color: var(--rd-faint); } }
.rd-share:active { transform: scale(0.94); }
.rd-share-i { grid-area: 1 / 1; transition: opacity 180ms ease, transform 220ms var(--rd-ease); }
.rd-share-i--share, .rd-share-i--ok { opacity: 0; transform: scale(0.6); }
.rd-share.is-native .rd-share-i--link { opacity: 0; transform: scale(0.6); }
.rd-share.is-native .rd-share-i--share { opacity: 1; transform: none; }
.rd-share.is-done .rd-share-i--link,
.rd-share.is-done .rd-share-i--share { opacity: 0; transform: scale(0.6); }
.rd-share.is-done .rd-share-i--ok { opacity: 1; transform: none; }
.rd-share.is-done { border-color: var(--rd-ink); }
.rd-share-done {
  position: absolute;
  right: calc(100% + 0.75rem);
  white-space: nowrap;
  font-size: 0.8125rem;
  line-height: 1.25rem;
  color: var(--rd-ink);
  opacity: 0;
  transform: translateX(6px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 220ms var(--rd-ease);
}
.rd-share-wrap.is-done .rd-share-done { opacity: 1; transform: none; }

/* ── Hero ─────────────────────────────────────────────────── */
.rd-hero-wrap {
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
  margin-top: 2.5rem;                                 /* 40 */
}
@media (min-width: 768px) { .rd-hero-wrap { margin-top: 3.5rem; } }   /* 56 */
.rd-hero {
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 1rem;
  background: #f0f0f0;
}
@media (min-width: 768px) { .rd-hero { border-radius: 1.25rem; } }
.rd-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── Body row ─────────────────────────────────────────────── */
.rd-body { padding-top: 2.5rem; padding-bottom: 4rem; align-items: start; }   /* 40 / 64 */
@media (min-width: 768px) { .rd-body { padding-top: 4rem; padding-bottom: 5rem; } }  /* 64 / 80 */

/* Outline, left rail (≥1280) */
.rd-toc { display: none; }
@media (min-width: 1280px) {
  .rd-toc {
    display: block;
    grid-column: 1;
    grid-row: 1;
    justify-self: end;
    width: 100%;
    max-width: 15rem;
    position: sticky;
    top: var(--rd-scroll-offset);
    max-height: calc(100vh - var(--rd-scroll-offset) - 2rem);
    overflow-y: auto;
    scrollbar-width: none;
  }
  .rd-body > .rd-col { grid-row: 1; }
}
.rd-toc-label { margin-bottom: 0.75rem; font-size: 0.8125rem; line-height: 1.25rem; font-weight: 600; color: var(--rd-ink); }
.rd-toc-track { position: relative; border-left: 1px solid var(--rd-line); }
.rd-toc-list { list-style: none; margin: 0; padding: 0; }
.rd-toc-list a {
  display: block;
  padding: 0.375rem 0 0.375rem 1rem;
  font-size: 0.8125rem;
  line-height: 1.25rem;
  color: var(--rd-mute);
  text-wrap: pretty;
  transition: color 150ms ease;
}
@media (hover: hover) { .rd-toc-list a:hover { color: var(--rd-ink); } }
.rd-toc-list a[aria-current="true"] { color: var(--rd-ink); }
.rd-toc-ind {
  position: absolute; left: -1px; top: 0; width: 2px; height: 0;
  background: var(--rd-ink); border-radius: 1px; opacity: 0;
  transition: transform 300ms var(--rd-ease), height 300ms var(--rd-ease), opacity 200ms ease;
}

/* Outline, phones/tablets — collapsed above the text */
.rd-toc-m { margin-bottom: 2.5rem; border: 1px solid var(--rd-line); border-radius: 0.75rem; background: #fff; }
@media (min-width: 1280px) { .rd-toc-m { display: none; } }
.rd-toc-m summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 3rem; padding: 0 1.25rem;
  list-style: none; cursor: pointer;
  font-size: 0.9375rem; line-height: 1.25rem; font-weight: 600; color: var(--rd-ink);
  border-radius: 0.75rem;
  -webkit-tap-highlight-color: transparent;
}
.rd-toc-m-count { margin-left: 0.5rem; font-weight: 400; color: var(--rd-mute); }
.rd-toc-m summary::-webkit-details-marker { display: none; }
.rd-toc-m summary svg { color: var(--rd-mute); transition: transform 300ms var(--rd-ease); }
.rd-toc-m[open] summary svg { transform: rotate(180deg); }
.rd-toc-m ol { list-style: none; margin: 0; padding: 0 1.25rem 0.5rem; counter-reset: rd; }
.rd-toc-m li { border-top: 1px solid #f5f5f5; counter-increment: rd; }
.rd-toc-m a { display: flex; gap: 0.75rem; padding: 0.75rem 0; font-size: 0.9375rem; line-height: 1.25rem; color: var(--rd-text); }
.rd-toc-m a::before { content: counter(rd); min-width: 1rem; color: var(--rd-faint); font-variant-numeric: tabular-nums; }
.rd-toc-m a:active { color: var(--rd-mute); }

.rd-col { min-width: 0; }

/* Ad: right rail ≥1280, top-aligned with the text, scrolls away with it */
.rd-aside { margin-top: 4rem; max-width: 24rem; }
@media (min-width: 1280px) {
  .rd-aside { grid-column: 3; grid-row: 1; margin-top: 0; width: 100%; max-width: 15.5rem; }
}

.rd-label { font-size: 0.8125rem; line-height: 1.25rem; color: var(--rd-mute); margin-bottom: 0.5rem; }

/* ── Ve zkratce ───────────────────────────────────────────── */
/* Urbanlist's own voice → warm sand + amber marks (palette 2026-10-09).
   The only warm module on the screen. */
.rd-summary {
  margin-bottom: 2.5rem;                              /* 40 */
  padding: 1.25rem 1.25rem 1.5rem;
  border-radius: 1rem;
  background: var(--ul-warm, #f4f0e9);
  color: #1c1917;
}
@media (min-width: 768px) { .rd-summary { margin-bottom: 3.5rem; padding: 1.75rem 2rem 2rem; } }
.rd-summary-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  margin: 0 0 0.75rem;
}
.rd-summary-title {
  margin: 0;
  font-family: var(--rd-sans);
  font-size: 0.8125rem;
  line-height: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #1c1917;
}
/* Assistant voice, not the main message: a step below the body text
   (15/24 phone, 16/24 from 768 vs body 17/28 and 19/32), stone-700. */
.rd-summary-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.rd-summary-list li,
.rd-summary-text {
  position: relative;
  font-size: 0.9375rem;
  line-height: 1.5rem;                                /* 15 / 24 */
  color: #44403c;
  text-wrap: pretty;
}
@media (min-width: 768px) {
  .rd-summary-list li, .rd-summary-text { font-size: 1rem; line-height: 1.5rem; }   /* 16 / 24 */
}
.rd-summary-list li { padding-left: 1.25rem; }
.rd-summary-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: calc(0.75rem - 3px);                           /* centred on the first line */
  width: 6px; height: 6px;
  border-radius: 9999px;
  background: var(--ul-amber, #fbbf24);
  box-shadow: 0 0 0 1px rgba(146, 64, 14, 0.18);
}
/* AI disclosure: present, honest, quiet. Sparkles = the de-facto AI mark. */
.rd-summary-note {
  display: inline-flex; align-items: center; gap: 0.25rem;
  margin: 0; flex: none;
  font-size: 0.75rem; line-height: 1.25rem; font-weight: 450; color: #57534e;   /* stone-600: 6.6 : 1 on sand */
}
.rd-summary-note svg { flex: none; }

/* ── Prose ────────────────────────────────────────────────── */
.prose {
  font-family: var(--rd-sans);
  font-optical-sizing: auto;
  font-feature-settings: "cv05", "cv08";   /* l with tail, I with serifs: Il1 never collide */
  font-size: var(--rd-body);
  line-height: var(--rd-body-lh);
  color: var(--rd-text);
  overflow-wrap: break-word;
}
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }

.prose p { margin: 0 0 var(--rd-p); text-wrap: pretty; }

.prose h2,
.prose h3 {
  position: relative;
  font-family: var(--rd-serif);
  font-optical-sizing: auto;
  color: var(--rd-ink);
  text-wrap: balance;
  scroll-margin-top: var(--rd-scroll-offset);
}
.prose h2 {
  font-size: 1.5rem;  line-height: 2rem;              /* 24 / 32 */
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 3rem 0 0.75rem;                             /* 48 / 12 */
}
.prose h3 {
  font-size: 1.25rem;  line-height: 1.75rem;          /* 20 / 28 */
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 2.25rem 0 0.5rem;                           /* 36 / 8 */
}
@media (min-width: 768px) {
  .prose h2 { font-size: 2rem; line-height: 2.5rem; margin: 4rem 0 1rem; }        /* 32 / 40 · 64 / 16 */
  .prose h3 { font-size: 1.5rem; line-height: 2rem; margin: 2.5rem 0 0.75rem; }   /* 24 / 32 · 40 / 12 */
}
.prose h2 + h3 { margin-top: 1.5rem; }
.prose h4 {
  font-size: 1em; line-height: var(--rd-body-lh); font-weight: 600;
  color: var(--rd-ink); margin: 2rem 0 0.25rem;
}

/* Section link: hangs in the margin left of the heading (≥768) */
.prose-anchor {
  position: absolute;
  left: -2.25rem;
  top: 1.25rem;                                       /* middle of the first 40px line */
  transform: translateY(-50%);
  display: none;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.375rem;
  color: var(--rd-faint) !important;
  text-decoration: none !important;
  opacity: 0;
  transition: opacity 150ms ease, color 150ms ease, background-color 150ms ease;
}
@media (min-width: 768px) { .prose-anchor { display: grid; } }
@media (hover: hover) {
  .prose h2:hover .prose-anchor { opacity: 1; }
  .prose-anchor:hover { color: var(--rd-ink) !important; background: #f0f0f0; }
}
.prose-anchor:focus-visible { opacity: 1; }
.prose-anchor.is-done { opacity: 1; color: var(--rd-ink) !important; }
.prose-anchor-tip {
  position: absolute;
  left: 0;
  bottom: calc(100% + 0.25rem);
  white-space: nowrap;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  background: var(--rd-ink);
  color: #fff;
  font-family: var(--rd-sans);
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 500;
  letter-spacing: 0;
  pointer-events: none;
  animation: rd-tip 1600ms var(--rd-ease) forwards;
}
@keyframes rd-tip {
  0% { opacity: 0; transform: translateY(4px); }
  12%, 80% { opacity: 1; transform: none; }
  100% { opacity: 0; }
}

.prose strong, .prose b { font-weight: 600; color: var(--rd-ink); }
.prose em, .prose i { font-style: italic; }

.prose a:not(.prose-anchor) {
  color: var(--rd-ink);
  text-decoration: underline;
  text-decoration-color: var(--rd-line-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: text-decoration-color 150ms ease;
}
@media (hover: hover) { .prose a:not(.prose-anchor):hover { text-decoration-color: var(--rd-ink); } }

.prose ul, .prose ol { margin: 0 0 var(--rd-p); padding-left: 1.375em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 0.5rem; padding-left: 0.25em; }
.prose li:last-child { margin-bottom: 0; }
.prose li::marker { color: var(--rd-faint); }
.prose ol > li::marker { color: var(--rd-mute); font-variant-numeric: tabular-nums; font-weight: 500; }
.prose li > p { margin: 0; }
.prose li > ul, .prose li > ol { margin: 0.5rem 0 0; }

.prose blockquote {
  margin: 2.5rem 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--rd-ink);
  font-family: var(--rd-serif);
  font-size: 1.25rem;  line-height: 2rem;             /* 20 / 32 */
  font-style: italic;
  color: var(--rd-ink);
}
@media (min-width: 768px) { .prose blockquote { margin: 3rem 0; padding-left: 1.5rem; font-size: 1.5rem; line-height: 2.25rem; } } /* 24 / 36 */
.prose blockquote p { margin: 0 0 0.75rem; }
.prose blockquote p:last-child { margin-bottom: 0; }

.prose img { display: block; width: 100%; height: auto; border-radius: 0.75rem; background: #f5f5f5; margin: 2.5rem 0; }
.prose figure { margin: 2.5rem 0; }
.prose figure img { margin: 0; }
.prose figcaption { margin-top: 0.75rem; font-size: 0.875rem; line-height: 1.25rem; color: var(--rd-mute); }

.prose hr { border: 0; height: 1px; background: var(--rd-line); margin: 3rem 0; }

.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.875em; padding: 0.1em 0.35em; border-radius: 0.25rem; background: #f5f5f5; }

/* Focus: visible on light and dark, never on mouse click */
.prose a:focus-visible,
.rd-crumbs a:focus-visible,
.rd-by-author:focus-visible,
.rd-share:focus-visible,
.rd-toc-list a:focus-visible,
.rd-toc-m a:focus-visible,
.rd-toc-m summary:focus-visible,
.rd-author-link:focus-visible,
.rd-tags a:focus-visible,
.rd-project:focus-visible,
.rd-next-project:focus-visible,
.prose-faq-item summary:focus-visible,
.prose-table:focus-visible {
  outline: 2px solid var(--rd-ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px #fff;
}
.prose a:focus-visible, .rd-crumbs a:focus-visible, .rd-toc-list a:focus-visible,
.rd-author-link:focus-visible, .prose-faq-item summary:focus-visible, .prose-table:focus-visible { border-radius: 4px; }

/* ── Tables (GOV.UK pattern: caption as heading, numbers right, rules not boxes) ── */
.prose-table,
.prose > table { margin: 2.5rem 0; }                 /* > table: editor canvas, no wrapper yet */
.prose-table > table { margin: 0; }
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--rd-sans);
  font-size: 0.9375rem;  line-height: 1.5rem;         /* 15 / 24 */
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--rd-text);
}
.prose caption {
  caption-side: top;
  text-align: left;
  padding-bottom: 0.75rem;
  font-size: 0.9375rem;  line-height: 1.5rem;
  font-weight: 600;
  color: var(--rd-ink);
  text-wrap: balance;
}
.prose th,
.prose td {
  padding: 0.75rem 1.25rem 0.75rem 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--rd-line);
}
.prose th:last-child,
.prose td:last-child { padding-right: 0; }
.prose thead th {
  padding-top: 0;
  padding-bottom: 0.5rem;
  vertical-align: bottom;
  font-size: 0.8125rem;  line-height: 1.25rem;
  font-weight: 500;
  color: var(--rd-mute);
  border-bottom-color: var(--rd-line-strong);
}
.prose th[scope="row"] { font-weight: 500; color: var(--rd-ink); }
.prose [data-num] { text-align: right; white-space: nowrap; }
.prose :is(td, th) p { margin: 0; }
.prose :is(td, th) strong { font-weight: 600; }

/* Phones: records stack — row header as title, cells label-above-value */
@media (max-width: 639px) {
  .prose-table.is-stackable table,
  .prose-table.is-stackable tbody,
  .prose-table.is-stackable tr,
  .prose-table.is-stackable th,
  .prose-table.is-stackable td { display: block; }
  .prose-table.is-stackable caption { display: block; }
  .prose-table.is-stackable thead {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
  }
  .prose-table.is-stackable tbody { border-top: 1px solid var(--rd-line-strong); }
  .prose-table.is-stackable tr { display: grid; gap: 0.5rem; padding: 1rem 0; border-bottom: 1px solid var(--rd-line); }
  .prose-table.is-stackable th,
  .prose-table.is-stackable td { padding: 0; border: 0; text-align: left; white-space: normal; }
  .prose-table.is-stackable th[scope="row"] { font-size: 1rem; line-height: 1.5rem; font-weight: 600; }
  .prose-table.is-stackable td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 0.8125rem; line-height: 1.25rem;
    color: var(--rd-mute);
  }
  .prose-table.is-stackable td:empty { display: none; }

  .prose-table.is-plain th,
  .prose-table.is-plain td { padding-right: 1rem; }
  .prose-table.is-plain th:last-child,
  .prose-table.is-plain td:last-child { padding-right: 0; }
}

/* Header-less tables: horizontal scroll, fade shows there is more */
.prose-table.is-scroll { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
.prose-table.is-scroll table { min-width: 34rem; }
.prose-table.is-scroll.has-more {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 3rem), transparent);
          mask-image: linear-gradient(to right, #000 calc(100% - 3rem), transparent);
}

/* ── FAQ accordion (built by prose.php from "Časté otázky" + h3) ── */
.prose-faq { margin: 1.5rem 0 0; border-top: 1px solid var(--rd-line-strong); interpolate-size: allow-keywords; }
.prose-faq-item { border-bottom: 1px solid var(--rd-line); }
.prose-faq-item summary {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem;
  padding: 1.25rem 0;                                 /* 20 */
  list-style: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.prose-faq-item summary::-webkit-details-marker { display: none; }
.prose .prose-faq-q {
  margin: 0;
  font-size: 1.125rem;  line-height: 1.75rem;         /* 18 / 28 */
  font-weight: 500;
  letter-spacing: -0.005em;
  text-wrap: pretty;
}
@media (min-width: 768px) { .prose .prose-faq-q { font-size: 1.25rem; line-height: 2rem; } }   /* 20 / 32 */
.prose-faq-icon {
  position: relative; flex: none;
  width: 1.75rem; height: 1.75rem;                    /* centred on the first line */
  margin-top: 0;
  border-radius: 9999px;
  color: var(--rd-mute);
  transition: color 150ms ease, background-color 150ms ease;
}
@media (min-width: 768px) { .prose-faq-icon { margin-top: 0.125rem; } }
.prose-faq-icon::before,
.prose-faq-icon::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 0.75rem; height: 1.5px; margin: -0.75px 0 0 -0.375rem;
  border-radius: 1px; background: currentColor;
  transition: transform 250ms var(--rd-ease), opacity 200ms ease;
}
.prose-faq-icon::after { transform: rotate(90deg); }
.prose-faq-item[open] .prose-faq-icon::after { transform: rotate(180deg); opacity: 0; }
@media (hover: hover) { .prose-faq-item summary:hover .prose-faq-icon { color: var(--rd-ink); background: #f0f0f0; } }
.prose-faq-item summary:active .prose-faq-icon { background: #ebebeb; }
.prose-faq-a { padding: 0 3.25rem 1.5rem 0; }
.prose-faq-a > :last-child { margin-bottom: 0; }

.prose-faq-item::details-content {
  block-size: 0; overflow: hidden;
  transition: block-size 320ms var(--rd-ease), content-visibility 320ms allow-discrete;
}
.prose-faq-item[open]::details-content { block-size: auto; }
.prose-faq-item[open] .prose-faq-a { opacity: 1; transform: none; transition: opacity 260ms ease 60ms, transform 320ms var(--rd-ease); }
@starting-style { .prose-faq-item[open] .prose-faq-a { opacity: 0; transform: translateY(-6px); } }

/* ── After the text ───────────────────────────────────────── */
.rd-project {
  display: flex; align-items: center; gap: 1rem;
  margin-top: 3.5rem; padding: 1rem;
  border: 1px solid var(--rd-line); border-radius: 1rem; background: #fff;
  transition: border-color 150ms ease;
}
@media (hover: hover) { .rd-project:hover { border-color: var(--rd-line-strong); } }
.rd-project-img { flex: none; width: 6rem; aspect-ratio: 4 / 3; border-radius: 0.5rem; overflow: hidden; background: #f5f5f5; }
.rd-project-img img { width: 100%; height: 100%; object-fit: cover; }
.rd-project-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.rd-project-text .rd-label { margin-bottom: 0; }
.rd-project-loc { font-size: 0.875rem; line-height: 1.25rem; color: var(--rd-mute); }
.rd-project-arrow { flex: none; color: var(--rd-mute); transition: transform 200ms var(--rd-ease), color 150ms ease; }
@media (hover: hover) { .rd-project:hover .rd-project-arrow { transform: translateX(3px); color: var(--rd-ink); } }

.rd-author {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  column-gap: 1rem;
  align-items: center;
  margin-top: 4rem;                                   /* 64: whitespace, the FAQ ends on a rule */
  scroll-margin-top: var(--rd-scroll-offset);
}
.rd-author > :not(.rd-author-img) { grid-column: 1 / -1; }
.rd-author > .rd-author-id { grid-column: 2; }
.rd-author:not(:has(.rd-author-img)) > .rd-author-id { grid-column: 1 / -1; }
@media (min-width: 640px) {
  .rd-author { align-items: start; }
  .rd-author > :not(.rd-author-img) { grid-column: 2; }
  .rd-author-img { grid-row: 1 / span 3; }
}
.rd-author-img { width: 3rem; height: 3rem; border-radius: 9999px; object-fit: cover; background: #f5f5f5; }
.rd-author .rd-label { margin-bottom: 0; }
.rd-author-name { font-size: 1rem; line-height: 1.5rem; font-weight: 600; color: var(--rd-ink); }
.rd-author-role { font-size: 0.875rem; line-height: 1.25rem; color: var(--rd-mute); }
.rd-author-bio { margin-top: 0.75rem; font-size: 0.9375rem; line-height: 1.5rem; color: var(--rd-soft); text-wrap: pretty; }
.rd-author-link {
  display: inline-flex; align-items: center; gap: 0.25rem;
  justify-self: start;
  margin-top: 0.25rem; padding-block: 0.625rem;
  font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; color: var(--rd-ink);
  text-decoration: underline; text-decoration-color: var(--rd-line-strong); text-underline-offset: 0.22em;
}
@media (hover: hover) { .rd-author-link:hover { text-decoration-color: var(--rd-ink); } }

.rd-tags { margin-top: 2rem; }
.rd-tags ul { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; margin: 0; padding: 0; }
.rd-tags a {
  display: inline-flex; align-items: center; min-height: 2.25rem; padding: 0 0.875rem;
  border: 1px solid var(--rd-line); border-radius: 9999px; background: #fff;
  font-size: 0.8125rem; line-height: 1.25rem; font-weight: 500; color: var(--rd-soft);
  transition: border-color 150ms ease, color 150ms ease;
}
@media (hover: hover) { .rd-tags a:hover { border-color: var(--rd-faint); color: var(--rd-ink); } }

/* ── Next step (catalogue/lib/reading-cta.php) ────────────── */
/* Same panel, padding, title and form as the newsletter panel below it
   (.nl-panel/.nl-main in css/catalog.css, .ul-* in css/ul-form.css): the end
   of the page is one family, not two similar boxes. */
.rd-next { max-width: 80rem; margin-inline: auto; padding: 0 1.5rem; position: relative; z-index: 2; }
.rd-next-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.05), 0 1px 2px rgb(0 0 0 / 0.03), 0 16px 40px -24px rgb(0 0 0 / 0.14);
  padding: 1.75rem 1.5rem;
}
@media (min-width: 640px)  { .rd-next-card { padding: 2.25rem 2.5rem; } }
@media (min-width: 1024px) { .rd-next-card { padding: 2.75rem 3rem; } }

.rd-next-sub { margin-top: 0.75rem; font-size: 1rem; line-height: 1.5rem; color: var(--rd-soft); text-wrap: pretty; max-width: 34rem; }

.rd-next-benefits { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.rd-next-benefits li { display: flex; gap: 0.75rem; font-size: 0.9375rem; line-height: 1.5rem; color: var(--rd-soft); }
.rd-next-benefits strong { font-weight: 600; color: var(--rd-ink); }
.rd-next-check {
  flex: none; display: grid; place-items: center;
  width: 1.5rem; height: 1.5rem; border-radius: 9999px;
  background: var(--rd-ink); color: #fff;
}
.rd-next-check svg { width: 0.875rem; height: 0.875rem; }

.rd-next-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
@media (max-width: 639px) { .rd-next-actions .ul-btn-solid { flex: 1 1 100%; } }

/* developer: the smallest first step, laid out exactly like .nl-main
   (copy left, form in a 26rem column right from 1024). */
.rd-next--dev .rd-next-card { display: grid; gap: 1.5rem; }
@media (min-width: 1024px) {
  .rd-next--dev .rd-next-card { grid-template-columns: minmax(0, 1fr) minmax(0, 26rem); gap: 4rem; align-items: center; }
}
.rd-audit-fine { display: flex; flex-direction: column; gap: 0.25rem; margin-top: 0.75rem; }
.rd-audit-fine button { display: inline; position: relative; padding: 0; border: 0; background: none; font: inherit; cursor: pointer; }
.rd-audit-fine button::after { content: ""; position: absolute; inset: -0.75rem -0.25rem; }   /* 44 px hit area */

/* buyer: copy + promises on one row, three real projects below */
.rd-next--buyer .rd-next-head { display: grid; gap: 2rem; }
@media (min-width: 1024px) {
  .rd-next--buyer .rd-next-head { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 4rem; align-items: start; }
}
.rd-next-projects { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; gap: 1.5rem; }
@media (min-width: 640px)  { .rd-next-projects { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; } }
@media (min-width: 1024px) { .rd-next-projects { gap: 1.5rem; } }
.rd-next-project { display: flex; flex-direction: column; gap: 0.75rem; -webkit-tap-highlight-color: transparent; border-radius: 0.75rem; }
.rd-next-project-img { display: block; aspect-ratio: 4 / 3; border-radius: 0.75rem; overflow: hidden; background: #f0f0f0; }
.rd-next-project-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--rd-ease); }
@media (hover: hover) { .rd-next-project:hover .rd-next-project-img img { transform: scale(1.04); } }
.rd-next-project-meta { display: flex; flex-wrap: wrap; gap: 0 0.75rem; margin-top: -0.375rem; font-size: 0.875rem; line-height: 1.25rem; color: var(--rd-mute); font-variant-numeric: tabular-nums; }
.rd-next-project-meta span + span::before { content: "·"; margin-right: 0.75rem; color: var(--rd-line-strong); }

/* ── Reduced motion: opacity only ─────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .prose-faq-item::details-content { transition: none; }
  .prose-faq-item[open] .prose-faq-a { transform: none; transition: opacity 200ms ease; }
  @starting-style { .prose-faq-item[open] .prose-faq-a { transform: none; } }
  .prose-faq-icon::before, .prose-faq-icon::after, .rd-toc-m summary svg,
  .rd-project-arrow, .ul-btn-solid, .ul-btn-solid svg, .rd-share, .rd-share-i, .rd-share-done,
  .rd-next-project-img img { transition: opacity 150ms ease; transform: none !important; }
  .rd-toc-ind { transition: opacity 150ms ease; }
  .prose-anchor-tip { animation-name: rd-tip-fade; }
  @keyframes rd-tip-fade { 0% { opacity: 0; } 12%, 80% { opacity: 1; } 100% { opacity: 0; } }
}

/* ── Print: just the text ─────────────────────────────────── */
@media print {
  #nav, .rd-toc, .rd-toc-m, .rd-aside, .rd-share-wrap, .rd-next, .prose-anchor, [data-newsletter], footer { display: none !important; }
  .prose-faq-item::details-content { block-size: auto; content-visibility: visible; }
  .prose { font-size: 11pt; line-height: 1.5; }
}
