/* ==========================================================================
   Norvasi — bas-stylesheet
   Redaktionell tidningsstil (samma layout som referensdesignen)
   ========================================================================== */

:root {
  --ink: #14161a;
  --ink-soft: #4b4f57;
  --muted: #767b85;
  --hairline: #e4e5e8;
  --hairline-strong: #14161a;
  --paper: #ffffff;
  --paper-alt: #f6f6f7;
  --placeholder-bg: #e7e9ec;
  --placeholder-icon: #b7bcc5;

  --cat-nyheter: #b8232c;
  --cat-casino: #1e7e42;
  --cat-bonus: #a86a08;
  --cat-guide: #1d4ed8;
  --cat-sport: #0b7d72;

  --accent-soft: #a9d2e8;
  --accent-soft-dark: #93c3de;

  --radius: 4px;
  --container: 1280px;
  --gutter: 24px;

  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --focus-ring: 3px solid #1d4ed8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

.skip-link {
  position: absolute;
  left: 8px; top: -48px;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius);
  z-index: 200;
  transition: top .15s ease;
}
.skip-link:focus { top: 8px; }

/* ---------- Placeholder image blocks ---------- */
.img-placeholder {
  position: relative;
  width: 100%;
  background: var(--placeholder-bg);
  overflow: hidden;
  border-radius: var(--radius);
}
.img-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(135deg, transparent 45%, rgba(0,0,0,.04) 45%, rgba(0,0,0,.04) 55%, transparent 55%);
}
.img-placeholder::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 34px; height: 34px;
  transform: translate(-50%, -50%);
  background: var(--placeholder-icon);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M21 19V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2Zm-14-1 3.5-4.5 2.5 3 3.5-4.5L19 18H7ZM8 10a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z'/></svg>") center/contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M21 19V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2Zm-14-1 3.5-4.5 2.5 3 3.5-4.5L19 18H7ZM8 10a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z'/></svg>") center/contain no-repeat;
}
.ratio-16-9 { aspect-ratio: 16 / 9; }
.ratio-4-3 { aspect-ratio: 4 / 3; }
.ratio-1-1 { aspect-ratio: 1 / 1; }
.ratio-3-2 { aspect-ratio: 3 / 2; }

/* ---------- Category tags ---------- */
.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.tag--nyheter { color: var(--cat-nyheter); }
.tag--casino { color: var(--cat-casino); }
.tag--bonus { color: var(--cat-bonus); }
.tag--guide { color: var(--cat-guide); }
.tag--sport { color: var(--cat-sport); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header { border-bottom: 1px solid var(--hairline); background: var(--paper); }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--gutter);
  max-width: var(--container);
  margin: 0 auto;
  gap: 16px;
}

.topbar-left, .topbar-right { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1; }
.topbar-right { justify-content: flex-end; }

.hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  background: none;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  flex: none;
}
.hamburger span,
.hamburger span::before,
.hamburger span::after {
  content: "";
  display: block;
  width: 18px; height: 2px;
  background: var(--ink);
  position: relative;
}
.hamburger span::before { position: absolute; top: -6px; }
.hamburger span::after { position: absolute; top: 6px; }

.social-icons { display: flex; align-items: center; gap: 6px; }
.social-icons a {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  color: var(--ink);
}
.social-icons a:hover { background: var(--paper-alt); border-color: var(--ink); }
.social-icons svg { width: 14px; height: 14px; }

.logo {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: .02em;
  text-align: center;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}
