/* metodika.cendai.cz — vizuální styl inspirovaný platformou CENDAI */
:root {
  --navy-950: #050d1f;
  --navy-900: #0a1630;
  --navy-800: #102349;
  --navy-700: #183268;
  --blue: #1f6fe0;
  --cyan: #6cc0ff;
  --ink: #0b1b3a;
  --text: #24324d;
  --muted: #5b6b88;
  --line: #dde4f0;
  --bg: #f5f7fb;
  --card: #ffffff;
  --ok: #10a36b;
  --ok-bg: #e8f8f1;
  --bad: #d93a4a;
  --bad-bg: #fdecee;
  --warn: #c98500;
  --warn-bg: #fff6e0;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(11, 27, 58, .06), 0 8px 24px rgba(11, 27, 58, .07);
  --grad: linear-gradient(135deg, var(--cyan), var(--blue));
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: "Space Grotesk", "Inter", sans-serif; color: var(--ink); line-height: 1.2; margin: 0 0 .6em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); letter-spacing: -.01em; }
h3 { font-size: 1.3rem; margin-top: 2rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
a { color: var(--blue); }
strong { color: var(--ink); }
ul { padding-left: 1.2em; margin: 0 0 1em; }
li { margin: .25em 0; }
li::marker { color: var(--blue); }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; border-radius: 8px; }
.skip:focus { left: 8px; }

