/* Casinokartan — orienteering-map identity */
:root {
  --paper: #ffffff;
  --ink: #1c2633;
  --ink-soft: #4a5565;
  --ink-faint: #6b7584;
  --rule: #dde2e8;
  --course: #a1157f;
  --course-tint: #f7ecf4;
  --flag: #f07f2c;
  --flag-dark: #d9661a;
  --contour: #b07a3e;
  --forest: #17352a;
  --forest-tint: #e8f3e0;
  --forest-line: #3c8d3a;
  --open: #fff3c4;
  --sans: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --wrap: 1200px;
  --measure: 68ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.68;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
a { color: var(--course); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--flag); outline-offset: 2px; border-radius: 2px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: .6rem 1rem; font-family: var(--sans);
}
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- top bars ---------- */
.rg-bar { background: var(--forest); color: #e9f2ec; font-family: var(--sans); font-size: .8125rem; }
.rg-bar p { margin: 0 auto; max-width: var(--wrap); padding: .35rem 1.25rem; }
.rg-bar a { color: #fff; }

.site-head {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96);
  border-bottom: 2px solid var(--ink); backdrop-filter: saturate(1.2) blur(6px);
}
.head-in {
  max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem;
  display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 1rem;
}
.brand {
  display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink);
  font-family: var(--sans); font-weight: 700; font-size: 1.3rem; letter-spacing: -.01em;
}
.logo-mark { width: 30px; height: 30px; flex: none; }

.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav > ul { display: flex; gap: .25rem; }
.nav-item { position: relative; }
.nav-top {
  display: block; padding: 1.25rem .8rem; font-family: var(--sans); font-weight: 600; font-size: .98rem;
  color: var(--ink); text-decoration: none;
}
.nav-item.is-active > .nav-top { box-shadow: inset 0 -4px 0 var(--course); }
.nav-sub {
  position: absolute; top: 100%; left: 0; min-width: 230px; padding: .5rem 0;
  background: #fff; border: 2px solid var(--ink); display: none; max-height: 70vh; overflow: auto;
}
.nav-sub a {
  display: block; padding: .45rem 1rem; font-family: var(--sans); font-size: .95rem; color: var(--ink); text-decoration: none;
}
.nav-sub a:hover, .nav-sub a[aria-current="page"] { background: var(--course-tint); color: var(--course); }
.nav-item:hover .nav-sub, .nav-item:focus-within .nav-sub { display: block; }
.nav-item:last-child .nav-sub { left: auto; right: 0; }

.mnav { display: none; font-family: var(--sans); }
.mnav summary {
  list-style: none; cursor: pointer; font-weight: 700; padding: .5rem .9rem; border: 2px solid var(--ink);
}
.mnav summary::-webkit-details-marker { display: none; }
.mnav[open] summary { background: var(--ink); color: #fff; }
.mnav-panel {
  position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 2px solid var(--ink);
  padding: 1rem 1.25rem 1.5rem; max-height: calc(100vh - 100px); overflow: auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.5rem;
}
.mnav-group p { margin: 0 0 .3rem; font-weight: 700; color: var(--course); }
.mnav-group ul { list-style: none; margin: 0; padding: 0; }
.mnav-group a { display: block; padding: .3rem 0; color: var(--ink); text-decoration: none; }

/* ---------- hero ---------- */
.hero { border-bottom: 1px solid var(--rule); overflow: hidden; }
.hero-in {
  max-width: var(--wrap); margin: 0 auto; padding: 1.75rem 1.25rem 2.25rem;
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); gap: 2rem; align-items: center;
}
.hero-info .hero-in { grid-template-columns: minmax(0, 1fr); }
.hero-text { max-width: 44rem; }
.hero h1 {
  font-family: var(--sans); font-weight: 700; font-size: clamp(2rem, 1.3rem + 2.6vw, 3.1rem);
  line-height: 1.08; letter-spacing: -.02em; margin: .6rem 0 1rem; text-wrap: balance;
}
.lede { font-size: 1.22rem; line-height: 1.55; color: var(--ink); margin: 0 0 1rem; }
.byline { font-family: var(--sans); font-size: .9rem; color: var(--ink-soft); margin: 0 0 1.25rem; }
.byline a { color: var(--ink); }

