/* ================================================================
   OltreFormato — Design System v2
   Estetica "Carta Tipografica": editoriale, caldo, autorevole

   Stack: CSS custom properties + Grid + Container Queries
   No Bootstrap. Bootstrap Icons mantenuto (CDN, 36 KB gzip).

   Font (Google Fonts):
     DM Sans — unico font, usato ovunque
   ================================================================ */

/* ----------------------------------------------------------------
   0. Google Fonts — loaded via <link> in HTML for performance
   ---------------------------------------------------------------- */

/* ----------------------------------------------------------------
   1. Design Tokens
   ---------------------------------------------------------------- */
:root {
  /* Palette */
  --ink:        #0F0D0A;
  --ink-soft:   #2D2B28;
  --paper:      #F8F4EE;
  --paper-alt:  #EDE8DF;
  --surface:    #FFFFFF;
  --rouge:      #B8380A;
  --rouge-dk:   #8F2A07;
  --rouge-lt:   #F5E8E2;
  --slate:      #2A4A6D;
  --slate-lt:   #E4EBF3;
  --muted:      #7A7268;
  --rule:       #D4CCC0;
  --rule-lt:    #EAE4DB;

  /* Typography */
  --font-ui:      'DM Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-body:    'DM Sans', system-ui, -apple-system, sans-serif;

  /* Type scale */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  2rem;
  --text-4xl:  2.75rem;
  --text-5xl:  3.75rem;
  --text-6xl:  5rem;

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Layout */
  --container:       min(92vw, 1280px);
  --container-text:  min(92vw, 860px);
  --measure:         68ch;
  --col-toc:         240px;

  /* Borders & Radii */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   20px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(15,13,10,.06), 0 1px 2px rgba(15,13,10,.04);
  --shadow-md:  0 4px 16px rgba(15,13,10,.08), 0 2px 6px rgba(15,13,10,.05);
  --shadow-lg:  0 12px 40px rgba(15,13,10,.11), 0 4px 12px rgba(15,13,10,.06);

  /* Transitions */
  --ease: 0.2s ease;
  --ease-bounce: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ----------------------------------------------------------------
   2. Reset & Base
   ---------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-ui);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--slate);
  text-decoration: none;
  transition: color var(--ease);
}

a:hover { color: var(--rouge); }

ul, ol { list-style: none; }

button {
  font-family: var(--font-ui);
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: var(--font-ui);
  font-size: var(--text-base);
}

/* ----------------------------------------------------------------
   3. Utility Container
   ---------------------------------------------------------------- */
.container {
  width: var(--container);
  margin-inline: auto;
}

.container-text {
  width: var(--container-text);
  margin-inline: auto;
}

/* ----------------------------------------------------------------
   4. Reading Progress Bar
   ---------------------------------------------------------------- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--rouge);
  z-index: 9999;
  transition: width 0.1s linear;
  transform-origin: left;
}

/* ----------------------------------------------------------------
   5. Header / Navbar
   ---------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--surface);
  border-bottom: 1px solid transparent;
  transition: border-color var(--ease), box-shadow var(--ease), padding var(--ease);
}

.site-header.scrolled {
  border-bottom-color: var(--rule-lt);
  box-shadow: var(--shadow-sm);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-6);
  padding-block: var(--space-4);
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo img {
  height: 34px;
  width: auto;
}

/* Nav links */
.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex: 1;
}

/* Spinge le pill categoria verso destra, vicino alla search */
.site-nav a:not(.nav-cat) + .nav-cat {
  margin-left: auto;
}

.site-nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-soft);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  transition: color var(--ease), background-color var(--ease);
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--ink);
  background: var(--paper-alt);
}

.site-nav a.active {
  color: var(--rouge);
  font-weight: 600;
}

/* Category nav pills */
.site-nav .nav-cat {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--rule);
}

