/* === Praktisch Vennootschapsrecht — Samenvatting === */
/* Modern, law-doc inspired styling. Mobile-first responsive. */

:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-soft: #555;
  --muted: #8a8a8a;
  --border: #e5e2db;
  --accent: #6b1f2b;
  --accent-soft: #f3e6e8;
  --accent-hover: #4d161f;
  --code-bg: #f4f1ec;
  --link: #6b1f2b;
  --highlight: #fff7c2;
  --def-bg: #f5f0ea;
  --def-border: #b8945e;
  --warn-bg: #fff4e6;
  --warn-border: #d97706;
  --tip-bg: #ecf6ec;
  --tip-border: #2f7d32;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 12px rgba(0,0,0,.06);
  --radius: 8px;
}

[data-theme="dark"] {
  --bg: #15171a;
  --surface: #1d2025;
  --text: #e8e6e1;
  --text-soft: #b5b2ad;
  --muted: #8a8580;
  --border: #2c2f35;
  --accent: #d4806c;
  --accent-soft: #2a1f1d;
  --accent-hover: #e5917d;
  --code-bg: #25282e;
  --link: #d4806c;
  --highlight: #5c4a1a;
  --def-bg: #2a241d;
  --def-border: #b8945e;
  --warn-bg: #2d2117;
  --warn-border: #d97706;
  --tip-bg: #1b2a1e;
  --tip-border: #4d9050;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 12px rgba(0,0,0,.4);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* === Header === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.site-title {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.site-title .subtitle {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 1px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-toggle, .menu-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.theme-toggle:hover, .menu-toggle:hover { background: var(--accent-soft); }

.menu-toggle { display: none; }

/* === Layout === */
.layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  max-width: 1400px;
  margin: 0 auto;
  gap: 2rem;
  padding: 0 1.5rem;
}

/* === Sidebar TOC === */
.sidebar {
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
  padding: 1.5rem 0.5rem 2rem 0;
}

.sidebar nav { font-size: 0.92rem; }

.sidebar-title {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 1.2rem 0 0.5rem 0.5rem;
  font-weight: 600;
}

.sidebar a {
  display: block;
  color: var(--text-soft);
  text-decoration: none;
  padding: 0.32rem 0.6rem;
  border-radius: 6px;
  border-left: 2px solid transparent;
  margin: 1px 0;
  font-weight: 400;
  transition: all 0.12s;
}

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

.sidebar a.active {
  color: var(--accent);
  background: var(--accent-soft);
  border-left-color: var(--accent);
  font-weight: 500;
}

.sidebar .toc-sub {
  margin-left: 0.5rem;
  font-size: 0.85rem;
}
.sidebar .toc-sub a { padding-left: 1.2rem; }

/* === Main content === */
main {
  padding: 2rem 0 6rem;
  max-width: 820px;
  min-width: 0;
}

main h1, main h2, main h3, main h4 {
  font-family: 'Lora', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
  line-height: 1.25;
}

main h1 {
  font-size: 2.3rem;
  margin: 0 0 0.5rem;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.5rem;
}
main h2 {
  font-size: 1.7rem;
  margin: 3rem 0 0.8rem;
  padding-top: 0.5rem;
}
main h3 {
  font-size: 1.25rem;
  margin: 2rem 0 0.6rem;
  color: var(--accent);
}
main h4 {
  font-size: 1.05rem;
  margin: 1.4rem 0 0.4rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
}

main p { margin: 0.8rem 0; }

main ul, main ol { padding-left: 1.5rem; margin: 0.6rem 0 0.8rem; }
main li { margin: 0.2rem 0; }

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

main a { color: var(--link); text-decoration: underline; text-decoration-color: rgba(107,31,43,0.3); text-underline-offset: 2px; }
main a:hover { text-decoration-color: var(--link); }

main code {
  background: var(--code-bg);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  font-family: 'JetBrains Mono', 'Menlo', monospace;
  font-size: 0.88em;
}

main blockquote {
  margin: 1.2rem 0;
  padding: 0.8rem 1.2rem;
  background: var(--def-bg);
  border-left: 4px solid var(--def-border);
  border-radius: 0 var(--radius) var(--radius) 0;
}

main blockquote p { margin: 0.4rem 0; }
main blockquote p:first-child { margin-top: 0; }
main blockquote p:last-child { margin-bottom: 0; }

