/* Ottica Kontact — layout: tavola ottotipica come apertura, poi colonne editoriali su carta fredda.
   Colori: carta fredda, inchiostro blu notte, "blu lente" come unico accento. */
:root {
  --paper: #f3f6f8;
  --surface: #ffffff;
  --ink: #0f1d2b;
  --muted: #4f5e6c;
  --line: #d3dce2;
  --lens: #3b659f;
  --lens-ink: #ffffff;
  --lens-soft: #e2ecf6;
  --ok: #1f7a4d;
  --closed: #9a3b2e;
  --plate: #ffffff;
  --foot-bg: #000000;
  --foot-fg: #f2f4f6;
  --brand-black: #000000;
  --on-black: #ffffff;
  --on-black-line: rgba(255,255,255,.18);

  --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --s-1: .8125rem; --s0: 1.0625rem; --s1: 1.25rem; --s2: 1.625rem; --s3: 2.25rem; --s4: 3.25rem;
  --wrap: 72rem;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0b131b; --surface: #101b25; --ink: #e6edf2; --muted: #95a5b3; --line: #233241;
    --lens: #82a8de; --lens-ink: #08121b; --lens-soft: #13263a; --ok: #5cc490; --closed: #e58a7a; --plate: #f2f5f7; --foot-bg: #000000; --foot-fg: #e6edf2;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0b131b; --surface: #101b25; --ink: #e6edf2; --muted: #95a5b3; --line: #233241;
  --lens: #82a8de; --lens-ink: #08121b; --lens-soft: #13263a; --ok: #5cc490; --closed: #e58a7a; --plate: #f2f5f7; --foot-bg: #000000; --foot-fg: #e6edf2;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 7.5rem; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 var(--s0)/1.6 var(--f-body);
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--lens); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--lens); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.1; text-wrap: balance; margin: 0; letter-spacing: -.01em; }
h2 { font-size: clamp(var(--s2), 4vw, var(--s3)); font-weight: 700; font-stretch: 112%; }
h3 { font-size: var(--s1); font-weight: 650; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.eyebrow { font: 500 var(--s-1)/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.skip { position: absolute; left: -999px; top: 0; background: var(--lens); color: var(--lens-ink); padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 16px; top: 16px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--brand-black); }
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: var(--brand-black); color: var(--on-black);
}
.site-header .wrap { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }
.brand { display: flex; align-items: baseline; gap: .55rem; color: var(--ink); text-decoration: none; }
.brand-mark { font: 800 1.6rem/1 var(--f-display); font-stretch: 125%; letter-spacing: .02em; }
.brand { align-items: center; gap: .2rem; padding-block: .25rem; }
.brand img { display: block; width: auto; }
.brand-icon { height: 40px; }
.brand-word { height: 54px; }
.footer-brand { display: flex; align-items: center; gap: .3rem; }
.footer-icon { height: 58px; width: auto; flex: none; }
.footer-logo { display: block; width: min(100%, 16rem); height: auto; }
@media (max-width: 420px) { .brand-icon { height: 30px; } .brand-word { height: 42px; } }
.brand-sub { font: 500 .72rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav a { color: var(--on-black); text-decoration: none; font-weight: 600; font-size: .98rem; }
.nav a:hover { color: #9fbde6; }
.nav .btn { color: #fff; background: #3b659f; border-color: #3b659f; }
.nav .btn:hover { color: #fff; background: #2f5486; }
.nav-toggle { display: none; background: none; border: 1px solid var(--on-black-line); color: var(--on-black); border-radius: 999px; padding: .45rem .9rem; font: 600 .9rem var(--f-body); cursor: pointer; }
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--brand-black); border-bottom: 1px solid var(--on-black-line); padding: .5rem var(--gutter-r) 1rem var(--gutter); display: none; }
  .nav.open { display: flex; }
  .nav a { padding: .8rem 0; border-top: 1px solid var(--on-black-line); }
  .nav .btn { margin-top: .75rem; justify-content: center; }
  .brand-sub { display: none; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .78rem 1.25rem; border-radius: 999px; font: 650 1rem/1 var(--f-body);
  text-decoration: none; border: 1.5px solid var(--lens); background: var(--lens); color: var(--lens-ink); cursor: pointer; transition: transform .15s, background .15s; }
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn svg { width: 1.05em; height: 1.05em; flex: none; }

/* Hero: tavola ottotipica */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(2.5rem, 6vw, 4.5rem); border-bottom: 1px solid var(--line); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero-copy { display: grid; gap: 1.4rem; min-width: 0; }
.hero h1 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); font-weight: 750; font-stretch: 108%; }
.hero h1 em { font-style: normal; color: var(--lens); }
.hero .lead { font-size: var(--s1); color: var(--muted); max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.status { display: inline-flex; align-items: center; gap: .6rem; font: 500 .9rem/1.3 var(--f-mono); color: var(--muted); }
.status .dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--muted); flex: none; }
.status[data-open="true"] .dot { background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 22%, transparent); }
.status[data-open="false"] .dot { background: var(--closed); }

