/* ============================================================
   1t.cz – design system
   ============================================================ */
:root {
  --bg: #ffffff;
  --bg-soft: #f5f7fb;
  --bg-tint: #eef3fb;
  --text: #0f172a;
  --muted: #5b6b85;
  --line: #e3e8f0;
  --brand: #1e88e5;
  --brand-dk: #1565c0;
  --accent: #ff6b35;
  --gold: #f5a623;
  --green: #2e7d32;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 14px 40px rgba(15, 23, 42, 0.12);
  --container: 1180px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: var(--font);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; height: auto; display: block; }
img[width][height] { aspect-ratio: attr(width) / attr(height); }
a { color: var(--brand-dk); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.sr, .skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--brand); color: #fff; padding: .6rem 1rem; border-radius: 8px; z-index: 999; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 1.25rem; }
h1 { font-size: clamp(1.8rem, 1.2rem + 1.5vw, 2.6rem); line-height: 1.18; letter-spacing: -.01em; margin: 0 0 .8rem; font-family: var(--font-display); }
h2 { font-size: clamp(1.3rem, 1rem + .8vw, 1.7rem); line-height: 1.25; margin: 1.6rem 0 .8rem; }
h3 { font-size: 1.15rem; margin: 1.2rem 0 .6rem; }
p { margin: 0 0 1rem; }
.lede { font-size: 1.12rem; color: var(--muted); margin: .2rem 0 1rem; max-width: 60ch; }

/* ============================ Header ============================ */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(8px);
  background: rgba(255, 255, 255, .92);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: 64px; }
.brand { display: inline-flex; align-items: baseline; font-weight: 800; font-size: 1.5rem; color: var(--text); text-decoration: none; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand-mark { background: linear-gradient(135deg, var(--brand), var(--brand-dk)); color: #fff; padding: 2px 10px; border-radius: 8px; margin-right: 2px; }
.brand-name { color: var(--brand-dk); }
.mainnav ul { display: flex; flex-wrap: wrap; gap: .25rem 1rem; list-style: none; margin: 0; padding: 0; }
.mainnav a { color: var(--text); font-weight: 500; font-size: .96rem; padding: .4rem .6rem; border-radius: 6px; }
.mainnav a:hover { background: var(--bg-tint); color: var(--brand-dk); text-decoration: none; }
.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; flex-direction: column; gap: 4px; width: 40px; height: 40px; background: transparent; border: 1px solid var(--line); border-radius: 8px; align-items: center; justify-content: center; cursor: pointer; }
  .nav-toggle span:not(.sr) { width: 18px; height: 2px; background: var(--text); display: block; border-radius: 2px; }
  .mainnav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 1rem 1.25rem; box-shadow: var(--shadow-md); }
  .mainnav.open { display: block; }
  .mainnav ul { flex-direction: column; gap: .25rem; }
  .mainnav a { padding: .65rem .6rem; display: block; }
}

/* ============================ Layout ============================ */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2.5rem; padding-top: 2rem; padding-bottom: 4rem; align-items: start; }
.layout > .content, .layout > .article { min-width: 0; }
.sidebar { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; padding-right: 4px; }
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
@media (max-width: 1024px) {
  .layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .sidebar { position: static; max-height: none; }
}

/* ============================ Page head ============================ */
.page-head { margin-bottom: 1.5rem; }
.page-head-home { padding: 1.5rem 0 .5rem; }

/* ============================ Cards grid ============================ */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.grid-cards-3 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.2rem; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease, border-color .15s; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #d4dbe5; }
.card-media { display: block; aspect-ratio: 16 / 9; background: var(--bg-soft); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.card:hover .card-media img { transform: scale(1.04); }
.card-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--muted); font-weight: 700; letter-spacing: .1em; }
.card-body { padding: 1rem 1.1rem 1.1rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.card-title { margin: 0; font-size: 1.08rem; line-height: 1.35; font-weight: 700; }
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--brand-dk); text-decoration: none; }
.card-excerpt { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; gap: 1rem; align-items: center; margin: auto 0 0; padding-top: .4rem; color: var(--muted); font-size: .85rem; }

/* ============================ Breadcrumbs ============================ */
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: .3rem; list-style: none; padding: 0; margin: 0 0 1.2rem; font-size: .9rem; color: var(--muted); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--brand-dk); }
.breadcrumbs .sep { color: var(--line); margin-left: .25rem; }
.breadcrumbs [aria-current="page"] { color: var(--text); font-weight: 500; }

