:root {
  --ink: #14171c;
  --paper: #f4f2ec;
  --paper-raised: #ffffff;
  --text: #1d2026;
  --text-dim: #5c6773;
  --border: #d9d5c9;
  --accent: #1f8f80;
  --accent-soft: #e4f2ef;
  --amber: #b9791c;
  --code-bg: #eae7dc;
  --shadow: 0 1px 0 rgba(29, 32, 38, 0.04);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f4f2ec;
    --paper: #14171c;
    --paper-raised: #1b1f26;
    --text: #e9e7df;
    --text-dim: #8d94a1;
    --border: #2b303a;
    --accent: #4fd3bf;
    --accent-soft: #17302c;
    --amber: #e3a94a;
    --code-bg: #1f242c;
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
  }
}
:root[data-theme="dark"] {
  --ink: #f4f2ec;
  --paper: #14171c;
  --paper-raised: #1b1f26;
  --text: #e9e7df;
  --text-dim: #8d94a1;
  --border: #2b303a;
  --accent: #4fd3bf;
  --accent-soft: #17302c;
  --amber: #e3a94a;
  --code-bg: #1f242c;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}
:root[data-theme="light"] {
  --ink: #14171c;
  --paper: #f4f2ec;
  --paper-raised: #ffffff;
  --text: #1d2026;
  --text-dim: #5c6773;
  --border: #d9d5c9;
  --accent: #1f8f80;
  --accent-soft: #e4f2ef;
  --amber: #b9791c;
  --code-bg: #eae7dc;
  --shadow: 0 1px 0 rgba(29, 32, 38, 0.04);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: Charter, "Iowan Old Style", "Georgia", "Noto Serif", serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.mono {
  font-family:
    ui-monospace, "JetBrains Mono", "SFMono-Regular", Menlo, Consolas,
    "Liberation Mono", monospace;
}

a {
  color: inherit;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px 96px;
}

header.hero {
  padding: 72px 0 48px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 56px;
}

.prompt-line {
  font-family:
    ui-monospace, "JetBrains Mono", "SFMono-Regular", Menlo, Consolas,
    monospace;
  font-size: 0.92rem;
  color: var(--text-dim);
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 22px;
}
.prompt-line .sigil {
  color: var(--accent);
}
.caret {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  background: var(--accent);
  margin-left: 2px;
  animation: blink 1.1s steps(1) infinite;
  vertical-align: text-bottom;
}
@media (prefers-reduced-motion: reduce) {
  .caret {
    animation: none;
  }
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}

h1.title {
  font-size: clamp(2.1rem, 5vw, 3.1rem);
  line-height: 1.08;
  margin: 0 0 18px;
  text-wrap: balance;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.lede {
  max-width: 62ch;
  color: var(--text-dim);
  font-size: 1.08rem;
  margin: 0;
}

.stat-row {
  display: flex;
  gap: 32px;
  margin-top: 34px;
  flex-wrap: wrap;
}
.stat {
  font-family: ui-monospace, "JetBrains Mono", monospace;
}
.stat .n {
  font-size: 1.6rem;
  color: var(--accent);
  font-weight: 600;
  display: block;
}
.stat .l {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

section.group {
  margin-bottom: 52px;
}

.group-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.group-path {
  font-family: ui-monospace, "JetBrains Mono", monospace;
  font-size: 0.82rem;
  color: var(--accent);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.group-path .sep {
  color: var(--text-dim);
}

.group-note {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-family: ui-monospace, "JetBrains Mono", monospace;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 18px 16px;
  background: var(--paper-raised);
  border: 1px solid var(--border);
  border-radius: 3px;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  transition:
    border-color 0.15s ease,
    transform 0.15s ease;
  position: relative;
  overflow: hidden;
}
.card:hover,
.card:focus-visible {
  border-color: var(--accent);
  transform: translateY(-2px);
  outline: none;
}
.card:focus-visible {
  box-shadow:
    0 0 0 2px var(--accent-soft),
    0 0 0 3px var(--accent);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.card-name {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.005em;
}

.card-arrow {
  font-family: ui-monospace, monospace;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-4px);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
  flex: none;
}
.card:hover .card-arrow,
.card:focus-visible .card-arrow {
  opacity: 1;
  transform: translateX(0);
}

.card-desc {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.45;
  flex: 1;
}

.card-url {
  font-family: ui-monospace, monospace;
  font-size: 0.72rem;
  color: var(--text-dim);
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  word-break: break-all;
}

.badge {
  display: inline-block;
  font-family: ui-monospace, monospace;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 2px;
  background: var(--code-bg);
  color: var(--amber);
  width: fit-content;
}

.platform-banner {
  margin: 64px 0 28px;
  padding: 22px 24px;
  background: var(--code-bg);
  border-left: 3px solid var(--amber);
  border-radius: 2px;
}
.platform-banner .mono.label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--amber);
  display: block;
  margin-bottom: 6px;
}
.platform-banner p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.92rem;
  max-width: 60ch;
}

footer {
  margin-top: 72px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-family: ui-monospace, monospace;
  font-size: 0.78rem;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ── Navigácia medzi stránkami ── */
.site-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  font-family: ui-monospace, "JetBrains Mono", monospace;
  font-size: 0.82rem;
}
.site-nav a {
  text-decoration: none;
  color: var(--text-dim);
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--paper-raised);
  transition:
    border-color 0.15s ease,
    color 0.15s ease;
}
.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
  border-color: var(--accent);
  outline: none;
}
.site-nav a[aria-current="page"] {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* ── Obsah sekcií (technologie.html) ── */
.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 28px;
  font-family: ui-monospace, "JetBrains Mono", monospace;
  font-size: 0.8rem;
}
.toc a {
  color: var(--text-dim);
  text-decoration: none;
}
.toc a:hover,
.toc a:focus-visible {
  color: var(--accent);
}
.toc a::before {
  content: "#";
  color: var(--accent);
  margin-right: 2px;
}

