/* ==========================================================================
   Aktuálně.tech v3 – design systém
   tokeny → základ → hlavička → komponenty → homepage → článek → archivy → dark → responsive
   ========================================================================== */

:root {
  --bg: #F7F8FA;
  --surface: #FFFFFF;
  --surface-2: #F1F3F7;
  --ink: #0F172A;
  --ink-2: #475569;
  --ink-3: #64748B;
  --line: #E2E8F0;
  --dark: #0B1020;
  --dark-2: #131A2E;

  --brand: #2563EB;
  --brand-ink: #1D4ED8;
  --brand-soft: #EFF4FF;
  --live: #EF4444;
  --spark: #F97316;

  --cat-tech: #2563EB;
  --cat-zdravi: #10B981;
  --cat-bydleni: #F59E0B;
  --cat-finance: #0EA5E9;
  --cat-cestovani: #14B8A6;
  --cat-kultura: #A855F7;
  --cat-sport: #F97316;
  --cat-novinky: #64748B;

  --font-heading: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --fs-xs: .75rem;
  --fs-sm: .875rem;
  --fs-md: 1rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.5625rem;
  --fs-2xl: 1.953rem;
  --fs-4xl: clamp(1.9rem, 1rem + 3vw, 3.4rem);

  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .18);
  --shell: 1200px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Základ ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -.02em;
  margin: 0;
  overflow-wrap: break-word;
}
p { margin: 0; }
button { font: inherit; cursor: pointer; color: inherit; }
mark { background: color-mix(in srgb, var(--brand) 18%, transparent); color: inherit; border-radius: 3px; padding: 0 .1em; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.icon { width: 18px; height: 18px; flex-shrink: 0; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed !important; top: 8px; left: 8px; width: auto; height: auto; clip: auto; z-index: 100; padding: .7rem 1rem; background: var(--brand); color: #fff; border-radius: 10px; }

.shell { width: min(100% - 2.5rem, var(--shell)); margin-inline: auto; }
.site-main { min-height: 50vh; }

.eyebrow {
  display: block;
  font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3);
}

/* ---------- Hlavička ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 16, 32, .94);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.admin-bar .site-header { top: 32px; }
.site-header__inner { display: flex; align-items: center; gap: 1.75rem; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; flex-shrink: 0; color: #fff; }
.brand__mark { width: 34px; height: 34px; }
.brand__word { font-family: var(--font-heading); font-weight: 700; font-size: 1.3rem; letter-spacing: -.03em; }
.brand__word span { color: #93B4FF; }

.nav { display: flex; gap: .2rem; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .45rem .75rem; border-radius: 999px;
  font-size: var(--fs-sm); font-weight: 500; color: rgba(255, 255, 255, .78);
  white-space: nowrap;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.nav a::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--brand)); }
.nav a:hover, .nav a[aria-current] { background: rgba(255, 255, 255, .09); color: #fff; }

.header-actions { display: flex; gap: .5rem; margin-left: auto; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 12px; border: 1px solid rgba(255, 255, 255, .14);
  background: transparent; color: #fff;
  transition: background .2s var(--ease);
}
.icon-btn:hover { background: rgba(255, 255, 255, .09); }
.icon-btn--menu { display: none; }
.icon--sun, .icon--close { display: none; }
[data-theme="dark"] .icon--moon { display: none; }
[data-theme="dark"] .icon--sun { display: block; }
.icon-btn[aria-expanded="true"] .icon--open { display: none; }
.icon-btn[aria-expanded="true"] .icon--close { display: block; }

.header-search { background: var(--dark-2); border-top: 1px solid rgba(255, 255, 255, .06); padding-block: 1rem; }
.header-search .search-form { max-width: 720px; }
.progress { position: absolute; left: 0; bottom: -1px; height: 3px; width: 0; background: var(--c, var(--brand)); }

/* ---------- Vyhledávací formulář ---------- */
.search-form { display: flex; gap: .5rem; width: 100%; }
.search-form__field { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; }
.search-form__field .icon { position: absolute; left: 14px; color: var(--ink-3); pointer-events: none; }
.search-field {
  width: 100%; height: 48px; padding: 0 1rem 0 2.6rem; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit;
}
.search-field:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.header-search .search-field { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); color: #fff; }
.header-search .search-field::placeholder { color: rgba(255, 255, 255, .5); }

/* ---------- Ticker ---------- */
.ticker { background: var(--dark-2); color: #CBD5E1; font-size: var(--fs-sm); }
.ticker__inner { display: flex; align-items: center; gap: 1rem; height: 44px; }
.ticker__label {
  display: inline-flex; align-items: center; gap: .5rem; flex-shrink: 0;
  font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: #fff;
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .6); } 70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } }
.ticker__track { overflow: hidden; flex: 1; min-width: 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker__items { display: flex; gap: 2.5rem; width: max-content; animation: marquee 60s linear infinite; }
.ticker__track:hover .ticker__items, .ticker__track:focus-within .ticker__items { animation-play-state: paused; }
.ticker__items a { white-space: nowrap; transition: color .2s; }
.ticker__items a:hover { color: #fff; }
.ticker__items b { font-family: var(--font-mono); color: #93B4FF; margin-right: .5rem; font-weight: 500; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Badge + meta ---------- */
.badge {
  display: inline-flex; align-items: center; gap: .4rem; align-self: flex-start;
  font-family: var(--font-mono); font-size: .7rem; font-weight: 700; line-height: 1.4;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--c, var(--brand));
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--solid { color: #fff; background: var(--c, var(--brand)); padding: .35rem .7rem; border-radius: 999px; }
.badge--solid::before { background: rgba(255, 255, 255, .8); }
a.badge:hover { text-decoration: underline; text-underline-offset: 3px; }

.meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .7rem; font-size: var(--fs-xs); color: var(--ink-3); }
.meta__author { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; color: var(--ink-2); font-size: var(--fs-sm); }
.meta__author img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
a.meta__author:hover { color: var(--brand-ink); }
.meta__sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }

/* ---------- Sekce ---------- */
.section { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section--tight { padding-top: 0; }
.section--flush { padding-top: 1rem; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; }
.section-head h2 { font-size: var(--fs-2xl); display: flex; align-items: center; gap: .6rem; }
.section-head p { color: var(--ink-3); margin-top: .35rem; }
.section-head__link { font-size: var(--fs-sm); font-weight: 600; color: var(--brand-ink); display: inline-flex; gap: .3rem; align-items: center; white-space: nowrap; }
.section-head__link .icon { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.section-head__link:hover .icon { transform: translateX(3px); }
.icon--spark { width: 26px; height: 26px; color: var(--spark); }

/* ---------- Karta ---------- */
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card__media, .mini__media { position: relative; overflow: hidden; background: var(--surface-2); }
.card__media { aspect-ratio: 16 / 10; }
.card__media img, .mini__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card__media img { transform: scale(1.04); }
.media-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: var(--c, var(--brand)); background: color-mix(in srgb, var(--c, var(--brand)) 10%, var(--surface-2)); }
.media-fallback .icon { width: 36px; height: 36px; opacity: .7; }
.card__body { display: flex; flex-direction: column; gap: .55rem; padding: 1.1rem 1.2rem 1.25rem; flex: 1; }
.card__title { font-size: var(--fs-lg); }
.card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card:hover .card__title { color: var(--brand-ink); }
.card__excerpt { color: var(--ink-2); font-size: var(--fs-sm); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { margin-top: auto; padding-top: .25rem; }
.card__accent { position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--c); z-index: 2; }

.card--row { display: grid; grid-template-columns: 1.25fr 1fr; }
.card--row .card__media { aspect-ratio: auto; min-height: 320px; }
.card--row .card__body { padding: clamp(1.25rem, 3vw, 2.25rem); justify-content: center; gap: .8rem; }
.card--row .card__title { font-size: var(--fs-2xl); }
.card--row .card__excerpt { font-size: var(--fs-md); -webkit-line-clamp: 4; }
.card--row .meta { margin-top: .5rem; }

.mini { position: relative; display: grid; grid-template-columns: 104px 1fr; gap: .9rem; align-items: center; }
.mini__media { aspect-ratio: 1; border-radius: 12px; }
.mini:hover .mini__media img { transform: scale(1.06); }
.mini__body { display: grid; gap: .3rem; min-width: 0; }
.mini__title { font-size: var(--fs-md); line-height: 1.3; }
.mini__title a::after { content: ""; position: absolute; inset: 0; }
.mini:hover .mini__title { color: var(--brand-ink); }

/* ---------- Hero ---------- */
.hero { padding-top: 2rem; }
.hero__grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 1.5rem; }
.hero-main {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  min-height: 520px; display: flex; align-items: flex-end; isolation: isolate;
  color: #fff; background: var(--dark);
}
.hero-main > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1s var(--ease); }
.hero-main:hover > img { transform: scale(1.03); }
.hero-main::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(11, 16, 32, 0) 25%, rgba(11, 16, 32, .6) 58%, rgba(11, 16, 32, .94) 100%);
}
.hero-main__content { padding: clamp(1.5rem, 3vw, 2.5rem); display: grid; gap: 1rem; max-width: 46rem; }
.hero-main h1 { font-size: var(--fs-4xl); }
.hero-main h1 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.hero-main p { color: rgba(255, 255, 255, .86); font-size: 1.125rem; line-height: 1.55; max-width: 38rem; }
.hero-main .meta, .hero-main .meta__author { color: rgba(255, 255, 255, .82); }
.hero-main .meta__author img { width: 32px; height: 32px; border: 2px solid rgba(255, 255, 255, .7); }

