/* /funkce (Task #12932) — the soft-style mosaic in the original site tokens.
   Scoped under .funkce-page so Tailwind v4 utilities from public.css and the header/footer
   keep winning. The page tokens are the same as .hp: --teal, --blue, --green, --ink. */

.funkce-page {
  --teal: #51dacf;
  --teal-dark: #3db8af;
  --teal-deep: #1d7069;
  --blue: #51a1da;
  --blue-dark: #3684c0;
  --green: #51da8a;
  --ink: #10292c;
  --ink-2: #3d5558;
  --muted: #4f6568;
  --ground: #f9fafb;
  --paper: #ffffff;
  --line: #d3e6e5;
  --shadow: 0 20px 40px -8px rgba(0, 0, 0, .12);
  --shadow-lift: 0 28px 56px -12px rgba(16, 41, 44, .18);
  font-family: 'Poppins', system-ui, sans-serif;
  color: var(--ink);
}

.funkce-page *, .funkce-page *::before, .funkce-page *::after { box-sizing: border-box; }

/* — Headings: Alata. Lead/paragraph: Roboto Slab. UI: Poppins. — */
body .funkce-page h1, body .funkce-page h2, body .funkce-page h3 {
  font-family: 'Alata', 'Poppins', sans-serif;
  font-weight: 400;
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
  color: var(--ink);
}
.funkce-page .funkce-h1 {
  font-size: clamp(2.4rem, 5.2vw, 3.9rem);
  line-height: 1.08;
  max-width: 16ch;
  margin-top: 12px;
}
.funkce-page .funkce-h2 {
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  text-align: center;
}
body .funkce-page p {
  margin: 0;
  font-family: 'Roboto Slab', 'Poppins', serif;
}
.funkce-page .funkce-kicker {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: .9rem;
  font-weight: 600;
  color: #3db86a;
}
.funkce-page .funkce-lead {
  margin-top: 14px;
  font-size: 1.15rem;
  line-height: 1.65;
  color: #4b5563;
  max-width: 52ch;
}

/* — Hero — Task #13208: two soft glows on white, a compact 64/28 px padding. — */
.funkce-hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 28px;
  background: #ffffff;
}
.funkce-hero__glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 420px at 88% -10%, rgba(81, 218, 207, .20), transparent 60%),
    radial-gradient(700px 380px at -5% 110%, rgba(81, 218, 207, .14), transparent 60%);
  z-index: 0;
  pointer-events: none;
}
.funkce-hero > .container { position: relative; z-index: 1; }

