/* Nixin — house style v4: "registered mail, but digital".
   Deep night blue for calm and authority, one stamp blue for the moment something is sealed.
   Light is the default theme; the dark variant is derived from the same palette. */

@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 400 900; font-display: swap; src: url(/vendor/fonts/schibsted-grotesk-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 400 900; font-display: swap; src: url(/vendor/fonts/schibsted-grotesk-latin-ext-wght-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(/vendor/fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(/vendor/fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2"); }

:root {
  --bg: #F2F4F8;          /* Mist */
  --surface: #FFFFFF;
  --subtle: #F7F9FC;
  --ink: #13254A;         /* Nachtblauw */
  --ink-2: #3A4459;
  --muted: #586174;       /* Grafiet */
  --line: #E1E5EC;
  --dash: #B4BCCB;
  --field-line: #C8CFDA;
  --accent: #13254A;      /* buttons and text are night blue */
  --accent-hover: #1F3566;
  --accent-ink: #FFFFFF;
  --accent-text: #1A37C2;
  --accent-soft: #E9EEFF; /* Lichtblauw */
  --seal: #2448E8;        /* Stempelblauw: the seal, focus, "sealed" */
  --ok: #0F6640;          /* Afgeleverd */
  --ok-soft: #E5F2EA;
  --warn: #9A3609;
  --warn-soft: #FBEDE6;
  --danger: #9A3609;
  --danger-soft: #FBEDE6;
  --neutral-soft: #F2F4F8;
  --block: #13254A;       /* dark feature card */
  --block-ink: #FFFFFF;
  --block-muted: #C8CFDA;
  --block-chip: #34466E;
  --block-chip-ink: #FFFFFF;
  --logo: url(/brand/nixin-wordmark.svg);
  --radius: 8px;
  --radius-s: 6px;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --head: "Schibsted Grotesk", system-ui, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0A1429;
  --surface: #13254A;
  --subtle: #182D57;
  --ink: #F2F4F8;
  --ink-2: #C8CFDA;
  --muted: #97A3BA;
  --line: #2A3D68;
  --dash: #46598A;
  --field-line: #46598A;
  --accent: #2448E8;
  --accent-hover: #3B5CF0;
  --accent-ink: #FFFFFF;
  --accent-text: #A9B8FF;
  --accent-soft: #1C3270;
  --seal: #6C86FF;
  --ok: #6FD3A2;
  --ok-soft: #12382A;
  --warn: #F0A27A;
  --warn-soft: #3A2012;
  --danger: #F0A27A;
  --danger-soft: #3A2012;
  --neutral-soft: #1A2F5C;
  --block: #0A1429;
  --block-ink: #FFFFFF;
  --block-muted: #C8CFDA;
  --block-chip: #24386A;
  --block-chip-ink: #FFFFFF;
  --logo: url(/brand/nixin-wordmark-white.svg);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--sans); }
a { color: var(--accent-text); }
a:hover { color: var(--accent); }

/* ── header ── */
.top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
  background: var(--surface); border-bottom: 1px solid var(--line);
  padding: 14px max(24px, calc((100% - 1200px) / 2 + 24px));
}
/* The Nixin wordmark (204 × 70) is the logo, drawn 26 px high in a box as high as the old logo (30 px), so
   nothing around it moves. The name stays in the page for screen readers. */
.brand {
  --brand-h: 26px; display: inline-block; flex: none; width: calc(var(--brand-h) * 204 / 70); height: 30px;
  background: var(--logo) left center / auto var(--brand-h) no-repeat; overflow: hidden; white-space: nowrap; text-indent: 110%; color: transparent;
}
.top .right { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; justify-content: flex-end; }
.top nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.top nav a { padding: 10px 14px; border-radius: 10px; color: var(--ink-2); font-weight: 500; font-size: 15px; text-decoration: none; }
.top nav a:hover { background: var(--neutral-soft); color: var(--ink); }
.top nav a[aria-current=page] { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.top nav a.who { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; margin-left: 4px; }
.avatar {
  width: 36px; height: 36px; flex: none; border-radius: 999px; background: var(--ink); color: var(--bg);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 15px;
}
@media (max-width: 720px) { .who-name { display: none; } }
button.linklike { border: 0; background: none; height: auto; padding: 10px 8px; font: 500 15px var(--sans); color: var(--muted); }
button.linklike:hover:not(:disabled) { color: var(--accent-text); border: 0; }

.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--subtle); }
.lang button { height: 28px; border: 0; background: transparent; color: var(--muted); padding: 0 10px; border-radius: 999px; font: 500 12px var(--mono); letter-spacing: .04em; }
.lang button[aria-pressed=true] { background: var(--ink); color: var(--bg); }
.theme-toggle { width: 36px; height: 36px; padding: 0; border-radius: 999px; border: 1px solid var(--line); background: var(--subtle); color: var(--ink-2); }
.theme-toggle::before { content: ""; width: 18px; height: 18px; background: currentColor; -webkit-mask: url(/icons/moon.svg) center / contain no-repeat; mask: url(/icons/moon.svg) center / contain no-repeat; }
:root[data-theme="dark"] .theme-toggle::before { -webkit-mask-image: url(/icons/sun.svg); mask-image: url(/icons/sun.svg); }

/* avoid a flash of the wrong language; reveals by itself if scripts fail */
@keyframes reveal { to { opacity: 1; } }
html:not(.ready) main, html:not(.ready) footer { opacity: 0; animation: reveal 0s 1.5s forwards; }

/* ── page ── */
main { max-width: 1200px; margin: 0 auto; padding: 48px 24px 64px; }
main.narrow { max-width: 608px; }
h1 { font: 600 clamp(30px, 4.4vw, 40px)/1.1 var(--head); letter-spacing: -0.03em; margin: 0 0 10px; text-wrap: balance; }
h2 { font: 600 20px/1.25 var(--head); letter-spacing: -0.01em; margin: 0 0 4px; }
.lede { color: var(--muted); font-size: 17px; line-height: 1.5; max-width: 62ch; margin: 0 0 32px; }
.hint { color: var(--muted); font-size: 14px; line-height: 1.45; margin: 6px 0 0; }
.eyebrow { font: 600 13px var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 10px; }
.mono { font-family: var(--mono); font-size: 13px; font-weight: 500; word-break: break-all; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; margin-bottom: 24px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 32px; }
.page-head .lede { margin-bottom: 0; }

/* ── forms ── */
label { display: block; font-size: 14px; font-weight: 500; margin: 16px 0 8px; }
label .opt { font-weight: 400; color: var(--muted); }
input[type=text], input[type=password], input[type=email], input[type=number], select {
  width: 100%; height: 48px; padding: 0 16px; font: 15px var(--sans); color: var(--ink);
  background: var(--surface); border: 1px solid var(--field-line); border-radius: var(--radius-s);
}
input[readonly] { background: var(--subtle); }
input:focus-visible, select:focus-visible { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
button:focus-visible, a:focus-visible, summary:focus-visible, .drop:focus-within, .seg label:focus-within { outline: 3px solid var(--accent-soft); outline-offset: 2px; }
:root[data-theme="dark"] :is(input, select, button, a, summary):focus-visible { outline-color: #4A70FF; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 16px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; font-size: 15px; line-height: 1.45; }
.check input { margin-top: 2px; width: 20px; height: 20px; flex: none; accent-color: var(--accent); }

button, .btn {
  height: 48px; padding: 0 20px; font: 600 15px var(--sans); cursor: pointer; border-radius: var(--radius-s);
  border: 1px solid var(--field-line); background: var(--surface); color: var(--ink); text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; white-space: nowrap;
}
button:hover:not(:disabled), .btn:hover { border-color: var(--muted); color: var(--ink); }
button:disabled { opacity: .55; cursor: not-allowed; }
button.primary, .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); padding: 0 22px; }
button.primary:hover:not(:disabled), .btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
button.danger { border-color: transparent; background: transparent; color: var(--danger); }
button.danger:hover:not(:disabled) { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
button.small { height: 40px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; }
/* small header controls keep their own colours on hover */
.lang button:hover:not(:disabled) { border: 0; color: var(--ink); }
.lang button[aria-pressed=true]:hover:not(:disabled) { color: var(--bg); }
.theme-toggle:hover:not(:disabled) { border-color: var(--muted); color: var(--ink); }
/* icons on key buttons */
#submit::before, #dl-btn::before, #copy-share::before, #copy-invite::before, #revoke::before {
  content: ""; width: 18px; height: 18px; flex: none; background: currentColor;
  -webkit-mask: url(/icons/lock.svg) center / contain no-repeat; mask: url(/icons/lock.svg) center / contain no-repeat;
}
#copy-share::before, #copy-invite::before { -webkit-mask-image: url(/icons/copy.svg); mask-image: url(/icons/copy.svg); }
#revoke::before { -webkit-mask-image: url(/icons/trash.svg); mask-image: url(/icons/trash.svg); }
#submit { height: 52px; padding: 0 26px; font-size: 16px; }

/* segmented choice */
.seg { display: flex; gap: 6px; padding: 4px; background: var(--neutral-soft); border-radius: var(--radius-s); max-width: 520px; }
.seg label { flex: 1 1 0; margin: 0; position: relative; border-radius: 9px; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; justify-content: center; height: 44px; border: 1px solid transparent; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--ink-2); text-align: center; }
.seg input:checked + span { background: var(--surface); border-color: var(--field-line); color: var(--ink); }

