/* ==========================================================================
   TRYGGHETSLÄGE – stil
   Färgpalett från telefonkurs.com: marinblå, blå/grå, teal, vit, ljusgrå
   Alla mått i rem så att textstorleken (A / A+ / A++) skalar hela gränssnittet.
   ========================================================================== */

/* ---------------- Tokens: ljust tema ---------------- */
:root {
  --navy: #101020;
  --dark-blue: #203F60;
  --blue: #304F70;
  --teal: #307070;
  --light-teal: #407070;

  --bg: #EEF1F4;
  --bg-grad: radial-gradient(1200px 600px at 85% -10%, rgba(48, 112, 112, .10), transparent 60%),
             radial-gradient(900px 500px at -10% 10%, rgba(48, 79, 112, .08), transparent 60%);
  --surface: #FFFFFF;
  --surface-2: #F5F7F9;
  --surface-3: #EBEFF3;
  --text: #243A5A;
  --text-strong: #14233B;
  --muted: #5E6878;
  --border: #C8CDD2;
  --border-soft: #DCE1E6;

  --accent: #2C6E6C;
  --accent-strong: #215654;
  --accent-soft: #E2EFEE;
  --accent-ring: rgba(44, 110, 108, .35);
  --on-accent: #FFFFFF;

  --green: #23774A;  --green-soft: #E3F3E9;
  --yellow: #8A6500; --yellow-soft: #FFF4D2; --yellow-bar: #E8B21C;
  --orange: #B2541A; --orange-soft: #FCE9DB; --orange-bar: #E8792E;
  --red: #B3261E;    --red-soft: #FCE3E1;    --red-bar: #D93B32;

  --header-bg: linear-gradient(120deg, #101020 0%, #1A2F4C 55%, #234E5C 100%);
  --header-text: #FFFFFF;

  --shadow-sm: 0 1px 2px rgba(16, 24, 48, .06), 0 1px 4px rgba(16, 24, 48, .05);
  --shadow: 0 6px 18px rgba(20, 40, 70, .08), 0 2px 4px rgba(20, 40, 70, .05);
  --shadow-lg: 0 18px 40px rgba(20, 40, 70, .14), 0 4px 10px rgba(20, 40, 70, .06);

  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius: 20px;
  --radius-lg: 24px;
  --focus: #1F7AE0;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --ease: cubic-bezier(.22, .8, .3, 1);
  color-scheme: light;
}

/* ---------------- Tokens: mörkt tema ---------------- */
html[data-theme="dark"] {
  --bg: #0C1424;
  --bg-grad: radial-gradient(1200px 600px at 85% -10%, rgba(80, 170, 165, .12), transparent 60%),
             radial-gradient(900px 500px at -10% 10%, rgba(48, 79, 112, .25), transparent 60%);
  --surface: #15213A;
  --surface-2: #1A2843;
  --surface-3: #22324F;
  --text: #DCE5F0;
  --text-strong: #F4F7FB;
  --muted: #9FADC1;
  --border: #33476A;
  --border-soft: #273A5A;

  --accent: #5DB5AF;
  --accent-strong: #7FCAC4;
  --accent-soft: rgba(93, 181, 175, .14);
  --accent-ring: rgba(93, 181, 175, .45);
  --on-accent: #0A1A22;

  --green: #6BD49A;  --green-soft: rgba(107, 212, 154, .13);
  --yellow: #F2C94C; --yellow-soft: rgba(242, 201, 76, .13); --yellow-bar: #F2C94C;
  --orange: #F5A05E; --orange-soft: rgba(245, 160, 94, .14); --orange-bar: #F08A3E;
  --red: #FF8A80;    --red-soft: rgba(255, 110, 100, .15);   --red-bar: #F0564C;

  --header-bg: linear-gradient(120deg, #080E1A 0%, #111F36 55%, #173A44 100%);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 6px 18px rgba(0, 0, 0, .28), 0 2px 4px rgba(0, 0, 0, .2);
  --shadow-lg: 0 18px 40px rgba(0, 0, 0, .4);
  --focus: #7DB8FF;
  color-scheme: dark;
}

/* ---------------- Textstorlek A / A+ / A++ ---------------- */
html { font-size: 106.25%; }                 /* 17px */
html[data-size="2"] { font-size: 125%; }     /* 20px */
html[data-size="3"] { font-size: 150%; }     /* 24px */

/* ---------------- Grund ---------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h, 6rem) + 1rem); }
body {
  margin: 0;
  font-family: var(--font);
  line-height: 1.55;
  color: var(--text);
  background: var(--bg-grad), var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 5.5rem;
}
h1, h2, h3, h4 { color: var(--text-strong); line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); font-weight: 800; }
h2 { font-size: 1.35rem; font-weight: 750; }
h3 { font-size: 1.12rem; font-weight: 700; }
p { margin: 0 0 .75rem; }
a { color: var(--accent); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.center { text-align: center; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

:focus { outline: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 8px; }
main:focus, [data-view-focus]:focus { outline: none; }
body.kbd [data-view-focus]:focus-visible { outline: 3px solid var(--focus); }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--surface); color: var(--text-strong); padding: .75rem 1rem; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); font-weight: 700; text-decoration: none; transition: top .2s;
}
.skip-link:focus { top: 1rem; }

.container { width: 100%; max-width: 76rem; margin: 0 auto; padding: 0 1rem; }
.container.narrow { max-width: 50rem; }
@media (min-width: 48em) { .container { padding: 0 1.5rem; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

/* ---------------- Knappar ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3rem; padding: .65rem 1.15rem;
  border-radius: var(--radius-sm); border: 2px solid transparent;
  font-weight: 650; line-height: 1.2; text-decoration: none; text-align: center;
  transition: background .2s, border-color .2s, transform .15s var(--ease), box-shadow .2s, color .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 4px 12px var(--accent-ring); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-soft { background: var(--accent-soft); color: var(--text-strong); border-color: transparent; }
.btn-soft:hover { border-color: var(--accent); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--text-strong); }
.btn-text { background: none; border: none; color: var(--accent); padding: .5rem .6rem; min-height: 2.75rem; font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }
.btn-text:hover { color: var(--accent-strong); }
.btn-danger { background: var(--red); color: #fff; }
html[data-theme="dark"] .btn-danger { background: #C7372E; }
.btn-danger:hover { filter: brightness(1.08); }
.btn-danger-soft { background: var(--red-soft); color: var(--red); border-color: transparent; }
.btn-danger-soft:hover { border-color: var(--red); }
.btn-lg { min-height: 3.4rem; padding: .8rem 1.4rem; font-size: 1.05rem; }
.btn-sm { min-height: 2.75rem; padding: .45rem .85rem; font-size: .92rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.btn-icon {
  display: inline-grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%;
  border: 2px solid var(--border); background: var(--surface); color: var(--text-strong); font-size: 1.1rem;
}
.btn-icon:hover { border-color: var(--accent); }
.danger-text { color: var(--red); }

/* ---------------- Header ---------------- */
.site-header { position: sticky; top: 0; z-index: 40; }
.header-inner {
  background: var(--header-bg); color: var(--header-text);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem max(1rem, calc((100vw - 76rem) / 2 + 1.5rem));
  box-shadow: 0 4px 20px rgba(0, 0, 0, .15);
}
.brand {
  display: flex; align-items: center; gap: .75rem; background: none; border: none; color: inherit; padding: .25rem; text-align: left; border-radius: 12px;
}
.brand-icon {
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 14px; font-size: 1.5rem;
  background: linear-gradient(145deg, rgba(255,255,255,.18), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2);
}
.brand-text { display: flex; flex-direction: column; }
.brand-title { font-weight: 800; font-size: 1.2rem; letter-spacing: -.01em; }
.brand-tagline { font-size: .85rem; opacity: .8; }
.header-actions { display: flex; gap: .5rem; align-items: center; }
.btn-header {
  color: #fff; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.22); min-height: 2.9rem;
}
.btn-header:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.4); }
.settings-toggle { display: none; }