.site-nav .nav-cat:hover {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

/* Search form */
.header-search {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.header-search-form {
  display: flex;
  align-items: center;
  background: var(--paper);
  border: 1.5px solid var(--rule);
  border-radius: var(--radius-pill);
  padding: var(--space-1) var(--space-3);
  transition: border-color var(--ease), box-shadow var(--ease);
}

.header-search-form:focus-within {
  border-color: var(--slate);
  box-shadow: 0 0 0 3px rgba(42,74,109,.12);
}

.header-search-form input {
  border: none;
  background: transparent;
  outline: none;
  font-size: var(--text-sm);
  color: var(--ink);
  width: 160px;
}

.header-search-form input::placeholder { color: var(--muted); }

.header-search-form button {
  color: var(--muted);
  padding: 0;
  line-height: 1;
  font-size: 1rem;
  transition: color var(--ease);
}

.header-search-form button:hover { color: var(--rouge); }

/* Hamburger (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 24px;
  padding: 4px 0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform var(--ease), opacity var(--ease);
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav overlay */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--surface);
  z-index: 999;
  padding: var(--space-20) var(--space-8) var(--space-8);
  flex-direction: column;
  gap: var(--space-2);
}

.mobile-nav.open { display: flex; }

.mobile-nav a {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--ink);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--rule-lt);
}

.mobile-nav a:hover { color: var(--rouge); }

/* ----------------------------------------------------------------
   6. Buttons
   ---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--ease), color var(--ease),
              border-color var(--ease), box-shadow var(--ease),
              transform var(--ease-bounce);
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--rouge);
  color: #fff;
  border-color: var(--rouge);
}

.btn-primary:hover {
  background: var(--rouge-dk);
  border-color: var(--rouge-dk);
  color: #fff;
  box-shadow: 0 4px 16px rgba(184,56,10,.28);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}

.btn-outline:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--paper-alt);
}

.btn-ghost {
  background: transparent;
  color: var(--slate);
  border-color: transparent;
  padding-inline: var(--space-3);
}

.btn-ghost:hover {
  color: var(--rouge);
  background: var(--rouge-lt);
}

.btn-lg { font-size: var(--text-base); padding: 0.85rem 1.75rem; }
.btn-sm { font-size: var(--text-xs); padding: 0.45rem 0.85rem; }

.btn-pill { border-radius: var(--radius-pill); }

/* ----------------------------------------------------------------
   7. Badges / Tags
   ---------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--ease), color var(--ease);
}

.badge-rouge {
  background: var(--rouge-lt);
  color: var(--rouge-dk);
  border: 1px solid rgba(184,56,10,.15);
}

.badge-rouge:hover {
  background: var(--rouge);
  color: #fff;
}

.badge-slate {
  background: var(--slate-lt);
  color: var(--slate);
  border: 1px solid rgba(42,74,109,.15);
}

.badge-slate:hover {
  background: var(--slate);
  color: #fff;
}

.badge-neutral {
  background: var(--paper-alt);
  color: var(--muted);
  border: 1px solid var(--rule);
}

.badge-neutral:hover {
  background: var(--paper-alt);
  color: var(--ink);
}

/* ----------------------------------------------------------------
   8. Homepage Hero — Featured Article Editorial
   ---------------------------------------------------------------- */
.hero-editorial {
  padding-block: var(--space-12) var(--space-10);
  background: var(--paper);
  border-bottom: 1px solid var(--rule-lt);
}

.hero-editorial .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
}

.hero-image-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow-lg);
}

.hero-image-wrap img,
.hero-image-wrap picture {
  width: 100%;
  height: 100%;
}

.hero-image-wrap picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-image-wrap img {
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-image-wrap:hover img,
.hero-image-wrap:hover picture img { transform: scale(1.03); }

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rouge);
  margin-bottom: var(--space-5);
}

.hero-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--rouge);
  border-radius: 2px;
}

.hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(var(--text-2xl), 2.8vw, var(--text-4xl));
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: var(--space-5);
}

