/* ============================================================
   Digitalt Försvar – style.css
   ============================================================ */

:root {
  --bg:        #0d1117;
  --bg2:       #161b22;
  --bg3:       #1c2128;
  --border:    #30363d;
  --border2:   #21262d;
  --text:      #e6edf3;
  --muted:     #7d8590;
  --accent:    #3fb950;
  --accent2:   #58a6ff;
  --accent3:   #f78166;
  --warn:      #d29922;
  --mono:      'JetBrains Mono', monospace;
  --sans:      'IBM Plex Sans', sans-serif;
  --max-width: 900px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

/* Scanline overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent, transparent 2px,
    rgba(0,0,0,.04) 2px, rgba(0,0,0,.04) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4 {
  font-family: var(--mono);
  letter-spacing: -.02em;
  line-height: 1.25;
}

a { color: var(--accent2); }
a:hover { color: var(--text); }

code, pre {
  font-family: var(--mono);
  font-size: .85em;
}

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 10000;
  background: rgba(13,17,23,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 56px;
}

.nav-logo {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .5rem;
  letter-spacing: -.01em;
  white-space: nowrap;
}

.nav-logo::before {
  content: '>';
  color: var(--muted);
  animation: blink 1.2s step-end infinite;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin-left: auto;
}

.nav-links a {
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s;
  letter-spacing: .03em;
}

.nav-links a:hover,
.nav-links a.active { color: var(--text); }

/* Hamburger (mobile) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
  padding: .25rem;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--muted);
  transition: transform .2s, opacity .2s;
}

/* ── MOBILE NAV ── */
@media (max-width: 640px) {
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0; right: 0;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    margin-left: 0;
    padding: .5rem 0;
  }

  .nav-links.open { display: flex; }

  .nav-links li a {
    display: block;
    padding: .75rem 2rem;
    font-size: .85rem;
    border-bottom: 1px solid var(--border2);
  }

  .nav-links li:last-child a { border-bottom: none; }
}

/* ── PAGE WRAPPER ── */
.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 2rem 6rem;
}

/* ── HERO ── */
.hero {
  border-bottom: 1px solid var(--border);
  padding: 5rem 2rem 4rem;
  max-width: var(--max-width);
  margin: 0 auto;
  animation: fadeUp .5s ease both;
}

.hero-tag {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--accent);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.hero-tag::before {
  content: '';
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent);
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.hero h1 span { color: var(--accent); }

.hero-desc {
  font-size: 1rem;
  color: var(--muted);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.hero-quote {
  margin: 20px 0 2rem;
  padding: 14px 18px;
  border-left: 2px solid var(--accent);
  background: rgba(0, 255, 0, .03);
  font-family: var(--mono);
  font-size: .82rem;
  color: #5a6478;
  line-height: 1.65;
  font-style: normal;
}

.hero-quote cite {
  display: block;
  margin-top: 8px;
  font-size: .72rem;
  color: var(--accent);
  letter-spacing: .06em;
  font-style: normal;
}

.hero-meta {
  font-family: var(--mono);
  font-size: .75rem;
  color: var(--muted);
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.hero-meta span { display: flex; align-items: center; gap: .4rem; }
.hero-meta .dot { color: var(--accent); }

/* ── SECTION LABEL ── */
.section-label {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border2);
}

/* ── GUIDE CARDS ── */
.guides {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 3rem;
  animation: fadeUp .5s .1s ease both;
}

.guide-card {
  background: var(--bg2);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: background .12s;
}

.guide-card:hover { background: var(--bg3); }

.guide-card.coming-soon {
  opacity: .5;
  cursor: default;
  pointer-events: none;
}

.guide-num {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--muted);
  min-width: 24px;
  padding-top: .15rem;
  user-select: none;
}

.guide-body { flex: 1; }

.guide-title {
  font-family: var(--mono);
  font-size: .95rem;
  font-weight: 600;
  color: var(--accent2);
  margin-bottom: .3rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
}

.guide-card:hover .guide-title { color: var(--text); }

.guide-desc {
  font-size: .85rem;
  color: var(--muted);
  line-height: 1.55;
}

.guide-arrow {
  font-family: var(--mono);
  color: #555e6a;
  font-size: 1rem;
  padding-top: .1rem;
  transition: color .12s, transform .12s;
}

