@font-face { font-family: 'Space Grotesk'; font-weight: 300 700; font-display: swap; src: url(/assets/fonts/space-grotesk.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Space Grotesk'; font-weight: 300 700; font-display: swap; src: url(/assets/fonts/space-grotesk-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* Design C "Tømmer": warm beige, charcoal, yellow accent, rounded. */
:root {
  --bg: #f3ece2; --ink: #231f1a; --muted: #5e554a; --line: #ddd1c0; --card: #fffdf9;
  --pri: #231f1a; --pri-dark: #a35d1c; --pri-ink: #f2c14e; --soft: #f8e7c4; --dark: #231f1a; --dark-ink: #fff;
  --yellow: #f2c14e; --accent: #a35d1c;
  --ok: #2f7d32; --warn-bg: #fff4e0; --warn-line: #e8b86a; --r: 16px;
  --font: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.55; }
img { max-width: 100%; height: auto; }
a { color: var(--pri-dark); }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(32px, 5vw, 50px); font-weight: 700; }
h2 { font-size: clamp(24px, 3vw, 31px); font-weight: 700; }
h3 { font-size: 18px; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px; z-index: 99; }

/* header / footer */
.site-header { background: var(--dark); color: var(--dark-ink); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 62px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: inherit; text-decoration: none; letter-spacing: -0.01em; }
.brand b { color: var(--yellow); font-weight: 700; }
.nav { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.nav a { display: inline-flex; align-items: center; min-height: 36px; padding: 0; line-height: 1.2; color: var(--dark-ink); text-decoration: none; opacity: .82; }
.nav a:hover, .nav a[aria-current] { opacity: 1; text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--yellow); text-decoration-thickness: 2px; }
.nav a[href="/app/"] { background: var(--yellow); color: var(--ink); opacity: 1; padding: 0 16px; border-radius: 999px; font-weight: 600; text-decoration: none; }
.site-footer { background: var(--dark); color: #c9bda9; margin-top: 72px; padding: 40px 0 48px; }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer .brand { color: var(--dark-ink); margin-bottom: 10px; }
.site-footer nav { display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; }
.site-footer a { color: #e7e1d6; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 20px; font: inherit; font-weight: 600; font-size: 15.5px;
  border-radius: var(--r); border: 1.5px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--ink); }
.btn-primary { background: var(--pri); border-color: var(--pri); color: var(--pri-ink); }
.btn-primary:hover { background: #000; border-color: #000; }
.btn, .chain a, .seg { border-radius: 999px; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--pri-dark); padding-left: 8px; padding-right: 8px; }
.btn-ghost:hover { border-color: transparent; text-decoration: underline; }
.btn-block { width: 100%; margin-top: 8px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn-row.end { justify-content: flex-end; align-self: end; }

/* hero */
.hero { padding: 56px 0 48px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-block; font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; font-weight: 700; color: #7a4512; background: var(--soft); padding: 5px 12px; border-radius: 999px; margin-bottom: 12px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lead { color: var(--muted); font-size: 18.5px; max-width: 560px; }
.hero .btn-row { margin: 26px 0 14px; }
.chain { display: flex; gap: 8px; align-items: center; margin-top: 24px; flex-wrap: wrap; font-size: 14px; font-weight: 600; }
.chain a { padding: 7px 13px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--card); color: var(--ink); text-decoration: none; }
.chain a:hover { border-color: var(--accent); color: var(--accent); }
.chain i { font-style: normal; color: var(--muted); }
.hero-img { border-radius: 10px; box-shadow: 0 18px 40px rgba(20, 20, 20, .12); border: 1px solid var(--line); background: #fff; }

/* sections */
.section { padding: 52px 0; }
.band-dark { background: var(--dark); color: var(--dark-ink); }
.band-dark p, .band-dark .muted { color: #c9bda9; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.band-dark .step { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .14); }
.step .n { font-weight: 700; font-size: 13px; color: var(--accent); letter-spacing: .06em; }
.step h3 { margin: 6px 0; }
.step p { font-size: 15px; margin: 0; }
.step a { color: inherit; }
.band-dark .step .n { color: var(--yellow); }
.price-card { background: var(--dark); color: #fff; border: 2px solid var(--dark); border-radius: var(--r); padding: 26px; max-width: 420px; }
.price-card .amt { font-size: 42px; font-weight: 700; letter-spacing: -0.02em; }
.price-card .amt small { font-size: 15px; font-weight: 500; color: #c9bda9; }
.price-card .muted { color: #c9bda9; }
.price-card .btn-primary { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.price-card .btn-primary:hover { background: #ffd56b; border-color: #ffd56b; }
.ticks { list-style: none; padding: 0; margin: 14px 0 18px; }
.ticks li { padding: 5px 0 5px 26px; position: relative; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.price-card .ticks li::before { color: var(--yellow); }
.pricing { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }

/* article */
.article { max-width: 760px; }
.article h2 { margin-top: 1.6em; }
.article ul, .article ol { padding-left: 1.3em; }
.article li { margin-bottom: .35em; }
.article table { border-collapse: collapse; width: 100%; margin: 0 0 1.2em; font-size: 15px; background: var(--card); }
.article th, .article td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.article th { background: #efe4d3; }
.callout { background: var(--card); border-left: 4px solid var(--accent); padding: 16px 18px; margin: 0 0 1.2em; border-radius: 0 var(--r) var(--r) 0; }
.qa { border-top: 1px solid var(--line); padding: 14px 0 4px; }
.qa h3 { font-size: 17px; }
.answer { font-size: 18px; background: var(--card); border: 1px solid var(--line); padding: 16px 18px; border-radius: var(--r); }
.figure { margin: 0 0 1.4em; }
.figure img { border: 1px solid var(--line); box-shadow: 0 10px 28px rgba(0, 0, 0, .08); }
.figure figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }
.tool-head { padding: 34px 0 6px; }
.tool-head h1 { font-size: clamp(30px, 4vw, 42px); }

/* forms (factory rules: custom chevron, label + hint on one line, equal heights) */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 600; min-width: 0; }
.field > .lbl { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hint { font-weight: 400; color: var(--muted); margin-left: 6px; }
input, select, textarea { font: inherit; font-weight: 400; font-size: 16px; color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 12px; width: 100%; }
input, select { height: 46px; padding: 0 12px; }
textarea { padding: 10px 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
select { -webkit-appearance: none; -moz-appearance: none; appearance: none; padding-right: 36px; cursor: pointer; text-overflow: ellipsis; white-space: nowrap;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23586069' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 12px 8px; }
select:hover { border-color: var(--ink); }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); flex: none; margin: 2px 0 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; background: var(--soft); padding: 12px 14px; border-radius: 12px; margin-top: 14px; cursor: pointer; }
.check b { display: block; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pair { display: grid; grid-template-columns: 0.75fr 1.25fr; gap: 10px; }
.full { grid-column: 1 / -1; margin-top: 14px; }

/* app */
#klus-app { padding: 16px 0 40px; min-height: 60vh; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; margin-bottom: 14px; }
.card h3 { margin-bottom: 14px; }
details.card summary { cursor: pointer; list-style: none; display: flex; flex-direction: column; gap: 2px; }
details.card summary::-webkit-details-marker { display: none; }
details.card summary span { font-weight: 700; font-size: 18px; }
details.card summary span::after { content: " ▾"; color: var(--muted); font-size: 14px; }
details.card[open] summary { margin-bottom: 14px; }
details.card summary small { color: var(--muted); font-size: 14px; }
.ed-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.back { font-weight: 600; text-decoration: none; }
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--card); overflow: hidden; margin-bottom: 14px; }
.ed-head .seg { margin-bottom: 0; }
.seg a, .seg button { font: inherit; font-weight: 600; font-size: 15px; padding: 9px 16px; border: 0; background: transparent; color: var(--ink); text-decoration: none; cursor: pointer; border-right: 1.5px solid var(--line); }
.seg > :last-child { border-right: 0; }
.seg [aria-selected="true"] { background: var(--pri); color: var(--yellow); }
.ed { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.side .sticky { position: sticky; top: 78px; }
.tot { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 15px; margin-bottom: 14px; }
.tot b { text-align: right; font-weight: 600; }
.tot .g { font-size: 19px; font-weight: 700; border-top: 2px solid var(--ink); padding-top: 8px; margin-top: 4px; }
.lines { display: flex; flex-direction: column; gap: 10px; margin-bottom: 6px; }
.line { display: grid; grid-template-columns: 84px 96px 120px 96px minmax(0, 1fr) 32px; gap: 8px 10px; align-items: end; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.line .f-desc { grid-column: 1 / 6; grid-row: 1; }
.line > .x { grid-column: 6; grid-row: 1; }
.line.uren { grid-template-columns: 150px 104px 104px 92px minmax(0, 1fr) 70px 32px; }
.line.uren > .x { grid-column: 7; }
.f-sum { height: 46px; display: flex; align-items: center; justify-content: flex-end; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.x { width: 32px; height: 46px; border: 0; background: transparent; color: var(--muted); font-size: 22px; cursor: pointer; border-radius: 3px; }
.x:hover { color: #b42318; background: #fbeee9; }
.sumline { text-align: right; margin: 8px 0 0; }
.fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.fotos figure { margin: 0; position: relative; }
.fotos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 3px; display: block; }
.fotos .x { position: absolute; top: 4px; right: 4px; height: 28px; width: 28px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 18px; }
.foto-add { aspect-ratio: 4 / 3; border: 2px dashed var(--line); border-radius: 3px; display: flex; align-items: center; justify-content: center; font-weight: 600; color: var(--pri-dark); cursor: pointer; background: #fcfaf7; }
.sig-wrap { position: relative; border: 2px dashed var(--line); border-radius: 3px; background: #fcfaf7; margin-bottom: 12px; touch-action: none; }
#sig { display: block; width: 100%; height: 180px; touch-action: none; cursor: crosshair; }
.sig-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); pointer-events: none; }
.sig-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.logo-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.logo-prev { max-height: 48px; max-width: 160px; }
.warn { background: var(--warn-bg); border: 1px solid var(--warn-line); padding: 12px 14px; border-radius: 3px; font-size: 14.5px; margin-bottom: 10px; }
.warn ul { margin: 6px 0 0; padding-left: 1.2em; }
.list-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.list-head h2 { margin-bottom: 4px; }
.doc-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
.doc-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.doc-row:last-child { border-bottom: 0; }
.doc-row:hover { background: #fcfaf7; }
.dr-main small, .dr-amt small { display: block; color: var(--muted); font-size: 13.5px; }
.dr-main { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr-amt { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.tag { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 4px 8px; border-radius: 3px; text-align: center; }
.tag-offerte { background: #e8eefc; color: #1e3a8a; }
.tag-werkbon { background: #eef8c8; color: #3d5a10; }
.tag-factuur { background: var(--soft); color: #7a4512; }
.st-betaald { color: var(--ok) !important; }
.st-te-laat { color: #b42318 !important; font-weight: 700; }
.empty { background: var(--card); border: 1.5px dashed var(--line); border-radius: var(--r); padding: 36px; text-align: center; color: var(--muted); }
.list-foot { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.mbar { display: none; }
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--r); opacity: 0; transition: .2s; z-index: 50; pointer-events: none; max-width: 90vw; }
.toast.on { opacity: 1; transform: translateX(-50%); }

/* dialog + consent */
dialog { border: 0; border-radius: 16px; padding: 26px; max-width: 440px; width: calc(100% - 32px); box-shadow: 0 24px 60px rgba(0, 0, 0, .25); }
dialog::backdrop { background: rgba(20, 20, 20, .5); }
dialog form { display: flex; flex-direction: column; gap: 12px; }
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 560px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: 0 16px 44px rgba(0, 0, 0, .2); z-index: 60; }
.consent p { font-size: 14.5px; }

@media (max-width: 920px) {
  .ed { grid-template-columns: 1fr; }
  .side { display: none; }
  .mbar { display: flex; position: sticky; bottom: 0; z-index: 15; background: var(--dark); color: #fff; padding: 10px 16px; margin: 0 -16px; justify-content: space-between; align-items: center; font-weight: 800; font-size: 18px; }
  .mbar .btn { min-height: 42px; }
  .line { grid-template-columns: 1fr 1fr 1fr 32px; }
  .line .f-desc { grid-column: 1 / 4; }
  .line > .x { grid-column: 4; grid-row: 1; }
  .line .f-vat { grid-column: 1; }
  .line .f-sum { grid-column: 2 / 4; }
  .line.uren .f-who { grid-column: 1 / -1; }
  .line .f-sum { justify-content: flex-start; }
  .line.uren { grid-template-columns: 1fr 1fr 1fr; }
  .line.uren .f-date { grid-column: 1 / -1; grid-row: auto; }
  .line.uren > .x { grid-column: 3; grid-row: auto; }
  .line.uren .f-sum { grid-column: 1 / 3; }
  .line .x { justify-self: end; }
}
@media (max-width: 820px) {
  .wrap { padding: 0 16px; }
  .nav a:not([href="/app/"]) { display: none; }
  .hero { padding: 30px 0 34px; }
  .hero .wrap, .pricing { grid-template-columns: 1fr; gap: 28px; }
  .lead { font-size: 17px; }
  .grid4, .grid3 { grid-template-columns: 1fr 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .site-footer .wrap { grid-template-columns: 1fr 1fr; }
  .site-footer .wrap > div:first-child { grid-column: 1 / -1; }
  .doc-row { grid-template-columns: 1fr auto; }
  .doc-row .tag { grid-column: 1 / -1; justify-self: start; }
  .list-head .btn-row .btn { flex: 1; padding: 10px 12px; }
}
@media (max-width: 480px) {
  .grid4, .grid3 { grid-template-columns: 1fr; }
  .seg a, .seg button { padding: 9px 11px; font-size: 14px; }
}
