/* Nätvakten: svalare och mer affärsmässig än Tryggt uppkopplad, men samma uppbyggnad. Systemtypsnitt. */
:root {
  --bg: #f5f7fa;
  --fg: #0f1b2a;
  --muted: #536274;
  --accent: #0c6b66;
  --accent-2: #f2a541;
  --glow: #5fd3c6;
  --soft: #e1f1ef;
  --card: #ffffff;
  --line: #dbe3ec;
  --night: #0f1b2a;
  --night-2: #18293d;
  --shadow: 0 1px 2px rgb(15 27 42 / 6%), 0 8px 24px rgb(15 27 42 / 8%);
  color-scheme: light;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--fg);
}
.wrap { max-width: 1040px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.1rem, 5.5vw, 3.4rem); margin: 0 0 18px; font-weight: 800; }
h2 { font-size: 1.7rem; margin: 0 0 18px; font-weight: 800; }
h3 { font-size: 1.15rem; margin: 0 0 8px; font-weight: 700; }
section { padding: 56px 0; }
.small { font-size: 0.9rem; color: var(--muted); }
.nowrap { white-space: nowrap; }
.lead { font-size: 1.2rem; max-width: 640px; }

/* Header och hero på mörk bakgrund */
.top { background: var(--night); color: #fff; }
.bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; padding-top: 18px; padding-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; font-size: 1.2rem; }
.brand small { display: block; font-weight: 500; font-size: 0.78rem; color: #b8c6d6; }
nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
nav a { color: #d7e1ec; text-decoration: none; font-weight: 600; }
nav a:hover { color: #fff; }
.hero { background: linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%); color: #fff; padding: 48px 0 72px; }
.hero .lead { color: #d7e1ec; }
.hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; }
.btn { display: inline-block; padding: 13px 24px; border-radius: 10px; background: var(--accent-2); color: var(--night); font-weight: 800; text-decoration: none; }
.btn:hover { filter: brightness(1.05); }
.trust { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.trust li { padding: 4px 12px; border: 1px solid #3a5069; border-radius: 999px; font-size: 0.85rem; font-weight: 600; color: #d7e1ec; }
.trust li::before { content: "✓ "; color: var(--glow); }
/* Knappar bredvid varandra: samma mellanrum oavsett om de får plats på en rad eller inte */
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn.ghost { background: transparent; color: #fff; border: 2px solid #3a5069; }
.ill { width: 100%; max-width: 360px; justify-self: center; }
.ill * { fill: none; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.ill .s { stroke: #3a5069; }
.ill .l { stroke: var(--accent-2); }
.ill .n { fill: var(--glow); stroke: none; }
.ill .shield { stroke: var(--glow); }
@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; }
  .ill { max-width: 220px; order: -1; }
}

/* Kort */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.cards article { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.cards article ul { padding-left: 1.1em; margin: 8px 0 16px; }
.cards article li { margin-bottom: 4px; }
.tag { display: inline-block; align-self: flex-start; margin-bottom: 12px; padding: 2px 10px; border-radius: 999px; background: var(--soft); color: var(--accent); font-size: 0.8rem; font-weight: 700; }
.price { margin-top: auto; margin-bottom: 0; font-weight: 700; color: var(--accent); }
.vat { margin: 2px 0 12px; }
.cards h3 a { color: inherit; text-decoration: none; }
.cards h3 a:hover { color: var(--accent); }
.more { margin: 0; font-weight: 600; }

/* Undersidor: löptext */
.prose > * { max-width: 720px; }
.prose h2 { margin-top: 40px; }
.prose li { margin-bottom: 6px; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose .flow { padding-left: 0; max-width: none; }
.crumbs { margin: 0 0 10px; }
.crumbs a { color: #d7e1ec; }
.page-head { background: linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%); color: #fff; padding: 32px 0 44px; }
.page-head .lead { color: #d7e1ec; }
.page-head .small { color: #b8c6d6; }
.big-price { font-size: 1.4rem; font-weight: 800; color: var(--accent); margin-bottom: 4px; }

/* Principer i två kolumner */
.points { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 8px 32px; padding: 0; list-style: none; }
.points li { padding: 14px 0; border-top: 1px solid var(--line); }
.points strong { display: block; }

/* Steg */
.steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 14px; max-width: 720px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--night); color: var(--accent-2); font-weight: 800; }

/* Tidslinje: faser med en linje emellan, under varandra på mobilen */
.timeline { list-style: none; padding: 0; margin: 28px 0 8px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; position: relative; }
.prose .timeline { padding-left: 0; max-width: none; }
.timeline::before { content: ""; position: absolute; top: 16px; left: 10%; right: 10%; height: 2px; background: var(--line); }
.timeline li { position: relative; margin: 0; }
.timeline .when { display: grid; place-items: center; width: 34px; height: 34px; margin: 0 auto 12px; border-radius: 50%; background: var(--night); color: var(--accent-2); font-weight: 800; position: relative; }
.timeline strong { display: block; text-align: center; }
.timeline .phase { display: block; text-align: center; font-size: 0.8rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
.timeline p { font-size: 0.92rem; color: var(--muted); margin: 6px 0 0; text-align: center; }
@media (max-width: 760px) {
  .timeline { grid-template-columns: 1fr; gap: 18px; }
  .timeline::before { top: 0; bottom: 0; left: 16px; right: auto; width: 2px; height: auto; }
  .timeline li { display: grid; grid-template-columns: 34px 1fr; column-gap: 14px; }
  .timeline .when { grid-row: span 3; margin: 0; }
  .timeline strong, .timeline .phase, .timeline p { text-align: left; }
}

/* Exempel med klockslag: tiden till vänster, en linje genom alla händelser */
.scenario { list-style: none; padding: 0; margin: 20px 0; max-width: 720px; border-left: 2px solid var(--line); }
.prose .scenario { padding-left: 0; }
.scenario li { display: grid; grid-template-columns: 140px 1fr; gap: 12px; padding: 10px 0 10px 18px; position: relative; margin: 0; }
.scenario li::before { content: ""; position: absolute; left: -7px; top: 17px; width: 12px; height: 12px; border-radius: 50%; background: var(--card); border: 2px solid var(--accent); }
.scenario li.bad::before { border-color: var(--accent-2); background: var(--accent-2); }
.scenario li.good::before { background: var(--accent); }
.scenario time { font-weight: 800; color: var(--fg); font-variant-numeric: tabular-nums; }
.scenario strong { display: block; }
.scenario span { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 760px) {
  .scenario li { grid-template-columns: 1fr; gap: 2px; }
}

/* Flöde: rutor med pilar emellan, under varandra på mobilen */
.flow { list-style: none; padding: 0; margin: 24px 0; display: flex; align-items: stretch; gap: 12px; }
.flow li { flex: 1 1 0; min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow); }
.flow strong { display: block; }
.flow .via { flex: 0 0 110px; align-self: center; background: none; border: 0; box-shadow: none; padding: 0; text-align: center; color: var(--muted); font-size: 0.85rem; max-width: 130px; }
.flow .via::before { content: "→"; display: block; font-size: 1.6rem; line-height: 1; color: var(--accent); }
@media (max-width: 760px) {
  .flow { flex-direction: column; }
  .flow .via { flex: 0 0 auto; max-width: none; }
  .flow .via::before { content: "↓"; }
}

.alt { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.note { max-width: 720px; padding: 16px 20px; border-left: 4px solid var(--accent-2); background: #fff8ec; border-radius: 0 10px 10px 0; }

/* Karta över datan: rader med samma rutor och pilar som .flow */
.datamap { margin: 24px 0 8px; max-width: none; }
.datamap .lane { margin: 0 0 6px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.datamap .flow { margin: 0 0 24px; }
.datamap .flow li span { display: block; font-size: 0.9rem; color: var(--muted); margin-top: 2px; }
.datamap .keep { margin-top: 10px; padding: 8px 10px; border: 2px dashed var(--accent-2); border-radius: 10px; font-size: 0.85rem; background: #fff8ec; }
.datamap .keep b { display: block; }
.datamap .lock { font-size: 0.8rem; font-weight: 700; color: var(--accent); }

/* Tabeller i löptexten, t.ex. säkerhet och data */
.prose table { width: 100%; max-width: none; border-collapse: collapse; margin: 12px 0 20px; font-size: 0.95rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose thead th { background: var(--card); border-bottom: 2px solid var(--line); }
@media (max-width: 760px) {
  .prose table, .prose tbody, .prose tr, .prose td { display: block; width: 100%; }
  .prose thead { display: none; }
  .prose tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .prose td { border: 0; padding: 2px 0; }
  .prose td::before { content: attr(data-label) ": "; font-weight: 700; }
}

/* Sidfot */
.band { background: var(--night); color: #b8c6d6; }
footer { padding-top: 32px; padding-bottom: 40px; }
footer p { margin: 4px 0; }
footer a { color: #fff; }
footer .small { color: #b8c6d6; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Exempel på larmmejlet, som det ser ut i inkorgen (monitor/config/kund.tmpl) */
.mejl { max-width: 520px; margin: 20px 0 28px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.mejl-huvud { padding: 10px 16px; font-size: 0.85rem; color: var(--muted); border-bottom: 1px solid var(--line); }
.mejl-huvud strong { color: var(--fg); }
.mejl-topp { padding: 12px 16px; color: #fff; font-weight: 800; }
.mejl-topp span { font-weight: 400; font-size: 0.85rem; opacity: 0.8; }
.mejl-kropp { padding: 14px 16px 16px; }
.mejl-kropp p { margin: 6px 0; }
.mejl-status { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #fdecea; color: #b42318; font-size: 0.8rem; font-weight: 700; }
.mejl-titel { font-size: 1.25rem; font-weight: 800; line-height: 1.25; }
.mejl-liten { font-size: 0.85rem; color: var(--muted); }
.mejl-nu { padding: 10px 12px; border-radius: 8px; background: var(--bg); }
.mejl-topp { background: var(--night); }

/* Kontaktformuläret (/kontakt/), samma uppbyggnad som Tryggt uppkopplads */
.booking {
  display: grid; gap: 16px; max-width: 640px; margin: 8px 0 12px; padding: 24px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
}
.booking label { display: grid; gap: 6px; font-weight: 600; }
.booking .opt { font-weight: 400; color: var(--muted); }
.booking input, .booking textarea, .booking select {
  width: 100%; padding: 10px 12px; font: inherit; font-weight: 400; color: var(--fg);
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
}
.booking textarea { resize: vertical; }
.booking input:focus, .booking textarea:focus, .booking select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.booking .areas { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin: 0; padding: 0; border: 0; }
.booking .areas legend { padding: 0; margin-bottom: 8px; font-weight: 600; }
.booking .areas label { display: flex; align-items: center; gap: 8px; font-weight: 400; cursor: pointer; }
.booking .areas input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.booking .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.booking .btn { justify-self: start; margin-top: 4px; border: 0; cursor: pointer; font: inherit; font-weight: 800; }
/* Fällan för spamrobotar: utanför skärmen i stället för display: none, som vissa robotar känner igen */
.booking .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 760px) {
  .booking { padding: 18px; }
  .booking .pair, .booking .areas { grid-template-columns: 1fr; }
}
