/*
Theme Name: Ayame Blog
Theme URI: https://ayame.it
Author: Linda Rando
Author URI: https://ayame.it
Description: Tema del blog di Ayame, trascritto dalle bozze di Claude Design. Archivio numerato, articolo con indice laterale e barra di avanzamento, commenti aperti.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ayame-blog
Tags: blog, custom-colors, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ==========================================================================
   1. Font (self-hosted)
   ========================================================================== */

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 300; font-display: swap; src: url('assets/fonts/inter-300.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('assets/fonts/inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('assets/fonts/inter-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('assets/fonts/inter-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('assets/fonts/inter-700.woff2') format('woff2'); }
@font-face { font-family: 'Bitter'; font-style: normal; font-weight: 400; font-display: swap; src: url('assets/fonts/bitter-400.woff2') format('woff2'); }
@font-face { font-family: 'Bitter'; font-style: normal; font-weight: 600; font-display: swap; src: url('assets/fonts/bitter-600.woff2') format('woff2'); }
@font-face { font-family: 'Bitter'; font-style: normal; font-weight: 700; font-display: swap; src: url('assets/fonts/bitter-700.woff2') format('woff2'); }
@font-face { font-family: 'Bebas Neue'; font-style: normal; font-weight: 400; font-display: swap; src: url('assets/fonts/bebas-neue-400.woff2') format('woff2'); }
@font-face { font-family: 'Bubblegum Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('assets/fonts/bubblegum-sans-400.woff2') format('woff2'); }
@font-face { font-family: 'Shantell Sans'; font-style: italic; font-weight: 500; font-display: swap; src: url('assets/fonts/shantell-sans-500-italic.woff2') format('woff2'); }

/* ==========================================================================
   2. Token del design system Ayame
   ========================================================================== */

:root {
  color-scheme: only light;

  /* Superfici e testo */
  --background: 0 0% 99%;
  --foreground: 249 40% 20%;
  --card: 0 0% 100%;
  --card-foreground: 249 40% 20%;
  --popover: 0 0% 100%;
  --popover-foreground: 249 40% 20%;

  /* Picton Blue — Primary */
  --primary: 197 100% 48%;
  --primary-foreground: 0 0% 100%;

  /* Chili Red — Secondary */
  --secondary: 8 90% 58%;
  --secondary-foreground: 0 0% 100%;

  /* Viola — Accent */
  --accent: 249 42% 50%;
  --accent-foreground: 0 0% 100%;

  --muted: 0 0% 96%;
  --muted-foreground: 249 25% 50%;

  --destructive: 8 90% 58%;
  --destructive-foreground: 0 0% 100%;

  --border: 0 0% 90%;
  --input: 0 0% 94%;
  --ring: 197 100% 48%;

  --radius: 0.75rem;

  /* Palette Ayame estesa */
  --ayame-blue: 197 100% 48%;
  --ayame-blue-light: 197 100% 70%;
  --ayame-red: 8 90% 58%;
  --ayame-red-light: 8 90% 75%;
  --ayame-purple: 249 42% 50%;
  --ayame-purple-light: 249 42% 75%;
  --ayame-cream: 45 30% 96%;

  /* Famiglie tipografiche */
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-display: 'Bitter', serif;
  --font-hero: 'Bebas Neue', sans-serif;
  --font-cute: 'Bubblegum Sans', cursive;
  --font-note: 'Shantell Sans', cursive;

  /* Valori ricorrenti nelle pagine del blog */
  --ay-ink: hsl(249 40% 20%);
  --ay-ink-deep: hsl(249 37% 15%);
  --ay-paper: hsl(0 0% 99%);
  --ay-white: hsl(0 0% 100%);
  --ay-cream: hsl(45 30% 96%);
  --ay-muted: hsl(249 28% 44%);
  --ay-prose: hsl(249 32% 32%);
  --ay-rule: hsl(249 40% 20% / 0.15);
  --ay-rule-soft: hsl(249 40% 20% / 0.12);

  /* Rosso d'accento del corpo articolo: capolettera, citazione, indice attivo */
  --ay-accent: hsl(8 90% 52%);
  --ay-accent-soft: hsl(8 90% 52% / 0.18);

  /* Palette di categoria, sovrascritta dalle classi .ay-c--* */
  --ay-cat-label: hsl(249 40% 25%);
  --ay-cat-base: hsl(249 40% 20%);
  --ay-cat-number: hsl(249 40% 20%);
  --ay-cat-border: hsl(249 40% 20% / 0.35);
  --ay-cat-wash: hsl(249 40% 20% / 0.08);
  --ay-cat-strong: hsl(249 40% 20%);
  --ay-cat-light: hsl(0 0% 99% / 0.85);
  --ay-cat-light-hover: hsl(0 0% 99%);
  --ay-cat-pill-border: hsl(0 0% 99% / 0.4);
  --ay-cat-pill-bg: hsl(0 0% 99% / 0.12);
  --ay-cat-pill-text: hsl(0 0% 99% / 0.9);
  --ay-cat-pill-hover: hsl(0 0% 99%);
  --ay-cat-pill-hover-text: hsl(249 40% 20%);
}

/* Palette per categoria: assegnate lato PHP con ayame_category_palette() */
.ay-c--blue {
  --ay-cat-label: hsl(197 100% 34%);
  --ay-cat-base: hsl(197 100% 48%);
  --ay-cat-number: hsl(197 100% 40%);
  --ay-cat-border: hsl(197 100% 40% / 0.45);
  --ay-cat-wash: hsl(197 100% 48% / 0.1);
  --ay-cat-strong: hsl(197 100% 30%);
  --ay-cat-light: hsl(197 100% 70%);
  --ay-cat-light-hover: hsl(197 100% 78%);
  --ay-cat-pill-border: hsl(197 100% 70% / 0.55);
  --ay-cat-pill-bg: hsl(197 100% 48% / 0.14);
  --ay-cat-pill-text: hsl(197 100% 76%);
  --ay-cat-pill-hover: hsl(197 100% 48%);
  --ay-cat-pill-hover-text: hsl(0 0% 100%);
}
.ay-c--purple {
  --ay-cat-label: hsl(249 42% 44%);
  --ay-cat-base: hsl(249 42% 50%);
  --ay-cat-number: hsl(249 42% 50%);
  --ay-cat-border: hsl(249 42% 50% / 0.45);
  --ay-cat-wash: hsl(249 42% 50% / 0.1);
  --ay-cat-strong: hsl(249 42% 38%);
  --ay-cat-light: hsl(249 42% 75%);
  --ay-cat-light-hover: hsl(249 42% 82%);
  --ay-cat-pill-border: hsl(249 42% 75% / 0.55);
  --ay-cat-pill-bg: hsl(249 42% 50% / 0.14);
  --ay-cat-pill-text: hsl(249 42% 81%);
  --ay-cat-pill-hover: hsl(249 42% 50%);
  --ay-cat-pill-hover-text: hsl(0 0% 100%);
}
.ay-c--red {
  --ay-cat-label: hsl(8 90% 42%);
  --ay-cat-base: hsl(8 90% 52%);
  --ay-cat-number: hsl(8 90% 48%);
  --ay-cat-border: hsl(8 90% 48% / 0.45);
  --ay-cat-wash: hsl(8 90% 58% / 0.1);
  --ay-cat-strong: hsl(8 90% 38%);
  --ay-cat-light: hsl(8 90% 68%);
  --ay-cat-light-hover: hsl(8 90% 75%);
  --ay-cat-pill-border: hsl(8 90% 68% / 0.55);
  --ay-cat-pill-bg: hsl(8 90% 58% / 0.14);
  --ay-cat-pill-text: hsl(8 90% 74%);
  --ay-cat-pill-hover: hsl(8 90% 58%);
  --ay-cat-pill-hover-text: hsl(0 0% 100%);
}
.ay-c--ink {
  --ay-cat-label: hsl(249 40% 25%);
  --ay-cat-base: hsl(249 40% 20%);
  --ay-cat-number: hsl(249 40% 20%);
  --ay-cat-border: hsl(249 40% 20% / 0.35);
  --ay-cat-wash: hsl(249 40% 20% / 0.08);
  --ay-cat-strong: hsl(249 40% 20%);
  --ay-cat-light: hsl(0 0% 99% / 0.85);
  --ay-cat-light-hover: hsl(0 0% 99%);
  --ay-cat-pill-border: hsl(0 0% 99% / 0.4);
  --ay-cat-pill-bg: hsl(0 0% 99% / 0.12);
  --ay-cat-pill-text: hsl(0 0% 99% / 0.9);
  --ay-cat-pill-hover: hsl(0 0% 99%);
  --ay-cat-pill-hover-text: hsl(249 40% 20%);
}

/* La numerazione 01… segue il ciclo blu → viola → rosso, indipendente dalla categoria */
.ay-n--blue { --ay-num: hsl(197 100% 40%); }
.ay-n--purple { --ay-num: hsl(249 42% 50%); }
.ay-n--red { --ay-num: hsl(8 90% 48%); }

/* ==========================================================================
   3. Base
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  border-color: hsl(var(--border));
}

html { -webkit-text-size-adjust: 100%; }

/* Nessun line-height sul body: come nella bozza, l'interlinea è dichiarata
   solo dove serve, così i testi di una riga restano alti quanto il glifo. */
body {
  margin: 0;
  background: var(--ay-paper);
  color: var(--ay-ink);
  font-family: var(--font-sans);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); margin: 0; }

p { margin: 0; }

a { color: hsl(197 100% 40%); text-decoration: none; }
a:hover { color: hsl(8 90% 48%); }

img { max-width: 100%; }

input, textarea, select, button { font-family: inherit; }

input::placeholder,
textarea::placeholder { color: hsl(249 28% 44%); opacity: 0.8; }

ul, ol { margin: 0; padding: 0; }

:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 2px solid hsl(197 100% 40%);
  outline-offset: 2px;
}

