/* UX layer: archives, dark mode, tags, 404, motion, print. */
.ct-dynamic-data:is(h1) { font-size: 35px; line-height: 1.2; margin: 0; }

/* Hero caption */
.sn-hero-caption { font-size: 13px; line-height: 1.4; margin: 6px auto 0; padding-inline: 16px; max-width: var(--theme-narrow-container-max-width, 750px); color: var(--theme-text-color); opacity: .8; }

/* Related posts */
.ct-related-posts .ct-module-title { font-size: 22px; }

/* Tags */
.single-post .entry-tags { margin-block: 1.5em; }
.single-post .entry-tags a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px; margin: 0 6px 6px 0; border: 1px solid var(--theme-border-color); border-radius: 3px; font-size: 14px; color: var(--theme-text-color); }
.single-post .entry-tags a:nth-of-type(n+13) { display: none; }

/* 404 */
.sn-404-more { padding-block: 0 48px; }
.sn-404-list, .sn-404-sections { list-style: none; margin: 0; padding: 0; }
.sn-404-list li { padding: 10px 0; border-bottom: 1px solid var(--theme-border-color); }
.sn-404-list time { display: block; font-size: 13px; opacity: .8; }
.sn-404-sections { display: flex; flex-wrap: wrap; gap: 8px; }
.sn-404-sections a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--theme-border-color); border-radius: 3px; }