.settings-bar { background: var(--surface); border-bottom: 1px solid var(--border-soft); box-shadow: var(--shadow-sm); }
.settings-inner {
  max-width: 76rem; margin: 0 auto; padding: .5rem 1.5rem;
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: center; justify-content: flex-end;
}
.setting { display: flex; align-items: center; gap: .5rem; }
.setting-label { font-size: .85rem; font-weight: 650; color: var(--muted); }
.segmented { display: inline-flex; background: var(--surface-3); border-radius: 12px; padding: 3px; gap: 2px; }
.segmented button {
  min-height: 2.6rem; min-width: 2.6rem; padding: .3rem .7rem; border: none; border-radius: 9px; background: transparent;
  color: var(--text); font-weight: 600; font-size: .9rem; display: inline-flex; align-items: center; gap: .3rem; justify-content: center;
  transition: background .2s, color .2s, box-shadow .2s;
}
.segmented button:hover { color: var(--text-strong); }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--text-strong); box-shadow: var(--shadow-sm); }
html[data-theme="dark"] .segmented button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.sz { font-weight: 800; line-height: 1; }
.sz1 { font-size: .85rem; } .sz2 { font-size: 1rem; } .sz3 { font-size: 1.15rem; }

@media (max-width: 56em) {
  .settings-toggle { display: inline-flex; }
  .settings-bar { display: none; }
  body.settings-open .settings-bar { display: block; animation: slideDown .25s var(--ease); }
  .settings-inner { justify-content: flex-start; padding: .75rem 1rem; }
  .setting { width: 100%; justify-content: space-between; }
}
@media (max-width: 38em) {
  .brand-tagline { display: none; }
  .back-main span:last-child, .settings-toggle-label { display: none; }
  .btn-header { min-width: 3rem; padding: .5rem .8rem; }
  .header-inner { padding: .6rem 1rem; }
  .brand-title { font-size: 1.1rem; }
}

/* ---------------- Vyer ---------------- */
main { display: block; padding-top: 1.25rem; }
.view { display: none; }
.view.is-active { display: block; animation: viewIn .45s var(--ease); }

/* ---------------- Hero ---------------- */
.hero { position: relative; overflow: hidden; padding: clamp(1.5rem, 1rem + 2.5vw, 2.75rem); display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 62em) { .hero { grid-template-columns: 1.5fr .7fr; align-items: center; } }
.hero-glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 300px at 100% 0%, rgba(48, 112, 112, .14), transparent 70%),
    linear-gradient(180deg, rgba(48, 79, 112, .04), transparent 40%);
}
.hero-content { position: relative; }
.status-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.status-pill {
  display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .75rem; border-radius: 999px;
  background: var(--green-soft); color: var(--green); font-size: .82rem; font-weight: 700;
}
.status-pill-quiet { background: var(--surface-3); color: var(--muted); }
.status-dot { width: .55rem; height: .55rem; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 currentColor; animation: pulseDot 2.4s infinite; }
.eyebrow { font-size: .85rem; letter-spacing: .14em; font-weight: 800; color: var(--accent); margin-bottom: .35rem; text-transform: uppercase; }
.hero-title { margin-bottom: .5rem; }
.hero-lead { font-size: 1.15rem; max-width: 40rem; color: var(--text); }

.freetext { margin: 1.25rem 0 1rem; padding: 1rem; background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: var(--radius); }
.freetext-label { display: block; font-weight: 700; margin-bottom: .5rem; color: var(--text-strong); }
.freetext-row { display: flex; gap: .6rem; flex-wrap: wrap; }
.freetext-row textarea { flex: 1 1 18rem; }
.freetext-row .btn { flex: 0 0 auto; }
.freetext-hint { margin: .5rem 0 0; font-size: .85rem; color: var(--muted); }
textarea, input[type="text"], input[type="search"], input[type="tel"] {
  width: 100%; min-height: 3.2rem; padding: .75rem 1rem; border-radius: var(--radius-sm);
  border: 2px solid var(--border); background: var(--surface); color: var(--text-strong);
  transition: border-color .2s, box-shadow .2s; resize: vertical;
}
textarea::placeholder, input::placeholder { color: var(--muted); opacity: .9; }
textarea:focus, input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); outline: none; }

.hero-actions { display: grid; gap: .75rem; grid-template-columns: 1fr; }
@media (min-width: 40em) { .hero-actions { grid-template-columns: 1fr 1fr; } }
.big-action {
  display: flex; align-items: center; gap: .9rem; text-align: left; padding: 1rem 1.1rem; min-height: 4.5rem;
  border-radius: var(--radius); border: 2px solid var(--border-soft); background: var(--surface); color: var(--text-strong);
  box-shadow: var(--shadow-sm); transition: transform .2s var(--ease), box-shadow .2s, border-color .2s;
}
.big-action:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--accent); }
.big-action-icon { display: grid; place-items: center; width: 3rem; height: 3rem; flex: 0 0 3rem; border-radius: 14px; font-size: 1.5rem; background: var(--accent-soft); }
.big-action-text { flex: 1; display: flex; flex-direction: column; gap: .1rem; }
.big-action-text strong { font-size: 1.05rem; }
.big-action-text small { color: var(--muted); font-size: .88rem; }
.big-action-arrow { font-size: 1.3rem; color: var(--accent); transition: transform .2s; }
.big-action:hover .big-action-arrow { transform: translateX(3px); }
.big-action-primary { background: linear-gradient(135deg, var(--dark-blue), var(--teal)); color: #fff; border-color: transparent; }
.big-action-primary .big-action-text small { color: rgba(255,255,255,.85); }
.big-action-primary .big-action-icon { background: rgba(255,255,255,.16); }
.big-action-primary .big-action-arrow { color: #fff; }
.big-action-primary:hover { border-color: transparent; box-shadow: var(--shadow-lg); }
.big-action-calm .big-action-icon { background: var(--green-soft); }

.hero-visual { position: relative; display: none; place-items: center; min-height: 15rem; }
@media (min-width: 62em) { .hero-visual { display: grid; } }
.shield {
  position: relative; z-index: 2; width: 8rem; height: 8rem; border-radius: 2.2rem; display: grid; place-items: center; font-size: 4rem;
  background: linear-gradient(145deg, var(--surface), var(--surface-2)); border: 1px solid var(--border-soft); box-shadow: var(--shadow-lg);
  animation: floaty 6s ease-in-out infinite;
}
.radar { position: absolute; inset: 0; display: grid; place-items: center; }
.radar span { position: absolute; width: 9rem; height: 9rem; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; animation: radar 4.5s var(--ease) infinite; }
.radar span:nth-child(2) { animation-delay: 1.5s; }
.radar span:nth-child(3) { animation-delay: 3s; }
.bot-peek {
  position: absolute; z-index: 3; right: 12%; bottom: 14%; width: 3.4rem; height: 3.4rem; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.8rem; background: var(--surface); border: 1px solid var(--border-soft); box-shadow: var(--shadow);
  animation: floaty 6s ease-in-out infinite reverse;
}

/* ---------------- Fortsätt-banner ---------------- */
.resume { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1rem 1.25rem; margin-top: 1rem; border-left: 5px solid var(--accent); animation: viewIn .4s var(--ease); }
.resume-icon { font-size: 1.8rem; }
.resume-text { flex: 1 1 14rem; display: flex; flex-direction: column; }
.resume-text span { color: var(--muted); }
.resume-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ---------------- Sektioner ---------------- */
.section { margin-top: 2.5rem; }
.section-head { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; justify-content: space-between; margin-bottom: 1rem; }
.section-head p { margin: 0; }
.search { position: relative; flex: 0 1 22rem; width: 100%; }
.search input { padding-left: 2.8rem; }
.search-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); pointer-events: none; }

/* ---------------- Situationskort ---------------- */
.sit-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.sit-card {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; text-align: left;
  padding: 1.15rem 1.2rem 1rem; min-height: 11rem; border-radius: 22px; border: 1px solid var(--border-soft);
  background: linear-gradient(180deg, var(--surface), var(--surface-2)); color: var(--text); box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
  animation: cardIn .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 35ms);
}
.sit-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(135deg, var(--accent-soft), transparent 55%); opacity: 0; transition: opacity .25s;
}
.sit-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.sit-card:hover::after { opacity: 1; }
.sit-card:active { transform: translateY(-1px) scale(.99); }
.sit-icon {
  display: grid; place-items: center; width: 3.1rem; height: 3.1rem; border-radius: 15px; font-size: 1.6rem; margin-bottom: .35rem;
  background: var(--surface); border: 1px solid var(--border-soft); box-shadow: var(--shadow-sm); position: relative; z-index: 1;
}
.sit-title { font-weight: 750; font-size: 1.05rem; color: var(--text-strong); line-height: 1.3; position: relative; z-index: 1; }
.sit-desc { font-size: .9rem; color: var(--muted); position: relative; z-index: 1; }
.sit-cta { margin-top: auto; padding-top: .5rem; font-weight: 700; color: var(--accent); font-size: .92rem; position: relative; z-index: 1; }
.sit-cta span { display: inline-block; transition: transform .2s; }
.sit-card:hover .sit-cta span { transform: translateX(4px); }
#showMoreBtn { margin-top: 1.25rem; }
.empty { color: var(--muted); padding: 1rem 0; }