.ay-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--ay-white);
  color: var(--ay-ink);
  font-weight: 600;
  border-radius: 0 0 0.625rem 0;
}
.ay-skip-link:focus { left: 0; }

.ay-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   4. Animazioni
   ========================================================================== */

@keyframes shine {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes fade-in {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

.ay-shine {
  background: linear-gradient(90deg, hsl(197 100% 48%), hsl(249 42% 60%) 40%, hsl(8 90% 58%) 70%, hsl(197 100% 48%));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: shine 6s ease-in-out infinite;
}

@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;
  }
}

/* ==========================================================================
   5. Contenitori e pattern
   ========================================================================== */

.ay-wrap { max-width: 72rem; margin: 0 auto; }
.ay-wrap--narrow { max-width: 56rem; margin: 0 auto; }
.ay-wrap--cta { max-width: 68rem; margin: 0 auto; }

.ay-pattern {
  position: absolute;
  inset: 0;
  background-image: var(--ay-pattern-url);
  background-size: 460px;
  background-repeat: repeat;
  opacity: 0.06;
  pointer-events: none;
}

/* ==========================================================================
   6. Navbar
   ========================================================================== */

.ay-navbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
}

.ay-navbar__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.ay-navbar__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 5rem;
}

.ay-navbar__logo { display: flex; align-items: center; }
.ay-navbar__logo img {
  height: 3rem;
  width: 140px;
  object-fit: contain;
  object-position: left center;
}

.ay-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.ay-nav__list {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ay-nav__item { position: relative; list-style: none; }

.ay-nav__link {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: hsl(0 0% 99%);
  font-weight: 500;
  font-size: 1rem;
}
.ay-nav__link:hover { color: hsl(197 100% 70%); }

.ay-nav__item.current-menu-item > .ay-nav__link,
.ay-nav__item.current-menu-ancestor > .ay-nav__link,
.ay-nav__link[aria-current='page'] {
  color: hsl(197 100% 70%);
  font-weight: 600;
}

.ay-nav__chevron { width: 1rem; height: 1rem; flex-shrink: 0; }

.ay-nav__sub {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 14rem;
  margin: 0.75rem 0 0;
  padding: 0.5rem;
  list-style: none;
  background: var(--ay-white);
  border-radius: 0.75rem;
  box-shadow: 0 20px 40px -16px hsl(249 37% 15% / 0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.25rem);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}
.ay-nav__item:hover > .ay-nav__sub,
.ay-nav__item:focus-within > .ay-nav__sub {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.ay-nav__sub a {
  display: block;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--ay-ink);
}
.ay-nav__sub a:hover { background: hsl(197 100% 48% / 0.1); color: hsl(197 100% 34%); }

.ay-nav__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ay-btn-ghost-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.5rem;
  padding: 0 1rem;
  border-radius: 0.625rem;
  border: 1px solid hsl(0 0% 99% / 0.5);
  color: hsl(0 0% 99%);
  background: transparent;
  font-size: 0.875rem;
  font-weight: 500;
}
.ay-btn-ghost-light:hover { background: hsl(0 0% 99%); color: var(--ay-ink); }

.ay-btn-blue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.75rem;
  padding: 0 2rem;
  border-radius: 0.625rem;
  background: hsl(197 100% 48%);
  color: var(--ay-white);
  font-size: 0.875rem;
  font-weight: 500;
}
.ay-btn-blue:hover { background: hsl(197 100% 44%); color: var(--ay-white); }

/* Menu mobile */
.ay-burger { display: none; align-items: center; }

.ay-burger__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  background: transparent;
  color: hsl(0 0% 99%);
  cursor: pointer;
  padding: 0;
}
.ay-burger__button svg { width: 1.625rem; height: 1.625rem; }
.ay-burger__button .ay-burger__close,
.ay-burger__button[aria-expanded='true'] .ay-burger__open { display: none; }
.ay-burger__button[aria-expanded='true'] .ay-burger__close { display: block; }

.ay-mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 60;
  background: hsl(0 0% 99%);
  border-top: 1px solid hsl(249 40% 20% / 0.1);
  box-shadow: 0 30px 60px -20px hsl(249 37% 15% / 0.45);
  padding: 0.5rem 1.25rem 1.5rem;
  display: none;
  flex-direction: column;
}
.ay-mobile-menu.is-open { display: flex; }

.ay-mobile-menu__list { list-style: none; }

.ay-mobile-menu__link {
  display: block;
  padding: 1rem 0;
  border-bottom: 1px solid hsl(249 40% 20% / 0.1);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--ay-ink);
}
.ay-mobile-menu__link:hover { color: hsl(197 100% 40%); }
.ay-mobile-menu__link--after-group {
  border-top: 1px solid hsl(249 40% 20% / 0.1);
  margin-top: 0.75rem;
}

