/* Brandmap – veřejný web manuálu. Barvy a zaoblení přebírá z nastavení značky. */
:root {
  --accent: #3D5AFE; --bg: #F5F3EE; --ink: #16161A; --card: #FFFFFF; --radius: 14px; --on-accent: #fff;
  --font-body: 'Inter Tight', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: var(--font-body);
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --head-features: normal;
  --line: color-mix(in srgb, var(--ink) 13%, transparent);
  --muted: color-mix(in srgb, var(--ink) 58%, var(--bg));
  --soft: color-mix(in srgb, var(--ink) 5%, var(--bg));
  --ok: #1E8E4E; --no: #D23C3C;
  --wrap: 1240px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font-body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-head); font-feature-settings: var(--head-features); font-weight: 600; letter-spacing: -0.02em; margin: 0; }
.eyebrow { font: 500 12px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin: 0 0 18px; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 62ch; }
.lead p { margin: 0 0 .6em; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 999px; border: 1px solid var(--ink); font: 500 14px/1 var(--font-body); text-decoration: none; transition: .2s; }
.btn:hover { background: var(--ink); color: var(--bg); }
.btn--accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn--accent:hover { filter: brightness(.92); background: var(--accent); color: var(--on-accent); }
.btn--sm { padding: 8px 14px; font-size: 13px; }
.ico-lock { width: .8em; height: .8em; margin-left: .4em; vertical-align: -.05em; opacity: .6; }

/* --- horní lišta --- */
.bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 20px; padding: 0 clamp(16px, 3vw, 40px); height: 68px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.bar-brand { display: flex; align-items: center; text-decoration: none; font: 600 18px var(--font-head); flex: none; }
.bar-brand img { height: 30px; width: auto; display: block; }
.bar-tag { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding-left: 18px; border-left: 1px solid var(--line); flex: none; }
.bar-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-left: auto; }
.bar-nav::-webkit-scrollbar { display: none; }
.bar-nav a { white-space: nowrap; text-decoration: none; padding: 8px 12px; border-radius: 999px; font-size: 14px; color: var(--muted); }
.bar-nav a:hover { color: var(--ink); background: var(--soft); }
.bar-nav a.on { color: var(--ink); background: color-mix(in srgb, var(--accent) 14%, var(--bg)); }
.bar-end { display: flex; align-items: center; gap: 10px; flex: none; }
.langs { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.langs button { font: 500 11px var(--mono); text-transform: uppercase; padding: 5px 9px; border-radius: 999px; color: var(--muted); }
.langs button.on { background: var(--ink); color: var(--bg); }
.bar-edit { font: 500 12px var(--mono); text-decoration: none; padding: 7px 12px; border-radius: 999px; background: var(--accent); color: var(--on-accent); }

/* --- úvod --- */
.home, .page, .portal { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(16px, 3vw, 40px); }
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 5vw, 72px); align-items: center; padding: clamp(40px, 7vw, 96px) 0 clamp(40px, 6vw, 80px); position: relative; }
.hero--img::before { content: ''; position: absolute; inset: 0 calc(-1 * clamp(16px, 3vw, 40px)); background: var(--hero-img) center/cover; opacity: .18; z-index: -1; border-radius: 0 0 var(--radius) var(--radius); }
.hero h1 { font-size: clamp(40px, 6.2vw, 88px); line-height: .98; letter-spacing: -.035em; margin-bottom: 26px; }
.stage { position: relative; aspect-ratio: 5/4; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); overflow: hidden; }
.slide { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity .7s; text-decoration: none; }
.slide.on { opacity: 1; z-index: 1; }
.slide.dark { background: var(--ink); color: #fff; }
.slide img { position: absolute; inset: 0; margin: auto; max-width: 62%; max-height: 42%; }
.slide-cap { position: absolute; left: 18px; bottom: 16px; font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; opacity: .6; }
.dots { position: absolute; right: 16px; bottom: 16px; display: flex; gap: 6px; z-index: 2; }
.dots button { width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .25; color: var(--muted); }
.dots button.on { opacity: 1; background: var(--accent); }

.cards { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; padding-bottom: 80px; }
.card { position: relative; display: flex; flex-direction: column; text-decoration: none; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; transition: transform .25s, border-color .25s, box-shadow .25s; }
.card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 14px 30px -18px color-mix(in srgb, var(--ink) 40%, transparent); }
.card--large { grid-column: span 4; }
.card--small { grid-column: span 3; }
.card-cover { aspect-ratio: 16/10; overflow: hidden; background: var(--soft); border-bottom: 1px solid var(--line); }
.card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.card:hover .card-cover img { transform: scale(1.04); }
.card-pattern { width: 100%; height: 100%; background:
  radial-gradient(circle at 30% 60%, var(--accent) 0 18%, transparent 18.5%),
  repeating-linear-gradient(-45deg, var(--line) 0 1px, transparent 1px 12px); }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; min-height: 132px; }