.guide-card:hover .guide-arrow {
  color: var(--accent);
  transform: translateX(3px);
}

.guide-sub {
  background: var(--bg);
  border-left: 3px solid var(--border2);
}

/* ── BADGES ── */
.badge {
  font-size: .6rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .15rem .45rem;
  border-radius: 2px;
  font-weight: 500;
  white-space: nowrap;
}

.badge-new  { background: rgba(63,185,80,.15);  color: var(--accent);  border: 1px solid rgba(63,185,80,.3); }
.badge-soon { background: rgba(210,153,34,.1);  color: var(--warn);    border: 1px solid rgba(210,153,34,.3); }
.badge-sub  { background: rgba(88,166,255,.1);  color: var(--accent2); border: 1px solid rgba(88,166,255,.25); }
.badge-review { background: rgba(255,160,0,.12);  color: #f0a030;         border: 1px solid rgba(255,160,0,.25); }

/* ── REF GRID ── */
.ref-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 3rem;
  animation: fadeUp .5s .2s ease both;
}

.ref-card {
  background: var(--bg2);
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: background .12s;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.ref-card:hover { background: var(--bg3); }
.ref-card.coming-soon { opacity: .5; pointer-events: none; }

.ref-icon { font-size: 1rem; margin-bottom: .2rem; }

.ref-title {
  font-family: var(--mono);
  font-size: .88rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}

.ref-desc {
  font-size: .8rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ── TERMINAL BLOCK ── */
.terminal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 3rem;
  animation: fadeUp .5s .3s ease both;
}

.terminal-bar {
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  padding: .5rem 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.terminal-dot { width: 10px; height: 10px; border-radius: 50%; }
.td-red    { background: #ff5f56; }
.td-yellow { background: #ffbd2e; }
.td-green  { background: #27c93f; }

.terminal-title {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--muted);
  margin-left: .5rem;
}

.terminal-body {
  padding: 1.25rem 1.5rem;
  font-family: var(--mono);
  font-size: .82rem;
  line-height: 1.8;
}

.t-prompt { color: var(--accent); }
.t-cmd    { color: var(--text); }
.t-out    { color: var(--muted); }
.t-link   { color: var(--accent2); }
.t-warn   { color: var(--warn); }

/* ── GUIDE PAGE (mall) ── */
.guide-page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 2rem 6rem;
  animation: fadeUp .4s ease both;
}

.guide-page-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 2rem;
  margin-bottom: 2.5rem;
}

.guide-page-tag {
  font-family: var(--mono);
  font-size: .7rem;
  color: var(--muted);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: .75rem;
}

.guide-page-tag a {
  color: var(--muted);
  text-decoration: none;
}

.guide-page-tag a:hover { color: var(--accent); }
.guide-page-tag .sep { margin: 0 .4rem; }

.guide-page h1 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: .75rem;
}

.guide-page h1 span { color: var(--accent); }

.guide-page-meta {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--muted);
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* Guide content */
.guide-content { max-width: 720px; }

.guide-content h2 {
  font-size: 1.1rem;
  color: var(--text);
  margin: 2.5rem 0 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border2);
  display: flex;
  align-items: center;
  gap: .6rem;
}

.guide-content h2::before {
  content: '##';
  color: var(--muted);
  font-size: .75rem;
}

.guide-content h3 {
  font-size: .95rem;
  color: var(--accent2);
  margin: 1.75rem 0 .6rem;
}

.guide-content p {
  color: var(--muted);
  margin-bottom: 1rem;
  line-height: 1.75;
}

.guide-content strong { color: var(--text); font-weight: 600; }

.guide-content ol,
.guide-content ul {
  margin: 0 0 1.25rem 1.25rem;
  color: var(--muted);
  line-height: 1.8;
}

.guide-content li { margin-bottom: .2rem; }

/* Callout boxes */
.callout {
  border-left: 3px solid;
  padding: .75rem 1rem;
  margin: 1.25rem 0;
  border-radius: 0 4px 4px 0;
  font-size: .875rem;
}