.ay-mobile-menu__group { padding: 1.125rem 0 0.25rem; }
.ay-mobile-menu__group-title {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: hsl(249 42% 50%);
  margin-bottom: 0.5rem;
}
.ay-mobile-menu__sub {
  display: flex;
  flex-direction: column;
  border-left: 2px solid hsl(197 100% 48% / 0.35);
  padding-left: 1rem;
  list-style: none;
}
.ay-mobile-menu__sub a {
  display: block;
  padding: 0.6875rem 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--ay-ink);
}
.ay-mobile-menu__sub a:hover { color: hsl(197 100% 40%); }

.ay-mobile-menu__actions {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-top: 1.25rem;
}
.ay-mobile-menu__actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 3rem;
  border-radius: 0.625rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ay-white);
}
.ay-mobile-menu__cta-red { background: hsl(8 90% 58%); }
.ay-mobile-menu__cta-red:hover { background: hsl(8 90% 52%); color: var(--ay-white); }
.ay-mobile-menu__cta-blue { background: hsl(197 100% 48%); }
.ay-mobile-menu__cta-blue:hover { background: hsl(197 100% 44%); color: var(--ay-white); }

/* ==========================================================================
   7. Breadcrumb
   ========================================================================== */

.ay-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: hsl(0 0% 99% / 0.7);
}
.ay-breadcrumb a {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: hsl(0 0% 99% / 0.7);
}
.ay-breadcrumb a:hover { color: hsl(0 0% 99%); }
.ay-breadcrumb svg { width: 1rem; height: 1rem; flex-shrink: 0; }
.ay-breadcrumb [aria-current='page'] { font-weight: 500; color: hsl(0 0% 99%); }

/* ==========================================================================
   8. Hero archivio
   ========================================================================== */

.ay-hero {
  padding: 9rem 3rem 4.5rem;
  background: var(--ay-ink-deep);
  position: relative;
  overflow: hidden;
}

.ay-hero__inner { position: relative; }

.ay-hero .ay-breadcrumb { margin-bottom: 2.25rem; }

.ay-hero__grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 3.5rem;
  align-items: end;
}

.ay-hero__title {
  font-family: var(--font-hero);
  font-weight: 400;
  font-size: 11rem;
  line-height: 0.82;
  margin: 0;
  color: hsl(0 0% 99%);
  letter-spacing: 0.01em;
  overflow-wrap: break-word;
}

.ay-hero__title--md { font-size: 8rem; }
.ay-hero__title--sm { font-size: 6rem; }
.ay-hero__title--xs { font-size: 4.5rem; line-height: 0.92; }

.ay-hero__claim {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.375rem;
  line-height: 1.4;
  margin: 0 0 0.75rem;
  color: hsl(0 0% 99%);
}

.ay-hero__intro {
  font-size: 1.0625rem;
  line-height: 1.45;
  color: hsl(0 0% 99% / 0.72);
  margin: 0;
}

/* ==========================================================================
   9. Articolo in evidenza
   ========================================================================== */

.ay-featured {
  padding: 4rem 3rem;
  background: var(--ay-cream);
  border-bottom: 2px solid var(--ay-rule-soft);
}

.ay-featured__article {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 4rem;
  align-items: end;
}

.ay-featured__eyebrow {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.ay-featured__eyebrow span:first-child {
  font-family: var(--font-note);
  font-style: italic;
  font-weight: 500;
  font-size: 1.125rem;
  color: hsl(8 90% 48%);
}
.ay-featured__rule {
  height: 1px;
  flex: 1;
  background: hsl(249 40% 20% / 0.2);
}

.ay-cat-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ay-cat-label);
  margin-bottom: 1rem;
}
.ay-cat-label:hover { color: var(--ay-cat-strong); }

.ay-featured__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 3rem;
  line-height: 1.12;
  margin: 0 0 1.25rem;
  color: var(--ay-ink);
  text-wrap: pretty;
}
.ay-featured__title a { color: inherit; }
.ay-featured__title a:hover { color: var(--ay-cat-label); }

.ay-featured__excerpt {
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--ay-muted);
  margin: 0 0 1.75rem;
  max-width: 44rem;
}

.ay-featured__meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.ay-btn-purple {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 3rem;
  padding: 0 1.75rem;
  border-radius: 0.75rem;
  background: hsl(249 42% 50%);
  color: var(--ay-white);
  font-size: 0.9375rem;
  font-weight: 600;
}
.ay-btn-purple:hover { background: hsl(249 42% 44%); color: var(--ay-white); }
.ay-btn-purple svg { width: 1rem; height: 1rem; }

.ay-featured__dates {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.ay-featured__dates time {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ay-muted);
  white-space: nowrap;
}
.ay-dot {
  width: 0.25rem;
  height: 0.25rem;
  border-radius: 9999px;
  background: hsl(249 40% 20% / 0.3);
}

.ay-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.1875rem 0.75rem 0.0625rem;
  border-radius: 9999px;
  border: 1px solid hsl(249 40% 20% / 0.18);
  background: var(--ay-white);
  font-family: var(--font-hero);
  font-size: 1.0625rem;
  line-height: 1.15;
  letter-spacing: 0.06em;
  color: var(--ay-ink);
}

.ay-featured__count {
  border-left: 2px solid var(--ay-rule);
  padding-left: 2.5rem;
}
.ay-featured__count-number {
  font-family: var(--font-hero);
  font-size: 5.5rem;
  line-height: 0.85;
  margin: 0;
  color: hsl(249 42% 50%);
}
.ay-featured__count-text {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ay-muted);
  margin: 0.5rem 0 0;
}

/* ==========================================================================
   10. Barra filtri e ricerca
   ========================================================================== */

.ay-filters {
  position: sticky;
  top: 0;
  z-index: 30;
  background: hsl(0 0% 99% / 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--ay-ink);
}

.ay-filters__inner {
  padding: 1.125rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.ay-chips {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  list-style: none;
}

.ay-chip {
  display: inline-flex;
  align-items: center;
  height: 2.5rem;
  padding: 0 1.125rem;
  border-radius: 9999px;
  border: 1.5px solid var(--ay-cat-border);
  color: var(--ay-cat-label);
  font-size: 0.875rem;
  font-weight: 600;
}
.ay-chip:hover { background: var(--ay-cat-wash); color: var(--ay-cat-strong); }

.ay-chip[aria-current='page'] {
  border: 0;
  background: var(--ay-ink);
  color: var(--ay-white);
}
.ay-chip[aria-current='page']:hover { background: var(--ay-ink); color: var(--ay-white); }

.ay-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.ay-search__label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ay-ink);
}
.ay-search__field {
  position: relative;
  display: flex;
  align-items: center;
}
.ay-search__icon {
  position: absolute;
  left: 0.75rem;
  display: flex;
  color: var(--ay-muted);
  pointer-events: none;
}
.ay-search__icon svg { width: 1.0625rem; height: 1.0625rem; }
.ay-search__input {
  height: 2.75rem;
  width: 16rem;
  border-radius: 0.625rem;
  border: 1.5px solid hsl(249 40% 20% / 0.35);
  background: var(--ay-white);
  color: var(--ay-ink);
  padding: 0 0.875rem 0 2.375rem;
  font-size: 0.9375rem;
}
.ay-search__input:focus {
  outline: 2px solid hsl(197 100% 40%);
  outline-offset: 1px;
  border-color: hsl(197 100% 40%);
}

