/* mobius/appunti: identità scura deliberata (antracite + verde terminale).
   Layout: header fisso in alto, sezioni a larghezza piena con contenuto max 1200px,
   griglie flex che vanno a capo; tutto lo stile è qui (la CSP vieta gli stili inline). */

@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-display: swap; src: url("/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 600; font-display: swap; src: url("/fonts/jetbrains-mono-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 800; font-display: swap; src: url("/fonts/jetbrains-mono-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  --ground: #15181b;
  --raised: #1d2125;
  --deep: #0f1113;
  --line: #2c3237;
  --line-strong: #4a535a;
  --ink: #e8ece9;
  --ink-soft: #b9c1bc;
  --ink-muted: #a3aca6;
  --accent: #3ef08a;
  --on-accent: #0b130e;
  --warn: #f5c542;
  --grid: rgba(255, 255, 255, 0.045);

  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --f-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --gutter: clamp(16px, 4vw, 24px);
  --radius: 8px;
  --card-line: #343b41;
  --accent-hover: #63f5a1;
  --t: 0.14s ease;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scrollbar-color: var(--line-strong) var(--deep);
  scroll-padding-top: 88px;
}
body {
  margin: 0;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
main { flex: 1 0 auto; }
::selection { background: var(--accent); color: var(--on-accent); }
img { max-width: 100%; height: auto; }
a { color: var(--ink); text-underline-offset: 3px; transition: color var(--t); }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--f-mono); line-height: 1.1; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: 1200px; margin: 0 auto; padding-inline: var(--gutter); }
.grid-bg {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Cpath d='M0 0h18v1H0zM0 1h1v17H0z' fill='%23fff' fill-opacity='.045'/%3E%3C/svg%3E");
  background-size: 18px 18px;
}
.eyebrow { font-family: var(--f-mono); font-size: 14px; color: var(--accent); }
.eyebrow::before { content: "> "; }
.muted { color: var(--ink-muted); }
.soft { color: var(--ink-soft); }