/* Definition box */
.definitie, .definition {
  background: var(--def-bg);
  border-left: 4px solid var(--def-border);
  padding: 0.8rem 1.2rem;
  margin: 1.2rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.definitie::before, .definition::before {
  content: "DEFINITIE";
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--def-border);
  margin-bottom: 0.3rem;
}

/* Warning / let op */
.warn, .let-op {
  background: var(--warn-bg);
  border-left: 4px solid var(--warn-border);
  padding: 0.8rem 1.2rem;
  margin: 1.2rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.warn::before, .let-op::before {
  content: "⚠ LET OP";
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--warn-border);
  margin-bottom: 0.3rem;
}

/* Tip / examen */
.tip, .examen {
  background: var(--tip-bg);
  border-left: 4px solid var(--tip-border);
  padding: 0.8rem 1.2rem;
  margin: 1.2rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.tip::before, .examen::before {
  content: "💡 TIP";
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--tip-border);
  margin-bottom: 0.3rem;
}
.examen::before { content: "📌 EXAMEN"; }

/* Tables */
main table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.5rem 0;
  font-size: 0.92rem;
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  overflow: hidden;
}

main thead {
  background: var(--accent);
  color: white;
}

main th, main td {
  padding: 0.7rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

main th {
  font-weight: 600;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

main tbody tr { background: var(--surface); }
main tbody tr:nth-child(even) { background: var(--bg); }
main tbody tr:hover { background: var(--accent-soft); }

/* Article WVV references */
.wvv {
  display: inline-block;
  background: var(--code-bg);
  padding: 0.1em 0.5em;
  border-radius: 4px;
  font-size: 0.82em;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-soft);
  white-space: nowrap;
}

/* Hero card on index */
.hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem 2rem 1.6rem;
  margin: 0 0 2rem;
  box-shadow: var(--shadow);
}
.hero h1 {
  margin-top: 0;
  border-bottom: none;
  padding-bottom: 0;
}
.hero .lead {
  font-size: 1.05rem;
  color: var(--text-soft);
}
.hero .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.2rem;
}
.hero .badge {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0.25rem 0.7rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
}

/* Card grid for chapter nav */
.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.chapter-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  text-decoration: none;
  color: var(--text);
  transition: all 0.15s;
}
.chapter-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.chapter-card .num {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
  font-weight: 600;
}
.chapter-card h3 {
  margin: 0.3rem 0 0.4rem;
  font-size: 1.05rem;
  color: var(--text);
}
.chapter-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-soft);
  line-height: 1.5;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}
footer a { color: var(--text-soft); text-decoration: none; }
footer a:hover { color: var(--accent); }

/* Progress indicator (reading) */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--accent);
  z-index: 100;
  transition: width 0.1s;
  width: 0;
}

/* Mobile */
@media (max-width: 920px) {
  .layout {
    grid-template-columns: 1fr;
    padding: 0 1rem;
  }
  .sidebar {
    position: fixed;
    top: 56px;
    left: 0;
    bottom: 0;
    width: 280px;
    height: auto;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 1.2rem 1rem;
    transform: translateX(-100%);
    transition: transform 0.25s;
    z-index: 40;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 56px 0 0 0;
    background: rgba(0,0,0,0.4);
    z-index: 35;
  }
  .sidebar-overlay.show { display: block; }
  .menu-toggle { display: flex; }
  main { padding: 1rem 0 4rem; }
  main h1 { font-size: 1.7rem; }
  main h2 { font-size: 1.35rem; }
  main h3 { font-size: 1.1rem; }
}

/* Print styles */
@media print {
  .site-header, .sidebar, .theme-toggle, .menu-toggle, .progress-bar { display: none; }
  .layout { display: block; }
  main { max-width: 100%; padding: 0; }
  a { color: var(--text); text-decoration: none; }
}

/* Scrollbar */
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* === Book references (inline page links) === */
.book-ref {
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid transparent;
  padding: 0.05em 0.45em;
  border-radius: 5px;
  font: inherit;
  font-size: 0.93em;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s;
  text-decoration: none;
  line-height: 1.3;
}
.book-ref:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
  transform: translateY(-1px);
}
.book-ref svg { flex-shrink: 0; }

