/* Materie — design editoriale minimal */
:root {
  --bg: #f1efea; --bg2: #e8e5de; --paper: #f8f7f3; --ink: #121211; --ink2: #3a3935; --muted: #87847c;
  --line: rgba(18, 18, 17, .14); --line2: rgba(18, 18, 17, .07); --line3: rgba(18, 18, 17, .32);
  --green: #1c9c58; --yellow: #dc9c00; --red: #e4432c; --off: #cdc9bf;
  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --sans: 'Inter Tight', 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --pad: clamp(16px, 4vw, 48px);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0f0f0e; --bg2: #181816; --paper: #161614; --ink: #ecebe5; --ink2: #c7c5bd; --muted: #8a877f;
  --line: rgba(236, 235, 229, .14); --line2: rgba(236, 235, 229, .07); --line3: rgba(236, 235, 229, .32);
  --green: #3ccf7c; --yellow: #f2c23b; --red: #ff6a4d; --off: #3a3935;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --bg: #0f0f0e; --bg2: #181816; --paper: #161614; --ink: #ecebe5; --ink2: #c7c5bd; --muted: #8a877f;
    --line: rgba(236, 235, 229, .14); --line2: rgba(236, 235, 229, .07); --line3: rgba(236, 235, 229, .32);
    --green: #3ccf7c; --yellow: #f2c23b; --red: #ff6a4d; --off: #3a3935;
    color-scheme: dark;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
html.native-smooth { scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
[data-lenis-prevent] { overscroll-behavior: contain; }
html.noscroll { overflow: hidden; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.5;
  letter-spacing: -.005em; min-height: 100vh; -webkit-font-smoothing: antialiased; transition: background .5s var(--ease), color .5s var(--ease);
}
body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 400; opacity: .05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme="dark"] body::after { mix-blend-mode: screen; opacity: .04; }
::selection { background: var(--ink); color: var(--bg); }
h1, h2, h3 { font-weight: 400; margin: 0; }
p { margin: 0 0 .8em; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
b, strong { font-weight: 600; }
kbd { font-family: var(--mono); font-size: .72em; border: 1px solid var(--line); border-radius: 5px; padding: .05em .4em; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
small { font-size: .8em; }
.grow { flex: 1; min-width: 0; }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 .9em; display: flex; align-items: center; gap: .6em; flex-wrap: wrap; }
.eyebrow i, .idx { font-family: var(--mono); font-style: normal; font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.display { font-family: var(--serif); font-weight: 400; font-size: clamp(3rem, 8.4vw, 7.4rem); line-height: .92; letter-spacing: -.025em; margin: 0; }
.display.xl { font-size: clamp(3.6rem, 12.5vw, 11.5rem); line-height: .86; }
.display.md { font-size: clamp(2.4rem, 5vw, 4rem); }
.display em, .mood em, .obj-sentence em { font-style: italic; }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: var(--ink2); max-width: 46ch; line-height: 1.45; margin-top: 1.4em; }
.g-green { color: var(--green); } .g-yellow { color: var(--yellow); } .g-red { color: var(--red); } .g-off { color: var(--muted); }
.empty { font-family: var(--serif); font-size: 1.35rem; color: var(--muted); font-style: italic; padding: .6em 0; margin: 0; }
.empty.big { font-size: clamp(1.8rem, 4vw, 3rem); padding: 1em 0; }
.note { border-left: 2px solid var(--line3); padding: .4em 0 .4em 1em; }
.note.red { border-color: var(--red); } .note.green { border-color: var(--green); }

/* ---------- animazioni di ingresso ---------- */
.anim [data-reveal] { opacity: 0; transform: translateY(32px); transition: opacity 1s var(--ease) var(--d, 0ms), transform 1.2s var(--ease) var(--d, 0ms); }
.anim [data-reveal].is-in { opacity: 1; transform: none; }
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.w > span { display: inline-block; transition: transform 1.25s var(--ease) calc(var(--d, 0ms) + var(--i, 0) * 70ms); }
.anim [data-reveal]:not(.is-in) .w > span { transform: translateY(108%); }
.anim [data-reveal]:not(.is-in) .pbar i { transform: scaleX(0); }
.anim [data-reveal]:not(.is-in) .hbar { height: 0 !important; }
.anim [data-reveal]:not(.is-in) .draw { stroke-dashoffset: 1; }
.anim [data-reveal].is-in .bulb:not(.bulb-off) .glass, .anim [data-reveal].is-in .bulb:not(.bulb-off) .halo { animation: switch-on 1.4s steps(1) both; animation-delay: calc(var(--d, 0ms) + 250ms); }
@keyframes switch-on { 0% { opacity: .15; } 18% { opacity: 1; } 24% { opacity: .2; } 34% { opacity: 1; } 40% { opacity: .5; } 46%, 100% { opacity: 1; } }

/* ---------- controlli ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .5em; height: 40px; padding: 0 18px;
  border: 1px solid var(--line3); border-radius: 999px; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; isolation: isolate;
  transition: color .45s var(--ease), border-color .45s var(--ease), transform .2s var(--ease);
}
.btn::before { content: ''; position: absolute; inset: 0; background: var(--ink); transform: translateY(101%); border-radius: inherit; transition: transform .55s var(--ease); z-index: -1; }
.btn:hover { color: var(--bg); border-color: var(--ink); }
.btn:hover::before { transform: none; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .4; pointer-events: none; }
.btn.solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.solid::before { background: var(--ink2); }
.btn.danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 45%, transparent); }
.btn.danger::before { background: var(--red); }
.btn.danger:hover { color: #fff; border-color: var(--red); }
.btn.solid.danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn.big { height: 54px; padding: 0 26px; font-size: 16px; }
.btn.sm { height: 32px; padding: 0 13px; font-size: 12.5px; }
.btn .arr { transition: transform .5s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn kbd { color: inherit; border-color: currentColor; opacity: .6; }
.file-btn { cursor: pointer; }
.link { color: var(--ink); font-size: 14px; background-image: linear-gradient(currentColor, currentColor); background-size: 100% 1px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .5s var(--ease); padding-bottom: 1px; }
.link:hover { background-size: 0 1px; background-position: 100% 100%; }
.row { display: flex; gap: .6em; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; margin-top: 1em; }
.row.end { justify-content: flex-end; margin-top: 1em; }
.row.center { justify-content: center; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 1em; }
.stack.narrow { max-width: 560px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1em; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1em; }
input, select, textarea {
  font: inherit; color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 12px; padding: .75em .9em; width: 100%;
  outline: none; transition: border-color .3s var(--ease), background .3s var(--ease);
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); background: var(--paper); }
input:disabled { opacity: .55; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2.2em; }
select option { background: var(--bg); color: var(--ink); }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--ink); flex: none; padding: 0; }
input[type="range"] { padding: 0; border: 0; accent-color: var(--ink); background: none; }
label.fl { display: flex; flex-direction: column; gap: .45em; font-size: 12.5px; font-weight: 500; color: var(--ink2); }
label.fl .muted { font-weight: 400; }
label.inline { display: inline-flex; align-items: center; gap: .6em; font-size: 14px; }
.lbl { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink2); margin-bottom: .5em; }
input.mini, select.mini { width: 4.6em; padding: .4em .5em; text-align: center; display: inline-block; border-radius: 9px; }
select.mini { width: auto; padding-right: 2em; }
#tt-hours { width: auto; padding: .4em 2.2em .4em .8em; }
.tabs { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.tabs button { padding: .42em 1em; border-radius: 999px; font-size: 13px; color: var(--muted); position: relative; transition: color .3s, background .4s var(--ease); }
.tabs button:hover { color: var(--ink); }
.tabs button.on { background: var(--ink); color: var(--bg); }
.tabs.full { display: flex; }
.tabs.full button { flex: 1; }
.tabs.sm button { padding: .3em .8em; font-size: 12px; }
.curdot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: currentColor; margin-left: 6px; vertical-align: middle; }
.chips { display: flex; flex-wrap: wrap; gap: .4em; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: .3em .8em; font-size: 13px; transition: border-color .3s, background .3s; }
button.chip:hover { border-color: var(--ink); }
.switch { display: flex; align-items: center; gap: .8em; cursor: pointer; font-size: 14px; }
.switch input { display: none; }
.switch span { width: 38px; height: 22px; border-radius: 99px; border: 1px solid var(--line3); position: relative; transition: background .35s var(--ease), border-color .35s; flex: none; }
.switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--ink); transition: transform .45s var(--ease), background .3s; }
.switch input:checked + span { background: var(--ink); border-color: var(--ink); }
.switch input:checked + span::after { transform: translateX(16px); background: var(--bg); }
.pbar { display: block; height: 2px; background: var(--line); position: relative; overflow: hidden; margin: .6em 0; border-radius: 2px; }
.pbar i { position: absolute; inset: 0; background: var(--ink); transform-origin: left; transform: scaleX(var(--p)); transition: transform 1.4s var(--ease) calc(var(--d, 0ms) + 150ms); }
.pbar.green i { background: var(--green); } .pbar.yellow i { background: var(--yellow); } .pbar.red i { background: var(--red); }
.sbadge { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--sc, var(--line3)); color: var(--sc, var(--ink)); font-family: var(--mono); font-size: 9.5px; letter-spacing: 0; flex: none; text-transform: none; line-height: 1; }

/* ---------- lampadina ---------- */
.bulb { width: 48px; height: 74px; overflow: visible; --c: var(--off); }
.bulb-green { --c: var(--green); } .bulb-yellow { --c: var(--yellow); } .bulb-red { --c: var(--red); }
.bulb .halo { fill: var(--c); opacity: 0; filter: blur(9px); transition: opacity .6s var(--ease), transform .8s var(--ease); transform-origin: 24px 22px; }
.bulb .glass { fill: transparent; stroke: var(--ink); stroke-width: 1.2; transition: fill .5s var(--ease); }
.bulb .fil, .bulb .base, .bulb .tip { fill: none; stroke: var(--ink); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.bulb:not(.bulb-off) .glass { fill: var(--c); stroke: color-mix(in srgb, var(--c) 70%, var(--ink)); }
.bulb:not(.bulb-off) .halo { opacity: .55; }
.bulb:not(.bulb-off) .fil { stroke: rgba(255, 255, 255, .92); }
.bulb-off .glass, .bulb-off .fil, .bulb-off .base, .bulb-off .tip { stroke: var(--muted); }
.seq .glass, .seq .halo { animation: switch-on 1.6s steps(1) both; }
.seq.s2 .glass, .seq.s2 .halo { animation-delay: .5s; }
.seq.s3 .glass, .seq.s3 .halo { animation-delay: 1s; }

/* ---------- header e navigazione ---------- */
.hdr { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 2em; height: 64px; padding: 0 var(--pad); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line2); }
.brand { display: inline-flex; align-items: center; gap: .45em; font-family: var(--serif); font-size: 27px; letter-spacing: -.02em; line-height: 1; }
.brand-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--off); margin-top: 3px; }
.brand-dot.st-green { background: var(--green); box-shadow: 0 0 10px var(--green); }
.brand-dot.st-yellow { background: var(--yellow); box-shadow: 0 0 10px var(--yellow); }
.brand-dot.st-red { background: var(--red); box-shadow: 0 0 10px var(--red); }
.hnav { display: flex; gap: 1.35em; margin: 0 auto; }
.hnav a { position: relative; font-size: 13px; color: var(--muted); transition: color .3s; padding: 4px 0; }
.hnav a i { font-family: var(--mono); font-style: normal; font-size: 9px; vertical-align: super; margin-right: 3px; opacity: .7; }
.hnav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease); }
.hnav a:hover, .hnav a.on { color: var(--ink); }
.hnav a:hover::after, .hnav a.on::after { transform: scaleX(1); transform-origin: left; }
.hright { display: flex; align-items: center; gap: .7em; margin-left: auto; }
.hnav + .hright { margin-left: 0; }
.mini-pomo { white-space: nowrap; display: inline-flex; align-items: center; gap: .5em; font-family: var(--mono); font-size: 12px; border: 1px solid var(--line); border-radius: 999px; padding: .35em .8em; }
.mini-pomo i { width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: pulse 1.6s ease-in-out infinite; }
.mini-pomo i.green { background: var(--green); }
@keyframes pulse { 50% { opacity: .3; } }
.kbd-btn { display: inline-flex; align-items: center; gap: .6em; font-size: 13px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: .35em .5em .35em .9em; transition: color .3s, border-color .3s; }
.kbd-btn:hover { color: var(--ink); border-color: var(--line3); }
.menu-btn { display: none; align-items: center; gap: .6em; font-size: 14px; }
.menu-btn i { width: 18px; height: 7px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.menu-ov { position: fixed; inset: 0; z-index: 90; background: var(--ink); color: var(--bg); display: flex; flex-direction: column; padding: 0 var(--pad) 32px; clip-path: inset(0 0 100% 0); transition: clip-path .8s var(--ease); }
.menu-ov.in { clip-path: inset(0 0 0 0); }
.menu-ov .menu-top { display: flex; justify-content: space-between; align-items: center; height: 64px; }
.menu-ov .btn { color: var(--bg); border-color: color-mix(in srgb, var(--bg) 35%, transparent); }
.menu-ov .btn::before { background: var(--bg); }
.menu-ov .btn:hover { color: var(--ink); }
.menu-ov nav { display: flex; flex-direction: column; margin: auto 0; }
.menu-ov nav a { display: flex; align-items: baseline; gap: .5em; font-family: var(--serif); font-size: clamp(2.6rem, 8.6vh, 5.5rem); line-height: 1.02; letter-spacing: -.02em; overflow: hidden; opacity: .55; transition: opacity .3s; }
.menu-ov nav a span { display: inline-block; transform: translateY(105%); transition: transform .9s var(--ease) calc(.15s + var(--i) * 45ms); }
.menu-ov.in nav a span { transform: none; }
.menu-ov nav a i { font-family: var(--mono); font-style: normal; font-size: 11px; opacity: .6; }
.menu-ov nav a.on, .menu-ov nav a:hover { opacity: 1; }
.menu-ov nav a:hover span { font-style: italic; }
.menu-foot { display: flex; justify-content: space-between; }
.menu-foot .link { color: var(--bg); }
.main { max-width: 1360px; margin: 0 auto; padding: 0 var(--pad); }

/* ---------- sezioni ---------- */
.page-h { padding: clamp(48px, 11vh, 120px) 0 clamp(28px, 5vh, 56px); }
.page-h .row { margin-top: 2em; }
.sec { padding: clamp(28px, 4.5vw, 56px) 0; border-top: 1px solid var(--line); }
.sec-h { display: grid; grid-template-columns: 70px 1fr auto; align-items: baseline; gap: 1em; margin-bottom: 1.6em; }
.sec-h h2 { font-family: var(--serif); font-size: clamp(1.9rem, 3.4vw, 3rem); line-height: 1; letter-spacing: -.02em; }
.sec-h h2 .muted { font-style: italic; }
.sec-actions { display: flex; gap: .5em; flex-wrap: wrap; justify-content: flex-end; }
.sec.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 80px); }
.kv { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2em 1.6em; margin: 0; }
.kv.three { grid-template-columns: repeat(3, 1fr); }
.kv > div { border-top: 1px solid var(--line); padding-top: .8em; min-width: 0; }
.kv > div.cur { border-top-color: var(--ink); }
.kv dt { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: .3em; }
.kv dd { margin: 0; font-family: var(--serif); font-size: clamp(1.9rem, 3vw, 2.6rem); line-height: 1; letter-spacing: -.02em; }
.kv dd small { font-family: var(--sans); font-size: .4em; color: var(--muted); letter-spacing: 0; margin-left: .15em; }
.kv dd.small-dd { font-size: 1.5rem; }
.kv.big dd { font-size: clamp(2.6rem, 5vw, 4.4rem); }
.kv .pbar { margin-top: .7em; }

