/* ==========================================================================
   Wiki — vzhled (15. 10. 2026)
   Načítá se jen na stránkách wiki, takže zbytek webu neovlivňuje.
   Barvy, písmo a hero sekci dědí ze style.css.
   ========================================================================== */

/* ---------- rozcestník: karty stránek ---------- */
.wiki-karty { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(285px, 1fr)); margin: 1.6rem 0 2.6rem; }
.wiki-karta { position: relative; display: flex; gap: 1.1rem; align-items: flex-start; padding: 1.35rem 1.4rem;
  border-radius: 16px; text-decoration: none; color: var(--text); overflow: hidden;
  background: linear-gradient(150deg, rgba(11, 23, 39, .95), rgba(6, 16, 32, .9));
  border: 1px solid rgba(255, 255, 255, .07);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.wiki-karta::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, rgba(0, 220, 235, .6), rgba(139, 92, 246, .5));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .18s ease; pointer-events: none; }
.wiki-karta:hover { transform: translateY(-3px); box-shadow: 0 20px 44px -24px rgba(0, 220, 235, .55); }
.wiki-karta:hover::before { opacity: 1; }
.wiki-karta__cislo { flex: 0 0 auto; width: 2.45rem; height: 2.45rem; display: grid; place-items: center;
  border-radius: 13px; font-size: .95rem; font-weight: 800; color: #04121f;
  background: linear-gradient(135deg, #00dceb, #8b5cf6); }
.wiki-karta h3 { margin: 0 0 .3rem; font-size: 1.06rem; line-height: 1.3; }
.wiki-karta p { margin: 0; color: var(--muted); font-size: .885rem; line-height: 1.5; }
.wiki-karta--ceka { opacity: .6; }
.wiki-karta--ceka:hover { transform: none; box-shadow: none; }
.wiki-karta--ceka:hover::before { opacity: 0; }
.wiki-karta--ceka .wiki-karta__cislo { background: rgba(255, 255, 255, .07); color: var(--muted); }
.wiki-stav { display: inline-block; margin-top: .6rem; padding: .17rem .62rem; border-radius: 999px;
  font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; }
.wiki-stav--hotovo { background: rgba(0, 220, 235, .14); color: #7ee8f2; border: 1px solid rgba(0, 220, 235, .35); }
.wiki-stav--ceka { background: rgba(255, 255, 255, .05); color: var(--muted); border: 1px solid rgba(255, 255, 255, .1); }

/* tři velké karty fází na rozcestníku */
.wiki-faze { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 1.4rem 0 2.4rem; }
.wiki-faze a { display: block; padding: 1.3rem 1.35rem; border-radius: 16px; text-decoration: none; color: var(--text);
  background: radial-gradient(120% 120% at 0% 0%, rgba(0, 220, 235, .12), transparent 55%),
              linear-gradient(150deg, rgba(11, 23, 39, .95), rgba(6, 16, 32, .9));
  border: 1px solid rgba(255, 255, 255, .07); transition: transform .18s ease, border-color .18s ease; }
.wiki-faze a:hover { transform: translateY(-3px); border-color: rgba(0, 220, 235, .45); }
.wiki-faze strong { display: block; margin-bottom: .35rem; font-size: 1.04rem; }
.wiki-faze span { color: var(--muted); font-size: .885rem; }

/* ---------- článek: rozložení s postranním obsahem ---------- */
.wiki-layout { display: grid; grid-template-columns: 258px minmax(0, 1fr); min-width: 0; gap: 2.4rem; align-items: start; margin-top: 2.4rem; }
.wiki-layout article { min-width: 0; }
.wiki-side { position: sticky; top: 1.2rem; padding: 1.1rem 1.2rem; border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .07);
  background: linear-gradient(180deg, rgba(11, 23, 39, .92), rgba(6, 16, 32, .72)); }
.wiki-side h2 { margin: 0 0 .75rem; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.wiki-side a { position: relative; display: block; padding: .35rem .5rem .35rem .6rem; border-radius: 9px;
  color: var(--muted); font-size: .875rem; line-height: 1.4; transition: background .15s ease, color .15s ease; }
.wiki-side a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.wiki-side a[aria-current="page"] { color: var(--text); font-weight: 600;
  background: linear-gradient(90deg, rgba(0, 220, 235, .16), transparent); }
.wiki-side a[aria-current="page"]::before { content: ""; position: absolute; left: 0; top: .45rem; bottom: .45rem;
  width: 3px; border-radius: 3px; background: linear-gradient(180deg, #00dceb, #8b5cf6); }
.wiki-side .pripravujeme { display: block; padding: .35rem .5rem .35rem .6rem; color: var(--muted); font-size: .875rem; opacity: .5; }
.wiki-side p { margin: .9rem 0 0; font-size: .79rem; line-height: 1.5; color: var(--muted); }
.wiki-obsah { border: 0; margin: 0; }
.wiki-obsah > summary { display: none; }
.wiki-obsah > nav { display: block; }

/* ---------- hlavička článku (datum ověření, zdroj, verze pro AI) ---------- */
.wiki-meta { display: flex; flex-wrap: wrap; gap: .55rem 1.15rem; align-items: center; margin: .2rem 0 1.9rem;
  padding: .9rem 1.15rem; border-radius: 14px; font-size: .825rem; color: var(--muted);
  background: linear-gradient(135deg, rgba(0, 220, 235, .09), rgba(139, 92, 246, .07));
  border: 1px solid rgba(0, 220, 235, .22); }
.wiki-meta a { color: var(--muted); }
.wiki-meta a:hover { color: var(--text); }
.wiki-ai { display: inline-flex; gap: .4rem; align-items: center; padding: .3rem .8rem; border-radius: 999px;
  font-size: .8rem; color: var(--text); text-decoration: none; border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .05); transition: background .15s ease, border-color .15s ease; }
.wiki-ai:hover { background: rgba(0, 220, 235, .14); border-color: rgba(0, 220, 235, .45); }

/* ---------- nadpisy v článku ---------- */
.wiki-layout article h2 { position: relative; margin: 2.7rem 0 .9rem; padding-left: 1.05rem;
  font-size: clamp(1.35rem, 2.1vw, 1.7rem); letter-spacing: -.01em; }
.wiki-layout article h2::before { content: ""; position: absolute; left: 0; top: .2em; bottom: .2em; width: 4px;
  border-radius: 4px; background: linear-gradient(180deg, #00dceb, #8b5cf6); }
.wiki-layout article h3 { margin: 1.8rem 0 .6rem; font-size: 1.12rem; }

/* ---------- tabulky ---------- */
.wiki-tabulka { width: 100%; margin: 1.5rem 0; border-collapse: separate; border-spacing: 0;
  font-size: .915rem; border: 1px solid rgba(255, 255, 255, .08); border-radius: 14px; overflow: hidden; }
.wiki-tabulka th, .wiki-tabulka td { padding: .78rem .9rem; border-bottom: 1px solid rgba(255, 255, 255, .06); text-align: left; vertical-align: top; }
.wiki-tabulka th { background: rgba(0, 220, 235, .07); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: #9fd8e6; }
.wiki-tabulka tr:last-child td { border-bottom: 0; }
.wiki-tabulka tr:nth-child(even) td { background: rgba(255, 255, 255, .018); }

/* ---------- upozornění (věci, které je potřeba nepřehlédnout) ---------- */
.wiki-upozorneni { display: flex; gap: .95rem; align-items: flex-start; margin: 1.6rem 0; padding: 1.15rem 1.3rem;
  border-radius: 14px; font-size: .95rem; line-height: 1.6;
  background: linear-gradient(135deg, rgba(0, 220, 235, .11), rgba(139, 92, 246, .08));
  border: 1px solid rgba(0, 220, 235, .32); }
.wiki-upozorneni__ikona { flex: 0 0 auto; font-size: 1.15rem; line-height: 1.35; }
.wiki-upozorneni strong { color: #7ee8f2; }

/* ---------- číslované kroky ---------- */
.wiki-layout article .kroky { display: grid; grid-template-columns: minmax(0, 1fr); gap: .8rem; margin: 1.6rem 0;
  padding: 0; list-style: none; counter-reset: krok; }
.wiki-layout article .kroky > li { position: relative; counter-increment: krok; padding: 1rem 1.15rem 1rem 3.5rem;
  border-radius: 14px; border: 1px solid rgba(255, 255, 255, .07);
  background: linear-gradient(150deg, rgba(11, 23, 39, .95), rgba(6, 16, 32, .9)); }
.wiki-layout article .kroky > li::before { content: counter(krok); position: absolute; left: 1.05rem; top: 1.05rem;
  display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%;
  background: linear-gradient(135deg, #00dceb, #8b5cf6); color: #04121e; font-weight: 800; font-size: .82rem; }
.wiki-layout article .kroky .code-block { margin-bottom: 0; }
.wiki-layout article .kroky > li > p:last-child { margin-bottom: 0; }

/* ---------- zeď značek poskytovatelů modelů ---------- */
.wiki-znacky { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); margin: 1.6rem 0 2.2rem; }
.wiki-znacka { display: flex; flex-direction: column; gap: .45rem; padding: 1.1rem 1.15rem; border-radius: 14px;
  text-decoration: none; color: var(--text);
  background: linear-gradient(150deg, rgba(11, 23, 39, .95), rgba(6, 16, 32, .9));
  border: 1px solid rgba(255, 255, 255, .07); transition: transform .18s ease, border-color .18s ease; }
.wiki-znacka:hover { transform: translateY(-3px); border-color: rgba(0, 220, 235, .45); }
.wiki-znacka .wiki-znacka__logo { display: block; width: 28px; height: 28px; color: #8fd8e8; }
.wiki-znacka__logo svg { width: 100%; height: 100%; fill: currentColor; }
.wiki-znacka strong { font-size: .97rem; }
.wiki-znacka span { color: var(--muted); font-size: .84rem; line-height: 1.45; }

/* ---------- kopírování příkazů (tlačítko přidává wiki.js) ---------- */
.kod { position: relative; max-width: 100%; min-width: 0; }
/* dlouhé adresy a klíče v příkazech se musí zalomit — jinak si vynutí šířku celého
   článku a ten přeteče displej (v aplikaci na telefonu se pak text uřízne) */
.kod > .code-block, .wiki-layout article .code-block { max-width: 100%; overflow-wrap: anywhere; }
.kod > .code-block { padding-right: 7.4rem; }
.kod-kopiruj { position: absolute; top: .55rem; right: .6rem; padding: .24rem .62rem; border-radius: 999px;
  font-size: .72rem; font-weight: 600; cursor: pointer; color: var(--muted);
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); transition: all .15s ease; }
.kod-kopiruj:hover { color: var(--text); border-color: rgba(0, 220, 235, .5); background: rgba(0, 220, 235, .14); }
.kod-kopiruj--hotovo { color: #7ee8f2; border-color: rgba(0, 220, 235, .55); background: rgba(0, 220, 235, .16); }

/* ---------- karty „kam dál" ---------- */
.wiki-dalsi { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 1rem; margin: 1.9rem 0 0; }
.wiki-dalsi a { display: block; padding: 1.15rem 1.25rem; border-radius: 16px; text-decoration: none; color: var(--text);
  background: linear-gradient(150deg, rgba(11, 23, 39, .95), rgba(6, 16, 32, .9));
  border: 1px solid rgba(255, 255, 255, .07); transition: transform .18s ease, border-color .18s ease; }
.wiki-dalsi a:hover { transform: translateY(-3px); border-color: rgba(0, 220, 235, .45); }
.wiki-dalsi strong { display: block; margin-bottom: .3rem; }
.wiki-dalsi span { color: var(--muted); font-size: .86rem; }
/* dlaždice pro stránku, která se ještě píše — nesmí vypadat jako odkaz */
.wiki-dalsi__ceka { display: flex; flex-direction: column; gap: .3rem; padding: 1.15rem 1.25rem; border-radius: 16px;
  background: rgba(11, 23, 39, .5); border: 1px dashed rgba(139, 92, 246, .35); color: var(--muted); }
.wiki-dalsi__ceka strong { color: var(--muted); }
.wiki-stav--ceka { font-style: normal; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: #c4b5fd; }

/* ---------- telefon a menší tablet ---------- */
@media (max-width: 900px) {
  .wiki-layout { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; margin-top: 1.6rem; }
  .wiki-side { position: static; }
  /* článek nikdy nesmí být širší než displej — ani když uvnitř zůstane dlouhé slovo */
  .wiki-layout > article, .wiki-layout > .wiki-side { width: 100%; max-width: 100%; min-width: 0; }
  /* Tabulky na telefonu: místo posouvání do strany se každý řádek rozloží na bloky
     s názvem sloupce nad hodnotou. Bez toho si tabulka vynutí šířku sloupce
     a celý článek přeteče — text se pak u pravého okraje uřízne (v aplikaci nečitelný). */
  .wiki-tabulka { border: 0; border-radius: 0; font-size: .9rem; }
  .wiki-tabulka, .wiki-tabulka tbody, .wiki-tabulka tr, .wiki-tabulka td { display: block; width: auto; }
  .wiki-tabulka__hlavicka { display: none; }
  .wiki-tabulka tr { margin: 0 0 .6rem; border: 1px solid rgba(255, 255, 255, .09); border-radius: 12px; overflow: hidden; }
  .wiki-tabulka tr:nth-child(even) td, .wiki-tabulka tr:nth-child(odd) td { background: transparent; }
  .wiki-tabulka td, .wiki-tabulka th { padding: .6rem .95rem; border-bottom: 1px solid rgba(255, 255, 255, .05); overflow-wrap: anywhere; }
  .wiki-tabulka tr td:last-child { border-bottom: 0; }
  .wiki-tabulka td::before { content: attr(data-nazev); display: block; margin-bottom: .12rem;
    font-size: .68rem; letter-spacing: .07em; text-transform: uppercase; color: #9fd8e6; }
  .wiki-tabulka td:not([data-nazev])::before { content: none; }
  .wiki-obsah > summary { display: block; cursor: pointer; margin: 0; font-size: .72rem; letter-spacing: .1em;
    text-transform: uppercase; color: var(--muted); }
  .wiki-obsah > summary::after { content: " ▾"; }
  .wiki-obsah[open] > summary::after { content: " ▴"; }
  .wiki-obsah:not([open]) > nav { display: none; }
  .wiki-obsah > summary::-webkit-details-marker { display: none; }
}
@media (max-width: 640px) {
  .page-content .route-hero__copy h1 { font-size: clamp(1.95rem, 9vw, 2.7rem); }
  .wiki-karta { padding: 1.15rem 1.2rem; gap: .9rem; }
  .wiki-karta__cislo { width: 2.1rem; height: 2.1rem; font-size: .85rem; }
  .wiki-meta { font-size: .78rem; padding: .8rem .95rem; }
}
