/* Farby a písma zhodné s kurzykomunikacie.sk */
:root {
  --ink: #1F1B3A;
  --ink-soft: #4A4566;
  --cream: #FFF8EF;
  --tint: #FCEEDF;
  --white: #FFFFFF;
  --coral: #FF6B57;
  --coral-dark: #BA3D2A;
  --sun: #FFC23D;
  --mint: #3CC6A8;
  --violet: #8B7CF6;
  --line: #EADFD2;
  --radius: 18px;
  --font-head: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font: 17px/1.6 var(--font-body); color: var(--ink); background: var(--cream); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); font-weight: 800; }
h2 { font-size: 1.35rem; font-weight: 800; }
h3 { font-size: 1.05rem; font-weight: 700; margin-top: 1.2em; }
p { margin: 0 0 1em; }
a { color: var(--coral-dark); }
small { font-weight: 400; color: var(--ink-soft); }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
.container { width: min(1040px, 100% - 32px); margin-inline: auto; }
body { min-height: 100vh; display: flex; flex-direction: column; }
main.container { padding: 32px 0 64px; flex: 1; }
main.narrow { width: min(480px, 100% - 32px); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }
.muted { color: var(--ink-soft); }
.small { font-size: .92rem; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.big { font: 800 3.4rem/1 var(--font-head); margin-bottom: .2em; }

/* Hlavička */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 248, 239, .9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding: 12px 0; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 500 1.1rem/1.15 var(--font-head); }
.logo svg { width: 36px; height: 36px; color: var(--coral); flex: none; }
.logo b { font-weight: 800; }
.logo small { display: block; font: 700 .68rem/1.4 var(--font-body); text-transform: uppercase; letter-spacing: .1em; color: var(--coral-dark); }
.nav { display: flex; align-items: center; gap: 6px 20px; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; padding: 4px 0; border-bottom: 3px solid transparent; }
.nav a:hover, .nav a.on { border-color: var(--sun); }
.nav a.on { font-weight: 700; }
.site-footer { background: var(--ink); color: #CFCBE6; padding: 32px 0; font-size: .92rem; }
.site-footer .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; }
.site-footer a { color: inherit; }
.site-footer a:hover { color: var(--sun); }
.logo.light { color: #fff; }
.logo.light svg { color: var(--sun); }

/* Tlačidlá */
.btn {
  display: inline-flex; align-items: center; justify-content: center; font: 700 1rem/1 var(--font-body); padding: 13px 22px;
  border: 2px solid var(--ink); border-radius: 999px; background: var(--coral); color: var(--ink); text-decoration: none; cursor: pointer;
  box-shadow: 0 4px 0 var(--ink); transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn-ghost { background: var(--white); }
.btn-small { padding: 9px 16px; font-size: .9rem; box-shadow: 0 3px 0 var(--ink); }
.btn-block { width: 100%; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--coral-dark); text-decoration: underline; cursor: pointer; }
.nav button.link { color: var(--ink-soft); }
.danger { color: var(--coral-dark); }
.actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 18px 0; }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }

/* Karty, zoznamy */
.card { background: var(--white); border: 2px solid var(--ink); border-radius: var(--radius); padding: 24px; margin: 0 0 22px; box-shadow: 0 4px 0 var(--ink); }
.card > :last-child { margin-bottom: 0; }
details.card summary { font-weight: 700; cursor: pointer; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; align-items: start; }
.list { list-style: none; margin: 0 0 16px; padding: 0; }
.list.numbered { counter-reset: n; }
.list li { display: flex; align-items: center; justify-content: space-between; gap: 6px 14px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list.numbered li { counter-increment: n; justify-content: flex-start; }
.list.numbered li::before { content: counter(n); flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--tint); font-weight: 700; font-size: .85rem; }
.list.numbered li > :last-child:not(:first-child) { margin-left: auto; }
.crumbs { font-size: .9rem; color: var(--ink-soft); margin-bottom: 8px; }
.prose { overflow-wrap: anywhere; }
.prose ul { padding-left: 1.2em; }
.feedback { background: var(--tint); border-radius: 12px; padding: 14px 16px; }
.feedback > :last-child { margin-bottom: 0; }

