/* Damgaard Solutions brand kit: Navy #12263A, Steel #4885A5, Sky #5096B3,
   Montserrat only, no gradients, no pure black. Craft: Operate mode, quiet,
   dense where it helps, AA contrast, visible focus, reduced motion respected. */
@font-face { font-family: Montserrat; font-weight: 400; font-display: swap; src: url("fonts/montserrat-latin-400-normal.e7198b2dcb57.woff2") format("woff2"); }
@font-face { font-family: Montserrat; font-weight: 500; font-display: swap; src: url("fonts/montserrat-latin-500-normal.f96e8aab37e8.woff2") format("woff2"); }
@font-face { font-family: Montserrat; font-weight: 600; font-display: swap; src: url("fonts/montserrat-latin-600-normal.9e606da1cbeb.woff2") format("woff2"); }
@font-face { font-family: Montserrat; font-weight: 700; font-display: swap; src: url("fonts/montserrat-latin-700-normal.1c0792ac34ef.woff2") format("woff2"); }
:root {
  --navy: #12263A; --steel: #4885A5; --sky: #5096B3; /* steel and sky are accents only: under 4.5:1 as text on white */
  --bg: #F7F8F9; --surface: #FFFFFF; --fg: #12263A; --muted: #59606A;
  --line: #E0E2E4; --rule: #C7C3BF; --wash: #F0F3F5;
  --warn: #7A5F00; --warn-bg: #FFF6DC; --crit: #9C2B1B; --crit-bg: #FBEAE6; --ok: #1F6B45; --ok-bg: #E7F3EC;
  --radius: 8px; --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --navy: #9EC7DA; --steel: #78B4CE; --sky: #78B4CE;
  --bg: #0E1821; --surface: #16232E; --fg: #E7EDF1; --muted: #A7B1B9;
  --line: #26343F; --rule: #33434F; --wash: #1B2933;
  --warn: #E7C65C; --warn-bg: #2E2611; --crit: #E4907F; --crit-bg: #331A16; --ok: #7FD1A6; --ok-bg: #16301F;
  color-scheme: dark; } }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 14px/1.5 Montserrat, -apple-system, BlinkMacSystemFont, sans-serif;
       font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