section.group[id] {
  scroll-margin-top: 24px;
}

.section-intro {
  max-width: 70ch;
  color: var(--text-dim);
  font-size: 0.95rem;
  margin: 0 0 18px;
}

.sub-head {
  font-family: ui-monospace, "JetBrains Mono", monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin: 26px 0 10px;
}

/* ── Porovnávacia tabuľka ── */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--paper-raised);
  margin-bottom: 22px;
}

table.cmp {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  line-height: 1.4;
}
table.cmp th,
table.cmp td {
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
  min-width: 130px;
}
table.cmp tr:last-child th,
table.cmp tr:last-child td {
  border-bottom: none;
}
table.cmp thead th {
  background: var(--code-bg);
  font-weight: 600;
  white-space: nowrap;
}
table.cmp tbody th {
  font-family: ui-monospace, "JetBrains Mono", monospace;
  font-size: 0.74rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  min-width: 120px;
}
table.cmp th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--paper-raised);
  border-right: 1px solid var(--border);
}
table.cmp thead th:first-child {
  background: var(--code-bg);
}
table.cmp code {
  font-family: ui-monospace, "JetBrains Mono", monospace;
  font-size: 0.8rem;
  background: var(--code-bg);
  padding: 1px 5px;
  border-radius: 2px;
  white-space: nowrap;
}