.chart { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: clamp(1.25rem, 3vw, 2rem) clamp(1rem, 3vw, 2rem);
  display: grid; gap: .35rem; box-shadow: 0 1px 0 var(--line), 0 24px 48px -32px color-mix(in srgb, var(--ink) 40%, transparent); }
.chart-row { display: grid; grid-template-columns: 3rem 1fr 3rem; align-items: center; gap: .5rem; }
.chart-row .acuity { font: 500 .72rem/1 var(--f-mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.chart-row .acuity:last-child { text-align: right; }
.chart-row .letters { min-width: 0; text-align: center; font-family: var(--f-display); font-weight: 700; font-stretch: 125%; line-height: 1.05; letter-spacing: .28em; padding-left: .28em; white-space: nowrap; }
.chart-row .letters .ch { display: inline-block; will-change: filter;
  transition: filter var(--tout, 1.2s) cubic-bezier(.2,.7,.2,1), opacity var(--tout, 1.2s) ease, transform var(--tout, 1.2s) cubic-bezier(.2,.7,.2,1); }
.chart-row .letters .ch.blur { filter: blur(var(--b, 6px)); opacity: .28; transform: scale(1.06);
  transition-duration: var(--tin, .35s); transition-timing-function: ease-in; }
.chart-row:nth-child(1) .letters { font-size: clamp(4rem, 11vw, 6.5rem); letter-spacing: 0; padding-left: 0; }
.chart-row:nth-child(2) .letters { font-size: clamp(2.5rem, 6.5vw, 3.8rem); }
.chart-row:nth-child(3) .letters { font-size: clamp(1.7rem, 4.4vw, 2.5rem); }
.chart-row:nth-child(4) .letters { font-size: clamp(1.15rem, 2.8vw, 1.6rem); }
.chart-row:nth-child(5) .letters { font-size: clamp(.78rem, 1.7vw, 1rem); letter-spacing: .18em; }
.chart-row:nth-child(6) .letters { font-size: .66rem; letter-spacing: .16em; }
.chart-row:nth-child(7) .letters { font-size: .52rem; letter-spacing: .14em; }
.chart-row.line-red { border-top: 2px solid var(--closed); margin-top: .35rem; padding-top: .5rem; }
.chart figcaption { margin-top: .9rem; padding-top: .75rem; border-top: 1px solid var(--line); font: 500 .75rem/1.4 var(--f-mono); color: var(--muted); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
@keyframes focus-in { from { filter: blur(6px); opacity: .35; } to { filter: blur(0); opacity: 1; } }
.chart .letters { animation: focus-in .9s cubic-bezier(.2,.7,.2,1) both; }
.chart-row:nth-child(2) .letters { animation-delay: .08s; } .chart-row:nth-child(3) .letters { animation-delay: .16s; }
.chart-row:nth-child(4) .letters { animation-delay: .24s; } .chart-row:nth-child(5) .letters { animation-delay: .32s; }
.chart-row:nth-child(6) .letters { animation-delay: .4s; } .chart-row:nth-child(7) .letters { animation-delay: .48s; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .chart-row { grid-template-columns: 2.4rem 1fr 2.4rem; }
}

/* Sections */
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: grid; gap: .6rem; align-content: start; margin-bottom: clamp(1.75rem, 4vw, 2.75rem); max-width: 44rem; }
.section-head p { color: var(--muted); font-size: var(--s1); }

.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--ink); }
.service { padding: 1.5rem 1.5rem 1.75rem 0; border-bottom: 1px solid var(--line); display: grid; gap: .6rem; align-content: start; min-width: 0; }
.service:not(:nth-child(3n+1)) { padding-left: 1.5rem; border-left: 1px solid var(--line); }
.service svg { width: 2rem; height: 2rem; color: var(--lens); }
.service p { color: var(--muted); }
@media (max-width: 860px) {
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service:not(:nth-child(3n+1)) { padding-left: 0; border-left: 0; }
  .service:nth-child(even) { padding-left: 1.25rem; border-left: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .services { grid-template-columns: 1fr; }
  .service:nth-child(even) { padding-left: 0; border-left: 0; }
}

.about-section { padding-top: 0; }
.about-band { margin: 0 0 clamp(2.5rem, 6vw, 4rem); background: var(--brand-black); padding-block: clamp(2.5rem, 7vw, 5rem) clamp(1.5rem, 4vw, 2.5rem); }
.about-band .wrap { display: grid; justify-items: center; gap: clamp(1rem, 3vw, 1.75rem); text-align: center; }
.about-band img { width: min(100%, 52rem); height: auto; margin-inline: auto; }
.about-band figcaption { color: #fff; }
.about-band address { font: 500 clamp(1.05rem, 2.4vw, 1.35rem)/1.5 var(--f-body); font-style: normal; letter-spacing: .01em; }
.about { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(1.5rem, 4vw, 3.5rem) clamp(2rem, 5vw, 4rem); align-items: start; }
.about-head { display: grid; gap: .6rem; align-content: start; min-width: 0; }
.about-text { display: grid; gap: 1.1rem; max-width: 38rem; min-width: 0; }
.about-text p { font-size: 1.12rem; }
.about-text .signature { font: 500 .9rem/1.4 var(--f-mono); color: var(--muted); }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 2.5rem); counter-reset: none; }
.timeline li { display: grid; gap: .7rem; align-content: start; padding-top: 1.25rem; border-top: 3px solid var(--lens); min-width: 0; }
.timeline .when { font: 500 .8rem/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--lens); }
.timeline p { color: var(--muted); }
@media (max-width: 760px) { .timeline { grid-template-columns: 1fr; } }

