/*
 * Uitleg-voorbeeld: building blocks for the answer pages (factuur sturen als
 * particulier, factuur zonder KVK, belastingvrij bijverdienen). Visitors on
 * these pages are mostly not entrepreneurs and come for an answer, so the
 * blocks show the answer instead of describing it:
 *
 *   .uv-hero     answer on the left, the real thing (a nota, a sum) on the right
 *   .uv-col      one left-aligned reading column (verhaal-prose) with subheads
 *   .uv-paper    a readable example invoice/receipt with numbered pins that
 *                match .uv-notes; optional factuur/kwitantie switch
 *   .uv-wide     a figure that breaks out of the column (the spheres table)
 *   .uv-spheres  hobby / overig werk / onderneming side by side, one example each
 *   .uv-calc     a small worked example: opbrengst minus kosten, live inputs
 *
 * Built only from the landing tokens so light and dark both follow. Every
 * block is complete without JS; the script only adds the switch and the
 * live arithmetic.
 */

/* ---------- Hero: answer + the real thing ---------- */
.landing-hero.uv-hero {
  background: var(--landing-bg-section);
  padding-bottom: 72px;
}
.landing-hero.uv-hero::before,
.landing-hero.uv-hero::after {
  display: none;
}
.uv-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 56px;
  align-items: center;
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
}
.uv-hero-title {
  margin: 0 0 20px;
  font-size: clamp(34px, 4.2vw, 52px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--landing-text);
}
.uv-hero-answer {
  margin: 0;
  max-width: 34em;
  font-size: clamp(18px, 1.6vw, 20px);
  line-height: 1.6;
  color: var(--landing-text-secondary);
}
.uv-hero-answer strong {
  color: var(--landing-text);
}
.uv-hero-link {
  display: inline-block;
  margin-top: 20px;
  padding: 4px 0;
  color: var(--landing-accent);
  font-weight: 600;
}

/* ---------- Reading column ---------- */
.landing-section.uv-body {
  padding-top: 24px;
}
.uv-col h3 {
  margin: 28px 0 8px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--landing-text);
}
.uv-col a:not(.landing-btn) {
  color: var(--landing-accent);
}
.uv-col .uv-aside {
  font-size: 0.95rem;
  color: var(--landing-text-muted);
}
.uv-col hr {
  margin: 48px 0;
  border: 0;
  border-top: 1px solid var(--landing-border-hover);
}
.uv-wide {
  position: relative;
  width: min(1120px, calc(100vw - 48px));
  margin: 32px 0 40px;
  left: 50%;
  transform: translateX(-50%);
}
.uv-close {
  margin-top: 48px;
  padding: 28px;
  border: 1px solid var(--landing-border-hover);
  border-radius: 14px;
  background: var(--landing-bg-subtle);
}
.uv-close h2 {
  margin-top: 0 !important;
}
.uv-close p:last-child {
  margin-bottom: 0;
}
.uv-close-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.uv-close-actions > a:not(.landing-btn) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* ---------- Example document ---------- */
.uv-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 16px;
  border: 1px solid var(--landing-border-hover);
  border-radius: 10px;
  background: var(--landing-bg-subtle);
}
.uv-switch-btn {
  min-height: 40px;
  padding: 8px 14px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--landing-text-muted);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.uv-switch-btn[aria-pressed="true"] {
  background: var(--landing-bg-section);
  color: var(--landing-text);
  box-shadow: var(--landing-shadow-card);
}
.uv-switch-btn:focus-visible {
  outline: 2px solid var(--landing-accent);
  outline-offset: 2px;
}

.uv-paper {
  position: relative;
  padding: 36px 36px 32px 44px;
  border: 1px solid var(--landing-border-hover);
  border-radius: 6px;
  background: var(--landing-bg-section);
  color: var(--landing-text);
  box-shadow: var(--landing-shadow-hero-img);
  font-size: 15px;
  line-height: 1.5;
}
.uv-part {
  position: relative;
  border-radius: 6px;
  transition: background-color 0.2s var(--landing-transition);
}
.uv-part.is-lit {
  background: var(--landing-bg-subtle-hover);
}
.uv-pin {
  position: absolute;
  left: -34px;
  top: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--landing-accent);
  color: var(--landing-bg-section);
  font-size: 12px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
}
.uv-paper-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  color: var(--landing-text-secondary);
}
.uv-paper-label {
  display: block;
  color: var(--landing-text-muted);
  font-size: 13px;
}
.uv-paper-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--landing-border-hover);
}
.uv-paper-title {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  color: var(--landing-text);
}
.uv-paper-meta {
  display: flex;
  gap: 20px;
  margin: 0;
  font-size: 14px;
}
.uv-paper-meta dt {
  color: var(--landing-text-muted);
  font-size: 13px;
}
.uv-paper-meta dd {
  margin: 0;
  font-weight: 600;
}
.uv-paper-lines {
  width: 100%;
  margin-top: 24px;
  border-collapse: collapse;
}
/* global.css styles every table as a dark admin grid (nowrap, sticky accent
   th, hover rows); a paper invoice needs none of that. */