/* ==========================================================================
   11. Elenco articoli
   ========================================================================== */

.ay-list {
  padding: 1rem 3rem 4rem;
  background: var(--ay-paper);
}

.ay-entry {
  border-bottom: 2px solid var(--ay-rule);
  display: grid;
  grid-template-columns: 4.5rem 1fr 11rem;
  gap: 1.75rem;
  align-items: start;
  padding: 2.25rem 0;
}
.ay-entry:hover { background: hsl(45 30% 96% / 0.7); }
.ay-entry--no-number { grid-template-columns: 1fr 11rem; }

.ay-entry__number {
  font-family: var(--font-hero);
  font-size: 2rem;
  line-height: 1;
  margin: 0.25rem 0 0;
  color: var(--ay-num, var(--ay-cat-number));
}

.ay-entry__cat {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ay-cat-label);
  margin-bottom: 0.625rem;
}
.ay-entry__cat:hover { color: var(--ay-cat-strong); }

.ay-entry__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1.22;
  margin: 0 0 0.625rem;
  color: var(--ay-ink);
  text-wrap: pretty;
}
.ay-entry__title a { color: inherit; }
.ay-entry__title a:hover { color: var(--ay-cat-label); }

.ay-entry__excerpt {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ay-muted);
  margin: 0;
  max-width: 46rem;
}

.ay-entry__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.625rem;
  padding-top: 0.375rem;
}
.ay-entry__meta time {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ay-muted);
  white-space: nowrap;
}

.ay-pill--sm {
  padding: 0.1875rem 0.625rem 0.0625rem;
  background: var(--ay-cream);
  font-size: 1rem;
}

.ay-empty {
  padding: 3rem 0 1rem;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ay-muted);
  max-width: 44rem;
}

/* ==========================================================================
   12. Paginazione
   ========================================================================== */

.ay-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 2.5rem 0 0;
  flex-wrap: wrap;
}

.ay-pagination__edge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.75rem;
  padding: 0 1.25rem;
  border-radius: 0.75rem;
  border: 1.5px solid var(--ay-ink);
  color: var(--ay-ink);
  font-size: 0.9375rem;
  font-weight: 600;
}
.ay-pagination__edge:hover { background: var(--ay-ink); color: var(--ay-white); }
.ay-pagination__edge svg { width: 1rem; height: 1rem; }

.ay-pagination__edge--off {
  border-color: hsl(249 40% 20% / 0.2);
  color: hsl(249 28% 44% / 0.6);
  cursor: not-allowed;
}
.ay-pagination__edge--off:hover { background: transparent; color: hsl(249 28% 44% / 0.6); }

.ay-pagination__pages {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ay-pagination__pages .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.625rem;
  border: 1.5px solid hsl(249 40% 20% / 0.25);
  color: var(--ay-ink);
  font-family: var(--font-hero);
  font-size: 1.25rem;
}
.ay-pagination__pages a.page-numbers:hover {
  background: hsl(197 100% 48% / 0.12);
  color: hsl(197 100% 30%);
}
.ay-pagination__pages .page-numbers.current {
  border: 0;
  background: var(--ay-ink);
  color: var(--ay-white);
}
.ay-pagination__pages .page-numbers.dots {
  width: auto;
  height: auto;
  border: 0;
  padding: 0 0.375rem;
  color: var(--ay-muted);
  font-family: var(--font-sans);
  font-size: 1rem;
}

/* ==========================================================================
   13. CTA finale
   ========================================================================== */

.ay-cta {
  padding: 5.5rem 3rem;
  background: hsl(8 90% 58%);
  position: relative;
  overflow: hidden;
}

.ay-cta__watermark {
  position: absolute;
  right: -7rem;
  top: -6rem;
  height: 25rem;
  opacity: 0.1;
  filter: brightness(0) invert(1);
  pointer-events: none;
}

.ay-cta__inner {
  display: flex;
  align-items: center;
  gap: 0;
  position: relative;
}

.ay-cta__text {
  flex: 0 0 66%;
  box-sizing: border-box;
  padding: 0 3rem;
  display: flex;
  justify-content: flex-end;
}
.ay-cta__text > div { max-width: 34rem; }

.ay-cta__title {
  font-family: var(--font-hero);
  font-weight: 400;
  font-size: 4.5rem;
  line-height: 0.95;
  margin: 0 0 1.25rem;
  color: var(--ay-white);
  letter-spacing: 0.01em;
}

.ay-cta__lead {
  font-size: 1.125rem;
  line-height: 1.5;
  color: hsl(0 0% 100% / 0.92);
  margin: 0 0 1.5rem;
}

.ay-cta__buttons {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.ay-cta__primary-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ay-btn-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 3rem;
  padding: 0 2rem;
  border-radius: 0.75rem;
  background: var(--ay-white);
  color: var(--ay-ink);
  font-size: 0.9375rem;
  font-weight: 600;
  min-width: 200px;
}
.ay-btn-white:hover { background: var(--ay-cream); color: var(--ay-ink); }

.ay-btn-outline-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 3rem;
  padding: 0 2rem;
  border-radius: 0.75rem;
  background: transparent;
  border: 2px solid var(--ay-white);
  color: var(--ay-white);
  font-size: 0.9375rem;
  font-weight: 600;
  min-width: 200px;
  box-sizing: border-box;
}
.ay-btn-outline-white:hover { background: hsl(0 0% 100% / 0.15); color: var(--ay-white); }

.ay-cta__note {
  font-family: var(--font-note);
  font-style: italic;
  font-weight: 500;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--ay-white);
  white-space: nowrap;
  margin: 0.875rem 0 0;
}

.ay-cta__figure {
  flex: 0 0 34%;
  box-sizing: border-box;
  display: flex;
  justify-content: flex-start;
  position: relative;
  padding: 2.5rem 2rem 0;
}

.ay-cta__bubble {
  position: absolute;
  top: 0;
  left: 5rem;
  background: var(--ay-white);
  border-radius: 1.25rem;
  padding: 0.625rem 1.125rem;
  box-shadow: 0 10px 24px -8px hsl(249 40% 20% / 0.4);
  white-space: nowrap;
  transform: rotate(2deg);
}
.ay-cta__bubble span {
  font-family: var(--font-note);
  font-style: italic;
  font-weight: 500;
  font-size: 1.1875rem;
  color: hsl(249 42% 50%);
}

.ay-cta__photo {
  width: 12rem;
  height: 12rem;
  border-radius: 9999px;
  object-fit: cover;
  border: 4px solid hsl(0 0% 100% / 0.6);
  box-shadow: 0 20px 40px -12px hsl(249 40% 20% / 0.5);
}

/* ==========================================================================
   14. Footer
   ========================================================================== */

.ay-footer {
  background: var(--ay-ink);
  color: hsl(0 0% 99%);
  border-top: 8px solid hsl(197 100% 48%);
}

.ay-footer__inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 4rem 2rem;
}
.ay-footer--compact .ay-footer__inner { padding: 3.5rem 2rem; }

.ay-footer__cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}
.ay-footer--compact .ay-footer__cols {
  grid-template-columns: 2fr 1fr 1fr;
  margin-bottom: 2.5rem;
}