/* ---------------- Verktyg ---------------- */
.tool-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13.5rem), 1fr)); }
.tool {
  display: flex; flex-direction: column; gap: .3rem; text-align: left; padding: 1.2rem; min-height: 9.5rem; border-radius: 22px;
  border: 1px solid var(--border-soft); background: var(--surface); color: var(--muted); box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s, border-color .25s; font-size: .92rem;
}
.tool strong { color: var(--text-strong); font-size: 1.05rem; }
.tool:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--accent); }
.tool-icon { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 14px; font-size: 1.5rem; background: var(--accent-soft); margin-bottom: .3rem; }
.tool-security .tool-icon { background: rgba(48, 79, 112, .12); }
.tool-calm .tool-icon { background: var(--green-soft); }
.tool-emergency { border-color: color-mix(in srgb, var(--red) 30%, var(--border-soft)); }
.tool-emergency .tool-icon { background: var(--red-soft); }
.tool-emergency:hover { border-color: var(--red); }
.tool-meta { margin-top: auto; font-size: .82rem; color: var(--accent); font-weight: 650; }

/* ---------------- Infokort ---------------- */
.info-grid { display: grid; gap: 1rem; margin-top: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 52em) { .info-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 76em) { .info-grid { grid-template-columns: repeat(3, 1fr); } }
.info-card { padding: 1.4rem; }
.info-card h2 { font-size: 1.15rem; }
.info-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.info-head h2 { margin: 0; }
.contact-row { display: flex; align-items: center; gap: .75rem; padding: .75rem 0; border-bottom: 1px solid var(--border-soft); flex-wrap: wrap; }
.contact-ic { font-size: 1.4rem; width: 2.6rem; height: 2.6rem; display: grid; place-items: center; background: var(--surface-2); border-radius: 12px; }
.contact-text { flex: 1 1 8rem; display: flex; flex-direction: column; min-width: 0; }
.contact-text small { color: var(--muted); font-size: .8rem; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; }
.contact-text strong { overflow-wrap: anywhere; }
.btn-call { min-height: 2.9rem; }
#contactsBox .btn-block { margin-top: 1rem; }
.warning-note { background: var(--yellow-soft); color: var(--text-strong); border-radius: var(--radius-xs); padding: .6rem .8rem; font-size: .88rem; margin-top: .75rem; }
.history-list { list-style: none; margin: .75rem 0 0; padding: 0; display: grid; gap: .5rem; }
.history-list .empty { padding: .5rem 0; }
.history-item {
  width: 100%; display: flex; align-items: center; gap: .75rem; text-align: left; padding: .65rem .75rem; min-height: 3.4rem;
  border-radius: var(--radius-sm); border: 1px solid var(--border-soft); background: var(--surface-2); color: var(--text);
  transition: border-color .2s, transform .2s;
}
.history-item:hover { border-color: var(--accent); transform: translateX(2px); }
.history-ic { font-size: 1.4rem; }
.history-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.history-text strong { font-size: .95rem; color: var(--text-strong); }
.history-text small { color: var(--muted); }
.badge-done { font-size: .78rem; font-weight: 700; color: var(--green); background: var(--green-soft); padding: .2rem .55rem; border-radius: 999px; white-space: nowrap; }
.areas-title { margin: 1rem 0 .4rem; font-size: .85rem; font-weight: 700; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { font-size: .82rem; padding: .3rem .65rem; border-radius: 999px; background: var(--accent-soft); color: var(--text-strong); font-weight: 600; }
.rules-list { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .7rem; }
.rules-list li { display: flex; gap: .7rem; align-items: flex-start; font-size: .95rem; }
.rules-list li span:first-child { font-size: 1.25rem; line-height: 1.3; }

.privacy { display: flex; gap: 1rem; align-items: flex-start; padding: 1.4rem; margin-top: 1rem;
  background: linear-gradient(135deg, var(--accent-soft), var(--surface)); }
.privacy-icon { font-size: 2rem; }
.privacy h2 { font-size: 1.1rem; }
.privacy p { margin: 0; }

/* ---------------- Footer ---------------- */
.site-footer { margin-top: 3rem; padding: 2rem 0 1rem; border-top: 1px solid var(--border-soft); font-size: .9rem; }
.footer-inner p { margin-bottom: .4rem; }

/* ---------------- Flytande akutknapp ---------------- */
.fab-emergency {
  position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 45;
  display: inline-flex; align-items: center; gap: .5rem; min-height: 3.4rem; padding: .7rem 1.2rem;
  border-radius: 999px; border: 2px solid color-mix(in srgb, var(--red) 40%, transparent);
  background: var(--surface); color: var(--red); font-weight: 750; box-shadow: var(--shadow-lg);
  transition: transform .2s var(--ease), background .2s, color .2s;
}
.fab-emergency:hover { background: var(--red); color: #fff; transform: translateY(-2px); }
body[data-view="chat"] .fab-emergency { display: none; }
@media (max-width: 38em) { .fab-emergency { left: 1rem; right: 1rem; justify-content: center; } }

/* ---------------- Chatt ---------------- */
.chat-layout { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 62em) { .chat-layout { grid-template-columns: minmax(0, 1fr) 19rem; } }
.chat-panel { padding: 0; overflow: visible; display: flex; flex-direction: column; min-height: 70vh; min-width: 0; }
.chat-head {
  position: sticky; top: calc(var(--header-h, 4.6rem) - 1px); z-index: 10;
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; padding: .75rem 1rem;
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.chat-back { min-height: 2.9rem; }
.bot-id { display: flex; align-items: center; gap: .65rem; flex: 1 1 12rem; min-width: 0; }
.bot-avatar {
  position: relative; width: 2.8rem; height: 2.8rem; flex: 0 0 2.8rem; border-radius: 50%; display: grid; place-items: center; font-size: 1.5rem;
  background: linear-gradient(145deg, var(--accent-soft), var(--surface-2)); border: 1px solid var(--border-soft);
}
.bot-online { position: absolute; right: 0; bottom: 0; width: .75rem; height: .75rem; border-radius: 50%; background: #3BB273; border: 2px solid var(--surface); }
.bot-id-text { display: flex; flex-direction: column; min-width: 0; }
.bot-id-text strong { color: var(--text-strong); }
.bot-topic { font-size: .88rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step-pill { font-size: .8rem; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: .25rem .7rem; border-radius: 999px; }

.risk-compact { display: flex; align-items: center; gap: .75rem; padding: .6rem 1rem; border-bottom: 1px solid var(--border-soft); background: var(--surface-2); }
.risk-compact .risk-bar { flex: 0 0 8rem; }
.risk-compact .risk-label { font-weight: 700; font-size: .9rem; color: var(--text-strong); }
@media (min-width: 62em) { .risk-compact { display: none; } }

.chat-log { padding: 1.25rem 1rem .5rem; display: flex; flex-direction: column; gap: .15rem; }
@media (min-width: 48em) { .chat-log { padding: 1.5rem 1.5rem .5rem; } }
.msg { display: flex; gap: .6rem; align-items: flex-end; margin: .35rem 0; animation: msgIn .4s var(--ease) both; }
.msg .avatar {
  width: 2.3rem; height: 2.3rem; flex: 0 0 2.3rem; border-radius: 50%; display: grid; place-items: center; font-size: 1.2rem;
  background: var(--accent-soft); border: 1px solid var(--border-soft);
}
.msg.cont .avatar { visibility: hidden; }
.msg.cont { margin-top: 0; }
.bubble { max-width: min(38rem, 88%); padding: .8rem 1rem .5rem; border-radius: 6px 20px 20px 20px; position: relative; font-size: 1.05rem; }
.msg.bot .bubble { background: var(--surface-2); border: 1px solid var(--border-soft); color: var(--text-strong); box-shadow: var(--shadow-sm); }
.msg.bot.cont .bubble { border-radius: 20px; }
.msg.user { justify-content: flex-end; }
.msg.user .bubble { background: linear-gradient(135deg, var(--blue), var(--teal)); color: #fff; border-radius: 20px 6px 20px 20px; box-shadow: var(--shadow-sm); white-space: pre-wrap; overflow-wrap: anywhere; }
.typed { margin: 0; white-space: pre-line; }
.typed.is-typing::after { content: ""; display: inline-block; width: .5em; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--accent); border-radius: 2px; animation: caret 1s steps(2) infinite; }
.meta { display: flex; align-items: center; justify-content: flex-end; gap: .4rem; margin-top: .2rem; font-size: .72rem; opacity: .7; }
.msg.user .meta { color: rgba(255,255,255,.9); }
.speak-btn { border: none; background: transparent; font-size: 1rem; min-width: 2.75rem; min-height: 2.75rem; margin: -.6rem -.6rem -.6rem 0; border-radius: 50%; opacity: .8; }
.speak-btn:hover, .speak-btn.speaking { opacity: 1; background: var(--accent-soft); }
.speak-btn.speaking { animation: pulseDot 1.2s infinite; }

.sys-chip { align-self: center; margin: .75rem 0 .35rem; font-size: .85rem; padding: .35rem .85rem; border-radius: 999px; background: var(--surface-3); color: var(--text-strong); animation: msgIn .4s var(--ease) both; text-align: center; }

.urgent-banner {
  display: flex; flex-direction: column; gap: .2rem; margin: .6rem 0 .4rem 2.9rem; padding: .85rem 1rem; border-radius: 16px;
  background: var(--orange-soft); border: 2px solid color-mix(in srgb, var(--orange-bar) 55%, transparent); color: var(--text-strong);
  animation: msgIn .4s var(--ease) both;
}
.urgent-banner strong { color: var(--text-strong); font-size: 1.08rem; }
.info-bubble {
  margin: .4rem 0 .4rem 2.9rem; max-width: min(38rem, 88%); padding: 1rem; border-radius: 18px;
  background: var(--surface); border: 2px solid var(--accent); box-shadow: var(--shadow); animation: msgIn .4s var(--ease) both;
}
.info-bubble-head { display: flex; gap: .5rem; align-items: center; margin-bottom: .4rem; color: var(--text-strong); }
.info-bubble p { font-size: .95rem; }
@media (max-width: 38em) {
  .urgent-banner, .info-bubble, .breathe, .end-card { margin-left: 0; }
  .bubble { max-width: 100%; }
  .msg .avatar { width: 2rem; height: 2rem; flex-basis: 2rem; font-size: 1rem; }
}

.typing { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .6rem; padding: .25rem 1rem .5rem 1rem; color: var(--muted); font-size: .9rem; }

@media (min-width: 48em) { .typing { padding-left: 1.5rem; } }
.typing-avatar { width: 2.3rem; height: 2.3rem; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); }
.typing-text { display: inline-flex; align-items: center; gap: .4rem; background: var(--surface-2); padding: .45rem .85rem; border-radius: 999px; border: 1px solid var(--border-soft); }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: bounce 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@media (max-width: 38em) { .typing-avatar { display: none; } .typing-text { white-space: nowrap; } .typing .btn-sm { margin-left: auto; } }

.chat-options { display: grid; gap: .6rem; padding: .5rem 1rem 1rem; }
@media (min-width: 48em) { .chat-options { padding: .5rem 1.5rem 1rem 4.4rem; } }
.opt {
  display: flex; align-items: center; gap: .8rem; width: 100%; min-height: 3.4rem; padding: .7rem 1rem; text-align: left;
  border-radius: 16px; border: 2px solid var(--border); background: var(--surface); color: var(--text-strong); font-weight: 650; font-size: 1.02rem;
  box-shadow: var(--shadow-sm); transition: transform .2s var(--ease), border-color .2s, background .2s, box-shadow .2s;
}
.chat-options .opt { opacity: 0; transform: translateY(8px); }
.chat-options.show .opt { animation: optIn .35s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
.opt:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateX(3px); }
.chat-options.show .opt:hover { transform: translateX(3px); }
.opt:active { transform: scale(.99); }
.opt-num {
  display: grid; place-items: center; flex: 0 0 2rem; width: 2rem; height: 2rem; border-radius: 10px; font-size: .85rem; font-weight: 800;
  background: var(--surface-3); color: var(--muted);
}
.opt-label { flex: 1; }
.opt-arrow { color: var(--accent); font-weight: 800; opacity: .7; transition: transform .2s, opacity .2s; }
.opt:hover .opt-arrow { opacity: 1; transform: translateX(3px); }
.opt-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.opt-primary .opt-num { background: rgba(255,255,255,.2); color: inherit; }
.opt-primary .opt-arrow { color: inherit; }
.opt-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.input-hint { margin: 0 0 .25rem; color: var(--accent); font-weight: 650; }
.kbd-hint { font-size: .8rem; padding: 0 1.5rem .5rem 4.4rem; margin: 0; }
@media (max-width: 47.99em) { .kbd-hint { display: none; } }

.chat-input {
  position: sticky; bottom: 0; z-index: 5; display: flex; gap: .5rem; padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-soft); border-radius: 0 0 var(--radius-lg) var(--radius-lg); margin-top: auto;
}
.chat-input input { flex: 1; min-width: 0; }
.chat-input.pulse { animation: inputPulse 1.4s var(--ease) 2; }

/* Sidopanel */
.chat-side { display: none; gap: 1rem; position: sticky; top: calc(var(--header-h, 9rem) + 1rem); }
@media (min-width: 62em) { .chat-side { display: grid; } }
.risk-full { padding: 1.2rem; }
.risk-title { font-size: 1rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.risk-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: .5rem 0 .75rem; }
.risk-bar span { height: .65rem; border-radius: 999px; background: var(--surface-3); transition: background .5s var(--ease), transform .5s var(--ease); }
.risk[data-level="green"] .risk-bar span[data-l="green"],
.risk[data-level="yellow"] .risk-bar span[data-l="green"], .risk[data-level="yellow"] .risk-bar span[data-l="yellow"],
.risk[data-level="orange"] .risk-bar span:not([data-l="red"]),
.risk[data-level="red"] .risk-bar span { transform: scaleY(1.15); }
.risk[data-level="green"] .risk-bar span[data-l="green"] { background: var(--green); }
.risk[data-level="yellow"] .risk-bar span[data-l="green"], .risk[data-level="yellow"] .risk-bar span[data-l="yellow"] { background: var(--yellow-bar); }
.risk[data-level="orange"] .risk-bar span:not([data-l="red"]) { background: var(--orange-bar); }
.risk[data-level="red"] .risk-bar span { background: var(--red-bar); }
.risk-full .risk-label { font-size: 1.3rem; font-weight: 800; color: var(--text-strong); margin-bottom: .1rem; }
.risk-sub { font-size: .85rem; font-weight: 700; color: var(--muted); margin-bottom: .5rem; }
.risk-desc { font-size: .92rem; margin: 0; }
.risk-full[data-level="red"] { border-color: color-mix(in srgb, var(--red) 45%, var(--border-soft)); background: linear-gradient(180deg, var(--red-soft), var(--surface) 70%); }
.risk-full[data-level="orange"] { background: linear-gradient(180deg, var(--orange-soft), var(--surface) 70%); }
.risk-full[data-level="yellow"] { background: linear-gradient(180deg, var(--yellow-soft), var(--surface) 70%); }
.risk-full[data-level="green"] { background: linear-gradient(180deg, var(--green-soft), var(--surface) 70%); }
.side-actions { padding: 1.2rem; display: grid; gap: .6rem; }
.side-actions h2 { font-size: 1rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: .2rem; }

/* Andningsövning */
.breathe { margin: .5rem 0 .5rem 2.9rem; display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: 1.5rem; border-radius: 20px; background: var(--green-soft); animation: msgIn .4s var(--ease) both; }
.breathe-circle {
  width: 8rem; height: 8rem; border-radius: 50%; display: grid; place-items: center; text-align: center; padding: .5rem;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.6), transparent 60%), linear-gradient(145deg, var(--accent), var(--blue));
  color: #fff; font-weight: 750; box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent) 18%, transparent);
  transform: scale(.75); transition: transform 4s ease-in-out;
}
.breathe-circle.grow { transform: scale(1.1); transition-duration: 4s; }
.breathe-circle.hold { transform: scale(1.1); }
.breathe-circle.shrink { transform: scale(.75); transition-duration: 5s; }
.breathe-text { font-size: .95rem; }

/* Sammanfattning */
.end-card {
  margin: .75rem 0 .5rem 2.9rem; padding: 1.25rem; border-radius: 22px; background: var(--surface); border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-lg); animation: msgIn .5s var(--ease) both; border-top: 6px solid var(--accent);
}
.end-card[data-level="green"] { border-top-color: var(--green); }
.end-card[data-level="yellow"] { border-top-color: var(--yellow-bar); }
.end-card[data-level="orange"] { border-top-color: var(--orange-bar); }
.end-card[data-level="red"] { border-top-color: var(--red-bar); }
.end-head { display: flex; gap: .8rem; align-items: center; margin-bottom: .75rem; }
.end-head h3 { margin: 0; font-size: 1.25rem; }
.end-level { margin: 0; font-size: .9rem; color: var(--muted); font-weight: 650; }
.end-badge { width: 2.6rem; height: 2.6rem; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green); font-weight: 900; font-size: 1.2rem; }
.end-sec { padding: .85rem 0; border-top: 1px solid var(--border-soft); }
.end-sec h4 { font-size: 1rem; margin-bottom: .45rem; }
.end-sec p { margin: 0; }
.end-dont ul { margin: 0; padding-left: 1.2rem; }
.end-dont li { margin: .3rem 0; }
.end-dont li::marker { color: var(--red); content: "✕  "; font-weight: 800; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.checklist button {
  width: 100%; display: flex; align-items: flex-start; gap: .75rem; text-align: left; padding: .7rem .8rem; min-height: 3.2rem;
  border-radius: 14px; border: 2px solid var(--border-soft); background: var(--surface-2); color: var(--text-strong); transition: border-color .2s, background .2s;
}
.checklist button:hover { border-color: var(--accent); }
.ck-box { flex: 0 0 1.7rem; width: 1.7rem; height: 1.7rem; border-radius: 8px; border: 2px solid var(--border); background: var(--surface); display: grid; place-items: center; transition: background .25s, border-color .25s; margin-top: .05rem; }
.ck-box svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset .35s var(--ease) .05s; }
.checklist li.done button { background: var(--green-soft); border-color: transparent; }
.checklist li.done .ck-box { background: var(--green); border-color: var(--green); }
.checklist li.done .ck-box svg { stroke-dashoffset: 0; }
html[data-theme="dark"] .checklist li.done .ck-box svg { stroke: #0B1A22; }
.checklist li.done .ck-text { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: color-mix(in srgb, var(--green) 60%, transparent); }
.checklist li.pop { animation: pop .35s var(--ease); }
.ck-progress { margin: .6rem 0 0; font-size: .88rem; font-weight: 700; color: var(--muted); }
.ck-progress.all-done { color: var(--green); }
.end-tools { display: flex; flex-wrap: wrap; gap: .5rem; padding-top: .9rem; border-top: 1px solid var(--border-soft); }
/* Lugnt läge: visa bara nästa steg i checklistan */
body.calm .checklist li.pending ~ li.pending { display: none; }
body.calm .msg.bot .bubble { font-size: 1.12rem; }

/* ---------------- Verktygssidor ---------------- */
.tool-card { padding: clamp(1.25rem, 1rem + 1.5vw, 2rem); margin-top: 1rem; }
.tool-card-head { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.25rem; }
.tool-card-head h1 { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.3rem); }
.tool-card-icon { display: grid; place-items: center; width: 3.6rem; height: 3.6rem; flex: 0 0 3.6rem; border-radius: 18px; font-size: 1.9rem; background: var(--accent-soft); }
.field-label { display: block; font-weight: 700; margin: .75rem 0 .4rem; color: var(--text-strong); }
.form-error { color: var(--red); font-weight: 650; margin-top: .75rem; }