.callout-tip   { border-color: var(--accent);  background: rgba(63,185,80,.07);  color: var(--accent); }
.callout-warn  { border-color: var(--warn);    background: rgba(210,153,34,.07); color: var(--warn); }
.callout-info  { border-color: var(--accent2); background: rgba(88,166,255,.07); color: var(--accent2); }
.callout-alert { border: 1px solid rgba(247,129,102,.35); border-left: 3px solid var(--accent3); background: rgba(247,129,102,.07); color: var(--accent3); }
.callout-alert-sm { border: 1px solid rgba(247,129,102,.35); border-left: 3px solid var(--accent3); background: rgba(247,129,102,.07); color: var(--accent3); font-size: .8rem; padding: .5rem .75rem; margin: .75rem 0; border-radius: 0 4px 4px 0; }
.callout-title { font-family: var(--mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .3rem; }
.callout-info .callout-title .icon { color: var(--warn); }
.callout p     { color: inherit; margin: 0; line-height: 1.6; }

/* Step counter */
.steps { counter-reset: step; list-style: none; margin: 0 0 1.5rem; padding: 0; }

.steps li {
  counter-increment: step;
  padding: .6rem 0 .6rem 2.5rem;
  position: relative;
  color: var(--muted);
  border-bottom: 1px solid var(--border2);
  line-height: 1.65;
}

.steps li:last-child { border-bottom: none; }

.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: .65rem;
  font-family: var(--mono);
  font-size: .7rem;
  color: var(--accent);
}

/* Inline code */
.guide-content code {
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: .1rem .4rem;
  border-radius: 3px;
  color: var(--accent3);
}

/* Table */
.guide-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: .85rem;
}

.guide-content th {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: .5rem .75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.guide-content td {
  padding: .65rem .75rem;
  border-bottom: 1px solid var(--border2);
  color: var(--muted);
  vertical-align: top;
}

.guide-content tr:hover td { background: var(--bg2); }

/* Checklist */
.checklist { list-style: none; margin: 0 0 1.5rem; padding: 0; }

.checklist li {
  padding: .4rem 0 .4rem 1.75rem;
  position: relative;
  color: var(--muted);
  border-bottom: 1px solid var(--border2);
  font-size: .875rem;
}

.checklist li:last-child { border-bottom: none; }

.checklist li::before {
  content: '☐';
  position: absolute;
  left: 0;
  font-family: var(--mono);
  color: #555e6a;
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--muted);
  line-height: 2;
}

footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--accent); }

/* ── ANIMATIONS ── */
@keyframes blink {
  0%,100% { opacity: 1; }
  50%      { opacity: 0; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .hero { padding: 3rem 1rem 2.5rem; }
  .page,
  .guide-page { padding: 2rem 1rem 4rem; }
  .guide-card { padding: 1rem 1.1rem; }
  .guide-page-meta { gap: 1rem; }
  .hero-meta { gap: 1rem; }
}

/* ── SIDEBAR LAYOUT ── */
.topbar {
  display: none;
}

.site-wrapper {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 300px;
  min-width: 300px;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  /* Smal, diskret scrollbar */
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

.sidebar-logo {
  padding: 1.25rem 1.25rem .75rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-nav {
  padding: 1rem 0;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.sidebar-section {
  font-family: var(--mono);
  font-size: .6rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 1rem 1.25rem .4rem;
}

.sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0 0 .5rem;
}

.sidebar-nav ul li a {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem 1.25rem;
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--muted);
  text-decoration: none;
  transition: background .1s, color .1s;
  line-height: 1.4;
}

.sidebar-nav ul li a:hover {
  background: var(--bg3);
  color: var(--text);
}

.sidebar-nav ul li.sidebar-coming a {
  opacity: .5;
  pointer-events: none;
}

.sidebar-num {
  font-size: .65rem;
  color: #555e6a;
  min-width: 18px;
}

.sidebar-bottom {
  flex-shrink: 0;
}

.sidebar-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .65rem 1.25rem;
  border-top: 1px solid var(--border);
}

.sidebar-footer a {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--muted);
  text-decoration: none;
}

.sidebar-footer a:hover { color: var(--accent); }

.site-content {
  flex: 1;
  min-width: 0;
  overflow-x: hidden;
}