/* === Chapter banner — open in handboek === */
.book-banner {
  margin: 0 0 1.6rem;
  display: flex;
  justify-content: flex-start;
}
.book-banner-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.92rem;
  font-family: inherit;
  box-shadow: var(--shadow);
  transition: all 0.15s;
}
.book-banner-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}
.book-banner-btn svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

/* === Header book button === */
.book-open-btn {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: white;
  border-radius: var(--radius);
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.12s;
}
.book-open-btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* Hero open-book button */
.hero-actions { margin-top: 1.4rem; }
.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--accent);
  color: white;
  border: none;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: var(--shadow);
}
.hero-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}
.hero-btn svg { width: 16px; height: 16px; }

/* Card pages indicator */
.card-pages {
  margin-top: 0.6rem;
  font-size: 0.78rem;
  color: var(--muted);
}

/* === PDF Modal === */
.pdf-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2vh 2vw;
}
.pdf-modal[hidden] { display: none; }
.pdf-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.18s ease;
}
.pdf-modal-content {
  position: relative;
  background: var(--surface);
  width: 100%;
  max-width: 1200px;
  height: 96vh;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  animation: slideUp 0.22s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.pdf-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  gap: 1rem;
  flex-wrap: wrap;
}
.pdf-modal-title {
  font-family: 'Lora', serif;
  font-size: 0.95rem;
  color: var(--text);
}
.pdf-modal-title span { color: var(--text-soft); }
.pdf-modal-title strong { color: var(--accent); }

.pdf-modal-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.pdf-page-btn {
  background: var(--code-bg);
  border: 1px solid var(--border);
  color: var(--text);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
}
.pdf-page-btn:hover { background: var(--accent-soft); color: var(--accent); }
.pdf-page-input {
  width: 64px;
  text-align: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.5rem;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
}
.pdf-open-tab {
  font-size: 0.82rem;
  color: var(--text-soft);
  text-decoration: none;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.pdf-open-tab:hover { color: var(--accent); border-color: var(--accent); }

.pdf-modal-close {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
}
.pdf-modal-close:hover { background: var(--accent-soft); color: var(--accent); }

.pdf-modal-iframe {
  flex: 1;
  width: 100%;
  border: none;
  background: var(--code-bg);
}

@media (max-width: 700px) {
  .pdf-modal { padding: 0; }
  .pdf-modal-content { height: 100vh; max-width: 100vw; border-radius: 0; }
  .pdf-modal-header { padding: 0.5rem 0.7rem; }
  .pdf-modal-title { font-size: 0.82rem; flex: 1 1 100%; }
  .book-open-btn-label { display: none; }
}

/* === Pack badge (header) === */
.pack-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all 0.12s;
}
.pack-badge.locked {
  background: linear-gradient(135deg, #d4a649, #b8852f);
  color: white;
  border-color: #b8852f;
}
.pack-badge.locked:hover { background: linear-gradient(135deg, #e6b95a, #c99745); transform: translateY(-1px); }
.pack-badge.unlocked {
  background: var(--tip-bg);
  color: var(--tip-border);
  border-color: var(--tip-border);
  cursor: default;
}

/* === Unlock modal === */
.unlock-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.unlock-modal[hidden] { display: none; }
.unlock-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 25, 0.7);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.18s ease;
}
.unlock-content {
  position: relative;
  background: var(--surface);
  border-radius: 14px;
  padding: 2.2rem 2rem 1.8rem;
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
  animation: slideUp 0.22s ease;
  border: 1px solid var(--border);
}
.unlock-close {
  position: absolute;
  top: 0.7rem;
  right: 0.8rem;
  background: transparent;
  border: none;
  font-size: 1.1rem;
  color: var(--text-soft);
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 6px;
}
.unlock-close:hover { background: var(--accent-soft); color: var(--accent); }
.unlock-badge {
  display: inline-block;
  background: linear-gradient(135deg, #d4a649, #b8852f);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  margin-bottom: 0.8rem;
}
.unlock-content h2 {
  margin: 0 0 0.5rem;
  font-family: 'Lora', serif;
  font-size: 1.5rem;
  color: var(--text);
}
.unlock-lead {
  color: var(--text-soft);
  margin: 0 0 1.2rem;
  font-size: 0.95rem;
}
.unlock-lead strong { color: var(--accent); }
.unlock-features {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem 1.2rem;
  margin: 0 0 1.4rem;
  list-style: none;
}
.unlock-features li {
  padding: 0.3rem 0 0.3rem 1.4rem;
  position: relative;
  font-size: 0.93rem;
  line-height: 1.5;
}
.unlock-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--tip-border);
  font-weight: 700;
}
.unlock-features strong { color: var(--accent); }
.unlock-actions { display: flex; flex-direction: column; gap: 1rem; }
.unlock-buy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #6b1f2b, #4d161f);
  color: white;
  padding: 1rem 1.4rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.15s;
  box-shadow: 0 4px 14px rgba(107,31,43,0.3);
}
.unlock-buy:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(107,31,43,0.4);
}
.unlock-buy .price {
  font-family: 'Lora', serif;
  font-size: 1.7rem;
  font-weight: 600;
}
.unlock-buy .label { font-size: 0.95rem; }
.unlock-divider {
  text-align: center;
  position: relative;
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.unlock-divider::before, .unlock-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--border);
}
.unlock-divider::before { left: 0; }
.unlock-divider::after { right: 0; }
.unlock-form label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-soft);
  margin-bottom: 0.4rem;
  font-weight: 500;
}
.unlock-input-row { display: flex; gap: 0.5rem; }
.unlock-form input {
  flex: 1;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.unlock-form input:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-color: var(--accent);
}
.unlock-form button {
  padding: 0.65rem 1.2rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
}
.unlock-form button:hover { background: var(--accent-hover); }
.unlock-feedback {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  min-height: 1.2em;
  color: var(--text-soft);
}
.unlock-feedback.ok { color: var(--tip-border); }
.unlock-feedback.err { color: #c0392b; }
.unlock-footer {
  margin-top: 1.4rem;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
  text-align: center;
}
.unlock-footer a { color: var(--accent); text-decoration: none; }
.unlock-footer a:hover { text-decoration: underline; }

/* === Gated content / paywall === */
.paywall {
  position: relative;
  margin: 2rem 0;
  padding: 2rem;
  background: linear-gradient(180deg, transparent 0%, var(--accent-soft) 100%);
  border: 2px dashed var(--accent);
  border-radius: 12px;
  text-align: center;
}
.paywall-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #d4a649, #b8852f);
  border-radius: 50%;
  color: white;
  font-size: 1.6rem;
  margin-bottom: 0.8rem;
}
.paywall h3 {
  margin: 0 0 0.5rem;
  font-family: 'Lora', serif;
  color: var(--text);
  font-size: 1.3rem;
}
.paywall p {
  color: var(--text-soft);
  margin: 0.4rem 0 1rem;
  font-size: 0.95rem;
}
.paywall-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #6b1f2b, #4d161f);
  color: white;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  border: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}