.scam-result.reveal > * { animation: viewIn .5s var(--ease) both; }
.verdict { margin-top: 1.5rem; padding: 1.2rem; border-radius: 20px; border: 2px solid var(--border-soft); }
.verdict[data-level="green"] { background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 35%, transparent); }
.verdict[data-level="yellow"] { background: var(--yellow-soft); border-color: color-mix(in srgb, var(--yellow-bar) 50%, transparent); }
.verdict[data-level="orange"] { background: var(--orange-soft); border-color: color-mix(in srgb, var(--orange-bar) 50%, transparent); }
.verdict[data-level="red"] { background: var(--red-soft); border-color: color-mix(in srgb, var(--red-bar) 50%, transparent); }
.verdict-head { display: flex; gap: .9rem; align-items: flex-start; }
.verdict-icon { font-size: 2rem; line-height: 1; }
.verdict h2 { font-size: 1.3rem; margin-bottom: .3rem; }
.verdict p { margin: 0; }
.verdict-meter { margin-top: 1rem; height: .7rem; border-radius: 999px; background: color-mix(in srgb, var(--surface) 70%, transparent); overflow: hidden; }
.verdict-meter span { display: block; height: 100%; width: var(--w); border-radius: inherit; background: linear-gradient(90deg, var(--green), var(--yellow-bar), var(--orange-bar), var(--red-bar)); background-size: 32rem 100%; animation: growW 1s var(--ease) both; }
.sub-title { margin: 1.5rem 0 .75rem; font-size: 1.1rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.count-pill { font-size: .78rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; background: var(--surface-3); color: var(--muted); }
.signal-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.sig-item { display: flex; gap: .8rem; padding: .85rem 1rem; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border-soft); animation: optIn .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
.sig-item strong { color: var(--text-strong); }
.sig-item p { margin: .15rem 0 0; font-size: .93rem; }
.sig-words { color: var(--muted); font-size: .85rem !important; font-style: italic; overflow-wrap: anywhere; }
.sig-dot { flex: 0 0 .8rem; width: .8rem; height: .8rem; border-radius: 50%; margin-top: .4rem; background: var(--orange-bar); }
.sig-w1 .sig-dot { background: var(--yellow-bar); }
.sig-w2 .sig-dot { background: var(--orange-bar); }
.sig-w3 .sig-dot, .sig-w4 .sig-dot, .sig-w5 .sig-dot { background: var(--red-bar); }
.highlighted { padding: 1rem; border-radius: 16px; background: var(--surface-2); border: 1px dashed var(--border); white-space: pre-wrap; overflow-wrap: anywhere; font-size: .98rem; }
.highlighted mark { background: color-mix(in srgb, var(--orange-bar) 30%, transparent); color: inherit; border-radius: 4px; padding: 0 2px; box-shadow: inset 0 -2px 0 var(--orange-bar); }
.highlighted mark[class*="sig-link"], .highlighted mark.sig-oddLink { background: color-mix(in srgb, var(--red-bar) 22%, transparent); box-shadow: inset 0 -2px 0 var(--red-bar); }
.highlighted mark.sig-bankid, .highlighted mark.sig-code, .highlighted mark.sig-card, .highlighted mark.sig-safeAccount, .highlighted mark.sig-remote, .highlighted mark.sig-login { background: color-mix(in srgb, var(--red-bar) 22%, transparent); box-shadow: inset 0 -2px 0 var(--red-bar); }
.highlighted mark.sig-authority, .highlighted mark.sig-greeting, .highlighted mark.sig-channel { background: color-mix(in srgb, var(--yellow-bar) 30%, transparent); box-shadow: inset 0 -2px 0 var(--yellow-bar); }
.advice { margin-top: 1.5rem; padding: 1.2rem; border-radius: 18px; background: var(--accent-soft); }
.advice h3 { margin-bottom: .5rem; }
.advice ul { margin: 0; padding-left: 1.2rem; }
.advice li { margin: .3rem 0; }
.disclaimer { margin-top: 1rem; font-size: .88rem; color: var(--muted); }

/* Säkerhetskontroll */
.sec-progress { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.25rem; font-size: .9rem; font-weight: 700; color: var(--muted); }
.bar { height: .6rem; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar span { display: block; height: 100%; width: var(--w); background: linear-gradient(90deg, var(--teal), var(--accent)); border-radius: inherit; transition: width .5s var(--ease); }
.sec-q { display: flex; gap: 1rem; align-items: center; padding: 1.25rem; border-radius: 20px; background: var(--surface-2); border: 1px solid var(--border-soft); animation: viewIn .4s var(--ease); }
.sec-q-icon { font-size: 2.2rem; }
.sec-q-text { margin: 0; font-size: 1.3rem; }
.sec-answers { display: grid; gap: .6rem; margin: 1rem 0; grid-template-columns: 1fr; }
@media (min-width: 40em) { .sec-answers { grid-template-columns: repeat(3, 1fr); } }
.sec-answers .opt { justify-content: center; min-height: 3.8rem; font-size: 1.1rem; }
.sec-answers .opt-label { flex: 0 1 auto; }
.opt-yes:hover { border-color: var(--green); background: var(--green-soft); }
.opt-no:hover { border-color: var(--orange-bar); background: var(--orange-soft); }
.sec-result { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; padding: 1.25rem; border-radius: 20px; background: var(--surface-2); animation: viewIn .5s var(--ease); }
.sec-result h2 { font-size: 1.4rem; margin: 0; }
.ring { position: relative; width: 9rem; height: 9rem; flex: 0 0 9rem; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--surface-3); stroke-width: 12; }
.ring-fg { fill: none; stroke: var(--accent); stroke-width: 12; stroke-linecap: round; transition: stroke-dashoffset 1.1s var(--ease); }
.sec-result[data-level="green"] .ring-fg { stroke: var(--green); }
.sec-result[data-level="yellow"] .ring-fg { stroke: var(--yellow-bar); }
.sec-result[data-level="orange"] .ring-fg { stroke: var(--orange-bar); }
.sec-result[data-level="red"] .ring-fg { stroke: var(--red-bar); }
.ring-text { position: absolute; inset: 0; display: grid; place-items: center; grid-auto-flow: column; align-content: center; justify-content: center; gap: 2px; }
.ring-num { font-size: 2.3rem; font-weight: 850; color: var(--text-strong); }
.ring-pct { font-size: 1.1rem; font-weight: 700; color: var(--muted); align-self: center; }
.tip-list { margin: 0; padding: 0; list-style: none; display: grid; gap: .6rem; counter-reset: tip; }
.tip-list li { display: flex; gap: .8rem; align-items: flex-start; padding: .9rem 1rem; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border-soft); animation: optIn .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms); }
.tip-ic { font-size: 1.5rem; }
.all-good { margin-top: 1rem; padding: 1rem; border-radius: 16px; background: var(--green-soft); font-weight: 700; color: var(--text-strong); }

