/* ======================================================
   CasinoFredrik.sbs — Nordic Minimal, Navy & Coral palette
   Clean editorial design, mobile-first, compact hero
   ====================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--coral); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--coral-dark); text-decoration: underline; text-underline-offset: 3px; }

:root {
  --paper: #FFFFFF;
  --paper-2: #FAFAFA;
  --paper-3: #F3F3F6;

  --navy: #0C1225;
  --navy-2: #1A2340;
  --navy-soft: #2E3A5C;
  --navy-tint: #E6E9F2;

  --coral: #E64B4B;
  --coral-dark: #C53030;
  --coral-soft: #FFF1F0;
  --coral-tint: #FFDADA;

  --gold: #D4A857;
  --gold-soft: #FBF2DD;

  --ink: #0C1225;
  --ink-2: #4A5068;
  --ink-3: #767D96;
  --ink-4: #B4BAC9;

  --line: #ECEEF4;
  --line-2: #D7DAE4;

  --max-w: 1160px;
  --radius: 8px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --shadow-1: 0 1px 2px rgba(12, 18, 37, .04), 0 2px 6px rgba(12, 18, 37, .04);
  --shadow-2: 0 4px 14px rgba(12, 18, 37, .08);
  --shadow-coral: 0 4px 14px rgba(230, 75, 75, .25);

  --font-display: 'Archivo Black', 'Impact', sans-serif;
  --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ======================================================
   Typography
   ====================================================== */
h1 {
  font-family: var(--font-display);
  color: var(--navy);
  font-weight: 400; /* Archivo Black ships 400 only, visual weight is black */
  letter-spacing: -.02em;
  line-height: 1.08;
  margin: .1em 0 .45em;
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  text-transform: none;
}
h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--navy);
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.22;
  margin: 1.4em 0 .45em;
}
h2 { font-size: clamp(1.5rem, 2.6vw, 2.05rem); font-weight: 700; }
h3 { font-size: clamp(1.1rem, 1.4vw, 1.25rem); font-weight: 700; letter-spacing: -.005em; }
h4 { font-size: 1.05rem; font-weight: 700; }

h2 { position: relative; padding-top: .2em; }
h2::before {
  content: "";
  display: block;
  width: 36px;
  height: 3px;
  background: var(--coral);
  margin-bottom: .55em;
  border-radius: 2px;
}

p { margin: 0 0 1em; color: var(--ink-2); }
ul, ol { padding-left: 1.3em; margin: 0 0 1em; color: var(--ink-2); }
li { margin-bottom: .3em; }
strong { color: var(--navy); font-weight: 700; }

.flag-inline {
  display: inline-block;
  height: .78em;
  width: auto;
  vertical-align: -.06em;
  margin: 0 .18em 0 .14em;
  border: 1px solid rgba(12, 18, 37, .12);
  border-radius: 1.5px;
}

/* ======================================================
   Container
   ====================================================== */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* ======================================================
   Site header
   ====================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; max-width: var(--max-w); margin: 0 auto;
}
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo img { height: 42px; width: auto; max-width: 220px; }
.logo-text { display: none; }

.nav { display: flex; gap: 22px; align-items: center; }
.nav a {
  color: var(--navy);
  font-weight: 500; font-size: .93rem;
  padding: 6px 0; position: relative;
  transition: color .15s ease;
}
.nav a:hover {
  color: var(--coral);
  text-decoration: none;
}
.nav a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--coral);
  transform: scaleX(0); transform-origin: left;
  transition: transform .2s ease;
}
.nav a:hover::after { transform: scaleX(1); }

.menu-toggle {
  display: none;
  background: transparent; border: 1px solid var(--line-2);
  color: var(--navy); font-size: 20px;
  width: 42px; height: 42px; border-radius: 8px;
  cursor: pointer;
}