.hero-content h1 a {
  color: inherit;
  text-decoration: none;
}

.hero-content h1 a:hover { color: var(--rouge); }

.hero-subtitle {
  font-family: var(--font-ui);
  font-size: var(--text-lg);
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: var(--space-6);
  max-width: 48ch;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  font-size: var(--text-sm);
  color: var(--muted);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}

.hero-meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* ----------------------------------------------------------------
   9. Section Header
   ---------------------------------------------------------------- */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
}

.section-subtitle {
  font-size: var(--text-sm);
  color: var(--muted);
  margin-top: var(--space-1);
  font-family: var(--font-ui);
}

.section-eyebrow {
  display: block;
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rouge);
  margin-bottom: var(--space-3);
}

/* ----------------------------------------------------------------
   10. Category Strip (homepage)
   ---------------------------------------------------------------- */
.category-strip {
  padding-block: var(--space-8);
  background: var(--paper-alt);
  border-bottom: 1px solid var(--rule-lt);
}

.category-strip .container {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.category-strip-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  flex-shrink: 0;
  padding-right: var(--space-4);
  border-right: 1px solid var(--rule);
  margin-right: var(--space-2);
}

.category-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-soft);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--rule);
  background: var(--surface);
  transition: border-color var(--ease), color var(--ease), background var(--ease);
  text-decoration: none;
}

.category-pill:hover {
  border-color: var(--rouge);
  color: var(--rouge);
  background: var(--rouge-lt);
}

.category-pill.active {
  border-color: var(--rouge);
  color: var(--rouge);
  background: var(--rouge-lt);
  font-weight: 600;
}

.category-pill i {
  font-size: 1rem;
  opacity: .7;
}

/* ----------------------------------------------------------------
   11. Article Cards
   ---------------------------------------------------------------- */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.articles-grid.has-featured {
  grid-template-columns: 1fr;
}

.article-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--rule-lt);
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--ease), transform var(--ease);
}

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

.article-card-img {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--paper-alt);
  flex-shrink: 0;
}

/* Support for imgPicture() which outputs <picture> tags */
.article-card-img picture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.article-card-img picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.article-card-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.article-card:hover .article-card-img img,
.article-card:hover .article-card-img picture img { transform: scale(1.04); }

.article-card-img-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rule);
  font-size: 2.5rem;
}

.article-card-body {
  padding: var(--space-5) var(--space-6) var(--space-6);
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: var(--space-3);
}

.article-card-cats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.article-card-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  letter-spacing: -0.015em;
  flex: 1;
}

.article-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--ease);
}

.article-card-title a:hover { color: var(--rouge); }

.article-card-excerpt {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: 1.65;
  flex: 1;
}

.article-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-4);
  border-top: 1px solid var(--rule-lt);
  margin-top: auto;
  gap: var(--space-3);
}

.article-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--muted);
  flex-wrap: wrap;
}

.article-card-meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.read-more {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--rouge);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--space-1);
  white-space: nowrap;
  transition: gap var(--ease);
}

.read-more:hover {
  color: var(--rouge-dk);
  gap: var(--space-3);
}

.article-card.featured {
  grid-column: 1 / -1;
  flex-direction: row;
}

.article-card.featured .article-card-img {
  width: 48%;
  flex-shrink: 0;
  aspect-ratio: auto;
  min-height: 280px;
}

.article-card.featured .article-card-title {
  font-size: var(--text-2xl);
}

.article-card.featured .article-card-excerpt {
  font-size: var(--text-base);
}

/* ----------------------------------------------------------------
   12. Newsletter Strip (rimossa — nascosta per default)
   ---------------------------------------------------------------- */
.newsletter-strip { display: none; }

/* ----------------------------------------------------------------
   13. Sezioni alternanti
   ---------------------------------------------------------------- */
.section-alt {
  background: var(--paper-alt);
}

.section-padded {
  padding-block: var(--space-16);
}

.section-padded-sm {
  padding-block: var(--space-10);
}

