/* Safety Computing – nettside
   Farger og typografi følger presentasjonene: lys bakgrunn, sort tekst, gul aksent. */
:root {
  --bg: #F7F6F2;
  --bg-2: #EEECE6;
  --card: #FDFDFB;
  --ink: #1D1D1F;
  --body: #4A4A4F;
  --muted: #6B6B6B;
  --line: #E2DFD6;
  --yellow: #FFBC00;
  --yellow-tint: #FFF4D6;
  --radius: 16px;
  --wrap: 1200px;
  --display: 'Rubik', 'Segoe UI', Arial, sans-serif;
  --text: 'Nunito Sans', 'Segoe UI', Arial, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 18px;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--display); color: var(--ink); margin: 0; text-wrap: balance; }
h1 { font-size: clamp(40px, 6vw, 68px); font-weight: 700; line-height: 1.05; letter-spacing: -0.01em; }
h2 { font-size: clamp(30px, 4vw, 46px); font-weight: 600; line-height: 1.12; }
h3 { font-size: 22px; font-weight: 600; line-height: 1.25; }
p { margin: 0; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }
@media (max-width: 480px) { .wrap { padding-inline: 16px; } }

.nw { white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--card); padding: 10px 16px; z-index: 100; }
.skip:focus { left: 16px; top: 16px; }

/* Småoverskrift: sort tekst med gul strek (erstatter den grønnbrune fargen) */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 14px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink);
}
.eyebrow::before { content: ""; width: 28px; height: 4px; border-radius: 2px; background: var(--yellow); }

.lead { font-size: clamp(18px, 2vw, 21px); color: var(--body); max-width: 60ch; }

