/* =========================================================
   Financial Education — Contemporary Chambers design system
   Deep teal accent (#1F5F6B), warm light palette
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght,SOFT@0,9..144,300..900,0..100;1,9..144,300..900,0..100&family=Inter:ital,opsz,wght@0,14..32,300..700;1,14..32,400..600&display=swap');

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img,picture,svg,video { display: block; max-width: 100%; }
input,button,textarea,select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }

:root {
  --bg: #F7F3E8;
  --surface: #FDFAF0;
  --surface-elevated: #FFFDF5;
  --text: #131413;
  --text-muted: #4A4E4C;
  --text-subtle: #6F7571;
  --accent: #1F5F6B;
  --accent-2: #2A7480;
  --accent-soft: rgba(31,95,107,0.10);
  --accent-ink: #133E46;
  --gold: #8E7340;
  --gold-soft: rgba(142,115,64,0.14);
  --divider: rgba(19,20,19,0.09);
  --divider-strong: rgba(19,20,19,0.18);
  --paper: #F4EFE0;
  --font-display: 'Fraunces', 'Georgia', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-w: 1240px;
  --max-narrow: 880px;
  --gutter: clamp(20px, 4vw, 56px);
  --radius: 4px;
  --radius-lg: 8px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151614;
    --surface: #1D1F1D;
    --surface-elevated: #262925;
    --text: #F0EBDC;
    --text-muted: #B3B5AF;
    --text-subtle: #7E817B;
    --divider: rgba(240,235,220,0.08);
    --divider-strong: rgba(240,235,220,0.16);
    --accent: #7AC0CC;
    --accent-2: #9AD4DF;
    --accent-soft: rgba(122,192,204,0.14);
    --accent-ink: #388090;
    --gold: #B59B5E;
    --gold-soft: rgba(181,155,94,0.18);
  }
}

html,body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-optical-sizing: auto;
  font-size: 17px;
  line-height: 1.55;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: .45;
  mix-blend-mode: multiply;
}
@media (prefers-color-scheme: dark) {
  body::before { mix-blend-mode: overlay; opacity: .35; }
}

h1,h2,h3,h4 {
  font-family: var(--font-display);
  font-weight: 450;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: clamp(2.2rem, 7vw, 3.6rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.6rem, 5vw, 2.4rem); margin: 2rem 0 1rem; }
h3 { font-size: clamp(1.2rem, 3vw, 1.6rem); margin: 1.5rem 0 0.75rem; font-weight: 500; }
h4 { font-size: 1.1rem; font-weight: 500; margin: 1.25rem 0 0.6rem; }

em { font-style: italic; color: var(--accent); }
strong { font-weight: 600; }

p { margin-bottom: 1rem; }
ul, ol { margin: 1rem 0 1rem 1.5rem; }
li { margin-bottom: 0.6rem; }

table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
thead { background: var(--accent); color: white; }
th { padding: 0.8rem; font-weight: 600; text-align: left; }
td { padding: 0.8rem; border-bottom: 1px solid var(--divider); }
tbody tr:nth-child(even) { background: var(--accent-soft); }
tbody tr:hover { background: rgba(31,95,107,0.15); }

.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: var(--accent);
  width: calc(var(--progress, 0) * 1%);
  z-index: 999;
  transition: width 150ms ease-out;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container-narrow {
  max-width: var(--max-narrow);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Navigation */
.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--divider);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.navbar .container {
  padding: 0 var(--gutter);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--accent);
  white-space: nowrap;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-menu a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 180ms ease-out;
  border-radius: var(--radius);
}

.nav-menu a:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

@media (max-width: 768px) {
  .nav-menu { gap: 0.25rem; }
  .nav-menu a { padding: 0.4rem 0.8rem; font-size: 0.85rem; }
  .logo { font-size: 1.1rem; }
}

/* Hero / Category Header */
.hero, .category-header {
  background: var(--surface-elevated);
  padding: clamp(2rem, 8vw, 4rem) var(--gutter);
}

.hero .container, .category-header .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.subtitle {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--divider);
}

.hero-meta span {
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
}

.hero-meta strong {
  font-size: 1.3rem;
  color: var(--accent);
  display: block;
}

.hero-visual {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.hero-visual img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.tag {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background: rgba(31,95,107,0.9);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-lg);
  font-size: 0.75rem;
  font-weight: 600;
}

@media (max-width: 768px) {
  .hero .container, .category-header .container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero-meta {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Info Banner */
.info-banner {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-left: 4px solid var(--accent);
  padding: 1.25rem var(--gutter);
}

.info-banner .container {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.info-banner .icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  font-weight: bold;
  font-size: 0.85rem;
}

.info-banner p {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
}

/* Main content */
main {
  background: var(--surface);
  padding: 2rem 0;
}

article {
  padding: 0;
}

section {
  padding: 2rem var(--gutter);
  border-bottom: 1px solid var(--divider);
}

section:last-of-type {
  border-bottom: none;
}

article > * + section {
  margin-top: 0;
}

.disclaimer {
  background: var(--gold-soft);
  border: 1px solid var(--gold);
  border-left: 4px solid var(--gold);
  padding: 1.25rem;
  border-radius: var(--radius);
  margin: 2rem 0;
  font-size: 0.95rem;
}

.disclaimer strong {
  color: var(--accent-ink);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: all 320ms ease-out;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.95rem;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-2);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--divider);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.btn svg {
  width: 16px;
  height: 16px;
}

.hero-ctas, .header-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* Featured section */
.featured {
  background: var(--surface-elevated);
  padding: 3rem var(--gutter);
}

.featured .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  max-width: var(--max-w);
  margin: 0 auto;
}

