@font-face {
  font-family: 'Plus Jakarta Sans Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(../assets/plus-jakarta-sans-latin-ext-wght-normal-DmpS2jIq.woff2) format('woff2-variations');
  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: 'Plus Jakarta Sans Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(../assets/plus-jakarta-sans-latin-wght-normal-eXO_dkmS.woff2) format('woff2-variations');
  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;
}
:root {
  font-family: 'Plus Jakarta Sans Variable', system-ui, sans-serif;
  color-scheme: light;
  --ink: #11152a;
  --muted: #545a75;
  --panel: #fff;
  --canvas: #f3f5fb;
  --border: #d3d9ea;
  --coral: #d9431f;
  --coral-ink: #a32d0c;
  --coral-soft: #ffeae3;
  --blue: #2449e0;
  --blue-ink: #1c3bbd;
  --blue-soft: #e6ebff;
  --hero: #2449e0;
  --hero-muted: #dbe3ff;
  --border-strong: #b7bed6;
  --hover-veil: #11152a0a;
  --edge: #11152a0d;
}

/* Tmavý vzhled: podle zařízení, nebo podle volby v aplikaci (data-theme z media/vzhled.js) */
:root[data-theme='dark'] {
  color-scheme: dark;
  --ink: #f0f2fb;
  --muted: #a6adc9;
  --panel: #161a2e;
  --canvas: #0c0e1b;
  --border: #3a4268;
  --border-strong: #4a5279;
  --coral: #ff8465;
  --coral-ink: #ffbfae;
  --coral-soft: #381b19;
  --blue: #93a6ff;
  --blue-ink: #c8d1ff;
  --blue-soft: #1c2350;
  --hero: #2a45c4;
  --hover-veil: #ffffff14;
  --edge: #ffffff0d;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --ink: #f0f2fb;
    --muted: #a6adc9;
    --panel: #161a2e;
    --canvas: #0c0e1b;
    --border: #3a4268;
    --border-strong: #4a5279;
    --coral: #ff8465;
    --coral-ink: #ffbfae;
    --coral-soft: #381b19;
    --blue: #93a6ff;
    --blue-ink: #c8d1ff;
    --blue-soft: #1c2350;
    --hero: #2a45c4;
    --hover-veil: #ffffff14;
    --edge: #ffffff0d;
  }
}

