:root {
  color-scheme: light;
  --bg: #ffffff;
  --band: #f5f6f7;
  --fg: #16181b;
  --fg-2: #4b5058;
  --muted: #767b83;
  --line: #e1e3e6;
  --accent: #0065bd;
  --accent-ink: #ffffff;
  --hl: #eef4fb;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #e34948;
  --s-other: #a3a7ad;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #141517; --band: #1b1d20; --fg: #eceef0; --fg-2: #b6bac0; --muted: #8b9098;
    --line: #2c2f34; --accent: #4a9be8; --accent-ink: #0b0c0d; --hl: #1a2633;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
    --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767; --s-other: #6b7078;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141517; --band: #1b1d20; --fg: #eceef0; --fg-2: #b6bac0; --muted: #8b9098;
  --line: #2c2f34; --accent: #4a9be8; --accent-ink: #0b0c0d; --hl: #1a2633;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
  --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767; --s-other: #6b7078;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.55 "IBM Plex Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h2 { font-size: 24px; }
h3 { font-size: 16px; margin-bottom: 6px; }
p { margin: 0 0 10px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; gap: 24px; height: 56px; }
.brand { font-weight: 600; color: var(--fg); text-decoration: none; }
.topbar nav { display: flex; gap: 20px; margin-left: auto; }
.topbar nav a { color: var(--fg-2); text-decoration: none; font-size: 15px; }
.topbar nav a:hover { color: var(--fg); }

.btn {
  display: inline-block; background: var(--accent); color: var(--accent-ink);
  padding: 12px 20px; border-radius: 4px; font-weight: 500; text-decoration: none;
}
.btn:hover { filter: brightness(1.08); }
.btn-small { padding: 7px 14px; font-size: 15px; }
.link { font-weight: 500; text-decoration: none; }
.link:hover { text-decoration: underline; }

/* Hero */
.hero { padding: 56px 0 48px; border-bottom: 1px solid var(--line); }
.eyebrow { color: var(--muted); font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 12px; }
.hero h1 { font-size: clamp(40px, 7vw, 64px); line-height: 1.05; letter-spacing: -0.02em; }
.lead { font-size: 20px; color: var(--fg-2); margin: 10px 0 32px; }
.facts {
  display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 0 32px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.facts > div { padding: 14px 16px 14px 0; }
.facts > div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 500; }
.actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.note { margin-top: 28px; color: var(--muted); font-size: 14px; }

/* Sections */
section { padding: 56px 0; }
.band { background: var(--band); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.meta { color: var(--muted); font-size: 14px; margin: 0; }
.fineprint { color: var(--muted); font-size: 14px; margin-top: 16px; }

/* Tables */
.table-scroll { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 15px; }
.data th { white-space: nowrap; text-align: left; font-weight: 500; color: var(--muted); font-size: 13px; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line); }
.data td { padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data th.num, .data td.num { padding-right: 0; }
.time { font-variant-numeric: tabular-nums; white-space: nowrap; width: 1%; padding-right: 32px !important; }
.data tr.hl td { background: var(--hl); font-weight: 500; }
.data tr.hl td:first-child { box-shadow: -8px 0 0 var(--hl); }
.data tr.hl td:last-child { box-shadow: 8px 0 0 var(--hl); }
.data tr.muted-row td { color: var(--muted); }

/* Info grid */
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 40px; }
.info-grid article { border-top: 2px solid var(--fg); padding-top: 14px; }
.info-grid p { color: var(--fg-2); font-size: 15px; }
.price { margin: 0; font-size: 15px; }
.price > div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.price dt { color: var(--fg-2); }
.price dd { margin: 0; font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.two-col p, .two-col li { color: var(--fg-2); font-size: 15px; }
.two-col ul { margin: 0; padding-left: 18px; }
.two-col li { margin-bottom: 6px; }
address { font-style: normal; line-height: 1.7; }
.credits { margin: 0; font-size: 15px; }
.credits > div { padding: 6px 0; border-bottom: 1px solid var(--line); }
.credits dt { font-size: 13px; color: var(--muted); }
.credits dd { margin: 0; }

/* ČVUT stats */
.cvut-grid { display: grid; grid-template-columns: 280px 1fr; gap: 40px; align-items: start; }
.stats { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.stat { padding: 14px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; }
.stat-main { grid-column: 1 / -1; }
.stat-num { font-size: 32px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-main .stat-num { font-size: 64px; color: var(--accent); }
.stat-label { color: var(--fg-2); font-size: 14px; }

.chart { margin: 0; }
.chart figcaption { font-weight: 600; margin-bottom: 12px; }
.chart-body { display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: center; }
.donut-wrap { position: relative; }
#donut { width: 100%; height: auto; display: block; }
#donut path { cursor: default; transition: opacity .12s; }
#donut.hovering path:not(.active) { opacity: .35; }
.donut-total { font: 600 30px "IBM Plex Sans", sans-serif; fill: var(--fg); }
.donut-sub { font: 13px "IBM Plex Sans", sans-serif; fill: var(--muted); }
.tooltip {
  position: absolute; pointer-events: none; background: var(--fg); color: var(--bg);
  font-size: 13px; padding: 6px 9px; border-radius: 4px; white-space: nowrap; transform: translate(-50%, -120%);
}
.legend { width: 100%; border-collapse: collapse; font-size: 15px; }
.legend th { text-align: left; font-weight: 500; color: var(--muted); font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.legend td { padding: 7px 0; border-bottom: 1px solid var(--line); }
.legend th.num, .legend td.num { padding-left: 16px; }
.legend tr.active td { background: var(--hl); }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 10px; vertical-align: 0; }
.fac-name { color: var(--muted); font-size: 13px; margin-left: 6px; }
.empty { padding: 16px; border: 1px dashed var(--line); color: var(--fg-2); margin-top: 20px; }

.footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
.footer a { color: inherit; }

@media (max-width: 860px) {
  .topbar nav { display: none; }
  .topbar-inner { justify-content: space-between; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .info-grid { grid-template-columns: 1fr 1fr; }
  .cvut-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  section { padding: 40px 0; }
  .hero { padding: 36px 0 32px; }
  .info-grid, .two-col { grid-template-columns: 1fr; gap: 28px; }
  .chart-body { grid-template-columns: 1fr; }
  .donut-wrap { max-width: 220px; margin: 0 auto; }
  .time { padding-right: 16px !important; }
}

/* Recruitment hero */
.hero-grid { display: grid; grid-template-columns: 1fr 280px; gap: 48px; align-items: end; margin-bottom: 36px; }
.hero .lead { max-width: 560px; margin-bottom: 28px; }
.hero-count {
  display: flex; flex-direction: column; padding: 20px 22px; border: 1px solid var(--line); border-top: 3px solid var(--accent);
  text-decoration: none; color: var(--fg); background: var(--bg);
}
.hero-count:hover .hero-more { text-decoration: underline; }
.hero-num { font-size: 72px; font-weight: 600; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.hero-label { margin-top: 8px; font-weight: 500; }
.hero-more { margin-top: 14px; font-size: 14px; color: var(--accent); }

/* How to join */
.howto-grid { display: grid; grid-template-columns: 1fr 400px; gap: 48px; align-items: start; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 0 0 22px 48px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--line); display: grid; place-items: center; font-weight: 600; font-size: 14px; color: var(--fg-2);
}
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 32px; bottom: 4px; width: 1px; background: var(--line); }
.steps h3 { font-size: 17px; }
.steps p { color: var(--fg-2); font-size: 15px; margin: 0; }
mark { background: var(--hl); color: var(--accent); padding: 1px 6px; border-radius: 3px; font-weight: 600; }

.formmock { margin: 0; border: 1px solid var(--line); background: var(--band); padding: 18px; font-size: 14px; }
.formmock figcaption { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.fm-row { display: grid; grid-template-columns: 120px 1fr; align-items: center; gap: 12px; padding: 9px 10px; margin: 0 -10px; border-radius: 4px; }
.fm-row.key { background: var(--hl); box-shadow: inset 3px 0 0 var(--accent); }
.fm-label { color: var(--fg-2); }
.fm-row.key .fm-label { color: var(--fg); font-weight: 500; }
.fm-field { background: var(--bg); border: 1px solid var(--line); border-radius: 3px; padding: 5px 8px; color: var(--muted); position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fm-row.key .fm-field { color: var(--fg); border-color: var(--accent); }
.fm-field.strong { font-weight: 600; }
.fm-caret { position: absolute; right: 8px; top: 50%; width: 6px; height: 6px; border-right: 1.5px solid var(--fg-2); border-bottom: 1.5px solid var(--fg-2); transform: translateY(-70%) rotate(45deg); }
.fm-row.key .fm-field:has(.fm-caret) { padding-right: 24px; }
.fm-radio { display: flex; gap: 16px; }
.fm-radio .r { display: inline-flex; align-items: center; gap: 6px; color: var(--fg-2); }
.fm-radio .r::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--muted); background: var(--bg); }
.fm-radio .r.on { color: var(--fg); font-weight: 600; }
.fm-radio .r.on::before { border-color: var(--accent); box-shadow: inset 0 0 0 2.5px var(--bg); background: var(--accent); }
.fm-btn { display: block; text-align: center; margin-top: 16px; }

.perks { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.perks li { padding: 16px 20px 0 0; display: flex; flex-direction: column; font-size: 15px; }
.perks li + li { padding-left: 20px; border-left: 1px solid var(--line); }
.perks span { color: var(--fg-2); font-size: 14px; }

@media (max-width: 860px) {
  .hero-grid, .howto-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-count { max-width: 360px; }
}
@media (max-width: 600px) {
  .perks { grid-template-columns: 1fr; }
  .perks li + li { padding-left: 0; border-left: 0; }
  .perks li { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .fm-row { grid-template-columns: 1fr; gap: 4px; }
}

/* Simplified how-to */
.howto-grid { grid-template-columns: 1fr 420px; align-items: center; }
.howto-text h2 { margin-bottom: 12px; }
.howto-text p { color: var(--fg-2); font-size: 17px; }
.howto-text .warn { font-size: 15px; color: var(--muted); }
.formmock .fm-row + .fm-row { margin-top: 6px; }
@media (max-width: 860px) { .howto-grid { grid-template-columns: 1fr; } }

/* Deadline banner */
.deadline { background: var(--accent); color: var(--accent-ink); font-size: 15px; }
.deadline-inner { display: flex; justify-content: center; align-items: baseline; gap: 6px 16px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; text-align: center; }
.deadline strong { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.deadline.closed { background: var(--band); color: var(--fg); border-bottom: 1px solid var(--line); }

/* Banner + top bar stay in view together */
.sticky-head { position: sticky; top: 0; z-index: 10; }
.sticky-head .topbar { position: static; }
html { scroll-padding-top: 110px; }
.dl-short { display: none; }
@media (max-width: 600px) {
  .dl-long { display: none; }
  .dl-short { display: inline; }
  .deadline { font-size: 14px; }
  .deadline-inner { gap: 4px 10px; padding-top: 8px; padding-bottom: 8px; }
  .topbar-inner { height: 52px; }
}

/* Unofficial-site disclaimer */
.disclaimer { font-size: 13px; color: var(--muted); margin: -24px 0 32px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.disclaimer a { color: inherit; }
@media (max-width: 600px) { .disclaimer { margin: -12px 0 24px; } }