/* ----------------------------------------------------------------
   14. Archivio / Category Page
   ---------------------------------------------------------------- */
.archive-hero {
  padding-block: var(--space-12) var(--space-10);
  background: var(--ink);
  color: #fff;
  border-bottom: 3px solid var(--rouge);
}

.archive-hero-breadcrumb {
  font-size: var(--text-xs);
  color: rgba(255,255,255,.5);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.archive-hero-breadcrumb a {
  color: rgba(255,255,255,.5);
}

.archive-hero-breadcrumb a:hover { color: rgba(255,255,255,.9); }

.archive-hero-breadcrumb .sep { opacity: .4; }

.archive-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  font-weight: 900;
  line-height: 1.1;
  color: #fff;
  margin-bottom: var(--space-4);
}

.archive-hero p {
  font-size: var(--text-lg);
  color: rgba(255,255,255,.65);
  max-width: 56ch;
}

/* Filter tabs */
.filter-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  padding-block: var(--space-6);
  border-bottom: 1px solid var(--rule-lt);
  margin-bottom: var(--space-8);
}

.filter-tab {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--muted);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--rule);
  background: var(--surface);
  text-decoration: none;
  transition: all var(--ease);
}

.filter-tab:hover {
  color: var(--ink);
  border-color: var(--ink-soft);
  background: var(--paper-alt);
}

.filter-tab.active {
  background: var(--rouge);
  color: #fff;
  border-color: var(--rouge);
  font-weight: 600;
}

.filter-tab .count {
  background: rgba(255,255,255,.25);
  border-radius: var(--radius-pill);
  padding: 1px 6px;
  font-size: var(--text-xs);
}

.filter-tab:not(.active) .count {
  background: var(--paper-alt);
  color: var(--muted);
}

/* Layout archivio */
.archive-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--space-8);
  margin-bottom: var(--space-10);
}

.archive-featured {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.archive-featured .article-card {
  flex-direction: row;
  gap: 0;
}

.archive-featured .article-card .article-card-img {
  width: 42%;
  flex-shrink: 0;
  aspect-ratio: auto;
  min-height: 240px;
}

.archive-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.article-card-compact {
  display: flex;
  gap: var(--space-4);
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--rule-lt);
  text-decoration: none;
  color: var(--ink);
  transition: color var(--ease);
}

.article-card-compact:last-child { border-bottom: none; }

.article-card-compact:hover { color: var(--rouge); }

.article-card-compact-img {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--paper-alt);
}

.article-card-compact-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-card-compact-body {
  flex: 1;
  min-width: 0;
}

.article-card-compact-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  line-height: 1.3;
  color: inherit;
  margin-bottom: var(--space-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-compact-meta {
  font-size: var(--text-xs);
  color: var(--muted);
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

/* Paginazione */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding-block: var(--space-10);
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--muted);
  border: 1.5px solid var(--rule);
  background: var(--surface);
  text-decoration: none;
  transition: all var(--ease);
}

.page-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.page-btn.active {
  background: var(--rouge);
  border-color: var(--rouge);
  color: #fff;
}

.page-btn.disabled {
  opacity: .35;
  pointer-events: none;
}

/* ----------------------------------------------------------------
   15. Singolo Articolo
   ---------------------------------------------------------------- */
.article-hero {
  background: var(--ink);
  color: #fff;
  padding-block: var(--space-10) var(--space-16);
}

.article-hero-inner {
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.article-breadcrumb {
  font-size: var(--text-xs);
  color: rgba(255,255,255,.45);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}

.article-breadcrumb a {
  color: rgba(255,255,255,.45);
  transition: color var(--ease);
}

.article-breadcrumb a:hover { color: rgba(255,255,255,.85); }

.article-breadcrumb .sep { opacity: .35; }

.article-cats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.article-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(var(--text-2xl), 2.5vw, var(--text-4xl));
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: var(--space-5);
}

