/* Gedeelde site-stijlen voor alle pagina's — Studio-tokens (licht & dark mode >= 7:1) */

:root {
  --st-font-display: "Plus Jakarta Sans", system-ui, sans-serif;
  --st-font-sans: "DM Sans", system-ui, sans-serif;
  --st-font-mono: "JetBrains Mono", ui-monospace, monospace;

  --st-bg: #FFFFFF;
  --st-surface: #FFFFFF;
  --st-tint: #F3F6F7;
  --st-hero-bg: #07242A;
  --st-hero-surface: #0D353E;
  --st-hero-ink: #FFFFFF;
  --st-hero-muted: #D2E7EC;
  --st-hero-line: rgba(210, 231, 236, 0.22);

  --st-ink: #0F171A;
  --st-ink-soft: #2C3A40;
  --st-ink-muted: #3D4C52;
  --st-line: #D7E0E3;
  --st-line-strong: #B6C6CC;

  --st-brand: #0A434D;
  --st-brand-hover: #07323A;
  --st-brand-ink: #0A434D;
  --st-brand-soft: #E9F3F5;

  --st-amber-bg: #F2B24C;
  --st-amber-hover: #DC9A2E;
  --st-amber-on: #0F171A;
  --st-amber-ink: #6B3D00;

  --st-leaf-ink: #165B33;
  --st-danger-ink: #991B1B;
  --st-danger-bg: #FEF2F2;
  --st-danger-line: #FECACA;

  --st-radius-sm: 8px;
  --st-radius-lg: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --st-bg: #0B1215;
    --st-surface: #111C21;
    --st-tint: #142127;
    --st-hero-bg: #06181C;
    --st-hero-surface: #0D2930;
    --st-hero-ink: #F4F9FA;
    --st-hero-muted: #CFE4E9;
    --st-hero-line: rgba(207, 228, 233, 0.22);

    --st-ink: #F1F6F7;
    --st-ink-soft: #D5E2E6;
    --st-ink-muted: #AEC3C9;
    --st-line: #243840;
    --st-line-strong: #37515C;

    --st-brand: #0E5A66;
    --st-brand-hover: #127080;
    --st-brand-ink: #72D3E2;
    --st-brand-soft: #132A30;

    --st-amber-bg: #F2B24C;
    --st-amber-hover: #F7C36A;
    --st-amber-on: #0B1215;
    --st-amber-ink: #F6C15C;

    --st-leaf-ink: #6EE7A0;
    --st-danger-ink: #FCA5A5;
    --st-danger-bg: #2B1315;
    --st-danger-line: #63272B;
  }
}

html {
  -webkit-font-smoothing: antialiased;
  background-color: var(--st-bg);
  color: var(--st-ink);
  font-family: var(--st-font-sans);
}

body {
  background-color: var(--st-bg);
  color: var(--st-ink);
  font-family: var(--st-font-sans);
  font-size: 16px;
}

html, body { overflow-x: clip; }

h1, h2, h3, h4, .font-display {
  font-family: var(--st-font-display);
  text-wrap: balance;
  overflow-wrap: break-word;
  min-width: 0;
}

code, pre, .font-mono {
  font-family: var(--st-font-mono);
}

/* Focus-visible op elk interactief element */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
label:has(input:focus-visible) {
  outline: 2px solid var(--st-brand-ink);
  outline-offset: 2px;
}

/* Semantische helpers */
.st-muted { color: var(--st-ink-muted); }
.st-soft { color: var(--st-ink-soft); }
.st-brand-text { color: var(--st-brand-ink); }
.st-leaf-text { color: var(--st-leaf-ink); }
.st-border { border-color: var(--st-line); }
.st-divider { background-color: var(--st-line); }
.st-divider-v { background-color: var(--st-line); display: inline-block; }

.st-lifetime-link {
  color: var(--st-amber-ink);
  transition: color 150ms ease, background-color 150ms ease;
}
.st-lifetime-link:hover,
.st-lifetime-link.is-active {
  background-color: var(--st-tint);
}

/* Header & Footer */
.st-header {
  background-color: var(--st-bg);
  border-bottom: 1px solid var(--st-line);
}
.st-brand-mark { color: var(--st-ink); }
.st-nav-link {
  color: var(--st-ink-soft);
  transition: background-color 150ms ease, color 150ms ease;
}
.st-nav-link:hover,
.st-nav-link.is-active {
  background-color: var(--st-tint);
  color: var(--st-brand-ink);
}
.st-dropdown {
  background-color: var(--st-surface);
  border: 1px solid var(--st-line);
  color: var(--st-ink);
}
.st-dropdown-link {
  color: var(--st-ink);
  transition: background-color 150ms ease, color 150ms ease;
}
.st-dropdown-link:hover {
  background-color: var(--st-tint);
  color: var(--st-brand-ink);
}
.st-mobile-nav {
  background-color: var(--st-bg);
  color: var(--st-ink);
}