.card-num { font: 500 11px var(--mono); color: var(--accent); }
.card h3 { font-size: 21px; line-height: 1.2; }
.card p { margin: 0; font-size: 14px; color: var(--muted); padding-right: 28px; }
.card-arrow { position: absolute; right: 18px; bottom: 16px; font-size: 18px; transition: transform .25s; }
.card:hover .card-arrow { transform: translateX(4px); color: var(--accent); }

/* --- rozcestník --- */
.portal { padding-top: 80px; padding-bottom: 80px; }
.portal h1 { font-size: clamp(40px, 6vw, 72px); margin-bottom: 40px; }
.portal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }

/* --- stránka --- */
.page-head { padding: clamp(32px, 5vw, 64px) 0 clamp(24px, 4vw, 48px); border-bottom: 1px solid var(--line); }
.back { display: inline-block; font: 500 12px var(--mono); text-decoration: none; color: var(--muted); margin-bottom: 28px; }
.back:hover { color: var(--accent); }
.page-head h1 { font-size: clamp(40px, 6vw, 80px); line-height: 1; letter-spacing: -.035em; margin-bottom: 18px; }
.page-body { padding-bottom: 80px; }
.page-body.has-toc { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); }
.toc { position: sticky; top: 92px; align-self: start; padding-top: 52px; }
.toc-h { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: t; border-left: 1px solid var(--line); }
.toc li { counter-increment: t; }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; text-decoration: none; font-size: 14px; color: var(--muted); }
.toc a::before { content: counter(t, decimal-leading-zero) ' '; font: 11px var(--mono); color: var(--accent); }
.toc a:hover, .toc a.on { color: var(--ink); border-left-color: var(--accent); }

.sec { padding: 52px 0; border-bottom: 1px solid var(--line); }
.sec:last-child { border-bottom: 0; }
.sec-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 28px; }
.sec-num { font: 500 12px var(--mono); color: var(--accent); }
.sec-head h2 { font-size: clamp(26px, 3vw, 36px); }
.prose { max-width: 68ch; font-size: 17px; }
.prose p { margin: 0 0 1em; }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose a { color: var(--accent); }
.prose.note { margin-top: 28px; font-size: 15px; color: var(--muted); padding-left: 16px; border-left: 2px solid var(--accent); }

/* loga */
.logos { display: grid; gap: 28px; }
.logo-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.logo-tiles.one { grid-template-columns: 1fr; }
.tile { position: relative; overflow: hidden; min-width: 0; aspect-ratio: 16/9; border-radius: var(--radius); display: grid; place-items: center; border: 1px solid var(--line); transition: transform .2s; cursor: zoom-in; }
.tile:hover { transform: scale(1.01); }
.tile.light { background: var(--card); }
.tile.dark { background: var(--ink); }
.tile img { position: absolute; inset: 0; margin: auto; max-width: 58%; max-height: 46%; }
.logo-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 14px; }
.logo-meta h3 { font-size: 18px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font: 500 12px var(--mono); text-decoration: none; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); }
.chip:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ochranná zóna */
.cz { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; }
.cz-stage { display: grid; place-items: center; min-height: 340px; padding: 40px; border-radius: var(--radius); border: 1px solid var(--line);
  background: repeating-linear-gradient(45deg, var(--soft) 0 6px, var(--card) 6px 12px); }
