:root {
    color-scheme: light;
    --ink: #202228;
    --muted: #6d727e;
    --brand: #f36b21;
    --brand-dark: #c84c0c;
    --line: #dadde3;
    --paper: #f3f4f6;
    font-family: "Segoe UI", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
[hidden] { display: none !important; }
.wrap { width: min(1080px, calc(100% - 56px)); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); background: white; }
.header-inner, .site-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.header-inner { min-height: 75px; }
.brand { display: inline-flex; flex-shrink: 0; }
.brand img { display: block; width: 160px; height: auto; }
.back, .site-footer a { color: var(--brand-dark); text-decoration: none; font-weight: 700; }
.back:hover, .site-footer a:hover { text-decoration: underline; }
.intro { margin-block: 42px 30px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(34px, 5vw, 57px); line-height: 1.06; letter-spacing: -.045em; }
.intro p { margin-top: 13px; color: var(--muted); line-height: 1.55; font-size: 17px; }
.card { border: 1px solid var(--line); background: white; border-radius: 16px; box-shadow: 0 5px 22px #26201708; }
.artwork { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 5fr); overflow: hidden; }
.settings, .preview, .details { padding: clamp(20px, 3.2vw, 34px); }
h2 { font-size: 21px; line-height: 1.2; letter-spacing: -.025em; margin-bottom: 22px; }
label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 7px; }
.dropzone {
    display: grid;
    justify-items: center;
    align-content: center;
    min-height: 132px;
    padding: 14px;
    border: 1px dashed #f6ad83;
    border-radius: 10px;
    background: #fff0e7;
    color: var(--brand-dark);
    text-align: center;
    cursor: pointer;
    overflow-wrap: anywhere;
}
.dropzone:hover, .dropzone.drag { background: #ffe3d2; border-color: var(--brand); }
.dropzone:has(+ input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 3px; }
.dropzone strong { font-size: 15px; margin-top: 2px; }
.dropzone span:last-child { font-size: 13px; font-weight: 400; margin-top: 3px; }
.upload-icon { font-size: 26px; line-height: 1; font-weight: 500; }
.file-input, .trap { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.help { color: var(--muted); font-size: 13px; line-height: 1.5; }
.crop-note { margin-top: 13px; }
.fields { display: grid; gap: 16px; }
.fields > div { min-width: 0; }
.artwork-fields { grid-template-columns: 1.25fr 1fr; margin-top: 20px; }
input:not(.file-input), select { width: 100%; min-width: 0; height: 46px; border: 1px solid #cbd0da; border-radius: 8px; background: white; color: var(--ink); padding: 0 10px; font: inherit; font-size: 15px; }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.preview { background: #f3f4f6; border-left: 1px solid var(--line); }
.preview-top, .preview-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.preview-top { margin-bottom: 13px; }
.preview-top h2 { margin: 0; }
.preview-top span { color: var(--brand-dark); font-size: 13px; font-weight: 750; border-radius: 20px; padding: 4px 10px; background: #fff0e7; }
.canvas-wrap { height: 305px; position: relative; background: #e5e7eb; border-radius: 10px; overflow: hidden; }
.canvas-wrap canvas { display: block; width: 100%; height: 100%; }
.empty { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(140px, 80%); text-align: center; color: var(--muted); font-size: 13px; pointer-events: none; }
.preview-bottom { margin-top: 12px; color: var(--muted); font-size: 13px; }
.legend { display: inline-flex; align-items: center; gap: 7px; }
.legend i { display: inline-block; width: 19px; border-top: 2px dashed var(--brand); }
.details { margin-top: 22px; }
.order-fields { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; align-items: start; }
.contact-title { margin-block: 28px 16px; }
.contact-fields { grid-template-columns: 1fr 1fr; }
.send { display: flex; justify-content: space-between; align-items: center; gap: 24px; border-top: 1px solid var(--line); padding-top: 22px; margin-top: 24px; }
.send p, .receipt p { color: var(--muted); font-size: 15px; line-height: 1.55; max-width: 570px; }
button, .button { border: 0; border-radius: 8px; background: var(--brand); color: white; display: inline-flex; align-items: center; gap: 14px; justify-content: center; min-height: 46px; padding: 10px 18px; font: inherit; font-weight: 750; text-decoration: none; cursor: pointer; white-space: nowrap; }
button:hover, .button:hover { background: var(--brand-dark); }
button:disabled { opacity: .62; cursor: wait; }
.notice { margin-top: 14px; padding: 10px 12px; border-radius: 8px; font-size: 14px; line-height: 1.5; }
.notice.error { background: #ffede9; color: #8b2118; }
.error-text { color: #8b2118; }
.resolution { background: #fff5da; color: #5a430b; }
.receipt p + p { margin-top: 8px; }
.receipt .button { margin-top: 20px; }
.site-footer { padding-block: 25px; color: var(--muted); font-size: 14px; }
@media (max-width: 850px) {
    .order-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .artwork-fields { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .wrap { width: calc(100% - 28px); }
    .header-inner { min-height: 62px; }
    .brand img { width: 127px; }
    .back { font-size: 13px; }
    .intro { margin-top: 28px; }
    .artwork { grid-template-columns: 1fr; }
    .artwork-fields { grid-template-columns: 1.25fr 1fr; }
    .preview { border-left: 0; border-top: 1px solid var(--line); }
    .canvas-wrap { height: 252px; }
    .contact-fields { grid-template-columns: 1fr; }
    .send { flex-direction: column; align-items: stretch; gap: 15px; }
    .site-footer { flex-wrap: wrap; }
}

.pdf-options { margin-top: 16px; display: grid; gap: 14px; }
.pdf-options .help { margin-top: 4px; }
.check { display: flex; align-items: center; gap: 8px; margin-bottom: 0; }
.check input[type="checkbox"] { width: 17px; height: 17px; padding: 0; margin: 0; accent-color: var(--brand); }

.pages-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.pages-heading h2 { margin-bottom: 6px; }
.page-count { flex: 0 0 auto; color: var(--brand-dark); font-weight: 750; font-size: 13px; background: #fff0e7; padding: 5px 10px; border-radius: 20px; }
.page-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.page-tile { min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: #ffffff; overflow: hidden; }
.page-tile.selected { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.page-tile.drag-over { outline: 2px dashed var(--brand); outline-offset: 2px; }
.page-open { display: grid; width: 100%; justify-items: stretch; background: transparent; color: var(--ink); padding: 8px; gap: 5px; text-align: left; border-radius: 8px; }
.page-open:hover { background: #fff0e7; }
.page-open canvas { width: 100%; height: 96px; background: #e5e7eb; border-radius: 5px; }
.page-open strong { font-size: 13px; }
.page-open small { font-size: 12px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.page-actions { display: grid; grid-template-columns: repeat(3, 1fr); padding: 0 7px 7px; gap: 4px; }
.page-actions button { min-height: 34px; padding: 0; color: var(--brand-dark); background: #f0f1f4; border-radius: 6px; }
.page-actions button:hover { background: #ffe3d2; }
.page-actions button:disabled { opacity: .35; cursor: default; }
.range-option { margin-top: 10px; }
.set-summary { margin-top: 6px; }
#upload-progress { margin-top: 8px; }
dialog { border: 1px solid var(--line); border-radius: 12px; padding: 24px; color: var(--ink); max-width: min(440px, calc(100% - 28px)); }
dialog::backdrop { background: #20222885; }
dialog h2 { margin-bottom: 12px; }
dialog label { margin-top: 14px; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.dialog-actions .quiet { background: #f0f1f4; color: var(--ink); }
@media (max-width: 640px) {
    .page-list { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
    .page-actions button { min-height: 42px; }
}

/* Prijscalculatie voor kleine printopdrachten */
.price-summary { margin-top: 25px; padding: 23px; border: 1px solid var(--line); border-radius: 12px; background: #ffffff; }
.price-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.price-heading h2 { margin: 0; }
.price-pill { color: var(--brand-dark); background: #fff0e7; border-radius: 30px; padding: 5px 10px; font-size: 12px; font-weight: 750; }
.price-summary > .help { margin-top: 12px; }
.price-rows { margin: 16px 0 0; }
.price-rows > div { display: flex; justify-content: space-between; align-items: baseline; gap: 18px; padding: 7px 0; font-size: 14px; }
.price-rows dt { color: var(--muted); line-height: 1.45; }
.price-rows dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 700; text-align: right; white-space: nowrap; }
.price-rows .price-rule { border-top: 1px solid var(--line); margin-top: 7px; padding-top: 14px; }
.price-rows .price-total { margin: 10px -12px 0; padding: 14px 12px; background: #fff0e7; border-radius: 8px; }
.price-total dt, .price-total dd { color: var(--brand-dark); font-size: 18px; font-weight: 800; }
.price-quote { margin-top: 16px; background: #fff0e7; border: 1px solid #f6b68f; border-radius: 8px; padding: 16px; }
.price-quote strong { color: var(--brand-dark); font-size: 18px; }
.price-quote p { margin-top: 6px; line-height: 1.5; }
.price-explanation { max-width: 850px; }
.receipt-price { padding: 14px 16px; background: #fff0e7; border-radius: 8px; color: var(--brand-dark) !important; font-weight: 750; }
@media (max-width: 640px) { .price-summary { padding: 16px; } .price-rows > div { gap: 10px; } .price-total dt, .price-total dd { font-size: 16px; } }


/* DRUKKER.NL huisstijl: oranje, antraciet en rustige lichtgrijze vlakken.
   Formuliervelden binnen een rij hebben een gelijke bovenlijn en hoogte. */
.site-header { border-top: 5px solid var(--brand); }
.back { color: var(--brand-dark); }
.intro { background: var(--ink); color: white; border-radius: 22px; padding: clamp(24px, 4vw, 38px); margin-block: 28px 24px; }
.intro h1 { color: white; }
.intro p { color: rgba(255,255,255,.83); max-width: 760px; }
.card { border-radius: 22px; box-shadow: 0 10px 30px rgba(25,29,36,.06); }
.dropzone { border-radius: 12px; }
.dropzone:hover, .dropzone.drag { color: var(--ink); }
button, .button { border-radius: 999px; }
button:not(:disabled):hover, .button:hover { background: var(--brand-dark); }
input:not(.file-input), select { border-radius: 10px; }
select { cursor: pointer; }
input:not(.file-input):focus, select:focus { border-color: var(--brand); }
.preview { background: #f3f4f6; }
.preview-top span, .page-count, .price-pill { color: #9d3b08; }
.price-summary { background: #fff; border-radius: 16px; }
.price-rows .price-total { background: #fff0e7; }
.price-total dt, .price-total dd { color: #983904; }
.order-fields > div { display: flex; flex-direction: column; min-width: 0; }
.order-fields > div > label { min-height: 38px; display: flex; align-items: flex-end; line-height: 1.25; }
.order-fields input:not(.file-input), .order-fields select { height: 46px; flex: 0 0 46px; }
.order-fields .set-summary { margin-top: 7px; }
@media (max-width: 1100px) {
    .order-fields { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 700px) {
    .order-fields { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 440px) {
    .order-fields { grid-template-columns: 1fr; }
    .order-fields > div > label { min-height: auto; }
    .intro { border-radius: 16px; }
}