/* ---------------- Dialoger ---------------- */
.dialog {
  width: min(36rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); padding: 0; border: none; border-radius: var(--radius-lg);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); overflow: auto;
}
.dialog[open] { animation: dialogIn .3s var(--ease); }
.dialog::backdrop { background: rgba(8, 14, 28, .55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.dialog-inner { padding: 1.5rem; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .75rem; }
.dialog-head h2 { margin: 0; font-size: 1.4rem; }
.dialog fieldset { border: 1px solid var(--border-soft); border-radius: var(--radius); padding: .75rem 1rem 1rem; margin: 1rem 0 0; }
.dialog legend { font-weight: 800; padding: 0 .4rem; color: var(--text-strong); }
.hint { font-size: .85rem; color: var(--muted); margin: .5rem 0 0; }
.dialog-emergency { border-top: 6px solid var(--red-bar); }
.em-lead { font-size: 1.05rem; color: var(--text-strong); }
.em-steps { list-style: none; counter-reset: em; padding: 0; margin: 1rem 0; display: grid; gap: .5rem; }
.em-steps li { counter-increment: em; display: flex; align-items: center; gap: .75rem; padding: .7rem .85rem; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border-soft); font-weight: 600; color: var(--text-strong); }
.em-steps li::before { content: counter(em); flex: 0 0 1.9rem; height: 1.9rem; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: .9rem; }
.em-ic { font-size: 1.2rem; }
.em-actions { display: grid; gap: .6rem; }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed; left: 50%; bottom: 6rem; z-index: 60; transform: translate(-50%, 20px); opacity: 0;
  background: var(--text-strong); color: var(--surface); padding: .8rem 1.2rem; border-radius: 999px; font-weight: 650; box-shadow: var(--shadow-lg);
  transition: opacity .3s, transform .3s var(--ease); max-width: calc(100vw - 2rem); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- Animationer ---------------- */
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes optIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes dialogIn { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes caret { 50% { opacity: 0; } }
@keyframes pulseDot { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 50%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes radar { 0% { transform: scale(.7); opacity: .55; } 100% { transform: scale(1.9); opacity: 0; } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes softPulse { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--red) 15%, transparent); } }
@keyframes inputPulse { 0%, 100% { box-shadow: none; } 50% { box-shadow: 0 -4px 0 0 var(--accent-ring) inset, 0 0 0 4px var(--accent-ring); } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.025); } 100% { transform: scale(1); } }
@keyframes growW { from { width: 0; } }