/* Orari e dove */
.visit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.hours { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.hours th, .hours td { text-align: left; padding: .7rem .25rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.hours th { font-weight: 600; text-transform: capitalize; width: 34%; }
.hours td { font-family: var(--f-mono); font-size: .92rem; }
.hours tr.today th, .hours tr.today td { color: var(--lens); }
.hours tr.today th::after { content: " · oggi"; font: 500 .72rem var(--f-mono); letter-spacing: .06em; }
.hours td.closed { color: var(--muted); }
.contact-list { display: grid; gap: 1.1rem; margin: 0; }
.contact-list div { display: grid; gap: .15rem; }
.contact-list dt { font: 500 .75rem/1.2 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.contact-list dd { margin: 0; font-size: 1.12rem; }
.contact-list dd a { color: var(--ink); font-weight: 600; }
.map-box { margin-top: 1.75rem; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--surface); }
.map-box iframe { display: block; width: 100%; height: 320px; border: 0; }
.map-consent { padding: 1.5rem; display: grid; gap: .9rem; justify-items: start;
  background-image: repeating-linear-gradient(0deg, transparent 0 31px, var(--line) 31px 32px), repeating-linear-gradient(90deg, transparent 0 31px, var(--line) 31px 32px); background-color: var(--surface); }
.map-consent p { background: var(--surface); color: var(--muted); max-width: 30rem; padding: .25rem 0; }
.map-consent .row { display: flex; flex-wrap: wrap; gap: .6rem; }
@media (max-width: 860px) { .visit { grid-template-columns: 1fr; } }

/* Form */
.contact { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 4rem); }
.form { display: grid; gap: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: clamp(1.25rem, 3vw, 2rem); }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 600; font-size: .95rem; }
.field input, .field textarea { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: .7rem .8rem; width: 100%; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--lens); outline-offset: 0; border-color: var(--lens); }
.field textarea { min-height: 8rem; resize: vertical; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .95rem; color: var(--muted); }
.check input { margin-top: .3rem; width: 1.05rem; height: 1.05rem; accent-color: var(--lens); flex: none; }
.form-note { font-size: .88rem; color: var(--muted); }
.form-msg { font-size: .95rem; font-weight: 600; }
.form-msg[data-kind="error"] { color: var(--closed); }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .two { grid-template-columns: 1fr; } }