a { color: var(--navy); text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; } .skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }
header.top { background: var(--surface); border-bottom: 1.25px solid var(--sky); }
.top-in { max-width: 1240px; margin: 0 auto; padding: 10px 16px; display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; }
.brand { display: flex; flex-direction: column; gap: 2px; color: var(--fg); text-decoration: none; margin-right: auto; }
.brand-names { font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: 13px; }
.brand-app { font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: .02em; }
.brand-app:first-child { font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: 13px; color: var(--fg); }
nav.main { display: flex; flex-wrap: wrap; gap: 2px 14px; }
nav.main a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 13px; padding: 6px 2px; border-bottom: 2px solid transparent; }
nav.main a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--sky); }
.who { display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--muted); }
.who { flex-wrap: wrap; row-gap: 6px; min-width: 0; } .who form button { white-space: nowrap; }
@media (max-width: 480px) { .who { width: 100%; } .who > span { flex-basis: 100%; } }
main { max-width: 1240px; margin: 0 auto; padding: 22px 16px 64px; }
h1 { font-size: 22px; line-height: 1.2; margin: 0 0 6px; text-wrap: balance; }
h2 { font-size: 12px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--navy); margin: 26px 0 8px; }
.sub { color: var(--muted); margin: 0 0 18px; font-size: 13px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.stack > * + * { margin-top: 14px; }
.btn { appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: inherit; font-size: 13px; font-weight: 600;
       padding: 8px 14px; border-radius: var(--radius); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; }
.btn.pri { background: var(--navy); color: var(--surface); border-color: var(--navy); }
.btn.danger { color: var(--crit); border-color: var(--crit); }
.btn:disabled { opacity: .45; cursor: default; }
@media (hover: hover) and (pointer: fine) { .btn:hover { border-color: var(--sky); } .btn.pri:hover { background: #1c3a57; } }
@media (prefers-reduced-motion: no-preference) {
  .btn { transition: transform 160ms var(--ease-out), border-color 160ms ease; }
  .btn:active:not(:disabled) { transform: scale(0.97); }
}
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
label.fld { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); min-width: 0; }
input, select, textarea { font: inherit; font-size: 14px; color: var(--fg); background: var(--surface); border: 1px solid var(--rule); border-radius: 7px; padding: 8px 10px;
                          letter-spacing: 0; text-transform: none; font-weight: 400; min-width: 0; width: 100%; }
textarea { resize: vertical; }
input[type=checkbox] { width: auto; }
.hint { font-size: 12px; color: var(--muted); letter-spacing: 0; text-transform: none; font-weight: 400; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.grid .wide { grid-column: span 2; } @media (max-width: 620px) { .grid .wide { grid-column: auto; } }
table.list { width: 100%; border-collapse: collapse; font-size: 13px; }
table.list th { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 8px 8px 6px; border-bottom: 1px solid var(--rule); }
table.list td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list td.num, table.list th.num { text-align: right; }
.scroll { overflow-x: auto; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--wash); color: var(--muted); white-space: nowrap; }
.pill.warn { background: var(--warn-bg); color: var(--warn); } .pill.crit { background: var(--crit-bg); color: var(--crit); } .pill.ok { background: var(--ok-bg); color: var(--ok); }
.msg { padding: 10px 14px; border-radius: 0 8px 8px 0; margin-bottom: 14px; border-left: 3px solid var(--sky); background: var(--wash); }
.msg.error { border-left-color: var(--crit); background: var(--crit-bg); } .msg.success { border-left-color: var(--ok); background: var(--ok-bg); }
.gap { background: var(--warn-bg); border-left: 3px solid var(--warn); padding: 12px 14px; border-radius: 0 7px 7px 0; margin: 0 0 18px; }
.empty { color: var(--muted); padding: 18px 0; }
/* configurator */
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; align-items: start; }
@media (max-width: 900px) { .cols { grid-template-columns: minmax(0, 1fr); } }
.rail { position: sticky; top: 14px; display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - 28px); overflow-y: auto;
        overscroll-behavior: contain; padding: 2px; margin: -2px; }
@media (max-width: 900px) { .rail { position: static; max-height: none; overflow: visible; } }
.sec h3 { font-size: 12px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--navy); margin: 22px 0 6px; padding-bottom: 6px; border-bottom: 1px solid var(--sky); }
.sec.extra h3 { color: var(--warn); }
.row { display: grid; grid-template-columns: 72px 70px minmax(0, 1fr) 118px; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: start; }
.row.off { background: var(--wash); }
.row.off .nm p, .row.off .nm em { color: var(--muted); }
.row.unsel .qty, .row.unsel .ln { visibility: hidden; }
.pick { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 600; cursor: pointer; min-height: 32px; }
.pick input { width: 18px; height: 18px; margin: 0; accent-color: var(--navy); }
.incl { font-size: 12px; font-weight: 600; color: var(--muted); display: inline-block; padding-top: 6px; }
.kp-label { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--muted); margin-top: 5px; }
details.more { margin: 4px 0 0; }
details.more > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--navy); padding: 10px 0; list-style-position: inside; min-height: 40px; }
details.more[open] > summary { border-bottom: 1px solid var(--line); }
.legend { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--navy); padding: 0 4px; }
fieldset.card { min-width: 0; }
.dstatus { margin-top: 12px; padding: 10px 12px; border-radius: 0 7px 7px 0; border-left: 3px solid var(--warn); background: var(--warn-bg); font-size: 13px; }
.dstatus.ok { border-left-color: var(--ok); background: var(--ok-bg); } .dstatus.crit { border-left-color: var(--crit); background: var(--crit-bg); }
.dstatus .hint { display: block; margin-top: 6px; }
.savestate.failed { color: var(--crit); font-weight: 600; }
.hint.err { color: var(--crit); }
details.menu { position: relative; }
details.menu > summary { list-style: none; } details.menu > summary::-webkit-details-marker { display: none; }
.menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 6; display: flex; flex-direction: column; gap: 6px; min-width: 240px;
             background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px; box-shadow: 0 8px 24px rgba(18, 38, 58, .12); }
