/* zaciname-s-agenty.pprojects.cz  |  jeden sdílený styl pro všechny stránky
   Autor: Pavel Horák ve spolupráci s Claude (Anthropic) */

:root {
  --paper: #fafaf7;
  --panel: #ffffff;
  --ink: #1f2421;
  --muted: #5c635e;
  --line: #e3e5e0;
  --green: #2d6a4f;
  --green-ink: #1f4d38;
  --green-tint: #e8f1ec;
  --amber-ink: #7a4f00;
  --amber-tint: #fff4d6;
  --red-ink: #8c2f2f;
  --red-tint: #fbe9e9;
  --radius: 10px;
  --measure: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}

/* ---------- Lišta ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.top-in {
  max-width: var(--measure); margin: 0 auto; padding: 0.6rem 1rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { display: flex; align-items: center; gap: 0.55rem; text-decoration: none; color: var(--ink); font-weight: 600; }
.brand .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--green); flex: none; }
.brand small { font-weight: 400; color: var(--muted); }
.menu { display: flex; gap: 0.2rem; flex-wrap: wrap; justify-content: flex-end; }
.menu a { color: var(--muted); text-decoration: none; padding: 0.35rem 0.55rem; border-radius: 6px; font-size: 0.95rem; }
.menu a:hover, .menu a[aria-current="page"] { color: var(--green-ink); background: var(--green-tint); }

/* ---------- Obsah ---------- */
main { max-width: var(--measure); margin: 0 auto; padding: 2rem 2.5rem 4rem; }

h1 { font-size: clamp(1.7rem, 4.5vw, 2.4rem); line-height: 1.15; margin: 0.4rem 0 0.8rem; letter-spacing: -0.01em; }
h2 { font-size: 1.45rem; line-height: 1.25; margin: 2.6rem 0 0.7rem; }
h3 { font-size: 1.12rem; margin: 1.8rem 0 0.4rem; }
p { margin: 0 0 1rem; }
.lead { font-size: 1.2rem; color: var(--muted); margin-bottom: 1.6rem; }
a { color: var(--green-ink); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--green); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; border-radius: 4px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
code, kbd { font-family: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace; font-size: 0.92em; background: var(--panel); border: 1px solid var(--line); padding: 0.05em 0.35em; border-radius: 4px; }
pre { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.9rem 1rem; overflow-x: auto; font-size: 0.92rem; }
pre code { border: 0; padding: 0; background: none; }
strong { font-weight: 600; }
figure { margin: 1rem 0; }
figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 0.4rem; }
img { max-width: 100%; height: auto; }

/* ---------- Tlačítka ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.4rem 0; }
.btn {
  display: inline-block; padding: 0.7rem 1.1rem; border-radius: 8px; text-decoration: none;
  font-weight: 600; border: 1px solid var(--green); color: var(--green-ink); background: var(--panel);
}
.btn.primary { background: var(--green); color: #fff; }
.btn.primary:hover { background: var(--green-ink); color: #fff; }
.btn:hover { background: var(--green-tint); }

/* ---------- Tři věci na úvod ---------- */
.trio { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.2rem; margin: 1.6rem 0; }
.trio div { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.trio h3 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.trio p { margin: 0; color: var(--muted); font-size: 0.97rem; }

/* ---------- Důkazy a podrobnosti (sbalené) ---------- */
details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); margin: 1rem 0; }
details > summary {
  cursor: pointer; list-style: none; padding: 0.85rem 1rem; font-weight: 600; color: var(--green-ink);
  display: flex; align-items: center; gap: 0.6rem;
}
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "+"; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--green-tint); color: var(--green-ink); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
details[open] > summary::before { content: "\2212"; }
details > .body { padding: 0 1rem 1rem; }
details.proof > summary { color: var(--muted); font-weight: 500; }
details.proof > summary::before { background: var(--line); color: var(--ink); }
details.proof figure { margin: 0.6rem 0 0; }
details.proof img { border: 1px solid var(--line); border-radius: 6px; cursor: zoom-in; }