.hero-side { display: grid; gap: .9rem; align-content: start; }
.hero-side .eyebrow { display: flex; align-items: center; gap: .6rem; font-weight: 700; }
.hero-side .eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.hero-side .mini { padding: .7rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: box-shadow .3s var(--ease); }
.hero-side .mini:hover { box-shadow: var(--shadow); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

/* ---------- Rubriky (tmavá sekce) ---------- */
.topics { background: var(--dark); color: #fff; position: relative; overflow: hidden; }
.topics::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(147, 180, 255, .18) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse at 85% 0%, #000 0%, transparent 65%);
  mask-image: radial-gradient(ellipse at 85% 0%, #000 0%, transparent 65%);
}
.topics .section-head h2 { color: #fff; }
.topics .section-head p { color: #94A3B8; }
.topics__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; position: relative; }
.topic {
  position: relative; padding: 1.35rem; border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
  border: 1px solid rgba(255, 255, 255, .09);
  display: grid; gap: .55rem; align-content: start; min-height: 190px;
  transition: transform .3s var(--ease), border-color .3s var(--ease), background .3s;
}
.topic:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--c) 60%, transparent); background: linear-gradient(160deg, color-mix(in srgb, var(--c) 20%, transparent), rgba(255, 255, 255, .02)); }
.topic__name { font-family: var(--font-heading); font-weight: 700; font-size: var(--fs-lg); }
.topic__desc { color: #94A3B8; font-size: var(--fs-sm); line-height: 1.5; }
.topic__count { margin-top: auto; font-family: var(--font-mono); font-size: var(--fs-xs); color: #CBD5E1; }
.cat-icon { width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; color: var(--c, var(--brand)); background: color-mix(in srgb, var(--c, var(--brand)) 14%, transparent); flex-shrink: 0; }
.cat-icon .icon { width: 20px; height: 20px; }
.topic .cat-icon { background: color-mix(in srgb, var(--c) 24%, transparent); }
.cat-icon--lg { width: 64px; height: 64px; border-radius: 18px; }
.cat-icon--lg .icon { width: 30px; height: 30px; }

/* ---------- Bloky rubrik ---------- */
.cat-blocks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.cat-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.4rem; display: grid; gap: 1.1rem; align-content: start; position: relative; overflow: hidden; }
.cat-block::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--c); }
.cat-block__head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.cat-block__head h3 { display: flex; align-items: center; gap: .6rem; font-size: var(--fs-xl); }
.cat-block__lead { position: relative; display: grid; gap: .7rem; }
.cat-block__lead .card__media { border-radius: 12px; }
.cat-block__lead img { transition: transform .6s var(--ease); }
.cat-block__lead:hover img { transform: scale(1.04); }
.cat-block__lead h4 { font-size: var(--fs-lg); line-height: 1.25; }
.cat-block__lead h4 a::after { content: ""; position: absolute; inset: 0; }
.cat-block__lead:hover h4 { color: var(--c); }
.cat-block ul { list-style: none; margin: 0; padding: 0; display: grid; }
.cat-block li { border-top: 1px solid var(--line); }
.cat-block li a { display: block; padding: .75rem 0; font-weight: 500; font-size: var(--fs-sm); line-height: 1.4; transition: color .2s; }
.cat-block li a:hover { color: var(--c); }