@media (max-width: 980px) {
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); flex-direction: column; align-items: flex-start;
    padding: 10px 20px 16px; gap: 0;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow-2);
  }
  .nav.open { display: flex; }
  .nav a { padding: 10px 0; width: 100%; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .nav a:last-child { border-bottom: none; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .logo img { height: 36px; max-width: 180px; }
}

/* ======================================================
   Page hero (COMPACT for mobile above-the-fold)
   ====================================================== */
.page-hero {
  background: var(--paper);
  padding: 20px 0 16px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.page-hero .container { position: relative; z-index: 2; }
.page-hero .breadcrumbs {
  color: var(--ink-3); text-transform: uppercase;
  letter-spacing: .08em; font-size: 11px; font-weight: 600;
  margin-bottom: 10px;
}
.page-hero .breadcrumbs a { color: var(--ink-3); }
.page-hero .breadcrumbs a:hover { color: var(--coral); }
.page-hero .breadcrumbs .sep { margin: 0 .4em; opacity: .5; }

.page-hero h1 {
  color: var(--navy);
  margin: 0 0 .35em;
  max-width: 900px;
}
.page-hero .lead {
  color: var(--ink-2);
  font-weight: 500; font-size: 1.02rem;
  max-width: 640px; line-height: 1.5;
  margin-bottom: 0;
}

.page-hero .blob { display: none; }

@media (max-width: 640px) {
  .page-hero { padding: 14px 0 12px; }
  .page-hero h1 { font-size: 1.55rem; line-height: 1.2; margin-bottom: .3em; }
  .page-hero .lead { font-size: .95rem; }
  .page-hero .breadcrumbs { margin-bottom: 8px; }

  /* Mobile-only clamp: hero intro shortened to 2 lines + "Läs mer" button if needed */
  .page-hero .lead.lead-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 2px;
  }
  .page-hero .lead.lead-clamp.lead-open {
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    overflow: visible;
    margin-bottom: 6px;
  }
  .lead-more-btn {
    display: inline-block;
    background: transparent;
    border: none;
    color: var(--coral);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: .85rem;
    padding: 4px 0 0;
    margin: 0;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
  }
  .lead-more-btn:hover,
  .lead-more-btn:focus-visible {
    color: var(--coral-dark);
    outline: none;
  }
}

/* Desktop: never clamp the lead, hide any JS-added "Läs mer" button */
@media (min-width: 641px) {
  .page-hero .lead.lead-clamp {
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    overflow: visible;
  }
  .lead-more-btn { display: none !important; }
}

/* ======================================================
   Featured cards (casino list)
   ====================================================== */
.list-heading {
  text-align: center;
  margin: 26px 0 20px !important;
  padding-top: 0 !important;
}
.list-heading::before { margin: 0 auto .55em !important; }

.featured-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 0 0 30px;
}
.feat-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 20px 20px;
  position: relative;
  display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .22s ease, border-color .22s ease;
}
.feat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-2);
  border-color: var(--navy-tint);
}
.feat-card.is-hot {
  border-color: var(--coral);
  box-shadow: 0 0 0 1px var(--coral) inset;
}
.feat-flame {
  position: absolute; top: -10px; left: 14px;
  background: var(--coral); color: #FFF;
  width: 32px; height: 32px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px; box-shadow: var(--shadow-coral);
  z-index: 3;
}
.feat-thumb {
  width: 100%; aspect-ratio: 16/10;
  background: var(--paper-2);
  border-radius: 10px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  padding: 10px;
}
.feat-thumb img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  object-position: center;
  margin: 0 auto;
  display: block;
}
.feat-card h3 {
  margin: 0 0 10px; color: var(--navy);
  font-size: 1.1rem;
}
.feat-list {
  list-style: none; padding: 0; margin: 0 0 16px;
  flex-grow: 1;
}
.feat-list li {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 4px 0;
  color: var(--ink-2); font-size: .93rem;
}
.feat-list .ico {
  font-size: 1.05rem; flex-shrink: 0;
}
.btn-block { width: 100%; }

@media (max-width: 900px) {
  .featured-cards { grid-template-columns: 1fr; gap: 14px; margin-bottom: 20px; }
  .list-heading { margin: 18px 0 14px !important; font-size: 1.3rem !important; }

  /* Mobile layout: image on the left, h3 + features on the right, button full-width below */
  .feat-card {
    padding: 16px 16px 16px;
    display: grid;
    grid-template-columns: 112px 1fr;
    grid-template-rows: auto 1fr auto;
    column-gap: 14px;
    row-gap: 4px;
    align-items: start;
  }
  .feat-thumb {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 100%;
    aspect-ratio: 1 / 1;
    margin-bottom: 0;
    padding: 8px;
  }
  .feat-card > h3 {
    grid-column: 2;
    grid-row: 1;
    margin: 0 0 6px;
    font-size: 1rem;
    line-height: 1.25;
    align-self: start;
  }
  .feat-list {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
    align-self: start;
  }
  .feat-list li {
    padding: 2px 0;
    font-size: .88rem;
    line-height: 1.3;
  }
  .feat-card > .btn {
    grid-column: 1 / -1;
    grid-row: 3;
    margin-top: 12px;
  }
  .feat-flame {
    top: -8px; left: 10px;
    width: 28px; height: 28px;
    font-size: 14px;
  }
}
@media (max-width: 420px) {
  .feat-card {
    grid-template-columns: 96px 1fr;
    padding: 14px 14px 14px;
    column-gap: 12px;
  }
  .feat-card > h3 { font-size: .95rem; }
  .feat-list li { font-size: .83rem; }
}

