/* ==========================================================================
   alxmedia.se — Custom CSS v1.0.10
   För: GeneratePress + GenerateBlocks Pro
   Palett: Editorial Rouge (Palett A) + jordnära statusfärger
   Typografi: Fraunces (serif) + Inter (sans)

   Ändringar v1.0.10:
   - .alx-steps fungerar nu både som ol.alx-steps OCH som
     div.alx-steps med inre ol (wrapper-div). Block-editorn och
     skribenter kan använda båda strukturerna utan dubbelnumrering.
     Tidigare gav wrapper-strukturen både rouge ::marker
     (1. 2. 3.) och rouge cirklar samtidigt — nu döljs ::marker
     på alla nivåer av .alx-steps.

   Ändringar v1.0.9:
   - Arkiv-bilder: alla featured images på startsida, kategori, sök och
     bloggen tvingas till 1200/630 ratio (1.9:1) via aspect-ratio +
     object-fit: cover. Bilder med fel proportion beskärs centrerat.
     Single post-sidor påverkas inte.

   Ändringar v1.0.8:
   - TL;DR (.alx-tldr): italic Fraunces + 2px rouge-border runt hela boxen.
     Tydligt skild från brödtext OCH från snabbfakta (som har 4px rouge-line
     bara vänster + serif-rubrik + vanlig text).

   Ändringar v1.0.7:
   - Snabbfakta (.alx-factbox): återställd till cream + 4px rouge-line +
     serif-rubrik i mörk rouge. Den röda header-stripen i v1.0.6 var
     fel ruta som ändrades.

   Ändringar v1.0.6:
   - Snabbfakta (.alx-factbox): rubriken nu rouge-dark stripe med vit text,
     matchar tabell-headerns stil. Vänster-rouge-line borttagen (annars
     blev det för mycket rouge när headern är så prominent).

   Ändringar v1.0.5:
   - TL;DR (.alx-tldr): differentierad från Snabbfakta. Lättare cream-soft
     bakgrund, ingen rouge-line vänster, serif-font för intro-känsla.
     (Snabbfakta behåller cream + rouge-line + rubrik = "structured data".)
   - TL;DR: hantering av wpautop-tomrader. Dolda label-spannet skapade
     en tomrad överst pga br/p som wpautop la in mellan inline-elementen.

   Ändringar v1.0.4:
   - Pull quote (.alx-pullquote): återställd till centrerad magasin-stil med
     stora rouge-citattecken.

   Ändringar v1.0.3:
   - Snabbfakta (.alx-factbox): cream bakgrund + rouge-accent (var helt vit)
   - TL;DR (.alx-tldr-label): dold (visades som "TL;DR" rubrik)
   - Tabell-header: mörk rouge (var svart)
   - Info-boxar: jordnära dämpade nyanser i Editorial Rouge-anda
     (tip: brons, warning: terrakotta, success: sage, info: steel, note: rouge)
   - Bullet-fixarna från v1.0.2 integrerade i bashuvudreglerna
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap');

/* CSS-layers för bättre cascade-kontroll mot plugins */
@layer reset, base, components, utilities, overrides;

/* ==========================================================================
   1. CSS-VARIABLER (Palett A — Editorial Rouge + jordnära statusfärger)
   ========================================================================== */
@layer base {
  :root {
    /* Primärfärg (signature) */
    --alx-rouge: #d4495b;
    --alx-rouge-dark: #8e1f31;
    --alx-rouge-bg-1: #fdf4f5;
    --alx-rouge-bg-2: #fce0e3;

    /* Cream-toner (för boxar och bakgrunder) */
    --alx-cream: #faf3eb;
    --alx-cream-soft: #fdfbf7;

    /* Status-färger — jordnära nyanser i Editorial Rouge-anda */
    /* Info — dämpad steel-blue (neutral upplysning) */
    --alx-info: #5a6f8a;
    --alx-info-dark: #3d4f66;
    --alx-info-bg: #eef1f5;

    /* Tip — brons / varm sand (vänligt råd, var lila) */
    --alx-tip: #b8915c;
    --alx-tip-dark: #7a5d2e;
    --alx-tip-bg: #f5ede0;

    /* Warning — dämpad terrakotta (var amber/gult) */
    --alx-amber: #b85c4a;
    --alx-amber-dark: #8e3a2a;
    --alx-amber-bg: #f3e1da;

    /* Success — sage olive (var knall-grön) */
    --alx-green: #6b8253;
    --alx-green-dark: #4a5d36;
    --alx-green-bg: #eaf0e3;

    /* Note — ljus rouge-tint (var röd) */
    --alx-red: #d4495b;
    --alx-red-dark: #8e1f31;
    --alx-red-bg: #faecec;

    /* Text och ytor */
    --alx-text: #1a1a1a;
    --alx-text-muted: #6b6b6b;
    --alx-text-light: #9ca39d;
    --alx-border: #ebe4e0;
    --alx-border-soft: #f3eee7;
    --alx-site-bg: #faf8f5;
    --alx-surface: #ffffff;

    /* Typografi */
    --alx-font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
    --alx-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Mått */
    --alx-radius: 6px;
    --alx-radius-lg: 12px;
    --alx-shadow-sm: 0 2px 8px rgba(26, 26, 26, 0.04);
    --alx-shadow: 0 4px 16px rgba(26, 26, 26, 0.08);
    --alx-shadow-lg: 0 8px 32px rgba(26, 26, 26, 0.12);
  }

  /* Dark mode-stöd via prefers-color-scheme */
  @media (prefers-color-scheme: dark) {
    :root:not(.alx-light) {
      --alx-rouge: #f06b7a;
      --alx-rouge-dark: #f49aa5;
      --alx-rouge-bg-1: #2c1418;
      --alx-rouge-bg-2: #3d1c22;

      --alx-cream: #2a2520;
      --alx-cream-soft: #232019;

      --alx-info-bg: #1a2230;
      --alx-tip-bg: #2a2218;
      --alx-amber-bg: #2a1812;
      --alx-green-bg: #1a2614;
      --alx-red-bg: #2a1418;

      --alx-text: #f4f4f4;
      --alx-text-muted: #a8a8a8;
      --alx-text-light: #6b6b6b;
      --alx-border: #333;
      --alx-border-soft: #2a2a2a;
      --alx-site-bg: #161514;
      --alx-surface: #1f1e1c;
    }
  }
}