/* ---------- Tipy + newsletter ---------- */
.split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: start; }
.section-head--rule { border-top: 3px solid var(--ink); padding-top: .85rem; margin-bottom: .25rem; }
.section-head--rule h2 { font-size: var(--fs-xl); letter-spacing: -.01em; }
.top-list { list-style: none; margin: 0; padding: 0; counter-reset: top; display: grid; }
.top-list li { counter-increment: top; position: relative; display: grid; grid-template-columns: 1.75rem 1fr 128px; gap: 1.25rem; align-items: start; padding: 1.15rem 0; border-bottom: 1px solid var(--line); }
.top-list li:last-child { border-bottom: 0; }
.top-list li::before { content: counter(top); font-family: var(--font-body); font-weight: 600; font-size: 1.5rem; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; color: var(--ink-3); padding-top: .15rem; transition: color .2s; }
.top-list li:hover::before { color: var(--ink); }
.top-list__body { min-width: 0; }
.top-list__cat { display: block; font-size: .6875rem; font-weight: 600; line-height: 1.2; letter-spacing: .07em; text-transform: uppercase; color: var(--c, var(--brand)); }
.top-list h3 { font-size: 1.0625rem; font-weight: 600; line-height: 1.35; letter-spacing: -.005em; margin-top: .35rem; }
.top-list h3 a { text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: text-decoration-color .2s; }
.top-list li:hover h3 a { text-decoration-color: currentColor; }
.top-list h3 a::after { content: ""; position: absolute; inset: 0; }
.top-list__meta { display: block; margin-top: .45rem; font-size: var(--fs-xs); color: var(--ink-3); }
.top-list img { width: 128px; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 4px; }
[data-theme="dark"] .top-list__cat { color: color-mix(in srgb, var(--c, var(--brand)) 65%, #fff); }

.newsletter {
  position: sticky; top: 92px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 2rem; display: grid; gap: 1rem; box-shadow: var(--shadow);
  background-image: radial-gradient(circle at 100% 0%, var(--brand-soft), transparent 45%);
}
.newsletter h2 { font-size: var(--fs-2xl); }
.newsletter p { color: var(--ink-2); }
.newsletter__form { display: grid; gap: .6rem; }
.newsletter__row { display: flex; gap: .5rem; }
.newsletter__legal { color: var(--ink-3); font-size: var(--fs-xs); line-height: 1.5; }
.newsletter__legal a { text-decoration: underline; }
.newsletter__msg { font-weight: 600; font-size: var(--fs-sm); padding: .6rem .8rem; border-radius: 10px; }
.newsletter__msg.is-ok { background: #ECFDF5; color: #065F46; }
.newsletter__msg.is-err { background: #FEF2F2; color: #991B1B; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.input { flex: 1; min-width: 0; height: 48px; padding: 0 1rem; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); font: inherit; color: var(--ink); }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 1.3rem; border-radius: 12px; border: 0; background: var(--brand); color: #fff; font-weight: 600; transition: background .2s, transform .2s; white-space: nowrap; }
.btn:hover { background: var(--brand-ink); }
.btn:active { transform: scale(.98); }

/* ---------- Redakce ---------- */
.team { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.person { display: flex; gap: 1rem; align-items: center; padding: 1.25rem; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); transition: box-shadow .3s var(--ease), transform .3s var(--ease); }
.person:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.person img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.person__name { display: block; font-family: var(--font-heading); font-weight: 700; font-size: var(--fs-lg); }
.person__bio { display: block; color: var(--ink-3); font-size: var(--fs-sm); line-height: 1.45; }

/* ---------- Patička ---------- */
.site-footer { background: var(--dark); color: #94A3B8; padding-top: 3.5rem; font-size: var(--fs-sm); margin-top: 2rem; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; padding-bottom: 2.5rem; }
.footer__title { font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 1rem; }
.footer__grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.footer__grid a:hover { color: #fff; }
.footer__about { display: grid; gap: 1rem; max-width: 22rem; align-content: start; }
.socials { display: flex; gap: .5rem; }
.socials a { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .12); }
.socials a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.socials .icon { width: 16px; height: 16px; }
.footer__bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding-block: 1.25rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: var(--fs-xs); }

/* ==========================================================================
   ČLÁNEK
   ========================================================================== */
.article-head { padding-top: 2.5rem; }
.article-head__inner { max-width: 820px; margin-inline: auto; display: grid; gap: 1.1rem; }
.breadcrumb { display: flex; gap: .5rem; font-size: var(--fs-sm); color: var(--ink-3); flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--brand-ink); text-decoration: underline; }
.article-head h1 { font-size: var(--fs-4xl); }
.lead { font-size: var(--fs-lg); color: var(--ink-2); line-height: 1.55; }
.article-meta { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding-block: 1rem; border-block: 1px solid var(--line); }
.article-meta .meta__author img { width: 36px; height: 36px; }
.share { display: flex; gap: .4rem; }
.share a, .share button { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); display: grid; place-items: center; transition: color .2s, border-color .2s; }
.share a:hover, .share button:hover { color: var(--brand); border-color: var(--brand); }
.share .icon { width: 16px; height: 16px; }
.share button.is-copied { color: #10B981; border-color: #10B981; }

.article-figure { max-width: 1100px; margin: 2rem auto 0; }
.article-figure img { width: 100%; max-height: 620px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-lg); }
.article-figure figcaption { font-size: var(--fs-xs); color: var(--ink-3); margin-top: .6rem; text-align: right; }

.article-layout { display: grid; grid-template-columns: 220px minmax(0, 700px) 240px; gap: 3rem; justify-content: center; padding-block: 3rem 1rem; }
.article-layout--no-toc { grid-template-columns: minmax(0, 700px) 240px; }
.toc { position: sticky; top: 100px; align-self: start; font-size: var(--fs-sm); max-height: calc(100vh - 120px); overflow-y: auto; }
.toc__title, .toc-mobile summary { font-family: var(--font-mono); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); margin-bottom: .8rem; }
.toc ol, .toc-mobile ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc a, .toc-mobile a { display: block; padding: .38rem 0 .38rem 1rem; margin-left: -2px; border-left: 2px solid transparent; color: var(--ink-3); line-height: 1.35; transition: color .2s, border-color .2s; }
.toc .toc__l3 a, .toc-mobile .toc__l3 a { padding-left: 1.8rem; font-size: .8125rem; }
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--c, var(--brand)); border-left-color: var(--c, var(--brand)); font-weight: 600; }
.toc-mobile { display: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: 1.5rem; }
.toc-mobile summary { cursor: pointer; margin: 0; font-weight: 700; color: var(--ink-2); }
.toc-mobile[open] summary { margin-bottom: .8rem; }

