:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --ink: #14181f;
  --muted: #5b6573;
  --line: #e3e7ee;
  --accent: #2C5AA0;
  --accent-soft: #e8eef7;
  --accent-2: #1e3f73;
  --shadow: 0 18px 40px rgba(20, 24, 31, 0.06);
  --radius: 18px;
  --font-sans: "IBM Plex Sans", "IBM Plex Sans Fallback", system-ui, sans-serif;
  --font-serif: "IBM Plex Serif", "IBM Plex Serif Fallback", Georgia, serif;
  --shell: min(1120px, calc(100% - 2rem));
  --prose: min(720px, 100%);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, #e8eef7 0%, transparent 55%),
    radial-gradient(900px 420px at 100% 0%, #e8eef5 0%, transparent 50%),
    var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent-2); }
p { margin: 0 0 1rem; }

.shell { width: var(--shell); margin-inline: auto; }
.screen-reader-text,
.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 1000;
  background: var(--ink);
  color: #fff;
  padding: .6rem 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(246, 247, 249, 0.86);
  border-bottom: 1px solid rgba(227, 231, 238, 0.9);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 74px;
}

.brand-link { text-decoration: none; color: inherit; display: grid; gap: .1rem; }
.brand-name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
.brand-tag { color: var(--muted); font-size: .78rem; }

.custom-logo-link { display: inline-flex; align-items: center; }
.custom-logo {
  max-height: 22px;
  width: auto;
  height: auto;
  max-width: min(210px, 58vw);
  object-fit: contain;
  aspect-ratio: 490 / 50;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: .35rem;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: .15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list > li {
  position: relative;
}

.nav-list > li > a {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .55rem .7rem;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-list > li > a:hover,
.nav-list > li:hover > a,
.nav-list > li:focus-within > a {
  color: var(--accent);
  background: var(--accent-soft);
}

.nav-list .menu-item-has-children > a::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: .7;
}

/* Dropdown panels */
.nav-list .sub-menu {
  list-style: none;
  margin: 0;
  padding: .45rem;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 260px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  display: none;
  z-index: 80;
}

.nav-list .sub-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -10px;
  height: 10px;
}

.nav-list > li:hover > .sub-menu,
.nav-list > li:focus-within > .sub-menu,
.nav-list > li.is-open > .sub-menu {
  display: block;
}

.nav-list .sub-menu li { position: relative; }

.nav-list .sub-menu a {
  display: block;
  padding: .7rem .85rem;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.35;
  text-transform: none;
  letter-spacing: 0;
}

.nav-list .sub-menu a:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

/* Nested (3rd level) flyout */
.nav-list .sub-menu .sub-menu {
  top: -6px;
  left: calc(100% + 6px);
  display: none;
}

.nav-list .sub-menu > li:hover > .sub-menu,
.nav-list .sub-menu > li:focus-within > .sub-menu,
.nav-list .sub-menu > li.is-open > .sub-menu {
  display: block;
}

.nav-list .sub-menu .menu-item-has-children > a::after {
  content: "";
  float: right;
  margin-top: .45rem;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 5px solid currentColor;
  border-right: 0;
}

.submenu-toggle {
  display: none;
  border: 0;
  background: transparent;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink);
  align-items: center;
  justify-content: center;
}
.submenu-toggle span {
  display: block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
  transition: transform .15s ease;
}
.menu-item-has-children.is-open > .submenu-toggle span {
  transform: rotate(180deg);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  width: 44px;
  height: 44px;
  cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  margin: 0 auto;
  position: relative;
  content: "";
}
.nav-toggle-bars::before { top: -6px; position: absolute; }
.nav-toggle-bars::after { top: 6px; position: absolute; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 600;
  padding: .85rem 1.25rem;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { background: #244f8c; transform: translateY(-1px); color: #fff !important; }
.btn-sm { padding: .55rem 0.95rem; font-size: .9rem; }
.btn-ghost {
  background: transparent;
  color: var(--ink) !important;
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--surface); color: var(--ink) !important; }

.eyebrow {
  display: inline-block;
  margin: 0 0 .75rem;
  color: var(--accent);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero-band {
  position: relative;
  margin: 0;
  padding: 3.5rem 0 3.75rem;
  background:
    radial-gradient(ellipse 85% 60% at 18% -8%, rgba(255,255,255,.18), transparent 58%),
    radial-gradient(ellipse 55% 50% at 100% 100%, rgba(0,0,0,.22), transparent 62%),
    radial-gradient(ellipse 45% 40% at 85% 15%, rgba(120, 180, 255, 0.16), transparent 55%),
    linear-gradient(158deg, #0f2342 0%, #1E3F73 38%, #2a5298 72%, #3168b5 100%);
  color: #fff;
  overflow: hidden;
}
.hero-band::before {
  content: "";
  position: absolute;
  inset: -48px;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 65% 35%, #000 8%, transparent 72%);
  pointer-events: none;
}
.hero-band-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 2.25rem;
  align-items: stretch;
}
.hero-kicker {
  margin: 0 0 1rem;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.82);
}
.hero-band-title {
  margin: 0 0 1.1rem;
  font-family: var(--font-serif);
  font-size: clamp(2.15rem, 4.6vw, 3.45rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  color: #fff;
  min-height: 2.25em;
}
.hero-title-accent {
  display: inline-block;
  margin-top: .08em;
  font-weight: 500;
  color: rgba(255,255,255,.95);
  animation: hero-accent-glow 5s ease-in-out infinite;
}
.hero-band-lead {
  margin: 0;
  max-width: 36rem;
  color: rgba(255,255,255,.84);
  font-size: 1.08rem;
  line-height: 1.62;
}
.hero-band-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: 1.65rem;
}
.btn-on-dark {
  background: transparent;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,.38);
}
.btn-on-dark:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.55);
  color: #fff !important;
}
.hero-band .btn:not(.btn-on-dark) {
  background: #fff;
  color: #1E3F73 !important;
  box-shadow: 0 10px 28px rgba(8, 18, 36, .22);
}
.hero-band .btn:not(.btn-on-dark):hover {
  background: #f3f6fb;
  color: #1E3F73 !important;
  transform: translateY(-1px);
}
.hero-metrics {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  margin-top: 2.25rem;
  max-width: 100%;
  border-radius: 14px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  overflow: hidden;
}
.hero-metric {
  flex: 1 1 0;
  min-width: 0;
  display: block;
  padding: .95rem .85rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
}
.hero-metric + .hero-metric {
  border-left: 1px solid rgba(255,255,255,.14);
}
.hero-metric strong {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 2.8vw, 1.9rem);
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  min-width: 2.5ch;
}
.hero-metric span {
  display: block;
  margin-top: .38rem;
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: rgba(255,255,255,.65);
  line-height: 1.35;
}
.hero-band-panel { display: flex; }
.hero-spotlight {
  display: flex;
  flex-direction: column;
  width: 100%;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 24px 50px rgba(10, 24, 48, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: transform 0.22s ease-out, box-shadow 0.25s ease;
}

.hero-spotlight:hover {
  box-shadow: 0 30px 60px rgba(10, 24, 48, 0.34);
}
.hero-spotlight-media {
  display: block;
  aspect-ratio: 16 / 10;
  background: #e8eef5;
}
.hero-spotlight-media .spatti-cover,
.hero-spotlight-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-spotlight-body {
  display: grid;
  gap: .45rem;
  padding: 1.15rem 1.25rem 1.3rem;
  color: var(--ink);
}
.hero-spotlight-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero-spotlight-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
  font-weight: 600;
}
.hero-spotlight-excerpt {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 9;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-spotlight-meta {
  color: var(--muted);
  font-size: .84rem;
}
/* ===== Hero motion (JS + CSS) ===== */
.hero-band {
  background-size: 240% 240%;
  animation: hero-gradient-drift 14s ease-in-out infinite;
}

@keyframes hero-gradient-drift {
  0%, 100% { background-position: 0% 35%; }
  33% { background-position: 80% 55%; }
  66% { background-position: 40% 70%; }
}

@keyframes hero-accent-glow {
  0%, 100% { text-shadow: 0 0 0 transparent; }
  50% { text-shadow: 0 0 28px rgba(255, 255, 255, 0.38); }
}

.hero-band-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  transform: translate(var(--hero-parallax-x, 0), var(--hero-parallax-y, 0));
  transition: transform 0.35s ease-out;
}

.hero-band-bg::after {
  content: "";
  position: absolute;
  inset: -48px;
  background-image:
    radial-gradient(circle at 48px 48px, rgba(255, 255, 255, 0.14) 1.5px, transparent 2px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 65% 35%, #000 8%, transparent 72%);
  pointer-events: none;
  animation:
    hero-grid-drift 26s linear infinite reverse,
    hero-dots-pulse 3.2s ease-in-out infinite;
}

@keyframes hero-dots-pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 0.9; }
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(56px);
  opacity: 0.95;
  will-change: transform;
  animation: hero-orb-float 6s ease-in-out infinite;
}

.hero-orb--1 {
  width: 400px;
  height: 400px;
  top: -140px;
  right: 5%;
  background: rgba(120, 180, 255, 0.38);
  animation-delay: 0s;
}