/* Animationer av – via inställningen eller systemets "minska rörelse" */
html[data-motion="off"] *, html[data-motion="off"] *::before, html[data-motion="off"] *::after {
  animation: none !important; transition: none !important; scroll-behavior: auto !important;
}
html[data-motion="off"] .chat-options .opt { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .radar span, .shield, .bot-peek, .status-dot { animation: none !important; }
}

/* ---------------- Utskrift av sammanfattning ---------------- */
@media print {
  body { background: #fff; color: #000; padding: 0; }
  .site-header, .site-footer, .fab-emergency, .chat-head, .risk-compact, .chat-options, .chat-input, .chat-side, .typing, .kbd-hint, .toast, dialog { display: none !important; }
  body.printing-summary main > section:not(#view-chat) { display: none !important; }
  body.printing-summary .chat-log > *:not(.print-target) { display: none !important; }
  body.printing-summary .print-target { margin: 0; box-shadow: none; border: 1px solid #999; }
  body.printing-summary .end-tools { display: none; }
  .card { box-shadow: none; border: none; }
  * { animation: none !important; }
}

/* ---------------- Små skärmar och stor text ---------------- */
.brand { min-width: 0; }
.brand-text { min-width: 0; }
.brand-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-actions { flex-shrink: 0; }
.chat-input { flex-wrap: wrap; }
.chat-input input { flex: 3 1 9rem; }
.chat-input .btn { flex: 1 0 auto; }
@media (max-width: 38em) {
  .msg .avatar { display: none; }
  .bubble { max-width: 92%; }
  .risk-compact { flex-wrap: wrap; gap: .4rem .75rem; }
  .risk-compact .risk-bar { flex: 0 0 5rem; margin: 0; }
  .chat-options { padding-left: .75rem; padding-right: .75rem; }
  .chat-log { padding-left: .75rem; padding-right: .75rem; }
  html[data-size="3"] .brand-icon { width: 2.3rem; height: 2.3rem; font-size: 1.2rem; }
  html[data-size="3"] .btn-header { min-width: 2.6rem; padding: .4rem .55rem; }
  html[data-size="3"] .header-inner { gap: .5rem; padding-left: .75rem; padding-right: .75rem; }
  html[data-size="3"] .chat-head { gap: .5rem; }
}


/* ==========================================================================
   NYTT: live-tolkning, kategorier, snabbval, ordlista, quiz, juridik
   ========================================================================== */
.live-preview { margin-top: .6rem; padding: .7rem .85rem; border-radius: var(--radius-sm); background: var(--surface); border: 1px dashed var(--accent); display: flex; flex-wrap: wrap; gap: .4rem .6rem; align-items: center; animation: viewIn .3s var(--ease); }
.lp-label { font-size: .9rem; color: var(--muted); font-weight: 600; }
.lp-go { border: none; background: var(--accent); color: var(--on-accent); font-weight: 700; padding: .45rem .85rem; border-radius: 999px; min-height: 2.75rem; }
.lp-go:hover { background: var(--accent-strong); }
.lp-concepts { display: flex; flex-wrap: wrap; gap: .35rem; width: 100%; }
.lp-c { font-size: .8rem; padding: .2rem .55rem; border-radius: 999px; background: var(--surface-3); color: var(--text-strong); font-weight: 600; }

.cat-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; }
.cat { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.9rem; padding: .45rem .9rem; border-radius: 999px; border: 2px solid var(--border-soft); background: var(--surface); color: var(--text-strong); font-weight: 650; transition: border-color .2s, background .2s, transform .15s var(--ease); }
.cat:hover { border-color: var(--accent); }
.cat[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.cat-n { font-size: .75rem; font-weight: 800; padding: .05rem .45rem; border-radius: 999px; background: var(--surface-3); color: var(--muted); }
.cat[aria-pressed="true"] .cat-n { background: rgba(255,255,255,.22); color: inherit; }
.tool-quiz .tool-icon { background: var(--yellow-soft); }

.chat-chips { display: flex; gap: .45rem; padding: .4rem 1rem .1rem; overflow-x: auto; scrollbar-width: thin; }
@media (min-width: 48em) { .chat-chips { padding-left: 1.5rem; padding-right: 1.5rem; flex-wrap: wrap; } }
.chip-btn { flex: 0 0 auto; min-height: 2.6rem; padding: .35rem .8rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-strong); font-size: .88rem; font-weight: 600; white-space: nowrap; transition: border-color .2s, background .2s; }
.chip-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.chip-danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 35%, var(--border)); }