.logo img {
  height: 28px;
  width: auto;
  display: block;
}
.footer-brand .logo img {
  height: 24px;
  filter: brightness(0) invert(1);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 3px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  border: 1px solid var(--hairline);
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
  white-space: nowrap;
}
/* Light-blue "Subscribe" pill from the reference masthead */
.btn--subscribe {
  background: var(--accent-soft);
  border-color: var(--accent-soft);
  color: var(--ink);
}
.btn--subscribe:hover { background: var(--accent-soft-dark); border-color: var(--accent-soft-dark); }
.btn--outline { background: #fff; color: var(--ink); }
.btn--outline:hover { border-color: var(--ink); }
.btn--solid { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn--solid:hover { background: #000; }

.icon-btn {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  background: none; border: none; color: var(--ink);
  border-radius: 50%;
}
.icon-btn:hover { background: var(--paper-alt); }
.icon-btn svg { width: 18px; height: 18px; }

.main-nav {
  border-top: 1px solid var(--hairline);
}
.main-nav .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  padding-top: 11px;
  padding-bottom: 11px;
}
/* Thin pipe separators between top-level nav items (as in the reference) */
.main-nav .container > a,
.main-nav .container > .nav-item { padding-left: 15px; padding-right: 15px; }
.main-nav .container > a + a,
.main-nav .container > a + .nav-item,
.main-nav .container > .nav-item + a,
.main-nav .container > .nav-item + .nav-item { border-left: 1px solid var(--hairline); }
.main-nav a {
  font-size: 14.5px;
  font-weight: 600;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  border-bottom-color: var(--ink);
}
.nav-item { position: relative; display: flex; align-items: center; gap: 4px; }
.nav-item > a { display: flex; align-items: center; gap: 4px; }
.nav-item .caret { width: 9px; height: 9px; opacity: .6; flex: none; transition: transform .15s ease; }
.nav-item:hover .caret,
.nav-item:focus-within .caret { transform: rotate(180deg); }

.nav-dropdown {
  list-style: none;
  margin: 0;
  padding: 8px 0;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: 0 12px 24px rgba(20, 22, 26, .12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
  z-index: 50;
}
.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown li { margin: 0; }
.nav-dropdown a {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  border-bottom: none !important;
}
.nav-dropdown a:hover { background: var(--paper-alt); }

@media (max-width: 900px) {
  .nav-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--hairline);
    margin-left: 8px;
    padding: 0 0 4px;
  }
  .nav-item .caret { display: none; }
}

@media (max-width: 900px) {
  .hamburger { display: flex; }
  .main-nav { display: none; }
  .main-nav.is-open { display: block; }
  .main-nav .container { flex-direction: column; align-items: flex-start; gap: 4px; }
  .main-nav a { display: block; padding: 10px 0; width: 100%; }
  .main-nav .container > a,
  .main-nav .container > .nav-item {
    padding-left: 0; padding-right: 0;
    border-left: none;
    width: 100%;
  }
  .topbar-left .social-icons { display: none; }
  .btn--subscribe { display: none; }
  .search-toggle { display: none; }
  .topbar-left, .topbar-right { min-width: 0; }
}
@media (max-width: 420px) {
  .logo img { height: 22px; }
  .topbar { padding: 12px 16px; gap: 8px; }
}

/* ==========================================================================
   Layout helpers
   ========================================================================== */
.section { padding: 22px 0 26px; }
/* Rule sits inside the container width, not full-bleed (matches reference) */
.section--rule { padding-top: 0; }
.section--rule > .container {
  border-top: 1px solid var(--hairline-strong);
  padding-top: 20px;
}
.section-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
}
.section-title {
  font-family: var(--font-sans);
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -.015em;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.section-title:hover { color: var(--ink-soft); }
.section-title .arrow { font-size: 19px; font-weight: 400; }

.divider {
  border: none;
  border-top: 1px solid var(--hairline);
  margin: 0;
}

.meta {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
}
.meta svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }

/* ==========================================================================
   Featured (hero) section
   ========================================================================== */
.featured-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.55fr) minmax(0, 1fr);
  gap: 34px;
}
.featured-main {
  border-right: 1px solid var(--hairline);
  padding-right: 34px;
}

/* Section heading with the rule ABOVE it (matches reference masthead style) */
.block-title {
  font-family: var(--font-sans);
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -.015em;
  line-height: 1.1;
  margin: 0 0 18px;
  padding-top: 13px;
  border-top: 1px solid var(--hairline-strong);
}

/* Lead article: narrow text column left, large image right */
.featured-lead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.15fr);
  gap: 28px;
  align-items: start;
}
.featured-text .tag { margin-bottom: 6px; }
.featured-lead h1,
.featured-lead h2.headline {
  font-family: var(--font-serif);
  font-size: 27px;
  line-height: 1.2;
  font-weight: 700;
  margin: 0 0 12px;
}
.featured-lead a.headline-link:hover { color: var(--ink-soft); }
.featured-lead .meta { margin: 0 0 14px; }
.featured-excerpt {
  font-family: var(--font-serif);
  font-size: 15.5px;
  line-height: 1.55;
  color: #23252a;
  margin: 0;
}
/* Thin rule separating the lead story from the card row inside the same column */
.column-rule {
  border: none;
  border-top: 1px solid var(--hairline);
  margin: 26px 0 22px;
}

.featured-media { margin: 0; }
.featured-media figcaption {
  font-size: 13px;
  color: var(--muted);
  margin-top: 12px;
  line-height: 1.6;
}

.side-title {
  font-family: var(--font-sans);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.015em;
  line-height: 1.1;
  border-top: 1px solid var(--hairline-strong);
  padding-top: 13px;
  margin: 0 0 16px;
}
.side-title--spaced { margin-top: 26px; }

