/* Digikompis — Umeå kommuns grafiska profil (Björk + Bris, Calibri) */
:root {
  --bjork: #00a01e;
  --bris: #d1e8ff;
  --bris-soft: #eaf4ff;
  --darkgreen: #006e1e;
  --deep: #00562d;
  --text: #555555;
  --ink: #1d1d1b;
  --gray-light: #f0f0f0;
  --gray-mid: #afafaf;
  --rosa: #e4b1c2;
  --lightgreen: #8cbe00;
  --blue: #007ac8;
  --red: #b50034;
  --amber: #be5900;
  --line: #e2e6ea;
  --bg: #ffffff;
  --card: #ffffff;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(0, 40, 20, .05), 0 8px 24px rgba(0, 40, 20, .06);
  --font: 'Calibri', 'Carlito', 'Segoe UI', 'Trebuchet MS', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.45; font-size: 18px; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.08; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.3rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
a { color: var(--darkgreen); }
a:hover { color: var(--deep); }
img { max-width: 100%; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); margin-inline: auto; }
.muted { color: #6f6f6f; }
.small { font-size: .88rem; }
.lead { font-size: 1.2rem; font-style: italic; color: var(--ink); }
.center { text-align: center; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Header / footer */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); font-weight: 700; }
.brand img { height: 34px; width: auto; }
.brand .divider { width: 1px; height: 28px; background: var(--line); }
.brand .product { font-size: 1.15rem; }
.brand .product b { color: var(--darkgreen); }
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--ink); padding: 8px 12px; border-radius: 999px; font-size: .95rem; }
@media (hover: hover) { .nav a:hover { background: var(--bris-soft); } }
.nav a.active { background: var(--bris); color: var(--deep); font-weight: 700; }
.nav .cta { background: var(--darkgreen); color: #fff; font-weight: 700; }
@media (hover: hover) { .nav .cta:hover { background: var(--deep); color: #fff; } }
.menu-btn { display: none; margin-left: auto; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; }
a, button, label, summary { touch-action: manipulation; -webkit-tap-highlight-color: rgba(0,160,30,.15); }
@media (max-width: 860px) {
  .menu-btn { display: block; }
  /* iOS Safari mis-targets taps on children that overflow a sticky parent with backdrop-filter:
     use a solid header on small screens and a fixed menu panel. */
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; }
  .nav { display: none; position: fixed; top: 69px; left: 0; right: 0; z-index: 40; max-height: calc(100vh - 69px); overflow-y: auto;
         background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(0,0,0,.12); flex-direction: column; padding: 8px 16px 16px; }
  .nav a { padding: 12px 14px; font-size: 1.05rem; }
  .nav.open { display: flex; }
  .brand img { height: 28px; }
}
.site-footer { background: var(--darkgreen); color: #fff; margin-top: 80px; padding: 40px 0; font-size: .95rem; }
.site-footer a { color: #fff; }
.site-footer .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
.site-footer img { height: 34px; margin-bottom: 10px; }
@media (max-width: 720px) { .site-footer .wrap { grid-template-columns: 1fr; } }

/* ---------- Hero with organic shape */
.hero { position: relative; overflow: hidden; background: var(--bris); padding: 72px 0 88px; }
.hero::before { content: ""; position: absolute; right: -160px; top: -120px; width: 620px; height: 620px; background: var(--bjork);
  border-radius: 62% 38% 55% 45% / 48% 60% 40% 52%; opacity: .95; }
.hero::after { content: ""; position: absolute; right: 120px; bottom: -220px; width: 360px; height: 360px; background: var(--lightgreen);
  border-radius: 45% 55% 40% 60% / 60% 40% 60% 40%; opacity: .55; }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: center; }
.hero h1 { max-width: 13ch; }
.hero .lead { max-width: 34ch; }
.hero-card { background: #fff; border-radius: 24px; padding: 24px; box-shadow: var(--shadow); transform: rotate(-1.5deg); }
.hero-card .step { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.hero-card .step:last-child { border-bottom: 0; }
.hero-card .num { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--bris); color: var(--deep); font-weight: 700; }
.hero-card b { color: var(--ink); }
@media (max-width: 860px) {
  .hero { padding: 48px 0 56px; }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero::before { width: 300px; height: 300px; right: -200px; top: -190px; }
  .hero::after { display: none; }
  .page-head::before { width: 220px; height: 220px; right: -150px; top: -150px; }
  .hero-card { transform: none; }
}
.puff { display: inline-block; background: var(--bjork); color: #fff; font-weight: 700; font-style: italic; line-height: 1; text-align: center;
  padding: 14px 18px; border-radius: 50%; transform: rotate(-11.35deg); font-size: 1rem; }

.page-head { background: var(--bris); padding: 48px 0 40px; position: relative; overflow: hidden; }
.page-head::before { content: ""; position: absolute; right: -120px; top: -140px; width: 360px; height: 360px; background: var(--bjork);
  border-radius: 62% 38% 55% 45% / 48% 60% 40% 52%; }
.page-head .wrap, .page-head .narrow { position: relative; }
.page-head h1 { max-width: 18ch; }
.eyebrow { text-transform: uppercase; letter-spacing: .09em; font-size: .8rem; font-weight: 700; color: var(--deep); margin-bottom: 10px; display: block; }

/* ---------- Sections, cards, grids */
section { padding: 56px 0 0; }
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card.bris { background: var(--bris-soft); border-color: transparent; box-shadow: none; }
.card.accent { border-left: 6px solid var(--bjork); }
.card h3 { margin-bottom: .4em; }
.icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--bris); color: var(--deep); margin-bottom: 14px; }
.icon svg { width: 26px; height: 26px; }

/* Info classes */
.klass { border-radius: 16px; padding: 18px; border: 2px solid; position: relative; }
.klass h4 { margin: 0 0 4px; display: flex; align-items: center; gap: 8px; padding-right: 104px; }
.klass .dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.2); }
.klass p { margin: 0; font-size: .95rem; }
.klass .tag { position: absolute; top: 14px; right: 14px; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.k-vit { border-color: #cfd6dc; background: #fff; } .k-vit .dot { background: #fff; }
.k-gron { border-color: #8fd19c; background: #effaf1; } .k-gron .dot { background: var(--bjork); }
.k-gul { border-color: #f0d27a; background: #fff9e6; } .k-gul .dot { background: #f2c230; }
.k-rod { border-color: #eaa0b4; background: #fff0f3; } .k-rod .dot { background: var(--red); }
.tag.ok { background: var(--darkgreen); color: #fff; } .tag.no { background: var(--red); color: #fff; }

/* Comparison table */
.compare { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); font-size: .97rem; }
.compare th, .compare td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.compare thead th { background: var(--ink); color: #fff; font-size: 1rem; }
.compare thead th.hl { background: var(--bjork); }
.compare td.hl { background: #f3fbf4; }
.compare tbody th { color: var(--ink); width: 24%; font-weight: 700; }
.compare tr:last-child td, .compare tr:last-child th { border-bottom: 0; }
.yes { color: var(--darkgreen); font-weight: 700; } .no { color: var(--red); font-weight: 700; } .part { color: var(--amber); font-weight: 700; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); }
.table-scroll .compare { min-width: 720px; }

/* ---------- Buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; font-size: 1.02rem;
  padding: 13px 22px; border-radius: 999px; border: 2px solid var(--darkgreen); background: var(--darkgreen); color: #fff; cursor: pointer; text-decoration: none; transition: .15s; }
.btn:hover { background: var(--deep); border-color: var(--deep); color: #fff; }
.btn.ghost { background: #fff; color: var(--darkgreen); }
.btn.ghost:hover { background: var(--bris-soft); color: var(--deep); }
.btn.white { background: #fff; color: var(--deep); border-color: #fff; }
.btn.danger { background: #fff; border-color: var(--red); color: var(--red); }
.btn.danger:hover { background: var(--red); color: #fff; }
.btn.sm { padding: 7px 14px; font-size: .9rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

label { display: block; font-weight: 700; color: var(--ink); margin: 0 0 6px; }
.field { margin-bottom: 18px; }
.hint { font-weight: 400; color: #6f6f6f; font-size: .88rem; margin-top: 4px; }
input[type=text], input[type=email], input[type=number], input[type=password], input[type=search], select, textarea {
  width: 100%; font: inherit; font-size: 1rem; padding: 12px 14px; border: 1.5px solid #cfd6dc; border-radius: 12px; background: #fff; color: var(--ink); }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, .choice:focus-within, button:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid rgba(0,160,30,.35); outline-offset: 1px; border-color: var(--bjork); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 620px) { .row2 { grid-template-columns: 1fr; } }

.check { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1.5px solid #cfd6dc; border-radius: 14px; background: #fff; cursor: pointer; font-weight: 400; color: var(--text); margin-bottom: 10px; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--bjork); flex: none; }
.check:has(input:checked) { border-color: var(--bjork); background: #f3fbf4; }
.check b { color: var(--ink); }

.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 620px) { .choice-grid { grid-template-columns: 1fr; } }
.choice { position: relative; display: block; border: 2px solid var(--line); border-radius: 20px; padding: 22px; cursor: pointer; background: #fff; transition: .15s; font-weight: 400; }
.choice:hover { border-color: var(--bjork); }
.choice input { position: absolute; opacity: 0; }
.choice:has(input:checked) { border-color: var(--bjork); background: #f3fbf4; box-shadow: 0 0 0 3px rgba(0,160,30,.15); }
.choice h3 { margin: 10px 0 6px; }
.choice .badge { position: absolute; top: 18px; right: 18px; }

.badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--bris); color: var(--deep); white-space: nowrap; }
.badge.green { background: #dff3e3; color: var(--deep); }
.badge.amber { background: #fff1d6; color: #8a4100; }
.badge.red { background: #fde4ea; color: var(--red); }
.badge.gray { background: var(--gray-light); color: #555; }
.badge.blue { background: var(--bris); color: #003faa; }

.alert { padding: 14px 18px; border-radius: 14px; background: #fde4ea; color: #7a0023; margin: 12px 0; }
.alert.info { background: var(--bris-soft); color: #1d3b5c; }
.alert.ok { background: #dff3e3; color: var(--deep); }

/* ---------- Wizard */
.wizard { background: #fff; border-radius: 24px; box-shadow: var(--shadow); border: 1px solid var(--line); padding: 32px; margin-top: -40px; position: relative; z-index: 2; }
@media (max-width: 620px) { .wizard { padding: 20px; border-radius: 18px; } }
.stepper { display: flex; gap: 6px; margin-bottom: 28px; counter-reset: s; list-style: none; padding: 0; }
.stepper li { flex: 1; font-size: .82rem; color: #8a8a8a; font-weight: 700; }
.stepper li::before { content: ""; display: block; height: 6px; border-radius: 4px; background: var(--gray-light); margin-bottom: 8px; }
.stepper li.done::before, .stepper li.cur::before { background: var(--bjork); }
.stepper li.cur { color: var(--deep); }
@media (max-width: 620px) { .stepper li span { display: none; } .stepper li.cur span { display: inline; } }
.wizard .nav-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }

.people-row { display: grid; grid-template-columns: 1fr 1.3fr auto; gap: 10px; margin-bottom: 10px; align-items: center; }
@media (max-width: 620px) { .people-row { grid-template-columns: 1fr; padding-bottom: 10px; border-bottom: 1px dashed var(--line); } }
.icon-btn { background: none; border: 0; cursor: pointer; color: #8a8a8a; font-size: 1.4rem; padding: 6px 10px; border-radius: 10px; }
.icon-btn:hover { background: var(--gray-light); color: var(--red); }

.summary { background: var(--bris-soft); border-radius: 16px; padding: 18px 20px; }
.summary dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.summary dt { font-weight: 700; color: var(--ink); }
.summary dd { margin: 0; overflow-wrap: anywhere; min-width: 0; }
@media (max-width: 620px) { .summary dl { grid-template-columns: 1fr; gap: 2px; } .summary dd { margin-bottom: 8px; } }
.cost { display: flex; align-items: baseline; gap: 10px; font-size: 1.1rem; }
.cost strong { font-size: 2rem; color: var(--ink); }

/* Timeline */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 22px 44px; }
.timeline li::before { content: ""; position: absolute; left: 13px; top: 30px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .tdot { position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--gray-light); display: grid; place-items: center; font-size: .85rem; font-weight: 700; color: #8a8a8a; }
.timeline li.done .tdot { background: var(--bjork); color: #fff; }
.timeline li.now .tdot { background: #fff; border: 3px solid var(--bjork); color: var(--deep); }
.timeline li.fail .tdot { background: var(--red); color: #fff; }
.timeline b { color: var(--ink); display: block; }
.timeline li.done.auto b::after { content: "automatiskt"; font-size: .72rem; font-weight: 700; background: var(--bris); color: var(--deep); padding: 2px 8px; border-radius: 999px; margin-left: 8px; vertical-align: 2px; }

/* E-mail preview */
.mail { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; margin: 12px 0; font-size: .95rem; }
.mail .mh { background: var(--gray-light); padding: 10px 14px; display: grid; gap: 2px; }
.mail .mh span { color: #777; }
.mail .mh b { color: var(--ink); }
.mail pre { margin: 0; padding: 14px; white-space: pre-wrap; font-family: var(--font); font-size: .95rem; color: var(--text); }
details.mailbox summary { cursor: pointer; font-weight: 700; color: var(--darkgreen); }

/* Celebrate */
.celebrate { text-align: center; padding: 10px 0 0; }
.celebrate .big { width: 92px; height: 92px; border-radius: 50%; background: var(--bjork); color: #fff; display: grid; place-items: center; margin: 0 auto 16px; font-size: 2.6rem;
  animation: pop .5s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Onboarding modules */
.modules { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; }
@media (max-width: 860px) { .modules { grid-template-columns: 1fr; } }
.mod-nav { position: sticky; top: 90px; display: grid; gap: 6px; }
.modules > * { min-width: 0; }
@media (max-width: 860px) { .mod-nav { position: static; grid-template-columns: repeat(4, 1fr); } .mod-nav .progress { grid-column: 1 / -1; } .mod-nav button { justify-content: center; } .mod-nav button span:not(.n) { display: none; } }
.mod-nav button { text-align: left; font: inherit; font-size: .95rem; border: 1.5px solid var(--line); background: #fff; padding: 10px 12px; border-radius: 12px; cursor: pointer; display: flex; gap: 10px; align-items: center; color: var(--ink); }
.mod-nav button .n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--gray-light); display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.mod-nav button.cur { border-color: var(--bjork); background: #f3fbf4; }
.mod-nav button.done .n { background: var(--bjork); color: #fff; }
.progress { height: 8px; background: var(--gray-light); border-radius: 8px; overflow: hidden; margin: 8px 0 20px; }
.progress div { height: 100%; background: var(--bjork); width: 0; transition: width .4s; }
.prompt { background: #fbfbfb; border: 1px solid var(--line); border-left: 5px solid var(--bjork); border-radius: 12px; padding: 14px 16px; margin: 10px 0; }
.prompt .who { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--deep); }
.dodont { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 620px) { .dodont { grid-template-columns: 1fr; } }
.dodont ul { padding-left: 1.1em; margin: 0; } .dodont li { margin-bottom: 6px; }
.quiz-q { margin-bottom: 22px; }
.quiz-q .opts { display: grid; gap: 8px; margin-top: 8px; }
.quiz-q .opt { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border: 1.5px solid #cfd6dc; border-radius: 12px; cursor: pointer; font-weight: 400; color: var(--text); margin: 0; }
.quiz-q .opt input { accent-color: var(--bjork); width: 18px; height: 18px; }
.quiz-q .opt.right { border-color: var(--bjork); background: #f3fbf4; }
.quiz-q .opt.wrong { border-color: var(--red); background: #fff0f3; }
.quiz-q .why { font-size: .92rem; margin-top: 6px; }

/* Stat tiles (admin) */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.tile .v { font-size: 2rem; font-weight: 700; color: var(--ink); line-height: 1.1; }
.tile .l { font-size: .9rem; color: #6f6f6f; }
.tile.hl { background: var(--bjork); border-color: var(--bjork); } .tile.hl .v, .tile.hl .l { color: #fff; }

main { flex: 1 0 auto; }
.site-footer { flex-shrink: 0; }
.scroll-hint { display: none; font-size: .85rem; color: #6f6f6f; margin: 0 0 8px; }
@media (max-width: 760px) { .scroll-hint { display: block; } .compare thead th.hl, .compare td.hl { position: sticky; left: 0; } }
details > summary { padding-left: 1.3em; text-indent: -1.3em; }
@media (max-width: 860px) { .page-head::before { width: 200px; height: 200px; right: -140px; top: -140px; } }

/* iOS: inputs under 16px make Safari zoom the whole page on focus. */
@media (pointer: coarse) { input, select, textarea { font-size: max(16px, 1rem) !important; } }
/* Touch targets: at least ~40px for standalone links and controls. */
.brand { padding: 6px 0; }
.card > a:not(.btn), .card > p > a:only-child { display: inline-block; padding: 8px 0; }
details > summary { padding-top: 6px; padding-bottom: 6px; cursor: pointer; }
