/* Real vs Fake News — style.css (STATIC + CLEAN)*/

/* =========================================================
   BASE / RESET
   ========================================================= */
* { box-sizing: border-box; }

:root {
  /* Core palette */
  --rv-blue: #2f66db;
  --rv-pink: #ff4fa3;

  --bg-app: #f3f4f6;
  --bg-surface: #ffffff;

  --ink: #111827;
  --muted: #6b7280;

  --border: #e5e7eb;
  --border-strong: #111827;

  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-card: 0 10px 25px rgba(15, 23, 42, 0.06);

  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 18px;
  --radius-xl: 22px;

  --font-serif: "Georgia", "Times New Roman", serif;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;

  /* Header text colors */
  --hdr-text: rgba(255,255,255,.92);
  --hdr-text-dim: rgba(255,255,255,.72);
  --hdr-hair: rgba(255,255,255,.16);
}

html, body { height: 100%; }

body {
  font-family: var(--font-sans);
  margin: 0;
  font-size: 16px;
  padding: 0;
  background: var(--bg-app);
  color: var(--ink);
}

p { margin: 0; }
.hidden { display: none !important; }

/* Canvas bakgrunn */
#bakgrunn {
  position: fixed;
  inset: 0 auto auto 0;
  top: 0;
  z-index: -1;
}

/* =========================================================
   HEADER + NAV (STATIC / STICKY)
   - Sticky = stabil på alle skjermer
   - Ingen “headerH” offset nødvendig
   ========================================================= */
#header{
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9998;
  background: rgba(27, 130, 255, 0.18);
  color: #111827;
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  padding: 8px clamp(12px, 2vw, 16px);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#header::after{
  content: "";
  display: block;
  height: 2px;
  margin-top: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2f66db, #ff4fa3);
}

#header.is-compact {
  padding: 4px 12px;
}



/* Inner layout */
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.masthead-left,
.masthead-right { flex: 1; }

.masthead-center {
  flex: 2;
  display: flex;
  justify-content: center;
}

.logo-title {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.logo-title h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.2vw, 2.1rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
  color: #111827;
}

.tagline {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.logo-badge { display: none; }

.masthead-right {
  display: flex;
  justify-content: flex-end;
}

.user-panel {
  background: transparent;
  padding: 0;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #111827;
}

.user-name{
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

.user-name-text{
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .2px;
  color: #111827;
}

.user-emoji{
  font-size: 1.05rem;
  transform: translateY(1px);
}

/* Lock button */
.lock-btn{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.lock-btn:hover{
  background: #f9fafb;
  transform: translateY(-1px);
}

.lock-btn:active{ transform: scale(0.98); }

.lock-btn:focus-visible{
  outline:none;
  box-shadow: 0 0 0 3px rgba(255,79,163,.22);
  border-color: rgba(255,79,163,.55);
}

.lock-icon{ font-size: 18px; line-height: 1; }

/* Nav */
nav ul,
.nav ul {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;

  display: flex;
  justify-content: center;
  gap: clamp(0.75rem, 2vw, 2rem);
  flex-wrap: wrap;
}

nav ul li { margin: 0; }

nav a,
.nav a {
  color: #111827;
  font-family: "Bugaki", "Segoe UI", sans-serif;
  font-size: 1.05rem;
  text-decoration: none;
  font-weight: 700;
  transition: opacity 0.2s, text-decoration-color 0.2s;
  opacity: 0.85;
}

nav a:hover,
.nav a:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 6px;
}

/* Legacy global (behold) */
h1 { color: rgb(2, 94, 180); }

/* =========================================================
   PAGE FRAME (default)
   ========================================================= */
.page-frame {
  max-width: 1200px;
  margin: 0 auto 2rem;
  padding: 28px 1.25rem 0;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
}

/* =========================================================
   GENERIC UI
   ========================================================= */
.btn {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: #ffffff;
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.btn:hover {
  background: #fce9e7;
  border-color: #c0392b;
}

.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
}

.btn-small {
  padding: 0.45rem 0.6rem;
  font-size: 0.9rem;
}

.btn-guess[data-answer="real"] { border-color: #0c7b1b; }
.btn-guess[data-answer="fake"] { border-color: #c0392b; }

/* Hover */
.btn-guess[data-answer="real"]:hover {
  background: #e6f7ea;
}

.btn-guess[data-answer="fake"]:hover {
  background: #fde8e8;
}

/* Når valgt (etter klikk) */
.btn-guess[data-answer="real"].selected {
  background: #c8f0d2;
}

.btn-guess[data-answer="fake"].selected {
  background: #f7c7c7;
}



/* ==========================og heaDEREN er i veien for tittelen til boksen===============================
   LEGACY INDEX (wrapper/container/rss) — behold “feelingen”
   ========================================================= */
.wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(78%, 1100px);
  max-height: none;
  margin: 20px auto 20px auto;
  background-color: #aebac7;
  border-radius: 25px;
  padding: 1.25rem;
}

#rss-feed { width: 100%; margin: 0; }

.container {
  background-color: #dadada;
  width: 100%;
  margin: 0 auto 1.25rem auto;
  padding: 1rem;
  border-radius: 20px;
  box-shadow: 0 10px 22px rgba(0,0,0,0.12);
}

.content { display: flex; gap: 10px; }
.contentleft { flex: 0 55%; }
.contentright { flex: 1; }
#rss { margin-top: 10px; }

.image {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
  gap: 40px;
}
.image img {
  width: 300px;
  overflow: hidden;
  border-radius: 15px;
  position: relative;
  object-fit: cover;
}

/* =========================================================
   NEWS / INDEX LAYOUT (cards etc.)
   ========================================================= */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(260px, 1fr);
  gap: 1.75rem;
}

.column-main,
.column-side { 
  min-width: 0; 
}

.section-header h2 {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.3rem;
  letter-spacing: 0.04em;
  margin: 0 0 0.25rem;
}

.section-subtitle {
  margin: 0 0 0.7rem;
  font-size: 0.9rem;
  color: #6b7280;
}

#fakeheader {
  color: #dc2626;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.9rem;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  padding-top: 0.25rem;
}

.article-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.07);
  padding: 0;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.12);
  border-color: #cbd5f5;
}