.ay-footer__brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.ay-footer--compact .ay-footer__brand { margin-bottom: 1.25rem; }
.ay-footer__brand img { height: 4rem; width: auto; filter: brightness(0) invert(1); }
.ay-footer--compact .ay-footer__brand img { height: 3.5rem; }
.ay-footer__brand p {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.25;
  margin: 0;
}

.ay-footer__contacts {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.ay-footer__contact {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: hsl(0 0% 99%);
  font-weight: 500;
  font-size: 1.125rem;
}
.ay-footer__contact:hover { color: hsl(8 90% 65%); }
.ay-footer__contact svg { width: 1.25rem; height: 1.25rem; }

.ay-footer__heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  margin: 0 0 1.5rem;
}
.ay-footer--compact .ay-footer__heading { font-size: 1.25rem; margin: 0 0 1.25rem; }
.ay-footer__heading--blue { color: hsl(197 100% 60%); }
.ay-footer__heading--purple { color: hsl(249 42% 68%); }
.ay-footer__heading--red { color: hsl(8 90% 68%); margin: 0 0 0.5rem; }

.ay-footer__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 1rem;
}
.ay-footer--compact .ay-footer__links { gap: 0.625rem; font-size: 0.9375rem; }
.ay-footer__links a { color: hsl(0 0% 99% / 0.92); font-weight: 500; }
.ay-footer__links--blue a:hover { color: hsl(197 100% 60%); }
.ay-footer__links--purple a:hover { color: hsl(249 42% 72%); }

.ay-footer__nl-text {
  font-size: 0.875rem;
  margin: 0 0 1rem;
  color: hsl(0 0% 99%);
  line-height: 1.5;
}

.ay-nl-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.ay-nl-form label {
  font-size: 0.8125rem;
  color: hsl(0 0% 99%);
  font-weight: 500;
}
.ay-nl-form input[type='text'],
.ay-nl-form input[type='email'] {
  height: 2.75rem;
  border-radius: 0.625rem;
  border: 1.5px solid hsl(0 0% 99% / 0.5);
  background: hsl(0 0% 99% / 0.12);
  color: hsl(0 0% 99%);
  padding: 0 0.75rem;
  font-size: 0.875rem;
  box-sizing: border-box;
  width: 100%;
}
.ay-nl-form input[type='text']:focus,
.ay-nl-form input[type='email']:focus {
  outline: 2px solid hsl(197 100% 60%);
  outline-offset: 1px;
}
.ay-nl-form input::placeholder { color: hsl(0 0% 99% / 0.6); opacity: 1; }

.ay-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
}
.ay-consent label {
  font-size: 0.8125rem;
  color: hsl(0 0% 99% / 0.92);
  line-height: 1.35;
}
.ay-consent label a { text-decoration: underline; color: hsl(0 0% 99%); }
.ay-consent label a:hover { color: hsl(249 42% 75%); }

.ay-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 0.25rem;
  border: 1.5px solid hsl(0 0% 99% / 0.6);
  margin: 0.125rem 0 0;
  flex-shrink: 0;
  cursor: pointer;
  background: transparent;
}
.ay-checkbox:checked {
  background: hsl(197 100% 60%);
  border-color: hsl(197 100% 60%);
}

.ay-nl-form__submit {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.75rem;
  border-radius: 0.625rem;
  background: hsl(249 42% 56%);
  color: var(--ay-white);
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
}
.ay-nl-form__submit:hover { background: hsl(249 42% 50%); }
.ay-nl-form__submit svg { width: 1rem; height: 1rem; }

.ay-footer__legal {
  border-top: 1px solid hsl(0 0% 99% / 0.2);
  padding-top: 2rem;
  font-size: 0.875rem;
  color: hsl(0 0% 99% / 0.92);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.ay-footer--compact .ay-footer__legal { padding-top: 1.75rem; }
.ay-footer__legal p { margin: 0; }
.ay-footer__legal a { color: inherit; text-decoration: underline; }

/* ==========================================================================
   15. Articolo singolo
   ========================================================================== */

.ay-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 0.3125rem;
  z-index: 60;
  background: hsl(249 40% 20% / 0.12);
}
.ay-progress__bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, hsl(197 100% 48%), hsl(249 42% 55%) 55%, hsl(8 90% 58%));
}

.ay-post-hero {
  padding: 9rem 3rem 3.5rem;
  background: var(--ay-ink-deep);
  position: relative;
  overflow: hidden;
}
.ay-post-hero .ay-breadcrumb { margin-bottom: 2rem; }
.ay-post-hero .ay-breadcrumb a { display: inline; }

.ay-post-hero__cat {
  display: inline-flex;
  align-items: center;
  height: 2.125rem;
  padding: 0 1rem;
  margin-bottom: 1.25rem;
  border-radius: 9999px;
  border: 1.5px solid var(--ay-cat-pill-border);
  background: var(--ay-cat-pill-bg);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ay-cat-pill-text);
}
.ay-post-hero__cat:hover {
  background: var(--ay-cat-pill-hover);
  border-color: var(--ay-cat-pill-hover);
  color: var(--ay-cat-pill-hover-text);
}

.ay-post-hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 3.75rem;
  line-height: 1.08;
  margin: 0 0 1.5rem;
  color: hsl(0 0% 99%);
  text-wrap: pretty;
}

.ay-post-hero__standfirst {
  font-size: 1.25rem;
  line-height: 1.2;
  color: hsl(0 0% 99% / 0.75);
  margin: 0 0 2.25rem;
  max-width: 44rem;
}

.ay-byline {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding-top: 1.75rem;
  border-top: 1px solid hsl(0 0% 99% / 0.2);
}
.ay-byline__avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  object-fit: cover;
  border: 2px solid hsl(0 0% 99% / 0.5);
}
.ay-byline__who {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}
.ay-byline__name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: hsl(0 0% 99%);
}
.ay-byline__date {
  font-size: 0.875rem;
  color: hsl(0 0% 99% / 0.72);
}
.ay-byline__reading {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  padding: 0.4375rem 0.875rem;
  border-radius: 9999px;
  background: hsl(0 0% 99% / 0.12);
  color: hsl(0 0% 99%);
  font-size: 0.875rem;
  font-weight: 500;
}
.ay-byline__reading svg { width: 1rem; height: 1rem; }

.ay-post-body {
  padding: 3.5rem 3rem 4.5rem;
  background: var(--ay-paper);
}

.ay-post-body__grid {
  display: grid;
  grid-template-columns: 1fr 16rem;
  gap: 4.5rem;
  align-items: start;
}

.ay-post-main { max-width: 44rem; min-width: 0; }