/* ---------- dashboard ---------- */
.intro { padding: clamp(40px, 9vh, 100px) 0 clamp(24px, 4vh, 40px); }
.hero { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(24px, 5vw, 80px); border-top: 1px solid var(--line); padding: clamp(28px, 4vw, 48px) 0; align-items: end; }
.giant { font-family: var(--serif); font-size: clamp(7rem, 21vw, 17rem); line-height: .78; letter-spacing: -.05em; font-variant-numeric: tabular-nums; margin-left: -.04em; }
.giant small { font-size: .3em; letter-spacing: 0; margin-left: .1em; color: var(--muted); }
.dotline { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 1.6em; }
.dotline i { width: 11px; height: 11px; border-radius: 50%; border: 1px solid var(--line3); }
.dotline .st-green { background: var(--green); border-color: var(--green); box-shadow: 0 0 8px color-mix(in srgb, var(--green) 70%, transparent); }
.dotline .st-yellow { background: var(--yellow); border-color: var(--yellow); box-shadow: 0 0 8px color-mix(in srgb, var(--yellow) 70%, transparent); }
.dotline .st-red { background: var(--red); border-color: var(--red); box-shadow: 0 0 8px color-mix(in srgb, var(--red) 70%, transparent); }
.hero-side { display: flex; flex-direction: column; gap: 1.4em; align-items: flex-start; }
.counts-line { display: flex; gap: 1.2em; flex-wrap: wrap; margin: 0; font-size: 14px; color: var(--muted); }
.counts-line b { font-family: var(--serif); font-weight: 400; font-size: 2.1rem; color: var(--ink); margin-right: .1em; letter-spacing: -.02em; }
.counts-line > span::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: .5em; vertical-align: middle; background: var(--off); }
.counts-line .c-green::before { background: var(--green); } .counts-line .c-yellow::before { background: var(--yellow); } .counts-line .c-red::before { background: var(--red); }
.mood { font-family: var(--serif); font-size: clamp(1.5rem, 2.4vw, 2.1rem); line-height: 1.12; letter-spacing: -.01em; margin: 0; max-width: 22ch; }
.hero .kv { width: 100%; grid-template-columns: repeat(4, 1fr); }
.hero .kv dd { font-size: 1.9rem; }
.marquee { border-top: 1px solid var(--line); overflow: hidden; padding: 16px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.mq-track { display: flex; align-items: center; gap: 2.2em; width: max-content; animation: marquee 42s linear infinite; }
.marquee:hover .mq-track { animation-play-state: paused; }
.mq-track button { font-family: var(--serif); font-size: clamp(1.4rem, 2.4vw, 2rem); white-space: nowrap; letter-spacing: -.01em; }
.mq-track button b { font-weight: 400; }
.mq-track button em { color: var(--muted); }
.mq-track button:hover b { font-style: italic; }
.mq-track .star { color: var(--muted); font-size: 1rem; }
@keyframes marquee { to { transform: translateX(-50%); } }
.overview { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.ov-col { padding: 22px 22px 28px 0; border-right: 1px solid var(--line2); min-width: 0; }
.ov-col + .ov-col { padding-left: 22px; }
.ov-col:last-child { border-right: 0; padding-right: 0; }
.mini-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.mini-list li { display: flex; align-items: center; gap: .7em; padding: .55em 0; border-bottom: 1px solid var(--line2); font-size: 14px; min-width: 0; }
.mini-list li:last-child { border-bottom: 0; }
.mini-list li[role="button"] { cursor: pointer; transition: padding .4s var(--ease); }
.mini-list li[role="button"]:hover { padding-left: 6px; }
.mini-list li > span { display: flex; flex-direction: column; min-width: 0; }
.mini-list li b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-list li small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-list li > i { font-family: var(--mono); font-style: normal; font-size: 11px; color: var(--muted); min-width: 3.2em; }
.obj-mini { font-family: var(--serif); font-size: 1.35rem; line-height: 1.15; margin-bottom: .3em; }
.obj-mini b { font-weight: 400; font-style: italic; }

.bulbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.bcell { position: relative; display: flex; flex-direction: column; min-height: 310px; padding: 16px 18px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer; text-align: left; transition: background .5s var(--ease); outline: none; }
.bcell:hover, .bcell:focus-visible { background: var(--paper); }
.bc-top { display: flex; justify-content: space-between; align-items: center; min-height: 20px; }
.bc-ev { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--red); }
.bc-bulb { flex: 1; display: grid; place-items: center; padding: 14px 0; }
.bc-bulb .bulb { width: 54px; height: 83px; transition: transform .8s var(--ease); }
.bcell:hover .bc-bulb .bulb { transform: translateY(-6px) rotate(-3deg); }
.bcell:hover .bulb .halo { transform: scale(1.35); opacity: .75; }
.bc-name { display: flex; align-items: center; gap: .55em; font-size: 15px; font-weight: 500; line-height: 1.2; min-width: 0; }
.bc-name span { overflow-wrap: anywhere; }
.bc-name small { font-weight: 400; color: var(--muted); font-size: 11px; white-space: nowrap; }
.bc-row { display: flex; align-items: baseline; justify-content: space-between; gap: .8em; margin-top: .35em; }
.bc-avg { font-family: var(--serif); font-size: 3rem; line-height: 1; letter-spacing: -.03em; }
.st-off .bc-avg { color: var(--muted); }
.bc-hint { font-size: 12.5px; color: var(--muted); text-align: right; line-height: 1.3; }
.st-red .bc-hint { color: var(--red); }
.bcell .pbar { margin: .8em 0 0; }
.bcell.add { align-items: center; justify-content: center; gap: .4em; color: var(--muted); font-size: 14px; }
.bcell.add .plus { font-family: var(--serif); font-size: 4rem; line-height: 1; transition: transform .8s var(--ease); }
.bcell.add:hover .plus { transform: rotate(90deg); color: var(--ink); }
.editing .bcell:not(.add) { background: var(--paper); }
.edit-tools { position: absolute; inset: 12px 12px auto; display: flex; gap: 4px; justify-content: space-between; z-index: 2; }
.edit-tools button { font-size: 11px; border: 1px solid var(--line3); border-radius: 999px; padding: 2px 9px; background: var(--bg); }
.edit-tools button:hover { background: var(--ink); color: var(--bg); }
.edit-tools button:disabled { opacity: .25; pointer-events: none; }
.edit-tools .del { color: var(--red); border-color: var(--red); }
.fab { position: fixed; right: var(--pad); bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 25; display: inline-flex; align-items: center; gap: .4em; height: 56px; padding: 0 26px 0 20px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 15px; font-weight: 500; box-shadow: 0 14px 40px rgba(0, 0, 0, .18); transition: transform .5s var(--ease); }
.fab .plus { font-family: var(--serif); font-size: 1.9rem; line-height: 1; transition: transform .6s var(--ease); }
.fab:hover { transform: translateY(-3px); }
.fab:hover .plus { transform: rotate(90deg); }

/* ---------- footer ---------- */
.foot { margin-top: clamp(60px, 14vh, 160px); border-top: 1px solid var(--line); overflow: hidden; }
.foot-row { display: flex; justify-content: space-between; gap: 1em; flex-wrap: wrap; padding: 14px 0; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.foot-row .link { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.foot-word { font-family: var(--serif); font-size: 27vw; line-height: .74; letter-spacing: -.055em; text-align: center; margin: 0 -.03em -.02em; user-select: none; padding-bottom: 2vw; }

/* ---------- modali ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(10, 10, 9, 0); transition: background .6s var(--ease); }
.modal-wrap.in { background: rgba(10, 10, 9, .42); }
.modal { position: relative; width: 100%; max-width: 540px; max-height: calc(100vh - 32px); background: var(--bg); border-radius: 20px; display: flex; flex-direction: column; overflow: hidden; opacity: 0; transform: translateY(24px) scale(.985); transition: opacity .5s var(--ease), transform .7s var(--ease); box-shadow: 0 30px 90px rgba(0, 0, 0, .25); }
.modal-wrap.in .modal { opacity: 1; transform: none; }
.modal-body { overflow-y: auto; padding: 30px 30px 26px; }
.modal .x { position: absolute; top: 16px; right: 16px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); z-index: 3; background: var(--bg); transition: transform .6s var(--ease), border-color .3s; }
.modal .x:hover { transform: rotate(90deg); border-color: var(--ink); }
.modal .x span { position: absolute; left: 11px; right: 11px; top: 50%; height: 1px; background: var(--ink); transform: rotate(45deg); }
.modal .x span + span { transform: rotate(-45deg); }
.d-title { font-family: var(--serif); font-size: clamp(2.1rem, 4vw, 2.9rem); line-height: 1; letter-spacing: -.02em; margin: 0 2.2em .6em 0; }
.kind-drawer { justify-content: flex-end; padding: 0; align-items: stretch; }
.kind-drawer .modal { max-width: 760px; max-height: none; height: 100%; border-radius: 0; transform: translateX(100%); opacity: 1; transition: transform .8s var(--ease); }
.kind-drawer.in .modal { transform: none; }
.kind-drawer .modal-body { padding: 34px clamp(20px, 4vw, 44px) 60px; }
.kind-palette { align-items: flex-start; padding-top: 12vh; }
.kind-palette .modal { max-width: 640px; }
.kind-palette .modal-body { padding: 0; }
.pal-in { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; font-family: var(--serif); font-size: 1.9rem; padding: 22px 26px; background: transparent !important; }
.pal-list { list-style: none; margin: 0; padding: 8px; max-height: 52vh; overflow-y: auto; }
.pal-list li { display: flex; justify-content: space-between; align-items: center; gap: 1em; padding: 11px 16px; border-radius: 12px; cursor: pointer; font-size: 15px; }
.pal-list li small { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.pal-list li.sel, .pal-list li:hover { background: var(--ink); color: var(--bg); }
.pal-list li.sel small, .pal-list li:hover small { color: inherit; opacity: .6; }
@media (max-width: 700px) {
  .modal-wrap:not(.kind-palette) { align-items: flex-end; padding: 0; }
  .modal-wrap:not(.kind-palette) .modal { max-width: none; border-radius: 22px 22px 0 0; max-height: 94vh; transform: translateY(100%); opacity: 1; transition: transform .7s var(--ease); }
  .modal-wrap.in:not(.kind-palette) .modal { transform: none; }
  .kind-drawer .modal { height: 94vh; }
  .modal-body { padding: 26px 20px calc(26px + env(safe-area-inset-bottom)); }
}

/* ---------- materia ---------- */
.subj-head { display: grid; grid-template-columns: auto 1fr auto; gap: 1.4em; align-items: end; padding-right: 3em; margin-bottom: 1.4em; }
.sh-bulb .bulb { width: 52px; height: 80px; }
.subj-head .d-title { margin: 0 0 .4em; }
.subj-head .eyebrow { margin-bottom: .8em; }
.big-avg { text-align: right; display: flex; flex-direction: column; }
.big-avg b { font-family: var(--serif); font-weight: 400; font-size: clamp(3.4rem, 7vw, 5rem); line-height: .85; letter-spacing: -.04em; }
.big-avg small { color: var(--muted); font-family: var(--mono); font-size: 11px; margin-top: .5em; }
.subj-head.st-green .big-avg b { color: var(--green); } .subj-head.st-yellow .big-avg b { color: var(--yellow); } .subj-head.st-red .big-avg b { color: var(--red); } .subj-head.st-off .big-avg b { color: var(--muted); }
.actions { margin-bottom: 1.6em; }
.dtabs { display: flex; gap: 1.4em; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.dtabs button { position: relative; padding: .8em 0; font-size: 14px; color: var(--muted); white-space: nowrap; transition: color .3s; }
.dtabs button sup { font-family: var(--mono); font-size: 9px; margin-left: 3px; }
.dtabs button::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.dtabs button.on { color: var(--ink); }
.dtabs button.on::after { transform: scaleX(1); }
.dtab-body { animation: fade-up .6s var(--ease); }
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } }
.d-sec { padding: 26px 0 8px; }
.d-sec + .d-sec { border-top: 1px solid var(--line2); }
.d-sec .row.between { margin-top: 0; margin-bottom: .8em; }
.d-sec .row.between .eyebrow { margin: 0; }
.chips-row { display: flex; gap: .6em; overflow-x: auto; padding-top: 1em; scrollbar-width: none; }
.ev-chip { flex: none; display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: .1em; border: 1px solid var(--line); border-radius: 14px; padding: .7em 1em; min-width: 190px; max-width: 260px; transition: border-color .3s; }
.ev-chip:hover { border-color: var(--ink); }
.ev-chip .eyebrow { margin: 0; }
.ev-chip.soon .eyebrow { color: var(--red); }
.ev-chip b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ev-chip small { color: var(--muted); }
.calc-main { font-family: var(--serif); font-size: clamp(1.45rem, 2.4vw, 1.9rem); line-height: 1.18; letter-spacing: -.01em; }
.calc-main b { font-weight: 400; font-style: italic; }
.calc-tools { margin-top: 1.4em; border-top: 1px dashed var(--line); padding-top: 1.2em; display: flex; flex-direction: column; gap: .8em; }
.calc-row { display: flex; align-items: center; gap: .5em; flex-wrap: wrap; font-size: 14px; }
.calc-row output { font-weight: 500; margin-left: .2em; }
.kv.four { grid-template-columns: repeat(4, 1fr); }
.grades { list-style: none; margin: 0; padding: 0; }
.grades li { display: flex; align-items: center; gap: 1em; padding: .75em .2em; border-bottom: 1px solid var(--line2); cursor: pointer; transition: padding .4s var(--ease), background .3s; }
.grades li:hover { padding-left: .7em; background: var(--paper); }
.gv { font-family: var(--serif); font-size: 2rem; min-width: 2em; line-height: 1; }
.gi { flex: 1; font-size: 13.5px; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gi b { color: var(--ink); font-weight: 500; }
.gd { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.check-list { list-style: none; margin: 1em 0 0; padding: 0; }
.check-list li { display: flex; align-items: center; gap: 1em; padding: .65em 0; border-bottom: 1px solid var(--line2); }
.check-list label { display: flex; align-items: center; gap: .8em; flex: 1; cursor: pointer; font-size: 15px; }
.check-list li.done label span { text-decoration: line-through; color: var(--muted); }
.check-list .link, .card-list .link { font-size: 12px; color: var(--muted); }
.add-row { margin: 1em 0; }
.notes { min-height: 52vh; font-size: 16px; line-height: 1.65; border-radius: 14px; background: var(--paper); border-color: transparent; padding: 1.2em 1.3em; }
.card-form { margin-bottom: 1.4em; }
.card-list { list-style: none; margin: 0; padding: 0; }
.card-list li { display: flex; align-items: center; gap: 1em; padding: .8em 0; border-bottom: 1px solid var(--line2); }
.card-list li > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.card-list li b { font-weight: 500; }
.boxes { display: flex; gap: 3px; }
.boxes i { width: 6px; height: 6px; border-radius: 50%; border: 1px solid var(--line3); }
.boxes i.on { background: var(--ink); border-color: var(--ink); }
.grade-input { position: relative; }
.grade-input input { font-family: var(--serif); font-size: 2.4rem; padding: .25em .5em; padding-right: 6em; letter-spacing: -.02em; }
.grade-input output { position: absolute; right: 1em; top: 50%; transform: translateY(-50%); font-family: var(--mono); font-size: 12px; }
.pick-chips .chip { min-width: 2.8em; text-align: center; }
.icon-pick, .color-pick { display: flex; flex-wrap: wrap; gap: .35em; }
.icon-pick button { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); font-size: 1rem; transition: border-color .3s; }
.icon-pick button.auto, .color-pick button.auto { width: auto; padding: 0 .8em; font-size: 12px; color: var(--muted); border-radius: 999px; }
.icon-pick button.on, .color-pick button.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.color-pick button { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--c); }

/* ---------- grafici ---------- */
.chart { width: 100%; height: 200px; display: block; overflow: visible; }
.chart .grid { stroke: var(--line2); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 10.5px; font-family: var(--mono); }
.chart .target { stroke: var(--green); stroke-width: 1; stroke-dasharray: 4 5; }
.chart .gline { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart .aline { fill: none; stroke: var(--muted); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.chart .draw { stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 2s var(--ease) calc(var(--d, 0ms) + 200ms); }
.chart .dot { stroke: var(--bg); stroke-width: 2; }
.dot-green { fill: var(--green); } .dot-yellow { fill: var(--yellow); } .dot-red { fill: var(--red); } .dot-off { fill: var(--muted); }
.legend { display: flex; gap: 1.4em; font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-top: .6em; flex-wrap: wrap; }
.lgd { display: inline-block; width: 16px; height: 1px; vertical-align: middle; margin-right: .5em; }
.lgd-g { background: var(--ink); height: 2px; } .lgd-a { background: var(--muted); } .lgd-t { background: var(--green); }
.hist { display: flex; align-items: flex-end; gap: .5em; height: 170px; padding-top: 1.4em; }
.hb { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; gap: .4em; }
.hbar { width: 100%; max-width: 34px; min-height: 1px; height: var(--h); position: relative; background: var(--ink); transition: height 1.2s var(--ease) calc(var(--d, 0ms) + 200ms); }
.hbar.st-green { background: var(--green); } .hbar.st-yellow { background: var(--yellow); } .hbar.st-red { background: var(--red); }
.hbar em { position: absolute; top: -1.5em; left: 0; right: 0; text-align: center; font-style: normal; font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.hb small { color: var(--muted); font-family: var(--mono); font-size: 10.5px; }
.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5em; }
.bars li { display: grid; grid-template-columns: minmax(100px, 32%) 1fr auto; gap: 1em; align-items: center; font-size: 14px; }
.bars li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars li b { font-family: var(--mono); font-weight: 400; font-size: 12px; color: var(--muted); }
.bars .pbar { margin: 0; }

/* ---------- liste (agenda, assenze) ---------- */
.ev-list { list-style: none; margin: 0; padding: 0; }
.ev-row { display: flex; align-items: center; gap: 1.2em; padding: 1em 0; border-bottom: 1px solid var(--line2); }
.ev-row:last-child { border-bottom: 0; }
.ev-date { display: flex; flex-direction: column; align-items: flex-start; min-width: 4.5em; }
.ev-date b { font-family: var(--serif); font-weight: 400; font-size: 2.3rem; line-height: .9; }
.ev-date small { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; color: var(--muted); }
.ev-row .grow { cursor: pointer; display: flex; flex-direction: column; transition: transform .4s var(--ease); }
.ev-row .grow:hover { transform: translateX(6px); }
.ev-row .grow b { font-weight: 500; font-size: 16px; }
.ev-row .grow small { color: var(--muted); }
.ev-list.done .grow b { text-decoration: line-through; color: var(--muted); }
.need { font-family: var(--mono); font-size: 11px; border: 1px solid currentColor; border-radius: 999px; padding: .2em .7em; white-space: nowrap; }
details > summary { cursor: pointer; font-family: var(--serif); font-size: 1.7rem; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: '+'; display: inline-block; width: 1em; transition: transform .5s var(--ease); }
details[open] > summary::before { transform: rotate(45deg); }
details[open] > summary { margin-bottom: .6em; }
.abs-hero { display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 6vw, 96px); align-items: end; }
.abs-hero .giant { font-size: clamp(6rem, 15vw, 12rem); }
.abs-hero .giant.st-green span { color: var(--green); } .abs-hero .giant.st-yellow span { color: var(--yellow); } .abs-hero .giant.st-red span { color: var(--red); }
.abs-bar .pbar { height: 4px; }
.abs-bar .kv { margin-top: 1.4em; }

/* ---------- orario ---------- */
.tt-wrap { overflow-x: auto; margin-top: 1.4em; }
.tt { width: 100%; border-collapse: collapse; min-width: 640px; table-layout: fixed; }
.tt th { font-family: var(--mono); font-weight: 400; font-size: 11px; text-transform: uppercase; color: var(--muted); padding: 10px 6px; text-align: left; }
.tt thead th.today { color: var(--ink); }
.tt thead th:first-child, .tt tbody th { width: 46px; }
.tt td { border: 1px solid var(--line2); padding: 0; height: 66px; }
.tt td.today { background: color-mix(in srgb, var(--ink) 3%, transparent); }
.tt-cell { width: 100%; height: 100%; display: flex; align-items: center; gap: .55em; padding: 8px 10px; text-align: left; font-size: 13px; line-height: 1.15; transition: background .35s var(--ease); }
.tt-cell:hover { background: var(--paper); }
.tt-cell.full { box-shadow: inset 2px 0 0 var(--sc); }
.tt-cell span:not(.sbadge) { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tt-cell .plus { color: var(--line3); font-size: 1.2rem; margin: auto; transition: color .3s; }
.tt-cell:hover .plus { color: var(--ink); }
.pick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: .6em; }
.pick-btn { display: flex; align-items: center; gap: .6em; text-align: left; border: 1px solid var(--line); border-radius: 12px; padding: .65em .8em; font-size: 14px; transition: border-color .3s, background .3s; }
.pick-btn:hover { border-color: var(--ink); }
.pick-btn.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- pomodoro ---------- */
.pomo-layout { display: grid; grid-template-columns: minmax(320px, 1.05fr) 1fr; gap: clamp(24px, 5vw, 72px); align-items: start; border-top: 1px solid var(--line); padding-top: clamp(24px, 4vw, 48px); }
.pomo-card { display: flex; flex-direction: column; gap: 1.4em; }
.pomo-clock { position: relative; width: min(300px, 78vw); aspect-ratio: 1; margin: .5em auto; }
.pomo-clock .ring { width: 100%; height: 100%; }
.ring .ring-bg { fill: none; stroke: var(--line); }
.ring .ring-fg { fill: none; stroke: var(--ink); stroke-linecap: round; transition: stroke-dashoffset .5s linear; }
.mode-focus .ring-fg { stroke: var(--red); }
.mode-short .ring-fg, .mode-long .ring-fg { stroke: var(--green); }
.pomo-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.pomo-center b { font-family: var(--serif); font-weight: 400; font-size: clamp(4.2rem, 9vw, 6rem); font-variant-numeric: tabular-nums; letter-spacing: -.03em; line-height: 1; }
.pomo-center small { font-family: var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-size: 10.5px; margin-top: .8em; }
.pomo-subj { max-width: 380px; width: 100%; margin: 0 auto; }
.cycle-dots { display: flex; align-items: center; justify-content: center; gap: .45em; }
.cycle-dots i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--line3); }
.cycle-dots i.on { background: var(--red); border-color: var(--red); }
.cycle-dots small { color: var(--muted); margin-left: .6em; font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; }
.ambient { border-top: 1px solid var(--line); padding-top: 1.2em; display: flex; flex-direction: column; gap: .8em; }
.ambient .eyebrow { margin: 0; }
.pomo-settings { border-top: 1px solid var(--line); padding-top: 1em; }
.pomo-settings summary { font-size: 1.3rem; }
.pomo-side .sec:first-child { border-top: 0; padding-top: 0; }
.goal-line { font-family: var(--serif); font-size: 2rem; margin: 0; }
.goal-line b { font-weight: 400; }
.focus-ov { position: fixed; inset: 0; z-index: 300; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.2em; padding: 24px; opacity: 0; transition: opacity .6s var(--ease); }
.focus-ov.in { opacity: 1; }
.focus-ov b { font-family: var(--serif); font-weight: 400; font-size: clamp(6rem, 24vw, 22rem); line-height: .85; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.focus-ov p { margin: 0; font-size: 1.1rem; }
.focus-line { width: min(60vw, 560px); height: 2px; background: var(--line); position: relative; overflow: hidden; }
.focus-line i { position: absolute; inset: 0; background: var(--ink); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform .5s linear; }

/* ---------- ripasso ---------- */
.rv .pbar { margin: 0 0 2em; }
.flash { display: block; position: relative; width: 100%; max-width: 760px; min-height: 340px; margin: 0 auto 1.6em; perspective: 1400px; animation: card-in .8s var(--ease); }
@keyframes card-in { from { opacity: 0; transform: translateY(30px) rotate(-1deg); } }
.flash .face { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1em; padding: 32px; border: 1px solid var(--line); border-radius: 24px; background: var(--paper); backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .9s var(--ease); text-align: center; }
.flash .face b { font-family: var(--serif); font-weight: 400; font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.1; letter-spacing: -.01em; white-space: pre-wrap; }
.flash .face em { font-size: 12px; font-style: normal; }
.flash .back { transform: rotateY(180deg); background: var(--ink); color: var(--bg); border-color: var(--ink); }
.flash .back .eyebrow { color: inherit; opacity: .6; }
.flash.flipped .front { transform: rotateY(-180deg); }
.flash.flipped .back { transform: rotateY(0); }
.rv-btns kbd { margin-left: .3em; }
.deck-list { list-style: none; margin: 0; padding: 0; }
.deck-list li { display: flex; align-items: center; gap: 1em; padding: 1em 0; border-bottom: 1px solid var(--line2); flex-wrap: wrap; }
.deck-list li .grow { display: flex; flex-direction: column; }
.deck-list li b { font-weight: 500; font-size: 16px; }
.result .display { margin-bottom: .1em; }

/* ---------- obiettivi ---------- */
.preset-list { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 2em; border-top: 1px solid var(--line2); }
.preset { display: flex; align-items: baseline; gap: .8em; text-align: left; padding: 1.1em 0; border-bottom: 1px solid var(--line2); font-family: var(--serif); font-size: 1.35rem; line-height: 1.15; transition: padding .5s var(--ease); }
.preset i { font-family: var(--mono); font-style: normal; font-size: 11px; color: var(--muted); }
.preset .arr { margin-left: auto; font-family: var(--sans); font-size: 1rem; transition: transform .5s var(--ease); }
.preset:hover { padding-left: .5em; font-style: italic; }
.preset:hover .arr { transform: translateX(5px); }
.obj { display: grid; grid-template-columns: 56px 1fr auto; gap: 1.4em; padding: 1.8em 0; border-top: 1px solid var(--line2); align-items: start; }
.obj:first-of-type { border-top: 0; }
.obj-sentence { font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.5rem); line-height: 1.08; letter-spacing: -.015em; margin: 0 0 .4em; }
.obj.met .obj-sentence em { color: var(--green); }
.obj.expired .obj-sentence { color: var(--muted); }
.obj-meta { display: flex; gap: 1.4em; flex-wrap: wrap; font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0; }
.obj-side { display: flex; flex-direction: column; align-items: flex-end; gap: .5em; }
.obj-status { font-family: var(--serif); font-size: 2rem; line-height: 1; }
.won { list-style: none; margin: 0; padding: 0; }
.won li { display: flex; align-items: baseline; gap: 1em; padding: .9em 0; border-bottom: 1px solid var(--line2); flex-wrap: wrap; }
.won li b { font-family: var(--serif); font-weight: 400; font-size: 1.8rem; font-style: italic; }
.won .link { margin-left: auto; font-size: 12px; color: var(--muted); }

/* ---------- pagella ---------- */
.table-wrap { overflow-x: auto; }
.pag { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.pag th { text-align: left; font-family: var(--mono); font-weight: 400; color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line); }
.pag td { padding: 13px 10px 13px 0; border-bottom: 1px solid var(--line2); white-space: nowrap; }
.pag tbody tr { cursor: pointer; transition: background .3s; }
.pag tbody tr:hover { background: var(--paper); }
.pag.sim tbody tr { cursor: default; }
.pag tfoot td { font-weight: 600; border-bottom: 0; padding-top: 16px; }
.pag th:not(:first-child), .pag td:not(:first-child) { text-align: center; }
.dotc { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: .8em; background: var(--off); vertical-align: middle; }
.dotc.st-green { background: var(--green); } .dotc.st-yellow { background: var(--yellow); } .dotc.st-red { background: var(--red); }
.pill { display: inline-block; min-width: 2.2em; padding: .05em .5em; border-radius: 999px; font-family: var(--serif); font-size: 1.25rem; border: 1px solid var(--line); }
.pill.st-green { color: var(--green); border-color: currentColor; } .pill.st-yellow { color: var(--yellow); border-color: currentColor; } .pill.st-red { color: var(--red); border-color: currentColor; }
.legend-bulbs { display: flex; flex-wrap: wrap; gap: 1.4em; font-size: 13px; color: var(--muted); }
.legend-bulbs span { display: flex; align-items: center; gap: .4em; }
.legend-bulbs .bulb { width: 14px; height: 22px; }
.legend-bulbs .bulb .halo { display: none; }
.qc-out { margin: 1.2em 0; }
.qc-big { font-family: var(--serif); font-size: 5rem; line-height: .9; letter-spacing: -.03em; }
.shortcuts { display: grid; gap: 0; margin: 0; }
.shortcuts div { display: flex; justify-content: space-between; gap: 1em; padding: .7em 0; border-bottom: 1px solid var(--line2); }
.shortcuts dt kbd { font-size: 12px; color: var(--ink); }
.shortcuts dd { margin: 0; color: var(--muted); }

/* ---------- accesso e onboarding ---------- */
.auth { max-width: 1360px; margin: 0 auto; padding: 0 var(--pad) 64px; }
.auth-top { display: flex; justify-content: space-between; align-items: center; height: 72px; }
.auth-top .eyebrow { margin: 0; }
.auth-hero { padding: clamp(40px, 10vh, 120px) 0 clamp(28px, 5vh, 56px); }
.hero-bulbs { display: flex; gap: 1.2em; margin-bottom: 2.4em; }
.hero-bulbs .bulb { width: 40px; height: 62px; }
.auth-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 7vw, 120px); border-top: 1px solid var(--line); padding-top: 40px; }
.auth-grid .lead { margin-top: 0; }
.feat { list-style: none; padding: 0; margin: 2em 0 0; }
.feat li { display: flex; gap: 1.2em; padding: .8em 0; border-bottom: 1px solid var(--line2); font-size: 15px; }
.feat li i { font-family: var(--mono); font-style: normal; font-size: 11px; color: var(--muted); padding-top: .25em; }
.auth-card { display: flex; flex-direction: column; gap: 1.6em; align-self: start; }
.onboarding { max-width: 1100px; margin: 0 auto; padding: 0 var(--pad) 80px; }
.ob-head { display: flex; align-items: center; gap: 1.5em; height: 72px; flex-wrap: wrap; }
.steps { display: flex; gap: 1.4em; list-style: none; margin: 0 auto; padding: 0; font-size: 13px; color: var(--muted); }
.steps li i { font-family: var(--mono); font-style: normal; font-size: 10px; margin-right: 4px; }
.steps li.on { color: var(--ink); }
.steps li.done { text-decoration: line-through; }
.ob-body { padding-top: clamp(32px, 8vh, 90px); }
.ob-body .display { font-size: clamp(2.6rem, 7vw, 6rem); margin-bottom: .2em; }
.ob-body > .eyebrow { margin-top: 2em; }
.choice-list { margin: 2.4em 0 1.6em; border-top: 1px solid var(--line); }
.choice { display: flex; align-items: baseline; gap: 1.2em; width: 100%; text-align: left; padding: 1em 0; border-bottom: 1px solid var(--line); transition: padding .6s var(--ease); }
.choice i { font-family: var(--mono); font-style: normal; font-size: 11px; color: var(--muted); min-width: 2em; }
.choice b { font-family: var(--serif); font-weight: 400; font-size: clamp(1.6rem, 3.4vw, 2.6rem); line-height: 1.05; letter-spacing: -.015em; }
.choice small { color: var(--muted); font-family: var(--mono); font-size: 11px; text-transform: uppercase; }
.choice .arr { margin-left: auto; font-size: 1.4rem; transition: transform .6s var(--ease); }
.choice:hover, .choice.on { padding-left: .6em; }
.choice:hover b, .choice.on b { font-style: italic; }
.choice:hover .arr { transform: translateX(6px); }
.years { display: flex; gap: .7em; margin: 1.4em 0 2em; flex-wrap: wrap; }
.year { width: 76px; height: 76px; border-radius: 50%; border: 1px solid var(--line3); font-family: var(--serif); font-size: 2.2rem; transition: background .4s var(--ease), color .4s; }
.year sup { font-size: .45em; }
.year:hover { border-color: var(--ink); }
.year.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.sub-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 2em; margin: 2em 0 1.4em; border-top: 1px solid var(--line); }
.pick { display: flex; align-items: center; gap: .8em; padding: .8em 0; border-bottom: 1px solid var(--line2); cursor: pointer; font-size: 15px; opacity: .45; transition: opacity .35s; }
.pick.on { opacity: 1; }
.pick .pn { flex: 1; }
.pick small { color: var(--muted); font-family: var(--mono); font-size: 10px; text-transform: uppercase; }
.ob-body form.row { margin-bottom: 1.4em; max-width: 560px; }
.ob-body .tabs { margin-bottom: .6em; }
.settings .sec p { max-width: 60ch; }