.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; font-family: var(--sans); font-size: .875rem; }
.crumbs li { color: var(--ink-soft); }
.crumbs li + li::before { content: "/"; margin: 0 .5rem; color: var(--rule); }
.crumbs a { color: var(--ink-soft); }

.quick {
  border: 2px solid var(--ink); background: #fff; padding: 1rem 1.15rem 1.05rem; position: relative;
  box-shadow: 6px 6px 0 var(--open);
}
.quick-q { font-family: var(--sans); font-weight: 700; margin: 0 0 .35rem; font-size: 1.02rem; }
.quick p:last-child { margin: 0; font-size: 1.02rem; line-height: 1.6; }

/* the orienteering course */
.course { width: 100%; height: auto; display: block; }
.course .contours path { fill: none; stroke: var(--contour); stroke-width: 1.1; opacity: .55; }
.course .contours path.index { stroke-width: 2; opacity: .7; }
.course .leg line, .course .leg circle, .course .leg polygon {
  fill: none; stroke: var(--course); stroke-width: 2.6; stroke-linecap: round;
}
.course .leg text { fill: var(--course); font-family: var(--sans); font-weight: 700; font-size: 20px; }
@media (prefers-reduced-motion: no-preference) {
  .course .leg line, .course .leg circle, .course .leg polygon {
    stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 1.6s ease-out .15s forwards;
  }
  .course .leg text { opacity: 0; animation: show .4s ease-out 1.3s forwards; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes show { to { opacity: 1; } }

/* ---------- top list ---------- */
.toplist { max-width: var(--wrap); margin: 2rem auto 0; padding: 0 1.25rem; font-family: var(--sans); }
.tl-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1.5rem; margin-bottom: .75rem; }
.tl-head h2 { font-size: 1.5rem; margin: 0; letter-spacing: -.01em; }
.tl-head p { margin: 0; font-size: .875rem; color: var(--ink-soft); }
.tl-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.tl-row {
  display: grid; grid-template-columns: 48px minmax(170px, 1.1fr) minmax(0, 1.3fr) minmax(0, 1.5fr) 200px;
  gap: 1.25rem; align-items: center; padding: 1.1rem .25rem; border-bottom: 1px solid var(--rule);
}
.tl-row:first-child { background: linear-gradient(90deg, var(--open), rgba(255,243,196,0) 70%); }
.tl-rank {
  width: 40px; height: 40px; border: 2.5px solid var(--course); border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; color: var(--course); font-size: 1.05rem; background: #fff;
}
.tl-brand { display: flex; align-items: center; gap: .8rem; }
.tl-logo {
  width: 54px; height: 54px; flex: none; display: grid; place-items: center; border-radius: 6px;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 1.15rem; letter-spacing: -.02em;
}
.tl-name { margin: 0; font-size: 1.12rem; line-height: 1.2; }
.tl-lic { margin: .15rem 0 0; font-size: .85rem; color: var(--ink-soft); }
.tl-feat { margin: 0; padding: 0; list-style: none; font-size: .9rem; line-height: 1.45; color: var(--ink-soft); }
.tl-feat li { padding-left: 1rem; position: relative; }
.tl-feat li::before { content: ""; position: absolute; left: 0; top: .55em; width: 6px; height: 6px; background: var(--forest-line); border-radius: 50%; }
.tl-offer { margin: 0; display: grid; grid-template-columns: 1.6fr .8fr .9fr; gap: .5rem; }
.tl-offer dt { font-size: .78rem; color: var(--ink-soft); }
.tl-offer dd { margin: 0; font-weight: 700; font-size: .98rem; line-height: 1.3; }
.tl-cta { text-align: center; }
.tl-small { margin: .4rem 0 0; font-size: .78rem; color: var(--ink-soft); line-height: 1.35; }
.btn {
  display: inline-block; width: 100%; padding: .8rem 1rem; background: var(--flag); color: var(--ink);
  font-family: var(--sans); font-weight: 700; font-size: 1rem; text-decoration: none; text-align: center;
  border: 2px solid var(--ink); border-radius: 4px; box-shadow: 3px 3px 0 var(--ink);
  transition: transform .08s ease, box-shadow .08s ease;
}
.btn:hover { background: var(--flag-dark); text-decoration: none; }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.js .tl-row[data-extra] { display: none; }
.js .toplist.show-all .tl-row[data-extra] { display: grid; }
.tl-more {
  margin: 1rem auto 0; display: block; font: 600 .95rem var(--sans); background: #fff; color: var(--ink);
  border: 2px solid var(--ink); padding: .6rem 1.2rem; cursor: pointer; border-radius: 4px;
}
.tl-more:hover { background: var(--course-tint); }
.tl-disclaimer { font-size: .85rem; color: var(--ink-soft); margin: 1rem 0 0; max-width: 80ch; line-height: 1.5; }

/* ---------- article ---------- */
.article { max-width: var(--wrap); margin: 0 auto; padding: 1rem 1.25rem 3rem; }
.article.has-toc { display: grid; grid-template-columns: minmax(0, var(--measure)) minmax(220px, 280px); justify-content: space-between; gap: 3rem; }
.toc-col { order: 2; }
.toc { position: sticky; top: 96px; font-family: var(--sans); font-size: .92rem; padding-top: 1.6rem; }
.toc-title { font-weight: 700; margin: 0 0 .5rem; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--rule); }
.toc li a { display: block; padding: .3rem 0 .3rem .9rem; color: var(--ink-soft); text-decoration: none; line-height: 1.35; margin-left: -2px; border-left: 2px solid transparent; }
.toc li a:hover { color: var(--course); border-left-color: var(--course); }