/* Obsah článku (Gutenberg) */
.prose { font-size: 1.125rem; line-height: 1.75; color: #1E293B; }
.prose > * + * { margin-top: 1.25rem; }
.prose h2 { font-size: var(--fs-2xl); margin-top: 2.6rem; }
.prose h3 { font-size: var(--fs-xl); margin-top: 2rem; }
.prose h4 { font-size: var(--fs-lg); margin-top: 1.6rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li + li { margin-top: .45rem; }
.prose li::marker { color: var(--c, var(--brand)); font-weight: 700; }
.prose a { color: var(--brand-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose strong { color: var(--ink); }
.prose img { border-radius: 12px; }
.prose figure { margin-inline: 0; }
.prose figcaption, .prose .wp-element-caption { font-size: var(--fs-sm); color: var(--ink-3); margin-top: .5rem; text-align: center; }
.prose blockquote { margin-inline: 0; padding: 1.1rem 1.4rem; border-left: 4px solid var(--c, var(--brand)); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; font-size: 1.15rem; color: var(--ink-2); }
.prose blockquote p + p { margin-top: .6rem; }
.prose hr { border: 0; height: 1px; background: var(--line); margin-block: 2.5rem; }
.prose code { font-family: var(--font-mono); font-size: .9em; background: var(--surface-2); padding: .1em .35em; border-radius: 5px; }
.prose pre { background: var(--dark); color: #E2E8F0; padding: 1rem 1.2rem; border-radius: var(--radius); overflow-x: auto; font-size: .9rem; }
.prose pre code { background: none; padding: 0; }
.prose iframe, .prose video { max-width: 100%; border-radius: 12px; }
.prose .wp-block-embed__wrapper { position: relative; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; line-height: 1.5; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.prose .wp-block-table, .prose figure:has(> table) { overflow-x: auto; }
.prose th, .prose td { padding: .7rem .9rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose thead th, .prose tr:first-child th { background: var(--surface-2); font-family: var(--font-heading); font-weight: 700; color: var(--ink); }
.prose tr:last-child td { border-bottom: 0; }
.prose .wp-block-button__link { display: inline-flex; padding: .8rem 1.3rem; border-radius: 12px; background: var(--brand); color: #fff; text-decoration: none; font-weight: 600; }
.prose .wp-block-button__link:hover { background: var(--brand-ink); }
.prose .aligncenter { margin-inline: auto; }
.prose .alignleft { float: left; margin: .3rem 1.5rem 1rem 0; max-width: 50%; }
.prose .alignright { float: right; margin: .3rem 0 1rem 1.5rem; max-width: 50%; }
.prose::after { content: ""; display: table; clear: both; }

.author-box { display: grid; grid-template-columns: 80px 1fr; gap: 1.25rem; padding: 1.6rem; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); margin-top: 3rem; }
.author-box img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; }
.author-box h2 { margin: .2rem 0 .4rem; font-size: var(--fs-xl); }
.author-box h2 a:hover { color: var(--brand-ink); }
.author-box p { color: var(--ink-2); line-height: 1.6; }

.aside-sticky { position: sticky; top: 100px; align-self: start; display: grid; gap: 1rem; }
.aside-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; display: grid; gap: .7rem; font-size: var(--fs-sm); }
.aside-card h2 { font-size: var(--fs-lg); }
.aside-card p { color: var(--ink-2); }
.aside-card .newsletter__row { flex-direction: column; }
.related { background: var(--surface); border-top: 1px solid var(--line); margin-top: 3rem; }

/* ==========================================================================
   ARCHIVY, HLEDÁNÍ, STRÁNKY, 404
   ========================================================================== */
.page-hero { display: flex; gap: 1.5rem; align-items: center; padding-block: 2.75rem 1.5rem; }
.page-hero > div { display: grid; gap: .55rem; }
.page-hero h1 { font-size: var(--fs-4xl); }
.page-hero p { color: var(--ink-2); font-size: var(--fs-lg); max-width: 46rem; }
.page-hero__count { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--ink-3); }
.page-hero__search { margin-top: .75rem; max-width: 640px; }
.page-hero--author img { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; border: 4px solid var(--surface); box-shadow: var(--shadow); }
.archive-lead { margin-bottom: 1.5rem; }

.results { display: grid; gap: 1rem; max-width: 900px; }
.result { display: grid; grid-template-columns: 200px 1fr; gap: 1.25rem; align-items: start; padding: 1rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.result__media img { width: 100%; aspect-ratio: 16 / 11; object-fit: cover; border-radius: 10px; }
.result > div { display: grid; gap: .45rem; }
.result h2 { font-size: var(--fs-lg); }
.result h2 a:hover { color: var(--brand-ink); }
.result p { color: var(--ink-2); font-size: var(--fs-sm); }

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--ink-2); display: grid; gap: .5rem; }

.page-article { max-width: 780px; padding-block: 2.75rem 2rem; }
.page-article__head { margin-bottom: 2rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.page-article__head h1 { font-size: var(--fs-4xl); }

.error-page { text-align: center; padding-block: 4rem 3rem; display: grid; gap: 1rem; justify-items: center; }
.error-page__code { font-family: var(--font-heading); font-weight: 700; font-size: clamp(5rem, 18vw, 10rem); line-height: 1; color: transparent; -webkit-text-stroke: 2px var(--brand); }
.error-page h1 { font-size: var(--fs-2xl); }
.error-page p { color: var(--ink-2); max-width: 36rem; }
.error-page__search { width: min(100%, 560px); margin-top: .5rem; }
.error-page__links { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: .5rem; }
.error-page__links a { padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: var(--fs-sm); font-weight: 600; color: var(--c); }
.error-page__links a:hover { border-color: var(--c); }

/* Stránkování */
.pagination { margin-top: 2.5rem; }
.nav-links { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; }
.page-numbers { min-width: 42px; height: 42px; padding: 0 .9rem; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: var(--fs-sm); transition: border-color .2s, color .2s; }
a.page-numbers:hover { border-color: var(--brand); color: var(--brand-ink); }
.page-numbers.current { background: var(--brand); border-color: var(--brand); color: #fff; }
.page-numbers.dots { border: 0; background: none; }

/* ---------- Animace ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   TMAVÝ REŽIM
   ========================================================================== */
[data-theme="dark"] {
  --bg: #0B1020;
  --surface: #131A2E;
  --surface-2: #1B2340;
  --ink: #E6EAF2;
  --ink-2: #A9B4C7;
  --ink-3: #7C8AA3;
  --line: #222B45;
  --brand-ink: #93B4FF;
  --brand-soft: #172554;
  --dark: #070B17;
  --dark-2: #0E1426;
  color-scheme: dark;
}
[data-theme="dark"] .prose { color: #D3DAE6; }
[data-theme="dark"] .newsletter__msg.is-ok { background: #052E23; color: #A7F3D0; }
[data-theme="dark"] .newsletter__msg.is-err { background: #3B0D0D; color: #FECACA; }
[data-theme="dark"] .btn, [data-theme="dark"] .page-numbers.current { background: #2563EB; }
[data-theme="dark"] .card:hover .card__title, [data-theme="dark"] .mini:hover .mini__title { color: #BFD0FF; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1100px) {
  .article-layout, .article-layout--no-toc { grid-template-columns: minmax(0, 720px); }
  .toc, .aside-sticky { display: none; }
  .toc-mobile { display: block; }
  .topics__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .hero__grid, .split { grid-template-columns: 1fr; }
  .hero-main { min-height: 440px; }
  .grid-3, .cat-blocks { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .newsletter { position: static; }
  .card--row { grid-template-columns: 1fr; }
  .card--row .card__media { min-height: 0; aspect-ratio: 16 / 9; }
}
@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}
@media (max-width: 720px) {
  .shell { width: min(100% - 2rem, var(--shell)); }
  .nav { display: none; }
  .icon-btn--menu { display: grid; }
  .nav.is-open {
    display: flex; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0;
    background: var(--dark); padding: .75rem 1rem 1.25rem; gap: .15rem;
    border-bottom: 1px solid rgba(255, 255, 255, .08); max-height: calc(100vh - 68px); overflow-y: auto;
  }
  .nav.is-open a { font-size: var(--fs-md); padding: .8rem .9rem; }
  .site-header__inner { gap: .75rem; }
  .brand__word { font-size: 1.15rem; }
  .grid-3, .cat-blocks, .topics__grid { grid-template-columns: 1fr; }
  .hero { padding-top: 1.25rem; }
  .hero-main { min-height: 420px; }
  .hero-main p { font-size: var(--fs-md); }
  .top-list li { grid-template-columns: 1.4rem 1fr 88px; gap: .85rem; padding: 1rem 0; }
  .top-list li::before { font-size: 1.375rem; }
  .top-list h3 { font-size: 1rem; }
  .top-list img { width: 88px; }
  .newsletter { padding: 1.5rem; }
  .newsletter__row { flex-direction: column; }
  .footer__grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .page-hero { flex-direction: column; align-items: flex-start; padding-top: 2rem; }
  .result { grid-template-columns: 96px 1fr; gap: .9rem; }
  .result p { display: none; }
  .article-meta { flex-direction: column; align-items: flex-start; }
  .prose { font-size: 1.0625rem; }
  .prose .alignleft, .prose .alignright { float: none; margin: 0; max-width: 100%; }
  .author-box { grid-template-columns: 56px 1fr; padding: 1.2rem; }
  .author-box img { width: 56px; height: 56px; }
  .search-form { flex-direction: column; }
}