/* Partner */
.partner { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; padding-block: 2rem; }
.partner img { width: 12rem; height: auto; background: #fff; padding: .6rem .8rem; border-radius: 4px; }

/* Footer */
.site-footer { background: var(--foot-bg); color: var(--foot-fg); padding-block: 3rem 2rem; }
.site-footer a { color: inherit; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem; }
.footer-grid > * { min-width: 0; display: grid; gap: .45rem; align-content: start; }
.footer-grid h2 { font-size: .78rem; font-family: var(--f-mono); font-weight: 500; letter-spacing: .1em; text-transform: uppercase; opacity: .7; font-stretch: 100%; }
.footer-grid .brand-mark { font-size: 2rem; }
.footer-legal { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid color-mix(in srgb, var(--foot-fg) 22%, transparent);
  display: flex; flex-wrap: wrap; gap: 1.25rem 2rem; justify-content: space-between; align-items: center; font-size: .88rem; }
.footer-legal nav { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: .18em; cursor: pointer; }
.social { display: flex; gap: .75rem; }
.social a { display: inline-flex; width: 2.4rem; height: 2.4rem; align-items: center; justify-content: center; border: 1px solid color-mix(in srgb, var(--foot-fg) 30%, transparent); border-radius: 50%; }
.social svg { width: 1.1rem; height: 1.1rem; }
.legal-col { display: grid; gap: .5rem; align-content: center; }
.wdc { display: flex; align-items: center; gap: 12px; text-align: right; font-size: .875rem; line-height: 1.35; margin-left: auto; }
.wdc small { display: block; font-size: .72rem; font-weight: 600; letter-spacing: .04em; opacity: .8; }
.wd-name { text-decoration: none; }
.wd-name:hover b, .wd-name:focus-visible b { text-decoration: underline; text-underline-offset: 3px; }
.wd-role { opacity: .85; }
.wd-logo { display: block; flex: 0 0 auto; border-radius: 12px; transition: transform .2s; }
.wd-logo img { display: block; width: 56px; height: 56px; border-radius: 12px; }
.wd-logo:hover { transform: scale(1.06); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* Pagine legali */
.legal { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.legal .wrap { max-width: 48rem; }
.legal h1 { font-size: clamp(2.2rem, 6vw, 3.25rem); font-weight: 750; font-stretch: 112%; }
.legal .intro { margin-top: .9rem; font-size: var(--s1); color: var(--muted); }
.legal h2 { font-size: var(--s2); margin-top: 2.6rem; margin-bottom: .8rem; font-stretch: 105%; }
.legal p, .legal li { max-width: 65ch; }
.legal p + p { margin-top: .8rem; }
.legal ul { padding-left: 1.2rem; display: grid; gap: .5rem; margin: .6rem 0 0; }
.legal .updated { margin-top: 3rem; font: 500 .85rem var(--f-mono); color: var(--muted); }
.crumbs { font: 500 .8rem var(--f-mono); color: var(--muted); margin-bottom: 1.25rem; }
.crumbs a { color: var(--muted); }
.table-scroll { overflow-x: auto; margin-top: .8rem; border: 1px solid var(--line); border-radius: 6px; }
.table-scroll table { border-collapse: collapse; width: 100%; min-width: 34rem; font-size: .95rem; }
.table-scroll th, .table-scroll td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-scroll th { background: var(--lens-soft); font-weight: 650; }
.table-scroll tr:last-child td { border-bottom: 0; }
.table-scroll code { font-family: var(--f-mono); font-size: .88em; }

/* Banner e preferenze cookie */
.cc-banner { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0;
  padding: 1rem var(--gutter-r) calc(1rem + env(safe-area-inset-bottom, 0px)) var(--gutter);
  background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -18px 40px -24px color-mix(in srgb, var(--ink) 45%, transparent); }
.cc-inner { max-width: var(--wrap); margin-inline: auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem 2rem; align-items: center; position: relative; }
.cc-inner h2 { font-size: 1.1rem; font-stretch: 100%; margin-bottom: .3rem; }
.cc-inner p { color: var(--muted); font-size: .95rem; max-width: 60ch; }
.cc-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.cc-actions .btn { padding: .7rem 1.1rem; font-size: .95rem; }
.cc-close { position: absolute; top: -.35rem; right: -.25rem; background: none; border: 0; color: var(--muted); font-size: 1.5rem; line-height: 1; cursor: pointer; padding: .25rem .5rem; }
@media (max-width: 760px) { .cc-inner { grid-template-columns: 1fr; padding-right: 1.5rem; } .cc-actions .btn { flex: 1 1 auto; justify-content: center; } }
.cc-modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, var(--ink) 55%, transparent); }
.cc-panel { background: var(--surface); color: var(--ink); border-radius: 8px; width: min(36rem, 100%); max-height: calc(100% - 32px); overflow: auto; padding: clamp(1.25rem, 4vw, 2rem); display: grid; gap: 1rem; }
.cc-panel h2 { font-size: var(--s2); font-stretch: 105%; }
.cc-panel > p { color: var(--muted); }
.cc-cat { border: 1px solid var(--line); border-radius: 6px; padding: 1rem; display: grid; gap: .4rem; }
.cc-cat-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.cc-cat-head h3 { font-size: 1.05rem; font-stretch: 100%; }
.cc-cat p { color: var(--muted); font-size: .93rem; }
.cc-always { font: 500 .75rem var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ok); }
.switch { position: relative; width: 2.9rem; height: 1.6rem; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line); transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: .2rem; left: .2rem; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px color-mix(in srgb, var(--ink) 35%, transparent); transition: transform .2s; }
.switch input:checked + span { background: var(--lens); }
.switch input:checked + span::after { transform: translateX(1.3rem); }
.switch input:focus-visible + span { outline: 3px solid var(--lens); outline-offset: 2px; }
.cc-panel .cc-actions { justify-content: flex-end; }