/* Contenuto redazionale */
.ay-prose {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--ay-prose);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.ay-prose > * { margin: 0; }
.ay-prose > p:first-child {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3125rem;
  line-height: 1.6;
  color: var(--ay-ink);
}
/* Capolettera sul primo paragrafo, senza toccare il testo dell'articolo */
.ay-prose > p:first-child::first-letter {
  float: left;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 4.25rem;
  line-height: 0.76;
  margin: 0.35rem 0.75rem 0 0;
  color: var(--ay-accent);
}
.ay-prose h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.875rem;
  line-height: 1.25;
  margin: 1.75rem 0 0;
  color: var(--ay-ink);
  scroll-margin-top: 5rem;
}
/* Sottotitoli con la barretta colorata: il colore ruota blu → viola → rosso */
.ay-prose h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.375rem;
  line-height: 1.3;
  margin: 0.25rem 0 0;
  padding-left: 1rem;
  border-left: 4px solid hsl(197 100% 48%);
  color: var(--ay-ink);
  scroll-margin-top: 5rem;
}
.ay-prose h3:nth-of-type(3n + 2) { border-left-color: hsl(249 42% 50%); }
.ay-prose h3:nth-of-type(3n + 3) { border-left-color: var(--ay-accent); }
.ay-prose ul,
.ay-prose ol {
  padding-left: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.ay-prose ul { list-style: disc; }
.ay-prose ol { list-style: decimal; }
.ay-prose li::marker { color: hsl(249 42% 50%); }
.ay-prose blockquote {
  position: relative;
  margin: 0.75rem 0 0;
  background: var(--ay-cream);
  border-left: 5px solid var(--ay-accent);
  border-radius: 0 1rem 1rem 0;
  padding: 2rem 2.25rem 2rem 3.75rem;
  overflow: hidden;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.375rem;
  line-height: 1.5;
  color: var(--ay-ink);
  text-wrap: pretty;
}
.ay-prose blockquote::before {
  content: '\201C';
  position: absolute;
  left: 1rem;
  top: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 6rem;
  line-height: 1;
  color: var(--ay-accent-soft);
  pointer-events: none;
}
.ay-prose blockquote > * { position: relative; margin: 0; }
.ay-prose blockquote p + p { margin-top: 0.75rem; }
.ay-prose blockquote cite {
  display: block;
  margin-top: 0.875rem;
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ay-muted);
}
.ay-prose img,
.ay-prose figure img { border-radius: 1rem; height: auto; }
.ay-prose figcaption {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ay-muted);
  margin-top: 0.625rem;
}
.ay-prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.875em;
  background: hsl(197 100% 48% / 0.12);
  border: 1px solid hsl(197 100% 40% / 0.25);
  color: hsl(197 100% 26%);
  padding: 0.1rem 0.375rem;
  border-radius: 0.25rem;
}
.ay-prose pre {
  background: var(--ay-ink-deep);
  color: hsl(0 0% 99%);
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  font-size: 0.9375rem;
  line-height: 1.6;
}
.ay-prose pre code { background: none; border: 0; padding: 0; color: inherit; }
.ay-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}
.ay-prose th,
.ay-prose td {
  border-bottom: 1px solid var(--ay-rule);
  padding: 0.75rem 0.5rem;
  text-align: left;
}
.ay-prose th { font-family: var(--font-display); font-weight: 700; color: var(--ay-ink); }
.ay-prose hr { border: 0; border-top: 2px solid var(--ay-rule); }
.ay-prose .wp-caption,
.ay-prose figure { margin: 0; }
.ay-prose .alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.ay-prose .alignright { float: right; margin: 0 0 1rem 1.5rem; }
.ay-prose .aligncenter { display: block; margin-left: auto; margin-right: auto; }

/* Condivisione */
.ay-share {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 2px solid var(--ay-rule);
}
.ay-share__label {
  font-family: var(--font-note);
  font-style: italic;
  font-weight: 500;
  font-size: 1.125rem;
  color: hsl(249 42% 44%);
}
.ay-share__buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}
.ay-share__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.625rem;
  border: 1.5px solid hsl(249 40% 20% / 0.25);
  color: var(--ay-ink);
}
.ay-share__icon svg { width: 1.125rem; height: 1.125rem; }
.ay-share__icon--linkedin:hover { background: hsl(197 100% 48%); border-color: hsl(197 100% 48%); color: var(--ay-white); }
.ay-share__icon--facebook:hover { background: hsl(249 42% 50%); border-color: hsl(249 42% 50%); color: var(--ay-white); }
.ay-share__icon--whatsapp:hover { background: hsl(8 90% 52%); border-color: hsl(8 90% 52%); color: var(--ay-white); }

.ay-share__copy {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.75rem;
  padding: 0 1rem;
  border-radius: 0.625rem;
  border: 1.5px solid hsl(249 40% 20% / 0.25);
  background: transparent;
  color: var(--ay-ink);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}
.ay-share__copy:hover { background: hsl(249 40% 20% / 0.08); }
.ay-share__copy svg { width: 1rem; height: 1rem; }

/* Newsletter nell'articolo */
.ay-nl-box {
  margin-top: 3rem;
  background: hsl(45 40% 98%);
  border: 2px solid var(--ay-ink);
  border-radius: 1rem;
  padding: 2.25rem;
  box-shadow: 6px 6px 0 0 var(--ay-ink);
}
.ay-nl-box__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.625rem;
  line-height: 1.25;
  margin: 0 0 0.625rem;
  color: var(--ay-ink);
}
.ay-nl-box__text {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ay-muted);
  margin: 0 0 1.5rem;
  max-width: 34rem;
}
.ay-nl-box__form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.75rem;
  align-items: end;
}
.ay-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.ay-field label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ay-ink);
}
.ay-input {
  height: 2.75rem;
  border-radius: 0.625rem;
  border: 1.5px solid hsl(249 40% 20% / 0.35);
  background: var(--ay-white);
  color: var(--ay-ink);
  padding: 0 0.875rem;
  font-size: 0.9375rem;
  box-sizing: border-box;
  width: 100%;
}
textarea.ay-input {
  height: auto;
  padding: 0.75rem 0.875rem;
  line-height: 1.6;
  resize: vertical;
}
.ay-input:focus {
  outline: 2px solid hsl(197 100% 40%);
  outline-offset: 1px;
  border-color: hsl(197 100% 40%);
}
.ay-btn-purple--sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.75rem;
  padding: 0 1.5rem;
  border-radius: 0.625rem;
  background: hsl(249 42% 50%);
  color: var(--ay-white);
  border: none;
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 600;
}
.ay-btn-purple--sm:hover { background: hsl(249 42% 44%); }

.ay-consent--light label { color: var(--ay-muted); line-height: 1.4; }
.ay-consent--light label a { color: inherit; text-decoration: underline; }
.ay-checkbox--light {
  border: 1.5px solid hsl(249 40% 20% / 0.5);
  margin: 0.0625rem 0 0;
  background: var(--ay-white);
}
.ay-checkbox--light:checked {
  background: hsl(249 42% 50%);
  border-color: hsl(249 42% 50%);
}
.ay-nl-box__consent { grid-column: span 3; }

/* Articolo precedente e successivo */

.ay-postnav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2.5rem;
}

.ay-postnav__link {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border: 2px solid var(--ay-rule);
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  color: var(--ay-ink);
}
.ay-postnav__link--prev { grid-column: 1; }
.ay-postnav__link--next {
  grid-column: 2;
  align-items: flex-end;
  text-align: right;
}
.ay-postnav__link--prev:hover { border-color: hsl(249 42% 50%); color: hsl(249 42% 44%); }
.ay-postnav__link--next:hover { border-color: var(--ay-accent); color: hsl(8 90% 42%); }

.ay-postnav__label {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ay-muted);
}
.ay-postnav__label svg { width: 0.875rem; height: 0.875rem; }

.ay-postnav__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.35;
  text-wrap: pretty;
}

/* ==========================================================================
   16. Commenti
   ========================================================================== */

.ay-comments { margin-top: 3.5rem; }