/* — Sticky filter bar — */
.funkce-mosaic__sticky {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(249, 250, 251, .92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding-block: 12px;
  border-bottom: 1px solid rgba(211, 230, 229, .55);
}
/* Task #13079 — a stuck bar covering a phone screen is worse than none. */
@media (max-width: 767px) {
  .funkce-mosaic__sticky { position: static; }
}
.funkce-mosaic__filters { padding-block: 14px 18px; }

/* Task #13208 — "Co řešíte" / "Pro koho" labels in front of the chip row and the role switch. */
.funkce-filter-label {
  flex-shrink: 0;
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #9ca3af;
}
.funkce-chips-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.funkce-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 0;
}
.funkce-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: .9rem;
  font-weight: 500;
  text-decoration: none;
  color: #111827;
  background: var(--paper);
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 6px -2px rgba(17, 24, 39, .08);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.funkce-chip:hover { border-color: var(--teal); color: #1f9e94; }
.funkce-chip:focus-visible { outline: 3px solid var(--teal-deep); outline-offset: 2px; }
.funkce-chip--active, .funkce-chip--active:hover {
  background: linear-gradient(135deg, var(--teal) 0%, var(--blue) 100%);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(81, 218, 207, .4);
}
.funkce-chip__count {
  font-size: .75rem;
  opacity: .65;
}
.funkce-chip--more {
  border-style: dashed;
  box-shadow: none;
}
.funkce-chip--more[hidden] { display: none; }
/* The toggle hides the extra chips only once JS has connected — no JS shows them all. */
.funkce-chips--collapsed .funkce-chip--extra { display: none; }

/* — Role switch + search on one row — */
.funkce-filters__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

/* — Pro koho segmented control — */
.funkce-roles {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 4px;
  background: #f3f4f6;
  border-radius: 999px;
}
.funkce-role {
  padding: 6px 14px;
  border-radius: 999px;
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: .82rem;
  font-weight: 500;
  color: #4b5563;
  text-decoration: none;
}
.funkce-role:hover { color: #111827; }
.funkce-role--active {
  background: #ffffff;
  color: #111827;
  font-weight: 600;
  box-shadow: 0 2px 8px -2px rgba(17, 24, 39, .15);
}

/* — Search pill — */
.funkce-search {
  flex: 1 1 260px;
  max-width: 440px;
}
.funkce-search__field {
  position: relative;
  display: flex;
  align-items: center;
}
.funkce-search__icon {
  position: absolute;
  left: 16px;
  color: #9ca3af;
  pointer-events: none;
}
.funkce-search__field input {
  flex: 1;
  width: 100%;
  padding: 10px 18px 10px 42px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: .92rem;
  background: #ffffff;
  color: #111827;
}
.funkce-search__field input::placeholder { color: #9ca3af; }
.funkce-search__field input:focus-visible {
  outline: 3px solid var(--teal-deep);
  outline-offset: 2px;
  border-color: var(--teal);
}

/* — Reassurance row with the result count at its right end — */
.funkce-reassurance {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 18px;
  margin-top: 16px;
}
.funkce-reassurance__items {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
}
body .funkce-page .funkce-reassurance__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Roboto Slab', serif;
  font-size: .92rem;
  color: #4b5563;
}
.funkce-reassurance__item::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}
.funkce-reassurance__cta {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: .92rem;
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
}
.funkce-reassurance__cta:hover { text-decoration: underline; }

/* — Result count — */
body .funkce-page .funkce-count {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: .82rem;
  color: #9ca3af;
}

/* — Empty state — Task #13213: a left-aligned white card as in the design reference. */
.funkce-empty {
  background: var(--paper);
  border-radius: 1rem;
  padding: 26px;
  text-align: left;
  font-family: 'Roboto Slab', serif;
  font-size: 1rem;
  color: var(--ink-2);
  box-shadow: 0 10px 30px -12px rgba(17, 24, 39, .18), 0 4px 10px -6px rgba(17, 24, 39, .08);
}
.funkce-empty__headline {
  margin: 0 0 6px;
  font-family: 'Alata', 'Poppins', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
}
.funkce-empty__hint {
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
}
.funkce-empty__suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.funkce-empty__cta {
  display: inline-block;
  margin-top: 18px;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 600;
  font-size: .92rem;
}

/* — Mosaic grid — Task #13211: three equal columns as in the design reference, two under
   980 px, one under 640 px. `dense` lets the one-column tiles fill the hole beside a
   two-column L tile. */
.funkce-mosaic__body { background: var(--ground); padding-block: 36px 80px; }
.funkce-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-flow: dense;
}
@media (min-width: 640px) {
  .funkce-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 980px) {
  .funkce-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* — Tile — Task #13078: the tile carries .funkce-tile and data-size, and the spans below
   are the only thing that lays the mosaic out. Task #13211: an M tile takes one column,
   an L tile (unfiltered view only) two, a pinned answer rendered as a tile the whole row.
   The card stays straight — only a phone screenshot is tilted. */
.funkce-tile {
  --tile-ink: #111827;
  --tile-text: #4b5563;
  --tile-muted: #9ca3af;
  --tile-line: #e5e7eb;
  --tile-card: 0 10px 30px -12px rgba(17, 24, 39, .18), 0 4px 10px -6px rgba(17, 24, 39, .08);
  --tile-lift: 0 20px 40px -8px rgba(0, 0, 0, .14), 0 8px 16px -4px rgba(0, 0, 0, .08);
  min-width: 0;
  background: var(--paper);
  border-radius: 1rem;
  padding: 18px;
  box-shadow: var(--tile-card);
  transition: transform .2s ease, box-shadow .2s ease;
}
.funkce-tile[data-size="W"] { grid-column: 1 / -1; }
@media (min-width: 640px) {
  .funkce-tile[data-size="L"] { grid-column: span 2; padding: 24px; }
}
.funkce-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--tile-lift);
}
.funkce-tile__link {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  color: inherit;
  text-decoration: none;
}
/* L: media on the left, text on the right; a phone frame gets a narrow column. */
@media (min-width: 640px) {
  .funkce-tile[data-size="L"] .funkce-tile__link {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 26px;
    align-items: center;
  }
  .funkce-tile[data-size="L"][data-media="phone"] .funkce-tile__link { grid-template-columns: minmax(170px, 210px) 1fr; }
  .funkce-tile[data-size="L"][data-media="none"] .funkce-tile__link { grid-template-columns: minmax(0, 1fr); }
}