.featured figure {
  margin: 0;
}

.featured img {
  width: 100%;
  border-radius: var(--radius-lg);
}

.pullquote {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pullquote blockquote {
  font-size: 1.4rem;
  font-style: italic;
  color: var(--accent-ink);
  margin: 0;
  line-height: 1.5;
}

.pullquote cite {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: normal;
}

@media (max-width: 768px) {
  .featured .container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .pullquote blockquote {
    font-size: 1.1rem;
  }
}

/* FAQ */
.faq-list {
  margin-top: 2rem;
}

details {
  margin-bottom: 1rem;
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  overflow: hidden;
}

summary {
  padding: 1rem 1.5rem;
  background: var(--surface);
  cursor: pointer;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  transition: background 180ms ease-out;
}

summary:hover {
  background: var(--accent-soft);
}

details[open] summary {
  background: var(--accent-soft);
  border-bottom: 1px solid var(--divider);
}

details p {
  padding: 0 1.5rem 1rem;
  margin: 0;
  color: var(--text-muted);
}

/* Footer */
.footer {
  background: var(--text);
  color: var(--paper);
  padding: 2rem var(--gutter);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: var(--max-w);
  margin: 0 auto 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-section h4 {
  color: white;
  font-size: 1rem;
  margin: 0 0 0.75rem;
}

.footer-section p {
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

.footer-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-section li {
  margin: 0.5rem 0;
}

.footer-section a {
  color: rgba(255,255,255,0.8);
  transition: color 180ms ease-out;
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0;
}

.colophon {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

.colophon span, .colophon a {
  color: rgba(255,255,255,0.7);
}

.colophon a:hover {
  color: white;
}

.footer-bottom p {
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  margin: 0;
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
  }
  .colophon {
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  :root {
    font-size: 16px;
  }

  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.3rem; }
  h3 { font-size: 1.1rem; }

  .container, .container-narrow {
    padding: 0 1.25rem;
  }

  main, section {
    padding: 1.5rem 1.25rem;
  }
}


/* ============ MOBILE TAP TARGETS + FONT-SIZE FIX ============ */
/* Min tap targets 44px, min font 14px pro všechny klikatelné elementy */
a, button, summary, .btn, .download-btn, input[type="submit"], input[type="button"] {
  min-height: 44px;
}
.nav-menu a {
  padding: 12px 10px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-size: 15px;
}
.footer-section a,
.footer-bottom a,
.colophon a {
  padding: 6px 0;
  display: inline-block;
  min-height: 32px;
  font-size: 14.5px;
}
.feature-num, .eyebrow, .colophon span, .colophon,
.footer-bottom, .footer-bottom p, .image-credits {
  font-size: 14px !important;
}
.footer { font-size: 14.5px !important; }
/* Small decorative labels ponecháváme, ale ne na interaktivních */
.category-arrow { font-size: 14px !important; padding: 8px 0; }


/* ============ MOBILE TAP TARGETS V2 — inline-block pro všechny <a> ============ */
/* Inline <a> elementy ignorují min-height. Musí být inline-block/block. */
a {
  display: inline-block;
  min-height: 44px;
  line-height: 1.5;
  padding: 6px 4px;
}
/* Ale some element kombinace potřebují povolit normal flow — konkrétní overrides */
.pullquote cite,
.hero h1 em, .hero h1 a em,
blockquote em, h1 em, h2 em, h3 em, p em,
.colophon::before, .eyebrow::before {
  display: inline;
  min-height: 0;
  padding: 0;
}
/* Body inline links v odstavcích — drží min-height přes padding */
p > a, li > a, figcaption > a {
  padding: 4px 2px;
  min-height: 44px;
  display: inline-block;
  vertical-align: middle;
}
/* Footer links — větší tap area */
.footer-section a,
.footer-bottom a,
.colophon a,
.colophon span,
.image-credits a {
  padding: 10px 6px !important;
  min-height: 44px !important;
  display: inline-block !important;
  line-height: 1.4;
}
/* Navbar a logo */
.logo {
  padding: 12px 0 !important;
  min-height: 44px !important;
  display: inline-flex !important;
}
.nav-menu a {
  padding: 14px 12px !important;
  min-height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
}
/* CTA arrows + category arrows — pseudo-tap via padding */
.category-arrow,
.hero-ctas a,
.btn, .btn-primary, .btn-ghost, .download-btn {
  min-height: 48px !important;
  padding: 14px 26px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
/* FAQ summary — už je tall but ensure */
summary { min-height: 48px !important; padding: 12px 0 !important; display: flex !important; }