.paywall-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(107,31,43,0.3); }

.paywall-blur {
  position: relative;
  max-height: 250px;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}
.paywall-blur::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, var(--bg) 100%);
}
.paywall-blur > * {
  filter: blur(4px);
  opacity: 0.7;
}

/* === Examen-pack landing page === */
.pack-hero {
  background: linear-gradient(135deg, #2a0e14 0%, #6b1f2b 100%);
  color: white;
  padding: 3rem 2rem;
  border-radius: 16px;
  margin: 0 0 2rem;
  position: relative;
  overflow: hidden;
}
.pack-hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 50%;
  height: 200%;
  background: radial-gradient(circle, rgba(212,166,73,0.25) 0%, transparent 60%);
}
.pack-hero h1 {
  font-family: 'Lora', serif;
  font-size: 2.5rem;
  margin: 0 0 0.5rem;
  color: white;
  border: none;
  position: relative;
}
.pack-hero .pack-tag {
  display: inline-block;
  background: rgba(212,166,73,0.2);
  border: 1px solid rgba(212,166,73,0.5);
  color: #f5d488;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 1rem;
  position: relative;
}
.pack-hero .pack-lead {
  font-size: 1.1rem;
  max-width: 540px;
  position: relative;
  line-height: 1.6;
  color: #f5f0e6;
}
.pack-hero strong,
.pack-hero .pack-lead strong,
.pack-hero p strong {
  color: #f5d488;
  font-weight: 600;
}
.pack-hero p { color: #f5f0e6; }
.pack-hero .pack-price-block {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-top: 1.5rem;
  position: relative;
}
.pack-hero .pack-price {
  font-family: 'Lora', serif;
  font-size: 3rem;
  font-weight: 700;
  color: #f5d488;
}
.pack-hero .pack-once {
  font-size: 0.95rem;
  opacity: 0.85;
}
.pack-hero .pack-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.5rem;
  position: relative;
}
.pack-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.15s;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.pack-cta.primary {
  background: #f5d488;
  color: #2a0e14;
}
.pack-cta.primary:hover { background: #ffe39d; transform: translateY(-1px); }
.pack-cta.secondary {
  background: transparent;
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
}
.pack-cta.secondary:hover { background: rgba(255,255,255,0.1); }

.pack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.pack-feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem;
}
.pack-feature .pack-icon {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}
.pack-feature h3 {
  margin: 0 0 0.3rem;
  font-size: 1.05rem;
  color: var(--text);
}
.pack-feature p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-soft);
  line-height: 1.5;
}