.uv-paper-lines th,
.uv-paper-lines td {
  position: static;
  overflow: visible;
  white-space: normal;
  border-right: 0;
  background: none;
  color: inherit;
  padding: 10px 0;
  text-align: left;
  vertical-align: top;
}
.uv-paper-lines thead th {
  color: var(--landing-text-muted);
  font-size: 13px;
  font-weight: 600;
  border-bottom: 1px solid var(--landing-border-hover);
}
.uv-paper-lines tbody tr:hover {
  background: none;
}
.uv-paper-lines tfoot th,
.uv-paper-lines tfoot td {
  border-bottom: 0;
}
.uv-paper-lines tbody td {
  border-bottom: 1px solid var(--landing-border);
}
.uv-paper-lines td + td,
.uv-paper-lines th + th,
.uv-paper-lines th + td {
  padding-left: 16px;
}
.uv-paper-lines .num {
  text-align: right;
  white-space: nowrap;
}
.uv-paper-lines tfoot th,
.uv-paper-lines tfoot td {
  padding-top: 14px;
  font-size: 17px;
  font-weight: 800;
}
.uv-paper-pay {
  margin-top: 20px;
  padding: 12px 14px;
  background: var(--landing-bg-subtle);
  color: var(--landing-text-secondary);
}
.uv-paper-paid {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 16px;
  border: 2px solid var(--landing-accent-2);
  border-radius: 6px;
  color: var(--landing-accent-2);
  transform: rotate(-2deg);
}
.uv-paper-paid b {
  font-size: 17px;
}
.uv-paper-sign {
  display: block;
  margin-top: 6px;
  color: var(--landing-text-muted);
  font-size: 13px;
}
[data-uv-show][hidden],
[data-uv-when][hidden] {
  display: none !important;
}

.uv-notes {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: uv;
}
.uv-notes li {
  position: relative;
  padding: 14px 16px 14px 52px;
  border-radius: 10px;
  color: var(--landing-text-secondary);
  font-size: 16px;
  line-height: 1.6;
  transition: background-color 0.2s var(--landing-transition);
}
.uv-notes li[data-uv-note]::before {
  counter-increment: uv;
  content: counter(uv);
  position: absolute;
  left: 16px;
  top: 16px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--landing-accent);
  color: var(--landing-bg-section);
  font-size: 12px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
}
.uv-notes li.is-lit {
  background: var(--landing-bg-subtle-hover);
}
.uv-notes b {
  color: var(--landing-text);
}
.uv-notes .uv-notes-extra {
  margin-top: 8px;
  padding-left: 16px;
  border-top: 1px solid var(--landing-border-hover);
  border-radius: 0;
}
/* ---------- Hobby / overig werk / onderneming ---------- */
.uv-scale {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 12px;
  color: var(--landing-text-muted);
  font-size: 14px;
  font-weight: 600;
}
.uv-scale span {
  position: relative;
  padding: 0 24px 10px;
  border-bottom: 3px solid var(--landing-border-hover);
}
.uv-scale span:last-child {
  border-bottom-color: var(--landing-accent);
}
.uv-scale span:last-child::after {
  content: "";
  position: absolute;
  right: -2px;
  bottom: -8px;
  border: 6px solid transparent;
  border-left: 9px solid var(--landing-accent);
}
.uv-sphere-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--landing-border-hover);
  border-radius: 14px;
  overflow: hidden;
  background: var(--landing-bg-section);
}
.uv-sphere {
  padding: 24px;
}
.uv-sphere + .uv-sphere {
  border-left: 1px solid var(--landing-border-hover);
}
.uv-col .uv-sphere-title {
  margin: 0 0 4px;
  font-size: 21px;
  font-weight: 800;
  color: var(--landing-text);
}
.uv-col .uv-sphere-sub {
  margin: 0 0 14px;
  color: var(--landing-text-muted);
  font-size: 15px;
}
.uv-col .uv-sphere-example {
  margin: 0 0 18px;
  padding-left: 12px;
  border-left: 3px solid var(--landing-accent-2);
  color: var(--landing-text-secondary);
  font-size: 16px;
  line-height: 1.55;
}
.uv-sphere-facts {
  margin: 0;
}
.uv-sphere-facts div {
  padding: 10px 0;
  border-top: 1px solid var(--landing-border);
}
.uv-sphere-facts dt {
  color: var(--landing-text-muted);
  font-size: 13px;
  font-weight: 600;
}
.uv-sphere-facts dd {
  margin: 2px 0 0;
  color: var(--landing-text);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
}
.uv-sphere-note {
  max-width: 820px;
  margin: 20px auto 0;
  color: var(--landing-text-muted);
  font-size: 15px;
  line-height: 1.65;
  text-align: center;
}