.flash { background: #D3F4EC; border: 2px solid var(--ink); border-radius: 12px; padding: 10px 14px; font-weight: 500; }
.flash-err { background: #FFE3DC; }
.tag { display: inline-block; font: 700 .76rem/1 var(--font-body); padding: 6px 10px; border-radius: 999px; background: var(--tint); color: var(--ink); white-space: nowrap; vertical-align: middle; }
.tag-ok { background: #D3F4EC; }
.tag-warn { background: #FFE9B8; }
.tag-course { background: #E4DFFF; }
.tag-exam { background: #FFE3DC; }

/* Čísla a priebeh */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat { background: var(--white); border: 2px solid var(--ink); border-radius: var(--radius); padding: 16px 18px; }
.stat b { display: block; font: 800 2rem/1.1 var(--font-head); }
.stat span { color: var(--ink-soft); font-size: .9rem; }
.bar { height: 12px; background: var(--tint); border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; margin-bottom: 26px; }
.bar i { display: block; height: 100%; background: var(--mint); }

/* Moduly */
.modules { list-style: none; margin: 0; padding: 0; }
.module { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; }
.module h2 { margin-bottom: 4px; }
.module h2 a { color: var(--ink); }
.module p { margin-bottom: 8px; }
.module .bar { margin: 0; max-width: 360px; }
.module .week { flex: none; width: 96px; font: 700 .8rem/1.2 var(--font-body); text-transform: uppercase; letter-spacing: .08em; color: var(--coral-dark); }
.module.locked { background: var(--tint); box-shadow: none; border-style: dashed; color: var(--ink-soft); }
.event { display: flex; align-items: center; gap: 16px 24px; flex-wrap: wrap; }
.event h2 { margin: 8px 0 4px; }

/* Video */
.video { display: block; width: 100%; aspect-ratio: 16 / 9; background: var(--ink); border: 2px solid var(--ink); border-radius: var(--radius); margin-bottom: 22px; overflow: hidden; }
.video iframe { width: 100%; height: 100%; border: 0; }

/* Formuláre */
.field { margin-bottom: 16px; min-width: 0; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
label { font-weight: 700; font-size: .93rem; }
.field > label { display: block; margin-bottom: 6px; }
input:not([type=radio], [type=checkbox], [type=file]), select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--white); border: 2px solid var(--ink); border-radius: 12px; padding: 10px 12px;
}
input:disabled { background: var(--tint); color: var(--ink-soft); }
input.short { width: 110px; }
input[type=radio], input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--coral-dark); vertical-align: -3px; }
textarea { resize: vertical; }
.check { display: block; font-weight: 500; }
form.inline, .inline { display: flex; align-items: flex-end; gap: 12px 16px; flex-wrap: wrap; }
.inline .field { margin-bottom: 0; }
.inline select { width: auto; max-width: 100%; }
fieldset.question { min-width: 0; }
.question legend { float: left; width: 100%; font-weight: 700; margin-bottom: 12px; padding: 0; }
.option { display: flex; gap: 10px; align-items: flex-start; clear: both; font-weight: 400; font-size: 1rem; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.option:hover { background: var(--tint); }
.option input { flex: none; margin-top: 4px; }
.radios label { font-weight: 500; margin-right: 14px; white-space: nowrap; }
.questions { padding-left: 1.3em; }
.questions > li { margin-bottom: 14px; }
.questions ul { margin: 4px 0; color: var(--ink-soft); }
.questions .right { color: var(--ink); font-weight: 700; }

/* Tabuľky */
.table-wrap { overflow-x: auto; background: var(--white); border: 2px solid var(--ink); border-radius: var(--radius); margin-bottom: 22px; }
.card .table-wrap { border-width: 1px; border-color: var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); background: var(--tint); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.me td { background: #FFF3D1; font-weight: 700; }
tr.off td { color: var(--ink-soft); }
.rank { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-weight: 700; background: var(--tint); }
.rank-1 { background: var(--sun); }
.rank-2 { background: #DAD6E8; }
.rank-3 { background: #F2B892; }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.tabs a { padding: 8px 16px; border: 2px solid var(--ink); border-radius: 999px; background: var(--white); color: var(--ink); text-decoration: none; font-weight: 700; font-size: .92rem; }
.tabs a.on { background: var(--sun); }