.nw { white-space: nowrap; }


/* Tavola: righe e pulsante suoni */
.chart { position: relative; }
.chart-rows { display: grid; gap: .35rem; }
.sound-toggle { position: absolute; top: .7rem; right: .7rem; z-index: 2; display: inline-flex; align-items: center; gap: .4rem;
  padding: .4rem .7rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  font: 500 .72rem/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; transition: color .15s, border-color .15s, background .15s; }
.sound-toggle:hover { color: var(--ink); border-color: var(--ink); }
.sound-toggle svg { width: 1rem; height: 1rem; }
.sound-toggle .ico-on { display: none; }
.sound-toggle[aria-pressed="true"] { color: var(--lens-ink); background: var(--lens); border-color: var(--lens); }
.sound-toggle[aria-pressed="true"] .ico-on { display: block; }
.sound-toggle[aria-pressed="true"] .ico-off { display: none; }
@media (max-width: 560px) { .chart-rows { margin-top: 1.9rem; } }

body.has-cc-banner { padding-bottom: var(--cc-h, 0px); }

/* Sfondo animato con strumenti ottici */
.optics-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; display: block; }
main, .site-footer { position: relative; z-index: 1; }

/* Avviso: sito in allestimento (fascia che scorre) */
.notice { position: relative; background: #3b659f; color: #fff; }
.notice-inner { position: relative; display: flex; align-items: center; min-height: 2.6rem; }
.notice-static { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }
.notice-track { flex: 1 1 auto; min-width: 0; overflow: hidden; padding-block: .6rem;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 2.5rem, #000 calc(100% - 2.5rem), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 2.5rem, #000 calc(100% - 2.5rem), transparent 100%); }
.notice-run { display: flex; width: max-content; animation: notice-scroll 42s linear infinite; }
.notice:hover .notice-run, .notice:focus-within .notice-run { animation-play-state: paused; }
.notice-item { display: inline-flex; align-items: center; gap: .7rem; padding-right: 2.75rem; white-space: nowrap;
  font: 500 .8rem/1.2 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; }
.notice-item strong { font-weight: 600; }
.notice-dot { width: .5rem; height: .5rem; border-radius: 50%; background: #fff; flex: none; box-shadow: 0 0 0 2px rgba(255,255,255,.28); }
@keyframes notice-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
/* Movimento ridotto: testo fermo e leggibile al posto della fascia che scorre */
@media (prefers-reduced-motion: reduce) {
  .notice-track { display: none; }
  .notice-static { position: static !important; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; flex: 1 1 auto;
    padding: .6rem max(16px, env(safe-area-inset-right, 0px)) .6rem max(16px, env(safe-area-inset-left, 0px)); font-size: .95rem; line-height: 1.4; text-align: center; }
}