.article-image-wrap {
  position: relative;
  width: 100%;
  padding-top: 54%;
  overflow: hidden;
  background: #f1f1f1;
}

.article-image-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #777;
  border: 1px dashed #ddd;
}

.article-body { padding: 0.8rem 0.9rem 0.9rem; }

.article-description {
  margin: 0 0 0.55rem;
  font-size: 0.92rem;
  line-height: 1.3;
}

.article-meta {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  color: #9ca3af;
}

.article-actions { margin-top: auto; }
.btn-open-quiz { font-size: 0.78rem; }

/* Side container override */
.column-side .container {
  width: 100%;
  margin: 0;
  margin-top: 40px !important;
  background: #f9fafb;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  border: 1px solid #e5e7eb;
  
}

/* Round / played styles */
.article-card.played { opacity: 0.9; transition: all 0.25s ease; }

.article-card.played-correct {
  border: 2px solid #2ecc71;
  box-shadow: 0 0 12px rgba(46, 204, 113, 0.5);
}

.article-card.played-wrong {
  border: 2px solid #e74c3c;
  box-shadow: 0 0 12px rgba(231, 76, 60, 0.5);
}

.article-card.round-complete {
  opacity: 0.7;
  pointer-events: none;
}

/* Streak badge */
.streak-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, #ff6b00, #ffb347);
  color: white;
  padding: 6px 10px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  animation: popIn 0.3s ease;
}

/* =========================================================
   MODAL (news quiz modal)
   ========================================================= */
.modal {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal.hidden { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.modal-dialog {
  position: relative;
  background: #ffffff;
  padding: 1.1rem;
  max-width: 700px;
  width: min(88vw, 700px);
  max-height: 76vh;
  overflow-y: auto;
  box-shadow: var(--shadow-soft);
  border-radius: 18px;
  margin-top: 20px;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  background: transparent;
  font-size: 1.4rem;
  cursor: pointer;
}

.modal h2 {
  margin-top: 0;
  margin-bottom: 0.25rem;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  line-height: 1.25;
  padding-right: 2rem;
}

.modal-meta {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  color: #777;
}

.modal p {
  line-height: 1.45;
}

.modal-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 280px;
  object-fit: cover;
  object-position: center;
  margin-bottom: 0.65rem;
  background: #f3f4f6;
  border-radius: 12px;
}

.modal-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

.site-footer {
  margin-top: 2rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: #777;
}

/* Round overlay */
.round-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10030;
  animation: fadeIn 0.3s ease;
}

.round-modal {
  background: white;
  padding: 2rem;
  border-radius: 20px;
  text-align: center;
  width: min(90%, 420px);
  animation: popUp 0.3s ease;
}

/* =========================================================
   MIN SIDE (minside.html)
   ========================================================= */