.article-hero-subtitle {
  font-size: var(--text-xl);
  color: rgba(255,255,255,.7);
  line-height: 1.5;
  font-family: var(--font-ui);
  font-weight: 400;
  max-width: 60ch;
  margin-bottom: var(--space-6);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  font-size: var(--text-sm);
  color: rgba(255,255,255,.5);
  flex-wrap: wrap;
}

.article-meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.article-meta-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255,255,255,.3);
}

.article-cover {
  width: 100%;
  max-width: 920px;
  margin-inline: auto;
  margin-top: calc(-1 * var(--space-12));
  padding-inline: var(--space-6);
  position: relative;
  z-index: 1;
}

.article-cover picture {
  display: block;
  width: 100%;
}

.article-cover picture img,
.article-cover img {
  width: 100%;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 21/9;
  object-fit: cover;
  height: auto;
}

.article-layout {
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: var(--space-6);
  padding-top: var(--space-12);
  display: grid;
  grid-template-columns: 1fr var(--col-toc);
  gap: var(--space-12);
  align-items: start;
}

.article-body {
  min-width: 0;
}

.article-body-content {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  line-height: 1.85;
  color: var(--ink-soft);
  max-width: var(--measure);
}

.article-body-content > * + * { margin-top: 1.4em; }

.article-body-content h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-top: 2.5em;
  margin-bottom: 0.6em;
  padding-bottom: 0.5em;
  border-bottom: 2px solid var(--rouge);
}

.article-body-content h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--ink);
  margin-top: 2em;
  margin-bottom: 0.5em;
  padding-bottom: 0.4em;
  border-bottom: 1px solid var(--rule-lt);
}

.article-body-content h4 {
  font-family: var(--font-ui);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--ink);
  margin-top: 1.5em;
  margin-bottom: 0.4em;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.article-body-content p { margin-bottom: 1.4em; }

.article-body-content ul,
.article-body-content ol {
  padding-left: 1.5em;
  list-style: revert;
  margin-bottom: 1.4em;
}

.article-body-content li { margin-bottom: 0.5em; }

.article-body-content a {
  color: var(--slate);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(42,74,109,.4);
  transition: color var(--ease), text-decoration-color var(--ease);
}

.article-body-content a:hover {
  color: var(--rouge);
  text-decoration-color: var(--rouge);
}

.article-body-content blockquote {
  border-left: 4px solid var(--rouge);
  margin-left: 0;
  padding: var(--space-4) var(--space-6);
  background: var(--rouge-lt);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--ink-soft);
}

.article-body-content pre {
  background: var(--ink);
  color: #e8e4de;
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  font-size: 0.875em;
}

.article-body-content code {
  background: var(--paper-alt);
  color: var(--rouge-dk);
  padding: 0.15em 0.45em;
  border-radius: var(--radius-sm);
  font-size: 0.875em;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.article-body-content pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.article-body-content img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.article-body-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  font-family: var(--font-ui);
}

.article-body-content th,
.article-body-content td {
  border: 1px solid var(--rule);
  padding: var(--space-3) var(--space-4);
  text-align: left;
}

.article-body-content th {
  background: var(--paper-alt);
  font-weight: 700;
  font-family: var(--font-ui);
}

.faq-item {
  border-bottom: 1px solid var(--rule-lt);
  padding-block: var(--space-5);
}

.faq-question {
  font-family: var(--font-ui);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: var(--space-3);
}

/* TOC Sidebar */
.article-toc {
  position: sticky;
  top: calc(80px + var(--space-6));
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding: var(--space-5) var(--space-5) var(--space-6);
  background: var(--surface);
  border: 1px solid var(--rule-lt);
  border-radius: var(--radius-lg);
  scrollbar-width: thin;
}

.article-toc::-webkit-scrollbar { width: 4px; }
.article-toc::-webkit-scrollbar-track { background: transparent; }
.article-toc::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 4px; }