/* Knapper */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px; border-radius: 999px;
  font-family: var(--text); font-weight: 800; font-size: 16px; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: transform .15s ease, background-color .15s ease;
}
.btn svg { width: 20px; height: 20px; }
.btn-dark { background: var(--ink); color: var(--card); }
.btn-dark:hover { background: #000; }
.btn-yellow { background: var(--yellow); color: var(--ink); }
.btn-yellow:hover { background: #F2B200; }
.btn-line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-line:hover { background: var(--card); }
@media (prefers-reduced-motion: no-preference) { .btn:hover { transform: translateY(-1px); } }

/* Ikoner */
.ico { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico-badge {
  width: 56px; height: 56px; border-radius: 50%; background: var(--yellow); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.ico-badge .ico { width: 28px; height: 28px; }

/* Topp */
.topbar { height: 6px; background: var(--yellow); }
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: rgba(247, 246, 242, 0.94); backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.brand img { width: 210px; height: auto; }
.nav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.nav a { font-weight: 700; font-size: 16px; text-decoration: none; }
.nav a:hover { text-decoration: underline; }
.nav .lang { font-size: 14px; letter-spacing: .08em; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; }
.header-actions { display: flex; gap: 10px; }
.header-actions .btn { min-height: 36px; padding: 5px 14px; font-size: 14px; gap: 8px; border-width: 1.5px; }
.header-actions .btn svg { width: 17px; height: 17px; }
.menu-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 12px; width: 48px; height: 48px; align-items: center; justify-content: center; cursor: pointer; color: var(--ink); }

@media (max-width: 1200px) {
  .menu-toggle { display: inline-flex; }
  .nav, .header-actions { display: none; }
  .site-header.open .wrap { flex-wrap: wrap; padding-bottom: 16px; }
  .site-header.open .nav { display: flex; flex-direction: column; align-items: flex-start; width: 100%; gap: 14px; margin: 0; padding-top: 8px; border-top: 1px solid var(--line); }
  .site-header.open .header-actions { display: flex; width: 100%; flex-wrap: wrap; }
  .brand img { width: 170px; }
}

/* Seksjoner */
section { padding-block: 88px; }
@media (max-width: 700px) { section { padding-block: 60px; } }
.alt { background: var(--bg-2); }
.section-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 44px; max-width: 760px; }

/* Hero */
.hero { padding-block: 72px 88px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 24px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.promise-panel {
  background: var(--yellow); border-radius: 28px; padding: 44px 40px;
  display: flex; flex-direction: column; gap: 26px;
}
.promise { display: flex; align-items: center; gap: 16px; font-family: var(--display); font-size: clamp(20px, 2vw, 25px); line-height: 1.2; }
.promise b { font-weight: 700; }
.promise .tick { width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: var(--yellow); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.promise .tick .ico { width: 24px; height: 24px; stroke-width: 3; }
.panel-note { font-size: 15px; font-weight: 700; border-top: 2px solid rgba(29, 29, 31, 0.18); padding-top: 18px; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

/* Tillitslinje */
.trust { border-block: 1px solid var(--line); background: var(--card); padding-block: 28px; }
.trust ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.trust li { display: flex; align-items: flex-start; gap: 14px; font-weight: 800; line-height: 1.3; }
.trust li div span { display: block; font-weight: 400; font-size: 15px; color: var(--body); }
.trust .ico-badge { width: 44px; height: 44px; }
.trust .ico-badge .ico { width: 22px; height: 22px; }
@media (max-width: 900px) { .trust ul { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .trust ul { grid-template-columns: 1fr; } }

/* Kort */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 960px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.card p { color: var(--body); }
.card .tag { font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; background: var(--ink); color: var(--card); border-radius: 999px; padding: 3px 10px; align-self: flex-start; }
.banner { margin-top: 28px; background: var(--yellow); border-radius: var(--radius); padding: 20px 28px; font-weight: 800; font-size: 19px; display: flex; align-items: center; gap: 14px; }

/* Internett-bånd */
.isp { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.isp-facts { display: flex; flex-direction: column; gap: 16px; }
.fact { display: flex; gap: 18px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.fact h3 { font-size: 20px; }
.fact p { color: var(--body); font-size: 17px; margin-top: 4px; }
@media (max-width: 900px) { .isp { grid-template-columns: 1fr; gap: 32px; } }

/* Pakker */
.pkg { border-top: 8px solid var(--yellow); padding: 34px; gap: 18px; }
.pkg-head { display: flex; align-items: center; gap: 16px; }
.pkg h3 { font-size: 28px; }
.pkg .pkg-lead { font-size: 19px; color: var(--ink); }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; color: var(--body); }
.checks li .ico { width: 22px; height: 22px; margin-top: 3px; color: var(--ink); stroke-width: 2.5; }
.more { margin-top: 24px; color: var(--body); }

/* Prinsippskisse */
.flow { display: flex; align-items: stretch; gap: 10px; }
.zone { flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.zone-title { background: var(--yellow); padding: 14px 22px; font-size: 14px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.zone ul { list-style: none; margin: 0; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.zone li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; line-height: 1.4; }
.zone li .ico { width: 22px; height: 22px; margin-top: 1px; }
.link { width: 64px; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; text-align: center; }
.link .ico { width: 36px; height: 36px; stroke-width: 2.5; }
.flow-note { margin-top: 24px; font-size: 19px; }
@media (max-width: 900px) {
  .flow { flex-direction: column; }
  .link { width: auto; flex-direction: row; padding-block: 4px; }
  .link .ico { transform: rotate(90deg); width: 28px; height: 28px; }
}

/* Sikkerhet */
.iso { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 48px; align-items: start; }
.iso-badge { background: var(--yellow); border-radius: 24px; padding: 36px; display: flex; flex-direction: column; gap: 12px; }
.iso-badge .big { font-family: var(--display); font-size: clamp(40px, 5vw, 56px); font-weight: 700; line-height: 1; }
.iso-badge > .ico { width: 56px; height: 56px; }
.iso-points { display: flex; flex-direction: column; gap: 24px; }
.point { display: flex; gap: 18px; align-items: flex-start; }
.point p { color: var(--body); margin-top: 4px; }
@media (max-width: 900px) { .iso { grid-template-columns: 1fr; } }

.table-wrap { overflow-x: auto; margin-top: 48px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 17px; }
th, td { text-align: left; padding: 16px 22px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--yellow); font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 800; }
td:nth-child(2) { color: var(--body); }

/* SLA */
.sla .card { border-top: 8px solid var(--yellow); }
.sla .level { font-size: 14px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.sla .pct { font-family: var(--display); font-size: 52px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.sla .hours { font-weight: 800; color: var(--ink); border-top: 1px solid var(--line); padding-top: 14px; }
.note { margin-top: 24px; background: var(--yellow-tint); border-left: 8px solid var(--yellow); border-radius: 12px; padding: 20px 24px; }

/* Referanser */
.refs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.ref { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; }
.ref .logo { height: 64px; width: 100%; display: flex; align-items: center; justify-content: center; }
.ref .logo img { max-height: 64px; width: auto; object-fit: contain; }
.ref b { display: block; }
.ref span { font-size: 15px; color: var(--body); }
@media (max-width: 1080px) { .refs { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .refs { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 400px) { .refs { grid-template-columns: 1fr; } }

/* Om oss */
.about { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.about-copy { display: flex; flex-direction: column; gap: 22px; }
.about-copy p { color: var(--body); max-width: 60ch; }
.about img { border-radius: 24px; width: 100%; aspect-ratio: 5 / 4; object-fit: cover; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stat { background: var(--card); border: 1px solid var(--line); border-top: 6px solid var(--yellow); border-radius: 14px; padding: 16px 18px; }
.stat b { font-family: var(--display); font-size: 26px; display: block; line-height: 1.1; }
.stat span { font-size: 15px; color: var(--body); }
@media (max-width: 900px) { .about { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .stats { grid-template-columns: 1fr; } }

/* Linker og fjernhjelp */
.help { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.help .card h3 { font-size: 26px; }
.dl { display: flex; flex-wrap: wrap; gap: 12px; }
.linklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.linklist a { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 4px; border-bottom: 1px solid var(--line); text-decoration: none; }
.linklist li:last-child a { border-bottom: 0; }
.linklist a b { display: block; }
.linklist a span { color: var(--body); font-size: 15px; }
.linklist a:hover b { text-decoration: underline; }
@media (max-width: 900px) { .help { grid-template-columns: 1fr; } }

/* Kontakt */
.contact { display: grid; grid-template-columns: 1fr minmax(0, 520px); gap: 48px; align-items: start; }
.contact-info { display: flex; flex-direction: column; gap: 34px; }
.contact-row { display: flex; gap: 16px; align-items: flex-start; }
.contact-row .ico-badge { width: 48px; height: 48px; }
.contact-row .ico-badge .ico { width: 24px; height: 24px; }
.contact-row small { display: block; font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.contact-row a, .contact-row p { font-size: 19px; font-weight: 700; }
.form { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
label { font-weight: 800; font-size: 14px; }
input, textarea {
  font: inherit; font-size: 16px; color: var(--ink); background: var(--bg);
  border: 1px solid #CFCBC0; border-radius: 10px; padding: 9px 12px; width: 100%;
}
textarea { min-height: 96px; resize: vertical; }
input:focus-visible, textarea:focus-visible { outline: 3px solid var(--yellow); outline-offset: 0; border-color: var(--ink); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .privacy { grid-column: 1 / -1; font-size: 14px; color: var(--muted); }
.form .btn { grid-column: 1 / -1; justify-self: start; }
.status { grid-column: 1 / -1; border-radius: 12px; padding: 14px 18px; font-weight: 700; }
.status.ok { background: #E4F4E8; color: #14532D; }
.status.err { background: #FDE8E6; color: #8A1C12; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .form { grid-template-columns: 1fr; padding: 22px; } }

/* Bunn */
.site-footer { background: var(--card); border-top: 1px solid var(--line); padding-block: 48px; font-size: 16px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-grid h3 { font-size: 16px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 10px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.footer-grid p { color: var(--body); }
.footer-bottom { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* Tekstknapp (ser ut som lenke) */
.textbtn { font: inherit; color: inherit; background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Cookie-banner */
.cookie {
  position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 90;
  display: flex; justify-content: center;
}
.cookie[hidden] { display: none; }
.cookie-inner {
  max-width: 880px; width: 100%; background: var(--card); border: 1px solid var(--line); border-top: 6px solid var(--yellow);
  border-radius: 18px; box-shadow: 0 18px 48px rgba(29, 29, 31, 0.18);
  padding: 22px 26px; display: flex; gap: 24px; align-items: center; justify-content: space-between;
}
.cookie h2 { font-size: 20px; margin-bottom: 4px; }
.cookie p { font-size: 16px; color: var(--body); max-width: 60ch; }
.cookie-actions { display: flex; gap: 10px; flex: none; }
.cookie-actions .btn { min-height: 44px; }
@media (max-width: 720px) {
  .cookie-inner { flex-direction: column; align-items: stretch; }
  .cookie-actions { flex-direction: column-reverse; }
}

/* Personvernerklæring */
.legal { padding-block: 64px 96px; }
.legal-body { max-width: 780px; display: flex; flex-direction: column; gap: 14px; }
.legal-body h1 { font-size: clamp(34px, 5vw, 52px); margin-top: 6px; }
.legal-body h2 { font-size: 24px; margin-top: 26px; }
.legal-body p, .legal-body li { color: var(--body); }
.legal-body ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.legal-body b { color: var(--ink); }
.legal-date { font-size: 15px; color: var(--muted); }

/* Løsninger */
.sol { padding: 32px; gap: 16px; border-top: 8px solid var(--yellow); }
.sol-head { display: flex; align-items: center; gap: 16px; }
.sol-head > div { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.sol h3 { font-size: 25px; }
.sol .sol-lead { color: var(--ink); font-size: 18px; }
.pkg-tag { font-style: normal; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; background: var(--yellow); color: var(--ink); border-radius: 999px; padding: 2px 9px; margin-left: 6px; white-space: nowrap; vertical-align: 2px; }
.more a { font-weight: 700; }

/* ISO-merke */
.iso-meta { font-size: 15px; }
.iso-badge .btn { align-self: flex-start; margin-top: 8px; }

/* Kontakt: underlinjer */
.contact-row .sub { display: block; font-weight: 400; font-size: 17px; }
.contact-row span.sub a { display: inline; font-weight: 400; font-size: 17px; }
.contact-row div > a:not(.sub) { display: block; }

/* Illustrasjon under prinsippskissen */
.illu { margin: 40px 0 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 28px 20px; }
.illu-scroll { overflow-x: auto; }
.illu svg { display: block; width: 100%; min-width: 680px; height: auto; }
.illu-legend { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 15px; font-weight: 700; color: var(--body); }
.illu-legend .swatch { width: 28px; height: 12px; border-radius: 6px; background: var(--yellow); border: 1.5px solid var(--ink); flex: none; }
@media (max-width: 560px) { .illu { padding: 16px; } }

/* Småjusteringer */
.isp-cta { margin-top: 28px; }
#kontakt .section-head { max-width: none; }
#kontakt .section-head .lead { max-width: none; }
.form .field { gap: 4px; }
.form .btn { min-height: 44px; padding: 10px 20px; }
.form .privacy { font-size: 13px; }

/* Språkvelger med flagg */
.langs { display: inline-flex; align-items: center; gap: 8px; }
.flag { display: inline-flex; width: 28px; height: 20px; border-radius: 4px; overflow: hidden; box-shadow: 0 0 0 1px rgba(29, 29, 31, 0.25); opacity: 0.55; transition: opacity .15s ease, box-shadow .15s ease; }
.flag svg { width: 100%; height: 100%; display: block; }
.flag:hover, .flag:focus-visible { opacity: 1; }
.flag.current { opacity: 1; box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--yellow); }

.nav a, .header-actions .btn { white-space: nowrap; }
@media (max-width: 1320px) { .nav { gap: 16px; } .site-header .wrap { gap: 18px; } .brand img { width: 180px; } }

/* ================= Chat ================= */
#sc-chat { --led-on: #22C55E; --led-off: #A3A3A3; position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 80; font-family: var(--text); }
#sc-chat[hidden] { display: none; }
#sc-chat svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.scc-led { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--led-off); flex: none; position: relative; }
.is-online .scc-led { background: var(--led-on); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
@media (prefers-reduced-motion: no-preference) {
  .is-online .scc-led { animation: scc-pulse 2.2s ease-out infinite; }
}
@keyframes scc-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.scc-launch { position: relative; width: 60px; height: 60px; border-radius: 50%; border: 0; background: var(--ink); color: var(--yellow); display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 10px 28px rgba(29, 29, 31, 0.28); margin-left: auto; }
.scc-launch svg { width: 28px; height: 28px; }
.scc-launch .scc-led { position: absolute; top: 4px; right: 4px; width: 14px; height: 14px; border: 2px solid var(--ink); }
.scc-badge { position: absolute; top: -4px; left: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--yellow); color: var(--ink); font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.scc-badge[hidden] { display: none; }
.is-open .scc-launch { display: none; }

.scc-teaser { position: absolute; right: 0; bottom: 74px; display: flex; align-items: flex-start; gap: 4px; width: max-content; max-width: min(320px, calc(100vw - 40px)); background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 14px 36px rgba(29, 29, 31, 0.16); }
.scc-teaser[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) { .scc-teaser:not([hidden]) { animation: scc-in .35s ease-out; } }
@keyframes scc-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.scc-teaser-btn { display: flex; align-items: center; gap: 12px; text-align: left; background: none; border: 0; padding: 16px 4px 16px 18px; font: inherit; font-weight: 700; font-size: 16px; color: var(--ink); cursor: pointer; line-height: 1.35; }
.scc-teaser-x { background: none; border: 0; color: var(--muted); padding: 10px; cursor: pointer; border-radius: 10px; }
.scc-teaser-x svg { width: 18px; height: 18px; }

.scc-panel { width: 370px; max-width: calc(100vw - 40px); height: min(560px, calc(100vh - 60px)); background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 18px 50px rgba(29, 29, 31, 0.22); display: flex; flex-direction: column; overflow: hidden; }
.scc-panel[hidden] { display: none; }
.scc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; background: var(--yellow); }
.scc-head-text { display: flex; flex-direction: column; gap: 2px; }
.scc-head-text strong { font-family: var(--display); font-size: 18px; }
.scc-state { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.scc-head .scc-led { border: 2px solid var(--ink); width: 12px; height: 12px; }
.scc-icon-btn { background: none; border: 0; color: var(--ink); padding: 6px; border-radius: 10px; cursor: pointer; }
.scc-icon-btn:hover { background: rgba(29, 29, 31, 0.08); }

.scc-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.scc-m { display: flex; flex-direction: column; max-width: 85%; gap: 3px; }
.scc-bubble { padding: 10px 14px; border-radius: 16px; font-size: 15px; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; }
.scc-visitor { align-self: flex-end; }
.scc-visitor .scc-bubble { background: var(--ink); color: var(--card); border-bottom-right-radius: 4px; }
.scc-agent { align-self: flex-start; }
.scc-agent .scc-bubble { background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.scc-name { font-size: 12px; font-weight: 800; color: var(--muted); padding-left: 4px; }
.scc-system { align-self: center; max-width: 92%; }
.scc-system .scc-bubble { background: transparent; color: var(--body); font-size: 14px; text-align: center; padding: 4px 8px; }

.scc-contact { padding: 14px 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; background: var(--yellow-tint); }
.scc-contact[hidden] { display: none; }
.scc-contact-text { font-size: 14px; font-weight: 700; }
.scc-contact input { font: inherit; font-size: 15px; padding: 9px 12px; border: 1px solid #CFCBC0; border-radius: 10px; background: var(--card); }
.scc-error { color: #8A1C12; font-size: 13px; font-weight: 700; }
.scc-error[hidden] { display: none; }
.scc-btn { align-self: flex-start; background: var(--ink); color: var(--card); border: 0; border-radius: 999px; padding: 9px 18px; font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; }
.scc-btn:disabled { opacity: .6; }

.scc-ended { padding: 14px 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.scc-ended[hidden] { display: none; }

.scc-compose { display: flex; align-items: flex-end; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.scc-compose[hidden] { display: none; }
.scc-compose textarea { flex: 1; resize: none; font: inherit; font-size: 15px; line-height: 1.4; padding: 10px 12px; border: 1px solid #CFCBC0; border-radius: 12px; background: var(--bg); max-height: 120px; }
.scc-compose textarea:focus-visible, .scc-contact input:focus-visible { outline: 3px solid var(--yellow); outline-offset: 0; border-color: var(--ink); }
.scc-send { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; background: var(--yellow); color: var(--ink); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.scc-send svg { width: 20px; height: 20px; }
.scc-send:disabled { opacity: .5; }
.scc-foot { padding: 0 16px 10px; text-align: right; }
.scc-link { background: none; border: 0; font: inherit; font-size: 13px; color: var(--muted); text-decoration: underline; cursor: pointer; }
.scc-link[hidden] { display: none; }

@media (max-width: 600px) {
  #sc-chat { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  #sc-chat.is-open { left: 0; right: 0; bottom: 0; }
  .is-open .scc-panel { width: 100%; max-width: none; height: 85vh; border-radius: 20px 20px 0 0; }
}
/* Chat: nullstill generelle stiler fra siden */
#sc-chat section.scc-panel { padding: 0; }
#sc-chat textarea, #sc-chat input { min-height: 0; width: auto; }
#sc-chat .scc-compose textarea { height: 44px; }
#sc-chat .scc-contact input { width: 100%; }
#sc-chat header { position: static; }
