/* Kyberrádce – vizuální identita: lahvově zelená, měď, papír */
:root {
  --zelena: #1f4d3a;
  --zelena-svetla: #2d6a51;
  --med: #a35a17;
  --papir: #faf8f3;
  --karta: #ffffff;
  --text: #1c1c1c;
  --text-tlumeny: #4a4a45;
  --okraj: #d9d3c4;
  --odkaz: #1f4d3a;
  --stin: 0 1px 3px rgba(0, 0, 0, .08);
  --radius: 6px;
  --pismo: Garamond, "EB Garamond", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --zelena: #7cc4a2;
    --zelena-svetla: #9ad6b9;
    --med: #e0995a;
    --papir: #121a16;
    --karta: #1b2620;
    --text: #ece8df;
    --text-tlumeny: #c2bdb2;
    --okraj: #34443b;
    --odkaz: #9ad6b9;
    --stin: none;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--papir);
  color: var(--text);
  font-family: var(--pismo);
  font-size: 1.1875rem;
  line-height: 1.6;
}
main, .site-header, .breadcrumbs { max-width: 72rem; margin-inline: auto; padding-inline: 16px; }
main { padding-block: 1.5rem 3rem; }
img { max-width: 100%; height: auto; }

a { color: var(--odkaz); text-underline-offset: .15em; }
a:hover { color: var(--med); }
:focus-visible { outline: 3px solid var(--med); outline-offset: 2px; }

h1, h2, h3, h4 { line-height: 1.2; color: var(--zelena); font-weight: 700; margin: 1.6em 0 .5em; }
h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 2.9rem); margin-top: .4em; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }
p, ul, ol { margin: 0 0 1em; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--zelena); color: var(--papir); padding: .5rem 1rem; z-index: 10; }
.skip-link:focus { left: 16px; }

/* Hlavička */
.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem;
  padding-block: 1rem; border-bottom: 1px solid var(--okraj);
}
.logo { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--zelena); }
.logo-text { font-size: 1.6rem; font-weight: 700; letter-spacing: .01em; }
.site-header nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.site-header nav a { text-decoration: none; font-size: 1.05rem; padding: .25rem 0; border-bottom: 2px solid transparent; }
.site-header nav a:hover { border-bottom-color: var(--med); }

.breadcrumbs { font-size: .95rem; color: var(--text-tlumeny); padding-top: .75rem; }
.breadcrumbs ol, .breadcrumbs ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.breadcrumbs li + li::before { content: "›"; margin-right: .4rem; }
.breadcrumbs a { color: var(--text-tlumeny); }

/* Úvod */
.hero { padding: 2.5rem 0 1.5rem; max-width: 48rem; }
.hero h1 { margin-top: 0; }
.hero p { font-size: 1.25rem; color: var(--text-tlumeny); }
.btn, .btn-secondary, .download a {
  display: inline-block; padding: .6rem 1.2rem; border-radius: var(--radius); text-decoration: none;
  font-weight: 700; border: 2px solid var(--zelena); margin: .25rem .5rem .25rem 0;
}
.btn, .download a { background: var(--zelena); color: var(--papir); }
.btn:hover, .download a:hover { background: var(--zelena-svetla); color: var(--papir); }
.btn-secondary { color: var(--zelena); background: transparent; }

/* Karty */
.grid, .rezhim { list-style: none; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); }
.rezhim { margin: 1rem 0 2rem; }
.card, .grid > li {
  background: var(--karta); border: 1px solid var(--okraj); border-top: 4px solid var(--zelena);
  border-radius: var(--radius); padding: 1rem 1.25rem; box-shadow: var(--stin);
}
.card h2, .card h3 { margin: 0 0 .4rem; font-size: 1.25rem; }
.card a { text-decoration: none; }
.card a:hover h3, .card h2 a:hover, .card h3 a:hover { text-decoration: underline; }
.card p { color: var(--text-tlumeny); margin-bottom: .6rem; }

.tag {
  display: inline-block; font-size: .85rem; padding: .1rem .55rem; border-radius: 999px;
  border: 1px solid var(--med); color: var(--med); background: transparent;
}
.perex { font-size: 1.25rem; color: var(--text-tlumeny); max-width: 46rem; }

/* Článek vzoru */
main > p, main > ul, main > ol, main > h2, main > h3, main > h4 { max-width: 46rem; }
.download { margin: 1.25rem 0 2rem; }
.note {
  max-width: 46rem; margin: 2.5rem 0 0; padding: 1rem 1.25rem; border-left: 4px solid var(--med);
  background: var(--karta); border-radius: 0 var(--radius) var(--radius) 0;
}
table { border-collapse: collapse; width: 100%; margin: 1rem 0 1.5rem; font-size: 1rem; display: block; overflow-x: auto; }
th, td { border: 1px solid var(--okraj); padding: .45rem .65rem; text-align: left; vertical-align: top; }
th { background: var(--karta); color: var(--zelena); }

/* Patička */
.site-footer {
  border-top: 1px solid var(--okraj); background: var(--karta); font-size: 1rem;
  padding: 2rem max(16px, calc((100% - 72rem) / 2 + 16px));
  display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}
.site-footer .col h2, .site-footer .col h3 { font-size: 1.1rem; margin-top: 0; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer li { margin-bottom: .35rem; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

@media print {
  .site-header, .breadcrumbs, .site-footer, .download, .note, .skip-link { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  h1, h2, h3, h4, a { color: #000; }
  table { display: table; }
}