.st-footer {
  background-color: var(--st-tint);
  color: var(--st-ink);
}
.st-footer-list a {
  color: var(--st-ink-soft);
  transition: color 150ms ease;
}
.st-footer-list a:hover {
  color: var(--st-brand-ink);
}
.st-footer-list a.st-lifetime-link {
  color: var(--st-amber-ink);
}

/* Dark mode backstops voor Tailwind utility-klassen op overige pagina's */
@media (prefers-color-scheme: dark) {
  .bg-white,
  .bg-paper,
  .bg-paper-surface { background-color: var(--st-surface) !important; }
  .bg-paper-sunk,
  .bg-paper-sunk\/40,
  .bg-paper-sunk\/50 { background-color: var(--st-tint) !important; }
  .text-ink { color: var(--st-ink) !important; }
  .text-ink-soft { color: var(--st-ink-soft) !important; }
  .text-ink-muted,
  .text-ink-faint { color: var(--st-ink-muted) !important; }
  .text-brand-700,
  .text-brand-600 { color: var(--st-brand-ink) !important; }
  .text-leaf-600 { color: var(--st-leaf-ink) !important; }
  .text-amber-700,
  .text-amber-600 { color: var(--st-amber-ink) !important; }
  .border-line,
  .divide-line > :not([hidden]) ~ :not([hidden]) { border-color: var(--st-line) !important; }
  .bg-brand-50 { background-color: var(--st-brand-soft) !important; }
  .bg-amber-50 { background-color: var(--st-tint) !important; }
  .border-amber-200 { border-color: var(--st-line-strong) !important; }
  .hover\:bg-paper-sunk:hover { background-color: var(--st-tint) !important; }
}

/* Gesloten <details>-inhoud niet in layout/contrast-meting laten lekken */
details:not([open]) > :not(summary) { display: none; }

/* ─── Merge button loading state ─── */
.merge-btn-loading { display: none !important; }
.merge-btn-default { display: inline-flex; }

.is-submitting .merge-btn-default,
.htmx-request .merge-btn-default { display: none !important; }
.is-submitting .merge-btn-loading,
.htmx-request .merge-btn-loading { display: inline-flex !important; }
.is-submitting .merge-btn,
.htmx-request .merge-btn { cursor: wait; opacity: 0.92; }

.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline-flex; }

/* Browser-local merger */
[data-local-dropzone].is-over {
  background-color: var(--st-brand-soft);
  border-color: var(--st-brand-ink);
  transform: translateY(-1px);
}
.local-merge-btn[data-busy="true"] { cursor: wait; }
.local-merge-btn[data-busy="true"] .local-merge-btn-icon { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Harde reduced-motion guard: 0 bewegende elementen */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0ms !important;
    animation-iteration-count: 1 !important;
    animation-name: none !important;
    transition-duration: 0ms !important;
    transition-property: none !important;
    scroll-behavior: auto !important;
  }
}

/* Dashed border voor drop-zones */
.dashed-ring {
  border: 2px dashed var(--st-line-strong);
}

/* PDF-thumb placeholder */
.pdf-thumb {
  background-color: var(--st-tint);
  position: relative;
  overflow: hidden;
  border-radius: var(--st-radius-sm);
}
.pdf-thumb::before {
  content: "";
  position: absolute;
  inset: 12% 18% 12% 18%;
  background:
    linear-gradient(transparent 0, transparent 6px, var(--st-line) 6px, var(--st-line) 7px),
    linear-gradient(transparent 0, transparent 14px, var(--st-line) 14px, var(--st-line) 15px),
    linear-gradient(transparent 0, transparent 22px, var(--st-line) 22px, var(--st-line) 23px);
  background-size: 100% 8px;
  background-repeat: repeat-y;
}
.pdf-thumb::after {
  content: "PDF";
  position: absolute;
  left: 0;
  bottom: 6px;
  right: 0;
  text-align: center;
  font-family: var(--st-font-mono);
  font-size: 12px;
  color: var(--st-brand-ink);
  font-weight: 600;
}

/* Details/summary FAQ */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details[open] .faq-chev { transform: rotate(180deg); }
.faq-chev { transition: transform 150ms ease; }

/* Tabular nums */
.tnum { font-variant-numeric: tabular-nums; }

/* Form inputs */
.input {
  width: 100%;
  font-size: 16px;
  padding: 11px 13px;
  border-radius: var(--st-radius-sm);
  background: var(--st-surface);
  border: 1px solid var(--st-line-strong);
  color: var(--st-ink);
  transition: border-color 150ms ease;
}

.hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.input::placeholder { color: var(--st-ink-muted); }
.input:hover { border-color: var(--st-brand-ink); }
.input:focus {
  outline: none;
  border-color: var(--st-brand-ink);
}

.label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--st-ink-soft);
  margin-bottom: 6px;
}

/* Buttons — 8px radius, >= 7:1 contrast licht + donker */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  font-size: 16px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--st-radius-sm);
  background: var(--st-brand);
  color: #FFFFFF;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 150ms ease, transform 100ms ease;
}
.btn-primary:hover { background: var(--st-brand-hover); color: #FFFFFF; }
.btn-primary:active { transform: translateY(1px); }

.btn-amber {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  font-size: 16px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--st-radius-sm);
  background: var(--st-amber-bg);
  color: var(--st-amber-on);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 150ms ease, transform 100ms ease;
}
.btn-amber:hover { background: var(--st-amber-hover); color: var(--st-amber-on); }
.btn-amber:active { transform: translateY(1px); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  font-size: 16px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: var(--st-radius-sm);
  background: var(--st-surface);
  color: var(--st-ink);
  border: 1px solid var(--st-line-strong);
  cursor: pointer;
  text-decoration: none;
  transition: background-color 150ms ease, border-color 150ms ease;
}
.btn-ghost:hover {
  background: var(--st-tint);
  border-color: var(--st-brand-ink);
}

/* ───────── Prose body (juridische pagina's + blog posts) ───────── */
.prose-nl { color: var(--st-ink-soft); }
.prose-nl h2 {
  position: relative;
  font-size: 24px;
  font-weight: 600;
  color: var(--st-ink);
  margin-top: 36px;
  margin-bottom: 12px;
  letter-spacing: -0.015em;
  line-height: 1.25;
}
.prose-nl h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--st-ink);
  margin-top: 24px;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.prose-nl p { line-height: 1.65; margin-bottom: 14px; font-size: 16px; }
.prose-nl ul { list-style: none; padding-left: 0; margin-bottom: 14px; }
.prose-nl ul li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 1.65;
}
.prose-nl ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--st-brand-ink);
}
.prose-nl ol {
  counter-reset: prose-counter;
  list-style: none;
  padding-left: 0;
  margin-bottom: 14px;
}
.prose-nl ol > li {
  counter-increment: prose-counter;
  position: relative;
  padding-left: 36px;
  margin-bottom: 10px;
  font-size: 16px;
  line-height: 1.65;
  min-height: 26px;
}
.prose-nl ol > li::before {
  content: counter(prose-counter);
  position: absolute;
  left: 0;
  top: 1px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--st-brand-soft);
  color: var(--st-brand-ink);
  font-family: var(--st-font-mono);
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--st-radius-sm);
}
.prose-nl a {
  color: var(--st-brand-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.prose-nl strong { color: var(--st-ink); font-weight: 600; }
.prose-nl em { font-style: italic; color: var(--st-ink-muted); }
.prose-nl code {
  font-family: var(--st-font-mono);
  font-size: 14px;
  padding: 2px 6px;
  background: var(--st-bg);
  color: var(--st-ink);
  border-radius: var(--st-radius-sm);
}

/* TL;DR & blog componenten */
.blog-tldr {
  margin: 24px 0 32px;
  padding: 20px 22px;
  background: var(--st-tint);
  border-left: 4px solid var(--st-brand-ink);
  border-radius: var(--st-radius-lg);
}
.blog-tldr__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--st-font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--st-brand-ink);
  margin-bottom: 10px;
}
.blog-tldr ul { list-style: none; padding: 0; margin: 0; }
.blog-tldr li {
  position: relative;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--st-ink-soft);
  margin-bottom: 6px;
}
.blog-tldr li:last-child { margin-bottom: 0; }
.blog-tldr li::before {
  content: "→";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--st-brand-ink);
  font-weight: 600;
  font-family: var(--st-font-mono);
}
.blog-tldr li strong { color: var(--st-ink); }

.blog-callout {
  margin: 24px 0;
  padding: 16px 20px;
  background: var(--st-tint);
  border-left: 3px solid var(--st-amber-bg);
  border-radius: 0 var(--st-radius-sm) var(--st-radius-sm) 0;
  font-size: 16px;
  line-height: 1.65;
  color: var(--st-ink-soft);
}
.blog-callout strong { color: var(--st-ink); }