/* ---------- toast / coriandoli / splash ---------- */
#toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 500; display: flex; flex-direction: column; gap: .5em; align-items: center; pointer-events: none; width: max-content; max-width: 92vw; }
.toast { display: flex; align-items: center; gap: 1em; background: var(--ink); color: var(--bg); padding: .75em 1.2em; border-radius: 999px; font-size: 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, .2); animation: tin .6s var(--ease); transition: opacity .5s, transform .5s var(--ease); pointer-events: auto; }
.toast button { text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.toast-err { background: var(--red); color: #fff; }
.toast.out { opacity: 0; transform: translateY(12px); }
@keyframes tin { from { opacity: 0; transform: translateY(16px) scale(.96); } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 450; overflow: hidden; }
.confetti i { position: absolute; top: -14px; width: 6px; height: 16px; border-radius: 1px; animation: fall linear forwards; }
@keyframes fall { to { top: 106vh; transform: rotate(540deg) translateX(60px); } }
.splash { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.4em; }
.splash .bulb { width: 46px; height: 72px; }
.splash .glass, .splash .halo { animation: pulse 1.4s ease-in-out infinite; }

/* ---------- responsive ---------- */
@media (max-width: 1220px) {
  .hnav { display: none; }
  .menu-btn { display: inline-flex; }
}
@media (max-width: 980px) {
  .hero, .auth-grid, .pomo-layout, .sec.split, .abs-hero { grid-template-columns: 1fr; }
  .overview { grid-template-columns: 1fr 1fr; }
  .ov-col:nth-child(2) { border-right: 0; padding-right: 0; }
  .ov-col:nth-child(3) { padding-left: 0; }
  .ov-col:nth-child(n+3) { border-top: 1px solid var(--line2); }
  .preset-list { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .kbd-btn kbd { display: none; }
  .kbd-btn { padding: .35em .9em; }
  .overview { grid-template-columns: 1fr; }
  .ov-col, .ov-col + .ov-col { padding: 18px 0 20px; border-right: 0; }
  .ov-col + .ov-col { border-top: 1px solid var(--line2); }
  .bulbs { grid-template-columns: repeat(2, 1fr); }
  .bcell { min-height: 250px; padding: 12px 12px 14px; }
  .bc-bulb .bulb { width: 42px; height: 65px; }
  .bc-avg { font-size: 2.3rem; }
  .bc-row { flex-direction: column; align-items: flex-start; gap: .2em; }
  .bc-hint { text-align: left; }
  .bc-name { font-size: 13.5px; }
  .kv, .hero .kv, .kv.four { grid-template-columns: 1fr 1fr; }
  .grid3 { grid-template-columns: 1fr 1fr; }
  .sec-h { grid-template-columns: auto 1fr; }
  .sec-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .preset-list { grid-template-columns: 1fr; }
  .obj { grid-template-columns: 1fr; gap: .8em; }
  .obj .idx { display: none; }
  .obj-side { flex-direction: row; align-items: center; flex-wrap: wrap; }
  .subj-head { grid-template-columns: auto 1fr; padding-right: 2.6em; }
  .big-avg { grid-column: 1 / -1; text-align: left; flex-direction: row; align-items: baseline; gap: .6em; }
  .fab { height: 52px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); }
  .ev-row { gap: .9em; flex-wrap: wrap; }
  .ev-row .need { margin-left: calc(18px + 5.4em); }
  .steps { display: none; }
  .ob-head .btn { margin-left: auto; }
  .pick-grid { grid-template-columns: 1fr; }
  .foot-row { justify-content: flex-start; gap: .6em 1.4em; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .mq-track { flex-wrap: wrap; width: auto; }
}
@media print {
  body::after, .hdr, .fab, .foot, .no-print, .page-h .row, #toasts, .btn, .menu-ov { display: none !important; }
  body { background: #fff; color: #000; }
  .main { padding: 0; max-width: none; }
  .sec { break-inside: avoid; }
  .anim [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* =====================================================================
   v6 — componenti ispirati a SmoothUI, rifatti con i token di Materie
   ===================================================================== */
:root { --spring: cubic-bezier(.34, 1.32, .64, 1); --glass: color-mix(in srgb, var(--paper) 76%, transparent); }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- barra di avanzamento dello scroll ---------- */
.scroll-prog { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 45; pointer-events: none; }
.scroll-prog i { display: block; height: 100%; background: var(--ink); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform .2s linear; }

/* ---------- navbar fluttuante ---------- */
.fnav { position: fixed; top: 14px; left: 50%; z-index: 40; display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 18px; max-width: calc(100vw - 24px);
  border-radius: 999px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .07); transform: translateX(-50%); transition: transform .7s var(--ease), padding .5s var(--ease), background .5s, box-shadow .5s; }
.fnav.shrunk { padding: 4px 4px 4px 15px; background: color-mix(in srgb, var(--paper) 62%, transparent); backdrop-filter: blur(24px) saturate(1.6); -webkit-backdrop-filter: blur(24px) saturate(1.6); box-shadow: 0 16px 50px rgba(0, 0, 0, .12); }
.fnav.away { transform: translate(-50%, calc(-100% - 28px)); }
.fnav .brand { font-size: 22px; margin-right: 8px; white-space: nowrap; }
.fnav.shrunk .brand { font-size: 20px; }
.fn-items { position: relative; display: flex; align-items: center; gap: 2px; }
.fn-items a, .fn-more-btn { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 999px; font-size: 13px; color: var(--muted); white-space: nowrap; transition: color .35s; }
.fn-items a:hover, .fn-more-btn:hover { color: var(--ink); }
.fn-items a.on, .fn-more-btn.on { color: var(--bg); }
.fn-more-btn i { width: 6px; height: 6px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .4s var(--ease); }
.fn-more-btn[aria-expanded="true"] i { transform: translateY(1px) rotate(-135deg); }
.fn-ind, .fn-hov { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 999px; pointer-events: none; transition: transform .6s var(--spring), width .6s var(--spring), opacity .3s; }
.fn-ind { background: var(--ink); z-index: 0; }
.fn-hov { background: color-mix(in srgb, var(--ink) 7%, transparent); opacity: 0; z-index: 0; }
.fn-hov.show { opacity: 1; }
.fn-right { display: flex; align-items: center; gap: 2px; margin-left: 4px; }
.fn-icon, .theme-tg { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; transition: background .3s, transform .4s var(--spring); }
.fn-icon:hover, .theme-tg:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.fn-icon:active, .theme-tg:active { transform: scale(.9); }
.fn-icon svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; }
.fn-menu { display: none; width: 36px; height: 36px; border-radius: 50%; position: relative; }
.fn-menu span { position: absolute; left: 10px; right: 10px; height: 1px; background: var(--ink); transition: transform .5s var(--ease); }
.fn-menu span:first-child { top: 15px; } .fn-menu span:last-child { top: 21px; }
.fn-menu:hover span:first-child { transform: translateY(-1px); } .fn-menu:hover span:last-child { transform: translateY(1px); }
.fnav .mini-pomo { margin: 0 4px; }
.fn-pop { position: absolute; top: calc(100% + 10px); right: 40px; min-width: 230px; padding: 6px; border-radius: 18px; background: var(--paper); border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .14); opacity: 0; pointer-events: none; transform: translateY(-8px) scale(.96); transform-origin: top right; transition: opacity .3s, transform .5s var(--spring); }
.fn-pop.open { opacity: 1; pointer-events: auto; transform: none; }
.fn-pop a { display: flex; align-items: baseline; gap: 10px; padding: 10px 14px; border-radius: 12px; font-size: 15px; opacity: 0; transform: translateY(6px); transition: background .25s, opacity .35s calc(var(--i) * 40ms), transform .5s var(--ease) calc(var(--i) * 40ms); }
.fn-pop.open a { opacity: 1; transform: none; }
.fn-pop a i { font-family: var(--mono); font-style: normal; font-size: 10px; color: var(--muted); }
.fn-pop a:hover, .fn-pop a.on { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.fn-pop a.on { font-style: italic; }
.main { padding-top: 64px; }

/* interruttore del tema: sole ↔ luna */
.theme-tg svg { width: 19px; height: 19px; overflow: visible; }
.tg-core { fill: var(--ink); transform-origin: 12px 12px; transition: transform .7s var(--spring); }
.tg-bite { transform: translate(7px, -7px); transition: transform .7s var(--ease); }
.tg-rays { transform-origin: 12px 12px; transition: transform .7s var(--ease), opacity .4s; }
.tg-rays line { stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; }
.theme-tg.is-dark .tg-core { transform: scale(1.45); }
.theme-tg.is-dark .tg-bite { transform: none; }
.theme-tg.is-dark .tg-rays { opacity: 0; transform: rotate(60deg) scale(.4); }
.menu-ov .tg-core { fill: var(--bg); } .menu-ov .tg-rays line { stroke: var(--bg); }
.menu-ov .theme-tg:hover { background: color-mix(in srgb, var(--bg) 12%, transparent); }
.menu-foot { align-items: center; }

/* ---------- dock (telefono e tablet) ---------- */
.dock { display: none; position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 40; align-items: center; gap: 2px; padding: 5px;
  border-radius: 999px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: 0 12px 44px rgba(0, 0, 0, .12); transform: translateX(-50%); transition: transform .7s var(--ease); }
.dock.away { transform: translate(-50%, calc(100% + 30px)); }
.dk-item { position: relative; z-index: 1; padding: 11px 14px; border-radius: 999px; font-size: 13px; color: var(--muted); white-space: nowrap; transition: color .35s; }
.dk-item.on { color: var(--bg); }
.dk-ind { position: absolute; left: 0; top: 5px; bottom: 5px; width: 0; border-radius: 999px; background: var(--ink); opacity: 0; transition: transform .6s var(--spring), width .6s var(--spring), opacity .3s; }
.dk-ind.show { opacity: 1; }
.dk-plus { position: relative; z-index: 1; width: 46px; height: 46px; margin: 0 4px; border-radius: 50%; background: var(--ink); transition: transform .5s var(--spring); }
.dk-plus span { position: absolute; left: 50%; top: 50%; width: 16px; height: 1.5px; background: var(--bg); transform: translate(-50%, -50%); }
.dk-plus span + span { transform: translate(-50%, -50%) rotate(90deg); }
.dk-plus:active { transform: scale(.9) rotate(90deg); }

/* ---------- tab con indicatore che scivola ---------- */
.tabs, .dtabs { position: relative; }
.t-ind { position: absolute; left: 0; top: 0; width: 0; height: 0; border-radius: 999px; background: var(--ink); z-index: 0; pointer-events: none;
  transition: transform .55s var(--spring), width .55s var(--spring), height .3s var(--ease), opacity .3s; }
.tabs button { z-index: 1; }
.tabs.has-ind button.on { background: transparent; }
.dtabs .t-ind { border-radius: 0; }
.dtabs.has-ind button::after { display: none; }

/* ---------- numeri che girano ---------- */
.nf { white-space: nowrap; }
.nf-d { position: relative; display: inline-block; line-height: 1; height: 1em; clip-path: inset(0 -.06em); }
.nf-sz { visibility: hidden; }
.nf-c { position: absolute; left: 50%; top: 0; display: flex; flex-direction: column; align-items: center; transform: translate(-50%, calc(var(--v, 0) * -1em)); transition: transform 1.4s var(--ease); }
.nf-c span { display: block; height: 1em; line-height: 1; }

/* ---------- toast "isola dinamica" ---------- */
.toast { height: 46px; padding: 0; overflow: hidden; white-space: nowrap; animation: none; justify-content: flex-start; gap: 0;
  transition: width .7s var(--spring), opacity .4s, transform .5s var(--ease); }
.t-dot { flex: none; width: 46px; height: 46px; display: grid; place-items: center; }
.t-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.toast-err .t-dot::before { background: #fff; box-shadow: 0 0 10px rgba(255, 255, 255, .8); }
.t-in { display: flex; align-items: center; gap: 14px; padding-right: 22px; opacity: 0; transform: translateX(-8px); transition: opacity .3s .2s, transform .55s var(--ease) .14s; }
.toast.open .t-in { opacity: 1; transform: none; }
.toast.out { opacity: 0; transform: translateY(10px) scale(.92); }

/* ---------- evidenziatore che segue il mouse ---------- */
[data-fluid] { position: relative; }
[data-fluid] > :not(.fl-hl) { position: relative; z-index: 1; }
.fl-hl { position: absolute !important; display: block !important; left: -10px; right: -10px; top: 0; height: 0; margin: 0 !important; padding: 0 !important; border: 0 !important; list-style: none;
  border-radius: 12px; background: color-mix(in srgb, var(--ink) 5%, transparent); opacity: 0; pointer-events: none; z-index: 0; transition: transform .45s var(--ease), height .45s var(--ease), opacity .3s; }
.fl-hl.show { opacity: 1; }
.pal-list .fl-hl { left: 0; right: 0; }

/* ---------- magnetico, inclinazione, bagliore ---------- */
[data-magnetic] { transition: transform .6s var(--spring) !important; }
[data-tilt] { transition: transform .6s var(--ease); transform-style: preserve-3d; will-change: transform; }
.flash[data-tilt] { transition: transform .6s var(--ease); }
[data-glow] { position: relative; overflow: hidden; }
[data-glow]::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(260px circle at var(--gx, 50%) var(--gy, 50%), color-mix(in srgb, var(--ink) 7%, transparent), transparent 65%); }
[data-glow]:hover::before { opacity: 1; }

/* ---------- passi animati ---------- */
.stepper { position: relative; display: flex; justify-content: space-between; align-items: flex-start; flex: 1; max-width: 520px; margin: 0 auto; }
.st-line { position: absolute; left: 14px; right: 14px; top: 13px; height: 1px; background: var(--line); }
.st-fill { position: absolute; inset: 0; background: var(--ink); transform-origin: left; transform: scaleX(calc(var(--p, 0) / 100)); transition: transform 1s var(--ease); }
.st-dot { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.st-dot b { width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-size: 11px; font-weight: 400; background: var(--bg); border: 1px solid var(--line3); color: var(--muted); transition: all .6s var(--spring); }
.st-dot.done b { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.st-dot.on b { border-color: var(--ink); color: var(--ink); transform: scale(1.15); box-shadow: 0 0 0 5px color-mix(in srgb, var(--ink) 8%, transparent); }
.st-dot small { font-size: 11px; color: var(--muted); }
.st-dot.on small { color: var(--ink); }

/* ---------- calendario di studio ---------- */
.hm-wrap { overflow-x: auto; padding-bottom: 4px; }
.hm-months { position: relative; height: 16px; font-family: var(--mono); font-size: 10px; color: var(--muted); text-transform: uppercase; min-width: max-content; }
.hm-months span { position: absolute; left: calc(var(--c) * 15px); }
.hm { display: flex; gap: 3px; }
.hm-col { display: flex; flex-direction: column; gap: 3px; }
.hm i, .hm-scale i { display: block; width: 12px; height: 12px; border-radius: 3px; background: var(--line2); }
.hm i { transition: transform .6s var(--spring) calc(var(--c, 0) * 16ms), opacity .4s calc(var(--c, 0) * 16ms); }
.hm .l1, .hm-scale .l1 { background: color-mix(in srgb, var(--green) 28%, transparent); }
.hm .l2, .hm-scale .l2 { background: color-mix(in srgb, var(--green) 52%, transparent); }
.hm .l3, .hm-scale .l3 { background: color-mix(in srgb, var(--green) 78%, transparent); }
.hm .l4, .hm-scale .l4 { background: var(--green); }
.hm .hm-x { visibility: hidden; }
.anim [data-reveal]:not(.is-in) .hm i { transform: scale(0); opacity: 0; }
.hm-legend { margin-top: .8em !important; }
.hm-scale { display: inline-flex; align-items: center; gap: 3px; font-family: var(--mono); font-size: 10px; color: var(--muted); }

/* ---------- caricamento file ---------- */
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 26px 18px; margin-top: .6em; border: 1px dashed var(--line3); border-radius: 16px; text-align: center; cursor: pointer; transition: border-color .3s, background .3s, transform .5s var(--spring); }
.dropzone:hover { border-color: var(--ink); }
.dropzone.over { border-color: var(--ink); background: var(--paper); transform: scale(1.015); }
.dz-icon svg { width: 26px; height: 26px; fill: none; stroke: var(--ink); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; transition: transform .5s var(--spring); }
.dropzone:hover .dz-icon svg, .dropzone.over .dz-icon svg { transform: translateY(-4px); }
.dropzone b { font-weight: 500; font-size: 14px; }
.dropzone small { font-family: var(--mono); font-size: 10.5px; color: var(--muted); text-transform: uppercase; }
.up-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.up-list li { display: grid; grid-template-columns: 1fr 120px 64px; align-items: center; gap: 10px; font-size: 13px; animation: fade-up .5s var(--ease); }
.up-list .pbar { margin: 0; }
.up-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-pct { font-family: var(--mono); font-size: 11px; text-align: right; color: var(--muted); }
.up-list li.ok .up-pct { color: var(--green); } .up-list li.err .up-pct { color: var(--red); }
.photo-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; margin: .6em 0; }
.photo-strip:empty { display: none; }
.ph { aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--paper); }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .7s var(--ease); }
.ph:hover img { transform: scale(1.06); }
.kind-lightbox .modal { max-width: min(1100px, 96vw); background: var(--ink); color: var(--bg); }
.kind-lightbox .modal-body { padding: 0; }
.lb { margin: 0; }
.lb img { display: block; width: 100%; max-height: 80vh; object-fit: contain; background: #000; }
.lb figcaption { display: flex; justify-content: space-between; align-items: center; gap: 1em; flex-wrap: wrap; padding: 14px 20px; font-size: 13px; }
.lb .btn { color: var(--bg); border-color: color-mix(in srgb, var(--bg) 35%, transparent); }
.lb .btn::before { background: var(--bg); }
.lb .btn:hover { color: var(--ink); }
.gtag { font-family: var(--mono); font-size: 10px; border: 1px solid var(--line3); border-radius: 999px; padding: .1em .6em; color: var(--muted); }

/* ---------- registratore ---------- */
.rec { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; animation: fade-up .5s var(--ease); }
.rec-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: pulse 1.2s ease-in-out infinite; flex: none; }
.rec-dot.idle { animation: none; margin-right: 2px; }
.rec-time { font-family: var(--mono); font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }
.rec-bars { flex: 1; display: flex; align-items: center; gap: 3px; height: 34px; min-width: 120px; }
.rec-bars i { flex: 1; min-height: 2px; height: calc(6% + var(--h, 0) * 94%); background: var(--ink); border-radius: 2px; transition: height .08s linear; }
.rec.review { flex-direction: column; align-items: stretch; }
.rec audio, .audio-list audio { width: 100%; height: 40px; }
.audio-list { list-style: none; margin: 1em 0 0; padding: 0; }
.audio-list li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line2); }
.audio-list li .grow { display: flex; flex-direction: column; gap: 6px; }
.audio-list b { font-weight: 500; }

