@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=Public+Sans:wght@400;500;600&display=swap');

:root {
  --paper: #faf7ef;
  --ink: #22262b;
  --muted: #6b6558;
  --gold: #c98a2b;
  --teal: #2b6e68;
  --line: #ddd5c2;
  --paper-raised: #f3efe3;
}

* { box-sizing: border-box; }

html {
  scroll-padding-top: 2rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

header.site-header {
  border-bottom: 1px solid var(--line);
  padding: 2.25rem 0 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
}

.brand svg { flex-shrink: 0; }

.brand-name {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
}

.tagline {
  margin: 0.35rem 0 1.1rem;
  color: var(--muted);
  font-size: 0.98rem;
}

nav.site-nav {
  display: flex;
  gap: 1.5rem;
}

nav.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding-bottom: 0.2rem;
  border-bottom: 2px solid transparent;
}

nav.site-nav a:hover,
nav.site-nav a[aria-current="page"] {
  border-bottom-color: var(--gold);
}

main {
  padding: 2.25rem 0 3rem;
}

h1.page-title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: 2rem;
  line-height: 1.2;
  margin: 0 0 1rem;
}

.featured {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.75rem 1.75rem 1.5rem;
  margin-bottom: 2.5rem;
}

.featured .kicker {
  color: var(--teal);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.featured h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.5rem;
  margin: 0 0 0.75rem;
  line-height: 1.3;
}

.featured p { margin: 0 0 0.9rem; }

details.answer {
  margin-top: 1rem;
}

details.answer summary {
  cursor: pointer;
  color: var(--teal);
  font-weight: 600;
  font-size: 0.95rem;
  list-style: none;
}

details.answer summary::-webkit-details-marker { display: none; }

details.answer summary::before {
  content: "▸ ";
}

details.answer[open] summary::before {
  content: "▾ ";
}

details.answer .answer-body {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px dashed var(--line);
  color: var(--ink);
}

.intro-text {
  color: var(--muted);
  margin-bottom: 2rem;
}

section.recent h3.section-label {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 1.15rem;
  margin: 0 0 0.75rem;
}

.entry-row {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.entry-row:last-child { border-bottom: 1px solid var(--line); }

.entry-date {
  flex: 0 0 auto;
  width: 5.5rem;
  color: var(--muted);
  font-size: 0.88rem;
  padding-top: 0.15rem;
}

.entry-body h4 {
  margin: 0 0 0.3rem;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 1.05rem;
}

.entry-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.archive-entry {
  padding: 1.4rem 0;
  border-top: 1px solid var(--line);
}

.archive-entry:last-child { border-bottom: 1px solid var(--line); }

.archive-entry .entry-date {
  width: auto;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.archive-entry h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
}

.tag-pill {
  display: inline-block;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.5;
}

.tag-logika    { background: #dfe9e7; color: #1c5a55; }
.tag-matematika { background: #f1e3c4; color: #8a5a1d; }
.tag-smekalka  { background: #eae5d8; color: #55503f; }
.tag-slova     { background: #e9d9dc; color: #7a4a52; }

.category-group {
  margin-bottom: 2rem;
}

.category-group h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.3rem;
  margin: 0 0 0.9rem;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.category-group .count {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 400;
}

.category-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.category-list li {
  padding: 0.55rem 0;
  border-top: 1px solid var(--line);
}

.category-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.category-list a {
  text-decoration: none;
  font-weight: 500;
}

.faq-item {
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
}

.faq-item:last-child { border-bottom: 1px solid var(--line); }

.faq-item h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
}

.faq-item p { margin: 0; color: var(--muted); }

.about-text p { margin: 0 0 1rem; }

footer.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}

a { color: var(--teal); }

@media (max-width: 480px) {
  h1.page-title { font-size: 1.6rem; }
  .featured { padding: 1.35rem 1.25rem; }
}
