:root {
  --bg: #121912;
  --bg2: #1a2419;
  --panel: #243028;
  --panel-2: #2c3a2f;
  --ink: #eef2ea;
  --muted: #a7b5a6;
  --moss: #6f9a62;
  --moss-deep: #4f7a45;
  --brass: #c4a35a;
  --brass-dim: #9a8048;
  --accent: var(--brass);
  --accent2: var(--moss);
  --danger: #d9785a;
  --ok: #7ec98a;
  --line: rgba(238, 242, 234, 0.11);
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.32);
  --font: "Nunito Sans", "Segoe UI", sans-serif;
  --display: "Fraunces", Georgia, serif;
  --radius: 0.65rem;
  --max: 1100px;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: clip;
}
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  overflow-x: clip;
  max-width: 100%;
}
body.locked { overflow: hidden; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(800px 460px at 8% -8%, rgba(111, 154, 98, 0.22), transparent 58%),
    radial-gradient(700px 420px at 100% 0%, rgba(196, 163, 90, 0.1), transparent 52%),
    linear-gradient(180deg, #1a2419 0%, #10160f 55%, #0d120c 100%);
}

/* —— Gate —— */
.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    linear-gradient(180deg, rgba(10, 16, 11, 0.72), rgba(10, 16, 11, 0.88)),
    url("jagtkompas-banner.jpg") center / cover no-repeat;
}
body:not(.locked) .gate { display: none; }

.gate-card {
  width: min(390px, 100%);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.75rem 1.5rem;
  background: rgba(36, 48, 40, 0.94);
  border: 1px solid rgba(196, 163, 90, 0.28);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  text-align: center;
}
#gate-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.gate-logo {
  width: 4.6rem;
  height: 4.6rem;
  margin: 0 auto;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(196, 163, 90, 0.4);
}
.gate-card h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.7rem;
  font-weight: 700;
}
.gate-lead { margin: 0 0 0.25rem; color: var(--muted); }
.gate-disclaimer {
  margin: 0 0 0.15rem;
  font-size: 0.8rem;
  line-height: 1.4;
  color: rgba(167, 181, 166, 0.9);
}
.gate-card input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 0.55rem;
  border: 1px solid var(--line);
  background: rgba(14, 20, 14, 0.75);
  color: var(--ink);
  font: inherit;
  text-align: center;
}
.gate-card input:focus {
  outline: 2px solid rgba(196, 163, 90, 0.5);
  outline-offset: 1px;
}
.gate-card .btn { width: 100%; }
.gate-error {
  margin: 0;
  color: var(--danger);
  font-size: 0.9rem;
  font-weight: 700;
}
.gate-footer {
  margin-top: 0.35rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(196, 163, 90, 0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
}
.gate-footer-label {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(167, 181, 166, 0.85);
}
.gate-linkedin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.7rem 0.95rem;
  border-radius: 0.55rem;
  border: 1px solid rgba(196, 163, 90, 0.45);
  background: rgba(196, 163, 90, 0.08);
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.gate-linkedin:hover {
  background: rgba(196, 163, 90, 0.16);
  border-color: var(--brass);
}
.gate-linkedin:active {
  transform: translateY(1px);
}
.gate-linkedin-icon {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  color: var(--brass);
}
.gate-legal {
  margin: 0.15rem 0 0;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(196, 163, 90, 0.12);
  font-size: 0.72rem;
  line-height: 1.4;
  color: rgba(167, 181, 166, 0.8);
  text-align: left;
}
.gate-legal strong {
  color: rgba(232, 226, 212, 0.75);
  font-weight: 700;
}
.gate-made {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  color: rgba(232, 226, 212, 0.5);
  font-style: italic;
}

.app {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}
.app[hidden] { display: none !important; }

/* —— Header —— */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(16, 22, 15, 0.9);
  border-bottom: 1px solid var(--line);
}
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: min(var(--max), calc(100% - 1.5rem));
  margin: 0 auto;
  padding: 0.55rem 0;
}
.brand {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  cursor: pointer;
  text-align: left;
  font: inherit;
  min-width: 0;
}
.brand-logo {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  border: 1px solid rgba(196, 163, 90, 0.35);
}
.brand-text { display: grid; gap: 0.05rem; min-width: 0; }
.brand-name {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.15;
}
.brand-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.55rem;
  border: 1px solid var(--line);
  background: rgba(44, 58, 47, 0.7);
  color: var(--ink);
  cursor: pointer;
  place-items: center;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 1.05rem;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  position: relative;
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.top.nav-open .nav-toggle-bars { background: transparent; }
.top.nav-open .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
.top.nav-open .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }

.tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.2rem;
  width: min(var(--max), calc(100% - 1.5rem));
  margin: 0 auto;
  padding: 0 0 0.55rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 0.4rem 0.72rem;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.tab:hover { color: var(--ink); }
.tab.active {
  color: var(--ink);
  background: rgba(111, 154, 98, 0.18);
  border-color: rgba(111, 154, 98, 0.35);
}

main {
  width: 100%;
  max-width: 100%;
  margin: 0 auto 3rem;
  overflow-x: clip;
}
.view { display: none; }
.view.active { display: block; }
.view > *:not(.hero) {
  width: min(var(--max), calc(100% - 2rem));
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}
#view-cheat > h1 {
  margin: 1.25rem auto 0.85rem;
  font-family: var(--display);
  font-size: clamp(1.4rem, 3vw, 1.85rem);
}

/* —— Hero —— */
.hero {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: clamp(280px, 48vh, 420px);
  margin: 0 0 1.4rem;
  display: grid;
  align-items: end;
  padding: clamp(1.25rem, 3vw, 2.4rem) max(1rem, calc((100% - var(--max)) / 2));
  overflow: hidden;
  isolation: isolate;
  animation: fade-in 0.65s ease both;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("jagtkompas-banner.jpg") center / cover no-repeat;
  transform: scale(1.03);
  animation: hero-drift 22s ease-in-out alternate both;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(105deg, rgba(10, 16, 11, 0.82) 0%, rgba(10, 16, 11, 0.45) 48%, rgba(10, 16, 11, 0.72) 100%),
    linear-gradient(180deg, rgba(10, 16, 11, 0.15) 0%, rgba(10, 16, 11, 0.88) 100%);
}
.hero-inner {
  width: 100%;
  max-width: var(--max);
}
.hero-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.85rem;
  animation: rise 0.6s 0.1s ease both;
}
.hero-brand img {
  width: 4.6rem;
  height: 4.6rem;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(196, 163, 90, 0.45);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  background: #163528;
}
.hero-brand-name {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.1rem, 5.5vw, 3.3rem);
  font-weight: 700;
  line-height: 1;
  color: #f3f0e6;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}