/* ---------- Navigace ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 22, 48, .88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.topbar .container { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.brand img { height: 40px; width: auto; color: #fff; }
.brand span { font-size: .8rem; color: #9fb0d0; border-left: 1px solid rgba(255,255,255,.2); padding-left: 12px; line-height: 1.2; }
.nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: #cfdaf0; text-decoration: none; font-size: .9rem; font-weight: 500; padding: 8px 12px; border-radius: 999px; }
.nav a:hover, .nav a.active { color: #fff; background: rgba(255, 255, 255, .1); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid rgba(255,255,255,.25); color: #fff; border-radius: 10px; padding: 6px 12px; font: inherit; cursor: pointer; }
.progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; background: var(--grad); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #dbe5f8;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(108, 192, 255, .28), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(31, 111, 224, .38), transparent 60%),
    linear-gradient(180deg, var(--navy-900), var(--navy-950));
  padding: 88px 0 96px;
}
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .35;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 60% 40%, #000 30%, transparent 75%);
}
.hero .container { position: relative; display: grid; grid-template-columns: 1.35fr 1fr; gap: 56px; align-items: center; }
.hero-logo { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; color: #fff; margin-bottom: 28px; }
.hero-logo img { height: 76px; width: auto; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); margin-bottom: 14px; }
.hero h1 { color: #fff; font-size: clamp(2.1rem, 4.6vw, 3.5rem); letter-spacing: -.02em; margin-bottom: 20px; }
.hero h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: 1.15rem; color: #b9c7e3; max-width: 46ch; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 32px; }
.chip { font-size: .82rem; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); color: #dbe5f8; }
.chip.draft { border-color: rgba(255, 196, 0, .5); color: #ffd666; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 999px; font-weight: 600; text-decoration: none; font-size: .97rem; transition: transform .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--grad); color: #04122b; box-shadow: 0 8px 28px rgba(108, 192, 255, .35); }
.btn-ghost { color: #fff; border: 1px solid rgba(255,255,255,.3); }
.btn-ghost:hover { background: rgba(255,255,255,.08); }

.rule-card {
  background: linear-gradient(160deg, rgba(255,255,255,.1), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.14); border-radius: 24px; padding: 32px;
  box-shadow: 0 30px 60px rgba(0,0,0,.35);
}
.rule-card .icon { width: 56px; height: 56px; border-radius: 16px; background: var(--grad); display: grid; place-items: center; margin-bottom: 18px; }
.rule-card h2 { color: #fff; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .1em; }
.rule-card strong { color: #fff; }
.rule-card p { color: #e3ebfa; font-size: 1.12rem; margin: 0; }
.rule-card .sub { margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); font-size: .95rem; color: #a9b9d8; }

/* ---------- Ekosystém CENDAI ---------- */
.eco { background: var(--navy-950); padding: 0 0 72px; }
.eco-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.eco-card {
  display: block; text-decoration: none; color: #cfdaf0; padding: 22px;
  border-radius: var(--radius); background: var(--navy-800); border: 1px solid rgba(255,255,255,.08);
  transition: border-color .2s, transform .2s;
}
.eco-card:hover { border-color: var(--cyan); transform: translateY(-2px); }
.eco-card .dom { font-family: "Space Grotesk", sans-serif; color: #fff; font-weight: 600; font-size: 1.05rem; display: flex; justify-content: space-between; }
.eco-card .dom::after { content: "↗"; color: var(--cyan); }
.eco-card p { font-size: .9rem; margin: 6px 0 0; color: #9fb0d0; }
.eco h2 { color: #fff; font-size: 1.1rem; margin-bottom: 16px; font-weight: 600; letter-spacing: .02em; }

/* ---------- Rozvržení obsahu ---------- */
.layout { display: grid; grid-template-columns: 260px 1fr; gap: 48px; padding: 64px 24px 32px; }
.toc { position: sticky; top: 92px; align-self: start; max-height: calc(100vh - 110px); overflow: auto; font-size: .9rem; }
.toc h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 10px; }
.toc ol { list-style: none; padding: 0; margin: 0; }
.toc a { display: block; padding: 7px 12px; border-left: 2px solid var(--line); color: var(--muted); text-decoration: none; }
.toc a .n { display: inline-block; width: 2.2em; font-weight: 700; color: var(--blue); }
.toc a:hover { color: var(--ink); }
.toc a.active { color: var(--ink); border-color: var(--blue); background: #eaf0ff; font-weight: 600; }
.toc .toc-ext { margin-top: 24px; }
.toc .toc-ext a { border: 0; padding: 4px 0; }

main { min-width: 0; }
main section.part { background: var(--card); border-radius: 24px; padding: 48px clamp(22px, 4vw, 56px); margin-bottom: 32px; box-shadow: var(--shadow); }
.part-head { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.part-no {
  flex: none; width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center;
  font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 1.4rem; color: #fff; background: var(--grad);
}
.part-head .eyebrow { color: var(--blue); margin-bottom: 4px; }
.part-head h2 { margin: 0; }

/* ---------- Komponenty ---------- */
.callout { border-radius: var(--radius); padding: 22px 26px; margin: 24px 0; background: #eef3ff; border-left: 4px solid var(--blue); }
.callout h4 { margin-bottom: .4em; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout.key { background: linear-gradient(135deg, var(--navy-800), var(--navy-700)); color: #dbe5f8; border: 0; }
.callout.key h4, .callout.key strong { color: #fff; }
.callout.key h4 { color: var(--cyan); text-transform: uppercase; font-size: .85rem; letter-spacing: .1em; }
.callout.key p { font-size: 1.12rem; }
.callout.warn { background: var(--warn-bg); border-color: var(--warn); }
.callout.ok { background: var(--ok-bg); border-color: var(--ok); }
.callout.bad { background: var(--bad-bg); border-color: var(--bad); }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h4 { margin-bottom: .35em; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card .en { font-size: .82rem; color: var(--muted); font-weight: 500; display: block; margin-top: 2px; }

.list-ok li::marker { content: "✓  "; color: var(--ok); font-weight: 700; }
.list-bad li::marker { content: "✕  "; color: var(--bad); font-weight: 700; }
.list-warn li::marker { content: "!  "; color: var(--warn); font-weight: 800; }
.cols { columns: 2; column-gap: 40px; }
.cols li { break-inside: avoid; }

.maxims { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 28px 0; }
.maxims div { background: var(--navy-900); color: #fff; border-radius: var(--radius); padding: 22px; font-family: "Space Grotesk", sans-serif; font-size: 1.1rem; font-weight: 600; line-height: 1.35; position: relative; overflow: hidden; }
.maxims div::after { content: ""; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: var(--grad); opacity: .35; }

.values { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 8px; padding: 0; list-style: none; }
.values li { margin: 0; padding: 8px 14px; border-radius: 999px; background: #eaf0ff; color: var(--ink); font-size: .92rem; font-weight: 500; }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0; }
.compare > div { border-radius: var(--radius); padding: 18px 20px; }
.compare .good { background: var(--ok-bg); border: 1px solid #bfe9d6; }
.compare .poor { background: var(--bad-bg); border: 1px solid #f6c6cc; }
.compare .label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; display: block; margin-bottom: 6px; }
.compare .good .label { color: var(--ok); }
.compare .poor .label { color: var(--bad); }
.compare p { margin: 0; }

.prompt { font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: .9rem; background: var(--navy-900); color: #e3ebfa; padding: 12px 16px; border-radius: 10px; display: block; margin: 8px 0; overflow-wrap: anywhere; }

/* Desatero */
.ten-phase { margin: 28px 0 10px; font-family: "Space Grotesk", sans-serif; font-weight: 600; color: var(--blue); text-transform: uppercase; letter-spacing: .1em; font-size: .85rem; }
.ten { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.ten-item { display: flex; gap: 16px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.ten-item .num { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #04122b; font-weight: 800; font-family: "Space Grotesk", sans-serif; }
.ten-item h4 { margin: 2px 0 4px; }
.ten-item p { margin: 0; font-size: .95rem; }

/* Tabulka */
table { width: 100%; border-collapse: collapse; margin: 16px 0 24px; font-size: .96rem; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--navy-900); color: #fff; font-weight: 600; }
th:first-child { border-top-left-radius: 12px; }
th:last-child { border-top-right-radius: 12px; }
.tag { display: inline-block; font-weight: 700; font-size: .85rem; padding: 3px 10px; border-radius: 6px; white-space: nowrap; }
.t-pub { background: #e8f8f1; color: #0c7a51; }
.t-int { background: #eaf0ff; color: #2448b8; }
.t-cit { background: #fff6e0; color: #8a5b00; }
.t-zc { background: #fdecee; color: #b3202f; }

/* Interaktivní kontrolní seznam */
.checklist { list-style: none; padding: 0; margin: 12px 0; }
.checklist li { margin: 0; }
.checklist label { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; cursor: pointer; }
.checklist label:hover { background: #eef3ff; }
.checklist input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--blue); flex: none; }
.checklist input:checked + span { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(91,107,136,.5); }
.check-box { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin: 22px 0; }
.check-box h4 { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.check-box .reset { font: inherit; font-size: .82rem; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; cursor: pointer; color: var(--muted); }

/* Situace */
details.situation { border: 1px solid var(--line); border-radius: var(--radius); margin: 12px 0; background: var(--bg); }
details.situation summary { cursor: pointer; padding: 16px 20px; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.situation summary::-webkit-details-marker { display: none; }
details.situation summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--blue); }
details.situation[open] summary::after { content: "–"; }
details.situation .body { padding: 0 20px 18px; }

/* Rychlý přehled */
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.quick > div { border-radius: 20px; padding: 26px; }
.quick .yes { background: var(--ok-bg); border: 1px solid #bfe9d6; }
.quick .no { background: var(--bad-bg); border: 1px solid #f6c6cc; }
.quick h3 { margin-top: 0; display: flex; gap: 10px; align-items: center; }
.quick .cond { font-size: .9rem; color: var(--muted); margin-top: -6px; }
.final-rule { margin-top: 24px; text-align: center; font-family: "Space Grotesk", sans-serif; font-size: 1.25rem; font-weight: 600; color: #fff; background: var(--navy-900); padding: 26px; border-radius: 20px; }
.final-rule span { color: var(--cyan); }

.resources { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.resources a { text-decoration: none; }
.resources .card:hover { border-color: var(--blue); }

.note { font-size: .88rem; color: var(--muted); }

/* ---------- Patička ---------- */
footer { background: var(--navy-950); color: #9fb0d0; padding: 56px 0 40px; margin-top: 48px; font-size: .92rem; }
footer .container { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
footer h3 { color: #fff; font-size: 1rem; margin: 0 0 12px; }
footer a { color: #cfdaf0; text-decoration: none; }
footer a:hover { color: var(--cyan); }
footer ul { list-style: none; padding: 0; }
footer .flogo { height: 52px; width: auto; color: #fff; margin-bottom: 14px; }
footer .disclaimer { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.08); padding-top: 22px; font-size: .82rem; color: #7f90b0; }

.to-top { position: fixed; right: 20px; bottom: 20px; width: 46px; height: 46px; border-radius: 50%; background: var(--grad); color: #04122b; border: 0; font-size: 1.2rem; cursor: pointer; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .2s; }
.to-top.show { opacity: 1; pointer-events: auto; }

/* ---------- Responzivita ---------- */
@media (max-width: 1080px) {
  .nav { display: none; }
  .nav.open { display: flex; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; background: var(--navy-900); padding: 12px 24px 20px; }
  .nav-toggle { display: block; }
  .eco-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; gap: 36px; }
  .layout { grid-template-columns: 1fr; gap: 0; padding-top: 32px; }
  .toc { display: none; }
  .grid-3, .maxims { grid-template-columns: 1fr; }
  footer .container { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .layout { padding-left: 16px; padding-right: 16px; }
  .brand span { display: none; }
  .grid-2, .ten, .compare, .quick, .resources, .eco-grid { grid-template-columns: 1fr; }
  .cols { columns: 1; }
  .part-head { flex-direction: column; gap: 12px; }
  main section.part { border-radius: 18px; }
  table { font-size: .88rem; }
  th, td { padding: 8px; }
  .tag { white-space: normal; }
}

@media print {
  .topbar, .toc, .eco, .to-top, .btns, .check-box .reset { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .hero { background: #fff; color: #000; padding: 0 0 24px; }
  .hero h1, .hero .lead, .rule-card p, .rule-card h2 { color: #000; }
  .hero h1 em { color: #1f6fe0; background: none; -webkit-background-clip: border-box; background-clip: border-box; -webkit-text-fill-color: currentColor; }
  .rule-card { box-shadow: none; border: 1px solid #999; }
  .hero-logo img, footer .flogo { filter: invert(1) hue-rotate(180deg); }
  .rule-card strong, .rule-card .sub, .hero .eyebrow, .chip { color: #000; }
  .chip { border-color: #999; }
  .chip.draft { color: #8a5b00; }
  .callout.key, .maxims div, .final-rule, .card[style*="navy"], .prompt { color: #000; border: 1px solid #999; }
  .callout.key h4, .callout.key strong, .callout.key p, .maxims div, .final-rule span, .card[style*="navy"] p { color: #000 !important; }
  th { color: #000; border-bottom: 2px solid #000; }
  .part-no { color: #000; border: 2px solid #000; }
  footer, footer h3, footer a { background: #fff; color: #000; }
  .layout { display: block; padding: 0; }
  main section.part { box-shadow: none; padding: 0; break-before: page; }
  details.situation { break-inside: avoid; }
  details.situation .body { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .eco-card { transition: none; }
}