.term { border: none; background: none; padding: 0; margin: 0; font: inherit; color: inherit; cursor: help; text-decoration: underline dotted; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; border-radius: 4px; }
.term:hover, .term[aria-expanded="true"] { background: var(--accent-soft); }
.term-explain { margin-top: .5rem; padding: .6rem .75rem; border-radius: 12px; background: var(--accent-soft); font-size: .95rem; border-left: 4px solid var(--accent); animation: msgIn .3s var(--ease) both; }
.term-hint { margin: .45rem 0 0; font-size: .82rem; color: var(--muted); }

.call-bubble { border-color: var(--border-soft); }
.call-list { display: grid; gap: .5rem; }
.call-btn { justify-content: flex-start; text-align: left; min-height: 3.4rem; }
.call-txt { display: flex; flex-direction: column; line-height: 1.3; }
.call-num { font-variant-numeric: tabular-nums; }
.call-txt small { font-weight: 500; font-size: .8rem; opacity: .85; }
.end-support { background: var(--accent-soft); border-radius: 14px; padding: .85rem 1rem; margin-top: .5rem; border-top: none; }
.end-support p { margin-bottom: .6rem; }

/* Quiz */
.phone-msg { max-width: 32rem; margin: 0 auto 1rem; padding: 1rem; border-radius: 28px; background: var(--surface-3); border: 1px solid var(--border-soft); }
.phone-from { font-size: .82rem; font-weight: 700; color: var(--muted); margin: 0 0 .5rem .4rem; }
.phone-bubble { background: var(--surface); border: 1px solid var(--border-soft); border-radius: 6px 20px 20px 20px; padding: .9rem 1rem; color: var(--text-strong); font-size: 1.05rem; box-shadow: var(--shadow-sm); white-space: pre-wrap; overflow-wrap: anywhere; animation: msgIn .4s var(--ease) both; }
.phone-bubble mark { background: color-mix(in srgb, var(--orange-bar) 30%, transparent); color: inherit; border-radius: 3px; padding: 0; }
.quiz-q { text-align: center; font-weight: 700; font-size: 1.15rem; color: var(--text-strong); margin: 1rem 0 .5rem; }
.quiz-answers { display: grid; gap: .6rem; grid-template-columns: 1fr 1fr; }
.quiz-answers .opt { justify-content: center; min-height: 4rem; font-size: 1.15rem; }
.quiz-answers .opt-label { flex: 0 1 auto; }
.opt-scam:hover { border-color: var(--red-bar); background: var(--red-soft); }
.opt-real:hover { border-color: var(--green); background: var(--green-soft); }
.quiz-feedback { padding: 1.1rem 1.2rem; border-radius: 18px; border: 2px solid var(--border-soft); animation: viewIn .4s var(--ease); }
.quiz-feedback[data-right="true"] { background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 40%, transparent); }
.quiz-feedback[data-right="false"] { background: var(--yellow-soft); border-color: color-mix(in srgb, var(--yellow-bar) 55%, transparent); }
.quiz-feedback h3 { margin-bottom: .4rem; }
.quiz-signs-title { font-weight: 700; margin: .75rem 0 .4rem; font-size: .92rem; }
.quiz-done { text-align: center; }
.quiz-done .advice { text-align: left; }
.quiz-done .btn-row { justify-content: center; }
.quiz-trophy { font-size: 3.5rem; animation: pop .6s var(--ease); }

/* Samtycke */
.consent {
  position: fixed; z-index: 55; left: 50%; bottom: max(1rem, env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(46rem, calc(100vw - 2rem)); padding: 1.1rem 1.2rem; display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center;
  box-shadow: var(--shadow-lg); border: 1px solid var(--border); animation: viewIn .4s var(--ease);
}
.consent h2 { font-size: 1.05rem; margin-bottom: .3rem; }
.consent p { margin: 0; font-size: .92rem; }
.consent-text { flex: 1 1 18rem; }
.consent-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
body:has(.consent:not([hidden])) .fab-emergency { bottom: calc(max(1rem, env(safe-area-inset-bottom)) + 11rem); }

/* Juridik */
.footer-links { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: .5rem 0 .75rem; }
.btn-link { border: none; background: none; color: var(--accent); font: inherit; font-weight: 600; padding: .4rem 0; min-height: 2.75rem; text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; gap: .35rem; }
.btn-link:hover { color: var(--accent-strong); }
.dialog-legal { width: min(44rem, calc(100vw - 2rem)); }
.legal-sec { padding: .75rem 0; border-top: 1px solid var(--border-soft); }
.legal-sec h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.legal-sec p { font-size: .97rem; }
.legal-sec ul { margin: 0; padding-left: 1.2rem; }
.legal-sec li { margin: .3rem 0; }
.storage-box { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; padding: 1rem; margin: .5rem 0 1rem; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border-soft); }
.storage-box p { margin: 0; flex: 1 1 14rem; }
.dialog-confirm { width: min(28rem, calc(100vw - 2rem)); }
.dialog-confirm h2 { font-size: 1.3rem; }
@media print { .consent, .chat-chips, .live-preview { display: none !important; } }