/* ---------- Upozornění ---------- */
.note { border-left: 4px solid var(--green); background: var(--green-tint); padding: 0.75rem 1rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.2rem 0; }
.note.warn { border-color: #d19a00; background: var(--amber-tint); color: var(--amber-ink); }
.note.stop { border-color: #c44; background: var(--red-tint); color: var(--red-ink); }
.note p:last-child { margin-bottom: 0; }

/* ---------- Kroky ---------- */
.steps { list-style: none; padding: 0; margin: 1.5rem 0; counter-reset: step; }
.steps > li { position: relative; padding-left: 3rem; margin-bottom: 1.8rem; }
.steps > li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0.1rem; width: 2.1rem; height: 2.1rem; border-radius: 50%;
  background: var(--green); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.steps h3 { margin: 0.2rem 0 0.4rem; }
.steps .see { color: var(--muted); font-size: 0.95rem; }

/* ---------- Tabulky ---------- */
.tablewrap { overflow-x: auto; margin: 1rem 0; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; background: var(--panel); }
th, td { text-align: left; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--green-tint); color: var(--green-ink); font-weight: 600; }

/* ---------- Ano / Ne seznam ---------- */
.yesno { list-style: none; padding: 0; }
.yesno li { padding-left: 1.7rem; position: relative; margin: 0.35rem 0; }
.yesno li::before { position: absolute; left: 0; font-weight: 700; }
.yesno li.yes::before { content: "\2713"; color: var(--green); }
.yesno li.no::before { content: "\00d7"; color: var(--red-ink); }

/* ---------- Patička ---------- */
footer { border-top: 1px solid var(--line); background: var(--panel); margin-top: 3rem; }
footer .in { max-width: var(--measure); margin: 0 auto; padding: 1.5rem 1rem 2rem; color: var(--muted); font-size: 0.92rem; display: grid; gap: 0.5rem; }
footer a { color: var(--muted); }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; background: rgba(20, 24, 22, 0.88); display: none; align-items: center; justify-content: center; z-index: 50; padding: 1rem; }
.lightbox.on { display: flex; }
.lightbox img { max-width: 100%; max-height: 92vh; border-radius: 6px; background: #fff; }
.lightbox button { position: absolute; top: 0.8rem; right: 0.8rem; font: inherit; background: #fff; border: 0; border-radius: 6px; padding: 0.4rem 0.8rem; cursor: pointer; }

/* ---------- Drobnosti ---------- */
.muted { color: var(--muted); }
.small { font-size: 0.92rem; }
.pill { display: inline-block; padding: 0.1rem 0.55rem; border-radius: 999px; background: var(--green-tint); color: var(--green-ink); font-size: 0.85rem; font-weight: 600; }
.next { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ---------- Sendvičové menu (jen mobil) ---------- */
.burger { display: none; font: inherit; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 0.45rem 0.7rem; cursor: pointer; color: var(--ink); align-items: center; gap: 0.5rem; }
.burger .bars { display: inline-block; width: 18px; height: 2px; background: var(--ink); position: relative; }
.burger .bars::before, .burger .bars::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--ink); }
.burger .bars::before { top: -6px; } .burger .bars::after { top: 6px; }

@media (max-width: 760px) {
  main { padding: 1.5rem 1rem 3rem; }
  .burger { display: inline-flex; }
  .menu { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--panel); border-bottom: 1px solid var(--line); flex-direction: column; gap: 0; padding: 0.4rem 0.6rem 0.8rem; box-shadow: 0 8px 20px rgba(0,0,0,0.08); }
  .menu.open { display: flex; }
  .menu a { padding: 0.7rem 0.6rem; font-size: 1.05rem; border-radius: 6px; }
  .top { position: sticky; }
  .top-in { position: relative; }
  h2 { margin-top: 2.1rem; }
}

/* ---------- Patička: seznam stránek ---------- */
footer .sitemap { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; padding: 0; margin: 0.2rem 0 0.6rem; list-style: none; }