.hero-orb--2 {
  width: 320px;
  height: 320px;
  bottom: -100px;
  left: 52%;
  background: rgba(30, 63, 115, 0.55);
  animation-delay: -2.5s;
}

.hero-orb--3 {
  width: 220px;
  height: 220px;
  top: 32%;
  left: 8%;
  background: rgba(255, 255, 255, 0.2);
  animation-delay: -5s;
}

.hero-orb--4 {
  width: 180px;
  height: 180px;
  top: 8%;
  left: 42%;
  background: rgba(90, 160, 255, 0.28);
  animation-delay: -7s;
  animation-duration: 8s;
}

@keyframes hero-orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(48px, -36px) scale(1.14); }
  50% { transform: translate(-36px, 24px) scale(0.9); }
  75% { transform: translate(28px, 40px) scale(1.08); }
}

.hero-band::before {
  transform: translate(var(--hero-grid-x, 0), var(--hero-grid-y, 0));
  transition: transform 0.35s ease-out;
  animation: hero-grid-drift 18s linear infinite;
}

@keyframes hero-grid-drift {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 96px 96px, 96px 96px; }
}

.hero-band-copy > .hero-kicker { --hero-i: 0; }
.hero-band-copy > .hero-band-title { --hero-i: 1; }
.hero-band-copy > .hero-band-lead { --hero-i: 2; }
.hero-band-copy > .hero-band-actions { --hero-i: 3; }
.hero-band-copy > .hero-metrics { --hero-i: 4; }
.hero-band-panel { --hero-i: 5; }

.hero-spotlight[data-hero-tilt] {
  transform: perspective(900px)
    rotateY(var(--hero-tilt-y, 0deg))
    rotateX(var(--hero-tilt-x, 0deg))
    translateY(var(--hero-tilt-lift, 0px));
  transform-style: preserve-3d;
  transition: transform 0.22s ease-out, box-shadow 0.25s ease;
}

.hero-spotlight[data-hero-tilt].is-tilt-active,
.hero-spotlight[data-hero-tilt]:hover {
  box-shadow: 0 32px 64px rgba(10, 24, 48, 0.36);
}

.hero-kicker {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: .38rem .82rem;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
}

.hero-kicker::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    105deg,
    transparent 28%,
    rgba(255, 255, 255, 0.28) 50%,
    transparent 72%
  );
  background-size: 220% 100%;
  animation: hero-shimmer 3.2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes hero-shimmer {
  0% { background-position: 200% 0; opacity: 0.4; }
  50% { background-position: 0% 0; opacity: 1; }
  100% { background-position: -200% 0; opacity: 0.4; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-band,
  .hero-orb,
  .hero-band::before,
  .hero-band-bg::after,
  .hero-title-accent,
  .hero-spotlight[data-hero-tilt],
  .hero-kicker::after {
    animation: none !important;
  }
  .hero-band-bg {
    transform: none !important;
  }
  .hero-band [data-hero-reveal] {
    opacity: 1;
    transform: none;
    animation: none !important;
  }
}

/* legacy hero leftovers kept harmless */
.hero { padding: 2rem 0; }
.hero-title { font-family: var(--font-serif); }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; }

.featured-block { margin: 1rem auto 3rem; }
.featured-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.featured-media { display: block; min-height: 100%; background: #dfe6ef; }
.featured-media img { width: 100%; height: 100%; object-fit: cover; min-height: 320px; }
.featured-body { padding: 2rem; display: flex; flex-direction: column; justify-content: center; }
.featured-title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.2;
  margin: .4rem 0 0.8rem;
  letter-spacing: -0.02em;
}
.featured-title a { color: inherit; text-decoration: none; }
.featured-excerpt { color: var(--muted); }

.section { padding: 1.5rem 0 3rem; }
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.section-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.8rem;
  letter-spacing: -0.02em;
}
.section-sub { margin: .35rem 0 0; color: var(--muted); }
.text-link { font-weight: 600; text-decoration: none; }

.cat-chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .75rem;
}
.cat-chips a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
}
.cat-chips em {
  font-style: normal;
  color: var(--muted);
  font-weight: 600;
  font-size: .85rem;
}
.cat-chips a:hover {
  border-color: #b7c9e4;
  background: var(--accent-soft);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition: transform .18s ease, box-shadow .18s ease;
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.post-card-media { display: block; aspect-ratio: 16 / 10; background: #d9e1ea; overflow: hidden; }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; }
.post-card-fallback {
  display: block;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(135deg, #d7e2f0, #d5e0ec 55%, #eceff4);
}
.post-card-body { padding: 1.1rem 1.15rem 1.25rem; display: grid; gap: .55rem; }
.post-card-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
}
.post-card-title a { color: inherit; text-decoration: none; }
.post-card-excerpt { margin: 0; color: var(--muted); font-size: .95rem; }
.post-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  color: var(--muted);
  font-size: .82rem;
}

.meta-cats {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: 0;
  padding: 0;
}
.meta-cats a {
  display: inline-block;
  padding: .2rem .55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  text-decoration: none;
  font-size: .75rem;
  font-weight: 600;
}

.page-hero { padding: 3rem 0 1.5rem; }
.page-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.page-lead { color: var(--muted); max-width: 40rem; margin-top: .75rem; }

.layout-with-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 2rem;
  padding-bottom: 3rem;
}
.content-col { min-width: 0; }
.sidebar {
  display: grid;
  gap: 1rem;
  align-content: start;
  position: sticky;
  top: 92px;
}
.side-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.1rem 1.15rem;
}
.side-title {
  margin: 0 0 .85rem;
  font-size: 0.95rem;
  font-family: var(--font-serif);
  letter-spacing: -0.01em;
}
.side-search .search-form { width: 100%; }
.side-search .search-field { min-width: 0; width: 100%; }
.side-search .search-form { flex-wrap: wrap; }
.side-posts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .85rem;
}
.side-post {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: .7rem;
  text-decoration: none;
  color: inherit;
  align-items: start;
}
.side-post-thumb {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  background: #e8eef5;
}
.side-post-thumb img,
.side-post-thumb .spatti-cover,
.side-post-thumb .spatti-cover-svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.side-post-title {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  line-height: 1.35;
  color: var(--ink);
}
.side-post-date {
  display: block;
  margin-top: .25rem;
  color: var(--muted);
  font-size: .78rem;
}
.side-post:hover .side-post-title { color: var(--accent); }
.side-cats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .35rem;
}
.side-cats a {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  text-decoration: none;
  color: var(--ink);
  padding: .45rem .55rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: .9rem;
}
.side-cats em {
  font-style: normal;
  color: var(--muted);
  font-size: .8rem;
}
.side-cats a:hover {
  background: var(--accent-soft);
  color: var(--accent);
}
.side-cta {
  background: linear-gradient(160deg, #1e3f73, #2C5AA0);
  border: 0;
  color: #fff;
}
.side-cta-kicker {
  margin: 0 0 .35rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .72rem;
  opacity: .85;
  font-weight: 700;
}
.side-cta-title {
  margin: 0 0 .5rem;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  line-height: 1.25;
}
.side-cta-text {
  margin: 0 0 1rem;
  opacity: .9;
  font-size: .9rem;
}
.side-cta .btn {
  background: #fff;
  color: #1e3f73 !important;
  width: 100%;
}
.side-cta .btn:hover { background: #e8eef7; color: #1e3f73 !important; }
.side-cta-link {
  display: inline-block;
  margin-top: .7rem;
  color: #fff;
  font-weight: 600;
  font-size: .9rem;
}

.spatti-cover {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #eef3fb;
}
.spatti-cover-svg {
  width: 100%;
  height: 100%;
  display: block;
}
.spatti-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.post-card-media {
  position: relative;
}
.post-card-media .spatti-cover,
.featured-media .spatti-cover {
  aspect-ratio: 16 / 10;
}
.post-card-media::after,
.featured-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(15, 27, 45, 0.04));
}
.side-post-thumb .spatti-cover-svg text,
.side-post-thumb .spatti-cover-svg foreignObject {
  display: none;
}
.layout-with-sidebar .cards-grid {
  grid-template-columns: repeat(2, 1fr);
}

.sidebar .widget {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.1rem 1.15rem;
  margin-bottom: 1rem;
}
.widget-title {
  margin: 0 0 .75rem;
  font-size: 1rem;
  font-family: var(--font-serif);
}

.single-hero { padding: 3rem 0 1rem; max-width: 820px; }
.single-title {
  margin: .5rem 0 1rem;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.4vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}
.single-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  color: var(--muted);
  font-size: .92rem;
}
.single-thumb { margin: 0 auto 1.5rem; }
.single-thumb img {
  width: 100%;
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid var(--line);
}
.single-layout { align-items: start; }
.prose {
  font-size: 1.05rem;
  line-height: 1.75;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}