/* ==========================================================================
   2. BAS-TYPOGRAFI OCH BODY
   ========================================================================== */
@layer base {
  body.generatepress {
    background: var(--alx-site-bg);
    font-family: var(--alx-font-sans);
    color: var(--alx-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  body.generatepress .entry-content {
    font-size: 17px;
    line-height: 1.75;
    color: var(--alx-text);
  }

  body.generatepress .entry-content > p {
    margin: 0 0 18px;
  }

  /* Rubriker (Fraunces serif) */
  body.generatepress .entry-title,
  body.generatepress .entry-content h1,
  body.generatepress .entry-content h2,
  body.generatepress .entry-content h3,
  body.generatepress .entry-content h4,
  body.generatepress .entry-content h5,
  body.generatepress .entry-content h6 {
    font-family: var(--alx-font-serif);
    color: var(--alx-text);
    letter-spacing: -0.4px;
    font-variation-settings: "opsz" 144;
  }

  body.generatepress .entry-title {
    font-weight: 600;
    font-size: clamp(28px, 4.5vw, 38px);
    line-height: 1.15;
    letter-spacing: -0.8px;
    margin-bottom: 14px;
  }

  body.generatepress .entry-content h2 {
    font-weight: 600;
    font-size: 28px;
    margin: 40px 0 16px;
  }

  body.generatepress .entry-content h3 {
    font-weight: 500;
    font-size: 21px;
    margin: 32px 0 12px;
  }

  body.generatepress .entry-content h4 {
    font-weight: 500;
    font-size: 18px;
    margin: 24px 0 10px;
  }

  /* Drop cap på första stycket */
  body.generatepress .entry-content > p:first-of-type::first-letter {
    font-family: var(--alx-font-serif);
    font-size: 56px;
    font-weight: 600;
    float: left;
    line-height: 0.85;
    margin: 8px 10px 0 0;
    color: var(--alx-rouge);
  }

  /* Länkar i artikelinnehåll */
  body.generatepress .entry-content a:not(.alx-btn):not(.alx-btn-secondary):not(.alx-related-card):not(.alx-tags-list a):not(.alx-author-card a) {
    color: var(--alx-rouge-dark);
    text-decoration: underline;
    text-decoration-color: var(--alx-rouge-bg-2);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
    transition: text-decoration-color 0.15s ease, color 0.15s ease;
  }

  body.generatepress .entry-content a:not(.alx-btn):not(.alx-btn-secondary):not(.alx-related-card):hover {
    text-decoration-color: var(--alx-rouge);
    color: var(--alx-rouge);
  }
}

/* ==========================================================================
   3. STANDARD-BLOCK (tabeller, listor, blockquote, bilder)
   ========================================================================== */
@layer components {

  /* === Tabeller — magasin-stil med rouge-header === */
  .entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 28px 0;
    background: var(--alx-surface);
    border: 1px solid var(--alx-border);
    border-radius: var(--alx-radius-lg);
    overflow: hidden;
    font-size: 14px;
    font-family: var(--alx-font-sans);
  }

  .entry-content table thead th {
    background: var(--alx-rouge-dark);
    color: #faf8f5;
    padding: 14px 18px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: none;
  }

  .entry-content table tbody td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--alx-border-soft);
    vertical-align: top;
    color: var(--alx-text);
  }

  .entry-content table tbody tr:nth-child(even) {
    background: rgba(212, 73, 91, 0.025);
  }

  .entry-content table tbody tr:last-child td {
    border-bottom: none;
  }

  .entry-content table tbody tr:hover {
    background: rgba(212, 73, 91, 0.06);
  }

  .entry-content table tbody td:first-child {
    font-weight: 600;
    color: var(--alx-rouge-dark);
  }

  /* Mobil-version av tabeller (kort med rouge-accent) */
  @media (max-width: 600px) {
    .entry-content table thead {
      display: none;
    }

    .entry-content table,
    .entry-content table tbody,
    .entry-content table tr,
    .entry-content table td {
      display: block;
      width: 100%;
    }

    .entry-content table {
      border: none;
      background: transparent;
    }

    .entry-content table tr {
      background: var(--alx-cream);
      border: 1px solid var(--alx-border);
      border-left: 4px solid var(--alx-rouge);
      border-radius: var(--alx-radius);
      padding: 14px 16px;
      margin-bottom: 14px;
    }

    .entry-content table td {
      padding: 6px 0;
      border: none;
      background: transparent;
    }

    .entry-content table td[data-label]::before {
      content: attr(data-label) ": ";
      font-weight: 600;
      color: var(--alx-rouge-dark);
      font-size: 12px;
      letter-spacing: 0.5px;
      text-transform: uppercase;
      display: block;
      margin-bottom: 2px;
    }

    .entry-content table tbody td:first-child {
      font-size: 1.05em;
      margin-bottom: 6px;
      padding-bottom: 6px;
      border-bottom: 1px solid var(--alx-border);
    }

    .entry-content table tbody td:first-child[data-label]::before {
      display: none;
    }
  }

  /* === Listor (rouge-bullets med rätt positionering — integrerar v1.0.2-fix) === */
  .entry-content ul:not(.alx-tags-list):not(.alx-related-grid):not(.alx-pros):not(.alx-cons):not(.alx-steps):not(.alx-no-style):not(.alxeeat-toc-list):not(.alxeeat-toc-sublist) {
    list-style: none !important;
    padding-left: 28px !important;
    margin: 18px 0;
  }

  .entry-content ul:not(.alx-tags-list):not(.alx-related-grid):not(.alx-pros):not(.alx-cons):not(.alx-steps):not(.alx-no-style):not(.alxeeat-toc-list):not(.alxeeat-toc-sublist) > li {
    position: relative;
    padding-left: 0 !important;
    margin-left: 0 !important;
    margin-bottom: 10px;
    line-height: 1.65;
  }

  .entry-content ul:not(.alx-tags-list):not(.alx-related-grid):not(.alx-pros):not(.alx-cons):not(.alx-steps):not(.alx-no-style):not(.alxeeat-toc-list):not(.alxeeat-toc-sublist) > li::before {
    content: "•" !important;
    position: absolute !important;
    left: -20px !important;
    top: 0 !important;
    color: var(--alx-rouge) !important;
    font-size: 16px !important;
    line-height: 1.6 !important;
    width: auto !important;
    height: auto !important;
    background: transparent !important;
    border-radius: 0 !important;
  }

  .entry-content ol:not(.alx-steps):not(.alx-sources-list) {
    padding-left: 24px;
    margin: 18px 0;
  }

  .entry-content ol:not(.alx-steps):not(.alx-sources-list) > li {
    margin-bottom: 8px;
    line-height: 1.65;
    padding-left: 4px;
  }

  .entry-content ol:not(.alx-steps):not(.alx-sources-list) > li::marker {
    color: var(--alx-rouge);
    font-weight: 600;
  }

  /* === Bullet-säkerhetsnät: stäng AV bullets utanför artikelinnehåll === */
  .alx-related,
  .alx-related-grid,
  .alx-related-grid li,
  ul.alx-related-grid,
  ul.alx-related-grid > li {
    list-style: none !important;
    list-style-type: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
  }

  .alx-related-grid > li::before,
  .alx-related-grid > li::marker,
  ul.alx-related-grid li::before,
  ul.alx-related-grid li::marker {
    content: none !important;
    display: none !important;
  }

  .related-posts li::before,
  .related-posts ul li::before,
  .entry-content .related-posts li::before,
  .yarpp-related li::before,
  .crp_related li::before,
  .gb-grid-wrapper li::before,
  .gb-container li:not(.alx-related-grid li):not(.alx-pros li):not(.alx-cons li):not(.alx-steps li)::before {
    display: none !important;
    content: none !important;
  }

  nav ul li::before,
  .widget ul li::before,
  .menu ul li::before,
  footer ul li::before,
  header ul li::before {
    content: none !important;
    display: none !important;
  }

  /* === Blockquote (klassisk, dämpad) === */
  .entry-content blockquote {
    margin: 28px 0;
    padding: 4px 0 4px 24px;
    border-left: 3px solid var(--alx-rouge);
    font-family: var(--alx-font-serif);
    font-size: 19px;
    line-height: 1.5;
    font-style: italic;
    color: var(--alx-text);
    background: transparent;
  }

  .entry-content blockquote p {
    margin: 0 0 8px;
  }

  .entry-content blockquote p:last-child {
    margin-bottom: 0;
  }

  .entry-content blockquote cite {
    display: block;
    margin-top: 10px;
    font-family: var(--alx-font-sans);
    font-size: 13px;
    font-style: normal;
    color: var(--alx-text-muted);
    letter-spacing: 0.3px;
  }

  .entry-content blockquote cite::before {
    content: "— ";
  }

  /* === Bilder (editorial-stil) === */
  .entry-content img,
  .entry-content figure img {
    max-width: 100%;
    height: auto;
    border-radius: var(--alx-radius);
    display: block;
    margin: 16px auto;
    box-shadow: var(--alx-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  .entry-content figure {
    margin: 32px 0;
  }

  .entry-content figure img:hover {
    transform: translateY(-2px);
    box-shadow: var(--alx-shadow-lg);
  }

  .entry-content figcaption {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--alx-border);
    font-family: var(--alx-font-sans);
    font-size: 13px;
    color: var(--alx-text-muted);
    text-align: center;
    font-style: normal;
  }

  .entry-content figcaption strong {
    color: var(--alx-text);
    font-weight: 500;
  }

  /* Featured image (huvudbild) */
  .featured-image img,
  .post-image img {
    border-radius: var(--alx-radius-lg);
    box-shadow: var(--alx-shadow-lg);
  }

  .alignleft {
    float: left;
    margin: 8px 24px 16px 0;
    max-width: 50%;
  }

  .alignright {
    float: right;
    margin: 8px 0 16px 24px;
    max-width: 50%;
  }

  .aligncenter {
    display: block;
    margin: 16px auto;
  }

  @media (max-width: 600px) {
    .alignleft,
    .alignright {
      float: none;
      margin: 16px auto;
      max-width: 100%;
    }
  }

  /* === Featured images på arkiv/lista — normalisera till 1200:630 ratio === */
  /* Påverkar startsida, arkiv, sök, bloggen — INTE single post eller sidor */
  .home .post-image img,
  .home .wp-post-image,
  .home article .wp-post-image,
  .archive .post-image img,
  .archive .wp-post-image,
  .archive article .wp-post-image,
  .blog .post-image img,
  .blog .wp-post-image,
  .search .post-image img,
  .search .wp-post-image,
  body.error404 .wp-post-image,
  .gb-loop-item .wp-post-image,
  .gb-grid-wrapper .wp-post-image {
    width: 100% !important;
    aspect-ratio: 1200 / 630 !important;
    object-fit: cover !important;
    height: auto !important;
    object-position: center;
  }

  /* Behåll author-card och related-card i sina egna proportioner */
  .alx-author-card-avatar img,
  .alx-byline-avatar img,
  .alx-related-card-img img {
    aspect-ratio: auto !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }
}