/* ── MOBILE SIDEBAR ── */
@media (max-width: 768px) {
  .topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    height: 52px;
    background: rgba(13,17,23,.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 200;
  }

  .site-wrapper {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: 52px;
    left: -300px;
    height: calc(100vh - 52px);
    z-index: 150;
    transition: left .25s ease;
    box-shadow: 4px 0 24px rgba(0,0,0,.4);
  }

  .sidebar.open {
    left: 0;
  }

  .sidebar-logo {
    display: none;
  }

  .site-content {
    width: 100%;
  }
}

/* ── DOTTED TERM TOOLTIP ── */


.dotted-term:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: #fff;
  padding: 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  white-space: nowrap;
  z-index: 10;
  border: 1px solid #00ff00;
}

/* Gör att länken inte går att klicka på och förhindrar hopp */
.file-link[href="#"] {
    pointer-events: none; /* Gör den oklickbar */
    cursor: default;      /* Tar bort "handen" så den ser statisk ut */
    text-decoration: none; /* Valfritt: tar bort understrykning om du vill */
}

/* Main article link */
/* --- Skriv här om det ändras --- */

/* ── CHANGELOG ── */
.changelog {
  font-family: var(--mono);
  font-size: .8rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  margin: 2.5rem 0 2rem;
}
 
.changelog .section-label {
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  padding: .5rem 1rem;
  margin: 0;
  border-radius: 0;
}
 
.changelog ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
 
.changelog ul li {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: .5rem 1rem;
  border-bottom: 1px solid var(--border2);
  line-height: 1.5;
}
 
.changelog ul li:last-child {
  border-bottom: none;
}
 
.log-date {
  color: var(--accent);
  white-space: nowrap;
  min-width: 6.5rem;
  font-size: .72rem;
}
 
.log-msg {
  color: var(--muted);
}
 
.log-msg strong {
  color: var(--text);
}

/* ── NOTICE BOX ── */
.notice-box {
  font-family: var(--mono);
  font-size: .82rem;
  line-height: 1.8;
  color: var(--muted);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  padding: 1.25rem 1.5rem;
  margin-bottom: 3.5rem;
  animation: fadeUp .5s ease both;
}
 
.notice-box .section-label {
  margin-bottom: .75rem;
  padding-bottom: .4rem;
}
 
.notice-box p {
  color: var(--muted);
  margin: 0;
}
 
.notice-box strong {
  color: var(--text);
  font-weight: 600;
}

/* ============================================================
   INDEX – Guider + Dropdown (sömlös)
   ============================================================ */

/* Wrapper håller ihop hela guide-blocket */
.guides-wrapper {
  margin-bottom: 3rem;
}

/* Huvudlistan: ta bort nedre rundning + kant så den möter knappen */
.guides-main {
  margin-bottom: 0;
  border-bottom: none;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

/* Knappen "Visa fler / färre guider" */
.guides-toggle-btn {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 1.1rem 1.5rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--text);
  transition: background 0.15s;
}

.guides-toggle-btn:hover {
  background: var(--bg3);
}

.guides-toggle-num {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  min-width: 24px;
  margin-right: 0.75rem;
}

.guides-toggle-label {
  color: var(--accent2);
  font-weight: 600;
}

.guides-toggle-arrow {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--muted);
  transition: transform 0.2s ease;
  display: inline-block;
}

.guides-toggle-btn.is-open .guides-toggle-arrow {
  transform: rotate(90deg);
}

/* Extra guider: dold som standard */
.guides-extra {
  display: none;
  margin-bottom: 0;
  border-top: 1px solid var(--border) !important;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
}

.guides-extra.is-open {
  display: grid;
}

/* Sista kortet i extra-listan ska inte ha nedre border */
.guides-extra .guide-card:last-child {
  border-bottom: none;
}

/* Knappens nedre rundning när extra-listan är stängd */
.guides-toggle-btn:not(.is-open) {
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
}

/* Knappens rundning försvinner när extra-listan är öppen */
.guides-toggle-btn.is-open {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

/* Fix för radbrytningar i numrerade instruktionslistor */
.steps-list {
  list-style: none;
  counter-reset: custom-counter;
  padding-left: 0;
}

.steps-list li {
  counter-increment: custom-counter;
  display: block !important; /* Tvingar elementet att hålla ihop */
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.6;
  color: var(--muted);
}

.steps-list li strong {
  color: var(--text);
}

/* Återskapar en snygg, stabil numrering som inte knuffar texten */
.steps-list li::before {
  content: counter(custom-counter) ".";
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--mono);
  color: var(--accent2);
  font-weight: bold;
  width: 1.5rem;
}