.prose > *:first-child { margin-top: 0; }
.prose h2,
.prose h3,
.prose h4 {
  font-family: var(--font-serif);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 2rem 0 .8rem;
}
.prose h2 { font-size: 1.65rem; }
.prose h3 { font-size: 1.3rem; }
.prose ul,
.prose ol { padding-left: 1.2rem; }
.prose blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.2rem;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
}
.prose pre,
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.prose pre {
  overflow: auto;
  padding: 1rem;
  background: #111827;
  color: #e5e7eb;
  border-radius: 12px;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: .95rem;
}
.prose th,
.prose td {
  border: 1px solid var(--line);
  padding: .6rem .7rem;
  text-align: left;
}
.prose figure { margin: 1.5rem 0; }
.prose figcaption { color: var(--muted); font-size: .85rem; margin-top: .4rem; }

/* ===== Responsive video embeds (YouTube / oEmbed) ===== */
.prose .wp-block-embed,
.entry-content .wp-block-embed,
.prose .wp-block-video,
.entry-content .wp-block-video {
  margin: 1.5rem 0;
  max-width: 100%;
  width: 100%;
}

.prose .wp-block-embed__wrapper,
.entry-content .wp-block-embed__wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.prose .wp-has-aspect-ratio .wp-block-embed__wrapper,
.entry-content .wp-has-aspect-ratio .wp-block-embed__wrapper {
  aspect-ratio: 16 / 9;
}

.prose .wp-has-aspect-ratio .wp-block-embed__wrapper iframe,
.entry-content .wp-has-aspect-ratio .wp-block-embed__wrapper iframe,
.prose .wp-has-aspect-ratio .wp-block-embed__wrapper video,
.entry-content .wp-has-aspect-ratio .wp-block-embed__wrapper video {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  border: 0;
}

/* Legacy / classic editor: iframe senza wrapper aspect-ratio */
.prose iframe,
.entry-content iframe,
.prose video,
.entry-content video {
  width: 100% !important;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  display: block;
  border: 0;
}

.prose .wp-block-embed__wrapper:not(:has(iframe)) {
  aspect-ratio: 16 / 9;
}

.prose .wp-block-embed iframe[src*="youtube"],
.prose .wp-block-embed iframe[src*="youtu.be"],
.prose .wp-block-embed iframe[src*="vimeo"],
.entry-content .wp-block-embed iframe[src*="youtube"],
.entry-content .wp-block-embed iframe[src*="youtu.be"],
.entry-content .wp-block-embed iframe[src*="vimeo"] {
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: auto;
}


.single-footer { padding-bottom: 2.5rem; }
.tag-list { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; margin-bottom: 1.5rem; }
.tag-list a {
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .25rem .7rem;
  color: var(--muted);
  font-size: .85rem;
}
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
}
.post-nav a { text-decoration: none; color: var(--ink); font-weight: 600; }

.cta-band {
  margin: 1rem 0 0;
  padding: 2.5rem 0;
  background: linear-gradient(120deg, #1e3f73, #2C5AA0);
  color: #fff;
}
.cta-inner {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: center;
}
.cta-title {
  margin: 0 0 .5rem;
  font-family: var(--font-serif);
  font-size: 1.7rem;
}
.cta-text { margin: 0; color: rgba(255,255,255,.82); max-width: 36rem; }
.cta-band .search-form { min-width: min(360px, 100%); }
.cta-band .search-field {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.25);
  color: #fff;
}
.cta-band .search-field::placeholder { color: rgba(255,255,255,.7); }

.search-form {
  display: flex;
  gap: .5rem;
  align-items: center;
}
.search-field {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .7rem 1rem;
  background: var(--surface);
  font: inherit;
}

.site-footer {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  background: #eef1f5;
  padding-top: 2.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.1fr;
  gap: 1.75rem;
  padding-bottom: 2rem;
}
.footer-logo { margin-bottom: .75rem; }
.footer-logo .custom-logo { max-height: 26px; max-width: min(240px, 70vw); width: auto; }
.footer-title {
  margin: 0 0 .5rem;
  font-family: var(--font-serif);
  font-size: 1.3rem;
}
.footer-text { color: var(--muted); margin: 0; }
.footer-heading {
  margin: 0 0 .7rem;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  font-weight: 700;
}
.footer-links,
.footer-contacts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .45rem;
}
.footer-links a,
.footer-contacts a { color: var(--ink); text-decoration: none; }
.footer-links a:hover,
.footer-contacts a:hover { color: var(--accent); }
.footer-contacts { color: var(--muted); font-size: .92rem; }
.footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-top: 1px solid #dde3eb;
  padding: 1rem 0 1.4rem;
  color: var(--muted);
  font-size: .9rem;
}
.footer-bar p { margin: 0; }
.footer-bar-links {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  align-items: center;
}
.footer-bar-links a,
.footer-bar-links .linkish {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
.footer-bar-links a:hover,
.footer-bar-links .linkish:hover { color: var(--accent); }
.to-top { color: var(--ink); text-decoration: none; font-weight: 600; }

/* Cookie consent */
.spatti-cookie {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  padding: 1rem;
  background: rgba(20, 24, 31, 0.55);
}
.spatti-cookie[hidden] { display: none !important; }
.spatti-cookie-inner {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow);
}
.spatti-cookie-title {
  margin: 0 0 .35rem;
  font-family: var(--font-serif);
  font-size: 1.05rem;
}
.spatti-cookie-text {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
  max-width: 52rem;
}
.spatti-cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  flex-shrink: 0;
}

.navigation.pagination {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}
.navigation.pagination .nav-links { display: flex; gap: .4rem; flex-wrap: wrap; }
.navigation.pagination a,
.navigation.pagination span {
  display: inline-flex;
  min-width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  color: var(--ink);
  padding: 0 .7rem;
}
.navigation.pagination .current {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.comments-wrap { padding-bottom: 3rem; }
.comment-list { list-style: none; padding: 0; }
.comment-body {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: .8rem;
}

@media (max-width: 980px) {
  .featured-card,
  .hero-band-inner,
  .layout-with-sidebar,
  .footer-grid,
  .cta-inner,
  .cards-grid,
  .cat-chips,
  .post-nav,
  .spatti-cookie-inner { grid-template-columns: 1fr; }
  .hero-band { padding: 2.5rem 0 2.75rem; }
  .hero-band-actions { justify-content: center; }
  .hero-metrics { max-width: none; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-chips { grid-template-columns: repeat(2, 1fr); }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .header-inner { position: relative; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: .6rem;
    flex-direction: column;
    align-items: stretch;
    box-shadow: var(--shadow);
    max-height: min(78vh, 640px);
    overflow: auto;
    z-index: 90;
  }
  .site-nav.is-open { display: flex; }
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0;
  }
  .nav-list > li > a {
    width: 100%;
    border-radius: 10px;
    justify-content: space-between;
  }
  .nav-list .menu-item-has-children {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
  }
  .nav-list .menu-item-has-children > a { grid-column: 1; }
  .submenu-toggle { display: inline-flex; grid-column: 2; }
  .nav-list .menu-item-has-children > a::after { display: none; }

  /* Accordion: hide absolute dropdowns, show inline when open */
  .nav-list .sub-menu,
  .nav-list .sub-menu .sub-menu {
    position: static;
    display: none;
    box-shadow: none;
    border: 0;
    border-radius: 0;
    min-width: 0;
    padding: 0 0 0 .55rem;
    margin: 0;
    background: transparent;
    grid-column: 1 / -1;
  }
  .nav-list > li:hover > .sub-menu,
  .nav-list > li:focus-within > .sub-menu,
  .nav-list .sub-menu > li:hover > .sub-menu,
  .nav-list .sub-menu > li:focus-within > .sub-menu {
    display: none;
  }
  .nav-list > li.is-open > .sub-menu,
  .nav-list .sub-menu > li.is-open > .sub-menu {
    display: block;
  }
  .nav-list .sub-menu a { padding-left: .85rem; }
}

@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .spatti-cookie-inner {
    display: grid;
    gap: 1rem;
  }
  .footer-bar { flex-direction: column; align-items: flex-start; }
  .page-contact-layout { grid-template-columns: 1fr; }
  .page-cta-inner { flex-direction: column; align-items: flex-start; }
  .hero-metric { padding: .8rem .55rem; }
  .hero-metric span { font-size: .56rem; letter-spacing: .04em; }

  /* Card affiancate → una colonna su telefono */
  .cards-grid,
  .hub-classic,
  .software-grid,
  .layout-with-sidebar .cards-grid {
    grid-template-columns: 1fr;
  }

  .hub-mag-side,
  .hub-split-stack {
    grid-template-columns: 1fr;
  }

  .hub-teaser {
    display: grid;
  }
}

/* ===== Pages ===== */
.page-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  margin: 0 0 1rem;
  font-size: .85rem;
  color: var(--muted);
}
.page-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}
.page-breadcrumb a:hover { color: var(--accent); }
.page-breadcrumb-sep { opacity: .5; }
.page-breadcrumb-current { color: var(--ink); font-weight: 600; }

.page-hero-rich {
  padding-top: 2.5rem;
  padding-bottom: 1.25rem;
}
.page-hero-media {
  margin: 0 auto 1.75rem;
}
.page-hero-media img {
  width: 100%;
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid var(--line);
  max-height: 420px;
  object-fit: cover;
}

.page-content {
  max-width: 820px;
  padding-bottom: 2.5rem;
}
.page-content-legal {
  max-width: 760px;
  font-size: 1rem;
}
.page-content-legal h2 {
  margin-top: 2.2rem;
}