.pack-faq { margin: 2rem 0; }
.pack-faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-bottom: 0.6rem;
}
.pack-faq summary {
  cursor: pointer;
  font-weight: 500;
  font-size: 0.98rem;
  color: var(--text);
}
.pack-faq details[open] summary { margin-bottom: 0.6rem; }
.pack-faq p { margin: 0.4rem 0; color: var(--text-soft); font-size: 0.92rem; line-height: 1.6; }

/* === Cheat-sheet print layout === */
.cheat-sheet {
  background: white;
  color: #1a1a1a;
  padding: 0.6cm;
  margin: 0 auto;
  max-width: 21cm;
  font-size: 9.5pt;
  line-height: 1.35;
  font-family: 'Inter', sans-serif;
}
.cheat-sheet h1 {
  font-family: 'Lora', serif;
  font-size: 16pt;
  margin: 0 0 0.2cm;
  text-align: center;
  border-bottom: 2px solid #6b1f2b;
  padding-bottom: 0.15cm;
  color: #6b1f2b;
}
.cheat-sheet h2 {
  background: #6b1f2b;
  color: white;
  padding: 2px 6px;
  font-size: 10pt;
  margin: 0.3cm 0 0.15cm;
  font-family: 'Inter', sans-serif;
}
.cheat-sheet h3 {
  font-size: 9.5pt;
  margin: 0.15cm 0 0.05cm;
  color: #6b1f2b;
  font-weight: 600;
}
.cheat-sheet .cheat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4cm;
}
.cheat-sheet table {
  width: 100%;
  border-collapse: collapse;
  font-size: 8.5pt;
  margin: 0.1cm 0;
  box-shadow: none;
  border-radius: 0;
}
.cheat-sheet th, .cheat-sheet td {
  border: 1px solid #999;
  padding: 2px 4px;
  text-align: left;
  background: white !important;
}
.cheat-sheet th { background: #f0e6e0 !important; font-weight: 600; }
.cheat-sheet ul {
  margin: 0.05cm 0 0.15cm;
  padding-left: 14pt;
}
.cheat-sheet li { margin: 0.5pt 0; }
.cheat-sheet strong { color: #6b1f2b; }
.cheat-sheet em { font-style: italic; color: #555; }
.cheat-sheet .cheat-note {
  background: #fff7c2;
  padding: 3px 6px;
  border-left: 3px solid #d4a649;
  font-size: 8pt;
  margin: 0.1cm 0;
}
.cheat-sheet .print-only { display: none; }
.cheat-toolbar {
  position: sticky;
  top: 64px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.8rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}
.cheat-print-btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-family: inherit;
  cursor: pointer;
}
@media print {
  body { background: white !important; color: black !important; }
  .site-header, .sidebar, footer, .cheat-toolbar, .progress-bar, .sidebar-overlay { display: none !important; }
  .layout { display: block; padding: 0; }
  main { padding: 0; max-width: 100%; }
  .cheat-sheet { padding: 0; max-width: 100%; }
  @page { size: A4; margin: 0.6cm; }
}

/* Mobile adaptations */
@media (max-width: 700px) {
  .unlock-content { padding: 1.6rem 1.3rem 1.2rem; }
  .pack-hero { padding: 2rem 1.4rem; }
  .pack-hero h1 { font-size: 1.8rem; }
  .pack-hero .pack-price { font-size: 2.2rem; }
  .cheat-sheet .cheat-grid { grid-template-columns: 1fr; }
}