/* — Media frames by feature.media.kind. The default is the desktop frame. — */
.funkce-tile__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--paper);
  border: 6px solid #ffffff;
  outline: 1px solid var(--tile-line);
  border-radius: 12px;
  box-shadow: 0 10px 25px -10px rgba(17, 24, 39, .25);
}
.funkce-tile[data-media="infographic"] .funkce-tile__frame {
  aspect-ratio: 16 / 9;
  border: 0;
  outline: 0;
  box-shadow: 0 6px 18px -10px rgba(17, 24, 39, .18);
}
.funkce-tile[data-media="phone"] .funkce-tile__frame {
  max-width: 190px;
  height: 230px;
  aspect-ratio: auto;
  margin-inline: auto;
  padding: 7px;
  border: 0;
  outline: 0;
  border-radius: 22px;
  box-shadow: var(--tile-lift);
  rotate: -2deg;
}
.funkce-tile[data-media="phone"]:nth-of-type(even) .funkce-tile__frame { rotate: 2deg; }
@media (min-width: 640px) {
  .funkce-tile[data-size="L"][data-media="phone"] .funkce-tile__frame { max-width: 210px; height: 320px; rotate: -3deg; }
}
/* Task #13188 — the screenshot window has one fixed shape, so a tall or a wide capture no
   longer blows the tile up. The image covers the whole window and pans across its overflow
   in thirds: 3 s on the first third, 1 s slide to the second, 3 s, 1 s slide to the last,
   3 s, then a quick jump back. Both axes animate together — with `cover` only the axis
   that overflows has room to move, so a tall capture pans down and a wide one to the left.
   Task #13211 — the pan runs unchanged inside the phone and the desktop frame. */
.funkce-tile__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 0% 0%;
  border-radius: 6px;
  animation: funkce-tile-pan 11.4s ease-in-out infinite;
}
.funkce-tile[data-media="phone"] .funkce-tile__image { border-radius: 15px; }
/* Task #13267 — media.focus "right-half": the strip is drawn twice the frame's width and shifted
   left by one frame, so its right half fills the frame and stays put. The frame hugs the strip. */
.funkce-tile[data-focus="right-half"] .funkce-tile__frame { aspect-ratio: auto; }
.funkce-tile[data-focus="right-half"] .funkce-tile__image {
  width: 200%;
  max-width: none;
  height: auto;
  margin-left: -100%;
  object-fit: fill;
  border-radius: 0;
  animation: none;
}
@keyframes funkce-tile-pan {
  0%, 26.3%   { object-position: 0% 0%; }
  35.1%, 61.4% { object-position: 50% 50%; }
  70.2%, 96.5% { object-position: 100% 100%; }
  100%        { object-position: 0% 0%; }
}

