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

:root {
  --bg: #fbfbf9;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-soft: #555;
  --muted: #8a8a8a;
  --border: #e3e6e3;
  --accent: #1d6a5f;
  --accent-soft: #e3f0ed;
  --accent-hover: #14534a;
  --code-bg: #eef2f0;
  --link: #1d6a5f;
  --highlight: #fff7c2;
  --def-bg: #eef3f1;
  --def-border: #2f8f7e;
  --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: #14171a;
  --surface: #1c2025;
  --text: #e8e6e1;
  --text-soft: #b5b2ad;
  --muted: #85857f;
  --border: #2b2f35;
  --accent: #5cb3a6;
  --accent-soft: #16302c;
  --accent-hover: #6ec9bb;
  --code-bg: #24282e;
  --link: #5cb3a6;
  --highlight: #5c4a1a;
  --def-bg: #18302b;
  --def-border: #2f8f7e;
  --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 .num {
  display: inline-block;
  width: 1.6em;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
}

.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(29,106,95,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"; }

/* Importance badge */
.imp-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 16px;
  margin-left: 0.4rem;
  vertical-align: middle;
}
.imp-badge.zeer { background: #fde8e6; color: #c0392b; }
.imp-badge.belangrijk { background: #fff1d6; color: #b8852f; }
.imp-badge.minder { background: var(--accent-soft); color: var(--accent); }
[data-theme="dark"] .imp-badge.zeer { background: #3a1815; color: #ec7058; }
[data-theme="dark"] .imp-badge.belangrijk { background: #332611; color: #e3b75f; }

/* 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 references */
.wet {
  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);
  font-family: 'Lora', serif;
}
.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); }

/* === 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;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.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, #1d6a5f, #14534a);
  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(29,106,95,0.3);
}
.unlock-buy:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(29,106,95,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, #1d6a5f, #14534a);
  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(29,106,95,0.3); }

.paywall-blur {
  position: relative;
  max-height: 320px;
  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, #0c2b27 0%, #1d6a5f 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: #eef5f3;
}
.pack-hero strong,
.pack-hero .pack-lead strong,
.pack-hero p strong {
  color: #f5d488;
  font-weight: 600;
}
.pack-hero p { color: #eef5f3; }
.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: #0c2b27;
}
.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);
  font-family: 'Lora', serif;
}
.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; }

/* === Admin page === */
.admin-box {
  max-width: 460px;
  margin: 2rem auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.8rem;
  box-shadow: var(--shadow);
}
.admin-box label { display: block; font-size: 0.85rem; color: var(--text-soft); margin: 0.8rem 0 0.3rem; font-weight: 500; }
.admin-box input {
  width: 100%; padding: 0.6rem 0.8rem; border: 1px solid var(--border);
  border-radius: 8px; background: var(--bg); color: var(--text); font-family: 'JetBrains Mono', monospace;
}
.admin-box button {
  margin-top: 1.2rem; width: 100%; padding: 0.7rem; background: var(--accent); color: white;
  border: none; border-radius: 8px; cursor: pointer; font-family: inherit; font-weight: 500;
}
.admin-box button:hover { background: var(--accent-hover); }
.admin-result { margin-top: 1rem; font-size: 0.9rem; }

/* === Comprehensive mobile polish === */
html, body { overflow-x: hidden; max-width: 100vw; }
* { min-width: 0; }
img, svg, video, iframe { max-width: 100%; height: auto; }

.sidebar-overlay { opacity: 0; transition: opacity 0.25s; pointer-events: none; }
.sidebar-overlay.show { opacity: 1; pointer-events: auto; }

@media (max-width: 920px) {
  .header-inner { padding: 0.7rem 1rem; gap: 0.5rem; flex-wrap: nowrap; }
  .site-title { font-size: 1rem; }
  .site-title .subtitle { font-size: 0.66rem; }
  .header-actions { gap: 0.35rem; flex-shrink: 0; }
  .theme-toggle { padding: 0.4rem 0.55rem; font-size: 0.85rem; }
  .pack-badge.unlocked { padding: 0.3rem 0.55rem; font-size: 0.78rem; }
  .pack-badge.locked { padding: 0.35rem 0.6rem; font-size: 0.78rem; }
  main { padding: 1rem 0 3rem; }
  main h1 { font-size: 1.6rem; word-break: break-word; }
  main h2 { font-size: 1.3rem; }
  main h3 { font-size: 1.05rem; }
  main table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; font-size: 0.85rem; }
  main table thead { font-size: 0.78rem; }
  main th, main td { padding: 0.5rem 0.65rem; white-space: normal; min-width: 90px; }
  main code, .wet { word-break: break-word; overflow-wrap: break-word; }
  main blockquote, .definitie, .definition, .warn, .let-op, .tip, .examen { padding: 0.7rem 0.9rem; margin-left: 0; margin-right: 0; }
  .chapter-grid { grid-template-columns: 1fr; }
  .pack-hero { padding: 1.6rem 1.2rem; border-radius: 12px; }
  .pack-hero h1 { font-size: 1.5rem; }
  .pack-hero .pack-lead { font-size: 0.98rem; }
  .pack-hero .pack-cta-row { flex-direction: column; }
  .pack-hero .pack-cta { width: 100%; justify-content: center; }
  .pack-hero .pack-price { font-size: 2rem; }
  .pack-grid { grid-template-columns: 1fr; }
  .hero { padding: 1.4rem 1.2rem 1.2rem; }
  .hero h1 { font-size: 1.5rem; }
  .hero .lead { font-size: 0.95rem; }
}

@media (max-width: 600px) {
  .site-title { font-size: 0.92rem; }
  .site-title .subtitle { display: none; }
  .pack-badge.locked { font-size: 0; padding: 0.4rem 0.55rem; }
  .pack-badge.locked::before { content: "💎"; font-size: 1rem; }
  .pack-badge.unlocked { font-size: 0; padding: 0.4rem 0.55rem; }
  .pack-badge.unlocked::before { content: "💎"; font-size: 1rem; }
  .theme-toggle { font-size: 0; padding: 0.4rem 0.55rem; }
  .theme-toggle::before { content: "🌙"; font-size: 1rem; }
  [data-theme="dark"] .theme-toggle::before { content: "☀️"; }
  .menu-toggle { padding: 0.4rem 0.55rem; font-size: 1.1rem; }
  .layout { padding: 0 0.8rem; }
  main { padding: 0.8rem 0 3rem; }
  main h1 { font-size: 1.4rem; }
  main h2 { font-size: 1.18rem; }
  main h3 { font-size: 1rem; }
  .hero h1 { font-size: 1.35rem; }
  .hero .meta { gap: 0.4rem; }
  .hero .badge { font-size: 0.74rem; padding: 0.2rem 0.55rem; }
  .pack-hero { padding: 1.4rem 1rem; }
  .pack-hero h1 { font-size: 1.3rem; }
  .pack-hero .pack-tag { font-size: 0.68rem; padding: 0.25rem 0.6rem; }
  .pack-hero .pack-price { font-size: 1.8rem; }
  .unlock-modal { padding: 0.8rem; }
  .unlock-content { padding: 1.3rem 1.1rem 1rem; max-height: 95vh; }
  .unlock-content h2 { font-size: 1.25rem; }
  .unlock-features { padding: 0.7rem 0.9rem; }
  .unlock-features li { font-size: 0.88rem; padding-left: 1.2rem; }
  .unlock-buy { padding: 0.8rem 1rem; }
  .unlock-buy .price { font-size: 1.4rem; }
  .unlock-buy .label { font-size: 0.88rem; }
  .unlock-form input { font-size: 0.88rem; padding: 0.55rem 0.7rem; }
  .unlock-form button { padding: 0.55rem 0.9rem; font-size: 0.88rem; }
  .unlock-input-row { flex-direction: column; }
  .unlock-input-row button { width: 100%; }
  footer { padding: 1.4rem 1rem; font-size: 0.78rem; }
  .sidebar { width: 88vw; }
}

@media (hover: none) and (pointer: coarse) {
  .menu-toggle, .theme-toggle, .pack-badge { min-height: 40px; min-width: 40px; }
  .paywall-btn, .pack-cta, .unlock-buy, .unlock-form button { min-height: 44px; }
}
