/* coach.css — design system globale.
   Estratto da templates/base.html il 2026-05-18.
   Token: --bg-*, --br-*, --accent-* per temi e dark/light.
   Mantenere in sync con tailwind.config (Inter / Manrope / JetBrains Mono).
*/

:root {
  color-scheme: dark;
  --bg-0: #0a0a0b;
  --bg-1: #131316;
  --bg-2: #1a1a1f;
  --bg-3: #232329;
  --br-1: rgba(255,255,255,0.06);
  --br-2: rgba(255,255,255,0.10);
  --accent: #f59e0b;
  --accent-rgb: 245, 158, 11;
  --accent-from: #fbbf24;
  --accent-to: #b45309;
  --accent-soft: rgba(245, 158, 11, 0.12);
  --accent-text: #1a1207;
}
body.theme-amber   { --accent: #f59e0b; --accent-rgb: 245,158,11;  --accent-from: #fbbf24; --accent-to: #b45309; --accent-soft: rgba(245,158,11,0.12); --accent-text: #1a1207; }
body.theme-emerald { --accent: #10b981; --accent-rgb: 16,185,129;  --accent-from: #34d399; --accent-to: #047857; --accent-soft: rgba(16,185,129,0.12); --accent-text: #022c1f; }
body.theme-violet  { --accent: #8b5cf6; --accent-rgb: 139,92,246;  --accent-from: #a78bfa; --accent-to: #6d28d9; --accent-soft: rgba(139,92,246,0.14); --accent-text: #160a30; }
body.theme-rose    { --accent: #f43f5e; --accent-rgb: 244,63,94;   --accent-from: #fb7185; --accent-to: #be123c; --accent-soft: rgba(244,63,94,0.13); --accent-text: #2a0511; }
body.theme-cyan    { --accent: #06b6d4; --accent-rgb: 6,182,212;   --accent-from: #22d3ee; --accent-to: #0e7490; --accent-soft: rgba(6,182,212,0.13); --accent-text: #042532; }
body.theme-slate   { --accent: #94a3b8; --accent-rgb: 148,163,184; --accent-from: #cbd5e1; --accent-to: #475569; --accent-soft: rgba(148,163,184,0.13); --accent-text: #0b1220; }

body {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(245,158,11,0.05), transparent 70%),
    radial-gradient(900px 500px at -10% 110%, rgba(16,185,129,0.04), transparent 70%),
    var(--bg-0);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #e7e7ea;
  letter-spacing: -0.005em;
}

code, pre, .font-mono { font-family: 'JetBrains Mono', monospace; }

/* === TYPOGRAPHY === */
.page-title {
  font-family: 'Manrope', 'Inter', ui-sans-serif, system-ui, sans-serif;
  font-weight: 800;
  line-height: 1.02;
  font-size: clamp(1.875rem, 2.2vw + 1rem, 2.25rem);
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #ffffff 0%, #cfcfd6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.5rem;
}
.page-title-xl {
  font-family: 'Manrope', 'Inter', ui-sans-serif, system-ui, sans-serif;
  font-weight: 800;
  line-height: 1.02;
  font-size: clamp(2.25rem, 4.8vw + 1rem, 3.25rem);
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, #ffffff 0%, #b3b3b9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.page-subtitle {
  color: #a1a1aa;
  font-size: clamp(0.9rem, 0.5vw + 0.8rem, 1rem);
  letter-spacing: -0.005em;
}

/* === PANEL === */
.panel {
  background: var(--bg-1);
  border: 1px solid var(--br-1);
  border-radius: 0.75rem;
  box-shadow: 0 1px 0 rgba(255,255,255,0.02) inset, 0 8px 24px -12px rgba(0,0,0,0.5);
  transition: border-color 140ms ease, transform 80ms ease, background 160ms ease, box-shadow 180ms ease;
}
.panel:hover { border-color: var(--br-2); transform: translateY(-1px); }
.panel-soft {
  background: var(--bg-1);
  border: 1px solid var(--br-1);
  border-radius: 0.625rem;
}
.shadow-elev { box-shadow: 0 1px 0 rgba(255,255,255,0.02) inset, 0 10px 30px -18px rgba(0,0,0,0.6); }
.smooth { transition: all 160ms ease; }

/* === CHIPS (legacy) + TAG semantici === */
.chip, .tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.18rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  line-height: 1.35;
  border: 1px solid var(--br-1);
  background: var(--bg-3);
  color: #c8c8cf;
  transition: border-color 140ms, background 140ms, color 140ms;
}
.chip-amber, .tag-warn { background: rgba(245,158,11,0.10); color: #fcd34d; border-color: rgba(245,158,11,0.25); }
.chip-emerald, .tag-ok { background: rgba(16,185,129,0.10); color: #86efac; border-color: rgba(16,185,129,0.25); }
.chip-rose, .tag-danger { background: rgba(244,63,94,0.10); color: #fda4af; border-color: rgba(244,63,94,0.25); }
.tag-muted { background: var(--bg-2); color: #a1a1aa; }

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 0.875rem;
  transition: background-color 140ms, color 140ms, transform 80ms, border-color 140ms, opacity 140ms, box-shadow 160ms;
  border: 1px solid transparent;
  line-height: 1;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.995); }
.btn-primary { background: var(--accent); color: var(--accent-text); box-shadow: 0 8px 24px -12px rgba(var(--accent-rgb), 0.35); }
.btn-primary:hover { background: var(--accent-from); box-shadow: 0 10px 28px -12px rgba(var(--accent-rgb), 0.45); }
.btn-ghost { background: var(--bg-2); color: #e7e7ea; border-color: var(--br-1); }
.btn-ghost:hover { background: var(--bg-3); border-color: var(--br-2); }
.btn-danger { background: rgba(244,63,94,0.15); color: #fca5a5; border-color: rgba(244,63,94,0.3); }
.btn-danger:hover { background: rgba(244,63,94,0.25); }
.btn-success { background: rgba(16,185,129,0.15); color: #6ee7b7; border-color: rgba(16,185,129,0.3); }
.btn-success:hover { background: rgba(16,185,129,0.25); }
.btn-sm { padding: 0.25rem 0.625rem; font-size: 0.75rem; border-radius: 0.375rem; }

/* === INPUT === */
.input {
  background: var(--bg-0);
  border: 1px solid var(--br-1);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  color: #e7e7ea;
  transition: border-color 140ms, background 140ms, box-shadow 140ms;
}
.input::placeholder { color: #6b6b73; }
.input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-1);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
input[type="file"] {
  padding: 0.4rem; border: 1px dashed var(--br-1); border-radius: 0.5rem; background: var(--bg-0);
}
input[type="file"]:hover { border-color: var(--br-2); }

/* === SKELETON / FLASH === */
.skeleton { position: relative; overflow: hidden; background: #111114; border: 1px solid var(--br-1); border-radius: 0.5rem; }
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  transform: translateX(-100%); animation: shine 1.2s linear infinite;
}
@keyframes shine { to { transform: translateX(100%); } }
.flash-saved { animation: flashSaved 1600ms ease 1; }
@keyframes flashSaved {
  0% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
  20% { box-shadow: 0 0 0 6px rgba(16,185,129,0.20); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}

.strike { text-decoration: line-through; opacity: .5; }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }

/* === INTERNAL PRODUCT UPDATE === */
.product-update {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border-color: rgba(var(--accent-rgb),0.28);
  background: linear-gradient(135deg, rgba(var(--accent-rgb),0.13), var(--bg-1) 58%);
}
.product-update-kicker {
  display: block;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}
.product-update strong {
  color: #f4f4f5;
  font-size: 0.98rem;
}
.product-update p {
  color: #a1a1aa;
  font-size: 0.85rem;
  line-height: 1.5;
  margin-top: 0.2rem;
}
.product-update-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}
@media (max-width: 720px) {
  .product-update {
    grid-template-columns: 1fr;
  }
  .product-update-actions {
    justify-content: flex-start;
  }
}

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 0.375rem;
}
button[disabled], button:disabled { opacity: 0.55; cursor: not-allowed; }

/* === NAV === */
.navlink {
  color: #9b9ba3;
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  transition: color 120ms, background 120ms;
  white-space: nowrap;
}
.navlink:hover { color: #e7e7ea; background: var(--bg-2); }
.navlink.active { color: var(--accent); background: var(--accent-soft); }

/* "altro" menu (popover) */
.nav-more { position: relative; }
.nav-more-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--bg-1);
  border: 1px solid var(--br-1);
  border-radius: 0.625rem;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
  padding: 0.375rem;
  min-width: 12rem;
  display: none;
  z-index: 30;
}
.nav-more[open] .nav-more-panel { display: flex; flex-direction: column; gap: 0.125rem; }
.nav-more-panel .navlink { display: flex; align-items: center; gap: 0.5rem; }

.botnav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(10,10,11,0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--br-1);
  z-index: 20;
  padding: 0.5rem 0.25rem calc(0.5rem + env(safe-area-inset-bottom));
  justify-content: space-around;
  gap: 0.125rem;
  /* niente overflow:hidden qui — il popover di <details.nav-more> esce sopra
     (position: absolute; bottom: calc(100% + 0.5rem)) e verrebbe clippato.
     Per evitare scroll orizzontale usiamo body { overflow-x: hidden } sotto. */
}
.botnav > a,
.botnav > details.nav-more {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
  padding: 0.5rem 0;
  color: #9b9ba3;
  font-size: 0.6875rem;
  border-radius: 0.5rem;
  transition: color 120ms, background 120ms, transform 80ms;
  position: relative;
}
.botnav > a:active { transform: translateY(1px); }
.botnav > a.active { color: var(--accent); background: var(--accent-soft); }
.botnav svg { width: 20px; height: 20px; }
.botnav > details.nav-more > summary {
  width: 100%;
  text-align: center;
}
.botnav > details.nav-more[open] {
  color: var(--accent);
  background: var(--accent-soft);
}
.botnav span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 768px) {
  .botnav { display: flex; }
  main { padding-bottom: calc(6.5rem + env(safe-area-inset-bottom)) !important; }
  .desktop-nav { display: none !important; }
  body { overflow-x: hidden; }
}

/* === LOGO === */
.logo-badge {
  background: linear-gradient(135deg, var(--accent-from), var(--accent-to));
  color: var(--accent-text);
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.logo-badge:hover { transform: translateY(-1px) scale(1.02); box-shadow: 0 10px 28px -12px rgba(var(--accent-rgb),0.5); }
@keyframes breathe {
  0% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb),0.35); }
  100% { box-shadow: 0 0 0 14px rgba(var(--accent-rgb),0); }
}
.logo-badge.breath { animation: breathe 1400ms ease-out 1; }
.brand-text { color: var(--accent); }

/* === TOP PROGRESS === */
#top-progress {
  position: fixed; top: 0; left: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-from));
  width: 0; z-index: 50; transition: width 0.2s ease;
  pointer-events: none;
}

