/* Chi Tocca — un progetto Not LIKE us · (c) 2026 Hexqor · github.com/Hexqor
   Same visual language as the Not LIKE us campaign site: pure black, #FF0000, square corners,
   Syne uppercase headings, JetBrains Mono labels, film grain, poster grid, red marquee.
   Single dark look on purpose: it is the brand. */
:root {
    --red: #FF0000;
    --red-deep: #B30000;
    --bg: #000000;
    --surface: #0A0A0A;
    --surface-2: #121212;
    --line: rgba(255, 255, 255, 0.10);
    --line-strong: rgba(255, 255, 255, 0.22);
    --text: #FFFFFF;
    --soft: #D4D4D8;
    --muted: #A1A1AA;
    --ok: #22c55e;
    --ok-soft: rgba(34, 197, 94, 0.14);
    --ok-text: #bbf7d0;
    --warn: #f59e0b;
    --warn-soft: rgba(245, 158, 11, 0.14);
    --geo: 'Syne', 'Arial Black', sans-serif;
    --body: 'Space Grotesk', system-ui, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, monospace;
    --script: 'Pinyon Script', 'Brush Script MT', cursive;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
* { -webkit-tap-highlight-color: transparent; }
html { scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body {
    margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 16px; line-height: 1.5;
    letter-spacing: -0.01em; -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden;
}
::selection { background: var(--red); color: #fff; }
a { color: inherit; text-underline-offset: 3px; }
a, button, label[for], select { cursor: pointer; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
h1, h2, h3 { margin: 0 0 0.5em; line-height: 1; text-wrap: balance; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

/* ---------- Atmosphere (from the campaign site) ---------- */
body::after {
    content: ''; position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: 0.07;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
    animation: grain 1.2s steps(6) infinite;
}
@keyframes grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); } }
.atmos { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-grid {
    position: absolute; inset: 0; background-size: 44px 44px;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.06) 1px, transparent 1px), linear-gradient(to bottom, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, #000 15%, transparent 70%);
    mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, #000 15%, transparent 70%);
}
@media (min-width: 768px) { .bg-grid { background-size: 64px 64px; } }
.orb { position: absolute; border-radius: 50%; filter: blur(70px); will-change: transform; }
.orb-red { width: 70vw; height: 70vw; max-width: 720px; max-height: 720px; top: -25%; right: -20%; opacity: 0.45; background: radial-gradient(circle, rgba(255, 0, 0, 0.55) 0%, rgba(255, 0, 0, 0) 70%); animation: drift 14s var(--ease-in-out) infinite alternate; }
.orb-deep { width: 60vw; height: 60vw; max-width: 620px; max-height: 620px; bottom: -30%; left: -20%; opacity: 0.45; background: radial-gradient(circle, rgba(179, 0, 0, 0.45) 0%, rgba(179, 0, 0, 0) 70%); animation: drift 18s var(--ease-in-out) infinite alternate-reverse; }
@keyframes drift { from { transform: translate3d(-6%, -4%, 0) scale(1); } to { transform: translate3d(6%, 5%, 0) scale(1.15); } }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (min-width: 640px) { .container { padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); } }
main.container { flex: 1; padding-block: 22px 48px; }
section { margin-bottom: 30px; }

/* ---------- Type helpers ---------- */
.geo { font-family: var(--geo); font-weight: 800; text-transform: uppercase; letter-spacing: -0.02em; }
.h1 { font-family: var(--geo); font-weight: 800; text-transform: uppercase; font-size: clamp(1.9rem, 7.6vw, 4.4rem); line-height: 0.9; letter-spacing: -0.03em; margin: 0; overflow-wrap: anywhere; }
.h2 { font-family: var(--geo); font-weight: 800; text-transform: uppercase; font-size: clamp(1.9rem, 6vw, 2.8rem); line-height: 0.92; letter-spacing: -0.02em; }
.h3 { font-family: var(--geo); font-weight: 800; text-transform: uppercase; font-size: 1.15rem; line-height: 1.05; }
.text-outline { color: transparent; -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.85); }
@media (min-width: 768px) { .text-outline { -webkit-text-stroke-width: 2px; } }
.red { color: var(--red); }
.mono { font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.15em; font-size: 0.72rem; }
.eyebrow { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--red); margin: 0 0 0.9rem; }
.eyebrow::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: pulse 2s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.6); } 70% { box-shadow: 0 0 0 10px rgba(255, 0, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0); } }
.eyebrow a { text-decoration: none; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.hint { color: var(--muted); font-size: 0.85rem; margin: 0.7em 0 0; }

/* Not LIKE us wordmark */
.nlu { display: inline-flex; align-items: baseline; gap: 2px; white-space: nowrap; font-family: var(--geo); font-weight: 800; }
.nlu-s { font-family: var(--script); font-weight: 400; font-size: 1.5em; line-height: 0.7; color: #fff; }
.nlu-l { color: var(--red); letter-spacing: -0.02em; }
.logo-hero { font-family: var(--script); line-height: 0.7; font-size: clamp(4rem, 21vw, 10rem); color: #fff; position: relative; z-index: 1; }
.logo-hero-like {
    font-family: var(--geo); font-weight: 800; font-size: clamp(4.5rem, 25vw, 12.5rem); line-height: 0.85; letter-spacing: -0.05em;
    background: linear-gradient(180deg, #FF2A2A 0%, #FF0000 45%, #B30000 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 18px 60px rgba(255, 0, 0, 0.35)); margin: -0.12em 0;
}
.hero-logo { user-select: none; margin: 0 0 2.2rem; }
.hero-logo .l1 { transform: rotate(-3deg) translateX(4px); }
.hero-logo .l3 { text-align: right; padding-right: 8%; transform: rotate(2deg) translateY(-0.15em); }

@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
.fade-up { animation: fadeUp 1s var(--ease-out) backwards; animation-delay: var(--d, 0s); }

/* ---------- Header ---------- */
.topbar { position: sticky; top: 0; z-index: 50; padding-top: env(safe-area-inset-top, 0px); background: rgba(0, 0, 0, 0.85); border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
@media (min-width: 800px) { .topbar { background: rgba(0, 0, 0, 0.55); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); } }
.topbar-inner { display: flex; align-items: center; gap: 14px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 12px; background: none; border: 0; color: #fff; padding: 0; text-decoration: none; }
.logo .nlu { font-size: 1.15rem; }
.logo-app { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--soft); padding-left: 12px; border-left: 1px solid var(--line-strong); white-space: nowrap; }
.class-chip { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: #fff; background: var(--red); padding: 5px 10px; }
.nav { display: flex; gap: 22px; }
.nav-item { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 2px; color: var(--soft); font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.15em; text-transform: uppercase; text-decoration: none; transition: color 0.25s ease; }
.nav-item svg { width: 18px; height: 18px; }
.nav-item::after { content: ''; position: absolute; left: 2px; right: 2px; bottom: 9px; height: 1px; background: var(--red); transform: scaleX(0); transform-origin: right; transition: transform 0.4s var(--ease-out); }
.nav-item:hover, .nav-item.active { color: #fff; }
.nav-item:hover::after, .nav-item.active::after { transform: scaleX(1); transform-origin: left; }
.nav-item.active svg { color: var(--red); }
@media (max-width: 799px) {
    .logo-app { display: none; }
    .nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; justify-content: space-around; gap: 0; background: rgba(5, 5, 5, 0.97); border-top: 1px solid var(--line-strong);
        padding: 4px max(4px, env(safe-area-inset-right, 0px)) calc(4px + env(safe-area-inset-bottom, 0px)) max(4px, env(safe-area-inset-left, 0px)); }
    .nav-item { flex-direction: column; justify-content: center; gap: 3px; font-size: 0.6rem; letter-spacing: 0.12em; min-width: 66px; min-height: 56px; }
    .nav-item::after { top: -4px; bottom: auto; height: 2px; left: 14px; right: 14px; }
    body.has-nav { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
}
@media (min-width: 800px) { .class-chip { margin-left: 4px; } .nav { margin-left: auto; } }

.strip { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 14px; padding-bottom: 14px; margin-bottom: 26px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.strip .school { color: var(--red); font-weight: 700; }
.demo-tag { display: inline-flex; align-items: center; gap: 10px; color: var(--warn); }
.demo-tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--warn); animation: blink 1.4s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.linkbtn { background: none; border: 0; padding: 4px 0; min-height: 32px; color: #fff; font: inherit; letter-spacing: inherit; text-transform: inherit; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--red); }
.linkbtn:hover { color: var(--red); }

/* ---------- Buttons (campaign style) ---------- */
.btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem; min-height: 48px; padding: 0 1.3rem;
    font-family: var(--geo); font-weight: 800; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap;
    border: 1px solid transparent; border-radius: 0; color: #fff; overflow: hidden; isolation: isolate; text-decoration: none;
    transition: transform 0.35s var(--ease-out), background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.35s ease;
}
.btn svg { flex-shrink: 0; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--red); box-shadow: 0 10px 40px -10px rgba(255, 0, 0, 0.7); }
.btn-primary::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%); transform: translateX(-120%); transition: transform 0.8s var(--ease-out); }
.btn-ghost { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.03); }
.btn-offer { border-color: var(--line-strong); background: rgba(0, 0, 0, 0.5); }
.btn-offer svg { color: var(--red); }
.btn-ok { background: var(--ok-soft); color: var(--ok); border-color: rgba(34, 197, 94, 0.5); }
.btn-warn { background: var(--red); }
@media (hover: hover) {
    .btn-primary:hover, .btn-warn:hover { background: #fff; color: #000; box-shadow: 0 14px 50px -10px rgba(255, 255, 255, 0.35); }
    .btn-primary:hover::after { transform: translateX(120%); }
    .btn-ghost:hover, .btn-offer:hover { border-color: var(--red); color: var(--red); }
    .btn-offer:hover svg { color: var(--red); }
}
.btn-link { background: none; color: var(--muted); padding: 0 6px; min-height: 44px; font-family: var(--mono); font-weight: 500; font-size: 0.68rem; letter-spacing: 0.15em; text-decoration: underline; text-underline-offset: 4px; }
.btn-link:hover { color: var(--red); }
.btn-sm { min-height: 40px; padding: 0 0.85rem; font-size: 0.68rem; }
.btn-icon { min-width: 44px; padding: 0 10px; }
.btn-block { width: 100%; margin-top: 18px; }

.toast { position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 95; max-width: calc(100% - 32px); padding: 12px 16px; font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid; animation: fadeUp 0.5s var(--ease-out); }
.toast-ok { background: #000; border-color: var(--red); color: #fff; box-shadow: 0 20px 60px -15px rgba(255, 0, 0, 0.6); }
.toast-error { background: #1a0000; border-color: var(--red); color: #fecaca; }
@media (min-width: 800px) { .toast { bottom: 28px; } }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; background: var(--red); color: #fff; font-family: var(--mono); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: blink 1s steps(2) infinite; }

/* ---------- Cards (campaign style: square, fine grid, red bar on hover) ---------- */
.card { position: relative; isolation: isolate; background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%); border: 1px solid var(--line); padding: 20px; overflow: hidden; transition: transform 0.5s var(--ease-out), border-color 0.4s ease, box-shadow 0.5s ease; }
.card::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--red); transform: scaleY(0); transform-origin: top; transition: transform 0.5s var(--ease-out); }
.card-link { cursor: pointer; }
@media (hover: hover) {
    .card-link:hover { transform: translateY(-4px); border-color: rgba(255, 0, 0, 0.6); box-shadow: 0 30px 80px -30px rgba(255, 0, 0, 0.45); }
    .card-link:hover::after { transform: scaleY(1); }
}
.card-hot { border-color: rgba(255, 0, 0, 0.35); background: radial-gradient(120% 140% at 100% 0%, rgba(255, 0, 0, 0.2) 0%, rgba(255, 0, 0, 0) 55%), linear-gradient(180deg, #111 0%, #070707 100%); box-shadow: 0 40px 120px -40px rgba(255, 0, 0, 0.45); }
.card-hot::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--red), rgba(255, 0, 0, 0)); }
.card-arrow { display: inline-grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border: 1px solid var(--line-strong); border-radius: 50%; transition: background-color 0.35s ease, border-color 0.35s ease, transform 0.5s var(--ease-out); }
@media (hover: hover) { .card-link:hover .card-arrow { background: var(--red); border-color: var(--red); transform: rotate(45deg); } }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head .sub { margin: 10px 0 0; }
.label { display: block; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--soft); margin: 1.2em 0 0.5em; }
.field, .input { width: 100%; min-height: 52px; padding: 0.9rem 1rem; font: inherit; font-size: 16px; color: #fff; background: rgba(0, 0, 0, 0.6); border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 0; outline: none; transition: border-color 0.25s ease, box-shadow 0.25s ease; }
.field::placeholder, .input::placeholder { color: #71717A; }
.field:hover, .input:hover { border-color: rgba(255, 255, 255, 0.32); }
.field:focus, .input:focus { border-color: var(--red); background: #000; box-shadow: 0 0 0 4px rgba(255, 0, 0, 0.15); }
select.field, select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #fff 50%), linear-gradient(135deg, #fff 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
input[type=date].field, input[type=date].input { color-scheme: dark; }

/* ---------- Week ---------- */
.week-nav { display: flex; gap: 8px; }
.week { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .week { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; } }
.day { margin: 0; position: relative; background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); padding: 14px; }
.day-today { border-color: rgba(255, 0, 0, 0.6); box-shadow: 0 30px 80px -40px rgba(255, 0, 0, 0.6); }
.day-today::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--red); }
.day-past { opacity: 0.6; }
.day-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin: 0 0 12px; font-family: var(--geo); font-weight: 800; font-size: 1.05rem; text-transform: uppercase; letter-spacing: -0.01em; }
.day-num { font-family: var(--mono); font-weight: 500; font-size: 0.75rem; color: var(--muted); letter-spacing: 0.1em; margin-left: 6px; }
.blocks { display: grid; gap: 8px; }
.blocks.card { padding: 8px; }
.block { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 11px 12px; background: rgba(0, 0, 0, 0.45); border: 1px solid var(--line); }
.block-mine { border-color: rgba(255, 0, 0, 0.6); background: rgba(255, 0, 0, 0.07); }
.block-mine::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--red); }
.block-main { flex: 1 1 160px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.block-time { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em; color: var(--muted); font-variant-numeric: tabular-nums; text-transform: uppercase; }
.block-time b { color: #fff; }
.block-subject { text-decoration: none; font-family: var(--geo); font-weight: 700; font-size: 0.98rem; text-transform: uppercase; letter-spacing: -0.01em; line-height: 1.1; background: none; border: 0; color: #fff; padding: 0; text-align: left; overflow-wrap: anywhere; hyphens: auto; }
.block-subject:hover { color: var(--red); }
.block-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.outcome { flex-basis: 100%; display: flex; align-items: center; justify-content: space-between; gap: 6px 10px; flex-wrap: wrap; padding-top: 9px; border-top: 1px dashed var(--line-strong); }
.outcome-q { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--soft); }
.outcome-buttons { display: flex; gap: 6px; }
@media (min-width: 1000px) {
    .week .block { flex-direction: column; align-items: stretch; }
    .week .block-main { flex-basis: auto; }
    .week .block-actions { flex-wrap: nowrap; }
    .week .block-actions .btn-sm { padding: 0 0.5rem; gap: 0.4rem; }
    .week .block-actions .btn-icon { min-width: 40px; flex: 0 0 auto; }
    .week .block-actions .btn-offer:not(.btn-icon), .week .block-actions .btn-warn { flex: 1; min-width: 0; }
    .week .block-subject { font-size: 0.82rem; }
    .week .day-head { font-size: 0.92rem; }
    .week .outcome { flex-basis: auto; flex-direction: column; align-items: stretch; }
    .week .outcome-buttons .btn { flex: 1; }
}
.who-list { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.who { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; font-family: var(--mono); font-size: 0.64rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line-strong); }
.who svg { width: 12px; height: 12px; }
.who-me { background: var(--red); border-color: var(--red); color: #fff; font-weight: 700; }
.who-fatta { background: var(--ok-soft); border-color: rgba(34, 197, 94, 0.45); color: var(--ok-text); }
.who-rimandata { opacity: 0.55; text-decoration: line-through; }
.pending { margin-bottom: 22px; }
.pending-list { display: grid; gap: 12px; }
.pending-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.help { display: grid; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
@media (min-width: 800px) { .help { grid-template-columns: 1fr 1fr; } }
.help p { display: flex; gap: 10px; align-items: flex-start; margin: 0; color: var(--muted); font-size: 0.88rem; }
.help svg { color: var(--red); flex-shrink: 0; margin-top: 2px; }
.help b { color: #fff; }

/* ---------- Class & subject ---------- */
.subject-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); margin-bottom: 18px; }
.subject-card { width: 100%; height: 100%; display: flex; flex-direction: column; gap: 10px; text-align: left; color: #fff; font: inherit; }
.subject-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.subject-code { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.2em; color: var(--red); }
.subject-name { font-family: var(--geo); font-weight: 800; font-size: 1.15rem; text-transform: uppercase; line-height: 1.05; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.subject-stat { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.subject-stat b { color: #fff; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); margin-top: 14px; }
.matrix { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 0.88rem; }
.matrix th, .matrix td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.matrix thead th { background: var(--surface-2); font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.12em; color: var(--muted); }
.matrix tbody th, .matrix thead th:first-child { text-align: left; position: sticky; left: 0; background: var(--surface); font-weight: 600; }
.row-me, .row-me th { color: var(--red); }
.cell { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 26px; font-family: var(--mono); font-weight: 700; }
.cell-done { background: var(--ok-soft); color: var(--ok); }
.cell-planned { background: var(--warn-soft); color: var(--warn); }
.cell-none { color: #52525b; }
details summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
details summary::-webkit-details-marker { display: none; }
details[open] .card-arrow { transform: rotate(180deg); }
.ranking { padding: 4px 18px; }
.ranking li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ranking li:last-child { border-bottom: 0; }
.rank-n { font-family: var(--geo); font-weight: 800; font-size: 1.3rem; width: 2.2ch; color: transparent; -webkit-text-stroke: 1.2px rgba(255, 255, 255, 0.35); }
.ranking .is-next .rank-n { color: var(--red); -webkit-text-stroke-color: var(--red); }
.ranking .is-next { font-weight: 700; }
.ranking .is-next .count { background: var(--red); color: #fff; border-color: var(--red); }
.count { display: inline-grid; place-items: center; min-width: 32px; height: 30px; padding: 0 8px; border: 1px solid var(--line-strong); font-family: var(--mono); font-weight: 700; font-variant-numeric: tabular-nums; }
.badge-planned { display: inline-flex; padding: 3px 7px; font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; background: var(--warn-soft); color: var(--warn); }
.history li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 0.92rem; }
.draw-list { display: grid; gap: 10px; }
.draw-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.draw-name { font-family: var(--geo); font-weight: 800; font-size: 1.25rem; text-transform: uppercase; letter-spacing: -0.01em; }
.draw p { margin: 8px 0 0; }

/* ---------- Landing ---------- */
.hero { display: grid; gap: 34px; align-items: center; padding-top: 8px; }
@media (min-width: 1000px) { .hero { grid-template-columns: 7fr 5fr; gap: 48px; } }
.hero-title { font-family: var(--geo); font-weight: 800; text-transform: uppercase; font-size: clamp(2.1rem, 7.5vw, 3.8rem); line-height: 0.92; letter-spacing: -0.02em; margin: 0 0 0.45em; }
.hero-lead { color: var(--soft); font-size: 1.05rem; line-height: 1.6; max-width: 34rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 34px 0 6px; border-block: 1px solid var(--line); }
.stats div { padding: 16px 12px; border-left: 1px solid var(--line); }
.stats div:first-child { border-left: 0; padding-left: 0; }
.stats dt { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.stats dd { margin: 0; font-family: var(--geo); font-weight: 800; font-size: clamp(1.6rem, 6vw, 2.8rem); line-height: 1; }
.points { border-top: 1px solid var(--line); }
.point { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; align-items: baseline; padding: 22px 4px; border-bottom: 1px solid var(--line); }
.point::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255, 0, 0, 0.10), transparent 70%); opacity: 0; transition: opacity 0.5s ease; pointer-events: none; }
.point-num { font-family: var(--geo); font-weight: 800; font-size: clamp(2rem, 7vw, 3.4rem); line-height: 0.9; color: transparent; -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.35); transition: color 0.4s ease, -webkit-text-stroke-color 0.4s ease; }
.point-title { font-family: var(--geo); font-weight: 800; text-transform: uppercase; font-size: clamp(1.2rem, 4.4vw, 2rem); line-height: 1.05; transition: transform 0.5s var(--ease-out); }
.point p { grid-column: 2; margin: 0; color: var(--muted); max-width: 38rem; }
@media (hover: hover) {
    .point:hover::before { opacity: 1; }
    .point:hover .point-num { color: var(--red); -webkit-text-stroke-color: var(--red); }
    .point:hover .point-title { transform: translateX(8px); }
}

.manifesto { position: relative; text-align: center; padding: 56px 0 30px; border-top: 1px solid var(--line); margin-top: 20px; }
.big-word { font-family: var(--geo); font-weight: 800; text-transform: uppercase; line-height: 0.85; letter-spacing: -0.05em; font-size: clamp(3rem, 15vw, 10rem); }
.big-word .logo-hero-like { font-size: inherit; margin: 0; display: block; }
.manifesto .eyebrow { justify-content: center; }
.manifesto-line { margin: 26px 0 0; font-family: var(--geo); font-weight: 700; text-transform: uppercase; font-size: clamp(1.1rem, 4vw, 1.8rem); }

/* Red marquee (campaign) */
.marquee { overflow: hidden; background: var(--red); color: #000; padding: 10px 0; font-family: var(--geo); font-weight: 800; text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.2em; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 28s linear infinite; }
.marquee-item { display: inline-flex; align-items: center; gap: 1.4rem; padding-right: 1.4rem; white-space: nowrap; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Footer (campaign) */
.footer { border-top: 1px solid var(--line); background: #000; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 18px; padding-block: 30px max(30px, env(safe-area-inset-bottom, 0px)); font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.footer-inner .nlu { font-size: 1.15rem; letter-spacing: 0; text-transform: none; }
.footer-right { display: grid; gap: 4px; }
@media (min-width: 800px) { .footer-right { text-align: right; } }
.footer-right b { color: #e4e4e7; font-weight: 500; }

/* ---------- App-only pieces ---------- */
.skip-link { position: absolute; top: -100px; left: 0; z-index: 200; background: var(--red); color: #fff; padding: 12px 20px; font-family: var(--geo); font-weight: 700; font-size: 12px; text-transform: uppercase; transition: top 0.3s var(--ease-out); }
.skip-link:focus { top: 0; }
.narrow { max-width: 520px; margin: 16px auto; display: grid; gap: 14px; }
.center { text-align: center; }
.ok-text { color: var(--ok); }
.prose ul { list-style: square; padding-left: 1.2em; margin-bottom: 1em; }
.prose li { margin-bottom: 0.35em; }
.prose h2 { margin-top: 1.4em; }
.prose a { text-decoration-color: var(--red); }
.flash { padding: 12px 16px; border: 1px solid; margin: 0 0 20px; font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; }
.flash-ok { background: #000; border-color: var(--red); color: #fff; }
.flash-error { background: #1a0000; border-color: var(--red); color: #fecaca; }
.dev-note { margin-top: 1em; padding: 10px; border: 1px dashed var(--warn); color: var(--warn); font-size: 0.9rem; }
.big-icon { display: inline-grid; place-items: center; width: 60px; height: 60px; margin-bottom: 14px; border-radius: 50%; background: var(--red); color: #fff; box-shadow: 0 0 0 10px rgba(255, 0, 0, 0.15), 0 20px 60px -10px rgba(255, 0, 0, 0.7); }
.btn-lg { min-height: 56px; padding: 0 2rem; font-size: 0.85rem; }
.btn-danger { background: transparent; color: var(--red); border-color: rgba(255, 0, 0, 0.5); }
.btn-danger:hover { background: var(--red); color: #fff; }
.danger { border-color: rgba(255, 0, 0, 0.35); }
.login-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.login-row .input { flex: 1 1 220px; min-width: 0; }
.who-icon { display: inline-flex; }
.who-icon svg { width: 12px; height: 12px; }
.bar { appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 4px; border: 0; background: rgba(255, 255, 255, 0.08); }
.bar::-webkit-progress-bar { background: rgba(255, 255, 255, 0.08); }
.bar::-webkit-progress-value { background: var(--red); box-shadow: 0 0 12px rgba(255, 0, 0, 0.8); }
.bar::-moz-progress-bar { background: var(--red); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin: 12px 0 0; font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase; }
.dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; }
.dot-done { background: var(--ok); }
.dot-planned { background: var(--warn); }
.dot-none { background: rgba(255, 255, 255, 0.25); }
.matrix a { text-decoration: none; }
.h1-long { font-size: clamp(1.6rem, 6vw, 4.4rem); }
.h1-xlong { font-size: clamp(1.3rem, 4.8vw, 4rem); }
.mt-xl { margin-top: 56px; }
.mb-0 { margin-bottom: 0; }
.head-note { max-width: 22rem; margin: 0; }
.prose-wide { max-width: 44rem; }
.history { margin-top: 14px; }
.white { color: #fff; }
.big-word .outline-line { display: block; }
.invite { margin-bottom: 22px; }
.invite-url { font-family: var(--mono); font-size: 0.85rem; margin-top: 4px; }
.invite-actions { margin-top: 12px; }
.invited { margin-bottom: 22px; }
.class-fixed { font-family: var(--geo); font-weight: 800; font-size: 2rem; margin: 0; color: var(--red); }
.student-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.student-card { display: flex; flex-direction: column; gap: 8px; height: 100%; text-decoration: none; padding: 16px 18px; }
.student-card.is-me { border-color: rgba(255, 0, 0, 0.5); }
.student-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.student-name { font-family: var(--geo); font-weight: 800; text-transform: uppercase; font-size: 1.02rem; line-height: 1.1; overflow-wrap: anywhere; }
.is-me .student-name { color: var(--red); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { display: inline-flex; padding: 2px 7px; font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.08em; background: var(--ok-soft); color: var(--ok-text); border: 1px solid rgba(34, 197, 94, 0.4); }
.subject-rows { padding: 4px 18px; }
.subject-rows li + li { border-top: 1px solid var(--line); }
.subject-rows a { display: flex; align-items: center; gap: 12px; padding: 12px 0; text-decoration: none; }
.subject-rows a:hover .subject-name-sm { color: var(--red); }
.subject-rows .grow { display: flex; flex-direction: column; gap: 3px; }
.subject-name-sm { font-family: var(--geo); font-weight: 700; text-transform: uppercase; font-size: 0.95rem; line-height: 1.1; }
.count-ok { background: var(--ok-soft); color: var(--ok); border-color: rgba(34, 197, 94, 0.5); }
.stats-tight { margin: 0 0 26px; }
.history.card { padding: 4px 18px; }
.history.card li:first-child { border-top: 0; }
.badge-status { padding: 3px 7px; font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; white-space: nowrap; }
.status-fatta { background: var(--ok-soft); color: var(--ok); }
.status-prenotata { background: var(--warn-soft); color: var(--warn); }
.status-rimandata { background: rgba(255, 255, 255, 0.06); color: var(--muted); }
.app-card { margin-bottom: 22px; display: grid; gap: 12px; }
.app-card[hidden], .app-card [hidden] { display: none; }
.app-card .h3 { margin: 0; }
.app-card p { margin: 0 0 10px; }
.ios-steps { list-style: none; counter-reset: step; display: grid; gap: 8px; margin: 0; }
.ios-steps li { counter-increment: step; display: flex; gap: 10px; align-items: baseline; font-size: 0.92rem; }
.ios-steps li::before { content: counter(step, decimal-leading-zero); font-family: var(--mono); font-size: 0.7rem; color: var(--red); }
.ios-share { display: inline-grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--line-strong); vertical-align: middle; color: #3b82f6; }
.app-dismiss { justify-self: start; padding-left: 0; }
/* Phones: one day at a time (app.js adds .one-day and shows the tabs) */
.day-tabs { position: sticky; top: calc(64px + env(safe-area-inset-top, 0px)); z-index: 15; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 0 0 14px; padding: 8px 0; background: rgba(0, 0, 0, 0.92); }
.day-tabs[hidden] { display: none; }
.day-tab { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 56px; padding: 6px 0; background: var(--surface); border: 1px solid var(--line-strong); color: var(--soft); }
.day-tab-name { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; }
.day-tab-num { font-family: var(--geo); font-weight: 800; font-size: 1.15rem; line-height: 1; color: #fff; }
.day-tab.is-today .day-tab-name { color: var(--red); }
.day-tab.active { background: var(--red); border-color: var(--red); color: #fff; }
.day-tab.active .day-tab-name { color: #fff; }
.day-tab-dot { position: absolute; top: 5px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.day-tab.active .day-tab-dot { background: #fff; }
.week.one-day .day { display: none; }
.week.one-day .day.is-shown { display: block; animation: fadeUp 0.35s var(--ease-out); }
.week.one-day .day-past { opacity: 1; }

/* Phones: comfortable touch targets, no room wasted */
@media (pointer: coarse) {
    .btn-sm { min-height: 44px; }
    .btn-icon { min-width: 48px; }
    .btn-link { min-height: 44px; }
}
@media (max-width: 799px) {
    .strip { display: none; }
    .logo { min-height: 44px; }
    .block-subject { display: block; padding: 10px 0; margin: -10px 0; }
    .h2 { font-size: clamp(1.6rem, 7vw, 2.8rem); overflow-wrap: anywhere; }
    #seg-date { flex: 1 1 100%; }
    form[action="/segnala"] .btn { flex: 1 1 100%; }
    .page-head { margin-bottom: 18px; }
}
.matrix a { display: inline-block; padding: 6px 2px; }
.ios-steps li span { min-width: 0; }

.install-gate { position: fixed; inset: 0; z-index: 80; overflow-y: auto; background: radial-gradient(120% 80% at 100% 0%, rgba(255, 0, 0, 0.28), transparent 60%), #000;
    padding: calc(28px + env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) calc(28px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px)); }
.install-gate[hidden] { display: none; }
.gate-inner { max-width: 460px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.gate-logo .nlu { font-size: 1.6rem; }
.gate-inner .h1 { font-size: clamp(1.9rem, 8.4vw, 3.2rem); overflow-wrap: normal; }
.gate-lead { color: var(--soft); margin: 0; }
.gate-box { margin: 0; }
.gate-box[hidden] { display: none; }
.gate-box p { margin: 0 0 12px; }
.gate-later { align-self: center; }
body.gate-open { overflow: hidden; }
.code-input { text-align: center; font-family: var(--mono); font-size: 1.8rem; letter-spacing: 0.4em; margin-top: 8px; }

.big-icon.bell { align-self: flex-start; width: 52px; height: 52px; margin-bottom: 0; }
.sheet-list { display: grid; gap: 8px; margin: 0; }
.sheet-list li { padding: 9px 12px; font-size: 0.9rem; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.03); color: var(--soft); }
.sheet-list b { color: #fff; font-family: var(--geo); text-transform: uppercase; font-size: 0.9rem; }

.day-change { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; margin: -4px 0 8px; font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.day-change:hover { color: var(--red); }
.changed-tag { color: var(--warn); font-weight: 700; }
.badge-programmed { display: inline-flex; padding: 2px 7px; font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; background: rgba(59, 130, 246, 0.15); color: #93c5fd; vertical-align: middle; }
.change-list { display: grid; gap: 10px; }
.change-row.is-changed { border-color: rgba(245, 158, 11, 0.5); }
.change-hour { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.change-actions { margin-top: 10px; }
.change-actions .btn { flex: 1 1 140px; }
@media (pointer: coarse) { .day-change { min-height: 44px; } }

.stats-grid { grid-template-columns: repeat(2, 1fr); margin-top: 0; }
.stats-grid div { border-left: 0; border-bottom: 1px solid var(--line); padding-left: 0; }
@media (min-width: 800px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.chart { margin: 0; }
.chart svg { width: 100%; height: 110px; display: block; }
.chart figcaption { display: flex; justify-content: space-between; margin-top: 8px; font-size: 0.6rem; }
.admin-table td, .admin-table th { text-align: left; }
.admin-table th a { color: var(--red); font-weight: 700; }
.admin-days { display: grid; gap: 10px; }
@media (min-width: 800px) { .admin-days { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.admin-day { padding: 14px; }
.admin-blocks li { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); }
.admin-blocks li:not(.has) { opacity: 0.55; }
.admin-blocks .grow { display: flex; flex-direction: column; gap: 2px; }
.count-hot { background: var(--red); color: #fff; border-color: var(--red); }
.admin-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.admin-link { text-decoration: none; }

.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--red); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
    body::after { animation: none; }
    .marquee-track { animation: none; }
}