/* ---------- zaino (etichette animate) ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 1em 0 .6em; }
.tag { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px 9px 12px; border: 1px solid var(--line3); border-radius: 999px; font-size: 15px;
  transition: background .45s var(--ease), color .45s, border-color .45s, transform .35s var(--spring); }
.tag svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 16; stroke-dashoffset: 16; transition: stroke-dashoffset .5s var(--ease) .05s; }
.tag::before { content: ''; display: none; }
.tag:not(.on) svg { border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line3); }
.tag.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tag.on svg { stroke-dashoffset: 0; box-shadow: none; }
.tag:hover { border-color: var(--ink); }
.tag:active { transform: scale(.94); }
.pack-line { margin: .7em 0 0; font-size: 13px; color: var(--ink2); }
.pack-line .eyebrow { display: inline-flex; margin: 0 .6em 0 0; }

/* ---------- schede espandibili ---------- */
.xp { border-top: 1px solid var(--line2); }
.xp:first-of-type { border-top-color: var(--line); }
.xp-head { width: 100%; display: flex; align-items: center; gap: 14px; padding: 18px 0; text-align: left; flex-wrap: wrap; }
.xp-head b { font-weight: 500; font-size: 16px; }
.xp-head .xp-title { font-family: var(--serif); font-weight: 400; font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: -.01em; }
.xp-st { margin-left: auto; font-family: var(--serif); font-size: 1.5rem; }
.xp-ic { position: relative; width: 14px; height: 14px; flex: none; }
.xp-ic::before, .xp-ic::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--ink); transition: transform .5s var(--ease); }
.xp-ic::after { transform: rotate(90deg); }
.xp.open .xp-ic::after { transform: rotate(0); }
.xp.open .xp-ic::before { transform: rotate(180deg); }
.xp-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .65s var(--ease); }
.xp.open .xp-body { grid-template-rows: 1fr; }
.xp-in { overflow: hidden; min-height: 0; }
.xp-in > :last-child { margin-bottom: 22px; }
.xp-details > summary { font-size: 1.15rem; }