.hero h1 { display: none; }
.hero-lead {
  margin: 0;
  max-width: 34rem;
  color: rgba(238, 242, 234, 0.88);
  font-size: clamp(1rem, 2.1vw, 1.15rem);
  animation: rise 0.6s 0.2s ease both;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.3rem;
  animation: rise 0.6s 0.3s ease both;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes hero-drift {
  from { transform: scale(1.03) translate3d(0, 0, 0); }
  to { transform: scale(1.07) translate3d(-1%, -0.8%, 0); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero, .hero-brand, .hero-lead, .hero-actions, .hero::before {
    animation: none !important;
  }
}

.btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.72rem 1.2rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.btn.primary {
  background: var(--brass);
  color: #1a1812;
}
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost {
  background: rgba(18, 26, 18, 0.35);
  color: var(--ink);
  border-color: rgba(238, 242, 234, 0.28);
}
.btn.ghost:hover { border-color: var(--brass); }
.hero .btn.ghost {
  background: rgba(10, 16, 11, 0.35);
  border-color: rgba(238, 242, 234, 0.35);
}

.home-panel {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 0 0 1.15rem;
}
.stat {
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(160deg, rgba(111, 154, 98, 0.12), transparent 55%),
    rgba(36, 48, 40, 0.85);
  text-align: center;
}
.stat strong {
  display: block;
  font-family: var(--display);
  font-size: 1.85rem;
  color: var(--brass);
}
.stat span { color: var(--muted); font-size: 0.88rem; }

.home-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
.home-link {
  display: grid;
  gap: 0.35rem;
  text-align: left;
  padding: 1.15rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(36, 48, 40, 0.72);
  color: inherit;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.home-link:hover {
  border-color: rgba(196, 163, 90, 0.45);
  transform: translateY(-2px);
}
.home-link-title {
  margin: 0;
  font-family: var(--display);
  font-size: 1.25rem;
}
.home-link p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
}
.home-link-go {
  color: var(--moss);
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 0.25rem;
}

.note {
  margin-top: 1.2rem;
  padding: 1rem 1.1rem;
  border-left: 3px solid var(--brass);
  background: rgba(196, 163, 90, 0.08);
  border-radius: 0 0.7rem 0.7rem 0;
  color: var(--muted);
}
.note strong { color: var(--ink); }
.note-legal {
  border-left-color: rgba(167, 181, 166, 0.55);
  background: rgba(238, 242, 234, 0.04);
  font-size: 0.9rem;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1rem;
}
.toolbar input, .toolbar select,
.setup-grid select, .setup-grid label { font: inherit; }
.toolbar input, .toolbar select,
.setup-grid select {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  padding: 0.7rem 0.9rem;
}
.toolbar input { flex: 1; min-width: 200px; }

.lex-list { display: grid; gap: 0.7rem; }
.lex-item {
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: rgba(36, 48, 40, 0.72);
  padding: 1rem 1.1rem;
  content-visibility: auto;
  contain-intrinsic-size: 1px 160px;
}
.lex-item.has-img {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 220px);
  gap: 1rem;
  align-items: start;
}
.lex-main { min-width: 0; }
.lex-item h3 {
  margin: 0 0 0.25rem;
  font-family: var(--display);
  font-size: 1.15rem;
}
.lex-side-img {
  position: relative;
  margin: 0;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #12160f;
  aspect-ratio: 1;
  max-height: 220px;
}
.lex-side-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  cursor: zoom-in;
}
.lex-side-img::after {
  content: "klik for større";
  position: absolute;
  right: 0.4rem;
  bottom: 0.35rem;
  font-size: 0.68rem;
  color: #1a1812;
  background: rgba(196, 163, 90, 0.88);
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  pointer-events: none;
}
.lex-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
}
.tag {
  font-size: 0.74rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(111, 154, 98, 0.2);
  color: #cfe0c5;
  font-weight: 600;
}
.tag.warn { background: rgba(217, 120, 90, 0.2); color: #f0c2b3; }
.tag.gold { background: rgba(196, 163, 90, 0.2); color: #ebd9a8; }
.lex-item p { margin: 0.35rem 0; color: var(--muted); }
.lex-item p strong { color: var(--ink); font-weight: 600; }
.lex-body {
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.95rem;
}
.lex-body strong { color: var(--ink); }
.lex-body p { margin: 0.4rem 0; }
.lex-body p:first-child { margin-top: 0; }
.lex-extract { display: none; }
.lex-more { margin-top: 0.75rem; text-align: center; }

.lex-img-wrap, .card-img, .quiz-image-wrap {
  margin: 0.55rem 0 0.8rem;
  border-radius: 0.8rem;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #12160f;
  position: relative;
}
.lex-img-wrap img, .card-img img, .quiz-image-wrap img {
  display: block;
  cursor: zoom-in;
}
.jagt-thumb {
  display: block;
  cursor: zoom-in;
  width: 52px;
  height: 52px;
  border-radius: 0.4rem;
  object-fit: cover;
  background: #12160f;
}
.lex-img-wrap img, .card-img img {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  object-position: center;
  background: #0e120c;
}
.quiz-image-wrap {
  margin: 0.4rem 0 1rem;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  background: radial-gradient(ellipse at center, #1c2618 0%, #0e120c 70%);
}
.quiz-image-wrap img {
  max-height: min(55vh, 440px);
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.quiz-image-wrap::after { top: 0.45rem; bottom: auto; }
.bird-card .card-img { margin-top: 0; }
.card-img::after, .lex-img-wrap::after, .quiz-image-wrap::after {
  content: "klik for større";
  position: absolute;
  right: 0.45rem;
  bottom: 0.4rem;
  font-size: 0.68rem;
  color: #1a1812;
  background: rgba(196, 163, 90, 0.88);
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  pointer-events: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(8, 12, 7, 0.9);
}
.lightbox.open { display: flex; }
.lightbox-inner {
  position: relative;
  max-width: min(960px, 100%);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.lightbox-inner img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 0.75rem;
  background: #0e120c;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.lightbox-caption {
  margin: 0;
  color: var(--muted);
  text-align: center;
}
.lightbox-close {
  position: absolute;
  top: -0.4rem;
  right: -0.2rem;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 1.3rem;
  line-height: 1;
}
.lightbox-close:hover { border-color: var(--brass); }

.split-intro {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: end;
  margin: 1.25rem 0 1rem;
}
.split-intro h1 {
  margin: 0 0 0.35rem;
  font-family: var(--display);
}
.split-intro p {
  margin: 0;
  max-width: 40rem;
  color: var(--muted);
}

.pill-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pill {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  font: inherit;
}
.pill.active {
  background: rgba(111, 154, 98, 0.25);
  color: var(--ink);
  border-color: rgba(111, 154, 98, 0.5);
}

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}
.compare article {
  padding: 1rem 1.1rem;
  border-radius: 0.9rem;
  border: 1px solid var(--line);
  background: rgba(36, 48, 40, 0.72);
}
.compare h3 {
  margin: 0 0 0.5rem;
  font-family: var(--display);
  color: var(--brass);
}
.compare ul { margin: 0; padding-left: 1.1rem; color: var(--muted); }
.compare li { margin: 0.3rem 0; }

.bird-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
}
.bird-card {
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  padding: 1rem;
  background: rgba(36, 48, 40, 0.72);
  content-visibility: auto;
  contain-intrinsic-size: 1px 280px;
}
.bird-card h3 {
  margin: 0 0 0.35rem;
  font-family: var(--display);
}
.bird-card .id {
  color: var(--moss);
  font-weight: 700;
  margin: 0.4rem 0;
}
.bird-card p {
  margin: 0.3rem 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.quiz-setup, .quiz-card, .quiz-done {
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.35rem;
  background: rgba(36, 48, 40, 0.78);
  box-shadow: var(--shadow);
  margin-top: 1rem;
}
.quiz-setup h1, .quiz-done h1 {
  margin-top: 0;
  font-family: var(--display);
}
.exam-promo {
  margin: 0 0 1.4rem;
  padding: 1.3rem 1.2rem;
  border-radius: 1rem;
  border: 1px solid rgba(196, 163, 90, 0.32);
  background:
    linear-gradient(145deg, rgba(196, 163, 90, 0.14), transparent 55%),
    rgba(26, 34, 24, 0.55);
}
.exam-promo h1 { margin: 0.15rem 0 0.5rem; font-size: 1.65rem; }
.exam-promo p { margin: 0 0 1rem; color: var(--muted); }
.exam-kicker {
  margin: 0;
  color: var(--brass);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.quiz-setup .section-title { margin: 0 0 0.35rem; font-size: 1.15rem; }
.setup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin: 1rem 0 1.2rem;
}
.setup-grid label { display: grid; gap: 0.35rem; color: var(--muted); }
.quiz-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.quiz-timer {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  color: var(--moss);
}
.quiz-timer.warn { color: var(--brass); }
.quiz-timer.critical { color: var(--danger); }
.quiz-topic-tag {
  margin: 0 0 0.4rem;
  color: var(--brass);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}
.quiz-card h2 {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-size: 1.35rem;
  line-height: 1.3;
}
.quiz-opts { display: grid; gap: 0.55rem; }
.opt {
  text-align: left;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  background: rgba(18, 26, 18, 0.55);
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.opt:hover:not(:disabled) { border-color: rgba(196, 163, 90, 0.55); }
.opt.correct { border-color: var(--ok); background: rgba(126, 201, 138, 0.15); }
.opt.wrong { border-color: var(--danger); background: rgba(217, 120, 90, 0.15); }
.opt.picked { border-color: var(--brass); background: rgba(196, 163, 90, 0.16); }
.opt:disabled { cursor: default; }
.quiz-explain {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 0.75rem;
  background: rgba(196, 163, 90, 0.1);
  color: var(--muted);
}
.quiz-explain strong { color: var(--ink); }
#quiz-next { margin-top: 1rem; }
#quiz-result-title.pass { color: var(--ok); }
#quiz-result-title.fail { color: var(--danger); }
.quiz-review {
  margin: 1.1rem 0 0.5rem;
  display: grid;
  gap: 0.7rem;
}
.quiz-review h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.1rem;
}
.review-item {
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  background: rgba(18, 26, 18, 0.45);
}
.review-q { margin: 0 0 0.4rem; font-weight: 700; color: var(--ink); }
.review-item p { margin: 0.25rem 0; color: var(--muted); font-size: 0.94rem; }
.review-exp { font-size: 0.9rem !important; }
.bad { color: var(--danger); font-weight: 700; }
.good { color: var(--ok); font-weight: 700; }
.hidden { display: none !important; }

.cheat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.8rem;
}
.cheat {
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  padding: 1rem 1.1rem;
  background: rgba(36, 48, 40, 0.72);
}
.cheat h3 {
  margin: 0 0 0.5rem;
  font-family: var(--display);
  color: var(--brass);
}
.cheat ul { margin: 0; padding-left: 1.1rem; color: var(--muted); }
.cheat li { margin: 0.35rem 0; }

.section-title {
  font-family: var(--display);
  font-size: 1.25rem;
  margin: 1.5rem 0 0.75rem;
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: rgba(36, 48, 40, 0.55);
}
.jagt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.jagt-table th,
.jagt-table td {
  padding: 0.7rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.jagt-table th {
  color: var(--brass);
  font-weight: 700;
  position: sticky;
  top: 0;
  background: #243028;
}
.jagt-table tr:last-child td { border-bottom: none; }
.jagt-table tr:hover td { background: rgba(196, 163, 90, 0.06); }
.jagt-tid { color: var(--moss); font-weight: 700; }
.jagt-tid.fredet { color: var(--danger); }
.jagt-tid.saerlig { color: var(--brass); }

.foot {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto 2rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.foot p { margin: 0 0 0.5rem; }
.foot p:last-child { margin-bottom: 0; }
.foot-legal {
  line-height: 1.45;
  font-size: 0.8rem;
  color: rgba(167, 181, 166, 0.85);
}
.foot-legal strong { color: var(--muted); }
.foot-credit a {
  color: var(--brass);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.foot-credit a:hover { color: var(--ink); }
.linkish {
  display: inline;
  border: 0;
  background: none;
  padding: 0;
  color: var(--brass);
  font: inherit;
  font-size: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.img-credit {
  margin: 0.35rem 0 0.55rem;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--muted);
}
.img-credit a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.img-credit a:hover { color: var(--brass); }
.lex-item .img-credit { margin-top: 0.45rem; }

.card-grid, .nav-card { display: none; }

@media (max-width: 760px) {
  .stat-row, .home-links, .compare, .setup-grid { grid-template-columns: 1fr; }
  .lex-item.has-img {
    grid-template-columns: 1fr;
  }
  .lex-side-img {
    order: -1;
    max-height: 200px;
    aspect-ratio: 16 / 10;
    width: 100%;
  }

  .top-bar {
    width: 100%;
    padding: 0.45rem 0.85rem;
    padding-top: max(0.45rem, env(safe-area-inset-top));
  }
  .brand-sub { display: none; }
  .brand-logo { width: 2.1rem; height: 2.1rem; }
  .nav-toggle { display: grid; }

  .tabs {
    display: none;
    width: 100%;
    margin: 0;
    padding: 0.35rem 0.75rem 0.85rem;
    flex-direction: column;
    gap: 0.25rem;
    border-top: 1px solid var(--line);
    background: rgba(14, 18, 12, 0.97);
  }
  .top.nav-open .tabs { display: flex; }
  .tab {
    width: 100%;
    text-align: left;
    padding: 0.75rem 0.9rem;
    border-radius: 0.65rem;
    font-size: 1rem;
  }

  main {
    width: calc(100% - 1.25rem);
    margin-bottom: 2.5rem;
  }
  .hero {
    min-height: clamp(240px, 42vh, 360px);
    padding: 1.2rem 1rem 1.4rem;
  }
  .hero-brand img { width: 3.6rem; height: 3.6rem; }
  .bird-grid, .cheat-grid { grid-template-columns: 1fr; }
}

@media (min-width: 761px) and (max-width: 980px) {
  .brand-sub { display: none; }
  .tab { padding: 0.35rem 0.55rem; font-size: 0.84rem; }
}
