/* Úvodní a informační stránky. */

.wrap { width: min(var(--page-max), 100% - 32px); margin-inline: auto; }
.wrap-narrow { width: min(780px, 100% - 32px); }
.site { min-height: 100dvh; display: flex; flex-direction: column; }
.site > main { flex: 1; }

/* Motivová ikona */
.only-dark { display: none; }
:root[data-theme="dark"] .only-dark { display: block; }
:root[data-theme="dark"] .only-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .only-dark { display: block; }
  :root:not([data-theme="light"]) .only-light { display: none; }
}

/* ---------- Hlavička ---------- */
.site-head { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.6) blur(12px); border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent); }
.site-head-in { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.brand:hover { color: var(--text); }
.brand b { font-weight: 800; color: var(--accent-text); }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; box-shadow: 0 2px 8px rgb(37 99 235 / 0.25); }
.site-head-brand { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.site-nav { display: flex; align-items: center; gap: var(--sp-1); }
.site-nav > a { color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 14px; padding: 8px 12px; border-radius: var(--r-md); }
.site-nav > a:hover { color: var(--text); background: var(--surface-3); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(32px, 6vw, 72px) 0 clamp(40px, 7vw, 88px); }
.hero::before {
  content: ''; position: absolute; inset: -40% -10% auto; height: 120%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 50% at 78% 40%, rgb(59 130 246 / 0.16), transparent 70%),
    radial-gradient(35% 45% at 12% 10%, rgb(245 158 11 / 0.10), transparent 70%);
}
.hero-in { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; margin-bottom: var(--sp-4); padding: 5px 12px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent-text); font-size: 13px; font-weight: 600; }
.hero h1 { font-size: clamp(34px, 5.2vw, 58px); font-weight: 800; letter-spacing: -0.025em; margin-bottom: var(--sp-4); }
.lead { font-size: clamp(16px, 1.6vw, 19px); color: var(--text-2); line-height: 1.6; max-width: 36em; }
.trust { list-style: none; padding: 0; margin: var(--sp-6) 0 0; display: grid; grid-template-columns: repeat(3, auto); gap: var(--sp-4); justify-content: start; }
.trust li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-3); line-height: 1.35; }
.trust li b { color: var(--text); font-size: 14px; }
.trust .icon { color: var(--accent); margin-top: 2px; }

.hero-drop { display: grid; gap: var(--sp-3); }
.drop {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  min-height: 330px; padding: var(--sp-8) var(--sp-6);
  background: var(--surface); border: 2px dashed color-mix(in srgb, var(--accent) 45%, var(--border)); border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg); cursor: pointer; outline: none;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.drop:hover, .drop:focus-visible, .drop.is-over { border-color: var(--accent); background: color-mix(in srgb, var(--accent-soft) 60%, var(--surface)); }
.drop:focus-visible { box-shadow: var(--shadow-lg), var(--focus-ring); }
.drop.is-over { transform: scale(1.01); }
.drop-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: var(--accent-soft); color: var(--accent); margin-bottom: var(--sp-4); }
.drop-icon .icon { width: 30px; height: 30px; stroke-width: 1.7; }
.drop-title { font-family: var(--font-display); font-size: 24px; font-weight: 600; margin: 0; }
.drop-or { color: var(--text-3); margin: 6px 0 12px; font-size: 14px; }
.drop-note { margin: var(--sp-4) 0 0; font-size: 13px; color: var(--text-3); }
.drop.is-busy { pointer-events: none; }
.drop.is-busy > * { opacity: 0.35; }
.drop.is-busy::after { content: ''; position: absolute; width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--accent-soft-2); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
.hero-alt { text-align: center; margin: 0; }
/* Vyfotit dokument – jen na dotykových zařízeních (fotoaparát) */
.hero-scan { display: none; margin: var(--sp-3) 0 var(--sp-2); }
.hero-scan .btn { width: 100%; justify-content: center; }
@media (pointer: coarse) { .hero-scan { display: block; } }
.recent { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 10px 10px 8px; box-shadow: var(--shadow-sm); }
.recent-title { display: flex; align-items: center; gap: 6px; margin: 0 4px 6px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.recent-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.recent-item { display: flex; align-items: center; gap: 4px; }
.recent-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: var(--r-md); color: var(--text); text-decoration: none; }
.recent-link:hover { background: var(--surface-3); }
.recent-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 14px; }
.recent-exp { flex: none; font-size: 12px; color: var(--text-3); }
.recent-more { display: block; margin: 4px 8px 2px; font-size: 13px; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--text-2); font-size: 14px; font-weight: 600; padding: 6px 10px; border-radius: var(--r-sm); }
.link-btn:hover { color: var(--accent-text); background: var(--accent-soft); }