*, *::before, *::after { box-sizing: border-box; }
body {
  --accent: var(--blue-ink);
  --accent-soft: var(--blue-soft);
  margin: 0;
  padding: 0 clamp(1.25rem, 2.5vw, 2rem) 3rem;
  background: var(--canvas);
  color: var(--ink);
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.subject-cestina {
  --accent: var(--coral-ink);
  --accent-soft: var(--coral-soft);
}
/* Stejná šířka jako aplikace, aby hlavička při přechodu neposkakovala */
body > header, body > nav, main { max-width: calc(1200px - 2 * clamp(1.25rem, 2.5vw, 2rem)); margin-inline: auto; }
.card :is(p, ol, ul, blockquote, .table-wrap) { max-width: 75ch; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: .15em; }
:focus-visible { outline: 3px solid var(--focus, var(--blue)); outline-offset: 4px; }
.skip-link {
  position: fixed;
  inset: 1rem auto auto 1rem;
  z-index: 1;
  padding: .65rem 1rem;
  background: var(--panel);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }
.site-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 4.5rem;
  padding-block: 1.1rem .5rem;
  margin-block-end: 1.1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 44px;
  color: var(--ink);
  font-size: 1.42rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.045em;
  text-decoration: none;
  white-space: nowrap;
}
.brand-dots { display: block; flex: none; width: 1.5rem; height: auto; margin-top: -.12rem; fill: var(--blue); overflow: visible; }
.brand-dots .brand-dot-coral { fill: var(--coral); }
.site-nav { display: flex; gap: .25rem; margin-left: .5rem; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  border-radius: 1.4rem;
  color: var(--muted);
  font-size: .95rem;
  font-weight: 650;
  text-decoration: none;
}
@media (hover: hover) { .site-nav a:hover { color: var(--ink); background: var(--hover-veil); } }
.header-cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-left: auto;
  padding: 0 1.1rem;
  border-radius: 1.4rem;
  background: var(--panel);
  box-shadow: 0 0 0 1px var(--edge), 0 1px 2px #11152a08;
  color: var(--ink);
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
@media (hover: hover) { .header-cta:hover { box-shadow: 0 0 0 2px var(--border-strong); } }
@media (max-width: 47.999rem) {
  .site-nav { display: none; }
  .site-header { gap: 1rem; min-height: 3.75rem; padding-block: .75rem .25rem; margin-block-end: .6rem; }
}
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 .5rem;
  margin: 0 0 .8rem;
  padding: 0;
  list-style: none;
  font-size: .875rem;
}
.breadcrumbs li + li { display: flex; align-items: center; gap: .5rem; }
.breadcrumbs li + li::before { content: ''; width: .28rem; height: .28rem; border-radius: 50%; background: var(--border); flex: none; }
.breadcrumbs a { display: inline-block; padding-block: .35rem; color: var(--muted); font-weight: 600; text-decoration: none; }
.breadcrumbs a:hover { color: var(--ink); text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--ink); font-weight: 650; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
main.stack { gap: clamp(1.5rem, 4vw, 2.5rem); }
.hero {
  justify-items: start;
  --focus: #fff;
  background: var(--hero);
  color: #fff;
  border-radius: 2rem;
  padding: clamp(1.4rem, 5vw, 3.25rem);
}
.hero p { color: var(--hero-muted); }
.hero a:not(.cta) { color: #fff; }
h1, h2, h3, p, blockquote { margin: 0; }
h1, h2, h3 { line-height: 1.18; letter-spacing: -.025em; }
h1 { font-size: clamp(1.9rem, 5vw, 3.2rem); font-weight: 800; letter-spacing: -.045em; }
h2 { font-size: clamp(1.25rem, 4vw, 1.55rem); }
h3 { font-size: 1.12rem; }
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  max-width: 100%;
  padding: .65rem 1.3rem;
  border-radius: 1.6rem;
  background: #2449e0;
  color: #fff;
  font-weight: 750;
  text-align: center;
  text-decoration: none;
}
.hero .cta { background: #fff; color: #1c3bbd; }
@media (hover: hover) { .cta:hover { background: #1a39bb; } .hero .cta:hover { background: #e6ebff; } }
.reading-page .hero p { max-width: 68ch; }
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-self: center;
  align-items: start;
  gap: clamp(1.9rem, 4vw, 3rem);
  width: min(100%, 68ch);
}
.article-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.65rem, 3vw, 2.45rem);
  min-width: 0;
}
.article-toc {
  padding: clamp(.85rem, 2vw, 1.25rem);
  border: 1px solid var(--border);
  border-radius: 1.15rem;
  background: var(--panel);
}
.article-toc h2 { margin: 0 .45rem .45rem; font-size: 1rem; }
.article-toc ul, .article-links { margin: 0; padding: 0; list-style: none; }
.article-toc ul { display: grid; gap: .1rem; }
.article-toc a {
  display: block;
  padding: .5rem .45rem;
  border-radius: .45rem;
  color: var(--ink);
  font-size: .9rem;
  line-height: 1.45;
  text-decoration: none;
}
.article-toc a:hover { background: var(--accent-soft); color: var(--accent); text-decoration: underline; }
.article-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .85rem;
}
.article-section + .article-section {
  padding-block-start: clamp(1.4rem, 3vw, 2rem);
  border-block-start: 1px solid var(--border);
}
.article-section h2 { font-size: clamp(1.35rem, 2.5vw, 1.9rem); }
.article-copy h2[id] { scroll-margin-block-start: 1.25rem; }
.article-copy h2:target { color: var(--accent); }
.article-items { margin: 0; padding-inline-start: 1.4rem; }
.article-items li + li { margin-block-start: .55rem; }
.article-links {
  display: grid;
  gap: .3rem;
  padding-inline-start: .9rem;
  border-inline-start: 2px solid var(--border);
}
.article-links a { font-weight: 650; }
.article-newsletter {
  justify-items: start;
  gap: .8rem;
  padding: clamp(1.05rem, 3.75vw, 2rem);
  border-radius: 1.35rem;
  background: var(--accent-soft);
}
@media (min-width: 34rem) and (max-width: 55.999rem) {
  .article-toc ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 56rem) {
  .article-layout { grid-template-columns: minmax(0, 68ch) minmax(13rem, 17rem); width: 100%; }
  .article-copy { grid-area: 1 / 1; }
  .article-toc { grid-area: 1 / 2; }
}
@media (min-width: 56rem) and (min-height: 37rem) {
  .article-toc { position: sticky; inset-block-start: 1.25rem; }
}
.card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .65rem;
  padding: clamp(1.1rem, 3vw, 1.75rem);
  border-radius: 1.5rem;
  background: var(--panel);
}
.card ul, .card ol { margin: 0; padding-inline-start: 1.6rem; }
.card li + li { margin-top: .25rem; }
.overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.overview .card { position: relative; align-content: start; box-shadow: 0 0 0 1px var(--edge); }
.overview h2 a { color: var(--ink); text-decoration: none; }
.overview h2 a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
@media (hover: hover) { .overview .card:hover { box-shadow: 0 0 0 2px var(--border-strong); } .overview .card:hover h2 a { color: var(--accent); } }
.overview .card:focus-within { outline: 3px solid var(--blue); outline-offset: 3px; }
.overview h2 a:focus-visible { outline: none; }
.overview p { color: var(--muted); }
.prompt, blockquote { white-space: pre-line; }
blockquote { padding-inline-start: 1rem; border-inline-start: 3px solid var(--border); }
details { border-top: 1px solid var(--border); }
summary {
  padding-block: .65rem;
  cursor: pointer;
  color: var(--accent);
  font-weight: 700;
}
details > :not(summary) { margin-block: .5rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
caption { text-align: start; font-weight: 700; }
th, td { padding: .25rem .5rem; border: 1px solid var(--border); text-align: start; }
.math-figure { margin: 0; }
.math-figure figcaption { margin-bottom: .4rem; font-size: .93rem; font-weight: 700; }
.figure-svg {
  display: block;
  width: min(100%, 28rem);
  height: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: .9rem;
}
.figure-svg text { fill: #171717; font: 700 15px system-ui, sans-serif; }
.figure-svg .figure-label { paint-order: stroke; stroke: white; stroke-width: 4; stroke-linejoin: round; }
.figure-line { fill: none; stroke: #1c3bbd; stroke-width: 2; }
.figure-guide { fill: none; stroke: #8f8c84; stroke-width: 1; }
.figure-filled { fill: #c5d1ff; }
.figure-cell-empty { fill: white; }
.figure-dot { fill: #1c3bbd; }
/* Zlomky jako v aplikaci */
math { math-style: normal; font-weight: inherit; }
math :is(mn, mtext) { font-family: inherit; }
mfrac { font-size: .88em; padding-inline: .08em; }
mfrac > mrow { math-depth: 0; math-style: normal; }
:is(msup, msub) > mrow:last-child mfrac { font-size: .62em; }
:is(sup, sub) > math { font-size: .82em; }

.exam-schedule {
  width: 100%;
  table-layout: fixed;
  border: 1px solid var(--border);
  border-spacing: 0;
  border-collapse: separate;
  border-radius: 1rem;
  overflow: hidden;
  background: var(--panel);
  color: var(--ink);
  font-size: .94rem;
  line-height: 1.4;
}
.exam-schedule th, .exam-schedule td {
  padding: .8rem clamp(.65rem, 2vw, 1rem);
  border: 0;
  border-bottom: 1px solid var(--border);
  text-align: start;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.exam-schedule th { width: 59%; font-weight: 720; }
.exam-schedule th + th { width: 41%; }
.exam-schedule thead th { background: var(--blue-soft); color: var(--blue-ink); }
.exam-schedule tbody tr:last-child > * { border-bottom: 0; }
.exam-schedule tbody th span { display: block; margin-top: .13rem; color: var(--muted); font-size: .86em; font-weight: 500; }
.exam-schedule td { font-weight: 650; font-variant-numeric: tabular-nums; }

@media (max-width: 430px) {
  .exam-schedule { font-size: .86rem; }
  .exam-schedule tbody th span { font-size: .8rem; }
  .exam-schedule th, .exam-schedule td { padding-block: .65rem; }
}