/* ── send page ── */
.split { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; margin-bottom: 24px; }
.split > form, .split > .main-col { flex: 999 1 560px; min-width: 0; }
.split > aside { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
#send-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 32px; }
#send-form > .card { border: 0; border-radius: 0; background: none; margin: 0; padding: 28px 0; }
#send-form > .card + .card { border-top: 1px solid var(--line); }
.step { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.step h2 { font: 600 16px var(--sans); letter-spacing: 0; margin: 0; }
.step-n { width: 26px; height: 26px; flex: none; border-radius: 999px; background: var(--ink); color: var(--bg); display: inline-flex; align-items: center; justify-content: center; font: 600 13px var(--sans); }

.howcard { background: var(--block); color: var(--block-ink); border-radius: var(--radius); padding: 28px; }
.howcard .eyebrow { font: 600 20px var(--head); text-transform: none; letter-spacing: 0; color: var(--block-ink); margin-bottom: 20px; }
.how { list-style: none; counter-reset: how; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.how li { counter-increment: how; display: grid; grid-template-columns: 28px 1fr; column-gap: 14px; font-size: 15px; line-height: 1.45; color: var(--block-muted); }
.how li::before { content: counter(how); grid-row: span 2; width: 28px; height: 28px; border-radius: 8px; background: var(--block-chip); color: var(--block-chip-ink); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; }
.how strong { color: var(--block-ink); font-weight: 600; }
.assure { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; font-size: 14px; line-height: 1.45; color: var(--muted); }
.assure::before { content: ""; width: 40px; height: 40px; flex: none; border-radius: 10px; background: var(--ok-soft) url(/icons/shield-green.svg) center / 20px no-repeat; }
:root[data-theme="dark"] .assure::before { background-image: url(/icons/shield-mint.svg); }
.assure strong { display: block; color: var(--ink); font-size: 15px; font-weight: 600; margin-bottom: 4px; }

.drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 96px;
  border: 1.5px dashed var(--field-line); border-radius: 14px; padding: 18px 16px; text-align: center; cursor: pointer; margin: 0;
  font-weight: 400; color: var(--ink-2); transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop strong { font-size: 15px; font-weight: 600; color: var(--ink); }
.drop span { color: var(--muted); font-size: 13px; }
.drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.file-chip {
  display: flex; align-items: center; gap: 12px; margin: 14px 0 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--subtle); font: 600 14px var(--sans); word-break: break-all;
}
.file-chip::before { content: ""; width: 40px; height: 40px; flex: none; border-radius: 10px; background: var(--accent-soft) url(/icons/file.svg) center / 20px no-repeat; }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 14px 0; }
.toolbar .spacer { flex: 1; }
.canvas-wrap { background: var(--neutral-soft); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; line-height: 0; margin-bottom: 8px; }
#editor { width: 100%; height: auto; cursor: crosshair; touch-action: none; display: block; }

/* ── messages ── */
.notice { border-radius: var(--radius-s); padding: 14px 16px; font-size: 14.5px; line-height: 1.45; margin: 16px 0 0; }
.notice.info { background: var(--accent-soft); color: var(--ink); }
.notice.ok { background: var(--ok-soft); color: var(--ok); }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.error { background: var(--danger-soft); color: var(--danger); }
ol.steps { margin: 10px 0 0; padding-left: 20px; font-size: 15px; }
ol.steps li { margin-bottom: 6px; }

.linkbox { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.linkbox input { flex: 1 1 260px; min-width: 0; font: 500 14px var(--mono); background: var(--subtle); }
.linkbox button { flex: none; }

.big-ok { display: flex; align-items: center; gap: 18px; font: 600 clamp(24px, 4vw, 32px)/1.1 var(--head); letter-spacing: -0.03em; color: var(--ink); margin: 0 0 20px; }
.big-ok::before { content: ""; width: 56px; height: 56px; flex: none; border-radius: 999px; background: var(--ok-soft) url(/icons/check-green.svg) center / 28px no-repeat; }
:root[data-theme="dark"] .big-ok::before { background-image: url(/icons/check-mint.svg); }

/* ── status pills ── */
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px; white-space: nowrap;
  font: 600 13px var(--sans); background: var(--accent-soft); color: var(--accent-text);
}
.badge::before { content: ""; width: 14px; height: 14px; flex: none; background: currentColor; -webkit-mask: url(/icons/clock.svg) center / contain no-repeat; mask: url(/icons/clock.svg) center / contain no-repeat; }
.badge.downloaded, .badge.u-active, .badge.secure { background: var(--ok-soft); color: var(--ok); }
.badge.downloaded::before, .badge.u-active::before { -webkit-mask-image: url(/icons/check.svg); mask-image: url(/icons/check.svg); }
.badge.secure::before { -webkit-mask-image: url(/icons/lock.svg); mask-image: url(/icons/lock.svg); }
.badge.expired { background: var(--warn-soft); color: var(--warn); }
.badge.revoked { background: var(--neutral-soft); color: var(--ink-2); }
.badge.expired::before, .badge.revoked::before { -webkit-mask-image: url(/icons/trash.svg); mask-image: url(/icons/trash.svg); }
.badge.u-disabled { background: var(--warn-soft); color: var(--warn); }
.badge.uploaded { background: var(--ok-soft); color: var(--ok); }
.badge.uploaded::before { -webkit-mask-image: url(/icons/upload.svg); mask-image: url(/icons/upload.svg); }
.badge.not_collected, .badge.lost { background: var(--warn-soft); color: var(--warn); }
.badge.cancelled { background: var(--neutral-soft); color: var(--ink-2); }
.badge.not_collected::before, .badge.lost::before, .badge.cancelled::before { -webkit-mask-image: url(/icons/trash.svg); mask-image: url(/icons/trash.svg); }
#up-form > .card { margin-bottom: 24px; }
.badge.u-disabled::before { -webkit-mask-image: url(/icons/ban.svg); mask-image: url(/icons/ban.svg); }

/* ── facts, tables, stats ── */
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 18px 0 0; font-size: 15px; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; word-break: break-word; font-weight: 500; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font: 600 13px var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
th, td { padding: 14px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
td a { font-weight: 500; text-decoration: none; color: var(--ink); }
td a:hover { color: var(--accent-text); text-decoration: underline; }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions button + button { margin-left: 6px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.stat strong { display: block; font: 600 34px/1.1 var(--head); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 14px; color: var(--muted); }

.list-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-bottom: 8px; }
.list-tools input[type=search] { flex: 1 1 260px; max-width: 420px; height: 48px; padding: 0 16px; font: 15px var(--sans); color: var(--ink); background: var(--surface); border: 1px solid var(--field-line); border-radius: var(--radius-s); }
.list-tools .seg { flex: 0 1 300px; }
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.pager .spacer { flex: 1; }
.pager .hint { margin: 0; }

/* ── audit timeline ── */
.timeline { list-style: none; margin: 18px 0 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 26px 40px; }
.timeline li::after { content: ""; position: absolute; left: 11px; top: 26px; bottom: 0; width: 2px; background: var(--field-line); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::after { display: none; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 999px; background: var(--surface); border: 2px solid var(--field-line); }
.timeline li.key::before { border: 0; background: var(--ok) url(/icons/check-white.svg) center / 14px no-repeat; }
:root[data-theme="dark"] .timeline li.key::before { background-image: url(/icons/check-navy.svg); }
.timeline li.key::after { background: var(--ok); }
.timeline li.bad::before { border-color: var(--warn); background: var(--warn-soft); }
.ev-head { display: flex; flex-wrap: wrap; gap: 2px 14px; align-items: baseline; justify-content: space-between; padding-top: 1px; }
.ev-name { font-weight: 600; font-size: 15px; }
.ev-time { font-size: 13px; color: var(--muted); }
.ev-data { margin: 8px 0 0; font-size: 14px; display: grid; grid-template-columns: max-content 1fr; gap: 3px 16px; }
.ev-data dt { color: var(--muted); }
.ev-data dd { margin: 0; word-break: break-word; }
.ev-hash { font: 500 11px var(--mono); color: var(--muted); margin-top: 8px; word-break: break-all; }

/* ── inactivity bar ── */
.idle-bar {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 20; width: min(640px, calc(100% - 32px));
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px;
  background: var(--block); color: var(--block-ink); border-radius: 16px; padding: 14px 16px 14px 20px;
  font-size: 15px; line-height: 1.4; box-shadow: 0 10px 30px rgba(11, 18, 32, .28);
}
.idle-bar span { flex: 1 1 260px; }
#idle-note { margin: 0 0 16px; }

/* ── details / faq ── */
details { border-top: 1px solid var(--line); padding: 16px 0; }
details:first-of-type { border-top: 0; }
details.inline { border: 0; padding: 8px 0 0; }
summary { cursor: pointer; font-weight: 600; font-size: 15px; }
details p { margin: 8px 0 0; color: var(--muted); font-size: 14.5px; max-width: 72ch; }

.preview { max-width: 100%; border-radius: 14px; border: 1px solid var(--line); margin-top: 20px; }
.secure-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
footer.fine { max-width: 1200px; margin: 0 auto; padding: 0 24px 40px; color: var(--muted); font-size: 13px; }
main.narrow + footer.fine { max-width: 608px; }

@media (max-width: 560px) {
  main { padding: 32px 16px 48px; }
  .card { padding: 22px; }
  #send-form { padding: 0 22px; }
  dl.facts, .ev-data { grid-template-columns: 1fr; gap: 0; }
  dl.facts dt, .ev-data dt { font-size: 13px; margin-top: 10px; }
  .actions > button, .actions > .btn { flex: 1 1 100%; }
}
@media print {
  .top .right, .actions, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
  .card { border-color: #999; break-inside: avoid; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ───────── v4 refinements: shape, type and controls ───────── */
body { font-size: 16px; }
h1 { font-weight: 800; font-size: clamp(32px, 4.6vw, 44px); line-height: 1; letter-spacing: -0.045em; margin-bottom: 12px; }
h2 { font-weight: 700; letter-spacing: -0.02em; }
.lede { color: var(--ink-2); font-size: 17px; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--seal); }

.top { min-height: 68px; padding: 0 max(32px, calc((100% - 1240px) / 2 + 32px)); }
.top nav { gap: 4px 28px; align-self: stretch; align-items: stretch; }
.top nav a { display: inline-flex; align-items: center; min-height: 68px; padding: 0; border-radius: 0; background: none; color: var(--muted); font-weight: 600; }
.top nav a:hover { background: none; color: var(--ink); }
.top nav a[aria-current=page] { background: none; color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
.top nav a.who { padding: 0; margin-left: 0; font-weight: 500; font-size: 14px; color: var(--ink-2); }
.top nav button.linklike { align-self: center; }
.avatar { font-size: 13px; }
main { max-width: 1240px; padding: 48px 32px 72px; }
footer.fine { max-width: 1240px; padding: 0 32px 40px; }

.card, .stat, .assure, #send-form { border: 0; }
.card { padding: 32px; }
.eyebrow, th, dl.facts dt, .ev-data dt, .ev-time { font-family: var(--mono); font-size: 12px; font-weight: 400; text-transform: none; letter-spacing: 0; }
.stat strong { font-weight: 800; letter-spacing: -0.045em; }
dl.facts dd { font-weight: 600; }

input[type=text], input[type=password], input[type=email], input[type=number], select, .list-tools input[type=search] { font-size: 16px; padding: 0 14px; }
input:focus-visible, select:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--accent-soft); }
button:focus-visible, a:focus-visible, summary:focus-visible, .drop:focus-within, .seg label:focus-within { outline: 2px solid var(--seal); outline-offset: 2px; }
.check input { accent-color: var(--seal); }

button, .btn { border: 1px solid var(--ink); transition: transform .15s ease, background-color .15s ease, color .15s ease; }
button:hover:not(:disabled), .btn:hover { background: var(--ink); border-color: var(--ink); color: var(--surface); transform: translateY(-1px); }
button:active:not(:disabled), .btn:active { transform: translateY(1px) scale(.99); }
button.primary:hover:not(:disabled), .btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
button.danger, button.danger:hover:not(:disabled) { border-color: transparent; }
button.linklike, button.linklike:hover:not(:disabled), .lang button, .lang button:hover:not(:disabled) { border: 0; background: none; transform: none; }
button.linklike:hover:not(:disabled) { color: var(--ink); }
.lang button[aria-pressed=true], .lang button[aria-pressed=true]:hover:not(:disabled) { background: var(--ink); color: var(--bg); }
.theme-toggle, .theme-toggle:hover:not(:disabled) { border: 1px solid var(--line); background: var(--subtle); color: var(--ink-2); transform: none; }
#submit { height: 58px; font-size: 17px; }

.seg { padding: 4px; gap: 4px; }
.seg span { border-radius: 4px; border: 0; font-size: 15px; }
.seg input:checked + span { background: var(--accent); color: var(--accent-ink); }

/* status: a small mono tag with a dot */
.badge { height: 26px; padding: 0 9px; border-radius: 4px; font: 500 12px var(--mono); background: var(--accent-soft); color: var(--accent-text); }
.badge::before, .badge.downloaded::before, .badge.u-active::before, .badge.secure::before, .badge.expired::before, .badge.revoked::before,
.badge.u-disabled::before, .badge.uploaded::before, .badge.not_collected::before, .badge.lost::before, .badge.cancelled::before {
  width: 6px; height: 6px; border-radius: 999px; background: currentColor; -webkit-mask: none; mask: none;
}
.badge.pending::before, .badge.uploaded::before, .badge.open::before, .badge.secure::before { background: var(--seal); }
.badge.uploaded, .badge.secure { background: var(--accent-soft); color: var(--accent-text); }
.badge.open, .badge.u-invited, .badge.u-requested { background: var(--neutral-soft); color: var(--ink-2); }
.badge.open::before { background: var(--muted); }

.drop { border: 1px dashed var(--dash); border-radius: var(--radius-s); }
.file-chip, .canvas-wrap, .preview, .notice, .idle-bar { border-radius: var(--radius-s); }
.howcard { padding: 32px; }
.howcard .eyebrow { font: 700 20px var(--sans); letter-spacing: -0.02em; }
.how li::before { border-radius: 4px; font-family: var(--mono); font-weight: 500; }
.big-ok { font-weight: 800; letter-spacing: -0.045em; }
tbody tr:hover td { background: var(--subtle); }
td a { font-weight: 600; }
.ev-hash { font-weight: 400; }
dl.facts { gap: 0 24px; }
dl.facts dt, dl.facts dd { padding: 10px 0; border-bottom: 1px dashed var(--dash); }
dl.facts dt:last-of-type, dl.facts dd:last-of-type { border-bottom: 0; }
@media (max-width: 560px) {
  .top { padding: 8px 16px; }
  .top nav a { min-height: 44px; }
  dl.facts dt { border-bottom: 0; padding-bottom: 0; }
  dl.facts dd { padding-top: 2px; }
}

/* ───────── sign-in, sign-up: split layout ───────── */
.auth { display: flex; flex-wrap: wrap; min-height: 100vh; }
.auth-aside { flex: 1 1 380px; background: #13254A; color: #FFFFFF; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 48px; }
.auth-aside .brand { background-image: url(/brand/nixin-wordmark-white.svg); }
.auth-claim { margin: 0 0 18px; font-weight: 800; font-size: clamp(32px, 4vw, 46px); line-height: .98; letter-spacing: -0.05em; max-width: 12ch; }
.auth-text { margin: 0; font-size: 17px; line-height: 1.5; color: #C8CFDA; max-width: 40ch; }
.auth-foot { font: 400 12px var(--mono); color: #97A3BA; }
.auth-main { flex: 1.2 1 480px; background: var(--surface); display: flex; flex-direction: column; }
.auth-tools { display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 20px 32px 0; }
.auth-tools .right, .auth-tools { flex-wrap: wrap; }
main.auth-form { width: 100%; max-width: 520px; margin: auto; padding: 32px 32px 64px; }
.auth-form .card { padding: 0; margin: 0; background: none; }
.auth-form .lede { margin-bottom: 24px; }
.trap { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 820px) { .auth-aside { flex-basis: 100%; padding: 28px 24px; gap: 20px; } .auth-claim { max-width: none; font-size: 30px; } .auth-text, .auth-foot { display: none; } }

/* ───────── two-step sign-in ───────── */
.steps-line { margin: 0 0 18px; font: 400 12px var(--mono); color: var(--muted); }
.steps-line strong { font-weight: 500; color: var(--accent-text); }
input.otp { height: 64px; max-width: 280px; text-align: center; font: 500 28px var(--mono); letter-spacing: .3em; padding: 0 8px 0 calc(8px + .3em); border-color: var(--ink); }
input.otp.rec { max-width: 340px; font-size: 20px; letter-spacing: .12em; }
.qr-row { display: flex; flex-wrap: wrap; gap: 20px 28px; align-items: center; margin: 22px 0 6px; }
#qr { width: 184px; height: 184px; flex: none; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; }
#qr svg { display: block; width: 100%; height: 100%; }
.secret { margin: 6px 0 0; font-size: 15px; letter-spacing: .06em; word-break: break-word; max-width: 24ch; }
ul.codes { list-style: none; margin: 18px 0 0; padding: 18px 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px 20px; border: 1px dashed var(--dash); border-radius: 6px; font: 500 16px var(--mono); letter-spacing: .06em; }
#codes .check { margin-top: 22px; }

#turnstile { margin-top: 18px; min-height: 65px; }

/* Company logos: always on white, so a logo with dark lettering stays readable in the dark theme. */
.logo-plate { display: flex; align-items: center; min-height: 96px; margin: 16px 0 4px; padding: 18px 20px; background: #FFFFFF; border: 1px dashed var(--dash); border-radius: var(--radius); }
.logo-plate .hint { margin: 0; color: #586174; }
.logo-plate img, .org-logo img { display: block; max-width: 240px; max-height: 56px; width: auto; height: auto; }
.org-logo { display: inline-block; margin: 0 0 20px; padding: 12px 16px; background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--radius); }

/* Credit */
.credit-line { margin: 0 0 18px; font: 500 14px var(--mono); color: var(--ink-2); }
.credit-big { margin: 4px 0 6px; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
table.ledger td.num, table.ledger th.num { text-align: right; white-space: nowrap; font-family: var(--mono); }
table.ledger td.plus { color: var(--ok); }
.credit-cell { white-space: nowrap; font-family: var(--mono); font-size: 13px; }
dialog.modal { width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 32px); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: var(--surface); color: var(--ink); }
dialog.modal.wide { width: min(640px, calc(100vw - 32px)); padding: 28px 32px; }
dialog.modal::backdrop { background: rgba(10, 20, 41, 0.45); }
dialog.modal h2 { margin-top: 0; }
#credit-empty { margin: 0 0 18px; }
.stats.solo { grid-template-columns: minmax(0, 340px); }
/* Stempelblauw in both themes: white text on it stays readable (contrast 5.9). */
.stat.credit-tile { background: #2448E8; color: #FFFFFF; border-radius: 16px; padding: 22px 26px; }
.credit-tile .credit-label { display: block; font: 500 13px var(--mono); color: #FFFFFF; opacity: .85; margin-bottom: 2px; }
.credit-tile strong { font-size: 52px; line-height: 1; margin: 2px 0 6px; color: #FFFFFF; }
.credit-tile span { color: #FFFFFF; }
.credit-tile #credit-sub { font-size: 15px; font-weight: 500; }
.credit-tile #credit-res { display: block; margin-top: 2px; font-size: 13.5px; opacity: .85; }
.credit-tile [hidden] { display: none !important; }
.card #credit-empty { margin: 12px 0; }

/* ── users page: compact list with one actions menu per row ── */
.users-table td { padding: 12px 10px; }
.users-table .line1, .users-table .line2 { display: block; }
.users-table .line1.strong { font-weight: 600; }
.users-table .line2 { margin-top: 2px; font-size: 13.5px; color: var(--muted); word-break: break-word; }
.users-table .you { font-weight: 400; color: var(--muted); }
.users-table .menu-cell { width: 1%; text-align: right; }
.menu-btn { width: 40px; padding: 0; font-size: 0; display: inline-flex; align-items: center; justify-content: center; }
.menu-btn::before { content: "\2022\2022\2022"; font-size: 13px; letter-spacing: 2px; margin-left: 2px; }
.menu-btn[aria-expanded=true], .menu-btn[aria-expanded=true]:hover:not(:disabled) { background: var(--ink); border-color: var(--ink); color: var(--surface); transform: none; }
.row-menu { position: fixed; z-index: 50; min-width: 220px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); box-shadow: 0 12px 32px rgba(10, 20, 41, 0.16); }
.row-menu button, .row-menu button:hover:not(:disabled) { display: block; width: 100%; height: 40px; padding: 0 12px; border: 0; border-radius: 4px; background: none; color: var(--ink); text-align: left; font: 500 14.5px var(--sans); transform: none; }
.row-menu button:hover:not(:disabled), .row-menu button:focus-visible { background: var(--subtle); outline: none; }
.row-menu button.danger, .row-menu button.danger:hover:not(:disabled) { color: var(--danger); margin-top: 6px; position: relative; }
.row-menu button.danger::before { content: ""; position: absolute; left: 0; right: 0; top: -4px; border-top: 1px solid var(--line); }
.list-tools #add-btn { margin-left: auto; }
.card.slim { padding: 20px 32px; }
.card.slim .hint { margin-left: 32px; }
#asked h2 { margin-top: 0; }
@media (max-width: 760px) {
  .list-tools #add-btn { margin-left: 0; width: 100%; }
  #kind-filter { flex: 1 1 100%; max-width: none; }
  #kind-filter span { font-size: 14px; padding: 0 6px; }
  .users-table thead { display: none; }
  .users-table, .users-table tbody { display: block; }
  .users-table tr { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .users-table tbody tr:last-child { border-bottom: 0; }
  .users-table td { display: block; padding: 0; border: 0; grid-column: 1; }
  .users-table tbody tr:hover td { background: none; }
  .users-table td.who-cell { grid-row: 1; }
  .users-table td.menu-cell { grid-column: 2; grid-row: 1; width: auto; }
  .users-table td[data-label] { display: grid; grid-template-columns: 96px 1fr; column-gap: 12px; font-size: 14px; }
  .users-table td[data-label]::before { content: attr(data-label); grid-row: span 2; font: 400 12px var(--mono); color: var(--muted); padding-top: 3px; }
  .users-table td[data-label] .badge { justify-self: start; }
  .card.slim { padding: 18px 22px; }
}

/* ── text pages (/help, /privacy) and the links to them ── */
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; margin: 0 auto; padding: 0 24px 32px; font: 400 13px var(--mono); }
.legal-links a { color: var(--muted); text-decoration: none; }
.legal-links a:hover { color: var(--ink); text-decoration: underline; }
.legal-links .formerly { color: var(--muted); }
.auth-main .legal-links { padding-top: 0; }
main.doc { max-width: 760px; }
.doc .card { padding: 28px 32px; }
.doc h2 { margin-top: 0; }
.doc h3 { margin: 22px 0 6px; font-size: 16px; }
.doc p, .doc li { font-size: 15.5px; line-height: 1.6; }
.doc p { margin: 0 0 10px; }
.doc em { color: var(--muted); font-style: normal; font-size: 14px; }
.doc a { color: var(--accent-text); }
ul.ticks { list-style: none; margin: 10px 0 12px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
ul.ticks li { position: relative; padding-left: 26px; }
ul.ticks li::before { content: ""; position: absolute; left: 0; top: .5em; width: 8px; height: 8px; border-radius: 999px; background: var(--seal); }
.card.trust ul.ticks li { font-size: 15px; line-height: 1.5; }
.card.trust .hint a { color: var(--accent-text); }
table.doc-table th { width: 34%; font: 600 14px var(--sans); color: var(--ink); vertical-align: top; text-transform: none; letter-spacing: 0; }
table.doc-table td { font-size: 14.5px; line-height: 1.5; vertical-align: top; }
@media (max-width: 560px) {
  .doc .card { padding: 22px 20px; }
  table.doc-table, table.doc-table tbody, table.doc-table tr, table.doc-table th, table.doc-table td { display: block; width: auto; }
  table.doc-table th { border-bottom: 0; padding-bottom: 2px; }
}

/* ── data processing agreement ── */
.card.dpa-card { border: 2px solid var(--seal); }
.card.dpa-card h2 { margin-top: 0; }
.card.dpa-card a, .dpa-box a, #dpa-link a { color: var(--accent-text); }
.dpa-box { margin: 0 0 22px; padding: 0 0 18px; border-bottom: 1px solid var(--line); }
.dpa-box h2 { margin: 0 0 4px; font-size: 18px; }
.dpa-box .check { margin-top: 12px; }
.users-table .dpa-state.missing { color: var(--warn); }