.page-contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 2rem;
  align-items: start;
  padding-bottom: 1rem;
}
.page-contact-aside {
  display: grid;
  gap: 1rem;
  position: sticky;
  top: 92px;
}
.page-contact-layout .page-content {
  max-width: none;
  padding-bottom: 0;
}

.page-cta {
  padding: 0 0 3rem;
}
.page-cta-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 1.6rem;
  border-radius: 18px;
  background: linear-gradient(135deg, #1E3F73, #2C5AA0);
  color: #fff;
  box-shadow: var(--shadow);
}
.page-cta-title {
  margin: 0 0 .4rem;
  font-family: var(--font-serif);
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}
.page-cta-text {
  margin: 0;
  color: rgba(255,255,255,.86);
  max-width: 36rem;
}
.page-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  flex-shrink: 0;
}
.page-cta .btn {
  background: #fff;
  color: #1E3F73 !important;
}
.page-cta .btn:hover {
  background: #e8eef7;
  color: #1E3F73 !important;
}
.page-cta .btn-ghost {
  background: transparent;
  color: #fff !important;
  border-color: rgba(255,255,255,.45);
}
.page-cta .btn-ghost:hover {
  background: rgba(255,255,255,.12);
  color: #fff !important;
}

.page-service .page-content,
.page-product .page-content {
  max-width: none;
}

/* ===== Service landing pages ===== */
.service-hero {
  margin: 0;
  padding: 2.35rem 0 2rem;
  background:
    radial-gradient(880px 360px at 10% 0%, rgba(44, 90, 160, 0.11), transparent 55%),
    linear-gradient(180deg, #eef3f9 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}

.service-hero-lead {
  max-width: 44rem;
  font-size: 1.05rem;
  line-height: 1.55;
}

.service-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 2rem;
  align-items: start;
  padding-top: 2rem;
  padding-bottom: 1rem;
}

.service-content {
  max-width: 820px;
  padding-bottom: 1.5rem;
}

.service-content h2 {
  margin-top: 2.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--line);
}

.service-content > h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.service-content h3 {
  margin-top: 1.6rem;
  color: var(--accent);
  font-size: 1.15rem;
}

.service-content ul {
  display: grid;
  gap: 0.35rem;
  margin: 0.85rem 0 1.25rem;
  padding-left: 0;
  list-style: none;
}

.service-content ul li {
  position: relative;
  padding: 0.55rem 0.75rem 0.55rem 2rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 2px);
  background: var(--surface);
  line-height: 1.45;
}

.service-content ul li::before {
  content: "";
  position: absolute;
  left: 0.75rem;
  top: 0.95rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
}

.service-content .service-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.service-content .service-toc li {
  padding: 0;
  border: 0;
  background: transparent;
}

.service-content .service-toc li::before { display: none; }

.service-content .service-toc a {
  display: inline-block;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.service-content .service-toc a:hover {
  border-color: #b7c9e4;
  background: #fff;
}

.service-content .service-callout {
  margin: 1.25rem 0 1.5rem;
  padding: 1rem 1.15rem;
  border: 1px solid #b7c9e4;
  border-radius: var(--radius);
  background: rgba(44, 90, 160, 0.06);
  color: var(--text);
  line-height: 1.55;
}

.service-aside {
  position: sticky;
  top: 5.5rem;
}

.service-aside-card {
  padding: 1.15rem 1.2rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(20, 24, 31, 0.05);
}

.service-aside-title {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.service-aside-links {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.service-aside-links a {
  display: block;
  padding: 0.55rem 0.7rem;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
}

.service-aside-links a:hover {
  border-color: #b7c9e4;
  color: var(--accent);
  background: rgba(44, 90, 160, 0.04);
}

.service-aside-note {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.service-aside-cta {
  width: 100%;
  justify-content: center;
}

@media (max-width: 980px) {
  .page-contact-layout {
    grid-template-columns: 1fr;
  }
  .page-contact-aside {
    position: static;
  }

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

  .service-aside {
    position: static;
    order: -1;
  }
}


/* ===== Software products (homepage) ===== */
.software-band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border-bottom: none;
}

.software-section {
  position: relative;
  z-index: 1;
  padding-top: 2.25rem;
  padding-bottom: 2.75rem;
}

/* Sezione prodotti: più larga del shell standard per allineare le 5 card in una riga */
.software-section--wide {
  width: min(1520px, calc(100% - 2.5rem));
}

.software-section-head {
  align-items: start;
  margin-bottom: 1.5rem;
}

.software-section-head .eyebrow {
  margin-bottom: 0.35rem;
}

.software-section-head .section-title {
  margin-top: 0;
}

.software-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.9rem;
  align-items: stretch;
}

.software-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  min-height: 100%;
  min-width: 0;
  padding: 1.1rem 0.95rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(20, 24, 31, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  text-align: center;
}

.software-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: #b7c9e4;
}

.software-card-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-bottom: 0.2rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--line);
}

.software-card-logo {
  width: auto;
  max-width: 148px;
  height: 32px;
  object-fit: contain;
  object-position: center;
}

.software-card-logo--tekcad {
  height: 36px;
  max-width: 156px;
}

.software-card-logo--quillscape {
  height: 34px;
  max-width: 160px;
}

.software-card-logo--smartdico {
  height: 38px;
  max-width: 176px;
}

.software-card-tag {
  margin: 0;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.35;
}

.software-card-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.18rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-align: center;
}

.software-card-url {
  display: inline-block;
  margin: -0.1rem 0 0.1rem;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.01em;
  word-break: break-word;
}
.software-card-url:hover {
  color: var(--accent-2);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.software-card-desc {
  margin: 0;
  flex: 1;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
  text-align: left;
  hyphens: auto;
}

.software-card-cta {
  align-self: center;
  margin-top: 0.45rem;
}

.software-card-cta::after {
  content: "↗";
  font-size: 0.85em;
  opacity: 0.9;
}

@media (max-width: 1280px) {
  .software-section--wide {
    width: min(1200px, calc(100% - 2rem));
  }

  .software-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .software-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .software-section--wide {
    width: calc(100% - 1.5rem);
  }

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

/* ===== YouTube homepage ===== */
.yt-shorts-band {
  margin: 0;
  padding: 2.4rem 0 2.6rem;
  background:
    linear-gradient(180deg, rgba(232, 238, 247, 0.45) 0%, rgba(255, 255, 255, 0) 100%);
}

.yt-shorts-shell {
  padding: 0;
}

.yt-shorts-panel {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) + 8px);
  padding: 1.85rem 1.9rem 1.95rem;
  color: #fff;
  background:
    radial-gradient(720px 320px at 100% 0%, rgba(255, 59, 48, 0.16), transparent 58%),
    radial-gradient(560px 280px at 0% 100%, rgba(44, 90, 160, 0.22), transparent 62%),
    linear-gradient(145deg, #101722 0%, #162033 52%, #1b2840 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 28px 70px rgba(10, 16, 28, 0.28);
}

.yt-shorts-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 70% 20%, #000 8%, transparent 72%);
  pointer-events: none;
}

.yt-band-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.45rem;
}

.yt-band-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.55rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.yt-brand-icon {
  flex-shrink: 0;
  color: #ff3b30;
}

.yt-band-title {
  margin: 0 0 0.45rem;
  font-family: var(--font-serif);
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: #fff;
}

.yt-band-lead {
  margin: 0;
  max-width: 38rem;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.98rem;
  line-height: 1.55;
}

.yt-band-cta {
  flex-shrink: 0;
  background: #fff !important;
  color: #162033 !important;
  border: none;
  box-shadow: 0 10px 24px rgba(8, 14, 28, 0.24);
}

.yt-band-cta:hover {
  background: #f3f6fb !important;
  color: #162033 !important;
  transform: translateY(-1px);
}

.yt-shorts-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

.yt-short-card {
  max-width: 220px;
  width: 100%;
  margin: 0 auto;
  min-width: 0;
}

.yt-video-card {
  min-width: 0;
}

.yt-short-link,
.yt-video-link {
  display: block;
  color: inherit;
  text-decoration: none !important;
}

.yt-short-link:hover,
.yt-video-link:hover {
  color: inherit;
  text-decoration: none !important;
}

.yt-short-title,
.yt-video-title {
  text-decoration: none;
}

.yt-short-frame,
.yt-video-frame {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0b1018;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.yt-short-frame {
  aspect-ratio: 9 / 16;
  max-height: 300px;
  border-radius: 18px;
}

.yt-video-frame {
  aspect-ratio: 16 / 9;
  border-radius: calc(var(--radius) + 2px);
}

.yt-short-thumb,
.yt-video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.4s ease, opacity 0.3s ease;
}

.yt-short-shade,
.yt-video-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 12, 20, 0.05) 35%, rgba(8, 12, 20, 0.72) 100%);
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.yt-short-play,
.yt-video-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: fit-content;
  height: fit-content;
  color: #ff3b30;
  opacity: 0;
  transform: translateY(6px) scale(0.94);
  transition: opacity 0.25s ease, transform 0.25s ease;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.35));
  pointer-events: none;
}