.ay-comments__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.875rem;
  line-height: 1.25;
  margin: 0 0 0.5rem;
  color: var(--ay-ink);
}
.ay-comments__count {
  font-family: var(--font-hero);
  font-weight: 400;
  color: hsl(197 100% 40%);
}

.ay-comments__intro {
  font-family: var(--font-note);
  font-size: 0.9375rem;
  line-height: 1.2;
  color: var(--ay-muted);
  margin: 0 0 2rem;
  font-weight: 500;
}

.ay-comments__list {
  list-style: none;
  margin: 0 0 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.ay-comments__list .children {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.ay-comments__list .children .ay-comment { padding-left: 3rem; }
.ay-comments__list .children .children .ay-comment { padding-left: 6rem; }

.ay-comment {
  border-top: 2px solid var(--ay-rule);
  padding-top: 1.5rem;
}

.ay-comment__head {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 0.75rem;
}

.ay-comment__avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  object-fit: cover;
  flex-shrink: 0;
}

.ay-comment__monogram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: color-mix(in srgb, var(--ay-cat-base) 15%, transparent);
  color: var(--ay-cat-strong);
  font-family: var(--font-hero);
  font-size: 1.125rem;
  flex-shrink: 0;
}

.ay-comment__who {
  display: flex;
  flex-direction: column;
}
.ay-comment__name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--ay-ink);
}
.ay-comment__badge {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: hsl(8 90% 42%);
  margin-left: 0.375rem;
}
.ay-comment__date {
  font-size: 0.8125rem;
  color: var(--ay-muted);
}
.ay-comment__body {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ay-prose);
}
.ay-comment__body p { margin: 0 0 0.75rem; }
.ay-comment__body p:last-child { margin-bottom: 0; }
.ay-comment__reply {
  display: inline-block;
  margin-top: 0.75rem;
}
.ay-comment__reply a {
  font-size: 0.8125rem;
  font-weight: 600;
  color: hsl(249 42% 44%);
}
.ay-comment__reply a:hover { color: hsl(8 90% 42%); }
.ay-comment__pending {
  font-size: 0.875rem;
  font-style: italic;
  color: var(--ay-muted);
  margin-bottom: 0.5rem;
}

/* La cornice sta sul contenitore, non sul <form>: WordPress stampa il titolo
   «Lascia un commento» prima del modulo, e nella bozza è dentro al riquadro. */
.ay-comment-form-box {
  border: 2px solid var(--ay-ink);
  border-radius: 1rem;
  padding: 2rem;
  background: var(--ay-white);
}
.ay-comment-form__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.375rem;
  line-height: 1.3;
  margin: 0 0 1.5rem;
  color: var(--ay-ink);
}
.ay-comment-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
.ay-comment-form__field { margin-bottom: 1rem; }
.ay-comment-form .ay-consent { margin-bottom: 1.5rem; }
.ay-comment-form__submit {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 3rem;
  padding: 0 1.75rem;
  border-radius: 0.75rem;
  background: var(--ay-ink);
  color: var(--ay-white);
  border: none;
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 600;
}
.ay-comment-form__submit:hover { background: hsl(249 42% 40%); }
.ay-comment-form .logged-in-as,
.ay-comment-form .comment-notes {
  font-size: 0.8125rem;
  color: var(--ay-muted);
  margin: 0 0 1.25rem;
}
.ay-comments__closed {
  font-size: 0.9375rem;
  color: var(--ay-muted);
  border-top: 2px solid var(--ay-rule);
  padding-top: 1.5rem;
}

/* ==========================================================================
   17. Indice laterale
   ========================================================================== */

.ay-toc { position: sticky; top: 2.5rem; }

.ay-toc__nav {
  border-left: 2px solid var(--ay-rule);
  padding-left: 1.25rem;
}

.ay-toc__label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ay-muted);
  margin: 0 0 1rem;
}

.ay-toc__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}
/* La voce attiva porta la barretta rossa sopra il filo grigio della colonna:
   il rientro negativo la fa combaciare con il bordo del <nav>. */
.ay-toc__list a {
  display: block;
  border-left: 3px solid transparent;
  margin-left: -1.375rem;
  padding-left: 1.25rem;
  font-size: 0.875rem;
  line-height: 1.45;
  font-weight: 500;
  color: var(--ay-muted);
}
.ay-toc__list a:hover { color: hsl(197 100% 34%); }
.ay-toc__list a.is-active {
  border-left-color: var(--ay-accent);
  font-weight: 700;
  color: var(--ay-ink);
}

.ay-toc__card {
  margin-top: 1.75rem;
  background: var(--ay-cream);
  border: 2px solid var(--ay-ink);
  border-radius: 1rem;
  padding: 1.375rem;
  box-shadow: 6px 6px 0 0 var(--ay-ink);
}
.ay-toc__card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.3;
  margin: 0 0 0.5rem;
  color: var(--ay-ink);
}
.ay-toc__card-text {
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--ay-muted);
  margin: 0 0 1.125rem;
}
.ay-toc__card-link {
  display: block;
  margin-top: 0.875rem;
  text-align: center;
  font-family: var(--font-note);
  font-style: italic;
  font-weight: 500;
  font-size: 1.0625rem;
  color: hsl(249 42% 44%);
}
.ay-toc__card-link:hover { color: hsl(249 42% 28%); }

.ay-btn-red {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.75rem;
  padding: 0 1.125rem;
  border-radius: 0.625rem;
  background: hsl(8 90% 52%);
  color: var(--ay-white);
  font-size: 0.875rem;
  font-weight: 600;
}
.ay-btn-red:hover { background: hsl(8 90% 46%); color: var(--ay-white); }
.ay-btn-red svg { width: 1rem; height: 1rem; }

/* ==========================================================================
   18. Articoli correlati
   ========================================================================== */

.ay-related {
  padding: 4rem 3rem;
  background: var(--ay-cream);
  border-top: 2px solid var(--ay-rule-soft);
}

.ay-related__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.25rem;
  line-height: 1.2;
  margin: 0 0 2rem;
  color: var(--ay-ink);
}
.ay-related__title span { color: hsl(249 42% 44%); }

.ay-related__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.ay-card {
  background: var(--ay-white);
  border: 2px solid var(--ay-rule-soft);
  border-radius: 1rem;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.ay-card:hover { border-color: var(--ay-cat-base); }

.ay-card__number {
  font-family: var(--font-hero);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--ay-num, var(--ay-cat-number));
}
.ay-card__cat {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ay-cat-label);
}
.ay-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 0;
  color: var(--ay-ink);
  text-wrap: pretty;
}
.ay-card__title a { color: inherit; }
.ay-card__title a:hover { color: var(--ay-cat-label); }
.ay-card__excerpt {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ay-muted);
  margin: 0;
  /* Nella bozza il riassunto della scheda sta in due righe: si taglia lì,
     così le tre schede restano alte uguali qualunque riassunto abbiano. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ay-card__meta {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.8125rem;
  color: var(--ay-muted);
  margin-top: auto;
  padding-top: 0.75rem;
}

/* ==========================================================================
   19. Pagina 404 e risultati vuoti
   ========================================================================== */