.menu-list .btn, .menu-list form, .menu-list form .btn { width: 100%; justify-content: flex-start; white-space: nowrap; }
dl.facts-list { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; margin: 0; font-size: 14px; }
dl.facts-list dt { font-size: 12px; font-weight: 600; color: var(--muted); padding-top: 1px; } dl.facts-list dd { margin: 0; }
.wide-btn { width: 100%; justify-content: center; }
/* a locked quotation reads as a document, not a disabled form */
fieldset:disabled input:not([type=checkbox]), fieldset:disabled select, fieldset:disabled textarea { border-color: transparent; background: transparent; padding-left: 0;
  appearance: none; -webkit-appearance: none; color: var(--fg); opacity: 1; -webkit-text-fill-color: var(--fg); }
fieldset:disabled .row.unsel { display: none; }
fieldset:disabled .ln:placeholder-shown, fieldset:disabled input[type=number]::-webkit-inner-spin-button { display: none; }
.grid.bottom { align-items: end; }
@media (max-width: 620px) { .row { grid-template-columns: 64px 64px minmax(0, 1fr); } .row .amt { grid-column: 1 / -1; text-align: left; padding-left: 138px; } }
.row .nm p { margin: 0; font-weight: 500; }
.row .nm em { display: block; font-style: normal; font-size: 12px; color: var(--muted); margin-top: 2px; }
.row .amt { text-align: right; } .row .amt b { display: block; font-weight: 600; } .row .amt span { font-size: 12px; color: var(--muted); }
.row select, .row input { padding: 5px 6px; font-size: 13px; }
:focus-visible { outline-color: var(--navy); }
/* phones: comfortable tap targets, no zoom on focus */
@media (max-width: 620px) {
  input, select, textarea, .btn { min-height: 44px; font-size: 16px; }
  .row select, .row input { min-height: 40px; font-size: 16px; }
  .pick { min-height: 44px; } .pick input { width: 22px; height: 22px; }
  nav.main a { padding: 10px 4px; }
  .machines label { padding: 10px 0; } .machines input[type=checkbox] { width: 22px; height: 22px; }
  details.panel summary { padding: 8px 0; }
  table.list td:first-child a { white-space: nowrap; }
}
.row input.kp, .row input.ln { margin-top: 5px; font-size: 12px; }
.tip { display: none; font-size: 12px; color: var(--muted); margin-top: 6px; padding-left: 9px; border-left: 2px solid var(--line); max-width: 68ch; }
.shownotes .tip { display: block; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; margin-left: 6px; vertical-align: 1px; background: var(--wash); color: var(--muted); }
.badge.prop { background: var(--warn-bg); color: var(--warn); }
.tot { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.tot:last-child { border-bottom: 0; }
.tot i { font-style: normal; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tot b { font-size: 26px; font-weight: 700; line-height: 1.1; }
.mini { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.mini:last-child { border-bottom: 0; } .mini span { color: var(--muted); }
.chk { display: flex; gap: 9px; font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.chk:last-child { border-bottom: 0; }
.chk .dot { flex: 0 0 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: var(--rule); }
.chk.hit { color: var(--fg); } .chk.hit .dot { background: var(--warn); }
.rem { font-size: 12.5px; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--muted); white-space: pre-line; }
.rem:last-child { border-bottom: 0; } .rem b { display: block; color: var(--fg); font-size: 13px; margin-bottom: 3px; white-space: normal; }
.rem.warn b { color: var(--crit); } .rem.decide b { color: var(--warn); }
.savestate { font-size: 12px; color: var(--muted); min-height: 18px; }
.conflict { display: none; } .conflict.on { display: block; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 26px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 0; margin: 0 0 18px; font-size: 13px; }
.facts i { display: block; font-style: normal; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
details.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
details.panel summary { cursor: pointer; font-weight: 600; }
dialog { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--fg); max-width: 520px; width: calc(100% - 32px); padding: 20px;
         position: fixed; inset: 0; margin: auto; max-height: calc(100dvh - 32px); overflow: auto; box-shadow: 0 12px 40px rgba(18, 38, 58, .25); }
dialog h2, dialog .legend { margin-top: 0; }
dialog::backdrop { background: rgba(18, 38, 58, .45); }
@media (prefers-reduced-motion: no-preference) {
  dialog[open] { animation: pop 200ms var(--ease-out); }
  @keyframes pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
}
.machines label { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; padding: 4px 0; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--fg); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } @media (max-width: 800px) { .split { grid-template-columns: 1fr; } }
.mbar { display: none; }
@media (max-width: 900px) {
  .mbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; gap: 12px; align-items: center; justify-content: space-between;
          background: var(--surface); border-top: 1.25px solid var(--sky); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
  .mbar span { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  .mbar span { max-width: 9em; line-height: 1.2; font-size: 11px; letter-spacing: .04em; text-transform: none; }
  .mbar b { font-size: 18px; margin-right: auto; white-space: nowrap; }
  .mbar .btn { min-height: 40px; padding: 6px 12px; }
  body.shownotes main, main { padding-bottom: 90px; }
}
/* own lines: agreed items not in the price sheet */
.own { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.6fr) 150px 110px 118px; gap: 10px; padding: 10px 0;
       border-bottom: 1px solid var(--line); align-items: end; }
.own .amt { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.link-btn { border: 0; background: none; padding: 4px 0; min-height: 0; color: var(--crit); font-weight: 600; text-decoration: underline; }
.own-sec .hint { margin: 0 0 6px; max-width: 68ch; }
.own-sec > .btn { margin-top: 10px; }
@media (max-width: 900px) { .own { grid-template-columns: 1fr 1fr; } .own .own-name, .own .own-desc { grid-column: 1 / -1; }
  .own .amt { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; } }
.nav-new .btn { min-height: 34px; padding: 6px 14px; }
.danger-zone { margin-top: 24px; }
tr.archived td { color: var(--muted); }
label.tick { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; align-self: flex-end; min-height: 36px; }
.view-as label { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.view-as select { width: auto; padding: 4px 8px; font-size: 12px; min-height: 30px; }
.viewas-bar { background: var(--warn-bg); color: var(--fg); border-bottom: 1px solid var(--warn); padding: 8px 16px; display: flex; gap: 12px;
              align-items: center; justify-content: center; flex-wrap: wrap; font-size: 13px; font-weight: 600; }
/* ---------- Protokoller: phone first, one-handed at 360 px ---------- */
.pk-head { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: flex-start; }
.pk-filter { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 10px; align-items: end; margin: 6px 0 10px; }
@media (max-width: 760px) { .pk-filter { grid-template-columns: 1fr; } }
.pk-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; } .pk-chips a { text-decoration: none; }
.pk-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
@media (max-width: 620px) { .pk-cards { grid-template-columns: 1fr; } }
.pk-card { padding: 14px; } .pk-card.overdue { border-left: 3px solid var(--crit); }
.pk-id { font-weight: 700; font-size: 13px; letter-spacing: .02em; word-break: break-all; text-decoration: none; display: block; padding: 4px 0; }
.pk-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0; }
.pk-machine { margin: 6px 0 2px; font-size: 13px; } .pk-late { color: var(--crit); }
.pk-title { font-size: 22px; line-height: 1.25; overflow-wrap: anywhere; margin-bottom: 2px; }
.pk-subid { margin: 0 0 6px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; overflow-wrap: normal; word-break: normal; }
.pk-subid .nowrap, .pk-title .nowrap { white-space: nowrap; }
.pk-do { margin: 0 0 14px; font-size: 16px; line-height: 1.45; color: var(--fg); }
.pk-steps { list-style: none; display: flex; gap: 4px; margin: 10px 0 16px; padding: 0; counter-reset: s; overflow-x: auto; }
.pk-steps li { flex: 1 1 0; min-width: 0; font-size: 12px; line-height: 1.3; font-weight: 600; color: var(--muted); padding: 8px 4px 6px; border-top: 3px solid var(--line); counter-increment: s; }
.pk-steps li::before { content: counter(s) ". "; }
.pk-steps li.done { border-top-color: var(--steel); color: var(--fg); }
/* phones: only the current step keeps its words; the others show their number */
@media (max-width: 620px) { .pk-steps li:not(.now) { flex: 0 0 34px; } .pk-steps li:not(.now) .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } } .pk-steps li.now { border-top-color: var(--navy); color: var(--fg); background: var(--wash); }
.pk-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .pk-layout { grid-template-columns: minmax(0, 1fr); } }
.pk-layout > * { min-width: 0; }
.pk-next { border-color: var(--sky); } .pk-next h2 { margin-top: 0; }
.pk-more summary { cursor: pointer; font-weight: 600; font-size: 13px; padding: 8px 0; }
.pk-demo { margin-top: 12px; padding: 10px; border: 1px dashed var(--rule); border-radius: 8px; }
.pk-signers { margin: 6px 0 10px; padding-left: 20px; } .pk-signers li { padding: 4px 0; }
.pk-log { list-style: none; padding: 0; margin: 0; font-size: 13px; } .pk-log li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.pk-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; margin-bottom: 10px; }
.pk-thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; display: block; }
.pk-wide { width: 100%; justify-content: center; }
.pk-signer legend { font-weight: 700; padding: 0 4px; } fieldset.pk-signer { margin: 0; }
.pk-confirm { border: 2px solid var(--navy); }
.pk-big { font-size: 22px; font-weight: 700; margin: 4px 0 10px; }
.pk-confirm-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 16px; }
.pk-confirm-facts dt { color: var(--muted); font-size: 13px; font-weight: 600; } .pk-confirm-facts dd { margin: 0; font-weight: 600; }
.pk-check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; padding: 12px; background: var(--warn-bg); border-radius: 8px; margin-top: 12px; }
.pk-check input { width: 24px; height: 24px; flex: none; }
/* photo capture */
.pk-photo-machine { font-size: 15px; margin: 0 0 12px; }
.pk-kinds { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pk-kinds legend { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.pk-kind input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pk-kind span { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border: 1px solid var(--rule); border-radius: 999px; font-weight: 600; font-size: 13px; cursor: pointer; }
.pk-kind input:checked + span { background: var(--navy); color: var(--surface); border-color: var(--navy); }
.pk-kind input:focus-visible + span { outline: 2px solid var(--sky); outline-offset: 2px; }
.pk-shoot { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; }
@media (max-width: 420px) { .pk-shoot { grid-template-columns: 1fr; } }
.pk-camera { position: relative; justify-content: center; min-height: 64px; font-size: 16px; }
.pk-camera input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.pk-camera:focus-within { outline: 2px solid var(--sky); outline-offset: 2px; }
.pk-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.pk-preview div { font-size: 11px; overflow: hidden; border-radius: 6px; background: var(--wash); aspect-ratio: 1; display: flex; align-items: center; justify-content: center; text-align: center; }
.pk-preview img { width: 100%; height: 100%; object-fit: cover; }
.pk-gallery { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pk-gallery li { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.pk-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; display: block; }
.pk-find { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; margin-bottom: 12px; }
@media (max-width: 420px) { .pk-find { grid-template-columns: 1fr; } }
/* overview by machine: summary first, then one calm card per machine */
.pk-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 12px 0 24px; }
@media (max-width: 620px) { .pk-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 16px 0 20px; } }
.pk-stats div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
@media (max-width: 620px) { .pk-stats div { padding: 10px 12px; } }
.pk-stats b { font-size: 24px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pk-stats span { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); line-height: 1.3; overflow-wrap: anywhere; }
.pk-stats .crit b { color: var(--crit); } .pk-stats .ok b { color: var(--ok); }
.pk-mfilter { display: flex; flex-wrap: wrap; align-items: end; gap: 8px 16px; margin: 0 0 20px; }
.pk-mfilter .fld { flex: 1 1 260px; max-width: 420px; }
.pk-mtotal { color: var(--muted); font-size: 14px; padding-bottom: 10px; }
.pk-mcards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
@media (max-width: 620px) { .pk-mcards { grid-template-columns: minmax(0, 1fr); gap: 12px; } }
.pk-mcard { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pk-mcard.overdue { border-left: 3px solid var(--crit); }
.pk-mhead { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pk-mtop { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pk-mname { font-size: 17px; min-width: 0; overflow-wrap: anywhere; }
.pk-mtop .pill { flex: none; }
.pk-mmeta { margin: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--muted); line-height: 1.45; }
.pk-mmeta span { overflow-wrap: anywhere; }
.pk-mfacts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; margin: 0; font-size: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.pk-mfacts dt { color: var(--muted); font-size: 13px; } .pk-mfacts dd { margin: 0; }

/* Test copy (PREVIEW_MODE) */
.preview-bar { background: var(--warn-bg); border-bottom: 1px solid var(--warn); color: var(--fg); padding: 10px 16px; text-align: center; font-size: 14px; font-weight: 600; line-height: 1.4; }
.preview-login { margin-top: 8px; }
.preview-who { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; min-width: 0; }
.preview-who legend { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 0; margin-bottom: 8px; }
.who-opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; }
.who-opt:has(input:checked) { border-color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg); }
.who-opt input { width: 18px; height: 18px; min-height: 0; margin: 2px 0 0; padding: 0; flex: none; accent-color: var(--fg); }
.who-opt span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.who-opt b { font-size: 15px; } .who-opt small { font-size: 13px; color: var(--muted); line-height: 1.4; }

/* Lists that become stacked cards on a phone instead of scrolling sideways */
@media (max-width: 620px) {
  table.stack-sm, table.stack-sm tbody, table.stack-sm tr, table.stack-sm td { display: block; width: 100%; }
  table.stack-sm thead { display: none; }
  table.stack-sm tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.stack-sm td { border: 0; padding: 2px 4px; overflow-wrap: anywhere; text-align: left; }
  table.stack-sm td:first-child { font-size: 14px; } table.stack-sm td:first-child a { white-space: normal; }
  table.stack-sm td:empty { display: none; }
  table.stack-sm td[data-l]::before { content: attr(data-l) ": "; color: var(--muted); font-size: 12px; }
  /* phone header: brand and menu on their own rows, the button and the account on one row */
  .top-in .brand, .top-in nav.main { flex-basis: 100%; }
  .top-in .nav-new { flex: 0 0 auto; }
  .top-in .who { flex: 1 1 auto; justify-content: flex-end; }
  .who form button { min-height: 34px; padding: 6px 12px; font-size: 14px; }
  .who > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
}
dl.facts-list dd, .facts dd, table.list td, .pk-card, .fld { overflow-wrap: anywhere; min-width: 0; }
.fld .ro { display: block; padding: 8px 0; font-size: 15px; letter-spacing: 0; text-transform: none; font-weight: 400; color: var(--fg); }
@media (max-width: 480px) { dl.facts-list { grid-template-columns: minmax(0, 1fr); gap: 2px; } dl.facts-list dd { margin-bottom: 8px; } }

/* New protocol: machine and type first, the rest folded away */
.pk-newcust { margin: 0 0 4px; }
.pk-type { border: 0; padding: 0; margin: 6px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.pk-type legend { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.pk-type .who-opt { padding: 10px 14px; align-items: center; }
.pk-report-only { display: none; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.pk-report-only.on { display: grid; }
.pk-newform details.pk-more { margin-top: 6px; }
.pk-newform .stack > * + * { margin-top: 14px; }

/* Send: MitID type and CVR stay folded until someone needs them */
.pk-signer .grid.two { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.pk-mitid { margin-top: 8px; }
.pk-mitid summary { cursor: pointer; font-size: 13px; display: flex; gap: 10px; align-items: baseline; list-style: none; }
.pk-mitid summary::-webkit-details-marker { display: none; }
.pk-mitid .pk-edit { color: var(--navy); text-decoration: underline; font-weight: 600; font-size: 13px; }
.pk-mitid[open] .pk-edit { display: none; }
.pk-mitid[open] summary .hint { display: none; }
.pk-mitid > .grid { margin-top: 8px; }

/* Help: the manual inside the app */
.help-wrap { display: grid; gap: 16px; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); align-items: start; }
.help-toc { position: sticky; top: 12px; max-height: calc(100dvh - 24px); overflow: auto; font-size: 14px; }
.help-toc ul { list-style: none; padding-left: 0; margin: 6px 0 0; }
.help-toc ul ul { padding-left: 12px; }
.help-toc li { margin: 4px 0; }
.help-body { max-width: 72ch; line-height: 1.55; overflow-wrap: anywhere; }
.help-body h1 { font-size: 24px; }
.help-body h2 { margin-top: 32px; padding-top: 12px; border-top: 1px solid var(--line, #e3e3e3); }
.help-body h3 { margin-top: 24px; }
.help-body h4 { margin-top: 18px; }
.help-body table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 10px 0; }
.help-body th, .help-body td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line, #e3e3e3); vertical-align: top; }
.help-body code { font-size: 90%; }
@media (max-width: 760px) {
  .help-wrap { grid-template-columns: 1fr; }
  .help-toc { position: static; max-height: none; }
  .help-toc:not([open]) { max-height: none; }
}

/* Help tabs and the walkthrough */
.help-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
.help-tabs a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line, #d9dde3); text-decoration: none; font-size: 14px; }
.help-tabs a[aria-current="page"] { background: var(--ink, #12263A); color: #fff; border-color: transparent; }
.flow-switch { font-size: 14px; }
ol.flow { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.flow-phase h2 { margin: 18px 0 0; }
.flow-step { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; align-items: start; }
.flow-step h3 { margin: 4px 0 6px; }
.flow-who { margin: 0; font-size: 13px; color: var(--muted, #5b6573); display: flex; gap: 8px; align-items: center; }
.flow-n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ink, #12263A); color: #fff; font-size: 12px; font-weight: 600; }
.flow-rule { font-size: 14px; padding: 8px 10px; border-left: 3px solid var(--ink, #12263A); background: rgba(18, 38, 58, .05); }
.flow-shot { width: 100%; height: auto; border-radius: 18px; border: 1px solid var(--line, #d9dde3); box-shadow: 0 6px 18px rgba(0, 0, 0, .08); }
.flow-setup, .flow-vault { padding-left: 20px; display: grid; gap: 8px; }
.flow-setup span, .flow-vault span { display: block; font-size: 14px; }
.flow-vault li.key b { text-decoration: underline; }
@media (max-width: 760px) {
  .flow-step { grid-template-columns: 1fr; }
  .flow-shot { max-width: 300px; justify-self: center; }
}
ol.flow, .flow-switch { max-width: 920px; }

/* "What happens next" on a new customer */
.steps-hint { list-style: none; counter-reset: s; padding: 0; margin: 4px 0 12px; display: grid; gap: 4px; font-size: 14px; color: var(--muted, #5b6573); }
.steps-hint li { counter-increment: s; display: flex; gap: 8px; align-items: baseline; }
.steps-hint li::before { content: counter(s); flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid currentColor; font-size: 12px; }
.steps-hint li.now { color: var(--ink, #12263A); font-weight: 600; }
.steps-hint li.now::before { background: var(--ink, #12263A); color: #fff; border-color: transparent; }