/* ---------- copia con conferma ---------- */
.copy-btn .c-a, .copy-btn .c-b { transition: transform .45s var(--ease); }
.copy-btn .c-b { position: absolute; inset: 0; display: grid; place-items: center; transform: translateY(110%); }
.copy-btn.copied .c-a { transform: translateY(-180%); }
.copy-btn.copied .c-b { transform: none; }

/* ---------- diario, classe ---------- */
.hw-add { display: grid; grid-template-columns: 1fr 190px 170px auto; gap: 8px; margin-bottom: 1.4em; }
.hw-add .btn { height: auto; }
.day-h { margin-top: 1.6em; }
.ev-row.hw { gap: .9em; }
.ev-row.is-done .grow b { text-decoration: line-through; color: var(--muted); }
.split-forms { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 80px); }
.code-in { font-family: var(--mono); text-transform: uppercase; letter-spacing: .2em; font-size: 1.3rem; }
.code-box { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 6px 0 24px; }
.code-box .eyebrow { margin: 0; width: 100%; }
.code { font-family: var(--mono); font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 500; letter-spacing: .2em; }
.share-list { list-style: none; margin: 0 0 1.2em; padding: 0; }
.share-list li { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--line2); }
.share-list code { font-family: var(--mono); font-size: 12px; color: var(--muted); max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.prefs { margin: 1.2em 0 .6em; }

/* ---------- calendario mensile ---------- */
.cal-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1em; flex-wrap: wrap; margin-bottom: 1.2em; }
.cal-head .display { text-transform: lowercase; }
.cal-head .display em { color: var(--muted); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal-dow { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cal-cell { min-height: 100px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 8px 10px; text-align: left; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background .3s; }
.cal-cell:not(.pad):hover { background: var(--paper); }
.cal-cell.sel { background: var(--paper); box-shadow: inset 0 0 0 1px var(--ink); }
.cal-n { font-family: var(--serif); font-size: 1.5rem; line-height: 1; }
.cal-cell.today .cal-n { display: inline-grid; place-items: center; width: 32px; height: 32px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--ink); color: var(--bg); font-size: 1.15rem; }
.cal-cell.sun .cal-n { color: var(--muted); }
.cal-gr { display: flex; gap: 6px; font-family: var(--serif); font-size: 1.05rem; }
.cal-gr b { font-weight: 400; }
.cal-mk { display: flex; gap: 4px; align-items: center; margin-top: auto; }
.cal-mk em { font-style: normal; font-family: var(--mono); font-size: 10px; color: var(--muted); }
.mk { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--muted); }
.k-verifica { background: var(--red); } .k-interrogazione { background: var(--yellow); } .k-compito { background: var(--ink); }
.k-studio { background: transparent; box-shadow: inset 0 0 0 1px var(--ink); }
.k-classe { background: linear-gradient(90deg, var(--ink) 50%, transparent 50%); box-shadow: inset 0 0 0 1px var(--ink); }
.k-abs { background: transparent; box-shadow: inset 0 0 0 1.5px var(--red); }
.mk.done { opacity: .35; }
.cal-legend { display: flex; gap: 1.2em; flex-wrap: wrap; margin-top: 1em; font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.day-list { list-style: none; margin: 0; padding: 0; }
.day-list li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line2); }
.day-list .grow { display: flex; flex-direction: column; cursor: pointer; }
.day-list .grow b { font-weight: 500; } .day-list .grow small { color: var(--muted); }
.gv.sm { font-size: 1.4rem; min-width: 1.6em; }