/* — Tile text — */
.funkce-tile__body { min-width: 0; }
body .funkce-page .funkce-tile__push {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: #1f9e94;
  margin-bottom: 6px;
}
body .funkce-page .funkce-tile__title {
  font-family: 'Alata', 'Poppins', sans-serif;
  font-size: 1.22rem;
  line-height: 1.25;
  text-wrap: balance;
  color: var(--tile-ink);
}
@media (min-width: 640px) {
  body .funkce-page .funkce-tile[data-size="L"] .funkce-tile__title { font-size: 1.55rem; }
}
body .funkce-page .funkce-tile__summary {
  margin-top: 8px;
  font-family: 'Roboto Slab', serif;
  font-size: .95rem;
  line-height: 1.6;
  color: var(--tile-text);
}
body .funkce-page .funkce-tile__youdo {
  margin-top: 10px;
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: .86rem;
  color: var(--tile-ink);
}
.funkce-tile__youdo-label {
  font-weight: 600;
  color: #3db86a;
  margin-right: 4px;
}
.funkce-tile__marks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-top: 12px;
}
.funkce-tile__roles {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: .74rem;
  color: var(--tile-muted);
}
.funkce-badge {
  padding: 3px 10px;
  border-radius: 999px;
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: .7rem;
  font-weight: 600;
}
.funkce-badge--optional { background: #ecfdf5; color: #3db86a; }
.funkce-badge--new, .funkce-badge--beta { background: #eff6ff; color: #2563eb; }

/* — Task #13212 — pinned "first week" answer band: heading left, checklist right, in every view — */
.funkce-answer {
  grid-column: 1 / -1;
  /* Task #13516 — the darker ends keep white text readable; the light --teal washed it out. */
  background: linear-gradient(135deg, #1f9e94 0%, var(--blue-dark) 100%);
  color: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 18px 40px -16px rgba(54, 132, 192, .6);
}
.funkce-answer__link {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  padding: 26px 22px;
  color: inherit;
  text-decoration: none;
}
.funkce-answer__kicker {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 14px;
}
/* Task #13516 — the generic `body .funkce-page h2` rule painted this title in dark ink and
   thin Alata on the gradient; it needs the same weight to stay white, bold and spaced. */
body .funkce-page .funkce-answer__title {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: #ffffff;
}
body .funkce-page .funkce-answer__body {
  margin-top: 12px;
  font-family: 'Roboto Slab', serif;
  font-size: .95rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, .9);
}
/* Task #13516 — CSS columns instead of grid rows: a two-line item no longer leaves a hole
   under its single-line neighbour. */
.funkce-answer__list {
  columns: 1;
  column-gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: .93rem;
  font-weight: 500;
  line-height: 1.4;
  color: #ffffff;
}
.funkce-answer__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  break-inside: avoid;
  padding: 7px 0;
}
.funkce-answer__check {
  flex: 0 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--teal-deep);
  font-size: .72rem;
  font-weight: 700;
  line-height: 1;
}
@media (min-width: 768px) {
  .funkce-answer__link {
    grid-template-columns: minmax(0, 290px) 1fr;
    gap: 32px;
    align-items: center;
    padding: 32px 36px;
  }
  .funkce-answer__list {
    columns: 2;
    padding-left: 32px;
    border-left: 1px solid rgba(255, 255, 255, .3);
  }
}

/* — "Drobnosti, které potěší" — Task #13213: the S features are never tiles. One white card
   spans the grid row after the M tiles; three columns of lines, two under 980 px, one under 640 px. */
