:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --ink: #1d1b16;
  --muted: #6b665c;
  --line: #e4dfd4;
  --dot: #d9d3c6;
  --accent: #e4572e;
  --accent-ink: #ffffff;
  --code: #f0ece3;
  --shadow: 0 1px 2px rgb(29 27 22 / 6%), 0 8px 24px rgb(29 27 22 / 6%);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14130f;
    --surface: #1d1c17;
    --ink: #f1ede4;
    --muted: #a39d90;
    --line: #2f2d26;
    --dot: #2c2a23;
    --accent: #f06a42;
    --accent-ink: #14130f;
    --code: #24221c;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}
a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
.grid {
  position: fixed; inset: 0; z-index: -1;
  background-image: radial-gradient(var(--dot) 1.2px, transparent 1.2px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 40%, transparent 85%);
}
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: clamp(56px, 12vh, 120px); padding-bottom: 40px; }

.badge {
  display: inline-block; margin: 0 0 20px; padding: 4px 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--muted); font-size: 13px; letter-spacing: .02em;
}
h1 {
  margin: 0; font-size: clamp(52px, 11vw, 112px); line-height: 1; letter-spacing: -.045em; font-weight: 800;
  min-height: 1em;
}
.lead { margin: 22px 0 0; font-size: clamp(20px, 3vw, 26px); line-height: 1.35; font-weight: 600; max-width: 30ch; min-height: 1.35em; }
.sub { margin: 12px 0 0; color: var(--muted); max-width: 52ch; min-height: 1.6em; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 0; }
.btn {
  display: inline-flex; align-items: center; min-height: 46px; padding: 0 20px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  font-weight: 600; text-decoration: none; box-shadow: var(--shadow);
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { color: var(--accent-ink); filter: brightness(1.05); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 72px 0 0; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 22px; box-shadow: var(--shadow);
}
.card .num { font: 600 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--accent); }
.card h2 { margin: 10px 0 6px; font-size: 19px; letter-spacing: -.01em; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

.prompt {
  margin: 20px 0 0; padding: 18px 20px; border-radius: 16px;
  border: 1px dashed var(--line); background: color-mix(in srgb, var(--surface) 70%, transparent);
}
.prompt .label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.prompt .row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.prompt code {
  flex: 1 1 280px; min-width: 0; overflow-wrap: anywhere;
  font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--code); padding: 10px 12px; border-radius: 10px;
}
.copy, .link { font: inherit; cursor: pointer; }
.copy {
  min-height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-weight: 600; font-size: 15px;
}
.link { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }

.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 24px; padding-bottom: 40px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }

@media (max-width: 760px) {
  .cards { grid-template-columns: 1fr; margin-top: 48px; }
}

/* Swarm: kurzory, ktere stranku stavi */
.js .b.pending { opacity: 0; transform: translateY(6px); }
.b { transition: opacity .45s ease, transform .45s ease; }
.swarm { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; z-index: 50; }
.cur { position: absolute; left: 0; top: 0; will-change: transform; transition: opacity .6s ease; }
.cur svg { display: block; width: 22px; height: 22px; filter: drop-shadow(0 1px 1px rgb(0 0 0 / 25%)); }
.cur .tag {
  position: absolute; left: 16px; top: 18px; white-space: nowrap;
  padding: 2px 8px; border-radius: 6px; color: #fff; font: 600 12px/1.5 ui-sans-serif, system-ui, sans-serif;
}
.sel {
  position: absolute; border: 1.5px solid; border-radius: 6px; pointer-events: none;
  transition: opacity .35s ease;
}
.sel::after {
  content: ""; position: absolute; right: -4px; bottom: -4px; width: 7px; height: 7px;
  background: #fff; border: 1.5px solid currentColor; border-radius: 2px;
}
.caret { display: inline-block; width: 2px; height: .9em; margin-left: 2px; vertical-align: -.08em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .b { transition: none; }
}
