/* ═══════════════════════════════════════════════════════════════
   BRAND — "Pompeian" (2026-10-27)
   Loaded AFTER tokens.css / theme.css by the public pages, the login and the console. The demos (projects/*)
   never load it: they keep their own palettes. Everything here re-points the tokens, so components follow.

   World: warm black and marble, one saturated Pompeian red. Titles in Cinzel (Roman inscriptional capitals),
   text in EB Garamond. Art: Piranesi etchings + Greek/Roman works from the Met's Open Access (CC0), toned in code.
   ═══════════════════════════════════════════════════════════════ */

:root {
    --brand-rgb:    176,30,38;           /* Pompeian red: hairlines, hovers, glows (components read rgba(var(--brand-rgb,…),a)) */
    --red-p:        #b01e26;             /* the red, as a fill */
    --marble:       #f1eee8;
    --basalt:       #0f0d0c;

    --black:        #0f0d0c;
    --black-soft:   #171413;
    --white:        #f1eee8;
    --fg-rgb:       255,250,244;
    --fg2-rgb:      241,238,232;
    --fg-strong:    #fbf8f3;
    --text-1:       #efe9df;
    --text-2:       #d2cabc;
    --text-2b:      #c1b8a9;
    --text-3:       #aaa192;
    --text-4:       #958c7e;
    --text-5:       #82796d;
    --text-6:       #6f675d;
    --input-bg:     #1a1614;
    --input-bg2:    #141110;
    --option-bg:    #1d1917;
    --scroll-track: #0f0d0c;
    --scroll-thumb: #2e2926;
    --modal-bg:     #1d1917;
    --raised-bg:    #221d1b;

    --mv-accent:         #b01e26;
    --mv-accent-600:     #961a21;
    --mv-accent-700:     #7b151b;
    --mv-accent-glow:    rgba(176,30,38,.22);
    --mv-accent-haze:    rgba(176,30,38,.12);
    --mv-accent-ring:    rgba(226,84,92,.5);
    --mv-accent-text:    #ee6c72;             /* red as text on warm black: 6:1 */
    --mv-accent-hover:   #c4262f;
    --focus:        #ee6c72;
    --on-blue:      #fbf4ec;
    --blue-l:       rgba(176,30,38,.16);
    --blue-soft:    rgba(176,30,38,.2);

    --mv-accent2:       #c49a5a;             /* second accent: bronze (no purple, no azure) */
    --mv-accent2-600:   #a07a3f;
    --mv-accent2-glow:  rgba(196,154,90,.2);
    --mv-accent2-haze:  rgba(196,154,90,.09);
    --mv-accent2-l:     #efe3cf;

    --t-sky:        #ee6c72;
    --t-cyan2:      #f08a8f;
    --t-cyan3:      #f6b0b3;
    --t-violet:     #d3b078;
    --fam-auto:     #7f9fe6;
    --fam-data:     #e4b660;
    --fam-know:     #d7c7a8;
    --fam-models:   #93c197;

    --rule:         rgba(241,238,232,.12);
    --rule-2:       rgba(241,238,232,.22);
    --grad-hero:        radial-gradient(ellipse at 50% 0%, rgba(176,30,38,.1), transparent 60%);
    --grad-hero-subtle: radial-gradient(ellipse at 50% 0%, rgba(176,30,38,.06), transparent 60%);
    --grad-card:    linear-gradient(#171413, #171413);
    --grad-surface: linear-gradient(#1d1917, #1d1917);
    --glass-bg:     #171413;
    --glass-hover:  #1f1a18;
    --glass-strong: #1d1917;
    --nav-bg:       #171413;
    --nav-accent:   #ee6c72;
    --border-brand: 1px solid rgba(176,30,38,.4);

    --font-sans:    'EB Garamond', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
    --font-serif:   'Cinzel', 'Trajan Pro', 'Times New Roman', serif;
    --font-display: 'Cinzel', 'Trajan Pro', 'Times New Roman', serif;
    --font-label:   'Cinzel', 'Trajan Pro', 'Times New Roman', serif;
    --sans:  var(--font-sans);
    --serif: var(--font-serif);

    --fs-xs:        0.875rem;
    --fs-sm:        0.97rem;
    --fs-base:      1.0625rem;
    --fs-md:        1.0625rem;
    --fs-lg:        1.25rem;
}

:root[data-theme="light"] {
    --black:        #f2efe8;             /* marble */
    --black-soft:   #fbf9f5;
    --white:        #1c1715;
    --fg-rgb:       28,23,21;
    --fg2-rgb:      28,23,21;
    --fg-strong:    #120e0c;
    --text-1:       #251f1c;
    --text-2:       #3b3430;
    --text-2b:      #453e39;
    --text-3:       #564e48;
    --text-4:       #5e5650;
    --text-5:       #655d57;
    --text-6:       #70685f;
    --input-bg:     #fffdf9;
    --input-bg2:    #fffdf9;
    --option-bg:    #fffdf9;
    --scroll-track: #e8e3d9;
    --scroll-thumb: #c9c1b3;
    --modal-bg:     #fffdf9;
    --raised-bg:    #ece7dd;

    --mv-accent-glow:    rgba(176,30,38,.14);
    --mv-accent-haze:    rgba(176,30,38,.07);
    --mv-accent-ring:    rgba(176,30,38,.45);
    --mv-accent-text:    #a3181f;             /* 6.6:1 on marble */
    --mv-accent-hover:   #8f1920;
    --focus:        #a3181f;
    --on-blue:      #fffaf4;

    --mv-accent2:       #8a6329;
    --mv-accent2-glow:  rgba(138,99,41,.16);
    --mv-accent2-haze:  rgba(138,99,41,.07);

    --t-sky:        #a3181f;
    --t-cyan2:      #a3181f;
    --t-cyan3:      #a3181f;
    --t-violet:     #7d5a24;
    --t-amber:      #8a4b0a;
    --fam-auto:     #2f56a3;
    --fam-data:     #8a5a07;
    --fam-know:     #6f5f3f;
    --fam-models:   #2f6b3f;

    --rule:         rgba(28,23,21,.14);
    --rule-2:       rgba(28,23,21,.24);
    --grad-hero:        radial-gradient(ellipse at 50% 0%, rgba(176,30,38,.07), transparent 60%);
    --grad-hero-subtle: radial-gradient(ellipse at 50% 0%, rgba(176,30,38,.04), transparent 60%);
    --grad-card:    linear-gradient(#fbf9f5, #fbf9f5);
    --grad-surface: linear-gradient(#f7f4ee, #f7f4ee);
    --glass-bg:     #fbf9f5;
    --glass-hover:  #ece7dd;
    --glass-strong: #f7f4ee;
    --nav-bg:       #fbf9f5;
    --nav-text:     rgba(28,23,21,.74);
    --nav-text-hover: #120e0c;
    --nav-active:   rgba(28,23,21,.08);
    --nav-hover:    rgba(28,23,21,.05);
    --nav-accent:   #a3181f;
    --border-brand: 1px solid rgba(176,30,38,.35);
}

/* ── Type ── */
body { font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1, "kern" 1; line-height: 1.55; }
h1, h2, h3, .logo, .label, .btn, .badge { font-feature-settings: "lnum" 1; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; letter-spacing: .015em; }
/* Cinzel is all capitals: titles breathe, small labels are letter-spaced */
.label, .nav-links a, .app-nav-a, .footer-legal a { font-family: var(--font-label); letter-spacing: .09em; text-transform: uppercase; font-size: .78rem; }
.btn { font-family: var(--font-label); letter-spacing: .1em; text-transform: uppercase; font-size: .8rem; font-weight: 600; }
.logo { font-family: var(--font-display); font-weight: 600; letter-spacing: .06em; }
.logo span { color: var(--mv-accent-text); }

/* Narrow phones: Cinzel's wordmark is wider than the old one, keep the bar inside the screen */
@media (max-width: 420px) {
    .nav .logo, .app-nav .logo { font-size: 1.05rem !important; letter-spacing: .02em; }
    .nav .mv-back, .app-nav .mv-back { margin-left: .35rem; }
}
@media (max-width: 340px) {
    .app-nav .mv-back, .nav .mv-back { display: none; }
}

/* ═══ Soft washes (2026-10-27): a breath of the brand red behind the page heads, the CTA band and the console. Low alpha,
   never behind text blocks that need contrast; the dark and the light page get their own strength. ═══ */
body.pub .page-intro, body.pub .page-hero {
    background: radial-gradient(80% 150% at 92% -40%, rgba(var(--brand-rgb), .16), transparent 62%), radial-gradient(60% 120% at 0% 120%, rgba(var(--brand-rgb), .07), transparent 70%);
}
:root[data-theme="light"] body.pub .page-intro, :root[data-theme="light"] body.pub .page-hero {
    background: radial-gradient(80% 150% at 92% -40%, rgba(var(--brand-rgb), .11), transparent 62%), radial-gradient(60% 120% at 0% 120%, rgba(var(--brand-rgb), .05), transparent 70%);
}
.cta-dark::before { background: radial-gradient(70% 150% at 50% 130%, rgba(var(--brand-rgb), .24), transparent 70%); }
:root[data-theme="light"] .cta-dark::before { background: radial-gradient(70% 150% at 50% 130%, rgba(var(--brand-rgb), .14), transparent 70%); }
.app-page { background: radial-gradient(1000px 480px at 100% -6%, rgba(var(--brand-rgb), .08), transparent 62%), var(--black); }
:root[data-theme="light"] .app-page { background: radial-gradient(1000px 480px at 100% -6%, rgba(var(--brand-rgb), .06), transparent 62%), var(--black); }

/* Phones: the home title ran past the edge (Cinzel is wide): smaller, and the second line indented less. */
@media (max-width: 520px) {
    body.pub .shader-title { font-size: clamp(1.35rem, 7vw, 2.1rem); }
    body.pub .shader-title .shader-line-2 { padding-left: .7em; }
}

/* Phones: sizes you can read and touch. Text never under 13px, the round switches 40px (34px on the narrowest phones, to fit the bar),
   the wordmark a 44px-high target. */
@media (max-width: 768px) {
    .nav .theme-tgl, .nav .nav-lang-btn, .app-nav .theme-tgl, .app-nav .nav-lang-btn { width: 40px; height: 40px; min-width: 40px; }
    .nav .logo, .app-nav .logo { padding: .75rem 0; }
    .app-page .panel-cta, .panel-cta { font-size: .82rem; }
    .app-page small, .app-page code, .app-page .badge { font-size: .8125rem; }
}
@media (max-width: 360px) {
    .nav .theme-tgl, .nav .nav-lang-btn, .app-nav .theme-tgl, .app-nav .nav-lang-btn { width: 34px; height: 34px; min-width: 34px; }
}
@media (max-width: 768px) {
    .footer-logo { padding: .7rem 0; display: inline-flex; align-items: center; }
    .sd-fam-label { min-height: 44px; display: inline-flex; align-items: center; }
}

/* the pointer spotlight on cards (css/motion.css) follows the brand red too */
:root { --mv-spot-rgb: var(--brand-rgb); }

/* ── Round 2 (owner, 2026-10-29) ───────────────────────────────────────────────────────────────
   Words that carry the message (copy marks them with <strong>) stand out in the accent colour; the sections change
   background from one to the next; the footer is its own deep-red band; the legal text runs wider. */
body.pub p strong, body.pub .page-intro p strong { color: var(--mv-accent-text); font-weight: 600; }
body.pub .shader-sub strong { color: #fff; font-weight: 600; }
:root[data-theme="light"] body.pub .shader-sub strong { color: var(--mv-accent-text); }
body.pub .cta-dark p strong { color: var(--white); }

/* Second content band of a page: raised surface, hairlines above and below (the closing band stays as it was) */
body.pub .hiw-section { background: var(--black-soft); border-block: 1px solid var(--rule); }
/* Contact: the closing band's look (soft surface, red wash rising from below), the form a clean card on it */
body.pub .contact-band {
    background: radial-gradient(70% 90% at 50% 120%, rgba(var(--brand-rgb), .2), transparent 70%), var(--black-soft);
    border-top: 1px solid var(--rule);
}
:root[data-theme="light"] body.pub .contact-band { background: radial-gradient(70% 90% at 50% 120%, rgba(var(--brand-rgb), .12), transparent 70%), var(--black-soft); }
body.pub .contact-band .contact-form-col { background: var(--black); box-shadow: 0 18px 46px -24px rgba(0, 0, 0, .35); }

/* Footer: deep Pompeian red in both themes, cream type, so the page visibly ends */
body.pub .footer {
    --white: #f6eee4; --text-3: #e9d3cc; --text-4: #dcc0b9; --mv-accent-text: #ffb9bd; --mv-accent: #ffb9bd;
    --rule: rgba(255, 236, 226, .2); --rule-2: rgba(255, 236, 226, .32);
    background: linear-gradient(180deg, #62121a, #3e0b11); color: var(--text-3); border-top: 0;
}

/* Legal pages: the prose column takes the width the page has */
body.pub .legal-hero > .container, body.pub .legal-hero + .section > .container { max-width: 80rem; }
body.pub .legal-body { max-width: 74rem; }
body.pub .legal-body.has-toc { grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); }
body.pub .legal-body p, body.pub .legal-body .legal-list { max-width: none; }

/* Footer type is small (owner, 2026-10-29: «scritto più piccolo»): the wordmark, the legal links in Cinzel capitals and the
   address lines in Garamond. Links keep a 44px-high tap target; on phones they sit in a row instead of a tall column. */
body.pub .footer-logo { font-size: 1.05rem; }
body.pub .footer-legal a { font-size: .68rem; letter-spacing: .08em; }
body.pub .footer-meta { font-family: var(--font-sans); font-size: .8rem; letter-spacing: 0; line-height: 1.6; }
@media (max-width: 768px) {
    body.pub .footer-inner { padding-top: var(--space-8); }
    body.pub .footer-legal { flex-direction: row; gap: 0 var(--space-5); }
    body.pub .footer-meta { padding-top: var(--space-4); gap: var(--space-2); }
}

/* Home, scroll-driven close (index.php #homeTrack, --p = 0..1 from its script): the hero sticks while a red disc grows over the foam
   until it fills the window, then the invitation to write sits centred, in both directions. */
.home-track { position: relative; height: calc(250vh / var(--mv-zoom, 1)); height: calc(250svh / var(--mv-zoom, 1)); }
body.pub .home-track .shader-hero {
    position: sticky; top: var(--header-h); min-height: 0;
    height: calc(100vh / var(--mv-zoom, 1) - var(--header-h)); height: calc(100svh / var(--mv-zoom, 1) - var(--header-h));
}
body.pub .home-track .shader-content {
    position: relative; z-index: 3; height: 100%; min-height: 0;
    opacity: clamp(0, calc(1 - var(--p, 0) * 1.9), 1); transform: translateY(calc(var(--p, 0) * -36px));
}
.home-track.is-close .shader-content { visibility: hidden; }
.home-wash {
    position: absolute; inset: 0; z-index: 2; pointer-events: none;
    background: radial-gradient(120% 120% at 70% 65%, #c4262f 0, #8f1920 45%, #5a0f15 100%);
    clip-path: circle(calc(var(--p, 0) * 150%) at 70% 66%);
}
.home-close {
    position: absolute; inset: 0; z-index: 5; visibility: hidden;
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    gap: clamp(.6rem, 2vh, 1.1rem); padding: 0 var(--space-6); color: #fbf4ec;
    opacity: clamp(0, calc((var(--p, 0) - .5) * 2.5), 1); transform: translateY(calc((1 - var(--p, 0)) * 28px));
}
.home-track.is-close .home-close { visibility: visible; }
body.pub .home-close-k { font-family: var(--font-label); font-size: clamp(.78rem, .7rem + .5vw, 1rem); letter-spacing: .22em; text-transform: uppercase; color: #f3c9c4; }
body.pub .home-close-t { margin: 0; font-family: var(--font-sans); font-style: italic; font-weight: 400; font-size: clamp(3rem, 1.5rem + 7vw, 7rem); line-height: 1; color: #fff; }
body.pub .home-close-s { margin: 0; max-width: 34rem; font-size: clamp(1.02rem, .95rem + .4vw, 1.25rem); line-height: 1.5; color: #f6ddd8; }
body.pub .home-close-btn {
    margin-top: var(--space-4); min-height: 48px; display: inline-flex; align-items: center; padding: .85rem 1.8rem; border-radius: 3px;
    background: #fbf4ec; color: #8f1920; font-family: var(--font-label); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase;
    transition: background-color .2s var(--ease-out), transform .2s var(--ease-out);
}
body.pub .home-close-btn:hover { background: #fff; transform: translateY(-2px); }

/* /why as a real check (why.php #whyCheck): each question takes Yes/No, a Yes opens the answer and moves the score.
   Without JS every answer stays open and the toggles are hidden. */
.why-rows, .why-bar { max-width: 62rem; margin-inline: auto; }
.why-rows { list-style: none; margin-block: 0; padding: 0; border-top: 1px solid var(--rule-2); }
.wq { border-bottom: 1px solid var(--rule); }
.wq-head { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) auto; column-gap: var(--space-5); align-items: center; padding: var(--space-6) 0; }
.wq-n { font-family: var(--font-label); font-size: .85rem; letter-spacing: .1em; color: var(--text-4); transition: color .3s var(--ease-out); }
body.pub .wq-q { margin: 0; max-width: none; font-size: var(--fs-item); line-height: 1.2; color: var(--white); text-wrap: balance; transition: color .3s var(--ease-out); }
.wq-tgl { display: none; border: 1px solid var(--rule-2); border-radius: 999px; padding: 3px; gap: 2px; }
.why-check.js .wq-tgl { display: inline-flex; }
.wq-tgl button {
    min-width: 4.2rem; min-height: 40px; padding: 0 1rem; border: 0; border-radius: 999px; background: none; cursor: pointer;
    font-family: var(--font-label); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3);
    transition: background-color .25s var(--ease-out), color .25s var(--ease-out);
}
.wq-tgl button:hover { color: var(--white); }
.wq-tgl button:focus-visible { outline: 2px solid var(--mv-accent-text); outline-offset: 2px; }
.wq-tgl button[data-v="1"][aria-pressed="true"] { background: var(--mv-accent); color: var(--on-blue); }
.wq-tgl button[data-v="0"][aria-pressed="true"] { background: rgba(var(--fg-rgb), .14); color: var(--white); }
.wq.is-yes .wq-n, .wq.is-yes .wq-q { color: var(--mv-accent-text); }
.wq.is-no .wq-q { color: var(--text-4); }
.wq-a-in { padding: 0 0 var(--space-6) calc(2.5rem + var(--space-5)); display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); }
.wq-a-in p { margin: 0; max-width: 52ch; padding-left: var(--space-4); border-left: 2px solid var(--mv-accent); font-size: var(--fs-base); line-height: 1.6; color: var(--text-2b); }
.wq-more { margin-left: .4em; white-space: nowrap; font-family: var(--font-label); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mv-accent-text); }
.why-check.js .wq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease-out); }
.why-check.js .wq-a-in { overflow: hidden; min-height: 0; padding-bottom: 0; opacity: 0; visibility: hidden; transition: opacity .35s var(--ease-out), padding-bottom .5s var(--ease-out), visibility 0s .5s; }
.why-check.js .wq.is-yes .wq-a { grid-template-rows: 1fr; }
.why-check.js .wq.is-yes .wq-a-in { opacity: 1; visibility: visible; padding-bottom: var(--space-6); transition-delay: .1s, 0s, 0s; }

.why-bar {
    --wb-bottom: var(--space-4);
    position: sticky; bottom: var(--wb-bottom); z-index: 20; margin-top: var(--space-6);
    display: flex; align-items: center; gap: var(--space-4); padding: .65rem var(--space-4) .65rem calc(var(--space-4) + 3px);
}
/* The bar's own surface is a ::after, painted over the blur layer, so the bar and its border always stay sharp. */
.why-bar::after {
    content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: var(--black-soft); border: 1px solid var(--rule-2); border-left: 3px solid var(--mv-accent); border-radius: var(--r-sm);
    box-shadow: 0 14px 34px -22px rgba(0, 0, 0, .4);
}
/* The score bar floats over a blurred band (owner, 2026-10-30): from a little above the bar down to the bottom edge of the window, the full width of the
   window, fading in at the top. What scrolls under it is blurred and dimmed, the bar stays crisp. Skipped where backdrop-filter is missing. */
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .why-bar::before {
        content: ''; position: absolute; z-index: -2; pointer-events: none;
        top: -3.5rem; bottom: calc(-1 * var(--wb-bottom)); left: calc(50% - 50vw); right: calc(50% - 50vw);
        -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
        background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--black) 55%, transparent));
        -webkit-mask-image: linear-gradient(to bottom, transparent, #000 3rem);
        mask-image: linear-gradient(to bottom, transparent, #000 3rem);
    }
}
.why-bar[hidden] { display: none; }
.wb-n { font-family: var(--font-display); font-size: 1rem; color: var(--text-4); white-space: nowrap; }
.wb-n b { font-size: 1.5rem; font-weight: 500; color: var(--mv-accent-text); font-variant-numeric: tabular-nums; }
.ws-bar { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; width: 7.5rem; flex: none; }
.ws-bar i { height: 6px; border-radius: 2px; background: var(--rule-2); transition: background-color .35s var(--ease-out); }
.ws-bar i.on { background: var(--mv-accent); }
.wb-msg { margin: 0; flex: 1; min-width: 0; font-size: var(--fs-sm); color: var(--text-2); }
.wb-cta { flex: none; min-height: 40px; padding: .55rem 1.1rem; font-size: .72rem; }
@media (max-width: 720px) { .wb-msg { display: none; } .ws-bar { flex: 1 1 4rem; width: auto; min-width: 4rem; } .wb-cta { margin-left: auto; max-width: 9.5rem; padding: .45rem .7rem; font-size: .64rem; line-height: 1.25; text-align: center; white-space: normal; } }
/* the bar spans the phone's width: it sits above the back-to-top arrow (44px at 20px from the bottom), not under it */
@media (max-width: 720px) { .why-bar { --wb-bottom: 5rem; } }
@media (max-width: 560px) {
    /* Yes / No stay on the right of the question (owner, 2026-10-30); the answer still opens below */
    .wq-head { grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--space-3); row-gap: var(--space-2); }
    .wq-n { grid-column: 1 / -1; }
    .wq-tgl button { min-width: 2.9rem; padding: 0 .7rem; }
    .wq-a-in { padding-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .why-check.js .wq-a, .why-check.js .wq-a-in, .ws-bar i { transition: none; } }

/* /why: official figures as bars (why.php #whyProof). Without JS the bars stand full; with JS a card draws them when it is a third in view. */
body.pub .why-proof { background: var(--black-soft); border-top: 1px solid var(--rule-2); }
.wp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); max-width: 62rem; margin: var(--space-10) auto 0; }
.wp-card { display: flex; flex-direction: column; padding: var(--space-6); background: var(--black); border: 1px solid var(--rule-2); }
body.pub .wp-t { margin: 0; font-family: var(--font-sans); font-weight: 400; text-transform: none; letter-spacing: 0; font-size: clamp(1.2rem, 1.05rem + .4vw, 1.4rem); line-height: 1.25; color: var(--white); }
.wp-key { display: flex; gap: var(--space-5); list-style: none; margin: .8rem 0 0; padding: 0; font-size: .95rem; color: var(--text-3); }
.wp-key li::before { content: ''; display: inline-block; width: .7rem; height: .7rem; margin-right: .45rem; border-radius: 2px; background: var(--mv-accent); vertical-align: -.05em; }
.wp-key .k-eu::before { background: var(--text-4); }
.wp-grp { display: grid; grid-template-columns: 6.4rem minmax(0, 1fr); column-gap: var(--space-3); align-items: center; margin-top: var(--space-5); }
.wp-card > .wp-t + .wp-grp, .wp-card > .wp-key + .wp-grp { margin-top: var(--space-5); }
.wp-y { font-family: var(--font-display); font-size: 1.15rem; color: var(--white); line-height: 1.2; }
.wp-grp--size { grid-template-columns: 9.5rem minmax(0, 1fr); }
.wp-grp--size .wp-y { font-family: var(--font-sans); font-size: .95rem; color: var(--text-2); }
.wp-bars { display: grid; gap: .35rem; }
.wp-b { display: grid; grid-template-columns: minmax(0, 1fr) 3.1rem; align-items: center; column-gap: .5rem; }
.wp-track { display: block; height: 10px; background: var(--rule); border-radius: 2px; overflow: hidden; }
.wp-track i { display: block; height: 100%; width: var(--w); background: var(--mv-accent); }
.wp-b.eu .wp-track i { background: var(--text-4); }
.wp-v { font-weight: 400; font-size: 1rem; color: var(--white); font-variant-numeric: tabular-nums; text-align: right; }
.why-proof.js .wp-track i { width: 0; transition: width 1.1s var(--ease-out) var(--d, 0s); }
.why-proof.js .wp-card.is-run .wp-track i { width: var(--w); }
.wp-d { margin: var(--space-5) 0 0; max-width: 58ch; font-size: 1.02rem; line-height: 1.55; color: var(--text-2); }
.wp-src { display: inline-block; align-self: flex-end; margin-top: auto; padding-top: var(--space-5); font-size: .9rem; color: var(--text-3); text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: .25em; }
.wp-src:hover { color: var(--white); text-decoration-color: var(--mv-accent); }
.wp-stat { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--space-8, 2rem); align-items: center; max-width: 62rem; margin: var(--space-6) auto 0; padding: var(--space-6); background: var(--black); border: 1px solid var(--rule-2); border-left: 3px solid var(--mv-accent); }
.wp-big { font-family: var(--font-display); font-size: clamp(2.6rem, 1.8rem + 3vw, 4.2rem); line-height: 1; color: var(--white); white-space: nowrap; }
.wp-stat > div:last-child { display: flex; flex-direction: column; }
.wp-stat .wp-d { margin-top: .5rem; }
.wp-note { max-width: 62rem; margin: var(--space-6) auto 0; font-size: 1rem; line-height: 1.55; color: var(--text-3); }
@media (max-width: 820px) { .wp-grid { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .wp-stat .wp-d { display: none; } }   /* the one-line McKinsey note is for wide screens (owner, 2026-10-30) */
@media (max-width: 560px) {
    .wp-card, .wp-stat { padding: var(--space-5); }
    .wp-grp { grid-template-columns: 4.6rem minmax(0, 1fr); }
    .wp-grp--size { grid-template-columns: 6.4rem minmax(0, 1fr); }
    .wp-stat { grid-template-columns: 1fr; row-gap: var(--space-3); }
}
@media (prefers-reduced-motion: reduce) { .why-proof.js .wp-track i { transition: none; } }


/* Service pages: the comparison draws itself. Each row crosses out the generic side, then the right side's tick pops
   (the table is a .reveal: the class .visible arrives when it scrolls into view). */
.sd-compare-row:nth-child(2) { --r: 0; } .sd-compare-row:nth-child(3) { --r: 1; } .sd-compare-row:nth-child(4) { --r: 2; }
.sd-compare-row:nth-child(5) { --r: 3; } .sd-compare-row:nth-child(6) { --r: 4; } .sd-compare-row:nth-child(7) { --r: 5; } .sd-compare-row:nth-child(8) { --r: 6; }
.sd-compare .sd-cmp-a > span:last-child {
    background: linear-gradient(currentColor, currentColor) 0 58% / 0 1px no-repeat;
    transition: background-size .6s var(--ease-out) calc(var(--r, 0) * 260ms + 350ms);
}
.sd-compare.is-run .sd-cmp-a > span:last-child { background-size: 100% 1px; }
.sd-compare .sd-cmp-b .sd-cmp-mark { transform: scale(0); transition: transform .5s cubic-bezier(.34, 1.56, .64, 1) calc(var(--r, 0) * 260ms + 800ms); }
.sd-compare.is-run .sd-cmp-b .sd-cmp-mark { transform: scale(1); }
@media (prefers-reduced-motion: reduce) {
    .sd-compare .sd-cmp-a > span:last-child { background-size: 100% 1px; transition: none; }
    .sd-compare .sd-cmp-b .sd-cmp-mark { transform: none; transition: none; }
}

/* Round 3 (owner, 2026-10-29): services in a readable face, cards of one size, no tech chips, wider text, roomier demo list */
.svc-filter-label { font-family: var(--font-sans); font-size: 1.05rem; letter-spacing: .01em; text-transform: none; color: var(--text-2); }
.svc-chip { font-size: 1.02rem; color: var(--white); }
body.pub .svc-family-head h2 { font-family: var(--font-sans); font-weight: 500; text-transform: none; letter-spacing: 0; font-size: clamp(1.8rem, 1.3rem + 1.2vw, 2.3rem); line-height: 1.1; }
.svc-family-head p { font-size: 1.05rem; color: var(--text-2); max-width: 32ch; }
.svc-card p {
    flex: 1; font-size: 1rem; line-height: 1.6; color: var(--text-2); min-height: 4.8em;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden;
}
.svc-card-foot { justify-content: flex-end; }
body.pub .sd-hero h1 { max-width: 34ch; text-wrap: balance; }
body.pub .page-intro .sd-overview-text { max-width: 80ch; font-size: 1.15rem; }
.sd-compare-row > span { font-size: 1.06rem; font-weight: 500; }
.sd-compare-row .sd-cmp-a { color: var(--text-2); }
.sd-compare-head > span { font-size: .9rem; }
.sd-related { display: flex; flex-wrap: wrap; }
.sd-related-card { flex: 0 1 auto; white-space: nowrap; padding-right: var(--space-6); }
@media (max-width: 560px) { .sd-related-card { white-space: normal; flex: 1 1 100%; } }
body.pub .panel-card { padding: var(--space-10) var(--space-4); }
.plate-tags { display: none; }

/* position: sticky needs the section not to be a scroll container: clip the glow without making it one */
body.pub .glow-top { overflow: hidden; overflow: clip; }

/* /why in a calmer voice (owner, 2026-10-29: «troppo maiuscolo, mette ansia»): questions in sentence case, no alarm dot, softer controls */
body.pub .why-alert-label { color: var(--mv-accent-text); }
body.pub .why-alert-label::before { width: 22px; height: 1px; border-radius: 0; background: currentColor; }
body.pub .wq-q { font-family: var(--font-sans); font-weight: 400; text-transform: none; letter-spacing: 0; font-size: clamp(1.3rem, 1.1rem + .6vw, 1.65rem); line-height: 1.25; }
.wq-n { font-family: var(--font-sans); font-size: 1rem; letter-spacing: .04em; }
.wq-tgl button { font-family: var(--font-sans); font-size: 1.05rem; letter-spacing: 0; text-transform: none; font-weight: 400; }
.wq-more { font-family: var(--font-sans); font-size: 1.05rem; letter-spacing: 0; text-transform: none; font-weight: 400; }
.wq-a-in p { font-size: 1.1rem; max-width: 58ch; }

/* /why: the answer under a Yes is quiet (owner: «troppe scritte in rosso»): plain text, a neutral rule, the red kept for the toggle and the count */
.wq.is-yes .wq-q { color: var(--white); }
.wq.is-yes .wq-n { color: var(--mv-accent-text); }
.wq-a-in p { border-left-color: var(--rule-2); color: var(--text-2); }
/* one bold word per question carries the point (owner, 2026-10-30); the answers have no bold, so the eye goes question -> answer without competing */
body.pub .wq-q strong { font-weight: 700; color: var(--white); }
body.pub .wq-a-in p strong { color: inherit; font-weight: inherit; }
.wq-more { color: var(--white); text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: .25em; }
.wq-more:hover { text-decoration-color: var(--mv-accent); }
body.pub .why-bar .wb-msg { color: var(--text-2); }

/* Contact: the form's heading sits on the right (owner) */
body.pub .contact-form-col h2 { text-align: right; }

/* Page openers and section headings centred and given the width the page has (owner, 2026-10-29): the label sat in a left
   column and the title/description wrapped early beside it. */
body.pub .page-intro .container, body.pub .page-hero .container { display: block; text-align: center; }
body.pub .page-intro .container > *, body.pub .page-hero .container > * { grid-column: auto; }
body.pub .page-intro .container > .label, body.pub .page-hero .container > .label {
    display: flex; justify-content: center; margin: 0 0 var(--space-5); padding-top: 0; white-space: normal;
}
body.pub .page-intro h1, body.pub .page-hero h1, body.pub .legal-hero h1 { max-width: 40ch; margin-inline: auto; text-align: center; text-wrap: balance; }
body.pub .page-intro p, body.pub .page-hero .page-hero-sub, body.pub .page-intro .sd-overview-text { max-width: 72ch; margin-inline: auto; text-align: center; }
body.pub .sd-hero .sd-hero-ico { display: flex; margin: 0 auto var(--space-5); }
body.pub .sd-stats { text-align: center; }
body.pub .sd-stat { text-align: center; }
body.pub .sec-head { max-width: 64rem; margin-inline: auto; text-align: center; }
body.pub .sec-head p { margin-inline: auto; }
/* Service pages (/services/<slug>, owner 2026-10-30): the opener (family bar, icon, title, description, figures) and the section
   headings with their paragraphs sit on the left edge, not centred. */
body.pub .sd-hero .container { text-align: left; }
body.pub .sd-hero .container > .label { justify-content: flex-start; }
body.pub .sd-hero h1, body.pub .sd-hero .sd-overview-text { margin-inline: 0; text-align: left; }
body.pub .sd-hero .sd-hero-ico { margin-left: 0; margin-right: 0; }
body.pub .sd-hero .sd-stats { justify-content: flex-start; text-align: left; }
body.pub .sd-hero .sd-stat { text-align: left; }
body.pub .sd-page .sec-head, body.pub .sd-page .sec-head p { margin-inline: 0; text-align: left; }

/* Phones (owner, 2026-10-29: «tutto leggermente troppo grosso»): the rem base drops from 16px to 15px, so titles and text shrink together;
   the bar keeps its sizes in px. Openers and headings go back to the left edge: centred paragraphs read badly on a narrow screen. */
@media (max-width: 560px) {
    .nav .logo, .app-nav .logo { font-size: 16px; }
    body.pub .page-intro .container, body.pub .page-hero .container { text-align: left; }
    body.pub .page-intro .container > .label, body.pub .page-hero .container > .label { justify-content: flex-start; }
    body.pub .page-intro h1, body.pub .page-hero h1, body.pub .legal-hero h1,
    body.pub .page-intro p, body.pub .page-hero .page-hero-sub, body.pub .page-intro .sd-overview-text { margin-inline: 0; text-align: left; }
    body.pub .page-intro p, body.pub .page-intro .sd-overview-text { font-size: 1.02rem; }
    body.pub .sd-hero .sd-hero-ico { margin-left: 0; }
    body.pub .sd-stats, body.pub .sd-stat { text-align: left; }
    body.pub .sec-head, body.pub .sec-head p { text-align: left; margin-inline: 0; }
}

/* Contact: beside the channels the form card needs no heading; it stays when the card drops below them (phones, tablets) */
@media (min-width: 901px) { body.pub .contact-form-col h2 { display: none; } }

/* Public openers on a phone: the description stays within two lines */
@media (max-width: 560px) {
    body.pub .page-intro .container > p:not(.sd-overview-text) { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
}

/* Public bar = the demo bar at every width (css/demo-bar.css, measured on the demos): 60px high, 56px up to 768px; side padding 24px, 16px up to 768px, 12px up to 360px;
   brand 18.4px Cinzel 500 (16px and .03em up to 520px), «Vault» 700. Sizes are px on purpose: phones set html to 15px, the demos stay at 16px.
   From 1280px on a computer css/scale.css gives the bar a zoom that cancels the page's, so on screen it is the demos' size there too. */
html.mv-pub .nav { height: var(--mv-bar-h); }
html.mv-pub .nav .logo { font-size: 18.4px !important; font-weight: 500; letter-spacing: .06em; padding: 12px 0; }
html.mv-pub .nav .logo span { font-weight: 700; }
@media (max-width: 768px) {
    html.mv-pub .nav { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
}
@media (max-width: 520px) {
    html.mv-pub .nav .logo { font-size: 16px !important; letter-spacing: .03em; }
}
@media (max-width: 360px) {
    html.mv-pub .nav { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
}
@media (min-width: 1280px) and (hover: hover) and (pointer: fine) {
    html.mv-pub .nav .theme-tgl, html.mv-pub .nav .nav-lang-btn { width: 32px; height: 32px; min-width: 32px; }
    html.mv-pub .nav .nav-cta .btn { padding: .35rem 1rem; font-size: .8rem; }
}

/* Console bar = the demo bar too (owner, 2026-10-30), same sizes as above. Top bar (up to 1199px): the demos' height and padding. Sidebar (from 1200px): the brand sits in a
   block as tall as that bar (on screen), so its type and position are the demos'; --mv-bar-page (css/scale.css) cancels the page's 90%. */
html.mv-app .app-nav .logo { font-size: 18.4px !important; font-weight: 500; letter-spacing: .06em; padding: 12px 0; }
html.mv-app .app-nav .logo span { font-weight: 700; }
@media (max-width: 1199px) {
    html.mv-app .app-nav-in { height: var(--mv-bar-h); padding-left: max(24px, env(safe-area-inset-left)); padding-right: max(24px, env(safe-area-inset-right)); }
}
@media (max-width: 768px) {
    html.mv-app .app-nav-in { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
}
@media (max-width: 520px) {
    html.mv-app .app-nav .logo { font-size: 16px !important; letter-spacing: .03em; }
}
@media (max-width: 360px) {
    html.mv-app .app-nav-in { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
}
@media (min-width: 1200px) {
    html.mv-app .app-nav .logo { font-size: calc(18.4px * var(--mv-nav-zoom, 1) / var(--mv-zoom, 1)) !important; }
    html.mv-app .app-nav-in { padding-top: 0; }
    html.mv-app .app-nav-start { display: flex; align-items: center; height: var(--mv-bar-page, var(--mv-bar-h)); margin: 0 -1rem; padding: 0 calc(24px * var(--mv-nav-zoom, 1) / var(--mv-zoom, 1)); border-bottom: 1px solid var(--rule); }
}

/* The back arrow sits where it does in the demos: 26px circle, 12.8px from the wordmark, at every width (the phone rules above pulled it to 5px). */
html.mv-pub .nav .mv-back, html.mv-app .app-nav .mv-back { margin-left: 12.8px; }

/* /services: a family opened from its chip lands under the bar, with a little air above it. */
.svc-family, .svc-filter { scroll-margin-top: calc(var(--header-h) + 1rem); }

/* Nav links: .85rem on a phone, sliding down to .78rem at 900px (it was a step at 560px). */
.nav .nav-links a, .app-nav .app-nav-a { font-size: clamp(.78rem, calc(.85rem - (100vw - 560px) * .0033), .85rem); }

/* Legibility floor (design review 2026-11-15): no text the visitor must read or tap under ~12.5px on screen.
   The computer zoom (.9) shrinks px too, so 14px = 12.6px on a computer, 14px on a phone.
   The higher specificity (html body …) wins over the older per-file rules without !important. */
html body.pub .footer-legal a, html body .footer-legal a,
html body .footer-provider,
html body .footer-provider a,
html body .nav .nav-links a,
html body .app-nav .app-nav-a,
html body .app-nav-exit,
html body .cost-tag,
html body .ecb-date,
html body .app-main .btn-sm,
html body .app-main--admin .btn-sm,
html body .app-main .btn:not(.btn-lg) { font-size: 14px; }
html body .wb-cta { font-size: max(.72rem, 13px); }
/* The public bar's links (Perché, Servizi, Demo, Contatti) are the size of the login's «Torna alla home» on screen (owner, 2026-11-18: «leggermente troppo
   grosse»): 13.5px in page units, so 12.15px under the computer zoom. The bar has its own zoom (--mv-nav-zoom / --mv-zoom), cancelled here. The phone menu keeps 14px. */
@media (min-width: 769px) { html.mv-pub body .nav .nav-links a:not(.btn) { font-size: calc(13.5px * var(--mv-zoom, 1) / var(--mv-nav-zoom, 1)); } }
/* The PEC link under the address was a 16px-high target on a phone. */
html body .footer-provider a { display: inline-block; padding-block: .35rem; }

/* Home on a phone (owner, 2026-11-15): the bold closing line of the hero text goes, one line shorter. */
@media (max-width: 600px) { .shader-sub strong { display: none; } }
/* Bigger touch target for links inside running text (2026-11-15): vertical padding on an
   inline link does not move the line, so the text looks the same and a finger hits it. */
html body .wq-more, html body .form-privacy a, html body .legal-body a { padding-block: .45em; margin-block: -.45em; }

/* Page and section titles of the public pages in large EB Garamond, sentence case (owner, 2026-11-17: the way «Automatizzare il
   lavoro» reads on /services); Cinzel stays for the small labels, the nav, the wordmark and the card titles. The home keeps its own
   letter-by-letter title; the login keeps its size. */
html body.pub:not(.lg) h1:not(.shader-title),
html body.pub .sec-head h2 {
    font-family: "EB Garamond", Georgia, serif; font-weight: 400; text-transform: none; font-variant: normal;
    letter-spacing: -.01em; line-height: 1.08; text-wrap: balance;
    font-size: clamp(2.3rem, 1.6rem + 2.4vw, 3.6rem);
}
html body.pub .sec-head h2 { font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.8rem); }
/* The closing band («Avete un'idea? Parliamone.», «Questo servizio fa al caso vostro?») reads as a title too: same Garamond. */
html body.pub .cta-dark h2 {
    font-family: "EB Garamond", Georgia, serif; font-weight: 400; text-transform: none; font-variant: normal;
    letter-spacing: -.01em; line-height: 1.1; font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.8rem);
}
/* Step titles never break inside a word (it showed «Progetta-zione»). */
html body.pub .sd-step h3 { hyphens: manual; overflow-wrap: normal; word-break: normal; }
/* One key word of the four main page titles (owner, 2026-11-17, variant C): EB Garamond italic in the accent red.
   CJK scripts have no real italic: there the word is only red. Service pages keep plain titles. */
html body.pub:not(.lg) h1 em {
    font-family: "EB Garamond", Georgia, serif; font-style: italic; font-weight: 400; text-transform: none; letter-spacing: 0;
    color: var(--mv-accent-text);
}
html:lang(ja) body.pub h1 em, html:lang(ko) body.pub h1 em { font-style: normal; }

/* /models: the cursor light of a demo card takes the demo's own colour (--acc), as the service cards take their family's (owner, 2026-11-18). */
body.pub .panel-card.spotlight::after { background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--acc, var(--mv-accent)) 12%, transparent), transparent 60%); }
/* /contact, form card (shown up to 900px): «Messaggio diretto» at the form labels' size, not a section title (owner, 2026-11-18: «gigantesco»). */
html body.pub .contact-form-col h2 { font-size: 1rem; letter-spacing: .06em; margin-bottom: var(--space-3); }

/* Footer: small and low (owner, 2026-11-19: «le scritte sono troppo grosse… su mobile occupa metà finestra, non è più un footer ma una sezione enorme»).
   Measured before: 380px of an 844px phone (45%) and 271px of 900px on a computer (30%): 14px links and address, 48-104px of padding, the legal
   links stacked in a column on a phone. Now the legal links sit in one row, the type is .75-.8rem, the padding a fraction of it. Links keep a
   40px-high tap target (the row is that high); the bottom keeps room for the back-to-top arrow. */
html body.pub .footer .footer-inner { padding-top: var(--space-3); padding-bottom: calc(var(--space-2) + 2.75rem + env(safe-area-inset-bottom)); }
html body.pub .footer .footer-top { flex-direction: row; align-items: center; justify-content: space-between; gap: 0 var(--space-5); padding-bottom: 0; }
html body.pub .footer .footer-logo { font-size: 1rem; padding: 0; }
html body.pub .footer .footer-legal { flex-direction: row; gap: 0 var(--space-4); }
html body.pub .footer .footer-legal a { font-size: .75rem; letter-spacing: .02em; min-height: 40px; }
html body.pub .footer .footer-meta { padding-top: var(--space-1); gap: 0 var(--space-6); font-size: .8rem; line-height: 1.5; }
html body.pub .footer .footer-provider, html body.pub .footer .footer-provider a { font-size: .8rem; line-height: 1.5; }
html body.pub .footer .footer-provider a { padding-block: .25rem; }
@media (max-width: 640px) {
    html body.pub .footer .footer-top { flex-direction: column; align-items: flex-start; gap: 0; }
    html body.pub .footer .footer-logo { padding: .5rem 0 0; }
    html body.pub .footer .footer-legal { gap: 0 var(--space-3); }
    html body.pub .footer .footer-meta { flex-direction: column; }
}

/* Footer, second pass (owner, 2026-11-20): the wordmark and the copyright were too close to the hairline and to each other, the type too bright,
   and on a short page (403, 404) the footer rose into the middle of the screen. Now: more red above the wordmark, more air under the hairline,
   fainter type, and a page is at least a screen plus a footer tall, so the footer is always found by scrolling (the footer sits at the bottom of
   that height; a longer page is unaffected). The footer is a direct child of body on every public page. */
body.pub .footer { --text-3: #cdb2ac; --text-4: #b79c96; --white: #eadfd5; }
html body.pub .footer .footer-inner { padding-top: var(--space-10); padding-bottom: calc(var(--space-4) + 2.75rem + env(safe-area-inset-bottom)); }
html body.pub .footer .footer-top { padding-bottom: var(--space-4); }
html body.pub .footer .footer-meta { padding-top: var(--space-6); line-height: 1.65; }
body.pub { display: flex; flex-direction: column; min-height: calc(100vh / var(--mv-zoom, 1) + 13rem); min-height: calc(100dvh / var(--mv-zoom, 1) + 13rem); }
@media (max-width: 640px) {
    body.pub { min-height: calc(100vh / var(--mv-zoom, 1) + 17rem); min-height: calc(100dvh / var(--mv-zoom, 1) + 17rem); }
    html body.pub .footer .footer-inner { padding-top: var(--space-8); }
}
body.pub > .footer { margin-top: auto; }
