:root {
  --bg: #f6f7f9; --card: #fff; --ink: #1b2430; --muted: #5d6877; --line: #e2e6ec;
  --accent: #0b6e4f; --accent-ink: #fff; --warn: #9a6200; --warn-bg: #fff6e0;
  --err: #a32020; --err-bg: #fdecec; --ok: #0b6e4f; --ok-bg: #e5f4ee; --value: #3a5bbf;
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--accent); }
h1 { font-size: 1.7rem; margin: .2rem 0 .6rem; }
h2 { font-size: 1.2rem; margin: 0 0 .8rem; }
h3 { font-size: 1rem; margin: 1rem 0 .4rem; }
.demo-banner { background: #222; color: #ffd166; text-align: center; padding: .35rem 1rem; font-size: .85rem; }
.variant-bar { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding: .35rem 1.5rem;
  background: #eaf2ff; color: #23407a; font-size: .85rem; }
.roles-help { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-bottom: .6rem; }
.roles-help > div { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: .6rem .9rem; }
.actions.left { justify-content: flex-start; }
.cost { background: #f7faf8; border: 1px solid #cfe5da; border-radius: 8px; padding: .4rem 1rem .6rem; margin: 1rem 0; text-align: left; }
.cost h3 { margin-top: .5rem; }
.cost td.num { text-align: right; white-space: nowrap; }
.cost tr.total td { font-weight: 700; font-size: 1.1rem; border-bottom: 0; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin: .4rem 0 1rem; }
.choice .btn { text-align: center; }
.choice .btn[hidden] { display: none; }
form[hidden] { display: none; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.row-actions { display: flex; gap: .8rem; align-items: center; }
.btn.small { padding: .3rem .7rem; font-size: .85rem; margin: .1rem .2rem .1rem 0; }
.next-step { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  margin-top: 1rem; padding: .8rem 1rem; background: var(--ok-bg); border-radius: 8px; color: var(--ok); font-weight: 600; }
.next-step[hidden] { display: none; }
.chain > a.next { animation: tab-pulse 1.6s ease-in-out infinite; }
@keyframes tab-pulse { 0%, 100% { background: var(--step); } 50% { background: var(--ok-bg); } }
[data-channel] { display: grid; gap: .8rem; }
[data-channel][hidden] { display: none; }
.emails .label { font-weight: 500; display: block; margin-bottom: .25rem; }
.email-row { display: flex; gap: .6rem; align-items: center; margin-bottom: .4rem; }
.email-row input { flex: 1; }
.email-row:only-child .remove { display: none; }
.chat-log { display: flex; flex-direction: column; gap: .5rem; max-height: 260px; overflow-y: auto; margin-bottom: .8rem; }
.msg { max-width: 80%; padding: .55rem .85rem; border-radius: 12px; line-height: 1.4; }
.msg.agent { background: #eef2f7; align-self: flex-start; border-bottom-left-radius: 3px; }
.msg.user { background: var(--accent); color: #fff; align-self: flex-end; border-bottom-right-radius: 3px; }
.chat-input { display: flex; gap: .6rem; align-items: flex-end; }
.chat-input textarea { flex: 1; font: inherit; padding: .5rem .6rem; border: 1px solid #c9d0da; border-radius: 6px; resize: vertical; }
.terms { max-width: 760px; margin: 0 auto; }
.terms h2 { margin-top: 1.4rem; font-size: 1.05rem; }
.terms ol { padding-left: 1.3rem; } .terms li { margin-bottom: .35rem; }
.terms em { color: var(--warn); font-style: normal; font-weight: 600; }
.progress-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: .9rem; }
.progress-steps li { display: flex; gap: .8rem; align-items: flex-start; }
.progress-steps .icon { width: 1.6rem; height: 1.6rem; flex: none; display: grid; place-items: center; }
.spinner { width: 1.2rem; height: 1.2rem; border: 3px solid #d6dde6; border-top-color: var(--accent); border-radius: 50%;
  animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress-steps .check { display: none; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--ok); color: #fff;
  font-weight: 700; text-align: center; line-height: 1.5rem; }
.progress-steps li .spinner, .progress-steps li .done-text { display: none; }
.progress-steps li.running .spinner { display: block; }
.progress-steps li.done .check, .progress-steps li.done .done-text { display: inline-block; }
.progress-steps li.done .running-text { display: none; }
.progress-steps li.waiting { opacity: .45; }
.progress-steps li.waiting .icon::before { content: ""; width: 1.2rem; height: 1.2rem; border: 3px solid #d6dde6; border-radius: 50%; }
.code-field { display: flex; align-items: center; gap: .2rem; }
.code-field input { width: 4.2rem; text-align: center; letter-spacing: .15rem; }
.progress-steps.published li { display: grid; grid-template-columns: 1.6rem 15rem 1fr; gap: .8rem; align-items: start;
  padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 6px; background: #f8fafc; }
.progress-steps.published .label { font-weight: 700; }
.progress-steps li .running-text { display: inline; }
.progress-steps li.done .done-text { display: inline; }
.progress-steps li.waiting .done-text, .progress-steps li.running .done-text { display: none; }
.todo-dot { display: inline-block; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: #d42a2a; color: #fff;
  font-weight: 700; text-align: center; line-height: 1.5rem; }
.todo-text, a.todo-link { color: #d42a2a; font-weight: 700; }
@media (max-width: 700px) { .progress-steps.published li { grid-template-columns: 1.6rem 1fr; }
  .progress-steps.published li > div { grid-column: 2; } }
.register-form { display: none; gap: .5rem; flex-direction: column; align-items: flex-start; }
.progress-steps li.input .register-form { display: flex; }
.progress-steps li .waiting-text { display: none; }
.progress-steps li.waiting .waiting-text { display: inline; }
.progress-steps li.waiting .running-text, .progress-steps li.input .running-text { display: none; }
.progress-steps li.input .icon::before { content: ""; width: 1.2rem; height: 1.2rem; border: 3px solid var(--accent); border-radius: 50%; }
.span-fields { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.span-fields input { width: 13.5rem; letter-spacing: .03rem; }
.error { color: var(--err); }
details.drill { border-top: 1px solid var(--line); padding: .5rem 0; }
details.drill summary { cursor: pointer; }
.schedule { display: grid; grid-template-columns: repeat(5, 1fr); gap: .6rem; text-align: center; }
.schedule div { background: #f2f5f8; border-radius: 8px; padding: .6rem; display: grid; }
.schedule strong { font-size: 1.4rem; }
.roles-help.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .roles-help.four { grid-template-columns: 1fr 1fr; } }
.pubmark { background: #fff1a8; color: #3d3200; padding: 0 3px; border-radius: 2px; }
.address-form { display: flex; gap: .3rem; flex-wrap: wrap; align-items: center; }
.address-form input { width: 9rem; padding: .3rem .4rem; }
.address-form.pub input { background: #fff1a8; color: #3d3200; }
.msg.status { font-style: italic; color: var(--muted); }
.inline-form { display: inline-block; margin: 0 .3rem .3rem 0; }
.brand { font-weight: 700; font-size: 1.25rem; text-decoration: none; color: var(--ink); }
.brand span { font-weight: 400; color: var(--muted); margin-left: .5rem; font-size: .95rem; }
.switch { display: flex; gap: .4rem; align-items: center; }
.switch label { color: var(--muted); font-size: .85rem; }
.person { font-weight: 600; }
main { max-width: 1100px; margin: 0 auto; padding: 1.5rem; }
footer { max-width: 1100px; margin: 2rem auto; padding: 1rem 1.5rem; color: var(--muted); font-size: .85rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; border-top: 1px solid var(--line); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 1.25rem 1.4rem; margin-bottom: 1.2rem; }
.card.narrow { max-width: 560px; margin: 1rem auto; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
@media (max-width: 800px) { .grid2 { grid-template-columns: 1fr; } main { padding: 1rem; } }
.lead { font-size: 1.1rem; color: var(--muted); margin-top: 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: .9rem; word-break: break-all; }
.btn { display: inline-block; border: 1px solid var(--line); background: #fff; color: var(--ink); padding: .55rem 1rem;
  border-radius: 8px; font: inherit; cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.nocommit { margin: .5rem 0 0; font-size: .9rem; color: var(--muted, #5d6675); }
.nocommit.box { margin: .2rem 0 1rem; padding: .6rem .8rem; border-left: 4px solid var(--accent); background: var(--bg); color: var(--ink); font-size: 1rem; }
.btn.big { font-size: 1.15rem; padding: .8rem 1.6rem; }
button.link { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }
button.link.danger { color: var(--err); }
.flash { padding: .7rem 1rem; border-radius: 8px; margin-bottom: 1rem; background: #eef2f7; }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.warn { background: var(--warn-bg); color: var(--warn); }
.flash.error { background: var(--err-bg); color: var(--err); }
.why { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2rem; text-align: left; }
.why.small { grid-template-columns: 1fr 1fr; margin-top: 1.2rem; font-size: .9rem; }
.why > div { background: #f2f5f8; border-radius: 8px; padding: .6rem .9rem; }
.why h3 { margin: 0 0 .2rem; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.why p { margin: 0; }
@media (max-width: 700px) { .why { grid-template-columns: 1fr; } }
/* Start page (Misho, 2026-11-05): hero, then the process as an infographic – per step what we do and what the
   customer does – with arrows (static/start.js) from the steps to the three values. One colour for all steps. */
.hero { text-align: center; padding: 2.4rem 1rem 2rem; width: min(1240px, calc(100vw - 32px)); margin: -1.5rem 0 0 50%; transform: translateX(-50%); border-radius: 0 0 14px 14px; background: linear-gradient(180deg, #fff 0%, #eef5f1 100%); border-bottom: 1px solid var(--line); }
.hero h1 { font-size: 2.1rem; line-height: 1.2; margin: 0 0 .6rem; letter-spacing: -.01em; }
.hero h1 span { color: var(--accent); }
.hero .lead { max-width: 700px; margin: 0 auto 1.4rem; font-size: 1.05rem; }
.hero .btn.big { box-shadow: 0 2px 8px rgba(11,110,79,.25); }
.proc-wrap { width: min(1240px, calc(100vw - 32px)); margin-left: 50%; transform: translateX(-50%); }
.proc-wrap h2 { font-size: 1.35rem; margin: 2.2rem 0 1.2rem; text-align: center; }
.proc { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px 20px 26px; box-shadow: 0 4px 18px rgba(27,36,48,.06); }
.proc svg.links { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.proc .flow { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; position: relative; z-index: 1; }
.proc .step { display: contents; }
.proc .chev { grid-row: 1; display: flex; align-items: center; gap: 8px; min-height: 3.8rem; padding: 8px 26px 8px 30px; margin-right: -10px; color: #fff; background: var(--accent);
  font-weight: 700; font-size: .9rem; line-height: 1.25; text-decoration: none; clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%, 18px 50%); }
.proc .chev .n { flex: none; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: rgba(255,255,255,.22); font-size: .85rem; }
.proc .step:first-child .chev { padding-left: 14px; clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%); }
.proc .step:last-child .chev { margin-right: 0; }
.proc a.chev:hover { filter: brightness(1.08); }
/* align-self: start – the column ends at its last box, so the arrow starts right at the dot below it */
.proc .work { grid-row: 2; align-self: start; margin: 12px 14px 0 8px; display: flex; flex-direction: column; gap: 8px; }
.proc .step:first-child .work { margin-left: 0; } .proc .step:last-child .work { margin-right: 0; }
.proc .who { font-size: .8rem; line-height: 1.35; padding: 8px 10px; border-radius: 8px; background: var(--bg); }
.proc .who .tag { display: inline-block; font-size: .66rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 1px 7px; border-radius: 999px; margin-bottom: 3px; }
.proc .who.vi .tag { background: var(--accent); color: #fff; }
.proc .who.ni { background: #fff; border: 1px dashed #cdd3dc; }
.proc .who.ni .tag { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.proc .who .txt { display: block; }
.proc .work[data-to]::after { content: ""; display: block; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); margin: 2px auto 0; }
.proc .values-title { font-weight: 800; color: var(--accent); letter-spacing: .06em; text-transform: uppercase; font-size: .78rem; margin: 70px 0 10px; position: relative; z-index: 1; }
.proc .values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; position: relative; z-index: 1; }
.proc .val { background: #fff; border: 2px solid var(--accent); border-radius: 14px; padding: 18px; box-shadow: 0 6px 20px rgba(11,110,79,.10); }
.proc .val .head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.proc .val .ico { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; }
.proc .val .ico svg { width: 22px; height: 22px; }
.proc .val h3 { margin: 0; font-size: 1.08rem; line-height: 1.25; }
.proc .val p { margin: 0; color: var(--muted); font-size: .9rem; }
@media (max-width: 900px) {
  .proc .flow { display: block; }
  .proc .step { display: block; margin-bottom: 16px; }
  .proc .chev, .proc .step:first-child .chev { clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%); margin: 0; min-height: 3rem;
    padding-left: 12px; width: fit-content; min-width: 70%; max-width: 100%; }
  .proc .work { margin: 8px 0 0 !important; }
  .proc .work[data-to]::after, .proc svg.links { display: none; }
  .proc .values { grid-template-columns: 1fr; gap: 14px; }
  .proc .values-title { margin: 20px 0 10px; }
}
.badge { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .8rem; background: #eef1f5; margin: .1rem 0; }
.badge.ok { background: var(--ok-bg); color: var(--ok); } .badge.wait { background: var(--warn-bg); color: var(--warn); }
.badge.error { background: var(--err-bg); color: var(--err); }
.form { display: grid; gap: .8rem; }
.form label { display: grid; gap: .25rem; font-weight: 500; }
.form .row { display: grid; grid-template-columns: 1fr 2fr; gap: .8rem; }
.form.inline { display: flex; flex-wrap: wrap; gap: .5rem; }
input, select { font: inherit; padding: .5rem .6rem; border: 1px solid #c9d0da; border-radius: 6px; background: #fff; }
input.code { font-size: 1.6rem; letter-spacing: .4rem; text-align: center; }
label.check, label.radio { display: flex !important; gap: .4rem; align-items: center; font-weight: 400 !important; }
.hint { font-size: .8rem; color: var(--muted); font-weight: 400; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: .6rem .9rem; }
fieldset.sim, label.sim { background: #fffbea; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }
ul.list { list-style: none; padding: 0; margin: 0; }
ul.list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
ul.list.compact li { padding: .35rem 0; font-size: .92rem; }
ul.plain { padding-left: 1.1rem; } ul.plain li { margin-bottom: .4rem; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .55rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .8rem; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; }
table.users form.roles { display: grid; gap: .1rem; font-size: .88rem; }
tr.avslutad { opacity: .55; }
.demo-box { background: #fffbea; border: 1px dashed #d9b84a; border-radius: 8px; padding: .8rem 1rem; margin: 1rem 0; }
.demo-box.row { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
pre { white-space: pre-wrap; background: #f2f5f8; border-radius: 6px; padding: .7rem .9rem; font-size: .9rem; margin: .4rem 0; }
.mail header { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: baseline; }
.mail h3 { margin: 0; }
.bankid { text-align: center; }
.bankid form { text-align: left; }
.sign-text { text-align: left; background: #f2f5f8; border-radius: 8px; padding: .6rem 1rem; }
.qr { display: grid; grid-template-columns: repeat(8, 14px); gap: 2px; justify-content: center; margin: 1.2rem auto; }
.qr i { width: 14px; height: 14px; background: #e8ebef; }
.qr i.on { background: #1b2430; }
.actions { display: flex; gap: .6rem; margin-top: 1rem; justify-content: center; }
details.invite { margin-top: 1rem; }
section.contract { margin-top: 1rem; }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
details.cancel { margin-top: .8rem; }
details.cancel summary { cursor: pointer; color: var(--muted, #555); }
details.cancel form { margin-top: .6rem; max-width: 40rem; }
.btn.danger { border-color: var(--err); color: var(--err); }
.btn.danger:hover { background: var(--err-bg); }
details.invite summary { cursor: pointer; color: var(--accent); }