/* Fixa enbart de interna listorna i checklistan så att de inte ärver flexbox eller döljer saker */
.checklist li ul {
  list-style-type: disc !important;
  padding-left: 1.25rem !important;
  margin-top: 0.4rem !important;
}

.checklist li ul li {
  display: list-item !important; /* Tvingar webbläsaren att visa vanliga punkter här */
  gap: 0 !important;             /* Nollställ gap från huvudlistan */
  margin-bottom: 0.4rem !important;
}

/* ── ARTICLE IMAGE – höger desktop, centrerad mobil ── */
.article-img-right {
  float: right;
  margin: 0 0 1.5rem 2rem;
  width: 300px;
  max-width: 40%;
  border-radius: 6px;
  border: 1px solid var(--border);
  display: block;
  cursor: zoom-in;
  position: relative;
  z-index: 1000;          /* ovanför scanline-overlay (z-index 999) */
}
 
@media (max-width: 768px) {
  .article-img-right {
    float: none;
    display: block;
    margin: 1rem auto 1.5rem;
    width: 180px;
    max-width: 45%;
  }
}


/* ── Ordlist-termer (.dotted-term) ── */
.dotted-term {
  position: relative;
  cursor: help;
}

/* Skapa själva bubblan via CSS */
.dotted-term::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  
  /* Här styr vi storleken så att den aldrig blir för bred eller går utanför fönstret */
  width: max-content;
  max-width: 280px; /* Perfekt bredd för både mobil och desktop */
  white-space: normal; /* Tvingar texten att byta rad istället för att gå i sidled */
  word-wrap: break-word;
  
  /* Styling (justera färgerna så de matchar din mörka design) */
  background-color: var(--bg3, #1c2128);
  color: var(--text, #e6edf3);
  padding: 8px 12px;
  border: 1px solid var(--border, #30363d);
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.4;
  z-index: 9999;
  
  /* Göm som standard */
  display: none;
  pointer-events: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* Visa bubblan när man hovrar */
.dotted-term:hover::after {
  display: block;
}

/* Gör så att eventuella länkar inuti din egna beskrivning blir snygga */
.dotted-term::after a {
  color: var(--accent2, #58a6ff) !important;
  text-decoration: underline !important;
}

abbr {
  border-bottom: none !important;
  text-decoration: none !important;
}

/* ── abbr() – hover-tooltip ── */
.abbr-wrap {
  position: relative;
  display: inline-block;
}

.abbr-link {
  text-decoration: underline dotted var(--accent);
  text-underline-offset: 3px;
  cursor: help;
}

/* Den osynliga bryggan – flyttad för att aldrig ärva understrykningen */
.abbr-wrap::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  height: 15px; /* Ger en stabil brygga upp till boxen */
  display: none;
  
  /* Tvinga webbläsaren att göra denna yta 100% tom och osynlig */
  text-decoration: none !important;
  text-decoration-line: none !important;
  background: transparent !important;
  border: none !important;
}

/* Visar bryggan när man hovrar över hela zonen */
.abbr-wrap:hover::after {
  display: block !important;
}

.abbr-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 300px;
  white-space: normal;
  word-wrap: break-word;
  /* callout-tip-stil */
  border-left: 3px solid var(--accent);
  background: var(--bg2);
  color: var(--text);
  border-radius: 0 4px 4px 0;
  padding: .75rem 1rem;
  font-size: .875rem;
  line-height: 1.6;
  z-index: 9998;
  box-shadow: 0 4px 16px rgba(0,0,0,.5);
  pointer-events: auto;
  font-weight: normal !important;
  font-style: normal !important;
}

.abbr-tooltip a {
  color: var(--accent2) !important;
  text-decoration: underline !important;
}

.abbr-tooltip strong,
.abbr-tooltip em {
  font-weight: inherit;
  font-style: inherit;
}

.abbr-wrap:hover .abbr-tooltip {
  display: block;
}
/* ── SÄKERHETSBRIEFINGAR (index) ── */
#briefingar {
  margin-bottom: 48px;
}

.brief-intro {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.brief-intro p {
  margin: 0;
  font-size: .85rem;
  color: var(--muted);
  line-height: 1.5;
}

.brief-all-link {
  font-family: var(--mono);
  font-size: .76rem;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  transition: color .15s;
}
.brief-all-link:hover { color: var(--accent2); }

.brief-index-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: #1e2530;
  border: 1px solid #1e2530;
}

.brief-index-card {
  background: #12161e;
  padding: 20px 22px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: background .15s;
}

.brief-index-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 2px; height: 100%;
  background: var(--accent);
  opacity: 0;
  transition: opacity .15s;
}