.profile {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.profile-top { display: flex; flex-direction: column; gap: 0.6rem; }
.profile-title { margin: 0; font-size: 1.8rem; }
.profile-subtitle { margin: 0; color: #6b7280; }

.profile-actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.profile-grid .card:nth-child(3) { grid-column: 1 / -1; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 0.8rem;
}

.stat {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 0.8rem 0.9rem;
  background: #f9fafb;
}

.stat-label { font-size: 0.85rem; color: #6b7280; }
.stat-value { font-size: 1.4rem; font-weight: 800; color: #111827; margin-top: 0.25rem; }

.badge-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 0.9rem;
}

.mini-card {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 0.8rem 0.9rem;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.mini-card-title { font-weight: 800; margin-bottom: 0.25rem; }
.mini-card-desc { font-size: 0.9rem; color: #6b7280; }

.activity-box{
  margin-top: 14px;
  padding: 10px;
  border-radius: 14px;
  max-height: 200px;
  overflow-y: auto;
}

.activity-title{
  font-weight: 800;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

#activity-list{
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 10px;
  border-bottom: 1px solid rgba(0,0,0,0.12); /* litt tydeligere */
}

/* klokkeslett først */
.activity-time{
  order: -1;
  min-width: 52px;
  font-weight: 500;
  opacity: 0.7;
  font-variant-numeric: tabular-nums;
}

/* =========================================================
   SWIPE (swipe.html)
   ========================================================= */
body.swipe-page .page-frame {
  margin: 18px auto 2rem;
  width: min(1200px, calc(100% - 2rem));
  padding: 0;
}

.swipe-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
  gap: clamp(1rem, 2vw, 1.75rem);
  align-items: start;
}

.swipe-stage { position: relative; }

.card-stack {
  position: relative;
  min-height: clamp(500px, 65vh, 760px);
  height: auto;
}

.swipe-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  transform: translateX(0);
  transition: transform 0.18s ease;
  touch-action: pan-y;
  min-height: 0;
}

.swipe-card-media {
  width: 100%;
  height: 340px;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
  background: #eef2f7;
}

.swipe-card-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}



.swipe-card-body {
  flex: 0 0 auto;
  padding: 1rem 1.1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.swipe-card-body h3 {
  margin: 0;
  line-height: 1.25;
}

.swipe-card-body .muted {
  margin: 0;
}

.swipe-desc {
  margin: 0;
  color: #374151;
  line-height: 1.5;
  overflow-wrap: break-word;
  word-break: break-word;

  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.swipe-choice {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0;
  flex: 0 0 auto;
}

.swipe-choice .btn {
  flex: 1 1 140px;
  min-height: 44px;
}

.swipe-link {
  display: inline-block;
  margin-top: 0;
  font-size: 0.9rem;
  flex: 0 0 auto;
}
.swipe-hints {
  display: flex;
  justify-content: space-between;
  margin-top: 0.8rem;
  color: #6b7280;
  font-size: 0.9rem;
}

/* states */
.swipe-card.swipe-right { outline: 3px solid rgba(12, 123, 27, 0.35); }
.swipe-card.swipe-left  { outline: 3px solid rgba(220, 38, 38, 0.35); }

.swipe-card.is-correct {
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.35), 0 18px 45px rgba(15,23,42,0.12);
}

.swipe-card.is-wrong {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.35), 0 18px 45px rgba(15,23,42,0.12);
}

.swipe-card.flash-correct { box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.6); }
.swipe-card.flash-wrong   { box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.6); }

/* Stop text selection while swiping */
.swipe-card,
.swipe-card * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}
.swipe-card a,
.swipe-card input,
.swipe-card textarea,
.swipe-card [contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
}

/* Reason UI */
.reason-box { margin-top: 0.85rem; }

.reason-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.reason-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}

.reason-grid { display: grid; grid-template-columns: 1fr; gap: 0.55rem; }

.reason-btn {
  appearance: none;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 14px;
  padding: 0.7rem 0.85rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  gap: 0.6rem;
  align-items: center;
  font-size: 0.95rem;
}

.reason-btn:hover {
  border-color: #cbd5f5;
  background: #f9fafb;
}

.reason-btn.selected {
  border-color: #111827;
  background: #eef2ff;
}

.reason-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.reason-tag {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #111827;
}

.reason-btn.hinted {
  outline: 2px solid rgba(255, 215, 80, 0.9);
  box-shadow: 0 0 0 6px rgba(255, 215, 80, 0.18);
}

.reason-mini-actions { display: flex; gap: 0.5rem; margin-top: 0.7rem; flex-wrap: wrap; }

