/*
 * helhet.css — utseende för navigeringsraden, Läs vidare och kedjan på startsidan
 * Här skedde en uppdatering 2026-09-28: filen skapades tillsammans med helhet.js.
 * Färgerna följer sidornas Tailwind-palett (sky och slate).
 */

/* Navigeringsraden överst. Grupperna radbryts på smala skärmar. */
.hh-nav {
  background: #082f49; /* sky-950 */
  color: #e0f2fe;
  font-size: 0.875rem;
  border-bottom: 1px solid #0c4a6e;
}
.hh-nav-inre {
  max-width: 56rem;
  margin: 0 auto;
  padding: 0.6rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: center;
}
.hh-nav-hem {
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}
.hh-nav-grupp {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}
.hh-nav-tema {
  color: #7dd3fc; /* sky-300 */
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 0.25rem;
}
.hh-nav-lank {
  color: #e0f2fe;
  text-decoration: none;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
}
.hh-nav-lank:hover { background: #0c4a6e; }
.hh-nav-lank[aria-current="page"] {
  background: #e0f2fe;
  color: #0c4a6e;
  font-weight: 600;
}

/* Läs vidare längst ner på varje sida. */
.hh-vidare {
  border-top: 1px solid #e2e8f0;
  background: #f0f9ff; /* sky-50 */
}
.hh-vidare-inre {
  max-width: 48rem;
  margin: 0 auto;
  padding: 2rem 1rem;
}
.hh-vidare-rubrik {
  font-size: 1.25rem;
  font-weight: 600;
  color: #0c4a6e;
}
.hh-kort-lista {
  margin-top: 1rem;
  display: grid;
  gap: 0.75rem;
}
@media (min-width: 640px) {
  .hh-kort-lista { grid-template-columns: repeat(3, 1fr); }
}
.hh-kort {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.9rem;
  text-decoration: none;
  color: #1e293b;
}
.hh-kort:hover { border-color: #0369a1; }
.hh-kort-tema {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0369a1;
}
.hh-kort-titel { font-weight: 600; color: #0c4a6e; }
.hh-kort-text { font-size: 0.875rem; color: #475569; }

.hh-steg {
  margin-top: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
}
.hh-steg-lank { color: #0369a1; text-decoration: underline; }
.hh-steg-nasta { text-align: right; }
.hh-steg-nr { color: #64748b; }

/* Kedjan "Så hänger det ihop" på startsidan. */
.hh-kedja {
  margin-top: 1rem;
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.hh-kedja-steg {
  display: flex;
  gap: 0.9rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.9rem 1rem;
}
.hh-kedja-nr {
  flex: none;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 999px;
  background: #0c4a6e;
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hh-kedja-fraga { font-weight: 600; color: #0c4a6e; }
.hh-kedja-svar { font-size: 0.9rem; color: #334155; margin-top: 0.15rem; }
.hh-kedja-lankar {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.hh-chip {
  font-size: 0.8rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  text-decoration: none;
}
.hh-chip:hover { background: #bae6fd; }

/*
 * Här skedde en uppdatering 2026-09-28: GitHub-hörna och teknik-modal.
 * Knapparna är dämpade i vila och tydligare vid hover, så att de inte
 * konkurrerar med innehållet.
 */
body.hh-med-horn { padding-bottom: 3.5rem; } /* Knapparna täcker inte sidfoten. */
.hh-corner {
  position: fixed;
  bottom: 14px;
  z-index: 20;
  opacity: 0.55;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(6px);
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font: inherit;
  font-size: 0.75rem;
  color: #334155;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s;
}
.hh-corner:hover,
.hh-corner:focus-visible { opacity: 1; background: #fff; color: #0c4a6e; }
.hh-corner-left { left: 14px; }
.hh-corner-right { right: 14px; }

.hh-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 30; /* Över hörnknapparna. */
  background: rgba(8, 47, 73, 0.55);
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.hh-modal-overlay.show { display: flex; }
.hh-modal {
  position: relative;
  background: #fff;
  color: #1e293b;
  border-radius: 14px;
  width: 100%;
  max-width: 36rem;
  max-height: 85vh;
  overflow-y: auto;
  padding: 1.5rem 1.6rem;
}
.hh-modal-close {
  position: absolute;
  top: 0.8rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
}
.hh-modal-titel { font-size: 1.25rem; font-weight: 700; color: #0c4a6e; }
.hh-modal-lead { font-size: 0.875rem; color: #64748b; margin-top: 0.25rem; }
.hh-modal-del { margin-top: 1.1rem; }
.hh-modal-rubrik { font-size: 0.95rem; font-weight: 600; color: #0c4a6e; }
.hh-tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.6rem;
  margin-top: 0.5rem;
}
.hh-tech-card {
  background: #f0f9ff;
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
}
.hh-tech-card h4 { font-size: 0.875rem; font-weight: 600; color: #0369a1; margin-bottom: 0.2rem; }
.hh-tech-card p { font-size: 0.82rem; line-height: 1.5; color: #1e293b; }
.hh-modal-foot { font-size: 0.82rem; color: #64748b; margin-top: 1.1rem; }
.hh-modal-foot a { color: #0369a1; text-decoration: underline; }

/* Här skedde en uppdatering 2026-09-28: rutan "Visste du …" på startsidan. */
.hh-visste {
  background: linear-gradient(135deg, #0c4a6e, #0369a1);
  color: #fff;
  border-radius: 1rem;
  padding: 1.25rem 1.4rem 1rem;
  box-shadow: 0 8px 24px rgba(8, 47, 73, 0.18);
}
.hh-visste-rubrik {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #bae6fd;
}
.hh-visste-text {
  margin-top: 0.4rem;
  font-size: 1.2rem;
  line-height: 1.45;
  font-weight: 600;
  min-height: 3.5em; /* Rutan hoppar inte när texten är olika lång. */
}
.hh-visste-in { animation: hh-tona-in 0.5s ease; }
@keyframes hh-tona-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
.hh-visste-mer {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: #e0f2fe;
  text-decoration: underline;
}
.hh-visste-rad {
  margin-top: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.hh-visste-pil {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}
.hh-visste-pil:hover { background: rgba(255, 255, 255, 0.25); }
.hh-visste-prickar { display: flex; gap: 0.45rem; }
.hh-visste-prick {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}
.hh-visste-prick[aria-current="true"] { background: #fff; }
@media (prefers-reduced-motion: reduce) {
  .hh-visste-in { animation: none; }
}

/* Ankarmål hamnar inte under kanten när man hoppar till ett avsnitt. */
section[id] { scroll-margin-top: 1rem; }