.blog-table {
  position: relative;
  margin: 24px 0;
  border-block: 1px solid var(--st-line);
  background: var(--st-surface);
}
.blog-table__scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.blog-table table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 14px; }
.blog-table thead { background: var(--st-tint); border-bottom: 1px solid var(--st-line); }
.blog-table thead th {
  text-align: left;
  font-family: var(--st-font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--st-ink-muted);
  padding: 12px 14px;
  white-space: nowrap;
}
.blog-table tbody tr { border-bottom: 1px solid var(--st-line); }
.blog-table tbody tr:last-child { border-bottom: none; }
.blog-table tbody td { padding: 12px 14px; vertical-align: top; color: var(--st-ink-soft); line-height: 1.55; }
.blog-table tbody td strong { color: var(--st-ink); font-weight: 600; }
.blog-table tbody tr.is-ours { background: var(--st-brand-soft); }
.blog-table tbody tr.is-ours td:first-child { font-weight: 600; color: var(--st-brand-ink); }
.blog-table__hint {
  display: none;
  font-size: 12px;
  color: var(--st-ink-muted);
  font-family: var(--st-font-mono);
  padding: 6px 14px;
  border-top: 1px solid var(--st-line);
  background: var(--st-tint);
}
@media (max-width: 640px) {
  .blog-table__hint { display: flex; align-items: center; gap: 6px; }
}

.prose-nl details { margin: 0; border-bottom: 1px solid var(--st-line); padding: 0; }
.prose-nl details:first-of-type { border-top: 1px solid var(--st-line); margin-top: 16px; }
.prose-nl details > summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 36px 16px 4px;
  position: relative;
  font-weight: 600;
  font-size: 16px;
  color: var(--st-ink);
}
.prose-nl details > summary::after {
  content: "+";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: var(--st-ink-muted);
  line-height: 1;
}
.prose-nl details[open] > summary::after { transform: translateY(-50%) rotate(45deg); color: var(--st-brand-ink); }
.prose-nl details > p { padding: 0 4px 16px; font-size: 14px; line-height: 1.65; color: var(--st-ink-muted); margin: 0; }

/* Blog listing cards */
.blog-card {
  position: relative;
  display: block;
  border: 1px solid var(--st-line);
  border-radius: var(--st-radius-lg);
  overflow: hidden;
  background: var(--st-surface);
  transition: transform 150ms ease, border-color 150ms ease;
}
.blog-card:hover { transform: translateY(-2px); border-color: var(--st-brand-ink); }
.blog-card__thumb { aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.blog-card__thumb-icon { width: 56px; height: 56px; color: #FFFFFF; z-index: 1; }
.blog-card__keyword {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  font-family: var(--st-font-mono);
  font-size: 12px;
  color: #FFFFFF;
  background: rgba(6, 24, 28, 0.72);
  border-radius: var(--st-radius-sm);
  padding: 4px 10px;
}
.blog-card__body { padding: 20px 22px 22px; }
.blog-card__meta { font-family: var(--st-font-mono); font-size: 12px; color: var(--st-ink-muted); }
.blog-card__title { margin-top: 6px; font-size: 20px; font-weight: 600; color: var(--st-ink); line-height: 1.25; }
.blog-card:hover .blog-card__title { color: var(--st-brand-ink); }
.blog-card__summary { margin-top: 8px; font-size: 14px; line-height: 1.55; color: var(--st-ink-muted); }
.blog-card__cta { margin-top: 12px; display: inline-flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 600; color: var(--st-brand-ink); }

.blog-thumb--brand  { background: #0A434D; }
.blog-thumb--shield { background: #07242A; }
.blog-thumb--flag   { background: #143642; }
.blog-thumb--ledger { background: #3D2808; }

/* Inline Lifetime CTA */
.lt-cta-inline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 28px 0;
  padding: 20px 24px;
  background: var(--st-tint);
  border-top: 2px solid var(--st-amber-bg);
  border-bottom: 1px solid var(--st-line);
}
.lt-cta-inline__star { display: none; }
.lt-cta-inline__body { position: relative; }
.lt-cta-inline__label { font-family: var(--st-font-mono); font-size: 12px; color: var(--st-amber-ink); font-weight: 600; margin: 0; }
.lt-cta-inline__title { margin: 4px 0 0; font-size: 20px; font-weight: 600; color: var(--st-ink); line-height: 1.3; }
.lt-cta-inline__text { margin: 6px 0 0; font-size: 14px; line-height: 1.55; color: var(--st-ink-muted); }
.lt-cta-inline__btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: var(--st-radius-sm);
  background: var(--st-brand);
  color: #FFFFFF !important;
  text-decoration: none !important;
  font-size: 14px;
  font-weight: 600;
  margin-top: 4px;
  transition: background-color 150ms ease;
}
.lt-cta-inline__btn:hover { background: var(--st-brand-hover); }
@media (min-width: 640px) {
  .lt-cta-inline { flex-direction: row; align-items: center; gap: 24px; }
  .lt-cta-inline__body { flex: 1; }
  .lt-cta-inline__btn { flex-shrink: 0; }
}