/* ---------- piano, previsione, interrogazioni ---------- */
.plan-list { list-style: none; margin: 0 0 1em; padding: 0; }
.plan-list li { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line2); animation: fade-up .5s var(--ease); }
.plan-list i { font-family: var(--mono); font-style: normal; font-size: 11px; color: var(--muted); min-width: 68px; text-transform: uppercase; padding-top: 2px; }
.calc-main.sm { font-size: clamp(1.25rem, 2vw, 1.5rem); }
.oral-est { display: flex; align-items: center; gap: 20px; margin-bottom: .6em; }
.oral-est p { margin: 0; }
.oral-p { font-family: var(--serif); font-size: 4.2rem; line-height: .9; letter-spacing: -.03em; }
.oral-p small { font-size: .4em; }
.d-sec form.row { margin: .8em 0; }

/* ---------- esame ---------- */
.exam { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 5vw, 80px); align-items: start; }
.exam-total .giant { font-size: clamp(6rem, 16vw, 13rem); }
.need-list { list-style: none; margin: 1.4em 0 0; padding: 0; }
.need-list li { display: flex; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line2); font-size: 14px; }
.need-list b { font-family: var(--serif); font-weight: 400; font-size: 1.7rem; min-width: 2.2em; }
.range-fl { display: grid !important; grid-template-columns: 1fr auto; align-items: center; }
.range-fl output { font-family: var(--mono); font-size: 13px; color: var(--ink); }
.range-fl input { grid-column: 1 / -1; }
input[type="range"] { -webkit-appearance: none; appearance: none; height: 24px; width: 100%; background: transparent; }
input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: var(--line3); border-radius: 2px; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -8px; border-radius: 50%; background: var(--ink); transition: transform .35s var(--spring); }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.3); }
input[type="range"]::-moz-range-track { height: 2px; background: var(--line3); }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: var(--ink); }