/* Feedback box */
.feedback-box {
  margin-top: 1rem;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 16px;
  padding: 0.9rem 1rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.feedback-title { font-weight: 900; margin-bottom: 0.5rem; }
.feedback-row { margin: 0.35rem 0; color: #374151; }

.swipe-actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

/* =========================================================
   DUO HUD / PILLS (one source of truth)
   ========================================================= */
.swipe-panel { 
  overflow: visible; 
  margin-top: 40px;
}

.duo-hud{
  position: static;
  top: 12px; /* siden header er sticky, holder dette seg pent */
  z-index: 2;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.duo-hud-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: .75rem;
  margin-bottom: .65rem;
}

.duo-title{ 
  font-weight: 900; 
  margin-bottom: 19px;
}

.duo-pills{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  row-gap: 19px;   /* luft over og under */
  column-gap: 5px;
  align-items: stretch;
  
}

/* Base pill */
.stat-pill,
.shop-pill{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.18);
  backdrop-filter: blur(8px);
  font-weight: 900;
  font-size: 0.95rem;
  line-height: 1;
  min-height: 40px;
}

/* Type pills */
.stat-pill.points {
  background: linear-gradient(135deg, #3aa0ff, #45e0b8);
  color: white;
  border: 0;
}
.stat-pill.streak {
  background: linear-gradient(135deg, #fd9504d6, #f93545dc);
  color: white;
  border: 0;
}
.stat-pill.stars {
  background: linear-gradient(135deg, #fee08f, #ff9d00);
  color: white;
  border: 0;
}
.stat-pill.lives {
  background: linear-gradient(135deg, #e360f7, #ff7aa0);
  color: white;
  border: 0;
}

/* ✅ gjør home/index pills like swipe */
.score-pills{
  display: flex;
  flex-wrap: wrap;
  gap: 19px;        /* samme spacing */
  align-items: center;
}

.score-pills .stat-pill{
  min-width: 0;     /* stopper rare stretch */
}

.stat-pill.round,
.shop-pill{
  background: rgba(128, 94, 94, 0.12);
  color: #111827;
  border: 1px solid rgba(0,0,0,0.10);
}

.stat-pill.round { grid-column: span 2; }
.shop-pill { grid-column: span 2; cursor: pointer; text-align: center; }

.shop-pill:hover{ transform: translateY(-1px); }
.shop-pill:active{ transform: translateY(0px); }

#primary-action{
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 900;
}

#primary-action:disabled{
  opacity: 0.6;
  cursor: not-allowed;
}

/* Home primary action */
#home-primary-action {
  width: 100%;
  min-height: 46px;
  border-radius: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;

  border: 1px solid rgba(0, 0, 0, 0.49);
  transform: translateY(0);
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;

  background: linear-gradient(180deg, rgba(253, 253, 253, 0.9) 100%);
}

#home-primary-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.14);
  filter: brightness(1.03);
}

#home-primary-action:active {
  transform: translateY(0px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
  filter: brightness(0.98);
}

#home-primary-action:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* =========================================================
   SHOP MODAL
   ========================================================= */
.shop-overlay {
  position: fixed;
  inset: 0;
  z-index: 10010;
  background: rgba(0, 0, 0, 0.45);
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 160ms ease;
}

.shop-overlay.hidden { display: none; }
.shop-overlay.show { opacity: 1; }

.shop-modal {
  width: min(560px, calc(100vw - 2rem));
  border-radius: 18px;
  background: #ffffff;
  color: #111827;
  border: 1px solid #e5e7eb;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.25);
  padding: 1rem;
}

.shop-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.shop-title { font-size: 1.2rem; font-weight: 700; }

.shop-grid { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }

.shop-item {
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.14);
  padding: 0.75rem;
}

.shop-item-top {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: baseline;
  margin-bottom: 0.35rem;
}

.shop-item-name { font-weight: 700; }
.shop-item-cost { opacity: 0.9; }

.shop-item-actions {
  margin-top: 0.6rem;
  display: flex;
  justify-content: flex-end;
}

/* =========================================================
   TRAINING PAGE (opplaring.html)
   ========================================================= */