/* ======================================================
   Buttons
   ====================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px;
  font-family: var(--font-body); font-weight: 700;
  font-size: .98rem; letter-spacing: .005em;
  border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer;
  transition: transform .14s ease, background .18s ease, box-shadow .22s ease;
  text-decoration: none;
}
.btn-primary {
  background: var(--coral); color: #FFF;
  box-shadow: var(--shadow-coral);
}
.btn-primary:hover {
  background: var(--coral-dark); color: #FFF;
  text-decoration: none; transform: translateY(-1px);
}
.btn-secondary {
  background: var(--navy); color: #FFF;
}
.btn-secondary:hover {
  background: var(--navy-2); color: #FFF;
  text-decoration: none;
}
.btn-ghost {
  background: transparent; color: var(--navy);
  border: 1px solid var(--line-2);
}
.btn-ghost:hover {
  background: var(--paper-3); border-color: var(--navy-tint);
  text-decoration: none;
}

/* ======================================================
   Trust stats — floating pills with coral accent chip
   ====================================================== */
.trust-stats-wrap { padding: 0 20px; margin: 36px 0 44px; }
.trust-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  max-width: 1080px;
  margin: 0 auto;
  background: transparent;
  padding: 0;
  color: var(--navy);
}
.ts-tile {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 20px 18px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: transform .18s ease, box-shadow .22s ease, border-color .22s ease;
  overflow: hidden;
}
.ts-tile::before {
  content: "";
  position: absolute;
  left: 20px; top: 20px;
  width: 32px; height: 4px;
  background: var(--coral);
  border-radius: 999px;
}
.ts-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
  border-color: var(--coral);
}
.ts-num {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 400;
  letter-spacing: -.02em;
  color: var(--navy);
  line-height: 1;
  margin: 18px 0 4px;
  display: flex; align-items: baseline;
}
.ts-lab {
  color: var(--ink-3);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
@media (max-width: 900px) {
  .trust-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .trust-stats-wrap { margin: 26px 0 32px; padding: 0 16px; }
  .ts-tile { padding: 18px 16px 14px; }
  .ts-tile::before { left: 16px; top: 16px; width: 24px; }
  .ts-num { font-size: 1.6rem; margin-top: 14px; }
  .ts-lab { font-size: .72rem; }
}
@media (max-width: 420px) {
  .ts-tile { padding: 16px 14px 12px; }
  .ts-num { font-size: 1.4rem; }
  .ts-lab { font-size: .68rem; }
}

/* ======================================================
   Content sections
   ====================================================== */
.content {
  padding: 10px 0 40px;
}
.content h2 { margin-top: 1.6em; }
.content > .container > section { margin-bottom: 20px; }

/* ======================================================
   TOC — collapsible with arrow top-right
   ====================================================== */
.toc {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin: 24px 0 28px;
  position: relative;
}
.toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  padding: 0;
}
.toc-title {
  margin: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  font-size: 1.05rem !important;
  color: var(--navy);
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -.005em;
  flex-grow: 1;
}
.toc-title::before { display: none !important; }
.toc-toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--coral);
  color: #FFF;
  border: none;
  cursor: pointer;
  padding: 0;
  font-size: 0;
  box-shadow: 0 2px 8px rgba(230, 75, 75, .25);
  transition: background .18s ease, transform .25s ease, box-shadow .22s ease;
}
.toc-toggle:hover {
  background: var(--coral-dark);
  box-shadow: 0 4px 12px rgba(230, 75, 75, .35);
}
.toc-toggle::before {
  content: "";
  display: block;
  width: 10px; height: 10px;
  border-right: 2.5px solid #FFF;
  border-bottom: 2.5px solid #FFF;
  transform: rotate(45deg);
  margin-top: -3px;
  transition: transform .25s ease;
}
.toc.is-collapsed .toc-toggle::before {
  transform: rotate(-135deg);
  margin-top: 3px;
}
.toc.is-collapsed .toc-header { margin-bottom: 0; }
.toc ol {
  margin: 0; padding-left: 1.3em;
  color: var(--ink-2); font-size: .94rem;
  max-height: 1000px;
  overflow: hidden;
  transition: max-height .35s ease, opacity .25s ease, margin .25s ease;
  opacity: 1;
}
.toc.is-collapsed ol {
  max-height: 0;
  opacity: 0;
  margin: 0;
  pointer-events: none;
}
.toc ol li { margin-bottom: .35em; }
.toc a { color: var(--navy); font-weight: 500; }
.toc a:hover { color: var(--coral); text-decoration: underline; text-underline-offset: 3px; }