/* ==========================================================================
   4. EEAT-KOMPONENTER
   ========================================================================== */
@layer components {

  /* === Författarbyline (manuell, ovanför artikel) === */
  .alx-byline {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 0;
    border-top: 1px solid var(--alx-border);
    border-bottom: 1px solid var(--alx-border);
    margin: 0 0 32px;
  }

  .alx-byline-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--alx-rouge-bg-1);
  }

  .alx-byline-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .alx-byline-text {
    flex: 1;
    line-height: 1.4;
  }

  .alx-byline-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--alx-text);
    font-family: var(--alx-font-sans);
  }

  .alx-byline-name a {
    color: var(--alx-text);
    text-decoration: none;
    border-bottom: 1px solid var(--alx-border);
  }

  .alx-byline-name a:hover {
    border-bottom-color: var(--alx-rouge);
  }

  .alx-byline-meta {
    font-size: 12px;
    color: var(--alx-text-muted);
    margin-top: 2px;
  }

  .alx-updated {
    display: inline-block;
    background: var(--alx-rouge-bg-1);
    color: var(--alx-rouge-dark);
    font-size: 11px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 12px;
    margin-left: 8px;
    letter-spacing: 0.3px;
  }

  /* === TL;DR — italic Fraunces med 2px rouge-border runt hela === */
  .alx-tldr {
    background: var(--alx-cream-soft);
    border: 2px solid var(--alx-rouge);
    border-radius: var(--alx-radius);
    padding: 22px 28px;
    margin: 0 0 32px;
    font-family: var(--alx-font-serif);
    font-size: 17px;
    font-style: italic;
    line-height: 1.65;
    color: var(--alx-text);
  }

  .alx-tldr-label {
    display: none;
  }

  .alx-tldr-text {
    display: block;
    font-family: var(--alx-font-serif);
    font-size: 17px;
    font-style: italic;
    line-height: 1.65;
    color: var(--alx-text);
  }

  /* Hantera wpautop som infogar br/p mellan inline-elementen i TL;DR-boxen */
  .alx-tldr br {
    display: none;
  }

  .alx-tldr p:empty {
    display: none;
  }

  .alx-tldr p {
    margin: 0;
  }

  /* === Pull quote — centrerad magasin-stil med stora rouge-citattecken === */
  .alx-pullquote {
    margin: 40px 0;
    padding: 0 40px;
    font-family: var(--alx-font-serif);
    font-size: clamp(22px, 3vw, 28px);
    line-height: 1.3;
    color: var(--alx-rouge-dark);
    text-align: center;
    font-style: italic;
    font-weight: 500;
    position: relative;
    letter-spacing: -0.3px;
    background: transparent;
    border: none;
  }

  .alx-pullquote::before {
    content: "\201C";
    position: absolute;
    left: 50%;
    top: -28px;
    transform: translateX(-50%);
    font-family: var(--alx-font-serif);
    font-size: 64px;
    color: var(--alx-rouge);
    line-height: 1;
    font-weight: 700;
  }

  .alx-pullquote-attr {
    display: block;
    margin-top: 14px;
    font-family: var(--alx-font-sans);
    font-size: 12px;
    font-style: normal;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--alx-text-muted);
  }

  @media (max-width: 600px) {
    .alx-pullquote {
      padding: 0 16px;
    }
  }

  /* === Snabbfakta-factbox — cream bakgrund med rouge-accent === */
  .alx-factbox {
    background: var(--alx-cream);
    border: 1px solid var(--alx-border);
    border-left: 4px solid var(--alx-rouge);
    border-radius: 0 var(--alx-radius) var(--alx-radius) 0;
    padding: 20px 24px;
    margin: 28px 0;
    box-shadow: var(--alx-shadow-sm);
    line-height: 1.7;
    overflow: hidden;
  }

  /* Enkel form: div.alx-factbox med strong:first-child som rubrik */
  .alx-factbox > strong:first-child {
    display: block;
    font-family: var(--alx-font-serif);
    font-size: 1.05em;
    color: var(--alx-rouge-dark);
    margin-bottom: 12px;
    letter-spacing: 0.2px;
  }

  /* Strukturerad form (för data-rader, om använd) */
  .alx-factbox-header {
    background: transparent;
    color: var(--alx-rouge-dark);
    padding: 0 0 12px;
    margin: 0 0 12px;
    font-family: var(--alx-font-serif);
    font-size: 1.05em;
    font-weight: 600;
    letter-spacing: 0.2px;
    text-transform: none;
    border-bottom: 1px solid var(--alx-border-soft);
  }

  .alx-factbox-body {
    padding: 0;
  }

  .alx-factbox-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid var(--alx-border-soft);
    font-size: 14px;
    font-family: var(--alx-font-sans);
  }

  .alx-factbox-row:last-child {
    border-bottom: none;
  }

  .alx-factbox-label {
    width: 40%;
    color: var(--alx-text-muted);
    font-weight: 500;
  }

  .alx-factbox-value {
    flex: 1;
    color: var(--alx-text);
  }

  /* === Källhänvisningar (utan klickbara länkar) === */
  .alx-sources {
    margin: 32px 0 24px;
    padding: 22px 24px;
    background: var(--alx-surface);
    border: 1px solid var(--alx-border);
    border-radius: var(--alx-radius);
  }

  .alx-sources-title {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--alx-text-muted);
    margin-bottom: 12px;
    font-family: var(--alx-font-sans);
  }

  .alx-sources-list {
    list-style: decimal;
    padding-left: 22px;
    margin: 0;
    font-size: 13px;
    line-height: 1.65;
    color: var(--alx-text-muted);
  }

  .alx-sources-list li {
    margin-bottom: 6px;
    padding-left: 4px;
  }

  .alx-sources-list li::marker {
    color: var(--alx-rouge);
    font-weight: 600;
  }

  /* === Steg-för-steg (numrerade cirklar) ===
     Fungerar med två HTML-strukturer:
       1. ol.alx-steps                  (rekommenderat — direkt på OL)
       2. div.alx-steps med inre ol     (wrapper-div, t.ex. från GenerateBlocks)
     Båda ger samma resultat: kort med rouge-cirklar, ingen dubbelnumrering.

     OBS: Använder .entry-content-prefix för att matcha specificity hos
     globala ol/ul-regler i @layer base. Utan prefix slår de globala
     reglerna över våra och kort-stilen försvinner.
     ========================================================================== */

  /* Reset på själva .alx-steps + nested ol/ul (oavsett wrapper-typ) */
  .entry-content ol.alx-steps,
  .entry-content ul.alx-steps,
  .entry-content .alx-steps ol,
  .entry-content .alx-steps ul {
    list-style: none !important;
    list-style-type: none !important;
    counter-reset: step;
    padding: 0 !important;
    margin: 28px 0 !important;
  }

  /* När .alx-steps är wrapper-div, nollställ marginalen på den inre listan */
  .entry-content .alx-steps > ol,
  .entry-content .alx-steps > ul {
    margin: 0 !important;
  }

  /* Kort-styling på li (oavsett om li ligger direkt i .alx-steps eller i nested ol/ul) */
  .entry-content ol.alx-steps > li,
  .entry-content ul.alx-steps > li,
  .entry-content .alx-steps ol > li,
  .entry-content .alx-steps ul > li {
    counter-increment: step;
    position: relative;
    padding: 18px 22px 18px 70px !important;
    background: var(--alx-surface) !important;
    border: 1px solid var(--alx-border) !important;
    border-radius: var(--alx-radius);
    margin-bottom: 12px !important;
    margin-left: 0 !important;
    font-size: 15px;
    line-height: 1.6;
    list-style: none !important;
    list-style-type: none !important;
  }

  /* Tvinga av native ol-numrering på alla nivåer (annars dubbelnumrering) */
  .entry-content ol.alx-steps > li::marker,
  .entry-content ul.alx-steps > li::marker,
  .entry-content .alx-steps ol > li::marker,
  .entry-content .alx-steps ul > li::marker {
    content: none !important;
    display: none !important;
  }

  /* Rouge-cirkeln (counter-värdet renderas i ::before) */
  .entry-content ol.alx-steps > li::before,
  .entry-content ul.alx-steps > li::before,
  .entry-content .alx-steps ol > li::before,
  .entry-content .alx-steps ul > li::before {
    content: counter(step);
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: var(--alx-rouge);
    color: #fff;
    border-radius: 50%;
    font-family: var(--alx-font-serif);
    font-weight: 600;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Strong används som rubrik på varje steg */
  .entry-content ol.alx-steps > li strong,
  .entry-content ul.alx-steps > li strong,
  .entry-content .alx-steps ol > li strong,
  .entry-content .alx-steps ul > li strong {
    display: block;
    margin-bottom: 4px;
    color: var(--alx-text);
  }

  /* === Pros/Cons === */
  .alx-proscons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 28px 0;
  }

  .alx-proscons > div {
    padding: 18px 22px;
    border-radius: var(--alx-radius);
    background: var(--alx-surface);
    border: 1px solid var(--alx-border);
  }

  .alx-proscons-pros {
    border-top: 4px solid var(--alx-green);
  }

  .alx-proscons-cons {
    border-top: 4px solid var(--alx-amber);
  }

  .alx-proscons h4 {
    font-family: var(--alx-font-sans);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin: 0 0 10px;
  }

  .alx-proscons-pros h4 {
    color: var(--alx-green-dark);
  }

  .alx-proscons-cons h4 {
    color: var(--alx-amber-dark);
  }

  .alx-pros,
  .alx-cons {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .alx-pros li,
  .alx-cons li {
    padding: 6px 0 6px 22px;
    position: relative;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
  }

  .alx-pros li::before {
    content: "+";
    position: absolute;
    left: 0;
    color: var(--alx-green);
    font-weight: 700;
    font-size: 16px;
  }

  .alx-cons li::before {
    content: "−";
    position: absolute;
    left: 0;
    color: var(--alx-amber);
    font-weight: 700;
    font-size: 16px;
  }

  @media (max-width: 600px) {
    .alx-proscons {
      grid-template-columns: 1fr;
    }
  }

  /* === Tag-pills === */
  .alx-tags-section {
    margin: 32px 0 24px;
    padding-top: 24px;
    border-top: 1px solid var(--alx-border);
  }

  .alx-tags-label {
    font-size: 11px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--alx-text-muted);
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
    font-family: var(--alx-font-sans);
  }

  .alx-tags-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .alx-tags-list li {
    padding: 0;
    margin: 0;
  }

  .alx-tags-list li::before {
    display: none;
  }

  .alx-tags-list a,
  .alx-tags-list .alx-tag {
    display: inline-block;
    padding: 5px 14px;
    background: var(--alx-rouge-bg-1);
    color: var(--alx-rouge-dark);
    border: 1px solid var(--alx-rouge-bg-2);
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s ease;
    font-family: var(--alx-font-sans);
  }

  .alx-tags-list a:hover {
    background: var(--alx-rouge-bg-2);
  }

  /* === Related-kort === */
  .alx-related {
    margin: 40px 0 32px;
    padding-top: 32px;
    border-top: 1px solid var(--alx-border);
  }

  .alx-related-title {
    font-family: var(--alx-font-serif);
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 18px;
    color: var(--alx-text);
  }

  .alx-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .alx-related-grid li {
    padding: 0;
    margin: 0;
  }

  .alx-related-grid li::before {
    display: none;
  }

  .alx-related-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--alx-surface);
    border: 1px solid var(--alx-border);
    border-radius: var(--alx-radius);
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }

  .alx-related-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--alx-shadow);
  }

  .alx-related-card-img {
    height: 140px;
    background: linear-gradient(135deg, var(--alx-rouge-bg-2), var(--alx-rouge));
    background-size: cover;
    background-position: center;
  }

  .alx-related-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .alx-related-card-body {
    padding: 14px 16px;
  }

  .alx-related-card-cat {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--alx-rouge);
    text-transform: uppercase;
    margin-bottom: 6px;
    font-family: var(--alx-font-sans);
  }

  .alx-related-card-title {
    font-family: var(--alx-font-serif);
    font-weight: 500;
    font-size: 16px;
    line-height: 1.3;
    color: var(--alx-text);
  }

  @media (max-width: 768px) {
    .alx-related-grid {
      grid-template-columns: 1fr;
    }
  }

  /* === Författar-bio-kort (botten av artikeln) === */
  .alx-author-card {
    margin: 40px 0 0;
    padding: 28px;
    background: var(--alx-surface);
    border: 1px solid var(--alx-border);
    border-radius: var(--alx-radius-lg);
    display: flex;
    gap: 22px;
    align-items: flex-start;
  }

  .alx-author-card-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 3px solid var(--alx-rouge-bg-1);
    overflow: hidden;
  }

  .alx-author-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .alx-author-card-content {
    flex: 1;
  }

  .alx-author-card-label {
    font-size: 11px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--alx-text-muted);
    font-weight: 600;
    margin-bottom: 6px;
    font-family: var(--alx-font-sans);
  }

  .alx-author-card-name {
    font-family: var(--alx-font-serif);
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 6px;
    letter-spacing: -0.3px;
    color: var(--alx-text);
  }

  .alx-author-card-role {
    font-size: 13px;
    color: var(--alx-text-muted);
    margin-bottom: 10px;
  }

  .alx-author-card-text {
    font-size: 14px;
    line-height: 1.65;
    color: var(--alx-text);
    margin-bottom: 12px;
  }

  .alx-author-card-links a {
    color: var(--alx-rouge-dark);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    margin-right: 14px;
    border-bottom: 1px solid var(--alx-rouge-bg-2);
    transition: border-bottom-color 0.15s ease;
  }

  .alx-author-card-links a:hover {
    border-bottom-color: var(--alx-rouge);
  }

  @media (max-width: 600px) {
    .alx-author-card {
      flex-direction: column;
      align-items: center;
      text-align: center;
    }
  }

  /* ==========================================================================
     5. INFO-BUBBLOR — jordnära dämpade nyanser i Editorial Rouge-anda
     ========================================================================== */

  .alx-info,
  .alx-tip,
  .alx-warning,
  .alx-success,
  .alx-note {
    padding: 18px 22px;
    margin: 24px 0;
    border-radius: 0 var(--alx-radius) var(--alx-radius) 0;
    border: 1px solid var(--alx-border);
    border-left: 4px solid;
    font-size: 14px;
    line-height: 1.7;
  }

  .alx-info > strong:first-child,
  .alx-tip > strong:first-child,
  .alx-warning > strong:first-child,
  .alx-success > strong:first-child,
  .alx-note > strong:first-child {
    display: block;
    font-family: var(--alx-font-sans);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 8px;
  }

  /* Info — dämpad steel-blue (neutral upplysning) */
  .alx-info {
    background: var(--alx-info-bg);
    border-left-color: var(--alx-info);
  }
  .alx-info > strong:first-child {
    color: var(--alx-info-dark);
  }

  /* Tip — brons / varm sand (vänligt råd, var lila) */
  .alx-tip {
    background: var(--alx-tip-bg);
    border-left-color: var(--alx-tip);
  }
  .alx-tip > strong:first-child {
    color: var(--alx-tip-dark);
  }

  /* Warning — terrakotta (var amber/gult) */
  .alx-warning {
    background: var(--alx-amber-bg);
    border-left-color: var(--alx-amber);
  }
  .alx-warning > strong:first-child {
    color: var(--alx-amber-dark);
  }

  /* Success — sage olive (var knall-grön) */
  .alx-success {
    background: var(--alx-green-bg);
    border-left-color: var(--alx-green);
  }
  .alx-success > strong:first-child {
    color: var(--alx-green-dark);
  }

  /* Note — ljus rouge-tint (signature, var röd) */
  .alx-note {
    background: var(--alx-red-bg);
    border-left-color: var(--alx-red);
  }
  .alx-note > strong:first-child {
    color: var(--alx-red-dark);
  }

  /* ==========================================================================
     6. KNAPPAR / CTA
     ========================================================================== */

  .alx-btn,
  a.alx-btn,
  .alx-btn-secondary,
  a.alx-btn-secondary {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none !important;
    border-radius: 4px;
    font-family: var(--alx-font-sans);
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.3px;
    cursor: pointer;
    margin: 8px 4px 8px 0;
    transition: background 0.15s ease, transform 0.1s ease, color 0.15s ease;
    border: none;
  }

  .alx-btn,
  a.alx-btn {
    background: var(--alx-rouge);
    color: #fff !important;
  }

  .alx-btn:hover,
  a.alx-btn:hover {
    background: var(--alx-rouge-dark);
    transform: translateY(-1px);
  }

  .alx-btn-secondary,
  a.alx-btn-secondary {
    background: transparent;
    color: var(--alx-rouge) !important;
    border: 1.5px solid var(--alx-rouge);
  }

  .alx-btn-secondary:hover,
  a.alx-btn-secondary:hover {
    background: var(--alx-rouge-bg-1);
  }

  /* Inga externlänk-pilar på knappar */
  .alx-btn::after,
  .alx-btn-secondary::after {
    content: "" !important;
  }

  /* CTA-rad-wrapper */
  .alx-cta-row {
    margin: 32px 0;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
  }

}