.yt-chip {
  position: absolute;
  z-index: 2;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: rgba(8, 12, 20, 0.82);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.yt-chip--duration {
  right: 0.55rem;
  bottom: 0.55rem;
}

.yt-short-copy {
  display: grid;
  gap: 0.28rem;
  padding: 0.75rem 0.15rem 0;
}

.yt-short-kicker {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.yt-short-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: var(--font-serif);
  font-size: 0.98rem;
  line-height: 1.34;
  letter-spacing: -0.015em;
  color: rgba(255, 255, 255, 0.96);
}

.yt-short-meta {
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.76rem;
}

.yt-short-link:hover .yt-short-frame,
.yt-video-link:hover .yt-video-frame {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.34);
}

.yt-short-link:hover .yt-short-thumb,
.yt-video-link:hover .yt-video-thumb {
  transform: scale(1.05);
}

.yt-short-link:hover .yt-short-play,
.yt-video-link:hover .yt-video-play {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.yt-short-link:hover .yt-short-shade,
.yt-video-link:hover .yt-video-shade {
  opacity: 0.88;
}

.yt-videos-band {
  margin: 0 0 0.35rem;
  padding: 0;
  background:
    radial-gradient(900px 320px at 100% 0%, rgba(44, 90, 160, 0.07), transparent 62%),
    linear-gradient(180deg, rgba(248, 250, 252, 0.9) 0%, var(--surface) 100%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.yt-videos-shell {
  padding-top: 2.35rem;
  padding-bottom: 2.85rem;
}

.yt-videos-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.45rem;
}

.yt-video-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.85fr);
  gap: 1rem;
  align-items: stretch;
}

.yt-video-card--hero .yt-video-frame {
  min-height: 100%;
  aspect-ratio: auto;
  height: 100%;
}

.yt-video-card--hero .yt-video-link {
  display: grid;
  grid-template-rows: 1fr auto;
  height: 100%;
  min-height: 100%;
  padding: 0.95rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: 0 14px 36px rgba(20, 24, 31, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.yt-video-card--hero .yt-video-link:hover {
  transform: translateY(-3px);
  border-color: #b7c9e4;
  box-shadow: var(--shadow);
}

.yt-video-stack {
  display: grid;
  gap: 0.85rem;
}

.yt-video-card--side .yt-video-link {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 0.9rem;
  align-items: center;
  min-height: 100%;
  padding: 0.72rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(20, 24, 31, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.yt-video-card--side .yt-video-link:hover {
  transform: translateY(-2px);
  border-color: #b7c9e4;
  box-shadow: var(--shadow);
}

.yt-video-card--side .yt-video-frame {
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  border-color: rgba(20, 24, 31, 0.08);
  box-shadow: none;
}

.yt-video-card--side .yt-video-play svg {
  width: 28px;
  height: 20px;
}

.yt-video-copy {
  display: grid;
  gap: 0.32rem;
  min-width: 0;
  padding: 0.1rem 0.25rem 0.1rem 0;
}

.yt-video-kicker {
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.yt-video-title {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.02rem;
  line-height: 1.32;
  letter-spacing: -0.018em;
  color: var(--ink);
}

.yt-video-card--hero .yt-video-title {
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  -webkit-line-clamp: 2;
}

.yt-video-card--side .yt-video-title {
  font-size: 0.96rem;
  -webkit-line-clamp: 2;
}

.yt-video-meta {
  color: var(--muted);
  font-size: 0.78rem;
}

@media (max-width: 980px) {
  .yt-shorts-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .yt-band-head,
  .yt-videos-intro {
    flex-direction: column;
    align-items: start;
  }

  .yt-video-showcase {
    grid-template-columns: 1fr;
  }

  .yt-video-card--hero .yt-video-link {
    min-height: 0;
  }

  .yt-video-card--hero .yt-video-frame {
    aspect-ratio: 16 / 9;
    height: auto;
  }
}

@media (max-width: 640px) {
  .yt-shorts-band {
    padding: 1.5rem 0 1.65rem;
  }

  .yt-shorts-panel {
    padding: 1.25rem 1.1rem 1.35rem;
    border-radius: calc(var(--radius) + 2px);
  }

  .yt-shorts-row {
    display: flex;
    gap: 0.8rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .yt-shorts-row::-webkit-scrollbar {
    display: none;
  }

  .yt-short-card {
    flex: 0 0 min(68vw, 210px);
    scroll-snap-align: start;
  }

  .yt-video-card--side .yt-video-link {
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.62rem;
  }
}

/* ===== Home category hubs (dynamic) ===== */
.home-hubs {
  margin: 0 0 0.5rem;
}

.home-hubs-intro {
  position: relative;
  padding: 2.4rem 0 2rem;
  margin-bottom: 0;
  overflow: hidden;
}

.home-hubs-intro-band {
  position: relative;
  border-radius: calc(var(--radius) + 4px);
  padding: 1.75rem 1.8rem 1.85rem;
  background:
    radial-gradient(700px 280px at 100% 0%, rgba(44, 90, 160, 0.14), transparent 60%),
    linear-gradient(135deg, #1E3F73 0%, #2C5AA0 58%, #3D6BB3 100%);
  color: #fff;
  box-shadow: var(--shadow);
}

.home-hubs-intro-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 80% 30%, #000 5%, transparent 70%);
  pointer-events: none;
  border-radius: inherit;
}

.home-hubs-intro-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.7fr);
  gap: 1.5rem;
  align-items: end;
}

.home-hubs-intro .eyebrow {
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 0.45rem;
}

.home-hubs-intro-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 3.2vw, 2.35rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #fff;
}

.home-hubs-intro-sub {
  margin: 0.7rem 0 0;
  max-width: 36rem;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.02rem;
  line-height: 1.55;
}

.home-hubs-intro-aside {
  display: grid;
  gap: 0.75rem;
  justify-items: start;
}

.home-hubs-intro-aside p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
  line-height: 1.45;
}

.home-hubs-intro-band .btn {
  background: #fff;
  color: #1E3F73 !important;
}

.home-hubs-intro-band .btn:hover {
  background: #e8eef7;
  color: #1E3F73 !important;
}

.home-hub {
  border-top: 1px solid var(--line);
}

.home-hub--alt {
  background:
    linear-gradient(180deg, rgba(232, 238, 247, 0.55) 0%, rgba(246, 247, 249, 0.15) 100%);
}

.home-hub-inner {
  padding-top: 2.15rem;
  padding-bottom: 2.6rem;
}

.home-hub-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 1rem 1.25rem;
  margin-bottom: 1.4rem;
}

.home-hub-index {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--accent);
  opacity: 0.35;
  min-width: 2.4rem;
}