html { scroll-behavior: smooth; }

/* === LIGHT MODE === */
body.mode-light {
  color-scheme: light;
  --bg-0: #f7f7f8;
  --bg-1: #ffffff;
  --bg-2: #f1f1f3;
  --bg-3: #e4e4e7;
  --br-1: rgba(0,0,0,0.09);
  --br-2: rgba(0,0,0,0.18);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(var(--accent-rgb),0.08), transparent 70%),
    radial-gradient(900px 500px at -10% 110%, rgba(16,185,129,0.05), transparent 70%),
    var(--bg-0);
  color: #18181b;
}
body.mode-light .page-title,
body.mode-light .page-title-xl {
  background: linear-gradient(180deg, #18181b 0%, #52525b 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
body.mode-light .page-subtitle { color: #52525b; }
body.mode-light .panel {
  box-shadow: 0 1px 2px rgba(0,0,0,0.05), 0 6px 20px -10px rgba(0,0,0,0.12);
}
body.mode-light .panel:hover { border-color: var(--br-2); }
body.mode-light .panel-soft { background: #fbfbfc; }
body.mode-light .input { color: #18181b; background: var(--bg-1); }
body.mode-light .input::placeholder { color: #a1a1aa; }
body.mode-light .btn-ghost { color: #27272a; }
body.mode-light .btn-ghost:hover { background: var(--bg-3); }
body.mode-light .btn-primary { color: #ffffff; }
body.mode-light .chip, body.mode-light .tag { color: #3f3f46; background: var(--bg-2); }
body.mode-light .tag-muted { background: var(--bg-2); color: #52525b; }
body.mode-light .tag-warn { background: rgba(245,158,11,0.14); color: #92400e; border-color: rgba(245,158,11,0.30); }
body.mode-light .tag-ok { background: rgba(16,185,129,0.13); color: #065f46; border-color: rgba(16,185,129,0.30); }
body.mode-light .tag-danger { background: rgba(244,63,94,0.13); color: #9f1239; border-color: rgba(244,63,94,0.30); }
body.mode-light .skeleton { background: #efeff2; border-color: var(--br-1); }
body.mode-light .skeleton::after {
  background: linear-gradient(90deg, transparent, rgba(0,0,0,0.05), transparent);
}

/* Tailwind text-* override per leggibilità */
body.mode-light .text-zinc-50,
body.mode-light .text-zinc-100,
body.mode-light .text-zinc-200,
body.mode-light .text-slate-100,
body.mode-light .text-slate-200 { color: #18181b !important; }
body.mode-light .text-zinc-300,
body.mode-light .text-slate-300 { color: #27272a !important; }
body.mode-light .text-zinc-400,
body.mode-light .text-slate-400 { color: #52525b !important; }
body.mode-light .text-zinc-500,
body.mode-light .text-slate-500 { color: #71717a !important; }
body.mode-light .text-zinc-600,
body.mode-light .text-zinc-700,
body.mode-light .text-slate-600 { color: #52525b !important; }
body.mode-light .text-amber-200,
body.mode-light .text-amber-300 { color: #b45309 !important; }
body.mode-light .text-amber-400 { color: #b45309 !important; }
body.mode-light .text-emerald-200,
body.mode-light .text-emerald-300 { color: #047857 !important; }
body.mode-light .text-emerald-400 { color: #047857 !important; }
body.mode-light .text-rose-200,
body.mode-light .text-rose-300 { color: #be123c !important; }
body.mode-light .text-rose-400 { color: #be123c !important; }

/* sfondi scuri sui figli che assumono dark */
body.mode-light .bg-zinc-900,
body.mode-light .bg-zinc-800,
body.mode-light .bg-slate-900,
body.mode-light .bg-slate-800 { background-color: var(--bg-1) !important; }
body.mode-light .bg-zinc-950,
body.mode-light .bg-black { background-color: var(--bg-0) !important; }
body.mode-light .border-zinc-700,
body.mode-light .border-zinc-800,
body.mode-light .border-slate-700,
body.mode-light .border-slate-800 { border-color: var(--br-1) !important; }

/* header sticky e botnav: chiariscili */
body.mode-light header.sticky { background: rgba(255,255,255,0.92) !important; border-bottom-color: var(--br-1); }
body.mode-light .botnav { background: rgba(255,255,255,0.96); border-top-color: var(--br-1); }
body.mode-light .navlink { color: #3f3f46; }
body.mode-light .navlink:hover { color: #18181b; background: var(--bg-2); }
body.mode-light .nav-more-panel { background: #ffffff; border-color: var(--br-1); }

/* dialog */
body.mode-light dialog.day-dialog { background: #ffffff; color: #18181b; }
body.mode-light dialog.day-dialog::backdrop { background: rgba(0,0,0,0.45); }

/* strikethrough done */
body.mode-light .strike { color: #a1a1aa !important; }

/* chat.html — override per leggibilità in light mode */
body.mode-light .bubble time { color: #52525b; }
body.mode-light .bubble.ai { background: #fbfbfc; }
body.mode-light .bubble.user { background: rgba(var(--accent-rgb), 0.10); border-color: rgba(var(--accent-rgb), 0.30); }
body.mode-light .tool-disclosure { color: #52525b; }
body.mode-light .tool-disclosure summary { color: #3f3f46; }
body.mode-light .tool-disclosure[open] summary { color: #18181b; }

/* chat.html — bubble user usa l'accent tema anche in dark
   (era hardcoded amber, ora segue --accent del tema utente) */
.bubble.user {
  background: rgba(var(--accent-rgb), 0.12) !important;
  border-color: rgba(var(--accent-rgb), 0.35) !important;
}

/* === PUBLIC LANDING === */
.landing-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 4rem;
}
.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0 2rem;
}
.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: #f4f4f5;
  font-family: 'Manrope', 'Inter', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
}
.landing-logo {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  font-weight: 800;
}
.landing-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.landing-hero {
  min-height: calc(100vh - 7rem);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(22rem, 1.1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}
.landing-kicker {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 800;
  margin-bottom: 0.85rem;
}
.landing-copy h1,
.landing-section-head h2,
.landing-fit h2 {
  font-family: 'Manrope', 'Inter', sans-serif;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.02;
  color: #f8fafc;
}
.landing-copy h1 {
  font-size: clamp(2.75rem, 6vw, 5.8rem);
  max-width: 9ch;
}
.landing-copy p {
  color: #b7b7c0;
  max-width: 38rem;
  font-size: 1.06rem;
  line-height: 1.7;
  margin-top: 1.25rem;
}
.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
}
.landing-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}
.landing-proof span {
  border: 1px solid var(--br-1);
  color: #d4d4d8;
  background: rgba(255,255,255,0.035);
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  font-size: 0.78rem;
}
.landing-product {
  position: relative;
}
.mock-window {
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.025));
  border: 1px solid var(--br-2);
  border-radius: 1.15rem;
  overflow: hidden;
  box-shadow: 0 30px 80px -45px rgba(0,0,0,0.9), 0 0 0 1px rgba(var(--accent-rgb),0.08);
}
.mock-topbar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.8rem 0.95rem;
  border-bottom: 1px solid var(--br-1);
  background: rgba(0,0,0,0.18);
}
.mock-topbar span {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
  background: #52525b;
}
.mock-topbar span:first-child { background: #fb7185; }
.mock-topbar span:nth-child(2) { background: #fbbf24; }
.mock-topbar span:nth-child(3) { background: #34d399; }
.mock-topbar strong {
  margin-left: auto;
  color: #a1a1aa;
  font-size: 0.8rem;
}
.mock-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(11rem, 0.7fr);
  gap: 1rem;
  padding: 1rem;
}
.mock-main,
.mock-card {
  background: rgba(10,10,11,0.72);
  border: 1px solid var(--br-1);
  border-radius: 0.85rem;
}
.mock-main { padding: 1rem; }
.mock-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}
.mock-label {
  display: block;
  color: var(--accent);
  font-size: 0.68rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-weight: 800;
}
.mock-title-row h2 {
  color: #f4f4f5;
  font-family: 'Manrope', sans-serif;
  font-size: 1.35rem;
  margin-top: 0.15rem;
}
.mock-task {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.85rem;
  border: 1px solid var(--br-1);
  border-radius: 0.7rem;
  background: rgba(255,255,255,0.035);
  margin-top: 0.65rem;
}
.mock-task.must {
  border-color: rgba(var(--accent-rgb),0.28);
  background: rgba(var(--accent-rgb),0.09);
}
.mock-check {
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  margin-top: 0.12rem;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  flex: 0 0 auto;
}
.mock-check.muted {
  border-color: #52525b;
  box-shadow: none;
}
.mock-task strong {
  display: block;
  color: #f4f4f5;
  font-size: 0.92rem;
}
.mock-task small {
  color: #a1a1aa;
  font-size: 0.78rem;
}
.mock-side {
  display: grid;
  gap: 1rem;
}
.mock-card {
  padding: 0.9rem;
}
.mock-card.accent {
  background: rgba(var(--accent-rgb),0.10);
  border-color: rgba(var(--accent-rgb),0.25);
}
.mock-card p {
  color: #e4e4e7;
  font-size: 0.86rem;
  line-height: 1.5;
  margin-top: 0.5rem;
}
.mock-day {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  color: #c7c7d1;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--br-1);
  font-size: 0.82rem;
}
.mock-day:last-child { border-bottom: 0; }
.mock-day.active b { color: var(--accent); }
.landing-section {
  padding: 4rem 0 2rem;
}
.landing-section-head {
  max-width: 46rem;
  margin-bottom: 1.4rem;
}
.landing-section-head h2,
.landing-fit h2 {
  font-size: clamp(1.8rem, 3vw, 2.75rem);
}
.landing-section-head p {
  color: #a1a1aa;
  line-height: 1.65;
  margin-top: 0.8rem;
}
.landing-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.landing-card {
  padding: 1.15rem;
}
.landing-card-icon {
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 800;
}
.landing-card h3 {
  color: #f4f4f5;
  margin-top: 0.75rem;
  font-weight: 750;
}
.landing-card p {
  color: #a1a1aa;
  font-size: 0.92rem;
  line-height: 1.6;
  margin-top: 0.45rem;
}
.landing-fit {
  margin-top: 2rem;
  border: 1px solid rgba(var(--accent-rgb),0.22);
  background: rgba(var(--accent-rgb),0.08);
  border-radius: 1rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(16rem, 1.1fr);
  gap: 1.5rem;
}
.landing-fit ul {
  color: #d4d4d8;
  line-height: 1.75;
  list-style: none;
}
.landing-fit li {
  position: relative;
  padding-left: 1.3rem;
  margin: 0.35rem 0;
}
.landing-fit li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: var(--accent);
}

@media (max-width: 900px) {
  .landing-hero,
  .landing-fit {
    grid-template-columns: 1fr;
  }
  .landing-copy h1 {
    max-width: 11ch;
  }
  .landing-cards {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .landing-shell {
    width: min(100% - 1rem, 1180px);
    padding-top: 0.75rem;
  }
  .landing-nav {
    align-items: flex-start;
  }
  .landing-nav-actions .navlink {
    display: none;
  }
  .landing-copy h1 {
    font-size: 2.65rem;
  }
  .landing-copy p {
    font-size: 1rem;
  }
  .mock-grid {
    grid-template-columns: 1fr;
  }
  .landing-actions .btn {
    width: 100%;
  }
}

/* === PUBLIC DEMO === */
.demo-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 4rem;
}
.demo-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1.5rem;
  padding: 2rem 0 1.5rem;
}
.demo-hero-wide {
  min-height: min(35rem, calc(100vh - 7rem));
  align-items: center;
}
.demo-hero h1 {
  font-family: 'Manrope', 'Inter', sans-serif;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.02;
  color: #f8fafc;
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  max-width: 12ch;
}
.demo-hero p {
  color: #a1a1aa;
  max-width: 42rem;
  margin-top: 1rem;
  line-height: 1.65;
}
.demo-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(7rem, 1fr));
  gap: 0.65rem;
}
.demo-summary span {
  background: var(--bg-1);
  border: 1px solid var(--br-1);
  border-radius: 0.8rem;
  padding: 0.8rem;
  color: #a1a1aa;
  font-size: 0.82rem;
}
.demo-summary b {
  display: block;
  color: var(--accent);
  font-size: 1.55rem;
  font-family: 'Manrope', sans-serif;
}
.demo-app {
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.demo-sidebar {
  position: sticky;
  top: 1rem;
  display: grid;
  gap: 0.35rem;
  background: var(--bg-1);
  border: 1px solid var(--br-1);
  border-radius: 0.85rem;
  padding: 0.5rem;
}
.demo-sidebar a {
  color: #a1a1aa;
  border-radius: 0.55rem;
  padding: 0.65rem 0.75rem;
  font-size: 0.9rem;
}
.demo-sidebar a:hover,
.demo-sidebar a.active {
  color: var(--accent);
  background: var(--accent-soft);
}
.demo-board {
  display: grid;
  gap: 1rem;
}
.demo-board-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}
.demo-playground {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 1rem;
  align-items: stretch;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  margin: 0 0 1.5rem;
  border-color: rgba(var(--accent-rgb),0.28);
  background: linear-gradient(135deg, rgba(var(--accent-rgb),0.11), var(--bg-1) 60%);
}
.demo-playground-copy h2 {
  color: #f8fafc;
  font-family: 'Manrope', 'Inter', sans-serif;
  font-weight: 800;
  font-size: clamp(1.45rem, 2.6vw, 2.25rem);
  line-height: 1.08;
}
.demo-playground-copy p {
  color: #a1a1aa;
  line-height: 1.55;
  margin: 0.55rem 0 0.85rem;
}
.demo-playground-copy textarea {
  width: 100%;
  min-height: 7rem;
  resize: vertical;
  display: block;
  margin-bottom: 0.75rem;
}
.demo-playground-result {
  display: grid;
  gap: 0.65rem;
}
.demo-playground-result div {
  background: rgba(10,10,11,0.58);
  border: 1px solid var(--br-1);
  border-radius: 0.75rem;
  padding: 0.85rem;
}
.demo-playground-result span {
  display: inline-flex;
  color: var(--accent);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 800;
}
.demo-playground-result b {
  display: block;
  color: #f4f4f5;
  margin-top: 0.25rem;
}
.demo-playground-result small {
  display: block;
  color: #a1a1aa;
  margin-top: 0.15rem;
}
.demo-panel {
  padding: clamp(1rem, 2vw, 1.35rem);
  scroll-margin-top: 1rem;
}
.demo-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.demo-panel h2 {
  color: #f4f4f5;
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  margin-top: 0.15rem;
}
.demo-task {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  border: 1px solid var(--br-1);
  background: var(--bg-0);
  border-radius: 0.8rem;
  padding: 0.85rem;
  margin-top: 0.65rem;
}
.demo-task.must {
  background: rgba(var(--accent-rgb),0.09);
  border-color: rgba(var(--accent-rgb),0.30);
}
.demo-check {
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  border: 2px solid var(--accent);
  margin-top: 0.15rem;
  box-shadow: 0 0 0 4px var(--accent-soft);
  flex: 0 0 auto;
}
.demo-check.muted {
  border-color: #52525b;
  box-shadow: none;
}
.demo-task strong,
.demo-project strong,
.demo-job-grid b {
  display: block;
  color: #f4f4f5;
}
.demo-task small,
.demo-job-grid small {
  display: block;
  color: #a1a1aa;
  margin-top: 0.15rem;
}
.demo-week {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
}
.demo-week div,
.demo-job-grid div {
  background: var(--bg-0);
  border: 1px solid var(--br-1);
  border-radius: 0.75rem;
  padding: 0.8rem;
}
.demo-week .active {
  background: var(--accent-soft);
  border-color: rgba(var(--accent-rgb),0.30);
}
.demo-week b {
  display: block;
  color: var(--accent);
}
.demo-week span,
.demo-job-grid span {
  color: #c7c7d1;
  font-size: 0.86rem;
}
.demo-inbox-row {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  border-bottom: 1px solid var(--br-1);
  padding: 0.75rem 0;
}
.demo-inbox-row:last-child { border-bottom: 0; }
.demo-inbox-row span {
  width: 5.5rem;
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}
.demo-inbox-row p {
  color: #d4d4d8;
}
.demo-project {
  background: var(--bg-0);
  border: 1px solid var(--br-1);
  border-radius: 0.75rem;
  padding: 0.9rem;
  margin-top: 0.7rem;
}
.demo-project p {
  color: #a1a1aa;
  margin-top: 0.3rem;
}
.demo-project span {
  display: inline-flex;
  margin-top: 0.55rem;
  color: var(--accent);
  font-size: 0.85rem;
}
.demo-job-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}
.demo-routines {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.demo-routines span {
  background: var(--accent-soft);
  color: #f4f4f5;
  border: 1px solid rgba(var(--accent-rgb),0.25);
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  font-size: 0.88rem;
}
.demo-cta {
  margin-top: 1.25rem;
  border: 1px solid rgba(var(--accent-rgb),0.25);
  background: rgba(var(--accent-rgb),0.08);
  border-radius: 1rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.demo-cta h2 {
  color: #f8fafc;
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  max-width: 34rem;
}
.demo-edition-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0 0 1.25rem;
  position: sticky;
  top: 0.5rem;
  z-index: 5;
}
.demo-edition-tabs a {
  display: block;
  background: rgba(19,19,22,0.92);
  backdrop-filter: blur(10px);
  border: 1px solid var(--br-1);
  border-radius: 0.75rem;
  padding: 0.85rem;
  color: #a1a1aa;
}
.demo-edition-tabs a:hover,
.demo-edition-tabs a.active {
  color: #f4f4f5;
  border-color: rgba(var(--accent-rgb),0.35);
  background: rgba(var(--accent-rgb),0.12);
}
.demo-edition-tabs b {
  display: block;
  color: var(--accent);
  font-family: 'Manrope', 'Inter', sans-serif;
}
.demo-edition-tabs span {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.8rem;
}
.demo-edition {
  scroll-margin-top: 6rem;
  padding: 2.5rem 0 0;
}
.demo-edition-head {
  max-width: 52rem;
  margin-bottom: 1rem;
}
.demo-edition-head h2 {
  font-family: 'Manrope', 'Inter', sans-serif;
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: 0;
  color: #f8fafc;
  font-size: clamp(1.9rem, 4vw, 3.6rem);
}
.demo-edition-head p {
  color: #a1a1aa;
  line-height: 1.65;
  margin-top: 0.75rem;
}
.demo-edition-cta {
  margin-top: 0.9rem;
}
body.mode-light .demo-edition-tabs a {
  background: rgba(255,255,255,0.94);
}
body.mode-light .demo-edition-tabs a:hover,
body.mode-light .demo-edition-tabs a.active {
  color: #18181b;
  background: rgba(var(--accent-rgb),0.12);
}
body.mode-light .demo-edition-head h2,
body.mode-light .demo-cta h2,
body.mode-light .demo-playground-copy h2,
body.mode-light .demo-playground-result b {
  color: #18181b;
}
body.mode-light .demo-playground-copy p,
body.mode-light .demo-playground-result small {
  color: #52525b;
}
body.mode-light .demo-playground-result div {
  background: rgba(255,255,255,0.72);
}
@media (max-width: 860px) {
  .demo-hero,
  .demo-app,
  .demo-cta,
  .demo-edition-tabs,
  .demo-board-grid,
  .demo-playground {
    grid-template-columns: 1fr;
  }
  .demo-sidebar {
    position: static;
    display: flex;
    overflow-x: auto;
  }
  .demo-sidebar a {
    white-space: nowrap;
  }
  .demo-week,
  .demo-job-grid {
    grid-template-columns: 1fr;
  }
  .demo-cta {
    align-items: stretch;
  }
}

/* === ADHD GUIDE === */
.adhd-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 4rem;
}
.adhd-hero {
  min-height: min(42rem, calc(100vh - 7rem));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.55fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  padding: 2rem 0;
}
.adhd-hero h1,
.adhd-method h2 {
  font-family: 'Manrope', 'Inter', sans-serif;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.03;
  color: #f8fafc;
}
.adhd-hero h1 {
  font-size: clamp(2.35rem, 5vw, 5rem);
  max-width: 13ch;
}
.adhd-hero p {
  color: #b7b7c0;
  line-height: 1.7;
  margin-top: 1rem;
  max-width: 43rem;
}
.adhd-note {
  padding: 1.15rem;
  border-color: rgba(var(--accent-rgb),0.28);
  background: linear-gradient(145deg, rgba(var(--accent-rgb),0.12), var(--bg-1) 68%);
}
.adhd-note b {
  display: block;
  color: #f4f4f5;
  font-size: 1.05rem;
}
.adhd-note p {
  color: #d4d4d8;
  line-height: 1.55;
  margin-top: 0.6rem;
}
.adhd-note span {
  display: inline-flex;
  margin-top: 1rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
}
.adhd-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.adhd-card {
  padding: 1.15rem;
}
.adhd-card > span {
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  font-weight: 800;
}
.adhd-card h2 {
  color: #f4f4f5;
  font-family: 'Manrope', 'Inter', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 1.15;
  margin-top: 0.75rem;
}
.adhd-card p {
  color: #a1a1aa;
  line-height: 1.6;
  margin-top: 0.55rem;
}
.adhd-card ul {
  list-style: none;
  margin-top: 0.9rem;
  display: grid;
  gap: 0.45rem;
}
.adhd-card li {
  position: relative;
  color: #d4d4d8;
  font-size: 0.88rem;
  line-height: 1.45;
  padding-left: 1rem;
}
.adhd-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 999px;
  background: var(--accent);
}
.adhd-method {
  margin-top: 1rem;
  padding: clamp(1.15rem, 3vw, 1.75rem);
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: 1.25rem;
  border-color: rgba(var(--accent-rgb),0.22);
}
.adhd-method h2 {
  font-size: clamp(1.55rem, 3vw, 2.35rem);
}
.adhd-method ol {
  list-style: none;
  display: grid;
  gap: 0.65rem;
}
.adhd-method li {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--br-1);
}
.adhd-method li:last-child { border-bottom: 0; }
.adhd-method b { color: var(--accent); }
.adhd-method span { color: #c7c7d1; line-height: 1.45; }
.adhd-sources {
  max-width: 58rem;
  margin-top: 1rem;
  color: #8f8f98;
  font-size: 0.84rem;
  line-height: 1.6;
}

/* === TRUST / SECURITY PAGE === */
.trust-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 4rem;
}
.trust-hero {
  max-width: 58rem;
  padding: 2rem 0 1.5rem;
}
.trust-hero h1,
.trust-roadmap h2 {
  color: #f8fafc;
  font-family: 'Manrope', 'Inter', sans-serif;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.03;
}
.trust-hero h1 {
  font-size: clamp(2.35rem, 5vw, 4.8rem);
  max-width: 13ch;
}
.trust-hero p {
  color: #b7b7c0;
  line-height: 1.7;
  margin-top: 1rem;
  max-width: 47rem;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.trust-card {
  padding: 1.15rem;
}
.trust-card > span {
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  font-weight: 800;
}
.trust-card h2 {
  color: #f4f4f5;
  font-family: 'Manrope', 'Inter', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  margin-top: 0.65rem;
}
.trust-card p {
  color: #a1a1aa;
  line-height: 1.6;
  margin-top: 0.5rem;
}
.trust-roadmap {
  margin-top: 1rem;
  padding: clamp(1.15rem, 3vw, 1.75rem);
  display: grid;
  grid-template-columns: minmax(0, 0.65fr) minmax(0, 1.35fr);
  gap: 1.25rem;
  border-color: rgba(var(--accent-rgb),0.25);
}
.trust-roadmap h2 {
  font-size: clamp(1.55rem, 3vw, 2.35rem);
}
.trust-roadmap ul {
  list-style: none;
  display: grid;
  gap: 0.65rem;
}
.trust-roadmap li {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--br-1);
}
.trust-roadmap li:last-child { border-bottom: 0; padding-bottom: 0; }
.trust-roadmap b { color: var(--accent); }
.trust-roadmap span { color: #c7c7d1; line-height: 1.45; }
body.mode-light .trust-hero h1,
body.mode-light .trust-roadmap h2,
body.mode-light .trust-card h2 { color: #18181b; }
body.mode-light .trust-hero p,
body.mode-light .trust-card p { color: #52525b; }
body.mode-light .trust-roadmap span { color: #3f3f46; }
@media (max-width: 900px) {
  .trust-grid,
  .trust-roadmap {
    grid-template-columns: 1fr;
  }
  .trust-roadmap li {
    grid-template-columns: 1fr;
  }
}

body.mode-light .adhd-hero h1,
body.mode-light .adhd-method h2,
body.mode-light .adhd-card h2,
body.mode-light .adhd-note b { color: #18181b; }
body.mode-light .adhd-hero p,
body.mode-light .adhd-card p,
body.mode-light .adhd-sources { color: #52525b; }
body.mode-light .adhd-card li,
body.mode-light .adhd-method span,
body.mode-light .adhd-note p { color: #3f3f46; }
@media (max-width: 900px) {
  .adhd-hero,
  .adhd-method {
    grid-template-columns: 1fr;
  }
  .adhd-grid {
    grid-template-columns: 1fr;
  }
}

/* === EDITIONS / POSITIONING === */
.editions-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 4rem;
}
.editions-hero {
  padding: 2rem 0 1.5rem;
  max-width: 55rem;
}
.editions-hero h1 {
  font-family: 'Manrope', 'Inter', sans-serif;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.02;
  color: #f8fafc;
  font-size: clamp(2.35rem, 5vw, 4.7rem);
  max-width: 13ch;
}
.editions-hero p {
  color: #a1a1aa;
  line-height: 1.7;
  margin-top: 1rem;
  max-width: 46rem;
}
.editions-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.edition-card {
  padding: 1.15rem;
  min-height: 24rem;
  display: flex;
  flex-direction: column;
}
.edition-card.featured {
  border-color: rgba(var(--accent-rgb),0.32);
  background: linear-gradient(180deg, rgba(var(--accent-rgb),0.12), var(--bg-1));
}
.edition-top {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #f4f4f5;
  margin-bottom: 1rem;
}
.edition-top span {
  font-size: 1.8rem;
}
.edition-top b {
  font-family: 'Manrope', sans-serif;
}
.edition-card h2 {
  color: #f8fafc;
  font-family: 'Manrope', sans-serif;
  font-size: 1.35rem;
  line-height: 1.12;
}
.edition-card p {
  color: #a1a1aa;
  line-height: 1.6;
  margin-top: 0.75rem;
  font-size: 0.94rem;
}
.edition-card ul {
  list-style: none;
  margin-top: 1rem;
  display: grid;
  gap: 0.45rem;
}
.edition-card li {
  color: #d4d4d8;
  font-size: 0.9rem;
  position: relative;
  padding-left: 1.05rem;
}
.edition-card li::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 999px;
  background: var(--accent);
  position: absolute;
  left: 0;
  top: 0.55rem;
}
.edition-price {
  margin-top: auto;
  color: var(--accent);
  font-size: 0.86rem;
  padding-top: 1.25rem;
}
.editions-roadmap {
  margin-top: 1.25rem;
  border: 1px solid rgba(var(--accent-rgb),0.25);
  background: rgba(var(--accent-rgb),0.08);
  border-radius: 1rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 1.5rem;
}
.editions-roadmap h2 {
  color: #f8fafc;
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: clamp(1.45rem, 3vw, 2.4rem);
  line-height: 1.08;
}
.editions-roadmap ol {
  list-style: none;
  display: grid;
  gap: 0.65rem;
  counter-reset: roadmap;
}
.editions-roadmap li {
  counter-increment: roadmap;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 0.7rem;
  align-items: baseline;
  color: #d4d4d8;
}
.editions-roadmap li::before {
  content: counter(roadmap, decimal-leading-zero);
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
}
.editions-roadmap b {
  color: #f4f4f5;
}
.editions-roadmap span {
  grid-column: 2;
  color: #a1a1aa;
  font-size: 0.92rem;
}
@media (max-width: 1050px) {
  .editions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .editions-grid,
  .editions-roadmap {
    grid-template-columns: 1fr;
  }
  .edition-card {
    min-height: 0;
  }
}

/* === FIELD REPORT === */
.report-sheet {
  background: var(--bg-1);
  border: 1px solid var(--br-1);
  border-radius: 0.75rem;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  box-shadow: 0 18px 60px rgba(0,0,0,0.22);
  color: var(--text-1);
}
.report-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.report-head {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  border-bottom: 1px solid var(--br-1);
  padding-bottom: 1.25rem;
}
.report-kicker {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.report-head h1 {
  color: var(--text-0);
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: 0;
  margin-top: 0.35rem;
}
.report-head p {
  color: var(--text-2);
  margin-top: 0.55rem;
}
.report-status {
  min-width: 10rem;
  text-align: right;
}
.report-status span {
  display: inline-flex;
  border: 1px solid rgba(var(--accent-rgb),0.3);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(var(--accent-rgb),0.08);
  padding: 0.35rem 0.7rem;
  font-weight: 800;
}
.report-status small {
  display: block;
  color: var(--text-3);
  margin-top: 0.55rem;
}
.report-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.25rem 0;
}
.report-meta div {
  border: 1px solid var(--br-1);
  border-radius: 0.5rem;
  padding: 0.85rem;
}
.report-meta span {
  display: block;
  color: var(--text-3);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.report-meta b {
  display: block;
  color: var(--text-0);
  margin-top: 0.3rem;
}
.report-section {
  border-top: 1px solid var(--br-1);
  padding-top: 1.25rem;
  margin-top: 1.25rem;
}
.report-section h2 {
  color: var(--text-0);
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 0.8rem;
}
.report-summary,
.report-timeline p {
  color: var(--text-1);
  line-height: 1.7;
  white-space: pre-wrap;
}
.report-empty {
  color: var(--text-3);
}
.report-timeline {
  display: grid;
  gap: 0.85rem;
}
.report-timeline li {
  border-left: 3px solid rgba(var(--accent-rgb),0.45);
  padding-left: 0.85rem;
}
.report-timeline time {
  color: var(--text-3);
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  margin-bottom: 0.25rem;
}
.report-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}
.report-photo-grid figure {
  break-inside: avoid;
}
.report-photo-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--br-1);
  border-radius: 0.5rem;
}
.report-photo-grid figcaption {
  color: var(--text-2);
  font-size: 0.85rem;
  margin-top: 0.35rem;
}
@media (max-width: 760px) {
  .report-head,
  .report-meta {
    grid-template-columns: 1fr;
  }
  .report-head {
    display: grid;
  }
  .report-status {
    text-align: left;
  }
  .report-photo-grid {
    grid-template-columns: 1fr;
  }
}
@media print {
  body {
    background: #fff !important;
    color: #111 !important;
  }
  body > header,
  .botnav,
  .report-actions,
  #top-progress {
    display: none !important;
  }
  main {
    max-width: none !important;
    padding: 0 !important;
  }
  .report-sheet {
    background: #fff !important;
    color: #111 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
  .report-head,
  .report-section,
  .report-meta div,
  .report-photo-grid img {
    border-color: #ddd !important;
  }
  .report-head h1,
  .report-section h2,
  .report-meta b,
  .report-summary,
  .report-timeline p {
    color: #111 !important;
  }
  .report-head p,
  .report-empty,
  .report-meta span,
  .report-timeline time,
  .report-photo-grid figcaption,
  .report-status small {
    color: #555 !important;
  }
  .report-status span,
  .report-kicker {
    color: #111 !important;
    background: transparent !important;
    border-color: #ddd !important;
  }
}

/* === PUBLIC LEAD REQUEST === */
.lead-shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 4rem;
}
.lead-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(22rem, 0.75fr);
  gap: clamp(1.25rem, 4vw, 3rem);
  align-items: start;
  padding-top: clamp(2rem, 6vw, 5rem);
}
.lead-copy h1 {
  color: #f8fafc;
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: clamp(2.5rem, 5vw, 5rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: 0;
  max-width: 12ch;
  margin-top: 0.5rem;
}
.lead-copy p {
  color: #a1a1aa;
  line-height: 1.75;
  margin-top: 1rem;
  max-width: 42rem;
}
.lead-copy ul {
  display: grid;
  gap: 0.55rem;
  margin-top: 1.25rem;
  color: #d4d4d8;
}
.lead-copy li {
  position: relative;
  padding-left: 1rem;
}
.lead-copy li::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 999px;
  background: var(--accent);
  position: absolute;
  left: 0;
  top: 0.65rem;
}
.lead-panel {
  padding: clamp(1rem, 3vw, 1.5rem);
}
.lead-panel h2 {
  color: #f8fafc;
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: 1rem;
}
.lead-form {
  display: grid;
  gap: 0.9rem;
}
.lead-form label {
  display: grid;
  gap: 0.35rem;
}
.lead-form label span {
  color: #a1a1aa;
  font-size: 0.82rem;
}
.lead-form textarea {
  resize: vertical;
}
.lead-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.lead-success {
  display: grid;
  gap: 0.8rem;
}
.lead-success span {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.lead-success p {
  color: #a1a1aa;
}
@media (max-width: 860px) {
  .lead-grid {
    grid-template-columns: 1fr;
    padding-top: 2rem;
  }
}

/* === HELP / TUTORIAL === */
.guide-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.25rem;
  align-items: end;
  margin-bottom: 1.25rem;
}
.guide-kicker,
.guide-step {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.guide-hero h1 {
  color: #f8fafc;
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: 0;
  max-width: 13ch;
  margin-top: 0.45rem;
}
.guide-hero p {
  color: #a1a1aa;
  line-height: 1.7;
  max-width: 48rem;
  margin-top: 0.8rem;
}
.guide-quick {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}
.guide-layout {
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.guide-index {
  position: sticky;
  top: 5rem;
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem;
}
.guide-index a {
  color: #a1a1aa;
  border-radius: 0.45rem;
  padding: 0.5rem 0.6rem;
  font-size: 0.88rem;
}
.guide-index a:hover {
  color: #f4f4f5;
  background: var(--bg-2);
}
.guide-content {
  display: grid;
  gap: 1rem;
}
.guide-section {
  padding: clamp(1rem, 2.5vw, 1.35rem);
  scroll-margin-top: 5.5rem;
}
.guide-section h2 {
  color: #f8fafc;
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  margin: 0.25rem 0 0.85rem;
}
.guide-section p,
.guide-section li {
  color: #d4d4d8;
  line-height: 1.65;
}
.guide-section a {
  color: var(--accent);
}
.guide-section ol,
.guide-section ul {
  display: grid;
  gap: 0.55rem;
  padding-left: 1.15rem;
}
.guide-section ol {
  list-style: decimal;
}
.guide-section ul {
  list-style: disc;
}
.guide-flow,
.guide-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}
.guide-flow div,
.guide-cards article {
  background: var(--bg-0);
  border: 1px solid var(--br-1);
  border-radius: 0.6rem;
  padding: 0.85rem;
}
.guide-flow b,
.guide-cards b {
  color: #f4f4f5;
}
.guide-flow p,
.guide-cards p {
  color: #a1a1aa;
  font-size: 0.92rem;
  margin-top: 0.35rem;
}
.guide-cards a {
  display: inline-flex;
  margin-top: 0.55rem;
  font-size: 0.88rem;
}
@media (max-width: 900px) {
  .guide-hero,
  .guide-layout {
    grid-template-columns: 1fr;
  }
  .guide-quick {
    justify-content: flex-start;
  }
  .guide-index {
    position: static;
    display: flex;
    overflow-x: auto;
  }
  .guide-index a {
    white-space: nowrap;
  }
  .guide-flow,
  .guide-cards {
    grid-template-columns: 1fr;
  }
}

/* === HELP / TUTORIAL V2 === */
.guide-v2-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem);
  gap: clamp(1rem, 4vw, 2.5rem);
  align-items: center;
  margin-bottom: 1rem;
}
.guide-v2-copy span,
.guide-v2-rules span {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.guide-v2-copy h1 {
  color: #f8fafc;
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: clamp(2.4rem, 7vw, 5.2rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: 0;
  max-width: 9ch;
  margin-top: 0.45rem;
}
.guide-v2-copy p {
  color: #a1a1aa;
  font-size: 1rem;
  line-height: 1.65;
  max-width: 38rem;
  margin-top: 0.9rem;
}
.guide-phone {
  justify-self: end;
  width: min(100%, 20rem);
  aspect-ratio: 9 / 16;
  border: 1px solid rgba(var(--accent-rgb),0.22);
  border-radius: 2rem;
  padding: 0.7rem;
  background: linear-gradient(145deg, rgba(var(--accent-rgb),0.16), #101013);
  box-shadow: 0 24px 70px rgba(0,0,0,0.35);
  animation: guideFloat 4.5s ease-in-out infinite;
}
.guide-phone-top {
  width: 4.5rem;
  height: 0.35rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  margin: 0 auto 0.8rem;
}
.guide-phone-screen {
  height: calc(100% - 1.15rem);
  border-radius: 1.35rem;
  background:
    radial-gradient(16rem 10rem at 80% 0%, rgba(var(--accent-rgb),0.18), transparent 60%),
    var(--bg-0);
  border: 1px solid var(--br-1);
  padding: 1rem;
  display: grid;
  align-content: center;
  gap: 0.8rem;
}
.guide-mini-label {
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
}
.guide-mini-task {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.6rem;
  align-items: center;
  border: 1px solid var(--br-1);
  border-radius: 0.8rem;
  padding: 0.8rem;
  background: var(--bg-1);
}
.guide-mini-task.active {
  border-color: rgba(var(--accent-rgb),0.4);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb),0.08);
}
.guide-mini-task i {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 999px;
  background: var(--accent);
  animation: guidePulse 1.6s ease-in-out infinite;
}
.guide-mini-task b {
  color: #f4f4f5;
}
.guide-mini-task small {
  color: #a1a1aa;
  font-size: 0.75rem;
}
.guide-mini-pill {
  justify-self: start;
  color: var(--accent);
  background: rgba(var(--accent-rgb),0.1);
  border: 1px solid rgba(var(--accent-rgb),0.25);
  border-radius: 999px;
  padding: 0.45rem 0.7rem;
  font-size: 0.8rem;
}
.guide-v2-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}
.guide-v2-action {
  display: grid;
  gap: 0.25rem;
  border: 1px solid var(--br-1);
  border-radius: 0.75rem;
  background: var(--bg-1);
  padding: 1rem;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}
.guide-v2-action:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--accent-rgb),0.35);
  background: var(--bg-2);
}
.guide-v2-action span {
  width: 1.7rem;
  height: 1.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-text);
  background: var(--accent);
  border-radius: 999px;
  font-weight: 800;
}
.guide-v2-action b {
  color: #f4f4f5;
}
.guide-v2-action small {
  color: #a1a1aa;
  line-height: 1.45;
}
.guide-v2-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}
.guide-v2-card {
  border: 1px solid var(--br-1);
  border-radius: 0.8rem;
  background: var(--bg-1);
  padding: 0.95rem;
  display: grid;
  gap: 0.75rem;
  align-content: start;
  min-height: 21rem;
}
.guide-v2-card.primary {
  border-color: rgba(var(--accent-rgb),0.32);
  background: linear-gradient(180deg, rgba(var(--accent-rgb),0.11), var(--bg-1));
}
.guide-v2-card h2 {
  color: #f4f4f5;
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.12;
}
.guide-v2-card p {
  color: #a1a1aa;
  line-height: 1.55;
  font-size: 0.92rem;
}
.guide-card-art {
  min-height: 8.5rem;
  border: 1px solid var(--br-1);
  border-radius: 0.65rem;
  background:
    radial-gradient(12rem 7rem at 80% 0%, rgba(var(--accent-rgb),0.16), transparent 60%),
    var(--bg-0);
  overflow: hidden;
  position: relative;
  padding: 0.85rem;
}
.today-art {
  display: grid;
  align-content: center;
  gap: 0.55rem;
}
.today-art div {
  height: 1rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.11);
}
.today-art div:first-child {
  width: 78%;
  background: var(--accent);
  animation: guideBar 2.4s ease-in-out infinite;
}
.today-art div:nth-child(2) { width: 58%; }
.today-art div:nth-child(3) { width: 42%; }
.chat-art {
  display: grid;
  align-content: center;
  gap: 0.75rem;
}
.chat-art span {
  color: #e7e7ea;
  background: var(--bg-2);
  border-radius: 0.9rem 0.9rem 0.9rem 0.25rem;
  padding: 0.65rem;
  font-size: 0.82rem;
}
.chat-art i {
  width: 1.5rem;
  height: 1.5rem;
  border: solid var(--accent);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
  justify-self: center;
  animation: guideDrop 1.7s ease-in-out infinite;
}
.chat-art b {
  justify-self: end;
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb),0.28);
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
}
.inbox-art {
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  gap: 0.45rem;
}
.inbox-art span {
  color: #d4d4d8;
  background: var(--bg-2);
  border: 1px solid var(--br-1);
  border-radius: 999px;
  padding: 0.45rem 0.65rem;
  animation: guideWiggle 3s ease-in-out infinite;
}
.inbox-art span:nth-child(2) { animation-delay: 0.2s; }
.inbox-art span:nth-child(3) { animation-delay: 0.4s; }
.project-art {
  display: grid;
  gap: 0.55rem;
  align-content: center;
}
.project-art strong,
.project-art em,
.project-art small {
  border-radius: 0.55rem;
  padding: 0.55rem;
  font-style: normal;
}
.project-art strong { color: #f4f4f5; background: var(--bg-2); }
.project-art em { color: var(--accent); background: rgba(var(--accent-rgb),0.1); }
.project-art small { color: #a1a1aa; border: 1px dashed var(--br-2); }
.work-art {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  align-content: center;
}
.work-art div {
  aspect-ratio: 1;
  border-radius: 0.45rem;
  background: linear-gradient(135deg, var(--bg-3), rgba(var(--accent-rgb),0.2));
}
.work-art span {
  grid-column: 1 / -1;
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb),0.3);
  border-radius: 999px;
  padding: 0.45rem;
  text-align: center;
}
.routine-art {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  align-content: center;
}
.routine-art i {
  aspect-ratio: 1;
  border-radius: 999px;
  background: rgba(var(--accent-rgb),0.14);
  border: 1px solid rgba(var(--accent-rgb),0.25);
  position: relative;
}
.routine-art i::after {
  content: "";
  position: absolute;
  inset: 35%;
  border-radius: 999px;
  background: var(--accent);
  animation: guidePulse 1.8s ease-in-out infinite;
}
.routine-art i:nth-child(2)::after { animation-delay: 0.2s; }
.routine-art i:nth-child(3)::after { animation-delay: 0.4s; }
.routine-art i:nth-child(4)::after { animation-delay: 0.6s; }
.guide-v2-rules {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: 1rem;
  margin-top: 1rem;
  padding: 1rem;
}
.guide-v2-rules h2 {
  color: #f8fafc;
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  margin-top: 0.3rem;
}
.guide-v2-rules ul {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}
.guide-v2-rules li {
  list-style: none;
  background: var(--bg-0);
  border: 1px solid var(--br-1);
  border-radius: 0.6rem;
  padding: 0.75rem;
}
.guide-v2-rules b {
  display: block;
  color: var(--accent);
}
.guide-v2-rules small {
  display: block;
  color: #a1a1aa;
  line-height: 1.45;
  margin-top: 0.3rem;
}
@keyframes guideFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-0.45rem); }
}
@keyframes guidePulse {
  0%, 100% { transform: scale(1); opacity: 0.75; }
  50% { transform: scale(1.18); opacity: 1; }
}
@keyframes guideBar {
  0%, 100% { width: 62%; }
  50% { width: 86%; }
}
@keyframes guideDrop {
  0%, 100% { transform: rotate(45deg) translate(0, 0); }
  50% { transform: rotate(45deg) translate(0.25rem, 0.25rem); }
}
@keyframes guideWiggle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-0.15rem); }
}
@media (prefers-reduced-motion: reduce) {
  .guide-phone,
  .guide-mini-task i,
  .today-art div:first-child,
  .chat-art i,
  .inbox-art span,
  .routine-art i::after {
    animation: none !important;
  }
}
@media (max-width: 980px) {
  .guide-v2-board,
  .guide-v2-rules ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .guide-v2-hero,
  .guide-v2-rules {
    grid-template-columns: 1fr;
  }
  .guide-phone {
    justify-self: stretch;
    width: 100%;
    max-height: 26rem;
  }
  .guide-v2-strip,
  .guide-v2-board,
  .guide-v2-rules ul {
    grid-template-columns: 1fr;
  }
  .guide-v2-card {
    min-height: 0;
  }
}

/* =============================================================================
   FORM CONTROLS — dark/light mode fix per widget nativi del browser.
   Bug: <input type="date|time|datetime-local"> e autofill Chrome/Edge mostrano
   "box bianche con testo bianco" in dark mode perche' ignorano color-scheme
   sui sotto-componenti webkit (es. ::-webkit-datetime-edit, autofill).
   ============================================================================= */

/* dichiarazione esplicita su ogni input/select/textarea — alcune build Safari
   iOS non ereditano color-scheme da :root in modo affidabile su input nativi. */
input, select, textarea {
  color-scheme: dark;
}
body.mode-light input,
body.mode-light select,
body.mode-light textarea {
  color-scheme: light;
}

/* input type=date / time / datetime-local: il valore visualizzato e i separatori
   ("/", ":") vengono renderizzati da pseudo-elementi webkit che NON ereditano
   color del parent. Senza queste regole, su sfondo scuro escono "bianco su bianco". */
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"],
input[type="week"] {
  color: #e7e7ea;
  background-color: var(--bg-0);
}
input[type="date"]::-webkit-datetime-edit,
input[type="time"]::-webkit-datetime-edit,
input[type="datetime-local"]::-webkit-datetime-edit,
input[type="month"]::-webkit-datetime-edit,
input[type="week"]::-webkit-datetime-edit { color: #e7e7ea; }

input[type="date"]::-webkit-datetime-edit-text,
input[type="time"]::-webkit-datetime-edit-text,
input[type="datetime-local"]::-webkit-datetime-edit-text { color: #a1a1aa; padding: 0 0.1em; }

input[type="date"]::-webkit-datetime-edit-month-field,
input[type="date"]::-webkit-datetime-edit-day-field,
input[type="date"]::-webkit-datetime-edit-year-field,
input[type="time"]::-webkit-datetime-edit-hour-field,
input[type="time"]::-webkit-datetime-edit-minute-field,
input[type="time"]::-webkit-datetime-edit-second-field,
input[type="time"]::-webkit-datetime-edit-ampm-field,
input[type="datetime-local"]::-webkit-datetime-edit-month-field,
input[type="datetime-local"]::-webkit-datetime-edit-day-field,
input[type="datetime-local"]::-webkit-datetime-edit-year-field,
input[type="datetime-local"]::-webkit-datetime-edit-hour-field,
input[type="datetime-local"]::-webkit-datetime-edit-minute-field { color: #e7e7ea; }

/* placeholder (valore vuoto "gg/mm/aaaa") */
input[type="date"]::-webkit-datetime-edit-fields-wrapper,
input[type="time"]::-webkit-datetime-edit-fields-wrapper,
input[type="datetime-local"]::-webkit-datetime-edit-fields-wrapper { color: #a1a1aa; }

/* icona del calendario/orologio (a destra dell'input) — in dark mode e' grigia
   scura su sfondo scuro, invisibile. Inverti col filtro. */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator,
input[type="week"]::-webkit-calendar-picker-indicator {
  filter: invert(0.9);
  opacity: 0.7;
  cursor: pointer;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover { opacity: 1; }

/* Light mode: riporta tutto ai colori scuri sullo sfondo chiaro */
body.mode-light input[type="date"],
body.mode-light input[type="time"],
body.mode-light input[type="datetime-local"],
body.mode-light input[type="month"],
body.mode-light input[type="week"] {
  color: #18181b;
  background-color: var(--bg-1);
}
body.mode-light input[type="date"]::-webkit-datetime-edit,
body.mode-light input[type="time"]::-webkit-datetime-edit,
body.mode-light input[type="datetime-local"]::-webkit-datetime-edit,
body.mode-light input[type="month"]::-webkit-datetime-edit,
body.mode-light input[type="week"]::-webkit-datetime-edit { color: #18181b; }

body.mode-light input[type="date"]::-webkit-datetime-edit-text,
body.mode-light input[type="time"]::-webkit-datetime-edit-text,
body.mode-light input[type="datetime-local"]::-webkit-datetime-edit-text { color: #52525b; }

body.mode-light input[type="date"]::-webkit-datetime-edit-month-field,
body.mode-light input[type="date"]::-webkit-datetime-edit-day-field,
body.mode-light input[type="date"]::-webkit-datetime-edit-year-field,
body.mode-light input[type="time"]::-webkit-datetime-edit-hour-field,
body.mode-light input[type="time"]::-webkit-datetime-edit-minute-field,
body.mode-light input[type="time"]::-webkit-datetime-edit-second-field,
body.mode-light input[type="time"]::-webkit-datetime-edit-ampm-field,
body.mode-light input[type="datetime-local"]::-webkit-datetime-edit-month-field,
body.mode-light input[type="datetime-local"]::-webkit-datetime-edit-day-field,
body.mode-light input[type="datetime-local"]::-webkit-datetime-edit-year-field,
body.mode-light input[type="datetime-local"]::-webkit-datetime-edit-hour-field,
body.mode-light input[type="datetime-local"]::-webkit-datetime-edit-minute-field { color: #18181b; }

body.mode-light input[type="date"]::-webkit-calendar-picker-indicator,
body.mode-light input[type="time"]::-webkit-calendar-picker-indicator,
body.mode-light input[type="datetime-local"]::-webkit-calendar-picker-indicator,
body.mode-light input[type="month"]::-webkit-calendar-picker-indicator,
body.mode-light input[type="week"]::-webkit-calendar-picker-indicator {
  filter: invert(0);
  opacity: 0.6;
}

/* Firefox: ha pseudo diversi ma rispetta color-scheme. Aggiungo color esplicito. */
@-moz-document url-prefix() {
  input[type="date"], input[type="time"], input[type="datetime-local"],
  input[type="month"], input[type="week"] { color: #e7e7ea; }
  body.mode-light input[type="date"], body.mode-light input[type="time"],
  body.mode-light input[type="datetime-local"],
  body.mode-light input[type="month"], body.mode-light input[type="week"] { color: #18181b; }
}

/* === AUTOFILL Chrome/Edge ===
   L'autofill colora di giallo/bianco lo sfondo, ignorando il dark mode.
   Trick standard: -webkit-box-shadow inset per "coprire" lo sfondo nativo. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--bg-0) inset !important;
  -webkit-text-fill-color: #e7e7ea !important;
  caret-color: #e7e7ea;
  transition: background-color 9999s ease-in-out 0s;
}
body.mode-light input:-webkit-autofill,
body.mode-light input:-webkit-autofill:hover,
body.mode-light input:-webkit-autofill:focus,
body.mode-light input:-webkit-autofill:active,
body.mode-light textarea:-webkit-autofill,
body.mode-light select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--bg-1) inset !important;
  -webkit-text-fill-color: #18181b !important;
  caret-color: #18181b;
}

/* === SELECT === la dropdown e' renderizzata dal sistema operativo ma le
   <option> ereditano da OS. Forziamo background/color almeno sul controllo. */
select.input,
select {
  background-color: var(--bg-0);
  color: #e7e7ea;
}
body.mode-light select.input,
body.mode-light select { background-color: var(--bg-1); color: #18181b; }
select option {
  background-color: var(--bg-1);
  color: #e7e7ea;
}
body.mode-light select option { background-color: #ffffff; color: #18181b; }

/* =============================================================================
   LEGAL pages — privacy policy, ToS (estende base_minimal.html)
   ============================================================================= */
.legal-shell {
  max-width: 760px;
  margin: 0 auto;
  padding: 1rem 1.25rem 4rem;
}
.legal-shell h1 {
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: clamp(1.75rem, 3vw + 1rem, 2.5rem);
  letter-spacing: -0.02em;
  font-weight: 800;
  margin: 1.5rem 0 0.5rem;
  background: linear-gradient(180deg, #ffffff 0%, #cfcfd6 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
body.mode-light .legal-shell h1 {
  background: linear-gradient(180deg, #18181b 0%, #52525b 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.legal-shell .updated { color: #71717a; font-size: 0.85rem; margin-bottom: 2rem; }
.legal-shell h2 {
  color: var(--accent);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 2rem 0 0.6rem;
}
.legal-shell p, .legal-shell li {
  color: #cfcfd6; font-size: 0.95rem; line-height: 1.65;
}
body.mode-light .legal-shell p,
body.mode-light .legal-shell li { color: #3f3f46; }
.legal-shell ul, .legal-shell ol { margin: 0.5rem 0 0.5rem 1.4rem; }
.legal-shell li { margin: 0.35rem 0; }
.legal-shell strong { color: #f4f4f5; }
body.mode-light .legal-shell strong { color: #18181b; }
.legal-shell a { color: var(--accent); }
.legal-shell a:hover { text-decoration: underline; }
.legal-shell code {
  background: var(--bg-2); padding: 0.1em 0.35em; border-radius: 0.25em;
  font-size: 0.85em;
}
.legal-shell .contact-box {
  background: var(--bg-1);
  border: 1px solid var(--br-1);
  border-radius: 0.625rem;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}
.legal-shell table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.85rem;
  background: var(--bg-1);
  border-radius: 0.5rem;
  overflow: hidden;
}
.legal-shell th, .legal-shell td {
  text-align: left;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--br-1);
  vertical-align: top;
}
.legal-shell th {
  background: var(--bg-2);
  color: #a1a1aa;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.legal-shell .landing-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0 1.5rem;
  border-bottom: 1px solid var(--br-1);
  margin-bottom: 1.5rem;
  gap: 0.75rem;
  flex-wrap: wrap;
}
@media (max-width: 640px) {
  .legal-shell table { font-size: 0.75rem; }
  .legal-shell th, .legal-shell td { padding: 0.45rem 0.55rem; }
}

/* =============================================================================
   SLOT TOGGLE — segmented control "must / could" per il form OGGI.
   Usa <input type="radio" name="slot"> nascosto e <span> stilizzato.
   ============================================================================= */
.slot-toggle {
  display: inline-flex;
  background: var(--bg-0);
  border: 1px solid var(--br-1);
  border-radius: 0.5rem;
  padding: 0.2rem;
  gap: 0.2rem;
  align-self: stretch;
  align-items: stretch;
}
.slot-toggle label {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  margin: 0;
}
.slot-toggle input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.slot-toggle span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #9b9ba3;
  transition: background 140ms, color 140ms, box-shadow 140ms;
  user-select: none;
  line-height: 1;
}
.slot-toggle label:hover span { color: #e7e7ea; }
.slot-toggle input[type="radio"]:checked + span {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.35);
}
.slot-toggle input[type="radio"]:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
body.mode-light .slot-toggle { background: var(--bg-1); }
body.mode-light .slot-toggle span { color: #52525b; }
body.mode-light .slot-toggle label:hover span { color: #18181b; }

/* =============================================================================
   HELP FAB — pulsante "?" floating + popover contestuale per pagina.
   ============================================================================= */
.help-fab-wrap {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 25;
}
@media (max-width: 768px) {
  .help-fab-wrap { bottom: calc(6rem + env(safe-area-inset-bottom)); right: 0.875rem; } /* sopra la botnav */
}
.help-fab {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 800;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 28px -10px rgba(var(--accent-rgb), 0.5), 0 0 0 0 rgba(var(--accent-rgb), 0);
  border: 1px solid rgba(var(--accent-rgb), 0.5);
  cursor: pointer;
  transition: transform 140ms, box-shadow 200ms, background 140ms;
}
.help-fab:hover { transform: translateY(-1px) scale(1.02); }
.help-fab[aria-expanded="true"] {
  background: var(--accent-from);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.15), 0 10px 28px -10px rgba(var(--accent-rgb), 0.5);
}

.help-popover {
  position: absolute;
  bottom: calc(100% + 0.5rem);
  right: 0;
  width: min(22rem, calc(100vw - 2rem));
  background: var(--bg-1);
  border: 1px solid var(--br-1);
  border-radius: 0.625rem;
  box-shadow: 0 20px 50px -20px rgba(0,0,0,0.6);
  padding: 0.75rem 0.875rem;
  font-size: 0.9rem;
  line-height: 1.45;
}
.help-popover[hidden] { display: none; }
.help-popover header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}
.help-popover header strong {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.help-popover-close {
  background: transparent;
  border: 0;
  color: #9b9ba3;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0 0.2rem;
}
.help-popover-close:hover { color: #e7e7ea; }
.help-popover p { color: #cfcfd6; margin: 0 0 0.6rem 0; }
.help-popover footer { border-top: 1px solid var(--br-1); padding-top: 0.5rem; }
.help-popover footer a { color: var(--accent); font-size: 0.8rem; }
.help-popover footer a:hover { text-decoration: underline; }
body.mode-light .help-popover { background: #ffffff; }
body.mode-light .help-popover p { color: #27272a; }
body.mode-light .help-popover-close { color: #52525b; }
body.mode-light .help-popover-close:hover { color: #18181b; }

/* =============================================================================
   ONBOARDING — walkthrough 5 step al primo login (resettabile).
   ============================================================================= */
.onboarding-shell {
  max-width: 44rem;
  margin: 1rem auto 6rem;
}
.onboarding-head {
  text-align: center;
  margin-bottom: 1.5rem;
}
.onboarding-kicker {
  display: inline-block;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.onboarding-head h1 {
  font-family: 'Manrope', 'Inter', sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 4vw + 0.5rem, 2.75rem);
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0 0 0.5rem 0;
  background: linear-gradient(180deg, #ffffff 0%, #b3b3b9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
body.mode-light .onboarding-head h1 {
  background: linear-gradient(180deg, #18181b 0%, #52525b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.onboarding-head p { color: #a1a1aa; }
.onboarding-progress {
  display: inline-flex;
  gap: 0.4rem;
  margin-top: 1rem;
}
.onboarding-progress span {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: var(--bg-3);
  transition: background 200ms, transform 200ms;
}
.onboarding-progress span.active {
  background: var(--accent);
  transform: scale(1.15);
}

.onboarding-step {
  display: none;
  background: var(--bg-1);
  border: 1px solid var(--br-1);
  border-radius: 1rem;
  padding: 2rem;
  position: relative;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.5);
}
.onboarding-step.active { display: block; animation: onboardingIn 240ms ease-out 1; }
@keyframes onboardingIn {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}
.onboarding-step-num {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.05em;
  opacity: 0.7;
}
.onboarding-step h2 {
  font-family: 'Manrope', 'Inter', sans-serif;
  font-weight: 800;
  font-size: clamp(1.5rem, 2vw + 0.5rem, 2rem);
  letter-spacing: -0.02em;
  margin: 0 0 1rem 0;
  line-height: 1.1;
  color: #f4f4f5;
}
body.mode-light .onboarding-step h2 { color: #18181b; }
.onboarding-step p {
  color: #cfcfd6;
  font-size: 1rem;
  line-height: 1.55;
  margin: 0 0 0.75rem 0;
}
body.mode-light .onboarding-step p { color: #3f3f46; }
.onboarding-step b { color: #f4f4f5; font-weight: 700; }
body.mode-light .onboarding-step b { color: #18181b; }
.onboarding-tip {
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 0.5rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem !important;
  color: #fcd34d !important;
  margin-top: 0.75rem !important;
}
body.mode-light .onboarding-tip { color: #92400e !important; }

.onb-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent);
  margin: 0 0.15rem;
}
.onb-pill.muted {
  background: var(--bg-3);
  color: #9b9ba3;
}

.onboarding-illustration {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1rem 0;
}
.onb-mock {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--bg-0);
  border: 1px solid var(--br-1);
  border-radius: 0.625rem;
}
.onb-mock.must {
  border-color: rgba(var(--accent-rgb), 0.35);
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.07), var(--bg-0));
}
.onb-mock > span {
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid var(--accent);
  border-radius: 9999px;
  flex-shrink: 0;
}
.onb-mock > span.muted { border-color: #5b5b63; }
.onb-mock b { display: block; color: #f4f4f5; font-weight: 600; }
body.mode-light .onb-mock b { color: #18181b; }
.onb-mock small { color: #9b9ba3; font-size: 0.78rem; }

.onboarding-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--br-1);
}
.onboarding-actions button,
.onboarding-actions [type="submit"] {
  padding: 0.55rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--br-1);
  background: var(--bg-2);
  color: #e7e7ea;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 140ms, border-color 140ms;
}
.onboarding-actions button:hover { background: var(--bg-3); border-color: var(--br-2); }
.onboarding-actions [data-onb-prev]:first-child:only-child,
.onboarding-actions span:first-child { visibility: hidden; }
.onboarding-actions .onb-cta {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
  font-weight: 700;
  padding: 0.7rem 1.25rem;
  box-shadow: 0 10px 28px -12px rgba(var(--accent-rgb), 0.45);
}
.onboarding-actions .onb-cta:hover { background: var(--accent-from); }
body.mode-light .onboarding-actions button,
body.mode-light .onboarding-actions [type="submit"] { color: #18181b; }
body.mode-light .onboarding-actions .onb-cta { color: #ffffff; }

.onboarding-footer { text-align: center; margin-top: 1.25rem; }
.onb-skip {
  background: transparent;
  border: 0;
  color: #71717a;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.15);
  padding: 0.4rem;
}
.onb-skip:hover { color: #e7e7ea; }
body.mode-light .onb-skip { color: #71717a; }
body.mode-light .onb-skip:hover { color: #18181b; }

/* =============================================================================
   SHOPPING — tab multi-lista con drag&drop reorder
   ============================================================================= */
.shopping-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--br-1);
}
.shopping-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  border-radius: 0.5rem 0.5rem 0 0;
  background: var(--bg-2);
  border: 1px solid var(--br-1);
  border-bottom: none;
  color: #a1a1aa;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 140ms, color 140ms, transform 80ms, opacity 200ms;
  margin-bottom: -1px; /* sovrapponi al border-bottom del container */
  position: relative;
  user-select: none;
}
.shopping-tab:hover { color: #e7e7ea; background: var(--bg-3); }
.shopping-tab.active {
  background: var(--bg-1);
  color: var(--accent);
  border-color: var(--br-2);
  box-shadow: 0 -2px 0 var(--accent) inset;
}
.shopping-tab.shared {
  background: rgba(16,185,129,0.06);
  border-color: rgba(16,185,129,0.25);
  color: #86efac;
}
.shopping-tab.shared.active {
  background: rgba(16,185,129,0.12);
  box-shadow: 0 -2px 0 #10b981 inset;
}
.shopping-tab-title { max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shopping-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  padding: 0 0.35rem;
  height: 1.1rem;
  border-radius: 9999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.65rem;
  font-weight: 700;
}
.shopping-tab.shared .shopping-tab-count {
  background: rgba(16,185,129,0.15);
  color: #6ee7b7;
}
.shopping-tab .drag-handle {
  cursor: grab;
  color: #6b6b73;
  font-size: 0.7rem;
  letter-spacing: -0.1em;
  user-select: none;
}
.shopping-tab .drag-handle:active { cursor: grabbing; }
.shopping-tab.dragging { opacity: 0.4; }
.shopping-tab.drop-target { border-color: var(--accent); box-shadow: -2px 0 0 var(--accent); }

/* Header lista (titolo + azioni) */
.shopping-list-header h2 { line-height: 1.2; }
.shopping-list-header .list-actions { position: relative; }
.shopping-list-header .list-actions summary { list-style: none; }
.shopping-list-header .list-actions summary::-webkit-details-marker { display: none; }
.shopping-list-header .list-actions .nav-more-panel button.navlink {
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  padding: 0.375rem 0.6rem;
}
.shopping-list-header .list-actions .nav-more-panel button.navlink:hover { background: var(--bg-2); }

body.mode-light .shopping-tab { color: #52525b; }
body.mode-light .shopping-tab:hover { color: #18181b; }
body.mode-light .shopping-tab.active { background: #ffffff; }
body.mode-light .shopping-tab.shared { color: #047857; }

/* =============================================================================
   DESKTOP APP POLISH - dashboard browser piu' professionale.
   ============================================================================= */
@media (min-width: 769px) {
  body {
    background:
      radial-gradient(900px 380px at 16% -12%, rgba(var(--accent-rgb), 0.12), transparent 64%),
      radial-gradient(760px 340px at 94% 2%, rgba(6,182,212,0.07), transparent 62%),
      linear-gradient(180deg, rgba(255,255,255,0.018), transparent 18rem),
      var(--bg-0);
  }

  body > header.sticky {
    z-index: 40;
    background: rgba(10,10,11,0.78) !important;
    border-bottom-color: rgba(255,255,255,0.08);
    box-shadow: 0 18px 44px -34px rgba(0,0,0,0.95);
  }

  body > header .desktop-nav {
    max-width: 1280px;
    padding-top: 0.72rem;
    padding-bottom: 0.72rem;
    gap: 0.25rem;
  }

  body > header .desktop-nav > a:first-child {
    margin-right: 1.15rem;
    padding-right: 1.15rem;
    border-right: 1px solid var(--br-1);
  }

  body > main {
    max-width: 1280px !important;
    padding-top: 2rem !important;
  }

  body > main > .grid {
    grid-template-columns: minmax(0, 1fr) minmax(19rem, 0.36fr);
    gap: 1.4rem;
    align-items: start;
  }

  body > main > .grid > section:first-child {
    min-width: 0;
  }

  body > main > .grid > aside {
    position: sticky;
    top: 5.25rem;
    align-self: start;
    background: rgba(19,19,22,0.58);
    border: 1px solid var(--br-1);
    border-radius: 0.85rem;
    padding: 1rem;
    box-shadow: 0 18px 48px -34px rgba(0,0,0,0.95);
  }

  body > main > .grid > aside h2 {
    font-size: 1rem;
    color: #f4f4f5;
  }

  .page-title-xl {
    font-size: clamp(2.4rem, 3.4vw + 1rem, 4.25rem);
  }

  body > main > .grid > section:first-child > .mb-2:first-child {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.25rem;
    align-items: end;
    margin-bottom: 1.25rem;
    padding: 1.15rem 1.2rem;
    background:
      linear-gradient(135deg, rgba(var(--accent-rgb),0.13), rgba(255,255,255,0.025) 52%, rgba(6,182,212,0.04)),
      var(--bg-1);
    border: 1px solid rgba(var(--accent-rgb),0.20);
    border-radius: 0.9rem;
    box-shadow: 0 22px 58px -38px rgba(0,0,0,0.95);
  }

  body > main > .grid > section:first-child > .mb-2:first-child::after {
    content: "workspace";
    align-self: start;
    justify-self: end;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    border: 1px solid rgba(var(--accent-rgb),0.28);
    background: rgba(var(--accent-rgb),0.10);
    color: var(--accent);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  body > main > .grid > section:first-child > .mb-2:first-child .page-subtitle {
    max-width: 44rem;
  }

  body > main > .grid > section:first-child > form[action="/tasks"] {
    margin-top: 1.25rem;
    padding: 1rem;
    border: 1px solid rgba(var(--accent-rgb),0.18);
    border-radius: 0.85rem;
    background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.015)), var(--bg-1);
    box-shadow: 0 18px 46px -36px rgba(0,0,0,0.85);
  }

  body > main > .grid > section:first-child > form[action="/tasks"]::before {
    content: "nuova azione";
    display: block;
    margin-bottom: 0.65rem;
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
  }

  details.group.panel {
    overflow: hidden;
    border-radius: 0.82rem;
  }

  details.group.panel > summary {
    min-height: 4.7rem;
  }

  details.group.panel[open] {
    border-color: rgba(var(--accent-rgb),0.25);
    box-shadow: 0 18px 48px -34px rgba(0,0,0,0.9), 0 0 0 1px rgba(var(--accent-rgb),0.05);
  }

  details.group.panel .btn-sm {
    min-height: 1.9rem;
  }

  details.group.panel .opacity-0 {
    opacity: 0.18;
  }

  details.group.panel:hover .opacity-0,
  details.group.panel[open] .opacity-0 {
    opacity: 1;
  }

  body > main > .grid > aside .panel {
    border-radius: 0.72rem;
    padding: 0.82rem !important;
    background: rgba(10,10,11,0.36);
  }

  body > main > .grid > aside .panel + .panel {
    margin-top: 0.55rem;
  }

  body > main > .grid > aside .panel ul {
    padding-left: 0.1rem;
  }

  body > main > .grid > aside .text-xs.text-zinc-700 {
    color: #64646e;
  }

  .product-update {
    border-radius: 0.85rem;
    padding: 1.05rem 1.15rem;
  }
}

@media (max-width: 768px) {
  body > main > .grid {
    gap: 1.15rem;
  }

  details.group.panel > summary {
    gap: 0.75rem;
  }

  details.group.panel .opacity-0 {
    opacity: 1;
  }
}

body.mode-light > header.sticky {
  box-shadow: 0 14px 34px -28px rgba(24,24,27,0.45);
}

@media (min-width: 769px) {
  body.mode-light {
    background:
      radial-gradient(900px 380px at 16% -12%, rgba(var(--accent-rgb), 0.13), transparent 64%),
      radial-gradient(760px 340px at 94% 2%, rgba(6,182,212,0.08), transparent 62%),
      linear-gradient(180deg, rgba(255,255,255,0.84), transparent 22rem),
      var(--bg-0);
  }

  body.mode-light > main > .grid > aside,
  body.mode-light > main > .grid > section:first-child > .mb-2:first-child,
  body.mode-light > main > .grid > section:first-child > form[action="/tasks"] {
    background: rgba(255,255,255,0.88);
    box-shadow: 0 16px 42px -34px rgba(24,24,27,0.42);
  }

  body.mode-light > main > .grid > aside h2 {
    color: #18181b;
  }

  body.mode-light > main > .grid > aside .panel {
    background: #ffffff;
  }
}