/* ---------- Sekce ---------- */
.section { padding: clamp(40px, 6vw, 80px) 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--border); }
.section-title { font-size: clamp(26px, 3.2vw, 36px); font-weight: 800; text-align: center; }
.section-lead { text-align: center; color: var(--text-2); margin-bottom: var(--sp-8); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); }
.feature { padding: var(--sp-5); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease); }
.feature:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.feature h3 { font-size: 17px; margin: var(--sp-3) 0 6px; }
.feature p { margin: 0; color: var(--text-2); font-size: 14px; }
.feature-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); flex: none; }

.steps { list-style: none; padding: 0; margin: var(--sp-8) 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); counter-reset: none; }
.steps li { text-align: center; padding: 0 var(--sp-2); }
.step-n { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 19px; margin-bottom: var(--sp-3); box-shadow: 0 4px 14px rgb(37 99 235 / 0.3); }
.steps h3 { font-size: 18px; margin-bottom: 6px; }
.steps p { color: var(--text-2); font-size: 14px; margin: 0; }

.privacy-band { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--sp-8); align-items: center; }
.privacy-band .section-title { text-align: left; }
.privacy-band p { color: var(--text-2); }
.privacy-points { list-style: none; margin: 0; padding: var(--sp-6); display: grid; gap: var(--sp-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-md); }
.privacy-points li { display: flex; align-items: center; gap: var(--sp-3); font-weight: 600; }
.privacy-points .icon { color: var(--success); }

.faq { display: grid; gap: var(--sp-3); margin-top: var(--sp-6); }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 0 var(--sp-5); }
.section-alt .faq details { background: var(--surface-2); }
.faq summary { cursor: pointer; list-style: none; padding: var(--sp-4) 0; font-weight: 600; display: flex; justify-content: space-between; gap: var(--sp-3); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 22px; line-height: 1; color: var(--text-3); transition: transform var(--dur) var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--text-2); margin: 0 0 var(--sp-4); }

/* ---------- Patička ---------- */
.site-foot { border-top: 1px solid var(--border); padding: var(--sp-8) 0; background: var(--surface-2); font-size: 14px; }
.site-foot-in { display: grid; grid-template-columns: 1fr auto; gap: var(--sp-4) var(--sp-8); align-items: center; }
.foot-brand { display: flex; gap: var(--sp-3); align-items: center; color: var(--text-2); }
.foot-brand .logo-mark { width: 30px; height: 30px; }
.foot-brand b { color: var(--text); }
.foot-nav { display: flex; flex-wrap: wrap; gap: var(--sp-4); }
.foot-nav a { color: var(--text-2); text-decoration: none; font-weight: 600; }
.foot-nav a:hover { color: var(--accent-text); }
.foot-note { grid-column: 1 / -1; color: var(--text-3); font-size: 13px; margin: 0; }
.foot-ver { margin-left: 6px; padding: 1px 8px; border-radius: var(--r-pill); background: var(--surface-3); color: var(--text-2); font-size: 12px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.foot-ver:hover { color: var(--accent-text); background: var(--accent-soft); }
.foot-tools { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--sp-4) var(--sp-6); padding-top: var(--sp-4); border-top: 1px solid var(--border); }
.foot-h { margin: 0 0 var(--sp-2); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.foot-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.foot-tools a { color: var(--text-2); text-decoration: none; font-size: 13.5px; display: inline-block; padding: 2px 0; }
.foot-tools a:hover { color: var(--accent-text); text-decoration: underline; }

/* ---------- Stránky úkolů ---------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: var(--sp-3); font-size: 13.5px; color: var(--text-3); }
.crumbs a { color: var(--text-2); text-decoration: none; font-weight: 600; }
.crumbs a:hover { color: var(--accent-text); }
.features-4 { grid-template-columns: repeat(4, 1fr); }
.feature.has-link { position: relative; }
.feature.has-link h3 a { color: inherit; text-decoration: none; }
.feature.has-link h3 a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; } /* celá karta je odkaz */
.feature.has-link h3 a:hover, .feature.has-link h3 a:focus-visible { color: var(--accent-text); }
.feature.has-link:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.related { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }
.related-all:nth-child(odd) { grid-column: 1 / -1; } /* lichý počet: odkaz na editor přes celou šířku */
.related-item { display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); color: var(--text); text-decoration: none; transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.related-item:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); box-shadow: var(--shadow-md); }
.related-item b { display: block; margin-bottom: 2px; }
.related-item small { display: block; color: var(--text-2); font-size: 13.5px; line-height: 1.45; }