.funkce-smalls {
  grid-column: 1 / -1;
  min-width: 0;
  background: var(--paper);
  border-radius: 1rem;
  padding: 20px 24px;
  box-shadow: 0 10px 30px -12px rgba(17, 24, 39, .18), 0 4px 10px -6px rgba(17, 24, 39, .08);
}
body .funkce-page .funkce-smalls__headline {
  font-family: 'Alata', 'Poppins', sans-serif;
  font-size: 1.15rem;
  margin-bottom: 10px;
}
.funkce-smalls__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px 26px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 640px) {
  .funkce-smalls__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 980px) {
  .funkce-smalls__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.funkce-smalls__item { border-bottom: 1px solid #f3f4f6; }
.funkce-smalls__link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 10px 0 10px 18px;
  color: inherit;
  text-decoration: none;
}
.funkce-smalls__link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 17px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
}
.funkce-smalls__title {
  font-family: 'Alata', 'Poppins', sans-serif;
  font-size: 1rem;
  color: #111827;
  transition: color .15s ease;
}
.funkce-smalls__link:hover .funkce-smalls__title { color: #1f9e94; }
.funkce-smalls__summary {
  margin-top: 2px;
  font-family: 'Roboto Slab', serif;
  font-size: .86rem;
  color: #4b5563;
}
.funkce-smalls__link .funkce-badge { margin-top: 6px; }

/* — Grouped "Vše" view — Task #13213: the heading carries the group's feature count. */
body .funkce-page .funkce-group__headline {
  font-family: 'Alata', 'Poppins', sans-serif;
  font-size: 1.6rem;
  padding-top: 18px;
  margin: 0 0 18px 0;
  color: var(--ink);
}
body .funkce-page .funkce-group__headline:first-child { padding-top: 0; }
.funkce-group__count {
  font-family: 'Roboto Slab', serif;
  font-size: .95rem;
  color: var(--muted);
}
.funkce-groups > .funkce-grid { margin-bottom: 22px; }

/* — Bottom buttons — Task #13213: secondary (teal outline), primary (solid teal), demo (dashed blue);
   radius .75rem, not a pill. */
.funkce-more {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 34px;
}
.funkce-more__all, .funkce-more__cta, .funkce-more__demo {
  padding: 12px 24px;
  border-radius: .75rem;
  border: 2px solid transparent;
  text-decoration: none;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: .95rem;
  transition: background .15s ease, box-shadow .15s ease;
}
.funkce-more__all {
  background: var(--paper);
  color: #1f9e94;
  border-color: var(--teal);
}
.funkce-more__all:hover { background: #effbfa; }
.funkce-more__cta {
  background: var(--teal);
  border-color: var(--teal);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(81, 218, 207, .4);
}
.funkce-more__cta:hover { background: var(--teal-dark); border-color: var(--teal-dark); }
.funkce-more__demo {
  background: var(--paper);
  color: var(--blue);
  border: 2px dashed var(--blue);
  font-weight: 500;
}
.funkce-more__demo:hover { background: #f0f7fc; }

/* — References (Task #13209): heading, teal quote box, three live-number cards — */
.funkce-references {
  background: var(--paper);
  padding-block: 72px;
}
.funkce-page .funkce-references .funkce-h2,
.funkce-page .funkce-comparison .funkce-h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
}
.funkce-quote {
  max-width: 760px;
  margin: 32px auto 0;
  text-align: center;
}
.funkce-quote__box {
  margin: 0;
  padding: 26px 30px;
  border-radius: .75rem;
  background: #51dacf;
  color: #0f3f3b;
  box-shadow: 0 6px 20px rgba(81, 218, 207, .45), 0 4px 10px rgba(0, 0, 0, .12);
}
body .funkce-page .funkce-quote__box p {
  font-family: 'Roboto Slab', serif;
  font-size: 1.1rem;
  line-height: 1.6;
  color: #0f3f3b;
}
body .funkce-page .funkce-quote__box p + p { margin-top: 10px; }
.funkce-quote__author {
  margin-top: 14px;
  font-family: 'Poppins', sans-serif;
  font-size: .85rem;
  color: #12524d;
}
.funkce-stats {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 760px;
  margin: 28px auto 0;
}
.funkce-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 18px;
  border-radius: .75rem;
  background: var(--paper);
  box-shadow: 0 10px 30px -12px rgba(17, 24, 39, .18), 0 4px 10px -6px rgba(17, 24, 39, .08);
  text-align: center;
}
.funkce-stat__live {
  font-family: 'Roboto Slab', serif;
  font-size: .82rem;
  color: #1f9e94;
}
.funkce-stat__value {
  font-family: 'Alata', sans-serif;
  font-weight: 400;
  font-size: 2rem;
  line-height: 1.1;
  color: #111827;
}
.funkce-stat__label {
  font-family: 'Roboto Slab', serif;
  font-size: .86rem;
  color: #4b5563;
}
@media (max-width: 979px) {
  .funkce-stats { grid-template-columns: minmax(0, 1fr); }
}

/* — Comparison table (Task #13209): subtitle, white card, dated footnote — */
.funkce-comparison {
  background: #f9fafb;
  padding-block: 72px;
}
body .funkce-page .funkce-comparison__sub {
  max-width: 640px;
  margin: 12px auto 0;
  text-align: center;
  font-size: 1.08rem;
  line-height: 1.6;
  color: #4b5563;
}
.funkce-comparison__scroll {
  max-width: 900px;
  margin: 32px auto 0;
  background: var(--paper);
  border-radius: 1rem;
  box-shadow: 0 10px 30px -12px rgba(17, 24, 39, .18), 0 4px 10px -6px rgba(17, 24, 39, .08);
  overflow-x: auto;
}
.funkce-comparison__table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-family: 'Roboto Slab', serif;
  font-size: .95rem;
  color: #4b5563;
}
.funkce-comparison__table th,
.funkce-comparison__table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f3f4f6;
  text-align: left;
  vertical-align: top;
}
.funkce-comparison__table tbody tr:last-child > * { border-bottom: none; }
.funkce-comparison__table thead th {
  font-family: 'Poppins', sans-serif;
  font-size: .8rem;
  font-weight: 600;
  color: #9ca3af;
  background: #fbfcfd;
  border-bottom: 1px solid #e5e7eb;
}
.funkce-comparison__table thead th.funkce-cmp__zub-head { color: #1f9e94; }
.funkce-cmp__feature {
  font-weight: 400;
  color: #111827;
}
.funkce-cmp__zub {
  background: #f3fcfb;
  color: #111827;
  font-weight: 600;
}
.funkce-cmp__zub.funkce-cmp__loss {
  font-weight: 400;
  color: #4b5563;
}
body .funkce-page .funkce-comparison__date {
  max-width: 900px;
  margin: 12px auto 0;
  font-size: .85rem;
  color: #9ca3af;
}

/* — Feature dialog (Task #13210: centered modal as in the design reference) — */
html.funkce-dialog--open { overflow: hidden; }
.funkce-dialog {
  --teal-text: #1f9e94;
  border: 0;
  border-radius: 1.25rem;
  padding: 0;
  width: 100%;
  max-width: min(780px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  margin: auto;
  inset: 0;
  overflow-y: auto;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .3);
}
.funkce-dialog::backdrop {
  background: rgba(17, 24, 39, .45);
  backdrop-filter: blur(2px);
}
@media (max-width: 639px) {
  .funkce-dialog {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    margin-top: auto;
    border-radius: 1.25rem 1.25rem 0 0;
  }
  .funkce-dialog[open] { animation: funkce-sheet-up .25s ease; }
}
@keyframes funkce-sheet-up { from { transform: translateY(20%); } to { transform: translateY(0); } }
.funkce-dialog__bar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--paper);
  border-bottom: 1px solid #f3f4f6;
}
.funkce-dialog__url {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: 'Poppins', sans-serif;
  font-size: .8rem;
  color: var(--muted);
}
.funkce-dialog__close {
  flex-shrink: 0;
  padding: 6px 18px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--teal-text);
  border: 2px solid var(--teal);
  font-family: 'Poppins', sans-serif;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
}
.funkce-dialog__close:hover { background: rgba(81, 218, 207, .1); }
.funkce-dialog__close:focus-visible { outline: 3px solid var(--teal-deep); outline-offset: 2px; }