.toc-title {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--rule-lt);
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc-link {
  display: block;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--muted);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  border-left: 2px solid transparent;
  text-decoration: none;
  line-height: 1.4;
  transition: color var(--ease), border-color var(--ease), background var(--ease);
}

.toc-link:hover {
  color: var(--ink);
  background: var(--paper);
}

.toc-link.active {
  color: var(--rouge);
  border-left-color: var(--rouge);
  font-weight: 600;
  background: var(--rouge-lt);
}

.toc-link.level-3 {
  padding-left: var(--space-6);
  font-size: var(--text-xs);
}

.toc-share {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--rule-lt);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.toc-share-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.toc-share-btns {
  display: flex;
  gap: var(--space-2);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--rule);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: all var(--ease);
}

.share-btn:hover {
  background: var(--paper-alt);
  color: var(--ink);
  border-color: var(--ink-soft);
}

/* ----------------------------------------------------------------
   16. Autore Card
   ---------------------------------------------------------------- */
.author-card {
  display: flex;
  gap: var(--space-6);
  padding: var(--space-8);
  background: var(--paper-alt);
  border-radius: var(--radius-xl);
  border: 1px solid var(--rule-lt);
  margin-top: var(--space-16);
}

.author-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--paper-alt);
  border: 2px solid var(--rule);
}

.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--muted);
}

.author-name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: var(--space-1);
}

.author-role {
  font-size: var(--text-sm);
  color: var(--rouge);
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.author-bio {
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: var(--space-4);
}

.author-links {
  display: flex;
  gap: var(--space-3);
}

/* ----------------------------------------------------------------
   17. Articoli correlati
   ---------------------------------------------------------------- */
.related-articles {
  margin-top: var(--space-16);
  padding-top: var(--space-10);
  border-top: 2px solid var(--rule-lt);
}

/* ----------------------------------------------------------------
   18. Chi Siamo Page
   ---------------------------------------------------------------- */
.about-hero {
  padding-block: var(--space-20) var(--space-12);
  background: var(--paper);
  border-bottom: 1px solid var(--rule-lt);
}

.about-hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}

.about-hero-text h1 {
  font-family: var(--font-display);
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  font-weight: 900;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: var(--space-6);
}

.about-hero-text h1 em {
  color: var(--rouge);
  font-style: italic;
}

.about-hero-text p {
  font-size: var(--text-lg);
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: var(--space-6);
  max-width: 50ch;
}

.about-hero-image {
  position: relative;
}

.about-hero-image img {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
}

.topic-card {
  padding: var(--space-6);
  background: var(--surface);
  border: 1px solid var(--rule-lt);
  border-radius: var(--radius-lg);
  transition: box-shadow var(--ease), border-color var(--ease);
}

.topic-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--rouge);
}

.topic-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--rouge-lt);
  color: var(--rouge);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: var(--space-4);
}

.topic-title {
  font-family: var(--font-ui);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: var(--space-2);
}

.topic-desc {
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: 1.6;
}

/* ----------------------------------------------------------------
   19. Footer
   ---------------------------------------------------------------- */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,.55);
  padding-top: var(--space-16);
  padding-bottom: var(--space-8);
  margin-top: var(--space-20);
}

.site-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: var(--space-10);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.footer-brand-col {}

.footer-logo {
  display: inline-flex;
  margin-bottom: var(--space-4);
}

.footer-logo img {
  height: 30px;
  filter: brightness(0) invert(1);
}

.footer-tagline {
  font-size: var(--text-sm);
  color: rgba(255,255,255,.45);
  line-height: 1.7;
  max-width: 34ch;
  margin-bottom: var(--space-5);
}

.footer-social {
  display: flex;
  gap: var(--space-3);
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.55);
  font-size: 1.05rem;
  text-decoration: none;
  transition: background var(--ease), color var(--ease);
}

.footer-social-link:hover {
  background: var(--rouge);
  color: #fff;
}