/* ---------- traguardi ---------- */
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.badge-cell { position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 172px; padding: 16px 18px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.badge-cell b { margin-top: auto; font-family: var(--serif); font-weight: 400; font-size: 1.55rem; line-height: 1.05; letter-spacing: -.01em; }
.badge-cell small { color: var(--muted); font-size: 13px; line-height: 1.35; }
.badge-cell em { font-style: normal; font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; color: var(--muted); }
.badge-cell:not(.on) b { color: var(--muted); }
.badge-cell .pbar { margin: .4em 0 0; }
.bd-mark { position: absolute; top: 14px; right: 14px; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line3); display: grid; place-items: center; }
.badge-cell.on .bd-mark { background: var(--green); border-color: var(--green); box-shadow: 0 0 14px color-mix(in srgb, var(--green) 60%, transparent); }
.bd-mark svg { width: 15px; height: 15px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 20; stroke-dashoffset: 0; transition: stroke-dashoffset .8s var(--ease) calc(var(--d, 0ms) + 300ms); }
.anim [data-reveal]:not(.is-in) .bd-mark svg { stroke-dashoffset: 20; }

/* ---------- grafico studio contro voti ---------- */
.scatter { height: 240px; }
.scatter .lbl { font-size: 10px; fill: var(--ink2); }
.scatter .sp circle { transition: r .3s var(--spring); }
.scatter .sp:hover circle { r: 8; }
.mood.sm { font-size: clamp(1.2rem, 2vw, 1.5rem); margin-top: .6em; max-width: none; }
.parent { max-width: 1360px; margin: 0 auto; padding: 0 var(--pad) 40px; }

