/* Svetlá téma je predvolená. Tmavá sa zapína automaticky podľa nastavenia systému
   (prefers-color-scheme) — na mobiloch aj na počítači. */
:root {
  color-scheme: light dark;
  --ink: #171b1b;
  --coal: #202626;
  --paper: #f4f1eb;
  --sand: #ded9ce;
  --mist: #e8e5de;
  --orange: #ec5e30;
  --peach: #f49c75;
  --lime: #c7d653;
  --white: #fffefa;
  --line: rgba(23, 27, 27, 0.16);
  --header-line: rgba(23, 27, 27, .08);
  --border: #d8d6cc;
  --border-soft: #e2e0d7;
  --border-input: #d3d2ca;
  --text-2: #4d5552;
  --text-3: #565d59;
  --text-4: #6b716c;
  --text-5: #8b9089;
  --footer-bg: #171b1b;
  --danger: #b23b2a;
  --success: #4a7c3f;
  --badge-fg: #8a6d1f;
  --badge-bg: #fbeecb;
  --mono: "DM Mono", monospace;
  --sans: "DM Sans", sans-serif;
  --display: "Manrope", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ece8df;          /* hlavný text a prvky „ink" */
    --coal: #2b3232;         /* pozadie PDF ikony */
    --paper: #121515;        /* pozadie stránky */
    --mist: #262d2d;         /* hover / úprava */
    --white: #1b2121;        /* karty, polia, panely */
    --line: rgba(236, 232, 223, 0.18);
    --header-line: rgba(236, 232, 223, .10);
    --border: #343c3c;
    --border-soft: #2c3333;
    --border-input: #3d4646;
    --text-2: #b9bfb8;
    --text-3: #aab1aa;
    --text-4: #9aa29b;
    --text-5: #7f8781;
    --footer-bg: #0b0d0d;
    --danger: #e5765f;
    --success: #8cc17f;
    --badge-fg: #f0d48a;
    --badge-bg: #3a3015;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; height: 100%; }
body {
  margin: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  font-family: var(--sans);
  color: var(--ink);
  font-size: 16px;
}
main { flex: 1 0 auto; }
.site-footer { flex: none; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
.wrap { width: min(1240px, calc(100% - 80px)); margin: auto; }
.content-col { width: min(720px, 100%); margin: auto; }

/* Header — same panel height/width/type as aresta.sk */
.site-header {
  height: 82px;
  background: var(--paper);
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--header-line);
}
.nav-shell {
  height: 100%;
  max-width: 1440px;
  margin: auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: bold 20px/1 var(--display);
  letter-spacing: -1.4px;
}
.brand em { font-style: normal; color: var(--orange); margin-left: 3px; }
.brand-mark { width: 29px; height: auto; display: block; }
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 19px;
  border: 1px solid var(--ink);
  padding: 10px 10px 10px 16px;
  font-size: 13px;
  font-weight: 700;
  transition: .25s;
}
.nav-cta b { background: var(--orange); height: 25px; width: 25px; display: grid; place-items: center; color: white; font-size: 16px; font-weight: 400; }
.nav-cta:hover { background: var(--ink); color: var(--paper); }
@media (max-width: 640px) {
  .nav-shell { padding: 0 21px; }
  .nav-cta span { display: none; }
  .nav-cta { padding: 10px; }
}

/* Intro */
.intro { padding: 62px 0 20px; }
.eyebrow {
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-3);
  font: 11px var(--mono);
  text-transform: uppercase;
  letter-spacing: .09em;
}
.eyebrow span { display: block; width: 22px; height: 1px; background: var(--orange); }
h1 {
  font-family: var(--display);
  letter-spacing: -.06em;
  font-weight: 600;
  line-height: .98;
  font-size: clamp(38px, 5vw, 60px);
  margin: 0 0 18px;
}
h1 em { font-family: Georgia, serif; font-weight: 400; letter-spacing: -.08em; font-style: italic; }
.intro-lead { font-size: 16px; line-height: 1.55; color: var(--text-2); max-width: 480px; margin: 0; }

/* Toolbar */
.toolbar { margin: 38px 0 8px; display: flex; flex-direction: column; gap: 18px; }
.search-field {
  position: relative;
  max-width: 480px;
}
.search-field span {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-5);
  font-size: 16px;
}
.search-field input {
  width: 100%;
  border: 1px solid var(--border-input);
  background: var(--white);
  padding: 13px 16px 13px 42px;
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
}
.search-field input:focus { border-color: var(--ink); }
.search-field input::-webkit-search-cancel-button { cursor: pointer; }

.category-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--border-input);
  background: transparent;
  padding: 8px 15px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  cursor: pointer;
  border-radius: 999px;
  transition: .2s;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.active { background: var(--ink); border-color: var(--ink); color: var(--white); }

/* Manual list */
.manual-list {
  margin: 30px 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.manual-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border: 1px solid var(--border);
  background: var(--white);
  padding: 18px;
  transition: transform .2s, border-color .2s;
}
.manual-card:hover { transform: translateY(-3px); border-color: var(--ink); }
.manual-icon {
  flex: none;
  width: 38px;
  height: 46px;
  background: var(--coal);
  position: relative;
  box-shadow: 3px 3px 0 rgba(236, 94, 48, .3);
}
.manual-icon::before {
  content: "PDF";
  position: absolute;
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
  font: 700 7px var(--mono);
  color: var(--orange);
  letter-spacing: .04em;
}
.manual-icon::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 6px;
  right: 6px;
  height: 1px;
  background: rgba(255, 255, 255, .35);
  box-shadow: 0 4px 0 rgba(255, 255, 255, .2), 0 8px 0 rgba(255, 255, 255, .12);
}
.manual-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.manual-category {
  display: inline-block;
  font: 10px var(--mono);
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--orange);
  margin-bottom: 6px;
}
.manual-name {
  font: 600 16px var(--display);
  letter-spacing: -.02em;
  line-height: 1.28;
  margin: 0 0 10px;
}
.manual-open {
  font: 700 12px var(--sans);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
}
.manual-card:hover .manual-open { color: var(--orange); border-color: var(--orange); }

.empty-state {
  text-align: center;
  color: var(--text-4);
  font-size: 14px;
  padding: 60px 0;
}

/* Footer — same structure as aresta.sk */
.site-footer { background: var(--footer-bg); color: #d5d8d3; margin-top: 60px; padding: 45px 0 23px; }
.footer-top { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: start; padding-bottom: 48px; gap: 20px; }
.brand-footer { color: white; }
.footer-top p { font-style: normal; font-size: 13px; line-height: 1.6; margin: 0; color: #b3bab1; }
.footer-back { justify-self: end; font: 600 13px var(--sans); color: #b3bab1; transition: color .2s; }
.footer-back:hover { color: white; }
.footer-bottom { padding-top: 18px; border-top: 1px solid rgba(255,255,255,.15); display: flex; justify-content: space-between; font: 10px var(--mono); color: #8f9790; }
.footer-bottom p { margin: 0; }
.footer-bottom a:hover { color: white; }
@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr; gap: 16px; }
  .footer-back { justify-self: start; }
  .footer-bottom { gap: 10px; flex-wrap: wrap; }
}

@media (max-width: 640px) {
  .header-link { font-size: 12px; }
  .intro { padding: 42px 0 10px; }
  .manual-list { grid-template-columns: 1fr; }
}