/* ============================ Article ============================ */
.article-head { margin-bottom: 1.5rem; }
.article-cat { display: inline-block; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--brand-dk); background: var(--bg-tint); padding: .25rem .65rem; border-radius: 999px; margin-bottom: .8rem; }
.article-meta { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; color: var(--muted); font-size: .92rem; }
.article-meta .dot { opacity: .6; }
.article-meta .rating { color: var(--text); font-weight: 600; }
.article-meta .rating .muted { font-weight: 400; }
.article-hero { margin: 1.5rem 0 2rem; }
.article-hero img { border-radius: var(--radius); width: 100%; aspect-ratio: 16 / 9; object-fit: cover; box-shadow: var(--shadow-sm); }
/* ----- TL;DR / Rychlá odpověď box ----- */
.tldr {
  margin: 1.8rem 0;
  padding: 1.2rem 1.4rem;
  background: linear-gradient(135deg, #fff7e6, #fffbf0);
  border-left: 5px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(245, 166, 35, 0.08);
}
.tldr-label {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #b46a00;
  margin-bottom: .35rem;
}
.tldr p {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.6;
  color: var(--text);
  font-weight: 500;
}

.article-body { font-size: 1.08rem; line-height: 1.75; color: var(--text); }
.article-body h2 { margin-top: 2.4rem; padding-top: .4rem; }
.article-body h3 { margin-top: 1.8rem; }
.article-body p, .article-body ul, .article-body ol { margin: 0 0 1.2rem; }
.article-body ul, .article-body ol { padding-left: 1.4rem; }
.article-body li { margin-bottom: .4rem; }
.article-body figure { margin: 2rem 0; }
.article-body figure img { border-radius: var(--radius); margin: 0 auto; box-shadow: var(--shadow-sm); }
.article-body figcaption { text-align: center; color: var(--muted); font-size: .9rem; margin-top: .6rem; font-style: italic; }
.article-body blockquote { margin: 1.5rem 0; padding: 1rem 1.4rem; border-left: 4px solid var(--brand); background: var(--bg-soft); border-radius: var(--radius-sm); }
.article-body a { color: var(--brand-dk); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.article-body a:hover { color: var(--accent); }
.article-body img { border-radius: var(--radius-sm); }
.article-body table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .96rem; }
.article-body th, .article-body td { padding: .75rem 1rem; border-bottom: 1px solid var(--line); text-align: left; }
.article-body th { background: var(--bg-soft); }
.article-body iframe { max-width: 100%; border-radius: var(--radius-sm); margin: 1.5rem 0; aspect-ratio: 16/9; height: auto; }

/* ============================ FAQ ============================ */
.faq { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.faq h2 { margin-top: 0; }
.faq-list { margin: 1rem 0 0; padding: 0; }
.faq-item {
  margin: 0 0 .9rem;
  padding: 1rem 1.2rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .15s, box-shadow .15s;
}
.faq-item:hover { border-color: #d4dbe5; box-shadow: var(--shadow-sm); }
.faq-item dt {
  font-weight: 600;
  font-size: 1.04rem;
  color: var(--text);
  margin-bottom: .5rem;
  position: relative;
  padding-left: 1.5rem;
  line-height: 1.4;
}
.faq-item dt::before {
  content: "?";
  position: absolute;
  left: 0; top: 0;
  width: 1.1rem; height: 1.1rem;
  background: var(--brand); color: #fff;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700;
  line-height: 1;
}
.faq-item dd { margin: 0 0 0 1.5rem; color: var(--text); font-size: .98rem; line-height: 1.6; }

/* ============================ Related ============================ */
.related { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.related h2 { margin-top: 0; }

/* ============================ Comments ============================ */
.comments { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.comments h2 { margin-top: 0; }
.comments-count { color: var(--muted); font-weight: 400; font-size: .92rem; }
.comment-list, .comment-children { list-style: none; padding: 0; margin: 0; }
.comment-children { padding-left: 1.6rem; border-left: 2px solid var(--bg-tint); margin: 1rem 0; }
.comment { padding: 1.1rem 0; border-bottom: 1px solid var(--bg-tint); }
.comment:last-child { border-bottom: 0; }
.comment-head { display: flex; align-items: center; gap: .65rem; margin-bottom: .4rem; }
.comment-avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-dk)); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .95rem; flex: 0 0 36px; }
.comment-author { font-weight: 600; color: var(--text); }
.comment-date { color: var(--muted); font-size: .85rem; margin-left: auto; }
.comment-body { color: var(--text); margin: 0; }
.comments-note { margin-top: 1.5rem; padding: 1rem 1.2rem; background: var(--bg-soft); color: var(--muted); border-radius: var(--radius-sm); font-size: .92rem; text-align: center; }

/* ============================ Sidebar ============================ */
.sb { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.15rem; margin-bottom: 1.25rem; box-shadow: var(--shadow-sm); }
.sb-h { display: flex; align-items: center; gap: .6rem; margin: 0 0 .4rem; }
.sb-h h2 { margin: 0; font-size: 1.08rem; line-height: 1.2; }
.sb-h-simple { margin: 0 0 .8rem; font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.sb-icon { font-size: 1.2rem; line-height: 1; }
.sb-lede { color: var(--muted); font-size: .9rem; margin: 0 0 .8rem; line-height: 1.5; }

.sb-rank { list-style: none; padding: 0; margin: 0 0 .8rem; counter-reset: rank; }
.sb-rank li { margin: 0; border-radius: var(--radius-sm); transition: background .15s; }
.sb-rank li:hover { background: var(--bg-tint); }
.sb-rank a { display: flex; gap: .65rem; padding: .55rem; color: var(--text); align-items: center; text-decoration: none; }
.sb-rank a:hover { text-decoration: none; }
.sb-rank-pos { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 50%; background: var(--bg-tint); color: var(--brand-dk); font-weight: 700; font-size: .85rem; display: inline-flex; align-items: center; justify-content: center; }
.sb-rank li:first-child .sb-rank-pos { background: var(--gold); color: #fff; }
.sb-rank li:nth-child(2) .sb-rank-pos { background: #b0b8c4; color: #fff; }
.sb-rank li:nth-child(3) .sb-rank-pos { background: #cd7f32; color: #fff; }
.sb-rank-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sb-rank-title { font-weight: 600; font-size: .95rem; }
.sb-rank-badge { font-size: .78rem; color: var(--green); font-weight: 600; }
.sb-rank-compact a { padding: .4rem .55rem; }

.sb-cta { display: block; text-align: center; background: var(--brand); color: #fff; padding: .65rem 1rem; border-radius: var(--radius-sm); font-weight: 600; font-size: .95rem; transition: background .15s; }
.sb-cta:hover { background: var(--brand-dk); text-decoration: none; color: #fff; }
.sb-cta-mini { padding: .5rem 1rem; font-size: .88rem; }

.sb-list { list-style: none; padding: 0; margin: 0; }
.sb-list li { border-bottom: 1px solid var(--bg-tint); }
.sb-list li:last-child { border-bottom: 0; }
.sb-list a { display: flex; gap: .65rem; padding: .55rem .25rem; color: var(--text); align-items: flex-start; }
.sb-list a:hover { color: var(--brand-dk); text-decoration: none; }
.sb-num { color: var(--brand); font-weight: 700; font-size: .85rem; flex: 0 0 22px; padding-top: 2px; }
.sb-pop-title { font-size: .93rem; line-height: 1.4; }

/* ============================ Search ============================ */
.sb-search { padding: 1rem 1.1rem .9rem; }
.search-form { display: flex; gap: .4rem; }
.search-input-wrap { position: relative; flex: 1; display: flex; gap: .4rem; }
.search-form input[type="search"] {
  flex: 1; min-width: 0;
  padding: .58rem .75rem;
  font: inherit; font-size: .95rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.search-form input[type="search"]:focus {
  outline: none;
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.12);
}
.search-form input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-form button {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; height: 42px;
  background: var(--brand); color: #fff;
  border: 0; border-radius: var(--radius-sm);
  cursor: pointer;
  font: inherit; font-weight: 600;
  padding: 0 .9rem;
  transition: background .15s;
}
.search-form button:hover { background: var(--brand-dk); }
.search-form-sb button { padding: 0; }

.search-suggest {
  position: absolute;
  top: calc(100% + 4px); left: 0; right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  z-index: 30;
  margin: 0; padding: .3rem;
  list-style: none;
  max-height: 360px;
  overflow-y: auto;
}
.search-suggest li { margin: 0; }
.search-suggest a {
  display: block;
  padding: .55rem .65rem;
  color: var(--text);
  border-radius: 6px;
  font-size: .92rem;
  line-height: 1.35;
}
.search-suggest a:hover,
.search-suggest li[aria-selected="true"] a {
  background: var(--bg-tint);
  text-decoration: none;
  color: var(--brand-dk);
}
.search-suggest mark { background: #fff7d6; color: var(--text); padding: 0 2px; border-radius: 3px; }

/* main search page */
.search-form-main {
  display: flex; gap: .5rem;
  margin: 0 0 2rem;
  padding: 1.1rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.search-form-main input[type="search"] {
  background: #fff;
  font-size: 1.05rem;
  padding: .75rem 1rem;
}
.search-form-main button { padding: 0 1.4rem; font-size: 1rem; }

.search-results { list-style: none; padding: 0; margin: 1rem 0 2rem; }
.search-result { margin: 0; border-bottom: 1px solid var(--bg-tint); }
.search-result:last-child { border-bottom: 0; }
.search-result-link { display: block; padding: 1.1rem .25rem; color: inherit; }
.search-result-link:hover { background: var(--bg-soft); text-decoration: none; }
.search-result h2 { font-size: 1.15rem; margin: 0 0 .25rem; color: var(--brand-dk); line-height: 1.35; }
.search-result-link:hover h2 { text-decoration: underline; }
.search-result-url { color: var(--green); font-size: .82rem; margin: 0 0 .35rem; word-break: break-all; }
.search-result-excerpt { color: var(--text); font-size: .96rem; line-height: 1.55; margin: 0 0 .45rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.search-result-meta { color: var(--muted); font-size: .85rem; margin: 0; display: flex; gap: 1rem; }
.search-results mark, .search-result mark { background: #fff7d6; color: var(--text); padding: 1px 3px; border-radius: 3px; font-weight: 600; }

.search-empty {
  padding: 2rem 1.5rem;
  background: var(--bg-soft);
  border-radius: var(--radius);
  text-align: center;
}
.search-empty ul { display: inline-block; text-align: left; margin: .8rem 0 0; }

/* ============================ Categories grid ============================ */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.2rem; margin-top: 1rem; }
.cat-tile { display: block; padding: 1.4rem 1.3rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); transition: transform .15s, box-shadow .15s, border-color .15s; }
.cat-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--brand); text-decoration: none; }
.cat-tile h2 { margin: 0 0 .4rem; font-size: 1.2rem; }
.cat-tile p { color: var(--muted); font-size: .93rem; margin: 0 0 .6rem; }
.cat-tile-count { display: inline-block; padding: .2rem .55rem; background: var(--bg-tint); color: var(--brand-dk); border-radius: 999px; font-size: .78rem; font-weight: 600; }

/* ============================ Pagination ============================ */
.pagination ul { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; padding: 0; margin: 2.5rem 0 0; justify-content: center; }
.pagination a, .pagination span { display: inline-flex; min-width: 38px; height: 38px; padding: 0 .65rem; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid var(--line); color: var(--text); font-weight: 500; }
.pagination a:hover { background: var(--bg-tint); border-color: var(--brand); text-decoration: none; }
.pagination .current { background: var(--brand); color: #fff; border-color: var(--brand); }
.pagination .dots { border: 0; padding: 0 .35rem; }

/* ============================ Buttons ============================ */
.btn { display: inline-block; background: var(--brand); color: #fff; padding: .7rem 1.4rem; border-radius: 8px; font-weight: 600; text-decoration: none; }
.btn:hover { background: var(--brand-dk); text-decoration: none; color: #fff; }

/* ============================ Footer ============================ */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 3rem 0 1.5rem; margin-top: 4rem; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 2rem; padding-bottom: 2rem; }
.footer-grid h3 { color: var(--text); font-size: .95rem; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 .8rem; }
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li { margin-bottom: .35rem; }
.link-list a { color: var(--muted); font-size: .93rem; }
.link-list a:hover { color: var(--brand-dk); }
.footer-disclaimer {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 2fr;
  gap: 2rem;
  padding: 1.4rem 1.25rem;
  margin-top: 0;
  border-top: 1px solid var(--line);
  font-size: .87rem;
  line-height: 1.55;
  color: var(--muted);
}
.footer-disclaimer p { margin: 0; }
.footer-company strong { color: var(--text); font-weight: 600; }
@media (max-width: 700px) {
  .footer-disclaimer { grid-template-columns: 1fr; gap: 1rem; }
}
.footer-bottom { padding-top: 1.2rem; border-top: 1px solid var(--line); font-size: .85rem; }
.footer-bottom p { margin: 0; }

/* ============================ Print ============================ */
@media print {
  .site-header, .sidebar, .comments, .related, .pagination, .nav-toggle, .site-footer { display: none !important; }
  .layout { grid-template-columns: 1fr; }
  body { font-size: 12pt; }
}