/* Hover: zvýrazní riadok aj stĺpec bunky pod kurzorom (stĺpec cez :has) */
@media (hover: hover) {
  table.cmp {
    --cross: color-mix(in srgb, var(--accent-soft) 55%, var(--paper-raised));
  }
  table.cmp th,
  table.cmp td {
    transition:
      background-color 0.12s ease,
      color 0.12s ease;
  }
  table.cmp:where(:has(:is(td, thead th):nth-child(2):hover)) :where(th, td):nth-child(2),
  table.cmp:where(:has(:is(td, thead th):nth-child(3):hover)) :where(th, td):nth-child(3),
  table.cmp:where(:has(:is(td, thead th):nth-child(4):hover)) :where(th, td):nth-child(4),
  table.cmp:where(:has(:is(td, thead th):nth-child(5):hover)) :where(th, td):nth-child(5),
  table.cmp:where(:has(:is(td, thead th):nth-child(6):hover)) :where(th, td):nth-child(6),
  table.cmp:where(:has(:is(td, thead th):nth-child(7):hover)) :where(th, td):nth-child(7),
  table.cmp:where(:has(:is(td, thead th):nth-child(8):hover)) :where(th, td):nth-child(8),
  table.cmp:where(:has(:is(td, thead th):nth-child(9):hover)) :where(th, td):nth-child(9) {
    background: var(--cross);
  }
  table.cmp tbody tr:hover > * {
    background: var(--cross);
  }
  table.cmp tbody tr:hover > th {
    color: var(--accent);
  }
  table.cmp tbody td:hover {
    background: var(--accent-soft);
    box-shadow: inset 0 0 0 1px var(--accent);
  }
}

/* ── Karty „kedy použiť“ ── */
.verdict-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.verdict {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 18px 16px;
  background: var(--paper-raised);
  border: 1px solid var(--border);
  border-radius: 3px;
  box-shadow: var(--shadow);
}

.verdict-use {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.45;
  margin: 0;
}

.verdict ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.84rem;
  line-height: 1.45;
}
.verdict li {
  padding-left: 16px;
  position: relative;
}
.verdict li::before {
  position: absolute;
  left: 0;
  font-family: ui-monospace, monospace;
  font-weight: 600;
}
.verdict ul.pros li::before {
  content: "+";
  color: var(--accent);
}
.verdict ul.cons li::before {
  content: "−";
  color: var(--amber);
}

.verdict .card-url {
  margin-top: auto;
  word-break: normal;
  overflow-wrap: anywhere;
}
.verdict .card-url a {
  color: var(--accent);
  text-decoration: none;
}
.verdict .card-url a:hover,
.verdict .card-url a:focus-visible {
  text-decoration: underline;
}

/* ── Spektrum prediktívne ↔ adaptívne (metodiky.html) ── */
.spectrum {
  margin-bottom: 22px;
  padding: 16px 18px 14px;
  background: var(--paper-raised);
  border: 1px solid var(--border);
  border-radius: 3px;
}
.spectrum ol {
  list-style: none;
  margin: 0;
  padding: 0 0 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  border-style: solid;
  border-width: 0 0 2px;
  border-image: linear-gradient(90deg, var(--amber), var(--accent)) 1;
}
.spectrum li {
  font-family: ui-monospace, "JetBrains Mono", monospace;
  font-size: 0.78rem;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--code-bg);
}
.spectrum-axis {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  font-family: ui-monospace, "JetBrains Mono", monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.spectrum-axis span:first-child {
  color: var(--amber);
}
.spectrum-axis span:last-child {
  color: var(--accent);
  text-align: right;
}


/* ── Ukážky kódu vedľa seba (jazyky.html) ── */
.code-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 14px;
}
.code-sample {
  margin: 0;
  min-width: 0;
  background: var(--paper-raised);
  border: 1px solid var(--border);
  border-radius: 3px;
  box-shadow: var(--shadow);
}
.code-sample figcaption {
  padding: 7px 12px;
  border-bottom: 1px solid var(--border);
  font-family: ui-monospace, "JetBrains Mono", monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}
.code-sample pre {
  margin: 0;
  padding: 12px;
  overflow-x: auto;
  background: var(--code-bg);
  font-family: ui-monospace, "JetBrains Mono", monospace;
  font-size: 0.76rem;
  line-height: 1.5;
}

/* ── Ukážky ✗ porušenie / ✓ správne (principy.html) ── */
.code-sample.bad {
  border-top: 2px solid var(--amber);
}
.code-sample.bad figcaption {
  color: var(--amber);
}
.code-sample.good {
  border-top: 2px solid var(--accent);
}
.code-sample.good figcaption {
  color: var(--accent);
}
.code-grid + .verdict-grid {
  margin-top: 22px;
}