.cz-box { --h: 84px; position: relative; padding: calc(var(--h) * var(--z)); background: var(--card); outline: 1.5px dashed var(--accent); }
.cz-box img { display: block; height: var(--h); width: auto; max-width: none; outline: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.cz-m { position: absolute; font: 500 11px var(--mono); font-style: normal; color: var(--accent); display: grid; place-items: center; }
.cz-t { top: 0; left: 50%; width: 22px; margin-left: -11px; height: calc(var(--h) * var(--z)); border-left: 1px solid var(--accent); border-right: 1px solid var(--accent); }
.cz-l { left: 0; top: 50%; height: 22px; margin-top: -11px; width: calc(var(--h) * var(--z)); border-top: 1px solid var(--accent); border-bottom: 1px solid var(--accent); }
.specs { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.specs div { background: var(--card); padding: 14px 16px; display: grid; gap: 2px; }
.specs span { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.specs strong { font: 600 18px var(--font-head); }
.cz-min { margin-top: 16px; padding: 16px; border: 1px dashed var(--line); border-radius: var(--radius); }
.cz-min p { margin: 0 0 12px; font: 500 11px var(--mono); text-transform: uppercase; color: var(--muted); }
.cz-min img { display: block; max-width: none; }

/* správně / nesprávně, pozadí */
.dd, .bgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.dd-item { margin: 0; }
.dd-img { position: relative; display: block; width: 100%; aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--card); cursor: zoom-in; }
.dd-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dd-item.no .dd-img::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 0 2px var(--no); border-radius: inherit; }
.badge { position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 700; color: #fff; background: var(--ok); }
.no .badge { background: var(--no); }
.dd-item figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); }
.dd-item figcaption strong { display: block; font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ok); margin-bottom: 2px; }
.dd-item.no figcaption strong { color: var(--no); }
.bg-tile { position: relative; aspect-ratio: 4/3; border-radius: var(--radius); display: grid; place-items: center; border: 1px solid var(--line); }
.bg-tile { overflow: hidden; }
.bg-tile img { position: absolute; inset: 0; margin: auto; max-width: 60%; max-height: 32%; }
.bg-tile.no img { opacity: .9; }
.bg-code { position: absolute; left: 12px; bottom: 10px; font: 500 11px var(--mono); opacity: .75; }

/* barvy */
.sws { display: grid; gap: 16px; }
.sws--primary { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.sws--secondary { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.sw { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--card); }
.sw-chip { display: flex; align-items: flex-end; width: 100%; height: 200px; padding: 18px; text-align: left; font: 600 20px var(--font-head); }
.sws--secondary .sw-chip { height: 140px; font-size: 17px; }
.sw-vals { padding: 8px 0; }
.vrow { display: flex; width: 100%; justify-content: space-between; gap: 12px; padding: 7px 18px; font: 13px var(--mono); text-align: left; }
.vrow:hover { background: var(--soft); }
.vrow:hover .vv::after { content: ' ⧉'; color: var(--accent); }
.vk { color: var(--muted); }
.palette { display: flex; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); min-height: 170px; }
.pal { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 2px; padding: 14px; text-align: left; transition: flex .3s; }
.pal:hover { flex: 1.6; }
.pal span { font: 600 15px var(--font-head); }
.pal code { font: 12px var(--mono); opacity: .85; }
.grads { display: grid; gap: 22px; }
.grad-bar { display: block; width: 100%; height: 120px; border-radius: var(--radius); border: 1px solid var(--line); }
.grad-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.grad-meta h3 { font-size: 18px; }
.grad-stops { display: flex; gap: 6px; flex-wrap: wrap; }
.stop { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font: 12px var(--mono); }
.stop i { width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--line); }
.stop:hover { border-color: var(--ink); }

/* písma */
.font { --ts: 40px; font-feature-settings: var(--feat); }
.font-hero { display: grid; grid-template-columns: auto 1fr; gap: clamp(20px, 4vw, 56px); align-items: center; padding: 28px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.font-aa { font-family: var(--ff); font-size: clamp(110px, 14vw, 190px); line-height: .85; letter-spacing: -.03em; color: var(--accent); }
.font-info h3 { font-family: var(--ff); font-size: clamp(28px, 3.4vw, 44px); margin-bottom: 8px; letter-spacing: -.01em; }
.font-meta { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.font-meta a { color: var(--ink); }
.tester { display: flex; gap: 18px; align-items: center; margin: 18px 0 6px; flex-wrap: wrap; }
.tester input[type=text] { flex: 1; min-width: 220px; font: 16px var(--font-body); padding: 12px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.tester input[type=text]:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.tester label { display: flex; align-items: center; gap: 10px; font: 500 11px var(--mono); text-transform: uppercase; color: var(--muted); }
.tester input[type=range] { accent-color: var(--accent); }
.w-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); }
.w-name { font: 12px var(--mono); color: var(--muted); }
.w-sample { margin: 0; font-family: var(--ff); font-size: var(--ts); line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.glyphs { margin-top: 18px; }
.glyphs summary { cursor: pointer; font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 0; }
.glyph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); margin-top: 10px; font-family: var(--ff); }
.glyph-grid span { aspect-ratio: 1; display: grid; place-items: center; font-size: 26px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--card); transition: .15s; }
.glyph-grid span:hover { background: var(--accent); color: var(--on-accent); font-size: 34px; }