/* Hide the default ▾ text in toggle (we use ::before chevron) */
.toc-toggle { text-indent: -9999px; overflow: hidden; }

/* Feature cards (checklist items) */
.feature-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 16px 0 22px;
}
.feature-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
}
.feature-card .ico {
  font-size: 1.5rem;
  display: block; margin-bottom: 8px;
}
.feature-card h3 {
  margin: 0 0 6px; font-size: 1.02rem;
}
.feature-card p {
  margin: 0; font-size: .9rem; color: var(--ink-2);
}

/* Step grid */
.step-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin: 18px 0 24px;
}
.step-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  position: relative;
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--coral); color: #FFF;
  font-weight: 700; font-size: 1rem;
  margin-bottom: 10px;
}
.step-box h3 { margin: 0 0 6px; font-size: 1.02rem; }
.step-box p { margin: 0; font-size: .92rem; color: var(--ink-2); }

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin: 16px 0 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .93rem;
}
th {
  background: var(--navy); color: #FFF;
  text-align: left; padding: 12px 14px;
  font-weight: 600; font-size: .9rem;
  letter-spacing: .01em;
}
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:nth-child(even) { background: var(--paper-2); }

/* Pros / Cons */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 16px 0 24px;
}
.pros, .cons {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 20px 16px;
}
.pros { border-left: 4px solid #2DBB7F; }
.cons { border-left: 4px solid var(--coral); }
.pros h3, .cons h3 {
  margin: 0 0 10px; font-size: 1.05rem; color: var(--navy);
}
.pros ul, .cons ul {
  padding-left: 1.1em; margin: 0;
  font-size: .93rem;
}
.pros li, .cons li { margin-bottom: .35em; }
@media (max-width: 640px) {
  .pros-cons { grid-template-columns: 1fr; gap: 12px; }
}

/* Callout */
.callout {
  background: var(--coral-soft);
  border-left: 4px solid var(--coral);
  padding: 18px 20px;
  border-radius: var(--radius);
  margin: 18px 0 22px;
}
.callout h3 {
  margin: 0 0 8px; color: var(--navy); font-size: 1.05rem;
}
.callout.is-warning {
  background: var(--gold-soft);
  border-left-color: var(--gold);
}
.callout a { color: var(--navy); text-decoration: underline; }
.callout a:hover { color: var(--coral); }

/* FAQ accordion */
.faq-accordion { margin: 16px 0 22px; }
.faq-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}
.faq-item summary {
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 600; color: var(--navy);
  font-size: .98rem;
  position: relative;
  list-style: none;
  padding-right: 44px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute; right: 18px; top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem; color: var(--coral);
  transition: transform .18s ease;
  line-height: 1;
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item[open] summary { border-bottom: 1px solid var(--line); }
.faq-answer {
  padding: 14px 18px 16px;
  font-size: .95rem;
  color: var(--ink-2);
}
.faq-answer p { margin: 0; color: var(--ink-2); }

/* ======================================================
   Author box
   ====================================================== */
.author-box {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin: 28px 0 20px;
}
.author-avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--paper-3);
  border: 2px solid var(--paper);
  box-shadow: var(--shadow-1);
}
.author-info { display: flex; flex-direction: column; }
.author-eyebrow {
  color: var(--coral);
  text-transform: uppercase;
  letter-spacing: .1em; font-size: 11px; font-weight: 700;
  margin-bottom: 4px;
}
.author-name-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 2px;
}
.author-name {
  margin: 0; padding: 0;
  font-family: var(--font-heading);
  font-size: 1.3rem; font-weight: 700;
  letter-spacing: -.01em;
  color: var(--navy);
}
.author-name::before { display: none !important; }
.author-email-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px;
  background: var(--navy); color: #FFF;
  border-radius: 6px; font-size: .82rem; font-weight: 600;
}
.author-email-btn:hover {
  background: var(--coral); color: #FFF; text-decoration: none;
}
.author-role {
  color: var(--ink-3); font-size: .85rem; font-weight: 500;
  margin-bottom: 10px;
}
.author-bio {
  color: var(--ink-2); font-size: .94rem; margin: 0; line-height: 1.55;
}
@media (max-width: 560px) {
  .author-box { grid-template-columns: 1fr; text-align: center; padding: 20px 18px; }
  .author-avatar { margin: 0 auto; }
  .author-name-row { justify-content: center; }
}