.footer-col-title {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.9);
  margin-bottom: var(--space-5);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-links a {
  font-size: var(--text-sm);
  color: rgba(255,255,255,.45);
  text-decoration: none;
  transition: color var(--ease);
}

.footer-links a:hover { color: #fff; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-6);
  gap: var(--space-4);
  flex-wrap: wrap;
}

.footer-bottom-copy {
  font-size: var(--text-xs);
  color: rgba(255,255,255,.3);
}

.footer-bottom-links {
  display: flex;
  gap: var(--space-5);
}

.footer-bottom-links a {
  font-size: var(--text-xs);
  color: rgba(255,255,255,.3);
  text-decoration: none;
  transition: color var(--ease);
}

.footer-bottom-links a:hover { color: rgba(255,255,255,.7); }

/* ----------------------------------------------------------------
   20. Responsive
   ---------------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero-editorial .container {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .hero-image-wrap { order: -1; }

  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-toc {
    position: static;
    order: -1;
    max-height: none;
    overflow: visible;
  }

  .toc-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
  }

  .archive-layout {
    grid-template-columns: 1fr;
  }

  .about-hero .container {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }

  .site-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }
}

@media (max-width: 768px) {
  .site-nav { display: none; }
  .header-search { display: none; }
  .nav-toggle { display: flex; }

  .articles-grid,
  .archive-grid {
    grid-template-columns: 1fr;
  }

  .article-card.featured {
    flex-direction: column;
  }

  .article-card.featured .article-card-img {
    width: 100%;
    min-height: 200px;
    aspect-ratio: 16/9;
  }

  .archive-featured .article-card {
    flex-direction: column;
  }

  .archive-featured .article-card .article-card-img {
    width: 100%;
    min-height: 200px;
    aspect-ratio: 16/9;
  }

  .topic-grid {
    grid-template-columns: 1fr;
  }

  .author-card {
    flex-direction: column;
    gap: var(--space-4);
  }

  .article-cover {
    padding-inline: var(--space-4);
  }

  .article-layout {
    padding-inline: var(--space-4);
  }

  .article-hero-inner {
    padding-inline: var(--space-4);
  }

  .archive-hero h1 {
    font-size: var(--text-3xl);
  }

  .site-footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: var(--text-3xl);
  }

  .article-body-content {
    font-size: var(--text-base);
  }

  .toc-list {
    grid-template-columns: 1fr;
  }

  .hero-meta { gap: var(--space-3); }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ----------------------------------------------------------------
   21. Accessibility
   ---------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--rouge);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  html { scroll-behavior: auto; }
}

/* ----------------------------------------------------------------
   22. Print
   ---------------------------------------------------------------- */
@media print {
  .site-header,
  .article-toc,
  .reading-progress,
  .site-footer,
  .related-articles {
    display: none !important;
  }

  .article-layout {
    grid-template-columns: 1fr;
    max-width: 100%;
    padding: 0;
  }

  .article-body-content {
    font-size: 11pt;
    line-height: 1.6;
    color: #000;
  }

  .article-hero {
    background: #fff;
    color: #000;
    padding: 0 0 1rem;
  }

  .article-hero h1 { color: #000; }
}

/* ----------------------------------------------------------------
   23. Bootstrap paginate() override
   La funzione paginate() in functions.php emette markup Bootstrap
   (.pagination > .page-item > .page-link). Questi stili lo
   ridisegnano con i token del design system senza modificare functions.php.
   ---------------------------------------------------------------- */
ul.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding-block: var(--space-10);
  list-style: none;
  padding-left: 0;
  margin: 0;
}

ul.pagination .page-item .page-link,
ul.pagination .page-item span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding-inline: var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--muted);
  border: 1.5px solid var(--rule);
  background: var(--surface);
  text-decoration: none;
  transition: border-color var(--ease), color var(--ease), background var(--ease);
  font-family: var(--font-ui);
}

ul.pagination .page-item .page-link:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--paper-alt);
}