/* ==========================================================================
   7. KATEGORI-LABEL (visas över rubriken)
   ========================================================================== */
@layer components {
  .alx-cat {
    display: inline-block;
    background: var(--alx-rouge);
    color: #fff;
    font-family: var(--alx-font-sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    padding: 5px 14px;
    border-radius: 3px;
    text-transform: uppercase;
    margin-bottom: 14px;
    text-decoration: none !important;
  }

  .alx-cat:hover {
    background: var(--alx-rouge-dark);
  }
}

/* ==========================================================================
   8. PRINT STYLESHEET
   ========================================================================== */
@media print {
  body.generatepress {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }

  .site-header,
  .site-footer,
  .main-navigation,
  .alx-related,
  .alx-tags-section,
  .alx-cta-row,
  .alx-author-card-links,
  .alx-byline-avatar,
  .alx-author-card-avatar,
  .featured-image,
  .post-image {
    display: none !important;
  }

  .alx-tldr,
  .alx-factbox,
  .alx-info,
  .alx-tip,
  .alx-warning,
  .alx-success,
  .alx-note,
  .alx-pullquote {
    border: 1px solid #ccc !important;
    background: #fff !important;
    box-shadow: none !important;
    page-break-inside: avoid;
  }

  .entry-content a {
    color: #000 !important;
    text-decoration: underline;
  }

  .entry-title {
    font-size: 24pt !important;
  }

  .entry-content h2 {
    font-size: 18pt !important;
    page-break-after: avoid;
  }

  .entry-content h3 {
    font-size: 14pt !important;
    page-break-after: avoid;
  }

  .entry-content img {
    box-shadow: none !important;
    max-width: 80% !important;
    page-break-inside: avoid;
  }
}

/* ==========================================================================
   9. REDUCED MOTION (tillgänglighet)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .entry-content img:hover,
  .alx-related-card:hover,
  .alx-btn:hover,
  a.alx-btn:hover {
    transform: none !important;
  }
}

/* ==========================================================================
   10. CONTAINER QUERIES (modernare än media queries för komponenter)
   ========================================================================== */
@layer components {
  .alx-author-card,
  .alx-related,
  .alx-proscons {
    container-type: inline-size;
  }

  @container (max-width: 480px) {
    .alx-author-card {
      flex-direction: column;
      text-align: center;
    }

    .alx-related-grid {
      grid-template-columns: 1fr;
    }

    .alx-proscons {
      grid-template-columns: 1fr;
    }
  }
}

/* ==========================================================================
   11. UTILITIES (sista lager — för snabb-justeringar)
   ========================================================================== */
@layer utilities {
  .alx-no-style { list-style: none !important; padding-left: 0 !important; }
  .alx-text-muted { color: var(--alx-text-muted); }
  .alx-text-rouge { color: var(--alx-rouge-dark); }
  .alx-mt-0 { margin-top: 0 !important; }
  .alx-mb-0 { margin-bottom: 0 !important; }
  .alx-center { text-align: center; }
}

/* ==========================================================================
   12. FOOTER COPYRIGHT (dölj GP-credit, visa egen text)
   ========================================================================== */
.copyright-bar {
  font-size: 0 !important;
  visibility: hidden !important;
  position: relative;
}

.copyright-bar::before {
  content: "© 2026 Alxmedia. Alla rättigheter förbehållna.";
  font-size: 15px;
  visibility: visible;
  display: block;
  color: #888;
  font-family: var(--alx-font-sans);
}

/* === SLUT på alxmedia-custom-v1.0.9 === */
/* ============== FEATURED IMAGES PÅ MOBIL ============== */
/* Ger featured images luft från skärmkanten + rundade hörn */
@media (max-width: 768px) {
    /* GeneratePress single-post featured image */
    .inside-article .post-image,
    .post-image:not(.featured-image-list),
    .featured-image {
        margin-left: 16px;
        margin-right: 16px;
        margin-bottom: 24px;
    }
    .inside-article .post-image img,
    .post-image img,
    .featured-image img {
        border-radius: 8px;
        display: block;
        width: 100%;
        height: auto;
    }

    /* Bilder i artikelinnehåll (alignnone, alignwide) */
    .entry-content > img.alignnone,
    .entry-content > .wp-block-image:not(.alignfull):not(.alignwide) img,
    .entry-content > p > img {
        border-radius: 8px;
        max-width: calc(100% - 32px);
        margin-left: auto;
        margin-right: auto;
        display: block;
    }
}

/* ============== STÖRRE LUFT PÅ RIKTIGT SMALA SKÄRMAR ============== */
@media (max-width: 480px) {
    .inside-article .post-image,
    .post-image:not(.featured-image-list),
    .featured-image {
        margin-left: 12px;
        margin-right: 12px;
    }
}