.ay-404 {
  padding: 5rem 3rem;
  background: var(--ay-paper);
}
.ay-404__code {
  font-family: var(--font-hero);
  font-size: 11rem;
  line-height: 0.82;
  margin: 0 0 1rem;
  letter-spacing: 0.01em;
}
.ay-404__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.25rem;
  line-height: 1.2;
  margin: 0 0 1rem;
  color: var(--ay-ink);
}
.ay-404__text {
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--ay-muted);
  margin: 0 0 2rem;
  max-width: 44rem;
}

/* ==========================================================================
   20. Adattamento mobile (soglia 820px, come nelle bozze)
   ========================================================================== */

@media (max-width: 820px) {
  h1, h2, h3 { text-wrap: pretty; overflow-wrap: break-word; }

  /* Navbar */
  .ay-navbar__inner { padding: 0 1rem; }
  .ay-navbar__bar { height: 3.75rem; flex-wrap: nowrap; }
  .ay-navbar__logo img { height: 2rem; width: 104px; }
  .ay-nav { gap: 0.5rem; flex-wrap: nowrap; }
  .ay-nav__list,
  .ay-nav__actions > a { display: none; }
  .ay-burger { display: inline-flex; }

  /* Hero */
  .ay-hero { padding: 5.5rem 1.25rem 2.75rem; }
  .ay-hero__grid { grid-template-columns: 1fr; gap: 2rem; }
  .ay-hero__title { font-size: 5rem; line-height: 0.9; }
  .ay-hero__claim { font-size: 1.1875rem; }
  .ay-hero__intro { font-size: 1rem; }
  .ay-breadcrumb {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .ay-breadcrumb::-webkit-scrollbar { display: none; }
  .ay-breadcrumb span { white-space: nowrap; }

  /* Articolo in evidenza */
  .ay-featured { padding: 2rem 1.25rem; }
  .ay-featured__article { grid-template-columns: 1fr; gap: 2rem; }
  .ay-featured__title { font-size: 2rem; }
  .ay-featured__excerpt { font-size: 1rem; }
  .ay-featured__count { padding-left: 1.5rem; }
  .ay-featured__count-number { font-size: 3.75rem; }

  /* Filtri */
  .ay-filters__inner {
    padding: 1.5rem 1.25rem;
    flex-wrap: wrap;
    gap: 1.5rem;
  }
  .ay-search__input { width: 100%; }
  .ay-search { flex: 1 1 100%; }
  .ay-search__field { flex: 1; }

  /* Elenco */
  .ay-list { padding: 1rem 1.25rem 2.75rem; }
  .ay-entry {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .ay-entry__title { font-size: 1.375rem; }
  .ay-entry__meta { padding-top: 0; }

  /* Paginazione */
  .ay-pagination { padding: 2.5rem 0 0; }

  /* Articolo */
  .ay-post-hero { padding: 5.5rem 1.25rem 2.75rem; }
  .ay-post-hero__title { font-size: 2.25rem; }
  .ay-post-hero__standfirst { font-size: 1.125rem; line-height: 1.45; }
  .ay-byline__reading { margin-left: 0; }

  .ay-post-body { padding: 2rem 1.25rem 2.75rem; }
  .ay-post-body__grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .ay-post-main { max-width: 100%; }
  .ay-prose { font-size: 1rem; }
  .ay-prose > p:first-child { font-size: 1.1875rem; }
  .ay-prose > p:first-child::first-letter { font-size: 3.5rem; margin-right: 0.625rem; }
  .ay-prose h2 { font-size: 1.375rem; }
  .ay-prose h3 { font-size: 1.1875rem; }
  .ay-prose blockquote {
    font-size: 1.1875rem;
    padding: 1.5rem 1.25rem 1.5rem 3rem;
  }
  .ay-prose blockquote::before { font-size: 4.5rem; left: 0.5rem; }

  .ay-share__buttons { margin-left: 0; }

  .ay-postnav { grid-template-columns: 1fr; }
  .ay-postnav__link--prev,
  .ay-postnav__link--next { grid-column: 1; }

  .ay-nl-box { padding: 1.5rem 1.25rem; }
  .ay-nl-box__title { font-size: 1.375rem; }
  .ay-nl-box__form { grid-template-columns: 1fr; }
  .ay-nl-box__consent { grid-column: span 1; }
  .ay-btn-purple--sm { width: 100%; }

  .ay-comments__title { font-size: 1.375rem; }
  .ay-comments__list .children .ay-comment { padding-left: 1.25rem; }
  .ay-comments__list .children .children .ay-comment { padding-left: 2.5rem; }
  .ay-comment-form-box { padding: 1.5rem 1.25rem; }
  .ay-comment-form__row { grid-template-columns: 1fr; }

  /* Indice: sull'ordine di lettura del telefono va dopo il testo, non affianco */
  .ay-toc { position: static; }

  /* Correlati */
  .ay-related { padding: 2rem 1.25rem; }
  .ay-related__title { font-size: 1.625rem; }
  .ay-related__grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .ay-card { padding: 1.5rem 1.25rem; }

  /* CTA */
  .ay-cta { padding: 2.75rem 1.25rem; }
  .ay-cta__inner { flex-wrap: wrap; }
  .ay-cta__text,
  .ay-cta__figure {
    flex: 1 1 100%;
    padding-left: 0;
    padding-right: 0;
  }
  .ay-cta__title { font-size: 2.75rem; }
  .ay-cta__lead { font-size: 1rem; }
  .ay-cta__buttons { flex-wrap: wrap; }
  .ay-cta__primary-group { align-items: flex-start; width: 100%; }
  .ay-btn-white,
  .ay-btn-outline-white { width: 100%; }
  .ay-cta__figure {
    flex-direction: column;
    align-items: flex-start;
    padding-top: 3.25rem;
  }
  .ay-cta__bubble {
    left: 0;
    right: auto;
    top: 0.5rem;
    transform: rotate(-2deg);
  }

  /* Footer */
  .ay-footer__inner,
  .ay-footer--compact .ay-footer__inner { padding: 2.5rem 1.25rem; }
  .ay-footer__cols,
  .ay-footer--compact .ay-footer__cols {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
  }
  .ay-footer__heading { font-size: 1.25rem; margin-bottom: 1rem; }

  /* 404 */
  .ay-404 { padding: 2.75rem 1.25rem; }
  .ay-404__code { font-size: 4rem; }
  .ay-404__title { font-size: 1.625rem; }
}

/* Fascia intermedia: tre colonne di correlati stanno strette sotto i 1100px */
@media (max-width: 1100px) and (min-width: 821px) {
  .ay-related__grid { grid-template-columns: repeat(2, 1fr); }
  .ay-post-body__grid { grid-template-columns: 1fr 14rem; gap: 2.5rem; }
  .ay-hero__title { font-size: 8rem; }
}

/* ==========================================================================
   21. Stampa
   ========================================================================== */

@media print {
  .ay-navbar,
  .ay-progress,
  .ay-filters,
  .ay-share,
  .ay-nl-box,
  .ay-cta,
  .ay-toc,
  .ay-comment-form-box { display: none !important; }

  .ay-post-hero,
  .ay-footer {
    background: #fff !important;
    color: #000 !important;
  }
  .ay-post-hero__title,
  .ay-post-hero__standfirst,
  .ay-byline__name,
  .ay-byline__date { color: #000 !important; }
  .ay-post-body__grid { grid-template-columns: 1fr; }
  .ay-post-main { max-width: 100%; }
}