.prose { max-width: var(--measure); min-width: 0; }
.prose h2 {
  font-family: var(--sans); font-size: clamp(1.45rem, 1.2rem + .9vw, 1.8rem); line-height: 1.2; letter-spacing: -.01em;
  margin: 2.6rem 0 .8rem; text-wrap: balance;
}
.prose h3 { font-family: var(--sans); font-size: 1.22rem; line-height: 1.3; margin: 1.9rem 0 .5rem; }
.prose p { margin: 0 0 1.1rem; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1.2rem; }
.prose li { margin-bottom: .35rem; }
.prose li::marker { color: var(--course); }
.prose strong { font-weight: 600; }
.prose > *:first-child { margin-top: 1.6rem; }

.table-wrap { overflow-x: auto; margin: 1.4rem 0 1.6rem; -webkit-overflow-scrolling: touch; }
.prose table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: .95rem; line-height: 1.4; }
.prose th { text-align: left; font-weight: 700; border-bottom: 2px solid var(--ink); padding: .55rem .7rem .55rem 0; vertical-align: bottom; }
.prose td { border-bottom: 1px solid var(--rule); padding: .6rem .7rem .6rem 0; vertical-align: top; }
.prose td:first-child { font-weight: 600; }

.prose blockquote { margin: 1.5rem 0; padding: 1rem 1.2rem; border-left: 4px solid var(--rule); background: #f7f8fa; }
.prose blockquote p:last-child { margin-bottom: 0; }
.callout-tips, .callout-bra-att-veta { border-left-color: var(--forest-line) !important; background: var(--forest-tint) !important; }
.callout-viktigt { border-left-color: var(--flag) !important; background: #fff4ea !important; }
.callout-spela-ansvarsfullt { border-left-color: var(--forest) !important; background: var(--forest-tint) !important; }

/* FAQ */
.faq { border-top: 2px solid var(--ink); margin-top: 1rem; }
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-item summary {
  cursor: pointer; list-style: none; font-family: var(--sans); font-weight: 600; font-size: 1.06rem;
  padding: 1rem 2.2rem 1rem 0; position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; position: absolute; right: .4rem; top: 50%; width: 14px; height: 14px; margin-top: -7px;
  border: 2.5px solid var(--course); border-radius: 50%;
}
.faq-item[open] summary::after { background: var(--course); }
.faq-a { padding: 0 0 .6rem; }

/* related, sources, author */
.related, .sources, .method { margin-top: 2.6rem; }
.related ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .1rem 1.5rem; font-family: var(--sans); font-size: .98rem; }
.related li { border-bottom: 1px solid var(--rule); margin: 0; }
.related a { display: block; padding: .55rem 0; color: var(--ink); text-decoration: none; }
.related a:hover { color: var(--course); }
.sources ol { font-family: var(--sans); font-size: .95rem; }
.author-box {
  margin-top: 2.6rem; display: flex; gap: 1rem; align-items: flex-start; padding: 1.2rem 0;
  border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); font-family: var(--sans);
}
.author-box p { margin: 0 0 .25rem; font-size: .98rem; line-height: 1.5; }
.ab-name a { color: var(--ink); font-weight: 700; }
.avatar {
  width: 52px; height: 52px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--forest); color: #fff; font-weight: 700;
}
.method ol { font-family: var(--sans); font-size: 1rem; }
.method ol li::marker { font-weight: 700; }