.home-hub-count {
  margin: 0 0 0.3rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-hub-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 2.6vw, 1.9rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.home-hub-title a {
  color: inherit;
  text-decoration: none;
}

.home-hub-title a:hover {
  color: var(--accent);
}

.home-hub-head .section-sub {
  margin-top: 0.35rem;
}

.home-hub-head .text-link {
  align-self: center;
  white-space: nowrap;
}

/* Split layout */
.hub-split {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 1.1rem;
  align-items: stretch;
}

.hub-split-lead,
.hub-split-item,
.hub-mag-lead,
.hub-mag-side-item,
.hub-rail-link {
  text-decoration: none;
  color: inherit;
}

.hub-split-lead {
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 100%;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.hub-split-lead:hover,
.hub-split-item:hover,
.hub-mag-lead:hover,
.hub-mag-side-item:hover,
.hub-rail-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: #b7c9e4;
  color: inherit;
}

.hub-split-lead-media {
  display: block;
  min-height: 220px;
  background: #d9e1ea;
  overflow: hidden;
}

.hub-split-lead-media img,
.hub-mag-lead-media img,
.hub-mag-side-media img,
.hub-split-item-media img,
.hub-rail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hub-split-lead-body {
  display: grid;
  gap: 0.45rem;
  padding: 1.15rem 1.2rem 1.25rem;
}

.hub-split-kicker,
.hub-mag-kicker {
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hub-split-title,
.hub-mag-title {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.hub-split-excerpt,
.hub-mag-excerpt {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.hub-split-meta,
.hub-mag-meta,
.hub-split-item-meta,
.hub-mag-side-meta,
.hub-rail-meta {
  color: var(--muted);
  font-size: 0.8rem;
}

.hub-split-stack {
  display: grid;
  gap: 0.85rem;
}

.hub-split-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 0.9rem;
  align-items: center;
  padding: 0.7rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.hub-split-item-media {
  display: block;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: #d9e1ea;
}

.hub-split-item-copy {
  display: grid;
  gap: 0.35rem;
  padding-right: 0.35rem;
}

.hub-split-item-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

/* Magazine layout */
.hub-magazine {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 1.1rem;
}

.hub-mag-lead {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.hub-mag-lead-media {
  display: block;
  background: #d9e1ea;
  overflow: hidden;
}

.hub-mag-lead-body {
  display: grid;
  gap: 0.5rem;
  padding: 1.15rem 1.25rem 1.3rem;
}

.hub-mag-side {
  display: grid;
  gap: 0.85rem;
}

.hub-mag-side-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 0.85rem;
  align-items: center;
  padding: 0.65rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.hub-mag-side-media {
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: #d9e1ea;
}

.hub-mag-side-copy {
  display: grid;
  gap: 0.3rem;
}

.hub-mag-side-title {
  font-family: var(--font-serif);
  font-size: 1.02rem;
  line-height: 1.3;
}

/* Rail layout */
.hub-rail {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.hub-rail-item + .hub-rail-item {
  border-top: 1px solid var(--line);
}

.hub-rail-link {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 120px;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.1rem;
  transition: background 0.15s ease;
}

.hub-rail-link:hover {
  background: var(--accent-soft);
  transform: none;
  box-shadow: none;
  border-color: transparent;
}

.hub-rail-index {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--accent);
  opacity: 0.55;
  letter-spacing: -0.03em;
}

.hub-rail-copy {
  display: grid;
  gap: 0.3rem;
}

.hub-rail-title {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.hub-rail-thumb {
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  overflow: hidden;
  background: #d9e1ea;
}

@media (max-width: 980px) {
  .home-hubs-intro-grid,
  .hub-split,
  .hub-magazine,
  .home-hub-head {
    grid-template-columns: 1fr;
  }

  .home-hub-index {
    display: none;
  }

  .hub-rail-link {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .hub-rail-thumb {
    display: none;
  }

  .hub-split-lead-media,
  .hub-mag-lead {
    min-height: 0;
  }

  .hub-mag-lead {
    grid-template-rows: auto 1fr;
  }
}

@media (max-width: 640px) {
  .hub-split-item,
  .hub-mag-side-item {
    grid-template-columns: 1fr;
  }

  .home-hubs-intro-band {
    padding: 1.4rem 1.25rem 1.5rem;
  }

  .hub-teaser-media {
    aspect-ratio: 16 / 10;
  }
}


/* ===== Blog hub page ===== */
.blog-hero {
  margin: 0 0 0.5rem;
  padding: 2.4rem 0 2.5rem;
  background:
    radial-gradient(900px 380px at 8% 0%, rgba(44, 90, 160, 0.10), transparent 55%),
    linear-gradient(180deg, #eef3f9 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}

.blog-hero-inner {
  max-width: var(--shell);
}

.blog-hero .page-breadcrumb {
  margin-bottom: 1rem;
}

.blog-hero-title {
  margin: 0;
}

.blog-hero-lead {
  max-width: 42rem;
  font-size: 1.05rem;
  line-height: 1.55;
}

.blog-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 140px));
  gap: 0.85rem;
  margin-top: 1.6rem;
}

.blog-hero-stat {
  display: grid;
  gap: 0.15rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.blog-hero-stat strong {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
}

.blog-hero-stat span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.blog-featured-card {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 12px 30px rgba(20, 24, 31, 0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.blog-featured-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: #b7c9e4;
  color: inherit;
}

.blog-featured-media {
  display: block;
  min-height: 260px;
  background: #d9e1ea;
  overflow: hidden;
}

.blog-featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-featured-body {
  display: grid;
  align-content: center;
  gap: 0.7rem;
  padding: 1.6rem 1.7rem;
}

.blog-featured-label {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.blog-featured-title {
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 2.8vw, 1.9rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.blog-featured-excerpt {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.blog-featured-meta {
  color: var(--muted);
  font-size: 0.82rem;
}

@media (max-width: 980px) {
  .blog-featured-card {
    grid-template-columns: 1fr;
  }

  .blog-featured-media {
    min-height: 200px;
    aspect-ratio: 16 / 10;
  }

  .blog-hero-stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .blog-hero-stats {
    grid-template-columns: 1fr;
  }
}


/* ===== Hub teaser redesign ===== */

.hub-split-stack {
  display: grid;
  gap: 1rem;
  align-content: start;
}

/* Story teaser — media-first (no tiny thumb + text row) */
.hub-teaser {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.hub-teaser:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: #b7c9e4;
  color: inherit;
}

.hub-teaser-media {
  display: block;
  aspect-ratio: 16 / 9;
  background: #d9e1ea;
  overflow: hidden;
}

.hub-teaser-media img,
.hub-teaser-media .spatti-cover,
.hub-teaser-media .spatti-cover-svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hub-teaser-media .spatti-cover {
  display: block;
  height: 100%;
}

.hub-teaser-body {
  display: grid;
  gap: 0.45rem;
  padding: 0.95rem 1.05rem 1.1rem;
}

.hub-teaser-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.hub-teaser-cat,
.hub-rail-cat {
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.hub-teaser-num {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  opacity: 0.4;
  letter-spacing: -0.02em;
}

.hub-teaser-title {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.hub-teaser-meta {
  color: var(--muted);
  font-size: 0.8rem;
}

/* Magazine side uses same teasers */
.hub-mag-side {
  display: grid;
  gap: 1rem;
  align-content: start;
}

/* Rail: editorial list without cramped thumbs */
.hub-rail {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.hub-rail-item + .hub-rail-item {
  border-top: 1px solid var(--line);
}

.hub-rail-link {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1.15rem 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}

.hub-rail-link:hover {
  background: var(--accent-soft);
  color: inherit;
}

.hub-rail-index {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--accent);
  opacity: 0.45;
  letter-spacing: -0.03em;
}

.hub-rail-copy {
  display: grid;
  gap: 0.28rem;
}

.hub-rail-title {
  font-family: var(--font-serif);
  font-size: 1.14rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.hub-rail-meta {
  color: var(--muted);
  font-size: 0.8rem;
}

.hub-rail-cta {
  color: var(--accent);
  font-size: 1.15rem;
  opacity: 0.7;
}

@media (max-width: 980px) {
  .hub-rail-link {
    grid-template-columns: 52px minmax(0, 1fr) auto;
  }
}


/* deprecate old cramped row cards */
.hub-split-item,
.hub-mag-side-item {
  display: none !important;
}
.hub-rail-thumb { display: none !important; }


/* hide hub numbering */
.home-hub-index,
.hub-teaser-num {
  display: none !important;
}
.home-hub-head > div {
  flex: 1 1 auto;
  min-width: min(100%, 16rem);
}

/* ===== Mobile / PageSpeed performance ===== */
@media (max-width: 980px) {
  .site-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(246, 247, 249, 0.97);
  }

  .home-hub,
  .software-band,
  .cta-band,
  .blog-hubs .home-hub {
    content-visibility: auto;
    contain-intrinsic-size: 800px;
  }

  .home-hubs-intro-band::before {
    display: none;
  }

  .hero-orb--4 {
    display: none;
  }

  .nav-toggle {
    min-width: 44px;
    min-height: 44px;
  }

  .spatti-cookie-actions .btn,
  .spatti-cookie-actions .btn-ghost {
    min-height: 44px;
  }
}

/* desktop content-visibility removed (CLS) */

img, svg {
  max-width: 100%;
  height: auto;
}

/* Evita FOIT residuo se un browser ignora font-display nel CSS font file */
body {
  font-synthesis: none;
}

/* ===== CSS covers (CWV-friendly) ===== */
.spatti-cover--css {
  position: relative;
  display: grid;
  align-content: space-between;
  width: 100%;
  height: 100%;
  min-height: 100%;
  aspect-ratio: 16 / 10;
  padding: 1rem 1.1rem 1.05rem;
  box-sizing: border-box;
  background:
    linear-gradient(145deg, var(--cover-soft, #eef3fb) 0%, #fff 55%),
    var(--cover-soft, #eef3fb);
  border-left: 6px solid var(--cover-a, #2c5aa0);
  overflow: hidden;
}

.spatti-cover--css::after {
  content: "";
  position: absolute;
  right: 1rem;
  top: 1rem;
  width: 2.4rem;
  height: 2.4rem;
  background: var(--cover-a, #2c5aa0);
  box-shadow: 0.55rem 0.55rem 0 var(--cover-b, #7b00e6);
  opacity: 0.9;
}

.spatti-cover--v1 {
  border-left-width: 0;
  background:
    linear-gradient(110deg, var(--cover-soft, #eef3fb) 0 48%, var(--cover-a, #2c5aa0) 48% 100%);
}

.spatti-cover--v1::after {
  display: none;
}

.spatti-cover--v2 {
  border-left-width: 0;
  background: var(--cover-a, #2c5aa0);
}

.spatti-cover--v2 .spatti-cover-initial,
.spatti-cover--v2 .spatti-cover-label {
  color: #fff;
}

.spatti-cover--v2::after {
  background: rgba(255, 255, 255, 0.22);
  box-shadow: none;
}

.spatti-cover-initial {
  position: relative;
  z-index: 1;
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 6vw, 4.2rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--cover-a, #2c5aa0);
}

.spatti-cover-label {
  position: relative;
  z-index: 1;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cover-a, #2c5aa0);
  opacity: 0.85;
  max-width: 85%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* superseded by full-bleed cover rules */

/* ===== Homepage — sezioni compatte ===== */
body.home .hero-band {
  margin-bottom: 0;
}

body.home .software-band,
body.home .yt-shorts-band,
body.home .yt-videos-band,
body.home .home-hubs,
body.home .cta-band {
  margin: 0;
}

body.home .section,
body.home .software-section {
  padding-top: 1.25rem;
  padding-bottom: 1.5rem;
}

body.home .yt-shorts-band {
  padding: 1.35rem 0 1.75rem;
  background: linear-gradient(180deg, #f2f5fa 0%, rgba(246, 247, 249, 0.4) 100%);
}

body.home .yt-videos-band {
  border-top: none;
}

body.home .yt-videos-shell {
  padding-top: 1.25rem;
  padding-bottom: 1.5rem;
}

body.home .home-hubs-intro {
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

body.home .home-hub-inner {
  padding-top: 1.35rem;
  padding-bottom: 1.5rem;
}

body.home .cta-band {
  padding-top: 1.75rem;
  padding-bottom: 1.75rem;
}

body.home .section-head,
body.home .software-section-head {
  margin-bottom: 1rem;
}

/* ===== CWV desktop: no content-visibility CLS ===== */
.home-hub + .home-hub,
.software-section,
#categorie,
#ultimi-articoli {
  content-visibility: visible;
  contain-intrinsic-size: auto;
}

.site-main {
  overflow-anchor: none;
}

.site-header {
  min-height: 74px;
}

@media (min-width: 981px) {
  .hero-band {
    min-height: 520px;
  }

  .hero-band-inner {
    min-height: 420px;
  }
}

.custom-logo {
  width: auto;
  height: auto;
  max-height: 22px;
  max-width: min(210px, 58vw);
  object-fit: contain;
  aspect-ratio: 490 / 50;
}

.software-card-logo {
  aspect-ratio: auto;
}


/* Cover full-bleed nei media box (allineamento con le altre card) */
.hub-mag-lead-media,
.hub-split-lead-media,
.hub-teaser-media,
.hero-spotlight-media,
.blog-featured-media,
.post-card-media {
  position: relative;
  overflow: hidden;
}

.hub-mag-lead-media .spatti-cover,
.hub-mag-lead-media .spatti-cover--css,
.hub-split-lead-media .spatti-cover,
.hub-split-lead-media .spatti-cover--css,
.hub-teaser-media .spatti-cover,
.hub-teaser-media .spatti-cover--css,
.hero-spotlight-media .spatti-cover,
.hero-spotlight-media .spatti-cover--css,
.blog-featured-media .spatti-cover,
.blog-featured-media .spatti-cover--css,
.post-card-media .spatti-cover,
.post-card-media .spatti-cover--css {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  aspect-ratio: unset !important;
  max-width: none !important;
}

.hub-mag-lead-media .spatti-cover-img,
.hub-split-lead-media .spatti-cover-img,
.hub-teaser-media .spatti-cover-img,
.blog-featured-media .spatti-cover-img,
.post-card-media .spatti-cover-img,
.hero-spotlight-media .spatti-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hub-mag-lead {
  align-items: stretch;
}

.hub-mag-lead-media {
  aspect-ratio: 16 / 10;
  min-height: 0;
  height: auto;
  background: #d9e1ea;
}

.hub-split-lead-media {
  aspect-ratio: 16 / 10;
  min-height: 0;
  background: #d9e1ea;
}

.hub-teaser-media {
  aspect-ratio: 16 / 9;
  background: #d9e1ea;
}

/* blog body justify */

.prose p,
.prose li,
.entry-content p,
.page-content p {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}
.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6,
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  text-align: left;
}
.prose pre,
.prose table,
.prose figure {
  text-align: left;
}

.hub-mag-lead-media .spatti-cover-svg,
.hub-split-lead-media .spatti-cover-svg,
.hub-teaser-media .spatti-cover-svg,
.hero-spotlight-media .spatti-cover-svg,
.blog-featured-media .spatti-cover-svg,
.post-card-media .spatti-cover-svg {
  width: 100%;
  height: 100%;
  display: block;
  max-width: none;
}

/* Lead split: media on top full width of lead card */
.hub-split-lead {
  grid-template-rows: auto 1fr;
}
.hub-split-lead-media {
  width: 100%;
}
.hub-mag-lead {
  grid-template-rows: auto 1fr;
}


/* ===== Mobile body margins / overflow ===== */
.layout-with-sidebar > *,
.entry-content,
.prose,
.content-col {
  min-width: 0;
}

.prose img,
.prose svg,
.prose figure,
.prose .wp-block-image,
.prose .wp-caption,
.entry-content img,
.entry-content figure {
  max-width: 100%;
  height: auto;
}

.prose .wp-block-embed:not(.wp-has-aspect-ratio) iframe,
.entry-content .wp-block-embed:not(.wp-has-aspect-ratio) iframe {
  max-width: 100%;
}

.prose .alignfull,
.prose .alignwide,
.entry-content .alignfull,
.entry-content .alignwide {
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}

@media (max-width: 980px) {
  :root {
    --shell: min(1120px, calc(100% - 2.5rem));
  }

  html, body {
    overflow-x: clip;
  }

  .shell {
    width: auto;
    max-width: none;
    margin-left: 1.25rem;
    margin-right: 1.25rem;
  }

  .single-hero,
  .single-thumb,
  .single-footer,
  .comments-wrap {
    box-sizing: border-box;
  }

  .entry-content.prose,
  .prose,
  .page-content {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .prose table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .prose pre {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  :root {
    --shell: min(1120px, calc(100% - 2rem));
  }

  .shell {
    margin-left: 1rem;
    margin-right: 1rem;
  }
}

/* Hub classic — griglia card uguali */
.hub-classic {
  margin-top: 0.25rem;
}

.home-hub--classic .hub-classic .post-card {
  height: 100%;
}

/* ===== Chatbot DeepSeek ===== */
.spatti-chat {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 1200;
  font-family: var(--font-sans, inherit);
}

.spatti-chat-panel {
  display: none;
  flex-direction: column;
  width: min(400px, calc(100vw - 2rem));
  height: min(560px, calc(100vh - 6rem));
  margin-bottom: 0.75rem;
  background: var(--surface, #fff);
  border: 1px solid var(--line, #e3e7ee);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(10, 24, 48, 0.22);
  overflow: hidden;
}

.spatti-chat.is-open .spatti-chat-panel {
  display: flex;
}

.spatti-chat-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  background: linear-gradient(135deg, #1E3F73, #2C5AA0);
  color: #fff;
}

.spatti-chat-kicker {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}

.spatti-chat-title {
  margin: 0.15rem 0 0;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.spatti-chat-close {
  border: 0;
  background: rgba(255,255,255,0.15);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}


.spatti-chat-privacy {
  flex: 1;
  overflow: auto;
  padding: 1rem 1.1rem 1.25rem;
  background: #f7f9fc;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.spatti-chat-privacy-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--ink);
}

.spatti-chat-privacy-text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--muted);
}

.spatti-chat-privacy-link {
  margin: 0;
  font-size: 0.88rem;
}

.spatti-chat-privacy-link a {
  color: var(--accent, #2C5AA0);
  font-weight: 600;
}

.spatti-chat-privacy-check {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.86rem;
  line-height: 1.45;
  cursor: pointer;
}

.spatti-chat-privacy-check input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.spatti-chat-privacy-accept {
  align-self: flex-start;
}

.spatti-chat.is-privacy-pending .spatti-chat-form,
.spatti-chat.is-privacy-pending .spatti-chat-messages {
  display: none !important;
}

.spatti-chat-messages {
  flex: 1;
  overflow: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background: #f7f9fc;
}

.spatti-chat-msg {
  display: flex;
}

.spatti-chat-msg--user {
  justify-content: flex-end;
}

.spatti-chat-bubble {
  max-width: 88%;
  padding: 0.65rem 0.85rem;
  border-radius: 14px;
  font-size: 0.92rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.spatti-chat-msg--assistant .spatti-chat-bubble {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
}

.spatti-chat-msg--user .spatti-chat-bubble {
  background: var(--accent, #2C5AA0);
  color: #fff;
}

.spatti-chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  padding: 0.75rem 0.85rem 0.35rem;
  border-top: 1px solid var(--line);
  background: #fff;
}

.spatti-chat-form textarea {
  resize: none;
  min-height: 44px;
  max-height: 120px;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  grid-column: 1 / -1;
}

.spatti-chat-send {
  justify-self: end;
}

.spatti-chat-note {
  margin: 0;
  padding: 0 0.85rem 0.75rem;
  font-size: 0.72rem;
  color: var(--muted);
  background: #fff;
}

.spatti-chat-fab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
  padding: 0.7rem 1rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #1E3F73, #2C5AA0);
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
  box-shadow: 0 12px 28px rgba(30, 63, 115, 0.35);
  cursor: pointer;
}

.spatti-chat-fab:hover {
  filter: brightness(1.05);
}

.spatti-chat.is-loading .spatti-chat-send {
  opacity: 0.6;
  pointer-events: none;
}

@media (max-width: 640px) {
  .spatti-chat {
    right: 0.75rem;
    bottom: 0.75rem;
  }
  .spatti-chat-fab-label {
    display: none;
  }
  .spatti-chat-panel {
    width: calc(100vw - 1.5rem);
  }
}

/* ===== Ultime uscite — prime 3 righe × 2, poi righe × 3 ===== */
.recent-posts-layout {
  display: grid;
  gap: 1.1rem;
}

@media (min-width: 641px) {
  .cards-grid--recent-compact {
    gap: 1rem;
  }

  .cards-grid--recent-lead,
  .cards-grid--recent-rest {
    grid-template-columns: repeat(2, 1fr);
  }

  .cards-grid--recent-compact .post-card {
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
  }

  .cards-grid--recent-compact .post-card:hover {
    transform: translateY(-2px);
  }

  .cards-grid--recent-compact .post-card-media {
    width: 100%;
    min-width: 0;
    max-width: none;
    aspect-ratio: 16 / 10;
    flex-shrink: 0;
  }

  .cards-grid--recent-compact .post-card-body {
    flex: 1;
    min-width: 0;
    padding: 0.85rem 0.95rem 1rem;
    gap: 0.45rem;
    align-content: start;
  }

  .cards-grid--recent-compact .post-card-title {
    font-size: 1.05rem;
    line-height: 1.32;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .cards-grid--recent-lead .post-card-title {
    font-size: 1.12rem;
  }

  .cards-grid--recent-compact .post-card-excerpt {
    display: none;
  }

  .cards-grid--recent-compact .meta-cats {
    margin-bottom: 0;
    padding: 0;
    gap: 0.3rem;
    flex-wrap: wrap;
  }

  .cards-grid--recent-compact .meta-cats a {
    font-size: 0.68rem;
    padding: 0.15rem 0.45rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .cards-grid--recent-compact .post-card-meta {
    font-size: 0.76rem;
    gap: 0.4rem;
    margin-top: auto;
    flex-wrap: wrap;
  }
}

@media (min-width: 768px) {
  .cards-grid--recent-lead {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.15rem;
  }

  .cards-grid--recent-rest {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.1rem;
  }

  .cards-grid--recent-lead .post-card-title {
    font-size: 1.18rem;
    -webkit-line-clamp: 2;
  }

  .cards-grid--recent-rest .post-card-title {
    font-size: 1.02rem;
  }
}

/* Mobile: card standard (estratto visibile, layout verticale) */
@media (max-width: 640px) {
  .cards-grid--recent-compact .post-card {
    flex-direction: column;
  }

  .cards-grid--recent-compact .post-card-media {
    width: 100%;
    min-width: 0;
    max-width: none;
    aspect-ratio: 16 / 10;
  }

  .cards-grid--recent-compact .post-card-body {
    padding: 1.1rem 1.15rem 1.25rem;
    gap: 0.55rem;
  }

  .cards-grid--recent-compact .post-card-title {
    font-size: 1.15rem;
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
  }

  .cards-grid--recent-compact .post-card-excerpt {
    display: block;
  }

  .cards-grid--recent-compact .post-card-meta {
    font-size: 0.82rem;
  }
}


/* ===== Homepage — Guide fondanti (tag pillar) ===== */
.home-pillar {
  margin: 0;
  background:
    radial-gradient(ellipse 70% 80% at 100% 0%, rgba(44, 90, 160, 0.1), transparent 55%),
    linear-gradient(180deg, #eef3f9 0%, #f6f7f9 100%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.home-pillar-inner {
  padding-top: 1.75rem;
  padding-bottom: 2rem;
}

.home-pillar-head {
  align-items: flex-end;
}

.home-pillar-hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  overflow: hidden;
  margin-bottom: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 14px 34px rgba(20, 24, 31, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.home-pillar-hero:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: #b7c9e4;
  color: inherit;
}

.home-pillar-hero-media {
  display: block;
  min-height: 280px;
  background: #d9e1ea;
  overflow: hidden;
}

.home-pillar-hero-media img,
.home-pillar-hero-media .spatti-cover,
.home-pillar-hero-media .spatti-cover-svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-pillar-hero-body {
  display: grid;
  align-content: center;
  gap: 0.75rem;
  padding: 1.7rem 1.8rem;
}

.home-pillar-badge {
  display: inline-flex;
  width: fit-content;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: rgba(44, 90, 160, 0.1);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-pillar-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.home-pillar-hero-excerpt {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.home-pillar-hero-meta {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.home-pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 980px) {
  .home-pillar-hero {
    grid-template-columns: 1fr;
  }

  .home-pillar-hero-media {
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  .home-pillar-grid {
    grid-template-columns: 1fr;
  }
}

body.home .home-pillar {
  margin: 0;
}

/* ===== Software landing page ===== */
.softpage-hero {
  margin: 0;
  padding: 2.4rem 0 2.2rem;
  background:
    radial-gradient(900px 380px at 12% 0%, rgba(99, 102, 241, 0.10), transparent 55%),
    radial-gradient(700px 320px at 92% 20%, rgba(44, 90, 160, 0.08), transparent 50%),
    linear-gradient(180deg, #e8eef7 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}

.softpage-hero-title { margin: 0; }

.softpage-hero-lead {
  max-width: 46rem;
  font-size: 1.06rem;
  line-height: 1.55;
}

.softpage-hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 1.35rem 0 0;
  padding: 0;
}

.softpage-hero-chips a {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.softpage-hero-chips a:hover {
  border-color: #b7c9e4;
  background: #fff;
}

.softpage-intro { padding-top: 2rem; padding-bottom: 1.5rem; }

.softpage-intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(220px, 0.7fr);
  gap: 1.5rem;
  align-items: start;
}

.softpage-intro p {
  color: var(--muted);
  line-height: 1.65;
  max-width: 48rem;
}

.softpage-aside {
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(20, 24, 31, 0.04);
}

.softpage-aside-title {
  margin: 0 0 0.65rem;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.softpage-aside ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.55;
}

.softpage-catalog { margin: 0; }

.softpage-product {
  padding: 2rem 0;
  border-top: 1px solid var(--line);
}

.softpage-product--alt {
  background: linear-gradient(180deg, rgba(236, 241, 248, 0.55) 0%, transparent 100%);
}

.softpage-product-inner {
  display: grid;
  grid-template-columns: minmax(200px, 0.85fr) minmax(0, 1.4fr);
  gap: 1.75rem;
  align-items: start;
}

.softpage-product-brand {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}

.softpage-product-logo {
  width: auto;
  max-width: 100%;
  height: 44px;
  margin: 0 auto;
  object-fit: contain;
}

.softpage-product-logo--smartdico { height: 52px; }
.softpage-product-logo--tekcad,
.softpage-product-logo--quillscape { height: 48px; }

.softpage-product-tag {
  margin: 0;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.35;
}

.softpage-product-url {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.92rem;
}

.softpage-product-url:hover { text-decoration: underline; text-underline-offset: 0.18em; }

.softpage-product-title {
  margin: 0 0 0.55rem;
  font-family: var(--font-serif);
  font-size: clamp(1.55rem, 2.4vw, 1.95rem);
  letter-spacing: -0.02em;
}

.softpage-product-summary {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--text);
  font-weight: 550;
}

.softpage-product-body {
  margin: 0 0 1rem;
  color: var(--muted);
  line-height: 1.65;
}

.softpage-product-bullets {
  margin: 0 0 1.25rem;
  padding-left: 1.15rem;
  color: var(--text);
  line-height: 1.55;
}

.softpage-product-cta { display: inline-flex; align-items: center; gap: 0.35rem; }

.softpage-faq { padding-top: 1.75rem; padding-bottom: 2.4rem; }

.softpage-faq-list {
  display: grid;
  gap: 0.85rem;
  max-width: 54rem;
}

.softpage-faq-item {
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(20, 24, 31, 0.035);
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.softpage-faq-item[open] {
  border-color: #b7c9e4;
  box-shadow: 0 12px 28px rgba(44, 90, 160, 0.08);
}

.softpage-faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
  margin: 0;
  padding: 1.05rem 1.2rem;
  font-family: var(--font-serif);
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.35;
  color: var(--text);
}

.softpage-faq-item summary::-webkit-details-marker { display: none; }

.softpage-faq-item summary::after {
  content: "+";
  flex: 0 0 auto;
  width: 1.7rem;
  height: 1.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.15rem;
  font-weight: 600;
  font-family: var(--font-sans, inherit);
  line-height: 1;
  transition: transform 0.18s ease, background 0.18s ease;
}

.softpage-faq-item[open] summary::after {
  content: "–";
  background: var(--accent);
  color: #fff;
}

.softpage-faq-body {
  padding: 0 1.2rem 1.15rem;
  border-top: 1px solid transparent;
}

.softpage-faq-item[open] .softpage-faq-body {
  border-top-color: var(--line);
  padding-top: 0.95rem;
}

.softpage-faq-body p {
  margin: 0 0 0.75rem;
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.98rem;
}

.softpage-faq-body p:last-child { margin-bottom: 0; }

.softpage-faq-body ul {
  margin: 0.15rem 0 0;
  padding-left: 1.15rem;
  color: var(--text);
  line-height: 1.7;
}

.softpage-faq-body a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.softpage-faq-body a:hover {
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.softpage-faq-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  margin-top: 0.35rem !important;
}

.softpage-faq-links a {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #b7c9e4;
  background: rgba(44, 90, 160, 0.06);
}

.softpage-cta { margin-top: 0; }

@media (max-width: 980px) {
  .softpage-intro-grid,
  .softpage-product-inner {
    grid-template-columns: 1fr;
  }

  .softpage-faq-item summary {
    font-size: 1rem;
    padding: 0.95rem 1rem;
  }

  .softpage-faq-body {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}