ul.pagination .page-item.active .page-link {
  background: var(--rouge);
  border-color: var(--rouge);
  color: #fff;
}

ul.pagination .page-item.disabled .page-link,
ul.pagination .page-item.disabled span {
  opacity: .35;
  pointer-events: none;
}

/* ----------------------------------------------------------------
   24. Search highlight (tag <mark> da search.php)
   ---------------------------------------------------------------- */
mark {
  background: #FFF3CD;
  color: var(--ink);
  padding: 0.05em 0.2em;
  border-radius: 2px;
}

/* ----------------------------------------------------------------
   25. Pagine legali (privacy-policy, cookie-policy)
   ---------------------------------------------------------------- */
.legal-body {
  font-family: var(--font-ui);
  font-size: var(--text-base);
  line-height: 1.8;
  color: var(--ink-soft);
  max-width: 76ch;
}

.legal-body h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--ink);
  margin-top: var(--space-12);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--rouge);
}

.legal-body h3 {
  font-family: var(--font-ui);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--ink);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}

.legal-body p { margin-bottom: var(--space-4); }

.legal-body ul {
  padding-left: 1.5em;
  list-style: disc;
  margin-bottom: var(--space-4);
}

.legal-body li { margin-bottom: var(--space-2); }

.legal-body a {
  color: var(--slate);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-body a:hover { color: var(--rouge); }

.legal-toc {
  background: var(--surface);
  border: 1px solid var(--rule-lt);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-10);
}

.legal-toc-title {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-4);
}

.legal-toc ol {
  padding-left: 1.25em;
  list-style: decimal;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.legal-toc a {
  font-size: var(--text-sm);
  color: var(--slate);
  text-decoration: none;
}

.legal-toc a:hover { color: var(--rouge); }

.update-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--muted);
  background: var(--paper-alt);
  border: 1px solid var(--rule);
  border-radius: var(--radius-pill);
  padding: var(--space-1) var(--space-4);
  margin-bottom: var(--space-6);
}

.cookie-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  font-family: var(--font-ui);
  margin-bottom: var(--space-6);
}

.cookie-table th,
.cookie-table td {
  border: 1px solid var(--rule);
  padding: var(--space-3) var(--space-4);
  text-align: left;
  vertical-align: top;
}

.cookie-table th {
  background: var(--paper-alt);
  font-weight: 700;
  color: var(--ink);
}

.cookie-table tr:nth-child(even) td {
  background: var(--paper);
}

.badge-tecnico {
  display: inline-flex;
  align-items: center;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--slate-lt);
  color: var(--slate);
  border: 1px solid rgba(42,74,109,.15);
}

/* ----------------------------------------------------------------
   26. Admin preview banner
   ---------------------------------------------------------------- */
.preview-banner {
  background: #FFF3CD;
  border-bottom: 2px solid #FFC107;
  padding: var(--space-3) var(--space-6);
  text-align: center;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
}

/* ----------------------------------------------------------------
   27. Search results
   ---------------------------------------------------------------- */
.search-results-count {
  font-size: var(--text-sm);
  color: var(--muted);
  margin-top: var(--space-2);
  margin-bottom: var(--space-8);
}

.search-result-card {
  display: flex;
  gap: var(--space-5);
  padding-block: var(--space-6);
  border-bottom: 1px solid var(--rule-lt);
}

.search-result-card:last-child { border-bottom: none; }

.search-result-img {
  width: 120px;
  height: 90px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--paper-alt);
}

.search-result-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-result-body { flex: 1; min-width: 0; }

.search-result-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: var(--space-2);
  line-height: 1.3;
}

.search-result-title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--ease);
}

.search-result-title a:hover { color: var(--rouge); }

.search-result-excerpt {
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: var(--space-3);
}

.search-result-meta {
  font-size: var(--text-xs);
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

@media (max-width: 480px) {
  .search-result-card { flex-direction: column; }
  .search-result-img { width: 100%; height: 160px; }
}