/* — Window content (the dialog frame and the standalone /funkce/:slug page) — */
.funkce-window {
  --teal-text: #1f9e94;
  --text: #4b5563;
  display: grid;
  gap: 18px;
  padding: 24px 28px 30px;
  font-family: 'Poppins', system-ui, sans-serif;
  color: var(--ink);
}
.funkce-window__crumb { font-family: 'Poppins', sans-serif; font-size: .8rem; color: var(--muted); }
.funkce-window__crumb a { color: inherit; text-decoration: none; }
.funkce-window__crumb a:hover { text-decoration: underline; }
body .funkce-window h1.funkce-window__title { font-family: 'Alata', sans-serif; font-weight: 400; font-size: 1.9rem; line-height: 1.2; margin: 0; color: var(--ink); }
.funkce-window__story { font-family: 'Roboto Slab', serif; color: var(--text); line-height: 1.6; border-left: 3px solid var(--teal); padding-left: 14px; margin: 0; }
.funkce-window__push { display: block; color: var(--ink); font-weight: 500; }
.funkce-window__cols { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 28px; align-items: start; }
.funkce-window__cols--single { grid-template-columns: minmax(0, 1fr); }
.funkce-window__main { display: grid; gap: 16px; align-content: start; }
.funkce-window__block { display: grid; gap: 6px; }
body .funkce-window .funkce-window__block h2 { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--teal-text); margin: 0; }
.funkce-window__block p, .funkce-window__list { font-family: 'Roboto Slab', serif; color: var(--text); line-height: 1.6; margin: 0; }
.funkce-window__list { padding-left: 22px; }
ol.funkce-window__list { list-style: decimal; }
ul.funkce-window__list { list-style: disc; }
.funkce-window__list li + li { margin-top: 4px; }
/* Task #13516 — the answer's checklist: claim in bold, its explanation under it. */
.funkce-window__checklist { display: grid; gap: 14px; margin: 4px 0 0; padding: 0; list-style: none; }
.funkce-window__checklist li { display: flex; align-items: flex-start; gap: 12px; }
.funkce-window__check { flex: 0 0 22px; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; background: var(--teal-text); color: #ffffff; font-size: .75rem; font-weight: 700; }
.funkce-window__checklist strong { display: block; font-family: 'Poppins', sans-serif; font-weight: 600; color: #10292c; line-height: 1.4; }
.funkce-window__block .funkce-window__checklist p { margin-top: 2px; font-size: .92rem; line-height: 1.55; color: var(--text); }
.funkce-window__block .funkce-window__legal { background: var(--ground); border-radius: .75rem; padding: 12px 16px; color: var(--ink); }
.funkce-window__legal-date { display: block; margin-top: 6px; font-size: .75rem; color: var(--muted); }
.funkce-window__faq { border-top: 1px solid #f3f4f6; padding-top: 12px; }
.funkce-window__faq summary { font-family: 'Poppins', sans-serif; font-weight: 600; cursor: pointer; }
.funkce-window__faq dl { margin: 8px 0 0; }
.funkce-window__faq div + div { margin-top: 12px; }
.funkce-window__faq dt { font-family: 'Poppins', sans-serif; font-weight: 600; color: var(--ink); }
.funkce-window__faq dd { margin: 4px 0 0; font-family: 'Roboto Slab', serif; color: var(--text); line-height: 1.6; }
.funkce-window__media { position: relative; overflow: hidden; background: var(--paper); }
.funkce-window__image { display: block; width: 100%; height: auto; }
.funkce-window__gallery { grid-column: 1 / -1; border-radius: 12px; outline: 1px solid var(--line); }
.funkce-window__media--phone { justify-self: center; width: 210px; padding: 7px; border-radius: 22px; box-shadow: var(--shadow-lift); transform: rotate(-3deg); }
.funkce-window__media--phone .funkce-window__image { border-radius: 15px; }
.funkce-window__media--desktop { grid-column: 1 / -1; aspect-ratio: 16 / 10; border: 6px solid #ffffff; outline: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 25px -10px rgba(17, 24, 39, .25); }
.funkce-window__media--desktop .funkce-window__image { height: 100%; object-fit: cover; object-position: left top; }
.funkce-window__media--desktop[data-focus="right-half"] { aspect-ratio: auto; }
.funkce-window__media--desktop[data-focus="right-half"] .funkce-window__image { width: 200%; max-width: none; height: auto; margin-left: -100%; object-fit: fill; }
.funkce-window__chips { display: flex; flex-wrap: wrap; gap: 8px; }
/* Task #13356 — long related-feature titles wrap inside the card instead of overflowing it on mobile. */
.funkce-window__chips .funkce-chip { flex-shrink: 1; max-width: 100%; min-width: 0; white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
@media (max-width: 639px) {
  .funkce-window { padding: 20px 18px 28px; }
  .funkce-window__cols { grid-template-columns: minmax(0, 1fr); }
}

/* — Standalone /funkce/:slug page — the window as a card, no dialog bar — */
.funkce-standalone { background: var(--ground); padding-inline: 16px; }
.funkce-standalone__card { max-width: 780px; margin-inline: auto; background: var(--paper); border-radius: 1.25rem; box-shadow: var(--shadow); }

/* — Reduced motion — */
@media (prefers-reduced-motion: reduce) {
  .funkce-tile, .funkce-dialog, .funkce-tile__image {
    transform: none !important;
    animation: none !important;
  }
}

/* — Mobile: horizontal chip scroll — */
@media (max-width: 639px) {
  .funkce-chips { flex-wrap: nowrap; overflow-x: auto; padding-block: 4px; scrollbar-width: thin; }
  .funkce-chips .funkce-chip { flex-shrink: 0; }
}

/* — Page wrapper — */
.funkce-page main { background: transparent; }