/* Dark mode: accessible red for text */
:root { --sn-accent-text: var(--theme-palette-color-1); }
html[data-color-mode="dark"] { --sn-accent-text: #ff6b6b; }
@media (prefers-color-scheme: dark) { html[data-color-mode="os-default"] { --sn-accent-text: #ff6b6b; } }
html[data-color-mode="dark"] :is(.sn-home-item__cat, .sn-catbar__link.is-current, .sn-catbar__link:hover, .sn-home-item__title a:hover, .sn-home-section__more:hover, .latest-posts-clean .wp-block-latest-posts__post-title) { color: var(--sn-accent-text); }
html[data-color-mode="dark"] :is(.entry-content, .ct-breadcrumbs, .ct-related-posts, .post-navigation) { --theme-link-initial-color: var(--sn-accent-text); }
@media (prefers-color-scheme: dark) {
  html[data-color-mode="os-default"] :is(.sn-home-item__cat, .sn-catbar__link.is-current, .sn-catbar__link:hover, .sn-home-item__title a:hover, .sn-home-section__more:hover, .latest-posts-clean .wp-block-latest-posts__post-title) { color: var(--sn-accent-text); }
  html[data-color-mode="os-default"] :is(.entry-content, .ct-breadcrumbs, .ct-related-posts, .post-navigation) { --theme-link-initial-color: var(--sn-accent-text); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .has-hover-effect img { transform: none !important; }
}

@media print {
  #header, .sn-catbar, .ct-share-box, .sharedaddy, .post-navigation, .ct-related-posts, #footer, .ct-read-progress-bar, .skip-link, #offcanvas, .ct-popup, [data-block^="hook:"] { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .single-post .hero-section .page-title, .single-post .hero-section .entry-meta * { color: #000 !important; text-shadow: none !important; }
  .single-post .entry-content a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
}

/* ======================= Shared parts (coordinator pass, 2026-11-25) ======================= */
/* Footer: a tight legal block, a wrapped menu on phones. */
.ct-footer [data-column="text"] .entry-content p { margin: 0 0 6px; font-size: 14px; line-height: 1.5; }
.ct-footer [data-column="text"] .entry-content :is(h2, h3, h4) { margin: 0 0 10px; font-size: 16px; }
@media (max-width: 689.98px) {
  .ct-footer [data-column="menu"] .menu { display: flex !important; flex-direction: row !important; flex-wrap: wrap; gap: 0 22px; }
  .ct-footer [data-column="menu"] .menu > li { width: auto; margin: 0; }
  .ct-footer [data-column="menu"] .menu a { min-height: 44px; display: inline-flex; align-items: center; }
  .ct-footer [data-row] > div { row-gap: 20px; }
}
/* Category bar on phones: the cut item fades out, which shows that the bar scrolls. */
.sn-catbar { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); }

/* ======================= Phone round (2026-11-25) ======================= */
@media (max-width: 689.98px) {
  /* Back to top: shown only while the reader scrolls up, so it does not sit on banners while reading down. */
  .ct-back-to-top.ct-hidden-sm { display: flex !important; width: 44px; height: 44px; inset-inline-end: 12px; bottom: calc(16px + env(safe-area-inset-bottom)); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .2s; }
  html.sn-btt-up .ct-back-to-top.ct-hidden-sm.ct-show { opacity: .92; visibility: visible; pointer-events: auto; }
  /* Newsletter popup uses an English demo form: never show it on phones. */
  #ct-popup-397836 { display: none !important; }
  /* Footer */
  .ct-footer [data-column="menu"] .menu a { font-size: 13px; }
  .ct-footer [data-column="menu"] .menu .current-menu-item > a { color: #ff6b6b !important; }
  .ct-footer [data-row="bottom"] .ct-footer-copyright { text-align: left; }
  .ct-footer [data-row="bottom"] .ct-footer-copyright p { text-align: left !important; }
  .ct-footer [data-row="bottom"] .ct-footer-copyright p + p { font-size: 13px !important; line-height: 1.5; opacity: .7; }
  .ct-footer [data-column="logo"] .site-logo-container { justify-content: flex-start; }
  .ct-footer [data-column="logo"] .site-logo-container img { height: 28px; width: auto; }
  .ct-footer [data-row="middle"] [data-column="logo"] { display: block !important; text-align: left !important; }
  .ct-footer [data-column="logo"] :is(.site-branding, .site-logo-container) { margin: 0 !important; justify-content: flex-start !important; align-items: flex-start !important; }
  .ct-footer [data-row="middle"] > .ct-container { padding-block: 22px; }
  /* 404: search field */
  .error404 input[type="search"] { min-height: 48px; font-size: 16px; }
  .sn-404-list li:nth-child(n+6) { display: none; }
}
@media (max-width: 380px) { .ct-back-to-top.ct-hidden-sm { width: 40px; height: 40px; inset-inline-end: 8px; } }

/* ======================= Micro-interactions (webmaster review, 2026-11-26) =======================
   Small, quick, and only where a pointer can hover. Banners are not touched. */
:root { --sn-ease: cubic-bezier(0.2, 0.7, 0.2, 1); }
:is(.sn-home-item__img, .entry-card > .ct-media-container, .ct-related-posts .ct-media-container, .sn-more__img, .ct-featured-image .ct-media-container) { overflow: hidden; }
@media (hover: hover) and (pointer: fine) {
  /* Pictures: a slow, small zoom when the story is under the pointer. */
  :is(.sn-home-item__img, .entry-card > .ct-media-container, .ct-related-posts .ct-media-container, .sn-more__img) img {
    transition: transform 0.6s var(--sn-ease), filter 0.3s ease;
    will-change: transform;
  }
  :is(.sn-home-item, .entry-card, .ct-related-posts-items > article, .sn-more__item):hover :is(.sn-home-item__img, .ct-media-container, .sn-more__img) img { transform: scale(1.045); }

  /* Headlines: an underline that draws from the left, and the brand red. */
  :is(.sn-home-item__title, .entry-card > .entry-title, .related-entry-title, .sn-more__h, .post-navigation .item-title, .sn-404-list) a,
  .post-navigation .item-title {
    background-image: linear-gradient(currentColor, currentColor);
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 1px;
    transition: background-size 0.35s var(--sn-ease), color 0.18s ease;
  }
  :is(.sn-home-item, .entry-card, .ct-related-posts-items > article, .sn-more__item):hover :is(.sn-home-item__title, .entry-title, .related-entry-title, .sn-more__h) a,
  .post-navigation a:hover .item-title,
  .sn-404-list a:hover {
    background-size: 100% 1px;
    color: var(--sn-accent-text, var(--theme-palette-color-1));
  }

  /* "Tutte le notizie": the arrow moves. */
  .sn-home-section__more span { display: inline-block; transition: transform 0.25s var(--sn-ease); }
  .sn-home-section__more:hover span { transform: translateX(5px); }

  /* Share and follow icons, topic pills, pager: a quick, light response. */
  .sn-share__btn, .sn-follow__link, .entry-tags-items a, .ct-pagination a, .ct-pagination .page-numbers, .sn-404-sections a { transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s var(--sn-ease), border-color 0.18s ease; }
  .sn-share__btn:hover { transform: translateY(-2px); }
  .entry-tags-items a:hover, .sn-404-sections a:hover { transform: translateY(-1px); }
  .sn-share__btn:active, .entry-tags-items a:active, .ct-pagination a:active { transform: translateY(0) scale(0.97); }

  /* Category labels above a headline. */
  :is(.entry-card > .entry-meta:first-child, .sn-article .hero-section .entry-meta:not([data-id="second"])) a { text-decoration: underline transparent; text-underline-offset: 3px; transition: text-decoration-color 0.18s ease; }
  :is(.entry-card > .entry-meta:first-child, .sn-article .hero-section .entry-meta:not([data-id="second"])) a:hover { text-decoration-color: currentColor; }
}
/* Keyboard focus: one clear ring everywhere. */
:is(a, button, summary, input, textarea, select):focus-visible { outline: 2px solid var(--sn-accent-text, var(--theme-palette-color-1)); outline-offset: 2px; border-radius: 2px; }
@media (prefers-reduced-motion: reduce) {
  :is(.sn-home-item__img, .ct-media-container, .sn-more__img) img { transition: none !important; transform: none !important; }
}
