:root {
  --sky: #27c8f2;
  --blue: #1570e0;
  --blue-deep: #0d47a1;
  --green: #34b356;
  --green-ink: #1f8a3e;

  --bg: #f5f9fe;
  --surface: #ffffff;
  --surface-2: #eaf2fc;
  --ink: #0b1b33;
  --ink-2: #44546c;
  --line: #d6e2f1;
  --focus: #1570e0;
  --danger: #b4261d;
  --warn: #9a5b00;

  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgb(11 27 51 / 6%), 0 8px 28px rgb(11 27 51 / 8%);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #07111f;
    --surface: #0e1c30;
    --surface-2: #14263f;
    --ink: #e9f1fb;
    --ink-2: #a3b3c8;
    --line: #233955;
    --focus: #5cb4ff;
    --green-ink: #5fd47f;
    --danger: #ff8a80;
    --warn: #ffc266;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 28px rgb(0 0 0 / 35%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #07111f;
  --surface: #0e1c30;
  --surface-2: #14263f;
  --ink: #e9f1fb;
  --ink-2: #a3b3c8;
  --line: #233955;
  --focus: #5cb4ff;
  --green-ink: #5fd47f;
  --danger: #ff8a80;
  --warn: #ffc266;
  --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 28px rgb(0 0 0 / 35%);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--blue); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) a { color: #6cc0ff; } }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(720px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--ink-2); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- topp ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 750; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.topbar nav { margin-left: auto; display: flex; gap: 6px; }
.topbar nav a {
  text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 15px;
  padding: 8px 12px; border-radius: 999px;
}
.topbar nav a:hover { background: var(--surface-2); color: var(--ink); }
@media (max-width: 560px) { .topbar nav a.optional { display: none; } }

/* ---------- knapper ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 999px;
  font: inherit; font-weight: 700; font-size: 16px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .08s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--blue); color: #fff !important; box-shadow: 0 6px 18px rgb(21 112 224 / 30%); }
.btn-primary:hover { background: var(--blue-deep); }
.btn-go { background: var(--green); color: #fff !important; box-shadow: 0 6px 18px rgb(52 179 86 / 30%); }
.btn-go:hover { background: var(--green-ink); }
.btn-ghost { background: var(--surface); color: var(--ink) !important; border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(48px, 9vw, 104px) 0 clamp(56px, 8vw, 96px);
}
.hero::before {
  content: ""; position: absolute; inset: -40% -20% auto auto; width: 70vw; height: 70vw;
  max-width: 820px; max-height: 820px; border-radius: 50%;
  background: radial-gradient(closest-side, rgb(39 200 242 / 28%), transparent);
  pointer-events: none;
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; color: var(--green-ink);
  background: color-mix(in srgb, var(--green) 14%, transparent);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 18px;
}
.hero h1 .accent {
  background: linear-gradient(100deg, var(--sky), var(--blue) 55%, var(--green));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: var(--ink-2); max-width: 36em; margin-bottom: 28px; }
.hero .note { font-size: 14px; color: var(--ink-2); margin-top: 14px; }

/* telefon-mockup */
.phone {
  justify-self: center; width: min(320px, 100%);
  background: var(--ink); border-radius: 44px; padding: 12px;
  box-shadow: 0 30px 60px rgb(11 27 51 / 25%);
}
.phone-screen {
  background: #000; color: #fff; border-radius: 34px; padding: 28px 22px 22px;
  min-height: 520px; display: flex; flex-direction: column;
}
.phone-top { display: flex; justify-content: space-between; font-size: 13px; color: #9fb0c6; margin-bottom: 18px; }
.phone-progress { height: 6px; background: #1d2a3b; border-radius: 99px; overflow: hidden; margin-bottom: 30px; }
.phone-progress span { display: block; height: 100%; width: 60%; background: linear-gradient(90deg, var(--sky), var(--green)); }
.phone-label { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: #8da2bd; margin-bottom: 6px; }
.phone-item { font-size: 30px; font-weight: 800; line-height: 1.15; margin-bottom: 18px; }
.phone-speak { display: flex; align-items: center; gap: 8px; color: #7fd8ff; font-size: 14px; margin-bottom: auto; }
.phone-speak i { display: inline-block; width: 4px; border-radius: 2px; background: currentColor; animation: eq 1s ease-in-out infinite; }
.phone-speak i:nth-child(1) { height: 10px; }
.phone-speak i:nth-child(2) { height: 18px; animation-delay: .15s; }
.phone-speak i:nth-child(3) { height: 12px; animation-delay: .3s; }
@keyframes eq { 50% { transform: scaleY(.4); } }
@media (prefers-reduced-motion: reduce) { .phone-speak i { animation: none; } html { scroll-behavior: auto; } }
.phone-buttons { display: grid; gap: 10px; margin-top: 28px; }
.phone-buttons span {
  display: flex; align-items: center; justify-content: center; height: 54px; border-radius: 16px;
  font-weight: 800; font-size: 18px; background: #18263a; color: #dbe6f5;
}
.phone-buttons span.yes { background: #fff; color: #000; }
.phone-done { margin-top: 18px; font-size: 13px; color: #8da2bd; }
.phone-done b { color: #5fd47f; }

/* ---------- seksjoner ---------- */
section { scroll-margin-top: 72px; }
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 36px; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.feature {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
}
.section:not(.section-alt) .feature { background: var(--surface); }
.feature .ico {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px;
  background: color-mix(in srgb, var(--blue) 12%, transparent); color: var(--blue);
}
.feature .ico.green { background: color-mix(in srgb, var(--green) 15%, transparent); color: var(--green-ink); }
.feature .ico svg { width: 24px; height: 24px; }
.feature p { color: var(--ink-2); margin: 0; font-size: 16px; }

.steps { counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; list-style: none; padding: 0; margin: 0; }
.steps li { position: relative; padding: 22px 22px 22px 70px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 20px; top: 20px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--sky), var(--blue));
}
.steps p { margin: 0; color: var(--ink-2); font-size: 16px; }

/* ---------- lag liste ---------- */
.builder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 24px; align-items: start; }
@media (max-width: 900px) { .builder { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: clamp(18px, 3vw, 28px);
}
.section-alt .card { background: var(--bg); }
.field { display: grid; gap: 6px; margin-bottom: 18px; }
.field label, .field .label { font-weight: 700; font-size: 15px; }
.field .hint { font-size: 14px; color: var(--ink-2); }
input[type="text"], input[type="url"], textarea, select {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px;
}
.section-alt input, .section-alt textarea, .section-alt select { background: var(--surface); }
textarea { min-height: 260px; resize: vertical; line-height: 1.6; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }

.seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 4px; gap: 4px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { padding: 8px 16px; border-radius: 999px; cursor: pointer; font-weight: 650; font-size: 15px; color: var(--ink-2); }
.seg input:checked + label { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / 12%); }
.seg input:focus-visible + label { outline: 3px solid var(--focus); }

.examples { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.chip {
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  border: 1px dashed var(--line); background: transparent; color: var(--ink-2);
  border-radius: 999px; padding: 6px 12px;
}
.chip:hover { border-style: solid; color: var(--ink); background: var(--surface-2); }

.share-panel { position: sticky; top: 80px; display: grid; gap: 16px; }
@media (max-width: 900px) { .share-panel { position: static; } }
.qr-box {
  background: #fff; border-radius: 14px; padding: 10px; aspect-ratio: 1;
  display: grid; place-items: center; border: 1px solid var(--line);
}
.qr-box svg { width: 100%; height: auto; }
.qr-empty { color: #66768c; text-align: center; font-size: 15px; padding: 24px; }
.qr-title { text-align: center; margin: 0; font-weight: 750; font-size: 18px; overflow-wrap: anywhere; }
.qr-sub { text-align: center; margin: -10px 0 0; font-size: 14px; color: var(--ink-2); }

.meter { display: grid; gap: 6px; font-size: 13px; color: var(--ink-2); }
.meter-bar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.meter-bar span { display: block; height: 100%; width: 0; background: var(--green); transition: width .2s ease, background-color .2s; }
.meter.warn .meter-bar span { background: #f0a000; }
.meter.over .meter-bar span { background: var(--danger); }
.meter.over { color: var(--danger); font-weight: 650; }

.link-out {
  display: flex; gap: 8px; align-items: stretch;
}
.link-out input { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; color: var(--ink-2); }
.panel-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.panel-actions .btn { width: 100%; padding: 0 12px; }
.panel-actions .full { grid-column: 1 / -1; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%);
  background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-weight: 650;
  transition: transform .25s ease, opacity .25s ease, visibility .25s; z-index: 50; max-width: calc(100% - 32px);
  opacity: 0; visibility: hidden;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

/* ---------- last ned ---------- */
.get { display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: center; }
@media (max-width: 700px) { .get { grid-template-columns: 1fr; text-align: center; } .get .btn-row { justify-content: center; } .get img { margin-inline: auto; } }
.get img { width: 120px; height: 120px; border-radius: 28px; box-shadow: var(--shadow); }
.badge-soon { font-size: 14px; color: var(--ink-2); align-self: center; }

/* ---------- import ---------- */
.import-hero { padding: 40px 0 24px; text-align: center; }
.import-hero img { width: 72px; height: 72px; border-radius: 18px; margin: 0 auto 18px; box-shadow: var(--shadow); }
.list-card { padding: 0; overflow: hidden; }
.list-card header { padding: 22px 24px 14px; border-bottom: 1px solid var(--line); }
.list-card h2 { font-size: 1.6rem; margin: 0 0 4px; overflow-wrap: anywhere; }
.list-card ol { margin: 0; padding: 8px 0; list-style: none; counter-reset: item; }
.list-card li {
  counter-increment: item; display: flex; gap: 14px; align-items: baseline;
  padding: 12px 24px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere;
}
.list-card li:last-child { border-bottom: 0; }
.list-card li::before {
  content: counter(item); flex: none; min-width: 1.8em; font-variant-numeric: tabular-nums;
  color: var(--ink-2); font-weight: 650; font-size: 15px; text-align: right;
}
.stack { display: grid; gap: 12px; }
.callout {
  border-radius: var(--radius); padding: 18px 20px; border: 1px solid var(--line);
  background: var(--surface-2); font-size: 16px;
}
.callout.error { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
.callout p:last-child { margin: 0; }
.details-qr { margin-top: 8px; }
.details-qr summary { cursor: pointer; font-weight: 700; padding: 8px 0; }
.details-qr .qr-box { max-width: 320px; margin: 12px auto 0; }

/* ---------- prose ---------- */
.prose { padding: 48px 0 72px; }
.prose h1 { font-size: clamp(2rem, 5vw, 2.6rem); }
.prose h2 { font-size: 1.35rem; margin-top: 2em; }
.prose li { margin-bottom: .4em; }

/* ---------- bunn ---------- */
footer { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--ink-2); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }
footer nav { display: flex; gap: 18px; margin-left: auto; }
footer a { color: var(--ink-2); }