.topic-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 26px;
}
.topic-card { margin: 0; }
.topic-card .img-placeholder,
.topic-card .img-cover { border-radius: 2px; }
.topic-card figcaption {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  margin-top: 9px;
}

.trending-list { list-style: none; margin: 0; padding: 0; }
.trending-list li {
  padding: 15px 0;
  border-bottom: 1px solid var(--hairline);
}
.trending-list li:first-child { padding-top: 0; }
.trending-list li:last-child { border-bottom: none; }
.trending-list a {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.3;
}
.trending-list a:hover { color: var(--ink-soft); }

@media (max-width: 700px) {
  .featured-lead { grid-template-columns: 1fr; gap: 18px; }
  .featured-lead h1, .featured-lead h2.headline { font-size: 24px; }
}

/* ==========================================================================
   3-card grid row
   ========================================================================== */
.card-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.article-card h3 {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.32;
  margin: 10px 0 0;
}
.article-card h3 a:hover { color: var(--ink-soft); }
.article-card .img-placeholder { margin-bottom: 2px; }

/* ==========================================================================
   Horizontal scroll row (carousel)
   ========================================================================== */
.scroll-row-wrap { position: relative; }
.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 4 * 24px) / 5);
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.scroll-row::-webkit-scrollbar { display: none; }
.scroll-row > .article-card { scroll-snap-align: start; min-width: 0; }

.scroll-arrow {
  position: absolute;
  top: 38%;
  transform: translateY(-50%);
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--hairline);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  z-index: 2;
}
.scroll-arrow:hover { background: var(--paper-alt); }
.scroll-arrow--prev { left: -20px; }
.scroll-arrow--next { right: -20px; }
.scroll-arrow svg { width: 16px; height: 16px; }
@media (max-width: 700px) {
  .scroll-arrow { display: none; }
  .scroll-row { grid-auto-columns: 78%; }
}

/* ==========================================================================
   Dark feature banner
   ========================================================================== */