/* tabulka, obrázek, soubory */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { text-align: left; font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 12px 18px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 13px 18px; border-bottom: 1px solid var(--line); }
.tbl tr:last-child td { border-bottom: 0; }
.img { margin: 0; max-width: 820px; }
.img--wide { max-width: none; }
.img img { display: block; width: 100%; border-radius: var(--radius); border: 1px solid var(--line); cursor: zoom-in; }
.img a img { cursor: pointer; }
.img figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); }
.dls { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.dls li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.dls li:last-child { border-bottom: 0; }
.dl-ext { font: 500 11px var(--mono); padding: 6px 0; text-align: center; border-radius: 6px; background: var(--soft); }
.dl-name { font-weight: 500; overflow: hidden; }
.dl-name small { display: block; font: 12px var(--mono); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-size { font: 12px var(--mono); color: var(--muted); }

/* zámek */
.lock { min-height: calc(100vh - 160px); display: grid; place-items: center; padding: 40px 16px; }
.lock-card { width: min(400px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 36px 32px; text-align: center; display: grid; gap: 14px; }
.lock-ico { width: 52px; height: 52px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, var(--card)); color: var(--accent); }
.lock-ico .ico-lock { width: 22px; height: 22px; margin: 0; opacity: 1; }
.lock-card h1 { font-size: 26px; }
.lock-card p { margin: 0; color: var(--muted); }
.lock-card input { font: 16px var(--font-body); padding: 12px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); text-align: center; }
.lock-card .btn { justify-content: center; }
.lock-err { color: var(--no) !important; font-size: 14px; }

.empty { min-height: 70vh; display: grid; place-content: center; justify-items: start; gap: 18px; padding: 40px; }

/* patička, lightbox, toast */
.foot { display: flex; gap: 16px; align-items: center; padding: 22px clamp(16px, 3vw, 40px); border-top: 1px solid var(--line); font: 12px var(--mono); color: var(--muted); }
.foot-sp { flex: 1; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--accent); }
.lightbox { position: fixed; inset: 0; z-index: 100; background: color-mix(in srgb, var(--ink) 75%, transparent); display: grid; place-items: center; padding: 40px; animation: fade .2s; cursor: zoom-out; }
.lb-inner { background: var(--lb-bg); border-radius: var(--radius); padding: clamp(24px, 6vw, 80px); max-width: 90vw; max-height: 85vh; display: grid; place-items: center; }
.lb-inner img { max-width: min(900px, 80vw); max-height: 70vh; min-width: min(420px, 70vw); object-fit: contain; }
.lb-x { position: absolute; top: 18px; right: 22px; color: #fff; font-size: 22px; }
@keyframes fade { from { opacity: 0; } }
#toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 999px;
  font: 13px var(--mono); opacity: 0; pointer-events: none; transition: .25s; z-index: 200; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1000px) {
  .card--large { grid-column: span 6; }
  .card--small { grid-column: span 6; }
  .cz { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .bar-tag { display: none; }
  .hero { grid-template-columns: 1fr; }
  .page-body.has-toc { display: block; }
  .toc { display: none; }
  .font-hero { grid-template-columns: 1fr; }
  .w-row { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 560px) {
  .bar { gap: 12px; }
  .card--large, .card--small { grid-column: span 12; }
  .logo-tiles { grid-template-columns: 1fr; }
  .dls li { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .dl-size { display: none; }
  .palette { flex-direction: column; }
  .pal { min-height: 64px; }
}