/* ---------- Worked example ---------- */
.uv-calc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 48px;
  align-items: start;
  max-width: 1080px;
  margin: 0 auto;
}
.uv-tally {
  padding: 28px;
  border: 1px solid var(--landing-border-hover);
  border-radius: 14px;
  background: var(--landing-bg-section);
  box-shadow: var(--landing-shadow-card);
}
.uv-tally-title {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 800;
  color: var(--landing-text);
}
.uv-tally-inputs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.uv-tally-inputs label {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--landing-text-muted);
  font-size: 13px;
  font-weight: 600;
}
.uv-tally-inputs input {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid var(--landing-border-hover);
  border-radius: 8px;
  background: var(--landing-bg-subtle);
  color: var(--landing-text);
  font: inherit;
  font-size: 17px;
  font-weight: 600;
}
.uv-tally-inputs input:focus-visible {
  outline: 2px solid var(--landing-accent);
  outline-offset: 1px;
}
.uv-tally-lines {
  margin: 0;
}
.uv-tally-lines div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--landing-border);
  font-size: 16px;
}
.uv-tally-lines dt {
  color: var(--landing-text-secondary);
}
.uv-tally-lines dd {
  margin: 0;
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.uv-tally-lines .uv-tally-sum {
  border-top: 2px solid var(--landing-text);
  font-size: 19px;
}
.uv-tally-lines .uv-tally-sum dt,
.uv-tally-lines .uv-tally-sum dd {
  color: var(--landing-text);
  font-weight: 800;
}
.uv-tally .uv-tally-hint {
  margin: 12px 0 0;
  color: var(--landing-text-muted);
  font-size: 14px;
  line-height: 1.5;
}
.uv-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: uvs;
}
.uv-steps li {
  position: relative;
  padding: 0 0 20px 44px;
  color: var(--landing-text-secondary);
  font-size: 17px;
  line-height: 1.6;
}
.uv-steps li::before {
  counter-increment: uvs;
  content: counter(uvs);
  position: absolute;
  left: 0;
  top: 1px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--landing-accent);
  color: var(--landing-accent);
  font-size: 14px;
  font-weight: 700;
  line-height: 24px;
  text-align: center;
}
.uv-steps b {
  color: var(--landing-text);
}
.uv-col .uv-steps-foot {
  margin: 4px 0 0 44px;
  color: var(--landing-text-muted);
  font-size: 15px;
  line-height: 1.6;
}

/* ---------- Phone ---------- */
@media (max-width: 880px) {
  .uv-hero-grid,
  .uv-calc {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .uv-scale {
    display: none;
  }
  .uv-sphere-row {
    grid-template-columns: 1fr;
  }
  .uv-sphere + .uv-sphere {
    border-left: 0;
    border-top: 1px solid var(--landing-border-hover);
  }
}
@media (max-width: 640px) {
  .landing-hero.uv-hero {
    padding-bottom: 40px;
  }
  .uv-wide {
    width: auto;
    margin: 24px 0 32px;
    left: auto;
    transform: none;
  }
  .uv-close {
    padding: 20px 16px;
  }
  .uv-paper {
    padding: 24px 18px 22px 18px;
    font-size: 14px;
  }
  .uv-pin {
    left: auto;
    right: -8px;
    top: -4px;
  }
  .uv-paper-parties {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .uv-paper-title {
    font-size: 22px;
  }
  .uv-switch {
    display: flex;
  }
  .uv-switch-btn {
    flex: 1;
    padding: 8px 8px;
    font-size: 14px;
  }
  .uv-tally {
    padding: 20px 16px;
  }
  .uv-tally-inputs {
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .uv-part,
  .uv-notes li {
    transition: none;
  }
}