.banner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius);
  overflow: hidden;
}
.banner-copy { padding: 48px; display: flex; flex-direction: column; justify-content: center; }
.banner-copy h2 {
  font-family: var(--font-serif);
  font-size: 30px;
  line-height: 1.2;
  margin: 0 0 16px;
}
.banner-copy h2 a:hover { opacity: .85; }
.banner-copy p { color: #cfd2d8; margin: 0 0 24px; font-size: 15.5px; }
.byline { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: #cfd2d8; }
.byline .avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: #3a3d44;
  flex: none;
}
.banner-media .img-placeholder { border-radius: 0; height: 100%; min-height: 320px; background: #2a2c31; }
.banner-media img { width: 100%; height: 100%; min-height: 320px; object-fit: cover; border-radius: 0; display: block; }
.banner-media .img-placeholder::after { background: #565a63; }
@media (max-width: 800px) {
  .banner { grid-template-columns: 1fr; }
  .banner-media .img-placeholder { min-height: 220px; }
}

/* ==========================================================================
   4-card grid row
   ========================================================================== */
.card-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.play-badge {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(20,22,26,.65);
  display: flex; align-items: center; justify-content: center;
}
.play-badge svg { width: 16px; height: 16px; fill: #fff; }
.article-card { position: relative; }

@media (max-width: 980px) {
  .featured-grid { grid-template-columns: 1fr; }
  .featured-main { border-right: none; padding-right: 0; }
  .card-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .card-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .card-grid-3, .card-grid-4 { grid-template-columns: 1fr; }
  .section-title { font-size: 20px; }
}

/* ==========================================================================
   Generic page header (for interior pages)
   ========================================================================== */
.page-hero {
  background: var(--paper-alt);
  border-bottom: 1px solid var(--hairline);
  padding: 48px 0 36px;
  text-align: center;
}
.page-hero h1 {
  font-family: var(--font-serif);
  font-size: 38px;
  margin: 0 0 10px;
}
.page-hero p { color: var(--ink-soft); max-width: 620px; margin: 0 auto; }

.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
}
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }
.breadcrumb .sep { margin: 0 6px; }

/* ---------- Blog listing ---------- */
.blog-layout {
  display: grid;
  grid-template-columns: 2.3fr 1fr;
  gap: 44px;
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px 28px;
}
.article-card--list h3 { font-size: 19px; }
.article-card--list p.excerpt {
  color: var(--ink-soft);
  font-size: 14.5px;
  margin: 8px 0 0;
  line-height: 1.55;
}
@media (max-width: 800px) {
  .blog-layout { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}
.pagination a, .pagination span {
  display: flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px;
  padding: 0 10px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  font-size: 14px; font-weight: 600;
}
.pagination a:hover { border-color: var(--ink); }
.pagination .is-current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Single article ---------- */
.article-header { max-width: 780px; margin: 0 auto 28px; text-align: left; }
.article-header h1 {
  font-family: var(--font-serif);
  font-size: 38px;
  line-height: 1.2;
  margin: 0 0 16px;
}
.article-header .meta { margin-top: 14px; }
.article-body {
  max-width: 780px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.75;
  color: #23252a;
}
.article-body h2 {
  font-family: var(--font-serif);
  font-size: 24px;
  margin: 34px 0 14px;
}
.article-body p { margin: 0 0 20px; }
.article-body figure { margin: 28px 0; }
.article-body figcaption { font-size: 13.5px; color: var(--muted); margin-top: 10px; }

/* ---------- Ways-to-win diagram ---------- */
.ways-diagram {
  background: var(--paper-alt);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 24px 20px 20px;
  max-width: 100%;
}
.ways-diagram-svg {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
  margin: 0 auto;
  overflow: visible;
}
.diagram-col-label {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  fill: var(--ink);
}
.diagram-count-label {
  font-family: var(--font-sans);
  font-size: 12.5px;
  fill: var(--ink-soft);
}
.diagram-symbol { fill: var(--cat-guide); }
.diagram-symbol-dot { fill: #fff; }
.ways-diagram figcaption { margin-top: 16px; text-align: center; }
.ways-diagram-equation {
  display: block;
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 700;
  color: var(--ink);
}
.ways-diagram-note {
  display: block;
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.5;
}
@media (max-width: 560px) {
  .ways-diagram { padding: 18px 12px 16px; }
  .ways-diagram-equation { font-size: 18px; }
}

/* ---------- Poker table diagram ---------- */
.table-diagram {
  background: var(--paper-alt);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 20px 16px;
  max-width: 100%;
}
.poker-table-svg {
  display: block;
  width: 100%;
  max-width: 620px;
  height: auto;
  margin: 0 auto;
  overflow: visible;
}
.table-oval { fill: #eaf4ec; stroke: var(--cat-casino); stroke-width: 3; }
.table-dealer { fill: var(--ink); }
.table-dealer-label {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  fill: #fff;
}
.table-seat { fill: #fff; stroke: var(--hairline-strong); stroke-width: 2; }
.table-seat-badge { stroke: none; }
.table-seat-badge--d { fill: var(--ink); }
.table-seat-badge--sb { fill: var(--cat-guide); }
.table-seat-badge--bb { fill: var(--cat-nyheter); }
.table-badge-label {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  fill: #fff;
  text-anchor: middle;
}
.table-card { fill: #fff; stroke: var(--hairline-strong); stroke-width: 1.5; }
.table-card-group-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  fill: var(--ink-soft);
}
.table-diagram figcaption { margin-top: 16px; }
.table-diagram-note { display: block; font-size: 13.5px; color: var(--muted); line-height: 1.5; text-align: center; }
@media (max-width: 560px) {
  .table-diagram { padding: 16px 10px; }
}

/* ---------- Hand-comparison cards ---------- */
.hand-example {
  background: var(--paper-alt);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 18px 20px;
  margin: 0 0 16px;
}
.hand-example-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--hairline);
}
.hand-example-row:last-of-type { border-bottom: none; }
.hand-example-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  min-width: 168px;
}
.hand-example-cards { display: flex; flex-wrap: wrap; gap: 6px; }
.card-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--hairline-strong);
  border-radius: 4px;
  background: #fff;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
}
.card-chip--red { color: var(--cat-nyheter); }
.hand-example-result {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
  font-weight: 700;
  font-size: 14.5px;
  color: var(--ink);
}
@media (max-width: 560px) {
  .hand-example-label { min-width: 100%; }
}

.share-row {
  display: flex; align-items: center; gap: 10px;
  margin: 28px 0;
  padding: 18px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.share-row span.label { font-size: 13px; font-weight: 700; text-transform: uppercase; color: var(--muted); margin-right: 4px; }

.author-box {
  max-width: 780px;
  margin: 36px auto;
  display: flex; gap: 16px;
  padding: 24px;
  background: var(--paper-alt);
  border-radius: var(--radius);
}
.author-box .avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--placeholder-bg); flex: none; }
.author-box h3 { margin: 0 0 6px; font-size: 16px; }
.author-box p { margin: 0; font-size: 14px; color: var(--ink-soft); }

.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }

.article-layout { display: grid; grid-template-columns: 2.3fr 1fr; gap: 44px; align-items: start; }
@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr 1fr; }
  .article-header h1, .article-body h2 { font-size: 28px; }
}

