:root {
  --green: #0b5d3b; --green-dark: #074229; --green-soft: #e5f0ea; --green-line: #b5d3c2;
  --ink: #0f1a15; --text: #2c3833; --muted: #55625c; --line: #d5ddd9; --line-soft: #e3e8e5;
  --field: #93a49c; --bg: #f3f5f4; --red: #a3261b; --red-soft: #fbebeb;
  --display: "Schibsted Grotesk", Arial, sans-serif; --body: "Source Sans 3", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.45; }
a { color: var(--green); }
a:hover { color: var(--green-dark); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #f2b705; outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.top { background: #fff; border-bottom: 1px solid var(--line); }
.bar { max-width: 1040px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 19px; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.dots { width: 26px; height: 26px; background: var(--green); display: inline-flex; align-items: center; justify-content: center; gap: 3px; flex: none; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: #fff; display: block; }
.secure { display: flex; align-items: center; gap: 6px; font-size: 14px; color: #3d4a44; }
.steps { max-width: 1040px; margin: 0 auto; padding: 0 24px; display: flex; list-style: none; }
.step { flex: 1 1 0; padding: 12px 0; font-size: 14px; color: var(--muted); border-bottom: 3px solid var(--line-soft); display: flex; gap: 8px; align-items: center; }
.step b { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #9fb0a8; display: flex; align-items: center; justify-content: center; font-size: 12px; flex: none; }
.step.on { color: var(--ink); font-weight: 700; border-bottom-color: var(--green); }
.step.on b { background: var(--green); border-color: var(--green); color: #fff; }
.step.done { color: var(--ink); border-bottom-color: var(--green); }
.step.done b { background: var(--green-soft); border-color: var(--green); color: var(--green); }
.mstep { display: none; }

/* Layout */
.wrap { max-width: 1040px; margin: 0 auto; padding: 32px 24px 64px; }
h1 { font-family: var(--display); font-weight: 800; font-size: 28px; letter-spacing: -0.01em; margin: 0; line-height: 1.15; }
h2 { font-family: var(--display); font-weight: 800; font-size: 19px; margin: 0; }
h1:focus { outline: none; }
.lead { color: #46534d; margin: 6px 0 0; font-size: 16px; line-height: 1.5; max-width: 720px; }
.card { background: #fff; border: 1px solid var(--line); margin-top: 24px; }
.sec { background: var(--green); color: #fff; font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: 0.07em; text-transform: uppercase; padding: 9px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0; }
.sec span { font-family: var(--body); text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 13px; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; padding: 20px 16px; }
.s2 { grid-column: span 2; } .s3 { grid-column: span 3; } .s4 { grid-column: span 4; } .s5 { grid-column: span 5; }
.s6 { grid-column: span 6; } .s7 { grid-column: span 7; } .s8 { grid-column: span 8; } .s12 { grid-column: span 12; }
.sub { grid-column: span 12; font-family: var(--body); margin-bottom: 0; font-size: 13px; font-weight: 700; color: var(--green); text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 1px solid var(--line-soft); padding-bottom: 6px; margin-top: 4px; }
.intro { grid-column: span 12; font-size: 14px; color: var(--muted); margin: 0; }

/* Fields */
.f { display: flex; flex-direction: column; gap: 5px; min-width: 0; border: 0; margin: 0; padding: 0; }
.f > label, .lab { font-size: 13px; font-weight: 700; color: var(--ink); padding: 0; }
legend.lab { float: left; width: 100%; margin-bottom: 5px; }
legend.lab + * { clear: both; }
.req { color: var(--red); }
.in { height: 44px; border: 1px solid var(--field); background: #fff; padding: 0 10px; font: inherit; font-size: 16px; color: var(--ink); width: 100%; border-radius: 0; -webkit-appearance: none; appearance: none; }
select.in { background: #fff 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 1l5 5 5-5' fill='none' stroke='%230f1a15' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 10px center; padding-right: 30px; }
.in::placeholder { color: #7a8680; }
.in:focus { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); outline: none; }
.in[readonly] { background: #eef2f0; color: var(--text); }
.in[aria-invalid="true"] { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.money { position: relative; }
.money::before { content: "$"; position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.money .in { padding-left: 22px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px 20px; padding-top: 4px; }
.opt { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: 15.5px; cursor: pointer; }
.opt input { width: 20px; height: 20px; margin: 0; accent-color: var(--green); flex: none; }
.opt.plain { font-size: 15px; }
.hint { font-size: 13px; color: var(--muted); }
.err { font-size: 13.5px; color: var(--red); font-weight: 600; }
.pair { display: flex; flex-direction: column; gap: 8px; }

/* Actions */
.actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 28px; }
.btn { background: var(--green); color: #fff; font: inherit; font-weight: 700; font-size: 16px; padding: 0 24px; min-height: 50px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; border-radius: 0; }
.btn:hover { background: var(--green-dark); color: #fff; }
.btn[disabled] { background: #8fa69a; cursor: progress; }
.btn2 { background: #fff; color: var(--ink); border: 1px solid var(--field); font: inherit; font-weight: 700; font-size: 15px; padding: 0 20px; min-height: 48px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; border-radius: 0; }
.btn2:hover { border-color: var(--ink); color: var(--ink); }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--green); text-decoration: underline; cursor: pointer; font-size: inherit; }
.link:hover { color: var(--green-dark); }
.link.light, .link.light:hover { color: #fff; }
.actbtns { display: flex; gap: 10px; flex-wrap: wrap; }
.saved { font-size: 14px; color: #46534d; display: flex; align-items: center; gap: 6px; min-height: 20px; }
.saved.bad { color: var(--red); font-weight: 600; }
.note { font-size: 13px; color: var(--muted); line-height: 1.5; margin-top: 28px; border-top: 1px solid var(--line); padding-top: 16px; }
.alert { border: 1px solid var(--red); background: var(--red-soft); padding: 14px 16px; margin-top: 20px; }
.alert h2 { font-size: 16px; color: #8a1f16; }
.alert ul { margin: 6px 0 0; padding-left: 20px; font-size: 15px; }
.alert a { color: #8a1f16; }
.ok { background: var(--green-soft); border: 1px solid var(--green-line); padding: 12px 14px; font-size: 15px; }

/* Review */
.review { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; margin-top: 24px; align-items: start; }
.viewer { background: #525659; padding: 16px; height: 78vh; min-height: 520px; overflow: auto; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.viewer canvas { background: #fff; width: 100%; max-width: 760px; height: auto; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.viewer canvas { cursor: zoom-in; }
.viewer .loading { color: #fff; margin: auto; text-align: center; }
.zoomhint { display: none; }
.side { background: #fff; border: 1px solid var(--line); padding: 18px; display: flex; flex-direction: column; gap: 14px; position: sticky; top: 16px; }
.kv { margin: 0; font-size: 14.5px; }
.kv div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; }

/* Sign */
.legal { height: 220px; overflow: auto; border: 1px solid #c3cec8; background: #fafbfa; padding: 12px 14px; font-size: 14.5px; line-height: 1.55; color: var(--text); }
.legal p { margin: 0 0 10px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15.5px; line-height: 1.45; border: 1px solid var(--line); padding: 12px 14px; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 0; accent-color: var(--green); flex: none; }
.pad { position: relative; height: 180px; border: 1px dashed #6f8178; background: #fff; touch-action: none; }
.pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }
.pad .x { position: absolute; left: 14px; bottom: 30px; font-weight: 700; font-size: 18px; pointer-events: none; }
.pad .line { position: absolute; left: 38px; right: 16px; bottom: 28px; border-bottom: 1.5px solid var(--ink); pointer-events: none; }
.pad .ph { position: absolute; left: 0; right: 0; top: 42%; text-align: center; color: #8a968f; pointer-events: none; font-size: 15px; }
.pad.bad { border-color: var(--red); border-style: solid; }
.padbar { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--muted); }

/* Upload */
.docs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.doc { background: #fff; border: 1px solid var(--line); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.doc.need { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.doc.drop { border-color: var(--green); background: var(--green-soft); }
.doc .hint { margin: 0; }
.dn { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.dn h2 { font-family: var(--body); font-weight: 700; font-size: 16.5px; }
.tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 3px 7px; flex: none; }
.tag.r { background: var(--red-soft); color: #8a1f16; } .tag.okk { background: #e5f4e4; color: #145c2c; } .tag.op { background: #eef2f0; color: #3d4a44; }
.files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.files li { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14.5px; background: #f6f8f7; padding: 7px 10px; }
.files li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files li small { color: var(--muted); flex: none; }
.files li .link { flex: none; font-size: 14px; }
.files li.busy { color: var(--muted); }
.files li.bad { color: #8a1f16; background: var(--red-soft); }
.files li.bad span { white-space: normal; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.up { flex: 1 1 140px; border: 1px solid var(--green); color: var(--green); background: #fff; font: inherit; font-weight: 700; font-size: 15px; min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; position: relative; }
.up:hover { background: var(--green-soft); }
.up input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.up:focus-within { outline: 3px solid #f2b705; outline-offset: 2px; }
.photo { display: none; }
@media (pointer: coarse) { .photo { display: inline-flex; } }

/* Done */
.donecard { background: #fff; border: 1px solid var(--line); padding: 32px; max-width: 680px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.tick { width: 52px; height: 52px; border-radius: 50%; background: var(--green-soft); display: flex; align-items: center; justify-content: center; }
.refs { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); }
.refs div { padding: 10px 14px; }
.refs div + div { border-left: 1px solid var(--line); }
.refs span { display: block; font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: 0.04em; }
.donecard ol { margin: 0; padding-left: 20px; line-height: 1.6; color: var(--text); }

.center { text-align: center; padding: 80px 0; color: var(--muted); }

/* Phone */
@media (max-width: 760px) {
  .bar { padding: 12px 16px; }
  .logo { font-size: 17px; }
  .dots { width: 22px; height: 22px; gap: 2.5px; }
  .dots i { width: 4px; height: 4px; }
  .secure span { display: none; }
  .steps { display: none; }
  .mstep { display: block; }
  .mstep p { margin: 0; padding: 0 16px 10px; font-size: 13.5px; color: #46534d; }
  .mstep div { height: 4px; background: var(--line-soft); }
  .mstep div i { display: block; height: 4px; background: var(--green); transition: width .3s; }
  .wrap { padding: 20px 16px 120px; }
  h1 { font-size: 23px; }
  .card { margin-top: 16px; }
  .grid { gap: 14px; padding: 16px 14px; }
  .grid > * { grid-column: span 12 !important; }
  .grid > .half { grid-column: span 6 !important; }
  .in { height: 48px; }
  .opts { flex-direction: column; gap: 8px; }
  .opts.yn { flex-direction: row; }
  .opt { border: 1px solid var(--line); padding: 0 12px; min-height: 46px; flex: 1; }
  .opt.plain { border: 0; padding: 0; min-height: 32px; }
  .sticky .actbtns { flex-wrap: nowrap; }
  .sticky .actbtns .btn { flex: 1; }
  .sticky { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); margin: 0; z-index: 10; flex-direction: column-reverse; gap: 6px; align-items: stretch; }
  .sticky .btn2 { width: 100%; }
  .saved:empty { display: none; }
  .sticky .btn { width: 100%; }
  .sticky .saved { justify-content: center; font-size: 13px; }
  .review { grid-template-columns: 1fr; gap: 16px; margin-top: 16px; }
  .zoomhint { display: flex; width: 100%; margin-top: 16px; }
  .side #open-pdf { display: none; }
  .viewer { height: auto; min-height: 0; padding: 10px; }
  .side { position: static; }
  .docs { grid-template-columns: 1fr; }
  .donecard { padding: 24px 18px; }
}
