/* ČNKA – responzivní styl
   Písma: Literata (nadpisy), Public Sans (text) – SIL Open Font License, viz fonts/ */

@font-face { font-family: "Literata"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(../fonts/literata-latin-600-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Literata"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(../fonts/literata-latin-ext-600-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/public-sans-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/public-sans-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Public Sans"; font-style: italic; font-weight: 400; font-display: swap;
  src: url(../fonts/public-sans-latin-400-italic.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Public Sans"; font-style: italic; font-weight: 400; font-display: swap;
  src: url(../fonts/public-sans-latin-ext-400-italic.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(../fonts/public-sans-latin-600-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(../fonts/public-sans-latin-ext-600-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(../fonts/public-sans-latin-700-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(../fonts/public-sans-latin-ext-700-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

/* ---------- Barvy a rozměry ---------- */
:root {
  --night: #0F2747;        /* noční modř – hlavička, patička */
  --night-2: #17365F;
  --blue: #1D5BA6;         /* odkazy */
  --blue-dark: #123F78;
  --star: #E8B23A;         /* hvězdná zlatá – jen zvýraznění */
  --ink: #1A2230;          /* text */
  --muted: #5B6577;
  --line: #D9DEE7;
  --surface: #F2F4F8;
  --paper: #FFFFFF;
  --wrap: 70rem;
  --gap: clamp(1rem, 3vw, 2rem);
  --serif: "Literata", "Georgia", "Cambria", "Times New Roman", serif;
  --sans: "Public Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
}
img { max-width: 100%; height: auto; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gap); }

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--blue-dark); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--star); outline-offset: 2px; border-radius: 2px; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--paper); color: var(--night); padding: .5rem 1rem; font-weight: 600;
}
.skip:focus { top: 1rem; }

/* ---------- Hlavička: noční obloha ---------- */
.site-header {
  color: #fff;
  background-color: var(--night);
  background-image:
    url("../img/stars.svg"),
    radial-gradient(ellipse 60% 140% at 85% 0%, rgba(80,130,200,.35), transparent 70%),
    linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%);
  background-size: 640px 180px, auto, auto;
  background-repeat: repeat, no-repeat, no-repeat;
}
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-block: clamp(1.25rem, 4vw, 2.25rem); }
.brand { display: flex; align-items: center; gap: clamp(.75rem, 2vw, 1.1rem); color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand svg { flex: none; width: clamp(2.75rem, 7vw, 3.75rem); height: auto; }
.brand-name {
  display: block;
  font: 600 clamp(1.3rem, 3.6vw, 2.05rem)/1.15 var(--serif);
  letter-spacing: -0.005em;
}
.brand-sub { display: block; margin-top: .3rem; font-size: clamp(.85rem, 1.8vw, .98rem); color: #C9D6EA; }

.menu-toggle { display: none; }

.site-nav { border-top: 1px solid rgba(255,255,255,.14); }
.site-nav ul { list-style: none; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 0 1.75rem; }
.site-nav a {
  display: block; padding: .8rem 0 .7rem;
  color: #fff; text-decoration: none; font-weight: 600; font-size: .98rem;
  border-bottom: 3px solid transparent;
}
.site-nav a:hover { border-bottom-color: rgba(232,178,58,.55); color: #fff; }
.site-nav a[aria-current="page"] { border-bottom-color: var(--star); }

/* ---------- Rozvržení ---------- */
.layout {
  flex: 1 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 15rem;
  gap: var(--gap);
  padding-block: var(--gap) calc(var(--gap) * 2);
}
.content {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: clamp(1.25rem, 4vw, 2.75rem);
  min-width: 0;
}
.article { max-width: 46rem; }

.breadcrumb { font-size: .9rem; color: var(--muted); margin-bottom: 1rem; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a + a::before { content: "/"; display: inline-block; margin: 0 .5rem; color: var(--line); }

/* ---------- Text článků ---------- */
.article h1, .article h2, .article h3, .article h4 {
  font-family: var(--serif); font-weight: 600; line-height: 1.25; color: var(--night);
  margin: 2rem 0 .75rem;
}
.article .page-title {
  font-size: clamp(1.55rem, 3.5vw, 2.1rem);
  margin-top: 0; margin-bottom: 1.25rem;
  padding-bottom: .9rem;
  border-bottom: 1px solid var(--line);
}
.article h2 { font-size: 1.45rem; }
.article h3 { font-size: 1.2rem; }
.article h4 { font-size: 1.05rem; }
.article h6 { font: 400 .9rem/1.5 var(--sans); color: var(--muted); margin: 0 0 1rem; }
.article p { margin: 0 0 1rem; }
.article ul, .article ol { padding-left: 1.35rem; margin: 0 0 1rem; }
.article li { margin-bottom: .4rem; }
.article li > ul, .article li > ol { margin-top: .4rem; }
.article li::marker { color: var(--muted); }
.article hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
.article strong, .article b { font-weight: 700; }
.article img { display: block; margin: .75rem 0; border: 1px solid var(--line); }

/* Tabulky – na úzkém displeji se posouvají vodorovně */
.table-scroll { overflow-x: auto; margin: 0 0 1.5rem; border: 1px solid var(--line); }
.article table { border-collapse: collapse; width: 100%; min-width: 40rem; font-size: .92rem; line-height: 1.45; }
.article th, .article td { text-align: left; vertical-align: top; padding: .55rem .7rem; border-bottom: 1px solid var(--line); }
.article th { background: var(--surface); font-weight: 600; white-space: nowrap; }
.article td[colspan] { background: #E9EEF6; color: var(--night); padding-top: .7rem; }
.article td[data-label]:first-child { white-space: nowrap; }

/* Na mobilu se řádky tabulky skládají pod sebe jako karty */
@media (max-width: 44rem) {
  .table-scroll { overflow: visible; border: 0; }
  .article table { min-width: 0; }
  .article table, .article tbody, .article tr, .article td { display: block; width: 100%; }
  .article thead { display: none; }
  .article tr { border: 1px solid var(--line); border-top: 0; padding: .35rem 0; }
  .article tr:has(td[colspan]) { border: 0; padding: 0; margin-top: 1rem; }
  .article td { border: 0; padding: .2rem .8rem; }
  .article td[data-label]::before {
    content: attr(data-label); display: block;
    font-size: .8rem; color: var(--muted);
  }
  .article td[data-label]:first-child { white-space: normal; font-weight: 600; }
  .article td[colspan] { padding: .6rem .8rem; border: 1px solid var(--line); }
}

/* ---------- Postranní odkazy ---------- */
.sidebar h2 {
  font: 600 1.05rem/1.3 var(--serif); color: var(--night);
  margin: 0 0 .5rem; padding-bottom: .5rem; border-bottom: 2px solid var(--star);
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { border-bottom: 1px solid var(--line); }
.sidebar a { display: flex; justify-content: space-between; gap: .5rem; padding: .55rem 0; text-decoration: none; font-weight: 600; }
.sidebar a:hover { text-decoration: underline; }

/* ---------- Patička ---------- */
.site-footer { background: var(--night); color: #C9D6EA; font-size: .92rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; padding-block: 1.5rem; }
.site-footer p { margin: 0; }
.site-footer a { color: #fff; }

/* ---------- Mobil ---------- */
@media (max-width: 52rem) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { order: 2; }
  .content { border-inline: 0; margin-inline: calc(var(--gap) * -1); }
}

@media (max-width: 44rem) {
  .brand-row { padding-block: 1rem; }
  .brand-sub { display: none; }
  .js .menu-toggle {
    display: inline-flex; align-items: center; gap: .5rem; flex: none;
    font: 600 .95rem var(--sans); color: #fff;
    background: transparent; border: 1px solid rgba(255,255,255,.4); border-radius: 4px;
    padding: .5rem .75rem; cursor: pointer;
  }
  .menu-toggle .bars { width: 1rem; height: 2px; background: currentColor; position: relative; }
  .menu-toggle .bars::before, .menu-toggle .bars::after {
    content: ""; position: absolute; left: 0; width: 100%; height: 2px; background: currentColor;
  }
  .menu-toggle .bars::before { top: -5px; }
  .menu-toggle .bars::after { top: 5px; }
  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding-block: .25rem .75rem; }
  .site-nav a { padding: .7rem 0; border-bottom: 0; border-left: 3px solid transparent; padding-left: .75rem; }
  .site-nav a[aria-current="page"] { border-left-color: var(--star); }
  .site-nav a:hover { border-left-color: rgba(232,178,58,.55); }
}

/* ---------- Tisk ---------- */
@media print {
  body { background: #fff; font-size: 11pt; }
  .site-header { background: none; color: #000; border-bottom: 1px solid #000; }
  .brand { color: #000; }
  .brand svg, .site-nav, .menu-toggle, .sidebar, .site-footer, .breadcrumb, .skip { display: none !important; }
  .brand-sub { color: #333; }
  .layout { display: block; padding: 0; }
  .content { border: 0; padding: 0; }
  .article { max-width: none; }
  a { color: #000; }
  .table-scroll { overflow: visible; border: 0; }
  .article table { min-width: 0; }
}