body.training-page {
  background:
    radial-gradient(circle at 20% 10%, #ffffffff 0%, transparent 40%),
    radial-gradient(circle at 60% 30%, #ffffffff 0%, transparent 45%),
    radial-gradient(circle at 50% 90%, #ffffffff 0%, transparent 45%),
    #f8fafc;
  color: #111827;
}

body.training-page .page-frame {
  max-width: none;
  margin: 18px 0 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  border: none;
}

body.training-page .training {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 1rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

body.training-page .training-title {
  text-align: center;
  margin: 0.25rem auto 0.25rem;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #0f172a;
}

body.training-page .training-title::after {
  content: "";
  display: block;
  width: min(520px, 92vw);
  height: 4px;
  margin: 0.55rem auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--rv-blue), #7c3aed, #06b6d4);
}

body.training-page .lead {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #111827;
  margin: 0.25rem 0 1rem;
  max-width: 65ch;
}

body.training-page .muted { color: #6b7280; }
body.training-page .training p,
body.training-page .training li { line-height: 1.85; color: #111827; }

body.training-page .training-hero {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 1.25rem;
  align-items: start;
  padding: 1.25rem;
  margin-top: 0.6rem;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(47, 102, 219, 0.10), rgba(124, 58, 237, 0.08));
  border: 1px solid rgba(229, 231, 235, 1);
}

body.training-page .training-hero-card {
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 1);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-card);
}

body.training-page .quote { margin: 0.35rem 0 0; color: #374151; }

body.training-page .pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0.9rem 0 1rem;
}

body.training-page .pill {
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  font-size: 0.9rem;
  font-weight: 800;
  color: #111827;
}

body.training-page .card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: var(--shadow-card);
}

body.training-page .card-title {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 900;
  color: #111827;
}

body.training-page .card-lead { margin: 0 0 1.1rem; color: #374151; }

body.training-page .checklist {
  margin: 0.9rem 0 0;
  padding-left: 1.1rem;
  color: #374151;
}

body.training-page .checklist li { margin: 0.4rem 0; }

body.training-page .mini-task {
  margin-top: 1.15rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  background: rgba(6, 182, 212, 0.10);
  border: 1px solid rgba(6, 182, 212, 0.25);
  color: #111827;
}

body.training-page .task-title { font-weight: 900; margin-bottom: 0.4rem; }

body.training-page .case-box {
  margin-top: 1.2rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.22);
}

body.training-page .case-tag {
  font-size: 0.82rem;
  font-weight: 900;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(229, 231, 235, 1);
  background: #ffffff;
  color: #111827;
}

body.training-page .accordion details {
  margin: 1rem 0;
  padding: 1.1rem;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

body.training-page .accordion summary { cursor: pointer; font-weight: 900; color: #111827; }
body.training-page .accordion p { margin: 0.6rem 0 0; color: #374151; }

body.training-page section { margin-bottom: 3.5rem; }

/* Module nav + progress */
.module-top{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.module-progress{
  flex: 1;
  max-width: none;
}

.module-nav{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.module-card{ min-height: 260px; }

.module-progress {
  width: min(360px, 100%);
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(229,231,235,1);
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.module-progress-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}

.module-progress-label,
.module-progress-percent{
  font-size: 0.85rem;
  font-weight: 800;
  color: #374151;
}

.module-progress-bar {
  position: relative;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #e5e7eb;
}

.module-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #3b82f6, #06b6d4);
  transition: width 0.3s ease;
}

/* Coach bubble */
.kid-coach {
  width: 100%;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  font-weight: 800;
}

/* Media helpers */
.module-media img { 
  width: 100%;
  height: 280px;
  object-fit: contain;
  border-radius: 14px;
  background: rgba(0,0,0,0.06);
  padding: 10px;
}
.module-media img.cover {
  object-fit: cover;
  padding: 0;
  background: transparent;
}

/* =========================================================
   AUTH-LITE / RVFN intro modal
   ========================================================= */
#rvfnIntroModal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.rvfn-modal-backdrop{
  position:absolute;
  inset:0;
  background: rgba(15,18,30,0.55);
}

.rvfn-modal{
  position: relative;
  width: min(560px, calc(100vw - 2rem));
  margin: 12vh auto 0;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 18px 45px rgba(15,23,42,.18);
  padding: 1rem 1.1rem;
  color: #0f172a;
}

.rvfn-modal .muted{ color:#64748b; }

.rvfn-row{
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: .75rem;
  margin: .75rem 0;
}

.rvfn-label{
  display: grid;
  gap: .35rem;
  font-weight: 700;
  font-size: .95rem;
}

.rvfn-label input,
.rvfn-label select{
  padding: .6rem .7rem;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  outline: none;
}

.rvfn-label input:focus,
.rvfn-label select:focus{
  border-color: rgba(47,102,219,.55);
  box-shadow: 0 0 0 3px rgba(47,102,219,.18);
}

.rvfn-actions{
  display:flex;
  gap:.6rem;
  flex-wrap: wrap;
  margin-top: .85rem;
}

.rvfn-details{
  margin-top:.6rem;
  padding:.6rem .7rem;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f9fafb;
}

.rvfn-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 0;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: grid;
  place-items: center;
}

/* Generic “X button” styling for auth overlays */
#auth-overlay,
.auth-overlay,
.modal-overlay,
.overlay {
  backdrop-filter: blur(6px);
}

#auth-modal,
.auth-modal,
.login-modal,
.auth-lite-modal {
  border-radius: 18px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

#auth-overlay .modal,
#auth-overlay .auth-modal,
.auth-overlay .modal,
.auth-overlay .auth-modal {
  max-width: 420px;
  width: calc(100% - 28px);
}

.auth-modal-head,
.modal-head,
.login-head,
.auth-head {
  position: relative;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

#auth-close,
#authClose,
.auth-close,
.close-btn,
button[aria-label="Lukk"],
button[aria-label="Close"],
button[title="Lukk"],
button[title="Close"] {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  left: auto !important;

  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.85);
  color: rgba(0,0,0,0.75);

  display: inline-flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

#auth-close:hover,
#authClose:hover,
.auth-close:hover,
.close-btn:hover,
button[aria-label="Lukk"]:hover,
button[aria-label="Close"]:hover,
button[title="Lukk"]:hover,
button[title="Close"]:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.95);
  box-shadow: 0 10px 22px rgba(0,0,0,0.18);
}

.auth-modal-body,
.modal-body,
.login-body,
.auth-body {
  padding: 16px;
}

.auth-modal input,
.modal input,
.login-modal input,
.auth-lite-modal input {
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.14);
  background: rgba(255,255,255,0.9);
  padding: 12px 12px;
  outline: none;
}

.auth-modal input:focus,
.modal input:focus,
.login-modal input:focus,
.auth-lite-modal input:focus {
  border-color: rgba(0,0,0,0.25);
  box-shadow: 0 0 0 4px rgba(0,0,0,0.06);
}

/* =========================================================
   ANIMATIONS (single source)
   ========================================================= */
@keyframes popIn {
  from { transform: translateY(8px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

@keyframes pop {
  0%   { transform: scale(1); }
  60%  { transform: scale(1.18); }
  100% { transform: scale(1); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popUp {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.feedback-box:not(.hidden) { animation: popIn 180ms ease-out; }
.swipe-card.is-shaking { animation: shake 260ms ease-in-out; }
.pop { animation: pop 260ms ease-out; }

/* =========================================================
   TOAST
   ========================================================= */
.toast {
  position: fixed;
  left: 50%;
  top: 14%;
  transform: translateX(-50%);
  z-index: 9999;
  padding: 0.75rem 0.95rem;
  border-radius: 14px;
  background: rgba(10, 10, 14, 0.82);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.hidden { display: none; }
.toast.good { border-color: rgba(80, 220, 140, 0.35); }
.toast.bad  { border-color: rgba(255, 120, 120, 0.35); }

.toast.streak {
  font-size: 1.2rem;
  font-weight: 900;
  padding: 1rem 1.3rem;
  border-radius: 18px;
}

/* =========================================================
   RESPONSIVE (stabil på mobil + tablet)
   ========================================================= */
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .column-side .container { margin-top: 1rem; }
  body.training-page .training-hero { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .masthead { flex-wrap: wrap; gap: 10px; }
  .masthead-left,
  .masthead-right { flex: 1 1 140px; }
  .masthead-center { flex: 1 1 100%; order: 3; justify-content: center; }

  /* Nav: horisontal scroll i stedet for høy header */
  nav ul,
  .nav ul {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    gap: 14px;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }
  nav ul::-webkit-scrollbar,
  .nav ul::-webkit-scrollbar { height: 6px; }
}

@media (max-width: 600px) {
  .page-frame { width: calc(100% - 1rem); padding: 0; }
  .article-card { border-radius: 0; }

  .wrapper { margin-top: 55%; width: 90%; }
  .container { width: 90%; text-align: center; }
  h1 { padding: 2%; }
  .content { flex-direction: column; align-items: center; }
  .contentright { order: -1; width: 95%; margin-bottom: 1rem; }
  .contentleft { width: 95%; }
  .contentright img { width: 100%; height: auto; border-radius: 8px; }
}

@media (max-width: 1000px) {
  .swipe-layout { grid-template-columns: 1fr; }

  .card-stack {
    min-height: 78vh;
    height: auto;
  }
}

@media (max-width: 520px) {
  .swipe-card-body {
    padding: 0.9rem 0.95rem 1rem;
  }

  .swipe-card-media {
    height: 30%;
    min-height: 160px;
    max-height: 240px;
  }

  .swipe-choice .btn {
    flex: 1 1 100%;
  }
}

@media (min-width: 720px) {
  .reason-grid { grid-template-columns: 1fr; }
}

@media (min-width: 560px) {
  .shop-grid { grid-template-columns: 1fr 1fr; }
}

/* =========================================================
   RESTORE: "Velg spillmodus" (opplaring.html)
   - mode-buttons + mode-btn + gradient varianter
   Lim inn nederst i style.css
   ========================================================= */

.training-modes{
  margin-top: 40px;
  text-align: center;
}

.training-modes h3{
  margin: 0 0 10px;
  font-weight: 900;
  font-size: 1.1rem;
  color: #0f172a;
}

/* Grid med kort/knapper */
.mode-buttons{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

/* Selve knappen */
.mode-btn{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;

  padding: 30px 20px;
  border-radius: 18px;

  font-size: 2rem;
  font-weight: 800;
  color: #fff;

  box-shadow: 0 12px 25px rgba(0,0,0,0.18);
  transform: translateY(0);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;

  border: 1px solid rgba(255,255,255,0.18);
}

.mode-btn span{
  font-size: 1.2rem;
  margin-top: 10px;
}

.mode-btn small{
  font-size: 0.85rem;
  margin-top: 6px;
  opacity: 0.9;
  font-weight: 500;
}

/* Varianter */
.mode-btn.news-mode{
  background: linear-gradient(135deg, #2563eb, #06b6d4);
}
.mode-btn.swipe-mode{
  background: linear-gradient(135deg, #7c3aed, #ec4899);
}

.mode-btn:hover{
  transform: translateY(-5px);
  box-shadow: 0 18px 35px rgba(0,0,0,0.22);
  filter: brightness(1.03);
}

.mode-btn:active{
  transform: translateY(0);
  box-shadow: 0 12px 25px rgba(0,0,0,0.18);
}

/* =========================================================
   FIX: Bilder på hjem/index + i modal
   - Ingen stretching
   - Litt større bildeområde i kortet
   ========================================================= */


.article-image-wrap img{
  display: block;         /* fjerner rare “inline image gaps” */
  width: 100%;
  height: 100%;
  object-fit: cover;      /* fyller boksen uten stretching */
  object-position: center;
}


/* =========================================================
   TRAINING MODULE – Case/Scenario UI polish
   (Eksempel-sak + "Hva bør jeg sjekke?" + reveal)
   ========================================================= */

/* Hele case-boksen */
body.training-page .case-box{
  margin-top: 1.35rem;
  padding: 1.05rem 1.05rem 1.1rem;
  border-radius: 18px;
  background: linear-gradient(
    135deg,
    rgba(47, 102, 219, 0.08),
    rgba(236, 72, 153, 0.06)
  );
  border: 1px solid rgba(229, 231, 235, 1);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

/* Head: tittel + scenario tag */
body.training-page .case-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 0.65rem;
}

body.training-page .case-head h4{
  margin: 0;
  font-size: 1.05rem;
  font-weight: 950;
  letter-spacing: -0.01em;
  color: #0f172a;
}

/* Scenario-badge */
body.training-page .case-tag{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.34rem 0.6rem;
  border-radius: 999px;
  font-weight: 900;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;

  background: #ffffff;
  color: #0f172a;
  border: 1px solid rgba(229, 231, 235, 1);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

body.training-page .case-tag::before{
  content: "🎬";
  font-size: 0.95rem;
  line-height: 1;
}

/* Scenario-tekst */
body.training-page .case-story{
  margin: 0.55rem 0 0.85rem;
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(229, 231, 235, 1);
  color: #111827;
  line-height: 1.75;
}

/* Actions-rad */
body.training-page .case-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 0.2rem;
}

/* Pen primary knapp for "Hva bør jeg sjekke?" */
body.training-page .kid-btn,
body.training-page #revealCase{
  appearance: none;
  border: 0;
  cursor: pointer;

  padding: 0.75rem 0.95rem;
  border-radius: 14px;

  font-weight: 950;
  font-size: 1rem;
  letter-spacing: -0.01em;

  color: #ffffff;
  background: linear-gradient(135deg, #3e5eff, #4baeff);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.14);
  transform: translateY(0);
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

body.training-page .kid-btn:hover,
body.training-page #revealCase:hover{
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.18);
  filter: brightness(1.03);
}

body.training-page .kid-btn:active,
body.training-page #revealCase:active{
  transform: translateY(0px);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.14);
}

body.training-page .kid-btn:focus-visible,
body.training-page #revealCase:focus-visible{
  outline: none;
  box-shadow:
    0 0 0 4px rgba(255, 79, 163, 0.22),
    0 12px 26px rgba(15, 23, 42, 0.14);
}

/* Reveal-boksen (tips) */
body.training-page .case-reveal{
  margin-top: 0.85rem;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(229, 231, 235, 1);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

/* Tittel/intro inni reveal */
body.training-page .case-intro{
  margin: 0 0 0.65rem;
  font-weight: 900;
  color: #0f172a;
}

/* Checklist inni reveal – litt mer luft */
body.training-page .case-reveal .checklist{
  margin: 0;
  padding-left: 1.1rem;
}

body.training-page .case-reveal .checklist li{
  margin: 0.45rem 0;
  line-height: 1.75;
}

/* Litt bedre mellomrom generelt i modul-kortet */
body.training-page .module-card .card-lead{
  font-size: 1.05rem;
  line-height: 1.8;
  margin-top: 0.65rem;
}

body.training-page .module-card .checklist li{
  font-size: 1.02rem;
}

/* Mobil: større touch + litt mer spacing */
@media (max-width: 520px){
  body.training-page .case-box{ padding: 0.95rem; }
  body.training-page .case-story{ padding: 0.85rem; }
  body.training-page .kid-btn,
  body.training-page #revealCase{
    width: 100%;
    justify-content: center;
    font-size: 1.05rem;
    padding: 0.9rem 1rem;
    border-radius: 16px;
  }
}

/* ===========================
   Explain section (Opplæring)
   - uses your HTML exactly
   - looks like emoji-legend style
   =========================== */

/* Grid: store kort, fin luft */
.explain-grid{
  display: grid;
  gap: 14px;
  margin-top: 12px;

  /* auto-fit gjør at det blir 1–3 kolonner avhengig av bredde */
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: start;
}

/* Kort: ikke “mini”, men store og lesbare */
.explain-card{
  padding: 14px 14px;
  border-radius: 16px;
}


/* Tittel litt større og tydelig */
.explain-card h4{
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}

/* Liste: ser ut som symbolforklaring – rader, ikke kort */
.explain-list{
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: grid;
  gap: 10px;
}

.explain-list li{
  
  gap: 10px;
  

  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.04);

  font-size: 1rem;           /* <-- gjør teksten større */
  line-height: 1.45;
}



/* På veldig smale skjermer: alltid 1 kolonne (unngå klemming) */
@media (max-width: 520px){
  .explain-grid{
    grid-template-columns: 1fr;
  }
}

/* Fremhev kategoriene uten "chips" */
.explain-list .tag{
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;

  margin-right: 6px;
}

/* liten visuell markør etter kategori */
.explain-list .tag::after{
  content: " - ";
  font-weight: 600;
  opacity: 0.6;
}

/* Swipe: progress pill */
.stat-pill.round {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
#swipe-progress {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* ------------------------------
   Swipe: Runde slutt-kort
   ------------------------------ */

.card-stack .card.is-round-end {
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 18px;
  background: var(--bg-surface, #fff);
  box-shadow: var(--shadow-card, 0 10px 25px rgba(15, 23, 42, 0.06));
  padding: 1.1rem 1.1rem 1rem;
  max-width: 520px;
  margin: 0 auto;
}

.card-stack .card.is-round-end h3 {
  margin: 0 0 0.45rem;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.card-stack .card.is-round-end p {
  margin: 0.35rem 0;
  line-height: 1.35;
}

.card-stack .card.is-round-end .muted {
  color: var(--muted, #6b7280);
}

.card-stack .card.is-round-end .end-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.7rem;
}

.card-stack .card.is-round-end .stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border, #e5e7eb);
  background: rgba(17, 24, 39, 0.03);
  font-size: 0.95rem;
  white-space: nowrap;
}

.card-stack .card.is-round-end .end-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.95rem;
  flex-wrap: wrap;
  align-items: center;
}

.card-stack .card.is-round-end .end-actions .btn {
  min-height: 44px;
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
}

.stars-67-celebration {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.stars-67-celebration.show {
  opacity: 1;
  transform: scale(1);
}

.stars-67-number {
  font-size: clamp(4rem, 14vw, 9rem);
  font-weight: 900;
  color: #fff;
  text-shadow:
    0 0 16px rgba(255,255,255,0.55),
    0 0 36px rgba(255, 79, 163, 0.45),
    0 0 50px rgba(47, 102, 219, 0.45);
  text-align: center;
}

.stars-67-text {
  margin-top: 0.5rem;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.35);
}

.confetti-piece {
  position: fixed;
  top: -40px;
  z-index: 9998;
  pointer-events: none;
  animation: confetti-fall 2.2s linear forwards;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(110vh) rotate(360deg);
    opacity: 0;
  }
}

.badge-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 145px;
  transition: transform 0.15s ease, opacity 0.15s ease, filter 0.15s ease;
}

.badge-card.is-unlocked {
  border: 1px solid #00000023;
  background: #f8f8f8;
}

.badge-card.is-locked {
  opacity: 0.72;
  filter: grayscale(0.15);
  background: #ecececaf;
  border: 1px dashed #cbd5e1;
}

.badge-status {
  margin-top: auto;
  padding-top: 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
}

#toggleLockedBadges {
  margin-top: 1rem;
}

.badge-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
}

.badge-header h3 {
  margin: 0;
}

.badge-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
}

.badge-header h3 {
  margin: 0;
}

.profile-actions .btn,
#toggleLockedBadges {
  appearance: none;
  border: 1px solid rgba(17, 24, 39, 0.10);
  border-radius: 14px;
  padding: 0.72rem 1rem;
  min-height: 46px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;

  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: none;
}

@media (min-width: 1200px) and (max-height: 900px) {
  .wrapper {
    width: min(82%, 1180px);
    margin-top: 14px;
    padding: 1rem;
  }

  .container {
    padding: 0.9rem;
  }

  .article-grid {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.9rem;
  }

  .article-image-wrap {
    padding-top: 50%;
  }

  .section-header h2 {
    font-size: 1.15rem;
  }

  .article-body h3 {
    font-size: 0.96rem;
  }

  .article-description {
    font-size: 0.9rem;
  }
}