/* ---------- Textové stránky ---------- */
.prose h1 { font-size: clamp(30px, 4vw, 42px); font-weight: 800; }
.prose h2 { font-size: 22px; margin-top: var(--sp-8); }
.prose p, .prose li { color: var(--text-2); }
.prose .lead { color: var(--text-2); }
.prose code { font-family: var(--font-mono); font-size: 0.9em; background: var(--surface-3); padding: 1px 6px; border-radius: 6px; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 4px 0; }
.center { text-align: center; }
.big-code { font-family: var(--font-display); font-size: 88px; font-weight: 800; color: var(--accent); line-height: 1; margin: 0 0 var(--sp-4); }
.help-tools { display: grid; gap: var(--sp-4); }
.help-tool { display: flex; gap: var(--sp-4); align-items: flex-start; padding: var(--sp-4); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.help-tool h3 { font-size: 16px; margin: 0 0 4px; display: flex; gap: 8px; align-items: center; }
.help-tool p { margin: 0; font-size: 14px; }
.help-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--sp-2) var(--sp-6); }
.help-links h3 { font-size: 15px; margin: var(--sp-3) 0 var(--sp-1); }
.help-links ul { margin: 0; }
.keys { border-collapse: collapse; width: 100%; }
.keys td { padding: 8px 10px; border-bottom: 1px solid var(--border); color: var(--text-2); }
.keys td:first-child { width: 45%; }

/* ---------- Seznam změn ---------- */
.changelog .crumbs { margin-bottom: var(--sp-2); justify-content: flex-start; } /* textová stránka: vlevo i na mobilu */
.release { margin-top: var(--sp-8); padding: var(--sp-5) var(--sp-6) var(--sp-6); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-xs); scroll-margin-top: var(--sp-6); }
.release-head { display: flex; align-items: center; gap: var(--sp-4); }
.release-ver { display: grid; place-items: center; flex: none; min-width: 58px; height: 58px; padding: 0 10px; border-radius: 16px; background: var(--accent-soft-2); color: var(--accent-text); font-family: var(--font-display); font-size: 24px; font-weight: 800; }
.prose .release-head h2 { margin: 0; font-size: 22px; }
.prose .release-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 2px 0 0; color: var(--text-3); font-size: 14px; }
.release-tag { padding: 1px 9px; border-radius: var(--r-pill); background: var(--success-soft); color: var(--success); font-size: 12px; font-weight: 700; }
.prose .release-summary { margin: var(--sp-4) 0 0; }
.release-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-5) var(--sp-6); margin-top: var(--sp-5); }
.release-group h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 16px; }
.release-group h3 .icon { color: var(--accent); }
.prose .release-group ul { margin: 0; }
.prose .release-group li { font-size: 14.5px; line-height: 1.5; }
.prose .changelog-note { margin-top: var(--sp-6); font-size: 14px; }
@media (max-width: 720px) {
  .release { padding: var(--sp-4); }
  .release-groups { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Přetahování souboru ---------- */
.drag-overlay { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, transparent); backdrop-filter: blur(3px); pointer-events: none; }
.drag-overlay-in { display: grid; justify-items: center; gap: var(--sp-3); padding: var(--sp-8) var(--sp-10); background: var(--surface); border: 2px dashed var(--accent); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); font-weight: 600; font-size: 18px; color: var(--accent-text); }
.drag-overlay-in p { margin: 0; }

.app-root { position: fixed; inset: 0; z-index: 100; background: var(--canvas); }
.app-loading { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: var(--sp-4); color: var(--text-2); }
.app-loading .logo-mark { width: 56px; height: 56px; }
body.has-app { overflow: hidden; }
body.has-app .site { display: none; }

/* ---------- Responzivita ---------- */
@media (max-width: 960px) {
  .hero-in { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .lead { margin-inline: auto; }
  .trust { justify-content: center; grid-template-columns: repeat(3, minmax(0, auto)); }
  .trust li { text-align: left; }
  .features, .features-4 { grid-template-columns: repeat(2, 1fr); }
  .privacy-band { grid-template-columns: 1fr; }
  .crumbs { justify-content: center; }
}
@media (max-width: 640px) {
  .site-nav > a { display: none; }
  .trust { grid-template-columns: 1fr; justify-content: stretch; max-width: 280px; margin-inline: auto; }
  .features, .features-4 { grid-template-columns: 1fr; }
  .related { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .drop { min-height: 270px; }
  .site-foot-in { grid-template-columns: 1fr; }
}

/* Údaj, který musí majitel doplnit před spuštěním (jen na stagingu) */
.todo { background: #fef3c7; color: #92400e; padding: 0 4px; border-radius: 4px; font-weight: 600; }

/* odkazy vzhledu tlačítka bez podtržení (např. stránka 404) */
a.btn { text-decoration: none; }