/* ---------- Contact / About / Legal ---------- */
.simple-page { max-width: 780px; margin: 0 auto; }
.simple-page h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  margin: 32px 0 12px;
}
.simple-page p { margin: 0 0 16px; color: #23252a; }
.simple-page ul { margin: 0 0 16px; padding-left: 20px; }
.simple-page li { margin-bottom: 8px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 13.5px; font-weight: 700; }
.form-field input,
.form-field textarea {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  min-height: 48px;
}
.form-field textarea { min-height: 140px; resize: vertical; }
.form-note { font-size: 13px; color: var(--muted); margin-top: 6px; }
.form-success {
  background: #eaf6ee; border: 1px solid var(--cat-casino);
  color: #16532b; padding: 16px 18px; border-radius: var(--radius);
  margin-bottom: 24px; font-size: 14.5px;
}
.form-error {
  background: #fbeaea; border: 1px solid var(--cat-nyheter);
  color: #7a1a20; padding: 16px 18px; border-radius: var(--radius);
  margin-bottom: 24px; font-size: 14.5px;
}

.contact-info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 40px; }
.contact-info-card { padding: 22px; border: 1px solid var(--hairline); border-radius: var(--radius); }
.contact-info-card svg { width: 22px; height: 22px; margin-bottom: 10px; }
.contact-info-card h3 { font-size: 15px; margin: 0 0 6px; }
.contact-info-card p { margin: 0; font-size: 14px; color: var(--ink-soft); }
@media (max-width: 700px) {
  .form-grid, .contact-info-grid { grid-template-columns: 1fr; }
}

/* ---------- Utility / layout-specific overrides (kept out of inline style) ---------- */
.honeypot-field { position: absolute; left: -9999px; }
.form-submit { margin-top: 14px; }
.page-image { margin-bottom: 32px; }
.section--tight { padding-top: 0; }
.article-lead-figure { margin: 0 0 32px; }
img.ratio-16-9, img.ratio-4-3, img.ratio-1-1, img.ratio-3-2 {
  width: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

/* Robust real-photo aspect-ratio wrapper: aspect-ratio on a plain div is
   reliable; applying it directly to a lazy-loaded <img> with width/height
   attributes can mis-size before the image finishes loading. */
.img-cover {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}
.img-cover img, .img-cover picture {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.img-cover picture img { border-radius: 0; }
.share-row .icon-btn { border: 1px solid var(--hairline); }
.article-card--list .meta { margin-top: 10px; }

/* ---------- 404 ---------- */
.error-page {
  text-align: center;
  padding: 90px 0 100px;
}
.error-page .code {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 120px;
  line-height: 1;
  margin: 0;
}
.error-page h1 { font-size: 24px; margin: 12px 0 10px; }
.error-page p { color: var(--ink-soft); margin: 0 0 30px; }
.error-search { display: flex; max-width: 420px; margin: 0 auto 26px; gap: 8px; }
.error-search input {
  flex: 1; border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 0 14px; min-height: 48px; font-size: 15px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--ink); color: #cfd2d8; margin-top: 60px; }
.footer-top { padding: 56px 0 36px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand .logo { color: #fff; text-align: left; }
.footer-brand p { font-size: 14px; line-height: 1.7; color: #a8acb5; margin: 14px 0 18px; max-width: 320px; }
.footer-col h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: #fff; margin: 0 0 16px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { font-size: 14.5px; color: #c3c6cd; }
.footer-col a:hover { color: #fff; }
.footer-social { display: flex; gap: 8px; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid #3a3d44;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.footer-social a:hover { background: #23262c; }
.footer-social svg { width: 16px; height: 16px; }

.responsible-badge {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid #3a3d44;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  margin-top: 18px;
}
.responsible-badge .age { border: 1px solid #fff; border-radius: 3px; padding: 1px 5px; }

.footer-bottom {
  border-top: 1px solid #2a2d33;
  padding: 20px 0;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
  font-size: 13px;
  color: #8b8f99;
}
.footer-bottom a:hover { color: #fff; }
.footer-bottom-links { display: flex; gap: 18px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-top { grid-template-columns: 1fr; padding: 40px 0 24px; text-align: center; }
  .footer-brand { display: flex; flex-direction: column; align-items: center; }
  .footer-brand .logo { justify-content: center; }
  .footer-brand p { margin-left: auto; margin-right: auto; }
  .footer-social { justify-content: center; }
  .footer-bottom { justify-content: center; text-align: center; }
  .footer-bottom-links { justify-content: center; }
}