/* ---------- responsive delle parti nuove ---------- */
@media (max-width: 1220px) {
  .fn-items { display: none; }
  .fn-menu { display: inline-block; }
  .fnav .brand { margin-right: auto; }
  .fnav { width: min(560px, calc(100vw - 24px)); }
  .dock { display: flex; }
  .fab { display: none !important; }
  .main { padding-bottom: 110px; }
  #toasts { bottom: calc(92px + env(safe-area-inset-bottom)); }
}
@media (max-width: 980px) { .exam, .split-forms { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .main { padding-top: 56px; }
  .fnav { top: 10px; padding: 4px 4px 4px 14px; }
  .fnav .brand { font-size: 20px; }
  .stepper .st-dot small { display: none; }
  .hw-add { grid-template-columns: 1fr 1fr; }
  .hw-add input[name="title"] { grid-column: 1 / -1; }
  .hw-add .btn { grid-column: 1 / -1; height: 44px; }
  .cal-cell { min-height: 58px; padding: 5px 6px; }
  .cal-n { font-size: 1.1rem; }
  .cal-cell.today .cal-n { width: 26px; height: 26px; font-size: .95rem; margin: -3px 0 0 -3px; }
  .cal-gr { display: none; }
  .cal-dow { padding: 6px; font-size: 9.5px; }
  .dk-item { padding: 11px 11px; font-size: 12.5px; }
  .badges { grid-template-columns: repeat(2, 1fr); }
  .badge-cell { min-height: 150px; padding: 12px 12px 14px; }
  .badge-cell b { font-size: 1.25rem; }
  .oral-p { font-size: 3.2rem; }
  .up-list li { grid-template-columns: 1fr 80px 52px; }
}
@media (prefers-reduced-motion: reduce) { .fnav.away, .dock.away { transform: translateX(-50%); } }
@media print { .fnav, .dock, .scroll-prog { display: none !important; } .main { padding-top: 0; } }

.pomo-layout > *, .exam > *, .sec.split > *, .split-forms > * { min-width: 0; }
.pk-al { flex-wrap: wrap; }
.pk-al span { white-space: nowrap; }
.pk-al input { min-width: 200px; flex: 1; }
.dock { gap: 4px; }