.brief-index-card:hover { background: #161b26; }
.brief-index-card:hover::before { opacity: 1; }

.brief-index-card-wide {
  grid-column: 1 / -1;
  background: #0e1219;
}
.brief-index-card-wide::before { display: none; }
.brief-index-card-wide:hover { background: #12161e; }

.bic-all-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.bic-all-label {
  font-family: var(--mono);
  font-size: .65rem;
  color: var(--muted);
  letter-spacing: .1em;
  margin-bottom: 6px;
}

.bic-all-title {
  font-family: var(--mono);
  font-size: .75rem;
  color: var(--muted);
  line-height: 1.6;
}

.bic-all-text { flex: 1; }

.bic-all-arrow {
  font-family: var(--mono);
  font-size: .76rem;
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
  transition: color .15s;
}
.brief-index-card-wide:hover .bic-all-arrow { color: var(--accent2); }

.bic-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.bic-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.bic-tag {
  font-family: var(--mono);
  font-size: .58rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .15rem .4rem;
  border-radius: 2px;
  font-weight: 600;
  border: 1px solid transparent;
}

.bic-tag-google { background: rgba(66,133,244,.12); color: #6fa8f5; border-color: rgba(66,133,244,.2); }
.bic-tag-ms     { background: rgba(0,120,212,.12);  color: #5aabf5; border-color: rgba(0,120,212,.2); }
.bic-tag-meta   { background: rgba(66,103,178,.12); color: #7b9fe0; border-color: rgba(66,103,178,.2); }
.bic-tag-ai     { background: rgba(160,80,255,.1);  color: #b57aff; border-color: rgba(160,80,255,.2); }
.bic-tag-high   { background: rgba(255,60,60,.1);   color: #ff5555; border-color: rgba(255,60,60,.2); }

.bic-date {
  font-family: var(--mono);
  font-size: .62rem;
  color: #555e6a;
  white-space: nowrap;
}

.bic-title {
  font-size: .9rem;
  font-weight: 600;
  color: #eef1f7;
  line-height: 1.35;
}

.bic-summary {
  font-size: .79rem;
  color: #5a6478;
  line-height: 1.55;
  flex: 1;
}

.bic-action {
  font-family: var(--mono);
  font-size: .71rem;
  color: #4d5a70;
  line-height: 1.5;
  padding: 8px 10px;
  background: rgba(0,255,0,.03);
  border-left: 2px solid rgba(0,255,0,.15);
  border-radius: 0 2px 2px 0;
}

.bic-action-label {
  color: var(--accent);
  font-weight: 600;
}

@media (max-width: 640px) {
  .brief-index-grid {
    grid-template-columns: 1fr;
  }
  .brief-index-card-wide {
    grid-column: 1;
  }
}
/* ── DONATION BLOCK ── */
.donate-block {
  margin: 3rem 0 0;
  border: 2px solid var(--accent);
  border-radius: 6px;
  background: rgba(63,185,80,.05);
  overflow: hidden;
}

.donate-inner {
  padding: 2.5rem 2rem;
  text-align: center;
}

.donate-label {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.donate-heading {
  font-family: var(--mono);
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 1rem;
}

.donate-heading span {
  color: var(--accent);
}

.donate-body {
  font-size: .9rem;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 1.75rem;
  line-height: 1.65;
}

.donate-btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--bg);
  background: var(--accent);
  padding: .85rem 2.25rem;
  border-radius: 4px;
  text-decoration: none;
  transition: background .15s, transform .1s, box-shadow .15s;
  box-shadow: 0 0 0 0 rgba(63,185,80,0);
}

.donate-btn:hover {
  background: #52d068;
  color: var(--bg);
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(63,185,80,.35);
}

.donate-fine {
  margin-top: 1rem;
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--muted);
  letter-spacing: .05em;
}