/* ======================================================
   Related guides
   ====================================================== */
.related-title { margin: 28px 0 14px; color: var(--navy); }
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 30px;
}
.related-card {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--navy) !important;
  transition: border-color .18s ease, transform .14s ease;
}
.related-card:hover {
  border-color: var(--coral);
  transform: translateY(-1px);
  text-decoration: none;
}
.r-tag {
  color: var(--coral);
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
}
.r-title {
  color: var(--navy); font-weight: 600; font-size: .98rem;
}

/* ======================================================
   Footer
   ====================================================== */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, .78);
  padding: 48px 0 24px;
  margin-top: 44px;
  font-size: .9rem;
}
.site-footer a { color: rgba(255, 255, 255, .78); }
.site-footer a:hover { color: var(--coral); text-decoration: none; }
.site-footer .logo img { max-width: 220px; height: auto; }
.site-footer p { color: rgba(255, 255, 255, .72); }

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 32px;
}
.site-footer h3 {
  color: #FFF; font-size: .95rem;
  font-family: var(--font-body); font-weight: 700;
  margin: 6px 0 12px;
  padding-top: 0;
}
.site-footer h3::before { display: none; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 7px; }

.responsible-badge {
  display: inline-block;
  padding: 5px 11px;
  background: rgba(230, 75, 75, .12);
  border: 1px solid rgba(230, 75, 75, .3);
  color: #FFB4B4;
  border-radius: 6px; font-size: .78rem; font-weight: 600;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding-top: 20px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: .82rem; color: rgba(255, 255, 255, .6);
}

@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .site-footer { padding: 36px 0 18px; margin-top: 32px; }
}

/* ======================================================
   Breadcrumbs on sub-pages
   ====================================================== */
.breadcrumbs a { color: inherit; }
.breadcrumbs a:hover { color: var(--coral); text-decoration: none; }

/* ======================================================
   Reveal animation (subtle)
   ====================================================== */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .5s ease, transform .5s ease;
}
.reveal.is-visible,
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
/* fallback: show if JS doesn't fire */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* No-JS fallback */
.no-js .reveal { opacity: 1; transform: none; }

/* ======================================================
   Utilities
   ====================================================== */
.section { padding: 30px 0; }
.text-center { text-align: center; }
.mb-2 { margin-bottom: 1rem; }

/* Content figure (inline hero image) */
.content-figure {
  margin: 28px 0 32px;
  padding: 0;
}
.content-figure img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
  display: block;
}
.content-figure figcaption {
  margin-top: 10px;
  font-size: .88rem;
  color: var(--ink-3);
  font-style: italic;
  text-align: center;
  padding: 0 10px;
  line-height: 1.5;
}
@media (max-width: 640px) {
  .content-figure { margin: 20px 0 24px; }
  .content-figure img { border-radius: 10px; }
  .content-figure figcaption { font-size: .82rem; margin-top: 8px; }
}

/* Smooth links in article text */
.content a {
  color: var(--coral);
  text-decoration: underline;
  text-decoration-color: rgba(230, 75, 75, .35);
  text-underline-offset: 3px;
}
.content a:hover {
  color: var(--coral-dark);
  text-decoration-color: var(--coral-dark);
}

/* Make sure the hero gets the mobile tightness */
@media (max-width: 480px) {
  body { font-size: 15.5px; }
  .container { padding: 0 16px; }
  .header-inner { padding: 12px 16px; }
  .logo img { height: 34px; max-width: 160px; }
  .page-hero { padding: 12px 0 10px; }
  .page-hero .breadcrumbs { font-size: 10px; margin-bottom: 6px; }
  .page-hero h1 { font-size: 1.4rem; }
  .page-hero .lead { font-size: .9rem; }
  .list-heading { margin: 14px 0 12px !important; }
  .btn { padding: 11px 18px; font-size: .95rem; }
}

/* Reveal observer-friendly default */
.reveal { opacity: 1; transform: none; }