/* Chatta-knapp, vanliga frågor, noteringar */
.big-action-chat { grid-column: 1 / -1; background: linear-gradient(135deg, var(--teal), #3E8C86); color: #fff; border-color: transparent; }
.big-action-chat .big-action-text small { color: rgba(255,255,255,.88); }
.big-action-chat .big-action-icon { background: rgba(255,255,255,.18); }
.big-action-chat .big-action-arrow { color: #fff; }
.big-action-chat:hover { border-color: transparent; box-shadow: var(--shadow-lg); }
.faq-chips { display: flex; flex-wrap: wrap; gap: .55rem; }
.faq-chip { min-height: 3rem; padding: .55rem 1rem; border-radius: 999px; border: 1px solid var(--border-soft); background: var(--surface); color: var(--text-strong); font-weight: 600; text-align: left; box-shadow: var(--shadow-sm); transition: border-color .2s, transform .15s var(--ease), background .2s; }
.faq-chip:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.sys-note { background: var(--accent-soft); font-weight: 600; max-width: min(36rem, 92%); }

/* ==========================================================================
   TTKursrobot – animerad figur
   ========================================================================== */
.bot-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.bot-head { fill: var(--accent); }
.bot-ear { fill: color-mix(in srgb, var(--accent) 75%, #0B1A22); }
.bot-face { fill: #0E1D2C; }
.bot-eyes ellipse { fill: #7DF2E6; }
.bot-mouth, .bot-brow { fill: none; stroke: #7DF2E6; stroke-width: 2.6; stroke-linecap: round; }
.bot-ant { stroke: color-mix(in srgb, var(--accent) 70%, #0B1A22); stroke-width: 2.6; stroke-linecap: round; }
.bot-ant-dot { fill: var(--yellow-bar); }
.mood-concerned .bot-ant-dot { fill: var(--orange-bar); }
.mood-concerned .bot-eyes ellipse { fill: #FFD39A; }
.mood-concerned .bot-mouth, .mood-concerned .bot-brow { stroke: #FFD39A; }
.bot-svg.live .bot-eyes { transform-origin: 32px 31px; animation: botBlink 5s infinite; }
.bot-svg.live .bot-ant-dot { animation: botGlow 2.4s ease-in-out infinite; }
.bot-svg.thinking .bot-eyes { animation: botLook 1.6s ease-in-out infinite; }
.bot-avatar, .typing-avatar, .msg .avatar, .bot-peek { padding: 3px; }
.bot-avatar { background: linear-gradient(145deg, var(--accent-soft), var(--surface-2)); }
.bot-peek { width: 4.2rem; height: 4.2rem; padding: 6px; }
@keyframes botBlink { 0%, 90%, 100% { transform: scaleY(1); } 93% { transform: scaleY(.12); } 96% { transform: scaleY(1); } }
@keyframes botGlow { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes botLook { 0%, 100% { transform: translateX(0); } 30% { transform: translateX(-2.2px); } 70% { transform: translateX(2.2px); } }

/* ==========================================================================
   Samtalsskölden
   ========================================================================== */
.shield-cta {
  width: 100%; display: flex; align-items: center; gap: .9rem; text-align: left; margin: 0 0 .75rem; padding: 1rem 1.1rem; min-height: 4.5rem;
  border-radius: var(--radius); border: 2px solid color-mix(in srgb, var(--orange-bar) 55%, transparent);
  background: var(--orange-soft); color: var(--text-strong); box-shadow: var(--shadow-sm); transition: transform .2s var(--ease), box-shadow .2s;
}
.shield-cta:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.shield-cta small { color: var(--muted); font-size: .88rem; }
.shield-cta strong { font-size: 1.08rem; }
.shield-cta-icon { display: grid; place-items: center; width: 3rem; height: 3rem; flex: 0 0 3rem; border-radius: 50%; font-size: 1.4rem; background: var(--surface); box-shadow: 0 0 0 0 color-mix(in srgb, var(--orange-bar) 50%, transparent); animation: ring 2.2s infinite; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--orange-bar) 45%, transparent); } 70% { box-shadow: 0 0 0 12px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.shield-card { padding: clamp(1.25rem, 1rem + 1.5vw, 2rem); margin-top: 1rem; border-top: 6px solid var(--orange-bar); }
.shield-head { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1rem; }
.shield-head h1 { font-size: clamp(1.8rem, 1.3rem + 1.8vw, 2.4rem); margin-bottom: .3rem; }
.shield-lead { font-size: 1.12rem; color: var(--text-strong); margin: 0; }
.shield-live { position: relative; display: grid; place-items: center; width: 3.6rem; height: 3.6rem; flex: 0 0 3.6rem; border-radius: 50%; background: var(--orange-soft); font-size: 1.7rem; }
.shield-live span { position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--orange-bar); animation: radar 2s var(--ease) infinite; }
.shield-grid { display: grid; gap: .6rem; grid-template-columns: 1fr; margin: 1rem 0 1.25rem; }
@media (min-width: 40em) { .shield-grid { grid-template-columns: 1fr 1fr; } }
.shield-flag {
  display: flex; align-items: center; gap: .8rem; min-height: 4.2rem; padding: .8rem 1rem; text-align: left;
  border-radius: 18px; border: 2px solid var(--border); background: var(--surface); color: var(--text-strong); font-weight: 700; font-size: 1.05rem;
  box-shadow: var(--shadow-sm); transition: border-color .2s, background .2s, transform .15s var(--ease);
}
.shield-flag:hover { border-color: var(--red-bar); background: var(--red-soft); }
.shield-flag:active { transform: scale(.98); }
.shield-flag-ic { font-size: 1.6rem; flex: 0 0 auto; }
.shield-say { padding: 1rem 1.2rem; border-radius: 18px; background: var(--accent-soft); margin-bottom: .75rem; }
.shield-say h2 { font-size: 1.1rem; margin-bottom: .5rem; }
.shield-say ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .4rem; }
.shield-say li { font-size: 1.15rem; font-weight: 700; color: var(--text-strong); }
.shield-alert {
  margin-top: 1rem; padding: clamp(1.5rem, 1rem + 3vw, 2.75rem); border-radius: var(--radius-lg); text-align: center;
  background: linear-gradient(160deg, #B3261E, #8E1B15); color: #fff; box-shadow: var(--shadow-lg); animation: dialogIn .3s var(--ease);
}
.shield-alert h2 { color: #fff; font-size: clamp(2.2rem, 1.6rem + 3vw, 3.4rem); letter-spacing: .02em; margin: .25rem 0 .75rem; }
.stop-sign { font-size: 4rem; line-height: 1; animation: pop .5s var(--ease); }
.stop-sign.ok { font-size: 3.5rem; }
.stop-asked { font-size: 1.2rem; font-weight: 800; background: rgba(255,255,255,.14); display: inline-block; padding: .4rem .9rem; border-radius: 999px; }
.stop-why { font-size: 1.12rem; max-width: 34rem; margin: .75rem auto; }
.stop-sub { font-size: 1rem; opacity: .9; }
.shield-alert .btn { margin-top: .6rem; }
.stop-btn { background: #fff; color: #8E1B15; font-size: 1.2rem; min-height: 4rem; }
.stop-btn:hover { background: #FCE3E1; }
.stop-back { color: #fff; }
.shield-alert:has(.ok) { background: linear-gradient(160deg, #23774A, #1A5C39); }
.shield-alert .btn-soft { background: rgba(255,255,255,.18); color: #fff; }
.shield-alert .btn-primary { background: #fff; color: #1A5C39; box-shadow: none; }

/* ==========================================================================
   Inklistrade meddelanden, skrivförslag, rapport
   ========================================================================== */
.scan-card { margin: .4rem 0 .4rem 2.9rem; max-width: min(38rem, 88%); padding: 1rem; border-radius: 18px; background: var(--surface); border: 2px solid var(--border-soft); box-shadow: var(--shadow); animation: msgIn .4s var(--ease) both; }
.scan-card[data-level="red"], .scan-card[data-level="orange"] { border-color: color-mix(in srgb, var(--orange-bar) 60%, transparent); }
.scan-card-head { display: flex; gap: .5rem; align-items: center; color: var(--text-strong); margin-bottom: .5rem; }
.scan-card .highlighted { margin-top: .75rem; max-height: 14rem; overflow: auto; font-size: .95rem; }
.scan-card .verdict-meter { background: var(--surface-3); }
@media (max-width: 38em) { .scan-card { margin-left: 0; max-width: 100%; } }

.suggest { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; padding: .5rem 1rem 0; animation: viewIn .25s var(--ease); }
@media (min-width: 48em) { .suggest { padding-left: 1.5rem; padding-right: 1.5rem; } }
.suggest-label { font-size: .85rem; font-weight: 700; color: var(--muted); }
.suggest-chip { min-height: 2.6rem; padding: .35rem .8rem; border-radius: 999px; border: 2px solid var(--accent); background: var(--surface); color: var(--text-strong); font-weight: 650; font-size: .9rem; text-align: left; }
.suggest-chip:hover { background: var(--accent-soft); }

.dialog-report { width: min(40rem, calc(100vw - 2rem)); }
.report-print { display: none; }
@media print {
  body.printing-report > *:not(.report-print) { display: none !important; }
  body.printing-report .report-print { display: block !important; }
  .report-print pre { white-space: pre-wrap; font: 12pt/1.5 Georgia, serif; color: #000; }
}
html[data-motion="off"] .bot-svg * { animation: none !important; }

/* Samtycke: båda valen lika tydliga */
.btn-consent { background: var(--surface); color: var(--text-strong); border: 2px solid var(--accent); min-width: 12rem; }
.btn-consent:hover { background: var(--accent-soft); }

/* ---------------- Kontaktkollen ---------------- */
.cc-hint { margin: .2rem 0 1rem; padding: .7rem .9rem; border-radius: 14px; background: var(--surface-2); color: var(--text); font-size: .95rem; }
.cc-list { margin-bottom: 1rem; }
.cc-list button { align-items: center; }
.cc-ic { font-size: 1.35rem; line-height: 1; flex: 0 0 auto; }
.cc-list li.on button { background: var(--orange-soft); border-color: color-mix(in srgb, var(--orange-bar) 55%, transparent); }
.cc-list li.on .ck-box { background: var(--orange-bar); border-color: var(--orange-bar); }
.cc-list li.on .ck-box svg { stroke-dashoffset: 0; }
html[data-theme="dark"] .cc-list li.on .ck-box svg { stroke: #0B1A22; }
.cc-count { margin-top: .4rem !important; font-size: .88rem; font-weight: 700; color: var(--muted); }
.cc-actions { margin-top: 1rem; }
.cc-empty { text-align: center; padding: .6rem 0; }
#ccResult .verdict { margin-top: 0; }
.tool-contactcheck .tool-icon { background: var(--orange-soft); }