.sitemap-list { columns: 2; column-gap: 2rem; font-family: var(--sans); }

/* ---------- footer ---------- */
.site-foot { background: var(--forest); color: #dce8e0; font-family: var(--sans); font-size: .95rem; }
.site-foot a { color: #fff; }
.foot-in { max-width: var(--wrap); margin: 0 auto; padding: 3rem 1.25rem 2rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 3rem; }
.brand-foot { color: #fff; }
.foot-brand p { line-height: 1.55; margin-top: 1rem; }
.foot-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; }
.f-head { font-weight: 700; color: #fff; margin: 0 0 .6rem; }
.foot-cols ul { list-style: none; margin: 0; padding: 0; }
.foot-cols li { margin-bottom: .4rem; }
.foot-cols a { color: #dce8e0; text-decoration: none; }
.foot-cols a:hover { color: #fff; text-decoration: underline; }
.foot-rg { max-width: var(--wrap); margin: 0 auto; padding: 1.5rem 1.25rem 2.5rem; border-top: 1px solid rgba(255,255,255,.18); }
.foot-rg p { margin: 0 0 .6rem; max-width: 90ch; line-height: 1.55; }
.copy { color: #a9c0b2; font-size: .85rem; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .article.has-toc { display: block; }
  .toc-col { display: none; }
  .tl-row { grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1.3fr) 190px; }
  .tl-feat { display: none; }
}
@media (max-width: 900px) {
  .main-nav { display: none; }
  .mnav { display: block; }
  .site-head { position: sticky; }
  .head-in { position: relative; }
  .hero-in { grid-template-columns: 1fr; padding-bottom: 1.75rem; }
  .hero .course { order: -1; max-height: 150px; width: auto; margin: 0 0 -.5rem auto; opacity: .9; }
  .foot-in { grid-template-columns: 1fr; gap: 2rem; }
  .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  body { font-size: 1.0625rem; }
  .tl-row {
    grid-template-columns: 40px minmax(0, 1fr); gap: .75rem 1rem; padding: 1rem 0;
  }
  .tl-rank { width: 36px; height: 36px; }
  .tl-offer, .tl-cta { grid-column: 1 / -1; }
  .tl-offer { grid-template-columns: 1.5fr .8fr .9fr; }
  .tl-logo { width: 46px; height: 46px; font-size: 1rem; }
  .mnav-panel { grid-template-columns: 1fr; }
  .hero .course { display: none; }
  .hero-in { padding-top: 1.25rem; }
  .sitemap-list { columns: 1; }
  .rg-bar { font-size: .75rem; }
}
@media print {
  .site-head, .rg-bar, .toc-col, .toplist, .course { display: none !important; }
}

/* sitemap */
.sitemap-list { list-style: none; padding: 0; }
.sitemap-list li { break-inside: avoid; border-bottom: 1px solid var(--rule); margin: 0; }
.sitemap-list a { display: block; padding: .5rem 0; color: var(--ink); text-decoration: none; line-height: 1.35; }
.sitemap-list a:hover { color: var(--course); }

/* blog */
.post-list { margin-top: 1.5rem; border-top: 2px solid var(--ink); }
.post-card { padding: 1.4rem 0; border-bottom: 1px solid var(--rule); }
.post-card h2 { margin: 0 0 .3rem !important; font-size: 1.4rem; }
.post-card h2 a { color: var(--ink); text-decoration: none; }
.post-card h2 a:hover { color: var(--course); }
.post-meta { font-family: var(--sans); font-size: .88rem; color: var(--ink-soft); margin: 0 0 .6rem !important; }