/* ---------- pulsanti ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 20px;
  border-radius: 6px; border: 1px solid var(--line-strong);
  background: transparent; color: var(--ink);
  font: 500 15px/1.2 var(--f-sans); text-decoration: none; text-align: center;
  cursor: pointer; user-select: none;
  transition: background-color var(--t), border-color var(--t), color var(--t), transform var(--t);
}
.btn:hover { border-color: var(--ink-soft); color: #fff; background: rgba(255, 255, 255, 0.04); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn--primary:hover { color: var(--on-accent); background: var(--accent-hover); border-color: var(--accent-hover); }
.btn--small { min-height: 44px; padding: 8px 14px; font-size: 14px; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; transform: none; background: transparent; border-color: var(--line-strong); color: var(--ink); }

/* ---------- header ---------- */
.topbar { border-bottom: 1px solid var(--line); background: var(--ground); position: sticky; top: 0; z-index: 10; }
.topbar .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-block: 14px; }
.logo { font-family: var(--f-mono); font-weight: 800; font-size: 18px; text-decoration: none; }
.logo span { color: var(--accent); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; font-size: 15px; }
.nav a:not(.btn) { color: var(--ink-soft); text-decoration: none; padding-block: 10px; text-underline-offset: 6px; }
.nav a:not(.btn):hover { color: #fff; }
.nav a[aria-current="page"]:not(.btn) { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 30; padding: 10px 14px; background: var(--accent); color: var(--on-accent); border-radius: 6px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
main:focus { outline: none; }
.cart-link { position: relative; }
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px;
  background: var(--accent); color: var(--on-accent); font: 600 12px/1 var(--f-mono);
}
.preview-bar { background: var(--warn); color: #1a1405; font: 600 13px/1.4 var(--f-mono); text-align: center; padding: 6px 16px; }

/* ---------- hero ---------- */
.hero { border-bottom: 1px solid var(--line); }
.hero .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding-block: clamp(56px, 9vw, 96px); }
.hero__text { flex: 1 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.hero h1 { font-weight: 800; font-size: clamp(36px, 5vw, 52px); line-height: 1.06; letter-spacing: -0.02em; }
.lede { font-size: 19px; color: var(--ink-soft); max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.stats { display: flex; flex-wrap: wrap; gap: 12px 32px; padding-top: 6px; font-family: var(--f-mono); font-size: 13px; color: var(--ink-muted); }
.stats span { display: flex; flex-direction: column; gap: 4px; }
.stats strong { color: var(--ink); font-size: 24px; line-height: 1; font-variant-numeric: tabular-nums; }
.covers { flex: 0 1 466px; min-width: 0; display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* copertina disegnata in CSS (stessa griglia delle immagini prodotto) */
.cover {
  width: 146px; aspect-ratio: 4 / 5; padding: 14px;
  background-color: var(--raised); border: 1px solid var(--card-line); border-radius: 6px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 8px;
  font-family: var(--f-mono);
}
.cover--accent { border-color: var(--accent); }
.cover--down { margin-top: 40px; }
.cover__brand { font-size: 10px; color: var(--ink-muted); }
.cover__slash, .cover__tag { color: var(--accent); }
.cover__title { font-weight: 800; font-size: 18px; line-height: 1.12; }
.cover__tag { font-size: 10px; letter-spacing: 0.04em; }
.cover--big { width: 100%; aspect-ratio: 1 / 1; padding: clamp(24px, 5vw, 40px); border-radius: var(--radius); }
.cover--big .cover__brand { font-size: 15px; display: flex; justify-content: space-between; gap: 12px; }
.cover--big .cover__title { font-size: clamp(32px, 5vw, 52px); letter-spacing: -0.02em; }
.cover--big .cover__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 15px; color: var(--ink-soft); }
.cover--big .cover__tag { font-size: 14px; font-weight: 600; }

/* ---------- ticker ---------- */
.ticker { background: var(--raised); border-bottom: 1px solid var(--line); overflow: hidden; content-visibility: auto; contain-intrinsic-size: auto 49px; }
.ticker__track { display: flex; width: max-content; gap: 48px; padding: 14px 0; font-family: var(--f-mono); font-size: 14px; color: var(--ink-soft); white-space: nowrap; animation: scorri 60s linear infinite; will-change: transform; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__track strong { color: var(--accent); font-weight: 400; }
@keyframes scorri { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker__track { animation: none; padding-inline: var(--gutter); } }

/* ---------- sezioni ---------- */
.section { padding-block: clamp(56px, 8vw, 96px); }
.section--band { background: var(--raised); border-block: 1px solid var(--line); }
.section .wrap { display: flex; flex-direction: column; gap: 32px; }
.section-head { display: flex; flex-direction: column; gap: 8px; max-width: 46em; }
.section-head h2 { font-weight: 800; font-size: clamp(28px, 4vw, 36px); letter-spacing: -0.01em; }
.section-head p { color: var(--ink-soft); }
.row-between { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; }

.cards { display: flex; flex-wrap: wrap; gap: 20px; }
.card {
  flex: 1 1 300px; min-width: 0; padding: 26px;
  background: var(--raised); border: 1px solid var(--card-line); border-radius: var(--radius);
  display: flex; flex-direction: column; gap: 14px;
}
.card--featured { border: 2px solid var(--accent); }
.card h3 { font-size: 22px; }
.card p { color: var(--ink-soft); }
.card__foot { margin-top: auto; display: flex; flex-direction: column; gap: 14px; }
.tag { align-self: flex-start; font: 600 12px/1 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; padding: 6px 10px; border-radius: 99px; color: var(--ink-muted); border: 1px solid var(--line-strong); }
.tag--accent { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.price__now { font-family: var(--f-mono); font-weight: 800; font-size: 38px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.card--featured .price__now { color: var(--accent); }
.price__old { color: var(--ink-muted); text-decoration: line-through; font-size: 15px; }
.price__cut { font-family: var(--f-mono); font-size: 14px; }
.note-line { color: var(--ink-muted); font-size: 15px; }
.code { font-family: var(--f-mono); color: var(--ink); background: var(--deep); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; }

.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 16px; }
.course-card {
  position: relative; min-width: 0; padding: 22px;
  background: var(--raised); border: 1px solid var(--card-line); border-radius: var(--radius);
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color var(--t), transform var(--t);
}
@media (hover: hover) { .course-card:hover { border-color: var(--line-strong); transform: translateY(-2px); } }
.course-card:focus-within { border-color: var(--accent); }
.course-card__link { color: var(--ink); text-decoration: none; }
.course-card__link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.course-card__link:focus-visible { outline: none; }
.course-card__desc { color: var(--ink-soft); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.course-card__prices { margin-top: auto !important; }
.course-card__foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.course-card__more { font: 13px/1 var(--f-mono); color: var(--ink-muted); }
.course-card__more { transition: color var(--t); }
.course-card:hover .course-card__more, .course-card:focus-within .course-card__more { color: var(--accent); }
.course-card--soon .course-card__prices dd.accent { color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .course-card, .course-card:hover { transition: none; transform: none; } }
.course-card__meta { display: flex; justify-content: space-between; gap: 8px; font: 12px/1.4 var(--f-mono); color: var(--ink-muted); }
.course-card h3 { font-size: 20px; line-height: 1.2; }
.course-card dl { margin: auto 0 0; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.course-card dl div { display: flex; justify-content: space-between; gap: 8px; }
.course-card dt { color: var(--ink-soft); }
.course-card dd { margin: 0; font-family: var(--f-mono); }
.course-card dd.accent { color: var(--accent); font-weight: 600; }

.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 24px; }
.steps li { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.steps__n { font: 800 32px/1 var(--f-mono); color: var(--accent); }
.steps h3 { font-family: var(--f-sans); font-size: 19px; font-weight: 600; }
.steps p { color: var(--ink-soft); }

.previews { display: flex; flex-wrap: wrap; gap: 20px; }
.previews figure { margin: 0; flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.placeholder {
  aspect-ratio: 3 / 4; border: 1px dashed var(--line-strong); border-radius: 6px; background: var(--raised);
  display: flex; align-items: center; justify-content: center; padding: 20px; text-align: center;
  font: 13px/1.4 var(--f-mono); color: var(--ink-muted);
}
.placeholder--small { font-size: 11px; padding: 8px; }
figcaption { font-size: 14px; color: var(--ink-muted); }

.panel {
  background-color: var(--raised); border: 1px solid var(--card-line); border-radius: var(--radius);
  padding: clamp(24px, 5vw, 48px); display: flex; flex-wrap: wrap; gap: 40px; align-items: center;
}
.panel__text { flex: 999 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.panel__text .btn { align-self: flex-start; }
.pricelist { flex: 1 1 280px; min-width: 0; margin: 0; border: 1px solid var(--card-line); border-radius: 6px; background: var(--ground); }
.pricelist div { display: flex; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.pricelist div:last-child { border-bottom: 0; }
.pricelist dd { margin: 0; font-family: var(--f-mono); }
.pricelist dd.accent { color: var(--accent); }

.faq { display: flex; flex-wrap: wrap; gap: 28px 48px; }
.faq div { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.faq h3 { font-family: var(--f-sans); font-size: 17px; font-weight: 600; line-height: 1.35; }
.faq p { color: var(--ink-soft); }

.about { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; }
.about__mark { width: 96px; height: 96px; flex: none; border: 1px solid var(--accent); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font: 800 30px/1 var(--f-mono); color: var(--accent); }
.about__text { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.about__text p:last-child { font-size: 19px; max-width: 36em; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 28px 48px; padding-block: 40px 56px; font-size: 14px; color: var(--ink-muted); }
.footer__brand { flex: 2 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.footer__brand p { max-width: 30em; }
.footer__col { flex: 1 1 140px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.footer__col a { color: var(--ink-soft); text-decoration: none; padding-block: 4px; }
.footer__col a:hover { color: #fff; text-decoration: underline; }
.footer__title { font: 600 12px/1.4 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); }
.footer__note { flex-basis: 100%; padding-top: 20px; border-top: 1px solid var(--line); }

/* ---------- pagina corso ---------- */
.crumb { padding-block: 24px 0; font-size: 15px; }
.crumb a { color: var(--ink-soft); text-decoration: none; }
.product { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; padding-block: 32px 64px; }
.product__media { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.product__thumbs { display: flex; gap: 12px; }
.product__thumbs .placeholder { flex: 1 1 0; min-width: 0; }
.product__info { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.product__info h1 { font-weight: 800; font-size: clamp(30px, 4vw, 40px); letter-spacing: -0.01em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; font: 13px/1 var(--f-mono); }
.chips span { border: 1px solid var(--card-line); border-radius: 99px; padding: 7px 12px; color: var(--ink-soft); }
.product .price__now { color: var(--accent); font-size: 44px; }
.upsell {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px;
  padding: 18px 20px; border: 1px solid var(--accent); border-radius: var(--radius);
  background-color: var(--raised); text-decoration: none;
}
.upsell:hover { background-color: color-mix(in srgb, var(--accent) 6%, var(--raised)); }
.upsell__price { font-family: var(--f-mono); color: var(--accent); }
.section--stack { display: flex; flex-direction: column; gap: 24px; padding-block: clamp(32px, 5vw, 56px); }
.product + .section--stack { padding-top: 8px; }
.module-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--card-line); border-radius: var(--radius); overflow: hidden; }
.module-list > li { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--raised); }
.module-list > li:last-child { border-bottom: 0; }
.module-list__n { font: 800 16px/1 var(--f-mono); color: var(--accent); width: 32px; }
.module-list__t { flex: 1 1 240px; min-width: 0; }
.module-list__p { font-family: var(--f-mono); color: var(--ink-soft); }

/* ---------- carrello ---------- */
.cart { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; padding-block: 32px 80px; }
.cart__items { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.cart__summary { flex: 1 1 300px; min-width: 0; position: sticky; top: 88px; display: flex; flex-direction: column; gap: 16px; padding: 24px; background: var(--raised); border: 1px solid var(--card-line); border-radius: var(--radius); }
.cart-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--card-line); border-radius: var(--radius); overflow: hidden; }
.cart-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 16px 18px; border-bottom: 1px solid var(--line); background: var(--raised); }
.cart-list li:last-child { border-bottom: 0; }
.cart-list__name { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cart-list__name span { font-size: 14px; color: var(--ink-muted); }
.cart-list__price { font-family: var(--f-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cart-list__missing { flex-basis: 100%; font-size: 13px; color: var(--warn); }
.link-btn { background: none; border: 0; color: var(--ink-soft); font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; min-height: 44px; padding: 0 4px; }
.link-btn:hover { color: #fff; }
.notice { padding: 14px 16px; border-radius: 6px; border: 1px solid var(--line-strong); font-size: 15px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.notice--risparmio { border-color: var(--accent); }
.notice--warn { border-color: var(--warn); }
.notice p { flex: 1 1 240px; min-width: 0; }
.totals { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.totals div { display: flex; justify-content: space-between; gap: 12px; }
.totals dd { margin: 0; font-family: var(--f-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.totals .totals__grand { padding-top: 10px; border-top: 1px solid var(--line); font-size: 19px; font-weight: 600; }
.totals .totals__grand dd { color: var(--accent); font-weight: 800; }
.coupon { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-soft); }
.small { font-size: 13px; color: var(--ink-muted); }
.empty { padding: 32px; border: 1px dashed var(--line-strong); border-radius: var(--radius); display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }

.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  z-index: 20; max-width: calc(100% - 32px);
  display: flex; align-items: center; gap: 14px; padding: 12px 16px;
  background: var(--deep); border: 1px solid var(--accent); border-radius: 6px; font-size: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  animation: entra 0.18s ease-out;
}
@keyframes entra { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } .btn:active { transform: none; } }
.toast a { color: var(--accent); }

/* ---------- pagine di testo ---------- */
.prose { max-width: 68ch; padding-block: 48px 80px; display: flex; flex-direction: column; gap: 16px; }
.prose h1 { font-size: clamp(30px, 4vw, 40px); font-weight: 800; }
.prose h2 { font-size: 21px; margin-top: 16px; }
.prose ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.prose p, .prose li { color: var(--ink-soft); }
.prose .todo { border: 1px dashed var(--warn); color: var(--warn); padding: 10px 12px; border-radius: 6px; font-family: var(--f-mono); font-size: 13px; }

@media (max-width: 520px) {
  .cover--down { margin-top: 0; }
  .covers .cover { width: calc(50% - 7px); aspect-ratio: 5 / 4; }
  .covers .cover:nth-child(3) { display: none; }
  .cart__summary { position: static; }
  .cover--big { aspect-ratio: 16 / 10; }
  .cart-list__name { flex-basis: 60%; }
  .cart-list .link-btn { margin-left: auto; min-height: 36px; }
}

/* ---------- intestazioni di pagina e percorso ---------- */
.crumbs { padding-block: 22px 0; font-size: 14px; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 0; }
.crumbs li { display: flex; align-items: center; color: var(--ink-muted); }
.crumbs a { padding-block: 4px; }
.crumbs li + li::before { content: "/"; margin-inline: 10px; color: var(--line-strong); }
.crumbs a { color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.page-head { display: flex; flex-direction: column; gap: 12px; padding-block: 28px 8px; max-width: 52em; }
.page-head h1 { font-weight: 800; font-size: clamp(32px, 5vw, 48px); letter-spacing: -0.02em; }
.page-head .lede { font-size: 18px; }
.lede a { color: var(--accent); }
.lede--small { font-size: 17px; }
.section--tight { padding-block: 24px 64px; }
.accent { color: var(--accent); }

/* ---------- home: scelta dell'anno ---------- */
.years { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; }
.year {
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 1fr auto; align-items: start; gap: 18px 24px; padding: 24px;
  background-color: var(--raised); border: 1px solid var(--card-line); border-radius: var(--radius);
  text-decoration: none; color: var(--ink);
  transition: border-color var(--t);
}
.year:hover { border-color: var(--accent); color: var(--ink); }
.year__n { font: 800 56px/1 var(--f-mono); color: var(--accent); }
.year__body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.year__title { font: 800 24px/1.1 var(--f-mono); }
.year__meta { font: 13px/1.4 var(--f-mono); color: var(--ink-muted); }
.year__list { color: var(--ink-soft); font-size: 15px; }
.year__price { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 24px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-soft); }
.year__price strong { font-family: var(--f-mono); color: var(--ink); font-size: 17px; font-variant-numeric: tabular-nums; }
.year__go { font: 13px/1 var(--f-mono); color: var(--ink-muted); transition: color var(--t); }
.year:hover .year__go { color: var(--accent); }
.year__price strong.accent { color: var(--accent); }
.upsell, .pill-link, .chips--links a, .faq-nav a, .accordion summary, .footer__col a, .link-btn { transition: border-color var(--t), color var(--t), background-color var(--t); }

/* ---------- catalogo ---------- */
.jump { display: flex; flex-wrap: wrap; gap: 12px; padding-block: 20px 4px; }
.jump__item {
  flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 14px 16px;
  border: 1px solid var(--card-line); border-radius: var(--radius); background: var(--raised); text-decoration: none;
}
.jump__item strong { font-family: var(--f-mono); }
.jump__item span { font-size: 13px; color: var(--ink-muted); }
.jump__item { transition: border-color var(--t); }
.jump__item:hover { border-color: var(--line-strong); }
.jump__item--accent { border-color: var(--accent); }
.jump__item--accent strong { color: var(--accent); }

.filters {
  position: sticky; top: 72px; z-index: 5; margin-top: 20px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 12px;
  background: var(--ground); border: 1px solid var(--line); border-radius: var(--radius);
}
/* Senza JavaScript i filtri non funzionano: si nascondono. */
@media (scripting: none) { .filters { display: none; } }
.search { flex: 1 1 260px; min-width: 0; }
.search input {
  width: 100%; min-height: 44px; padding: 10px 14px; border-radius: 6px;
  border: 1px solid var(--line-strong); background: var(--deep); color: var(--ink); font: 15px var(--f-sans);
}
.search input::placeholder { color: var(--ink-muted); }
.search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.segmented { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; }
.segmented button {
  min-height: 44px; padding: 8px 14px; border: 0; background: transparent; color: var(--ink-soft);
  font: 500 14px var(--f-sans); cursor: pointer; transition: background-color var(--t), color var(--t);
}
.segmented button:hover { color: #fff; }
.segmented button[aria-pressed="true"]:hover { color: var(--on-accent); }
.segmented button + button { border-left: 1px solid var(--line-strong); }
.segmented button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; color: var(--ink-soft); cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--accent); }
.filters__count { margin-left: auto; font: 13px var(--f-mono); color: var(--ink-muted); }

.year-block { padding-top: 48px; scroll-margin-top: 140px; display: flex; flex-direction: column; gap: 28px; }
.year-block__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 24px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.year-block__head h2 { font-weight: 800; font-size: clamp(26px, 4vw, 34px); }
.period { display: flex; flex-direction: column; gap: 14px; }
.period__title { font: 600 15px/1.2 var(--f-mono); color: var(--ink-soft); display: flex; gap: 12px; align-items: baseline; }
.period__title span { font-weight: 400; font-size: 13px; color: var(--ink-muted); }
.pill-link { padding: 10px 16px; border: 1px solid var(--accent); border-radius: 99px; text-decoration: none; font-size: 14px; color: var(--ink-soft); }
.pill-link strong { color: var(--accent); font-family: var(--f-mono); }
.pill-link:hover { color: #fff; background-color: color-mix(in srgb, var(--accent) 8%, transparent); }
.note-box { padding: 20px 22px; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--ink-soft); display: flex; flex-direction: column; gap: 8px; }
.note-box a { color: var(--accent); }
.note-box__title { font-size: 19px; font-family: var(--f-mono); color: var(--ink); }

/* ---------- stato dei prodotti ---------- */
.status { display: inline-flex; align-items: center; gap: 6px; font: 600 12px/1 var(--f-mono); color: var(--ink-muted); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--ink-muted); }
.status--on { color: var(--accent); }
.status--on::before { background: var(--accent); border-color: var(--accent); }

/* ---------- schede pacchetto ---------- */
.card__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.card__top .tag { align-self: auto; }
.card__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.card__list li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.card__list a { color: var(--ink-soft); text-decoration: none; }
.card__list a:hover { color: #fff; text-decoration: underline; }
.card__list span { font-family: var(--f-mono); color: var(--ink-muted); }
.card-anchor { flex: 1 1 320px; min-width: 0; display: flex; scroll-margin-top: 96px; }
.card-anchor > .card { flex: 1 1 auto; }
.card-anchor:target > .card { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }

/* ---------- pagina corso ---------- */
.product__status { margin-top: -8px; }
.product__thumbs a { flex: 1 1 0; min-width: 0; display: block; border-radius: 6px; }
.product__thumbs a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.product__thumbs img { display: block; width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--line); background: #f4f2ec; transition: border-color var(--t); }
.product__thumbs a:hover img { border-color: var(--accent); }
.buy-box { display: flex; flex-direction: column; gap: 14px; padding: 20px; border: 1px solid var(--card-line); border-radius: var(--radius); background: var(--raised); }
.notice--soon { border-color: var(--line-strong); color: var(--ink-soft); }
.notice--soon a { color: var(--accent); }
.includes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; color: var(--ink-soft); font-size: 15px; }
.includes li { position: relative; padding-left: 24px; }
.includes li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-family: var(--f-mono); }
.includes strong { color: var(--ink); font-weight: 600; }
.module-list__t { display: flex; flex-direction: column; gap: 4px; }
.module-list__a { font-size: 13px; color: var(--ink-muted); }

/* pagine di esempio disegnate in CSS */
.page-mock {
  aspect-ratio: 210 / 297; width: 100%; padding: 9% 9% 7%;
  background: #f4f2ec; color: #1d2125; border-radius: 4px; box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  display: flex; flex-direction: column; gap: 3.2%; overflow: hidden;
  font-family: var(--f-sans); font-size: clamp(9px, 1.05vw, 12px);
}
.page-mock__head { display: flex; justify-content: space-between; gap: 8px; padding-bottom: 3%; border-bottom: 1px solid #cfccc3; font: 0.85em/1.2 var(--f-mono); color: #6a6f73; }
.page-mock__h { font: 800 1.45em/1.15 var(--f-mono); margin-top: 2%; }
.page-mock__line { display: block; height: 0.55em; border-radius: 2px; background: #d9d6cd; }
.page-mock__line--short { width: 55%; }
.page-mock__line--mid { width: 78%; }
.page-mock__box { padding: 5% 6%; border-left: 3px solid #1f9d57; background: #e6efe8; font: 600 0.95em/1.4 var(--f-mono); color: #12301f; }
.page-mock__figure { flex: 1 1 auto; min-height: 18%; border: 1px dashed #b8b4aa; border-radius: 3px; background: repeating-linear-gradient(135deg, transparent 0 8px, rgba(0, 0, 0, 0.035) 8px 16px); }
.page-mock__foot { margin-top: auto; font: 0.75em/1 var(--f-mono); color: #62635e; text-align: center; }
.page-mock--v3 .page-mock__box { border-left-color: #1d6fd0; background: #e5ecf6; color: #102844; }
.previews figure .page-mock { max-width: 340px; }
.previews__page { display: block; max-width: 340px; border-radius: 4px; }
.previews__page img { display: block; width: 100%; height: auto; border-radius: 4px; background: #f4f2ec; box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35); }
.previews figcaption a { color: var(--ink-soft); }
.previews figcaption a:hover { color: #fff; }
.card__names { font-size: 14px; color: var(--ink-muted); }
/* Su telefono le pagine di esempio scorrono di lato invece di impilarsi. */
@media (max-width: 720px) {
  .previews {
    flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    margin-inline: calc(-1 * var(--gutter)); padding: 4px var(--gutter) 28px; scroll-padding-inline: var(--gutter); scrollbar-width: none;
  }
  .previews::-webkit-scrollbar { display: none; }
  .previews figure, .previews--compact figure { flex: 0 0 min(72%, 280px); scroll-snap-align: start; }
}
.previews--compact figure { flex: 0 1 260px; }

/* ---------- confronto pacchetti ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--card-line); border-radius: var(--radius); }
.compare { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 620px; }
.compare th, .compare td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.compare thead th { font: 600 12px/1.3 var(--f-mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-muted); background: var(--raised); }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
.compare tbody th { font-weight: 600; }
.compare tbody th a { color: var(--ink); text-decoration: none; }
.compare tbody th a:hover { text-decoration: underline; }
.compare td.num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }

/* ---------- lezioni ---------- */
.subjects { display: flex; flex-wrap: wrap; gap: 24px 48px; }
.subjects__group { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.subjects__group h3 { font-size: 17px; }
.chips--links { list-style: none; margin: 0; padding: 0; }
.chips--links a { display: inline-block; border: 1px solid var(--card-line); border-radius: 99px; padding: 8px 12px; color: var(--ink-soft); text-decoration: none; }
.chips--links a:hover { border-color: var(--accent); color: #fff; }

/* ---------- domande a fisarmonica ---------- */
.accordion { display: flex; flex-direction: column; border: 1px solid var(--card-line); border-radius: var(--radius); overflow: hidden; }
.accordion details { border-bottom: 1px solid var(--line); background: var(--raised); }
.accordion details:last-child { border-bottom: 0; }
.accordion summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 52px; padding: 14px 18px; font-weight: 600;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; font: 400 22px/1 var(--f-mono); color: var(--accent); flex: none; }
.accordion details[open] summary::after { content: "−"; }
.accordion summary:hover { background: color-mix(in srgb, var(--raised) 80%, #fff 3%); }
.accordion details p { padding: 0 18px 18px; color: var(--ink-soft); max-width: 68ch; }
.accordion details a { color: var(--accent); }
.faq-layout { display: flex; flex-wrap: wrap; gap: 32px 48px; align-items: flex-start; padding-block: 24px 80px; }
.faq-nav { flex: 1 1 180px; position: sticky; top: 88px; display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.faq-nav a { padding: 8px 12px; border-left: 2px solid var(--line); color: var(--ink-soft); text-decoration: none; }
.faq-nav a:hover { border-left-color: var(--accent); color: #fff; }
.faq-groups { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 40px; }
.faq-group { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 96px; }
.faq-group h2 { font-size: 22px; }

/* ---------- carrello ---------- */
.page-head--cart { padding-bottom: 0; }
.progress { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; color: var(--ink-muted); }
.progress li { display: flex; align-items: center; gap: 8px; }
.progress li span { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-strong); display: inline-flex; align-items: center; justify-content: center; font: 600 12px/1 var(--f-mono); }
.progress li[aria-current="step"] { color: var(--ink); }
.progress li[aria-current="step"] span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.empty .actions { margin-top: 4px; }
.contact-line { font-size: 18px; }

/* ---------- barra d'acquisto su telefono ---------- */
.buybar { display: none; }
@media (max-width: 720px) {
  .buybar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    background: var(--deep); border-top: 1px solid var(--line-strong);
  }
  .buybar__text { min-width: 0; display: flex; flex-direction: column; font-size: 14px; }
  .buybar__text strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .buybar__text span { font-family: var(--f-mono); color: var(--accent); }
  body:has(.buybar) .footer { padding-bottom: 72px; }
  body:has(.buybar) .toast { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  .filters { top: 0; position: static; gap: 8px 16px; }
  .segmented { display: flex; flex-basis: 100%; }
  .segmented button { flex: 1 1 0; }
  .jump { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .jump__item { padding: 12px; }
  .jump__item strong { font-size: 14px; }
  .jump__item span { font-size: 12px; line-height: 1.35; }
  /* Intestazione: il logo scorre via, resta fissa la riga con menu e carrello. */
  html { scroll-padding-top: 64px; }
  .topbar { top: -44px; }
  .topbar .wrap { gap: 0; padding-block: 0; }
  .logo { flex-basis: 100%; display: flex; align-items: flex-end; height: 44px; padding-bottom: 6px; }
  .nav { flex: 1 1 100%; justify-content: space-between; gap: 0 12px; min-height: 54px; }
  .nav .btn--small { min-height: 40px; padding: 6px 12px; }
  .faq-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .faq-nav a { border-left: 0; border: 1px solid var(--line); border-radius: 99px; }
  .year__n { font-size: 44px; }
}

/* Tabella del risparmio su telefono: restano pacchetto, prezzo e risparmio, senza scorrere di lato. */
@media (max-width: 640px) {
  .compare { min-width: 0; font-size: 14px; }
  .compare th, .compare td { padding: 10px 8px; }
  .compare tr > :nth-child(2), .compare tr > :nth-child(3), .compare tr > :nth-child(4) { display: none; }
  .compare tbody th, .compare td:last-child { white-space: normal; }
}

/* --- promozioni ---------------------------------------------------------- */
.promo-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; background: var(--accent); color: var(--on-accent); font: 600 13px/1.4 var(--f-mono); text-align: center; padding: 7px var(--gutter); }
.promo-bar .code { color: var(--on-accent); background: transparent; border-color: var(--on-accent); }
.promo-line { margin: 0; font-size: 15px; color: var(--ink-soft); }
.promo-line strong { color: var(--accent); font-family: var(--f-mono); }
/* Etichette delle promozioni: ogni tipo (catalog.yaml, promozioni, tipo) ha un colore e un segno suoi,
   uguali nella barra in alto, nelle schede e nelle pagine dei corsi. */
.tag--promo, .promo-bar { --tag: var(--accent); }
.tag--natale, .promo-bar--natale { --tag: #ff6b6b; }
.tag--primo-acquisto, .promo-bar--primo-acquisto { --tag: #5ecbff; }
.tag--sessione, .promo-bar--sessione { --tag: var(--warn); }
.tag--black-friday, .promo-bar--black-friday { --tag: #f2f2f2; }
.tag--lampo, .promo-bar--lampo { --tag: #ff9f43; }
.tag--esame, .promo-bar--esame { --tag: #b9a2ff; }
.tag--promo { display: inline-flex; align-items: center; gap: 6px; align-self: auto; vertical-align: middle; white-space: nowrap; background: var(--tag); border-color: var(--tag); color: var(--on-accent); }
.tag--promo::before { content: "%"; font-weight: 800; }
.tag--natale::before { content: "*"; }
.tag--primo-acquisto::before { content: ">"; }
.tag--sessione::before { content: "!"; }
.tag--black-friday::before { content: "#"; }
.tag--lampo::before { content: "~"; }
.tag--esame::before { content: "/"; }
.tag--semestre { background: transparent; color: var(--accent); }
.tag--semestre::before { content: "+"; }
.promo-bar[class*="promo-bar--"] { background: var(--tag); }
.promo-bar__tipo { align-self: center; font-size: 11px; line-height: 1; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 8px; border-radius: 99px; background: var(--on-accent); color: var(--tag); }
.promo-chip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; font-size: 14px; color: var(--ink-soft); }
.promo-line .tag--promo { margin-right: 4px; }

/* --- numeri del materiale ------------------------------------------------ */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); margin: 0; background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.facts div { margin: 0 -1px -1px 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 16px; display: flex; flex-direction: column-reverse; gap: 4px; }
.facts dt { font: 12px/1.3 var(--f-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-muted); }
.facts dd { margin: 0; font: 800 26px/1 var(--f-mono); color: var(--ink); font-variant-numeric: tabular-nums; }

/* --- indice del modulo --------------------------------------------------- */
.toc { margin-top: 8px; font-size: 14px; }
.toc summary { cursor: pointer; color: var(--accent); font-family: var(--f-mono); font-size: 13px; padding-block: 8px; list-style-position: inside; }
.toc summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.toc ol { list-style: none; margin: 6px 0 4px; padding: 0; display: grid; gap: 6px; color: var(--ink-soft); }
.toc li { display: flex; gap: 10px; padding: 0; border: 0; background: none; line-height: 1.45; }
.toc__n { flex: 0 0 auto; min-width: 2.6em; font-family: var(--f-mono); color: var(--ink-muted); }

/* --- programma ufficiale ------------------------------------------------- */
.coverage { margin: 0; color: var(--ink-soft); max-width: 46em; }
.coverage strong { color: var(--accent); }
.syllabus { width: 100%; border-collapse: collapse; font-size: 15px; }
.syllabus th, .syllabus td { padding: 11px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.syllabus thead th { font: 600 12px/1.3 var(--f-mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-muted); background: var(--raised); }
.syllabus tbody tr:last-child td { border-bottom: 0; }
.syllabus__where { white-space: nowrap; font-family: var(--f-mono); font-size: 13px; }
.syllabus__where a { color: var(--accent); text-decoration: none; display: inline-block; padding-block: 3px; }
.syllabus__where a:hover { text-decoration: underline; }
.exam-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.exam { border: 1px solid var(--line); border-radius: var(--radius); background: var(--raised); padding: 20px; min-width: 0; }
.exam h3 { font-size: 17px; margin-bottom: 10px; }
.exam p, .exam ul { margin: 0; color: var(--ink-soft); }
.exam ul { padding-left: 18px; display: grid; gap: 6px; }

/* --- pagina del pacchetto ------------------------------------------------ */
.card__link { color: inherit; text-decoration: none; }
.card__link:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.compare tfoot th, .compare tfoot td { padding: 12px 16px; border-top: 1px solid var(--line-strong); font-weight: 600; white-space: nowrap; }
.compare--pack { min-width: 560px; }
@media (max-width: 640px) {
  .compare--pack { min-width: 0; }
  .compare--pack tr > :nth-child(2), .compare--pack tr > :nth-child(3) { display: none; }
  .compare--pack tr > :nth-child(4) { display: table-cell; }
  .syllabus__where { white-space: normal; }
}
