/* Bull Bonus — stili. Font ospitati sul sito (nessuna richiesta a Google). */
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap; src: url("/assets/fonts/figtree-variable.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: italic; font-weight: 800; font-display: swap; src: url("/assets/fonts/barlow-condensed-800-italic.woff2") format("woff2"); }
/* Layout: dark one-column app in the Bull Bonus colours — sticky brand header, hero "da incassare" card,
   rails and grouped lists, personal tracker, bottom tab bar, detail as a sliding sheet. Single dark theme by choice (brand). */
:root {
  --bg: #07090d;
  --surface: #10141b;
  --surface-2: #181d27;
  --surface-3: #222836;
  --line: rgba(255, 255, 255, .08);
  --fg: #eef2f7;
  --fg-2: #9ba6b6;
  --fg-3: #657084;
  --lime: #b7f23d;
  --lime-ink: #0c1400;
  --lime-soft: rgba(183, 242, 61, .13);
  --blue: #3d74ff;
  --blue-soft: rgba(61, 116, 255, .16);
  --warn: #ffb547;
  --warn-soft: rgba(255, 181, 71, .14);
  --bar: rgba(9, 11, 16, .78);
  --scrim: rgba(0, 0, 0, .6);
  --font: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.32, .72, 0, 1);
  --gl: max(16px, env(safe-area-inset-left, 0px));
  --gr: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 25; background: var(--bg); }
body.sheet-open { overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--lime); }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; border-radius: 10px; }
.num { font-family: var(--display); font-style: italic; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; line-height: .95; }

/* Stage scales back when the sheet opens */
#stage {
  min-height: 100vh; background:
    radial-gradient(60% 40% at 0% 0%, rgba(61, 116, 255, .16), transparent 70%),
    radial-gradient(50% 30% at 100% 8%, rgba(183, 242, 61, .07), transparent 70%), var(--bg);
  background-repeat: no-repeat;
  transition: transform .5s var(--ease), border-radius .5s var(--ease), filter .5s;
}
body.sheet-open #stage { transform: scale(.94); border-radius: 18px; filter: brightness(.8); }

/* Header */
.header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  transition: background .25s, border-color .25s; border-bottom: 1px solid transparent;
}
.header.solid { background: var(--bar); border-color: var(--line); -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px); }
.header-in { max-width: 760px; margin: 0 auto; height: 58px; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; }
.brand img { width: 36px; height: 36px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(183, 242, 61, .35), 0 4px 18px rgba(61, 116, 255, .35); }
.wordmark { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 24px; letter-spacing: .01em; text-transform: uppercase; }
.wordmark i { color: var(--lime); }
.header-title { font-weight: 700; font-size: 16px; margin-left: 4px; opacity: 0; transition: opacity .2s; }
.header.solid.on-sub .header-title { opacity: 1; }
.icon-btn {
  margin-left: auto; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  display: grid; place-items: center; color: var(--fg); position: relative;
}
.icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 2px var(--surface); }

.app {
  max-width: 760px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 4px calc(112px + env(safe-area-inset-bottom, 0px));
}

/* Views and motion */
.view { animation: viewIn .45s var(--ease) both; }
/* Entrances start from a visible state, so the page reads fine even if animations are paused */
@keyframes viewIn { from { opacity: .5; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.rise { animation: rise .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes rise { from { opacity: .35; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }

.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-2); }
h1 { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 44px; line-height: .95; letter-spacing: -.005em; text-transform: uppercase; margin: 4px 0 0; text-wrap: balance; }
h2 { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 27px; line-height: 1; text-transform: uppercase; letter-spacing: .005em; margin: 0; }
.page-head { padding-top: 14px; margin-bottom: 18px; }
.section { margin-top: 32px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.section-sub { color: var(--fg-2); font-size: 14px; margin: 2px 0 14px; }
.link-btn { background: none; border: 0; color: var(--lime); font-size: 14.5px; font-weight: 700; padding: 4px 0; white-space: nowrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px;
  background: var(--lime); color: var(--lime-ink); font-weight: 800; font-size: 16px; padding: 14px 20px; text-decoration: none;
  transition: transform .2s var(--ease), filter .2s, box-shadow .2s; box-shadow: 0 8px 26px -10px rgba(183, 242, 61, .55);
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: scale(.97); }
.btn.block { width: 100%; }
.btn.ghost { background: var(--surface-2); color: var(--fg); box-shadow: none; border: 1px solid var(--line); }
.btn.small { padding: 9px 14px; font-size: 14px; border-radius: 12px; }

/* Hero card */
.hero {
  position: relative; overflow: hidden; border-radius: 26px; padding: 22px; border: 1px solid rgba(255, 255, 255, .07);
  background:
    linear-gradient(115deg, transparent 0 58%, rgba(183, 242, 61, .16) 58% 59%, transparent 59% 63%, rgba(61, 116, 255, .22) 63% 64%, transparent 64%),
    radial-gradient(90% 120% at 100% 0%, rgba(61, 116, 255, .45), transparent 60%),
    linear-gradient(160deg, #121a2c, #0a0d14 70%);
}
.hero-bull { position: absolute; right: -40px; top: -18px; width: 230px; height: 230px; opacity: .2; border-radius: 50%; pointer-events: none; mask-image: radial-gradient(circle, #000 45%, transparent 70%); -webkit-mask-image: radial-gradient(circle, #000 45%, transparent 70%); }
.hero > * { position: relative; }
.hero > .hero-bull { position: absolute; }
.hero-total { font-size: 76px; color: var(--lime); margin-top: 8px; text-shadow: 0 0 34px rgba(183, 242, 61, .25); }
.hero-total small { font-size: .45em; color: var(--fg); margin-left: 4px; }
.hero-sub { color: var(--fg-2); margin-top: 6px; }
.hero-sub b { color: var(--fg); }
.progress { margin-top: 18px; }
.progress-top { display: flex; justify-content: space-between; font-size: 13px; color: var(--fg-2); margin-bottom: 7px; gap: 10px; flex-wrap: wrap; }
.progress-top b { color: var(--fg); font-variant-numeric: tabular-nums; }
.bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; display: flex; gap: 2px; }
.bar span { display: block; height: 100%; border-radius: 99px; transition: width .8s var(--ease); }
.bar .paid { background: var(--lime); box-shadow: 0 0 12px rgba(183, 242, 61, .6); }
.bar .wait { background: var(--blue); }
.hero-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.hero-actions .btn { flex: 1 1 0; min-width: 0; padding-inline: 12px; font-size: 15px; }
.hero > .hero-bull { opacity: .11; right: -60px; }

/* How it works */
.howto { margin-top: 14px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); padding: 16px 16px 18px; }
.howto-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.howto-head strong { font-size: 15px; }
.howto ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; counter-reset: h; }
.howto li { counter-increment: h; background: var(--surface-2); border-radius: 14px; padding: 10px 11px; font-size: 12.5px; line-height: 1.35; color: var(--fg-2); min-width: 0; }
.howto li::before { content: counter(h); display: block; font-family: var(--display); font-style: italic; font-weight: 800; font-size: 28px; color: var(--lime); line-height: 1; margin-bottom: 6px; }
.howto li b { display: block; color: var(--fg); font-size: 14px; margin-bottom: 2px; }
.x-btn { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--fg-2); display: grid; place-items: center; flex: none; }

/* Install banner */
.install { margin-top: 14px; display: flex; align-items: center; gap: 12px; padding: 14px 12px 14px 16px; border-radius: 20px; background: linear-gradient(120deg, var(--blue-soft), transparent 80%), var(--surface); border: 1px solid rgba(61, 116, 255, .3); }
.install-ic { width: 42px; height: 42px; border-radius: 12px; background: var(--blue); display: grid; place-items: center; flex: none; color: #fff; }
.install-tx { flex: 1; min-width: 0; font-size: 13.5px; color: var(--fg-2); }
.install-tx b { display: block; color: var(--fg); font-size: 15px; }

/* Featured rail */
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(84%, 380px); gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  margin-inline: calc(-1 * var(--gl)) calc(-1 * var(--gr));
  padding: 6px var(--gr) 16px var(--gl); scroll-padding-inline: var(--gl) var(--gr); scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.feat {
  scroll-snap-align: start; position: relative; overflow: hidden; border-radius: 24px; padding: 18px; min-height: 258px;
  display: flex; flex-direction: column; align-items: flex-start; text-align: left; color: var(--fg);
  border: 1px solid color-mix(in srgb, var(--a) 40%, transparent);
  background: radial-gradient(110% 90% at 100% 0%, color-mix(in srgb, var(--a) 60%, transparent), transparent 60%), linear-gradient(165deg, color-mix(in srgb, var(--b) 70%, #0b0e14), #0b0e14 75%);
  box-shadow: 0 18px 40px -22px var(--a); transition: transform .35s var(--ease);
}
.feat:active, .row:active, .mini:active { transform: scale(.975); }
.feat-top { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 8px; }
.feat-amount { font-size: 66px; margin-top: 16px; }
.feat-amount small { display: block; font-size: 16px; font-style: normal; font-family: var(--font); font-weight: 700; color: var(--fg-2); margin-bottom: 4px; letter-spacing: 0; }
.feat-name { font-size: 18px; font-weight: 800; margin-top: 6px; }
.feat-tag { font-size: 14px; color: var(--fg-2); margin-top: 3px; max-width: 32ch; }
.feat-foot { margin-top: auto; padding-top: 16px; display: flex; align-items: center; gap: 8px; width: 100%; font-size: 13px; color: var(--fg-2); }
.feat-go { margin-left: auto; background: var(--lime); color: var(--lime-ink); font-weight: 800; border-radius: 999px; padding: 7px 14px; font-size: 13.5px; white-space: nowrap; }

/* Logos */
.logo { width: 46px; height: 46px; border-radius: 13px; flex: none; position: relative; overflow: hidden; display: grid; place-items: center; background: linear-gradient(140deg, var(--a), var(--b)); color: #fff; font-family: var(--display); font-weight: 800; font-size: 22px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .1); }
.logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.logo.md { width: 52px; height: 52px; border-radius: 15px; }
.logo.xl { width: 84px; height: 84px; border-radius: 22px; font-size: 38px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 14px 34px -10px var(--a); }

/* Tags */
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 8px; white-space: nowrap; }
.tag.warn { color: var(--warn); background: var(--warn-soft); }
.tag.boost { color: var(--lime); background: var(--lime-soft); }
.tag.mine { color: var(--fg); background: var(--surface-3); }
.tag.paid { color: var(--lime-ink); background: var(--lime); }
.tag.inv { color: #a9c1ff; background: var(--blue-soft); }
.feat-inv { margin-top: 10px; font-size: 13.5px; font-weight: 700; color: var(--lime); }
.segmented.mode { --n: 2; max-width: 320px; margin-top: 12px; background: rgba(0, 0, 0, .3); border-color: rgba(255, 255, 255, .1); }
.segmented.mode .thumb { background: var(--lime); }
.segmented.mode button { font-size: 13px; }
.segmented.mode button[aria-pressed="true"] { color: var(--lime-ink); }
.hero-inv { margin-top: 4px; color: var(--fg-2); }
.hero-inv b { color: var(--lime); }
.sheet-inv { display: inline-block; margin-top: 12px; font-weight: 700; font-size: 14.5px; color: var(--lime); border: 1px solid rgba(183, 242, 61, .4); border-radius: 999px; padding: 6px 12px; }
.diff { margin-top: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 16px; }
.diff-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.diff-label { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 30px; text-transform: uppercase; color: var(--c); line-height: 1; }
.diff-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; }
.diff-meter span { height: 10px; border-radius: 99px; background: var(--surface-3); transform-origin: left; }
.diff-meter span.on { background: var(--c); box-shadow: 0 0 14px color-mix(in srgb, var(--c) 45%, transparent); animation: fill .6s var(--ease) both; }
.diff-meter span.on:nth-child(2) { animation-delay: .08s; } .diff-meter span.on:nth-child(3) { animation-delay: .16s; } .diff-meter span.on:nth-child(4) { animation-delay: .24s; }
@keyframes fill { from { transform: scaleX(0); } to { transform: none; } }
.diff-scale { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 6px; font-size: 11.5px; color: var(--fg-3); }
.diff-scale .cur { color: var(--c); font-weight: 700; }
.diff p { margin: 12px 0 0; color: var(--fg-2); font-size: 14px; }
.inv-card { border-radius: 20px; padding: 18px; border: 1px solid rgba(183, 242, 61, .28); background: linear-gradient(130deg, var(--lime-soft), transparent 70%), var(--surface); }
.inv-top { display: flex; align-items: center; gap: 14px; }
.inv-top .num { font-size: 52px; color: var(--lime); flex: none; }
.inv-top span:last-child { font-weight: 600; min-width: 0; }
.inv-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.inv-stats > div { background: rgba(0, 0, 0, .25); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.inv-card p { margin: 12px 0 0; color: var(--fg); }
.inv-card .inv-where { color: var(--fg-2); font-size: 13.5px; margin-top: 8px; }
.trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin-top: 12px; padding: 0 4px; }
.trust span { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--fg-2); white-space: nowrap; }
.trust svg { flex: none; color: var(--lime); }
.link-btn.inline { padding: 0; font-size: inherit; text-decoration: underline; text-underline-offset: 3px; }
.row-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; }
.row-inv { display: block; margin-top: 3px; font-size: 11.5px; font-weight: 700; color: #a9c1ff; white-space: nowrap; }
.logo.sm { width: 30px; height: 30px; border-radius: 9px; font-size: 14px; }
.checked { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; font-size: 13px; color: var(--fg-2); }
.checked svg { color: var(--lime); flex: none; }
.calc { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 18px; display: grid; gap: 18px; }
.calc-field { display: grid; gap: 10px; min-width: 0; }
.calc-field small { color: var(--fg-3); font-size: 12.5px; }
.calc-label { font-weight: 700; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.calc-label output { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 26px; color: var(--lime); line-height: 1; }
.calc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.calc-chips .chip { padding: 7px 13px; font-size: 13.5px; }
.calc input[type="range"] { width: 100%; accent-color: var(--lime); height: 28px; margin: 0; }
.calc-ticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--fg-3); margin-top: -6px; padding: 0 4px; }
.calc-out { border-radius: 18px; padding: 16px; background: linear-gradient(130deg, var(--lime-soft), transparent 70%), var(--surface-2); border: 1px solid rgba(183, 242, 61, .25); display: grid; gap: 6px; }
.calc-k { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-2); }
.calc-total { font-size: 64px; color: var(--lime); }
.calc-total small { font-size: .45em; color: var(--fg); margin-left: 4px; }
.calc-sub { color: var(--fg-2); font-size: 14px; }
.calc-sub b { color: var(--fg); }
.calc-split { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--fg-2); margin-top: 4px; }
.calc-split span { display: inline-flex; align-items: center; gap: 6px; }
.calc-split b { color: var(--fg); }
.calc-split i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-cash { background: var(--lime); } .dot-amazon { background: var(--warn); } .dot-azioni { background: var(--blue); }
.calc-logos { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; font-size: 13px; color: var(--fg-2); }
.calc-logos button { padding: 0; border: 0; background: none; border-radius: 9px; }
.calc-note { margin: 4px 0 0; font-size: 12.5px; color: var(--fg-3); }
.plans s { color: var(--fg-3); }
.tag.glass { background: rgba(0, 0, 0, .4); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.tag.glass:not(.warn):not(.boost) { color: #fff; }

/* Grouped list */
.group { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 13px 16px; background: none; border: 0; text-align: left; position: relative; transition: transform .3s var(--ease), background .2s; }
.row:hover { background: rgba(255, 255, 255, .025); }
.row + .row::before { content: ""; position: absolute; top: 0; left: 76px; right: 0; border-top: 1px solid var(--line); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.row-title { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 13px; color: var(--fg-2); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.row-amt { flex: none; text-align: right; }
.row-amt .num { font-size: 26px; color: var(--lime); display: block; }
.row-amt small { font-size: 11px; color: var(--fg-3); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }

/* Mini cards */
.rail.minis { grid-auto-columns: min(46%, 196px); padding-bottom: 8px; }
.mini { scroll-snap-align: start; border: 1px solid var(--line); background: var(--surface); border-radius: 20px; padding: 16px; text-align: left; display: flex; flex-direction: column; gap: 6px; transition: transform .3s var(--ease); }
.mini .logo { margin-bottom: 6px; }
.mini-name { font-weight: 700; }
.mini-meta { font-size: 13px; color: var(--fg-2); }
.mini .num { font-size: 32px; color: var(--lime); margin-top: 4px; }

/* Explore */
.search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; height: 46px; }
.search:focus-within { border-color: rgba(183, 242, 61, .5); }
.search svg { flex: none; color: var(--fg-3); }
.search input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 16px; color: var(--fg); outline: none; height: 100%; }
.search input::placeholder { color: var(--fg-3); }
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 14px calc(-1 * var(--gr)) 0 calc(-1 * var(--gl)); padding: 2px var(--gr) 4px var(--gl); scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 999px; padding: 8px 15px; font-size: 14px; font-weight: 700; transition: background .2s, color .2s; }
.chip[aria-pressed="true"] { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); }
.segmented { position: relative; display: grid; grid-template-columns: repeat(var(--n), 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 3px; margin-top: 14px; }
.segmented .thumb { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / var(--n)); border-radius: 9px; background: var(--surface-3); transition: transform .35s var(--ease), background .25s; transform: translateX(calc(var(--k, 0) * 100%)); }
.segmented button { position: relative; z-index: 1; border: 0; background: none; padding: 8px 4px; font-size: 13.5px; font-weight: 700; color: var(--fg-2); transition: color .2s; min-width: 0; }
.segmented button[aria-pressed="true"] { color: var(--fg); }
.count { font-size: 12px; color: var(--fg-2); margin: 20px 4px 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.empty { text-align: center; padding: 34px 20px; color: var(--fg-2); }
.empty strong { display: block; color: var(--fg); font-size: 17px; margin-bottom: 4px; }
.empty .btn { margin-top: 16px; }

/* Tracker */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px; min-width: 0; }
.tile .num { font-size: 34px; display: block; margin-top: 6px; }
.tile small { font-size: 12.5px; color: var(--fg-2); }
.tile.paid { background: linear-gradient(160deg, var(--lime-soft), transparent), var(--surface); border-color: rgba(183, 242, 61, .3); }
.tile.paid .num { color: var(--lime); }
.tile.wait .num { color: var(--blue); }

/* Alerts */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px; }
.card p { margin: 6px 0 0; color: var(--fg-2); }
.setting { display: flex; align-items: center; gap: 12px; padding: 14px 16px; position: relative; }
.setting + .setting::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: 1px solid var(--line); }
.setting label { flex: 1; min-width: 0; font-weight: 600; }
.setting small { display: block; color: var(--fg-2); font-size: 13px; font-weight: 400; }
.switch { appearance: none; -webkit-appearance: none; width: 51px; height: 31px; border-radius: 99px; background: var(--surface-3); position: relative; flex: none; cursor: pointer; transition: background .25s; margin: 0; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); transition: transform .3s var(--ease); }
.switch:checked { background: var(--lime); }
.switch:checked::after { transform: translateX(20px); }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; }
.steps li::before { content: counter(s); width: 28px; height: 28px; border-radius: 50%; background: var(--lime-soft); color: var(--lime); font-weight: 800; font-size: 14px; display: grid; place-items: center; }
.steps li span { padding-top: 3px; min-width: 0; }
.contact { display: flex; align-items: center; gap: 14px; }
.contact > div { flex: 1; min-width: 0; }
.legal { font-size: 12.5px; color: var(--fg-3); margin-top: 36px; line-height: 1.55; max-width: 62ch; }

/* Tab bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: center;
  padding: 6px var(--gr) calc(8px + env(safe-area-inset-bottom, 0px)) var(--gl);
  background: var(--bar); -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px);
  border-top: 1px solid var(--line); transition: transform .5s var(--ease);
}
body.sheet-open .tabbar { transform: translateY(110%); }
.tab { flex: 1; max-width: 120px; border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 0; font-size: 11px; font-weight: 700; color: var(--fg-3); transition: color .2s; position: relative; }
.tab svg { transition: transform .35s var(--ease); }
.tab[aria-selected="true"] { color: var(--lime); }
.tab[aria-selected="true"] svg { transform: translateY(-1px) scale(1.06); }
.tab .badge { position: absolute; top: 0; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--lime); color: var(--lime-ink); font-size: 11px; font-weight: 800; display: grid; place-items: center; }

/* Detail sheet */
.scrim { position: fixed; inset: 0; z-index: 40; background: var(--scrim); opacity: 0; pointer-events: none; transition: opacity .45s; }
body.sheet-open .scrim { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; top: calc(env(safe-area-inset-top, 0px) + 12px); z-index: 50;
  max-width: 760px; margin: 0 auto; background: var(--bg); border-radius: 22px 22px 0 0; overflow: hidden;
  display: flex; flex-direction: column; transform: translateY(105%); visibility: hidden; border: 1px solid var(--line); border-bottom: 0;
  transition: transform .55s var(--ease), visibility 0s .55s;
}
.sheet.open { transform: translateY(var(--drag, 0px)); visibility: visible; transition: transform .55s var(--ease), visibility 0s; }
.sheet.dragging { transition: none; }
.sheet-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.sheet-hero {
  position: relative; padding: 40px var(--gr) 28px var(--gl); touch-action: none;
  background: radial-gradient(100% 120% at 100% 0%, color-mix(in srgb, var(--a) 70%, transparent), transparent 60%), linear-gradient(170deg, color-mix(in srgb, var(--b) 75%, #0b0e14), var(--bg));
}
.grabber { position: absolute; top: 9px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 9px; background: rgba(255, 255, 255, .35); }
.close { position: absolute; top: 16px; right: var(--gr); width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .35); color: #fff; display: grid; place-items: center; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.sheet-id { display: flex; align-items: center; gap: 16px; padding-right: 40px; }
.sheet-id-tx { min-width: 0; }
.sheet-id-tx strong { display: block; font-size: 24px; font-weight: 800; line-height: 1.1; }
.sheet-id-tx span { color: var(--fg-2); font-size: 14px; }
.sheet-amount { font-size: 84px; color: var(--lime); margin-top: 22px; text-shadow: 0 0 40px rgba(183, 242, 61, .25); }
.sheet-amount small { display: block; font-size: 17px; font-style: normal; font-family: var(--font); font-weight: 700; color: var(--fg-2); margin-bottom: 6px; letter-spacing: 0; text-shadow: none; }
.sheet-tag { font-size: 16px; color: var(--fg); margin-top: 8px; max-width: 36ch; }
.sheet-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.sheet-body { padding: 4px var(--gr) calc(130px + env(safe-area-inset-bottom, 0px)) var(--gl); }
.about { color: var(--fg-2); margin: 14px 0 0; max-width: 62ch; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 18px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat-k { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); }
.stat-v { font-size: 22px; font-family: var(--display); font-style: italic; font-weight: 800; overflow-wrap: anywhere; line-height: 1.1; }
.stat-s { font-size: 12px; color: var(--fg-2); }
.block-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-family: var(--display); font-style: italic; font-weight: 800; font-size: 24px; text-transform: uppercase; margin: 32px 0 14px; }
.block-title small { font-family: var(--font); font-style: normal; font-weight: 700; font-size: 13px; color: var(--fg-2); text-transform: none; }
.status { --n: 4; margin-top: 0; }
.status button { font-size: 12.5px; }
.status[data-st="paid"] .thumb { background: var(--lime); }
.status[data-st="paid"] button[aria-pressed="true"] { color: var(--lime-ink); }
.status-hint { font-size: 13px; color: var(--fg-2); margin: 10px 2px 0; }
.video { position: relative; width: 100%; max-width: 100%; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; background: linear-gradient(160deg, #15151c, #2a2a36); color: #fff; display: grid; place-items: center; text-decoration: none; border: 1px solid var(--line); }
.video img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.video:hover img { transform: scale(1.03); }
.video::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .7), rgba(0, 0, 0, 0) 45%); pointer-events: none; }
.video .play, .video-cap { z-index: 1; }
.video .play { width: 70px; height: 70px; border-radius: 50%; background: var(--lime); color: var(--lime-ink); display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); transition: transform .35s var(--ease); }
.video:hover .play { transform: scale(1.08); }
.video-cap { position: absolute; left: 16px; right: 16px; bottom: 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; }
.video-cap span:last-child { background: rgba(0, 0, 0, .5); padding: 3px 8px; border-radius: 6px; flex: none; font-size: 12.5px; }
.checklist { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.checklist li + li { border-top: 1px solid var(--line); }
.check { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; width: 100%; text-align: left; background: none; border: 0; padding: 14px 16px; }
.check .box { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--surface-3); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 15px; color: var(--fg-2); transition: background .25s, border-color .25s, transform .3s var(--ease); }
.check .tx { padding-top: 3px; transition: color .2s; min-width: 0; }
.check[aria-pressed="true"] .box { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); transform: scale(1.06); }
.check[aria-pressed="true"] .tx { color: var(--fg-2); }
.mini-bar { height: 4px; border-radius: 9px; background: var(--surface-3); overflow: hidden; margin-top: -4px; margin-bottom: 14px; }
.mini-bar span { display: block; height: 100%; width: 0; background: var(--lime); transition: width .5s var(--ease); }
.note { display: flex; gap: 10px; margin-top: 12px; padding: 12px 14px; border-radius: 14px; font-size: 14px; background: var(--warn-soft); border: 1px solid rgba(255, 181, 71, .25); }
.note::before { content: "!"; flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--warn); color: #1a1000; font-weight: 800; font-size: 13px; display: grid; place-items: center; margin-top: 1px; }
.note.info { background: var(--blue-soft); border-color: rgba(61, 116, 255, .3); }
.note.info::before { content: "i"; background: var(--blue); color: #fff; }
.code-box { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px dashed rgba(183, 242, 61, .45); border-radius: 18px; padding: 14px 14px 14px 18px; }
.code-box code { flex: 1; min-width: 0; font-family: var(--mono); font-size: 18px; font-weight: 700; letter-spacing: .06em; overflow-wrap: anywhere; user-select: all; color: var(--lime); }
.plans .row { cursor: default; }
.plans .row:active { transform: none; }
.plans .row:hover { background: none; }
.checks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; }
.checks li::before { content: ""; flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; background: var(--lime-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.6 2.6L14 7.6' fill='none' stroke='%23b7f23d' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat; }
.invite { display: flex; gap: 14px; align-items: center; background: linear-gradient(120deg, var(--lime-soft), transparent 75%), var(--surface); border-color: rgba(183, 242, 61, .25); }
.invite .num { font-size: 40px; color: var(--lime); flex: none; }
.invite strong { display: block; }
.invite p { margin: 2px 0 0; }
.sheet-cta { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 10px; padding: 12px var(--gr) calc(12px + env(safe-area-inset-bottom, 0px)) var(--gl); background: var(--bar); -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px); border-top: 1px solid var(--line); }
.sheet-cta .btn:first-child { flex: 1; }
.sheet-cta .ghost { flex: none; padding-inline: 16px; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(98px + env(safe-area-inset-bottom, 0px)); z-index: 70; max-width: min(420px, calc(100% - 32px)); transform: translate(-50%, 20px) scale(.96); opacity: 0; pointer-events: none; background: var(--fg); color: var(--bg); padding: 12px 16px; border-radius: 14px; font-size: 14.5px; font-weight: 600; text-align: center; transition: opacity .3s, transform .45s var(--ease); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

@media (max-width: 520px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .tiles .num { font-size: 26px; }
}
@media (min-width: 900px) {
  .app, .header-in { max-width: 1040px; }
  .group.list { display: grid; grid-template-columns: 1fr 1fr; }
  .group.list .row:nth-child(odd) { border-right: 1px solid var(--line); }
  .group.list .row:nth-child(2)::before { display: none; }
  .group.list .row::before { left: 16px !important; }
  .rail { grid-auto-columns: 340px; }
  .calc { grid-template-columns: 1fr 1fr; align-items: start; }
  .calc-out { grid-column: 2; grid-row: 1 / span 2; }
}
@media (min-width: 700px) {
  h1 { font-size: 54px; }
  .hero { padding: 28px; }
  .hero-total { font-size: 96px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}

/* Base (prima la dava l'anteprima di Claude) */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; padding-top: env(safe-area-inset-top, 0px); }
img { max-width: 100%; }
[hidden] { display: none !important; }
a.row, a.feat { color: inherit; text-decoration: none; }
.legal a { color: var(--fg-2); }

/* Contenuto statico per Google e per chi non ha JavaScript (l'app lo rimuove all'avvio) */
.ssr { max-width: 760px; margin: 0 auto; padding: 24px max(16px, env(safe-area-inset-right, 0px)) 140px max(16px, env(safe-area-inset-left, 0px)); color: var(--fg-2); }
.ssr h1, .ssr h2 { color: var(--fg); }
.ssr a { color: var(--lime); }

/* Pagine di testo (privacy, 404) */
.doc { max-width: 720px; margin: 0 auto; padding: 24px max(16px, env(safe-area-inset-right, 0px)) 80px max(16px, env(safe-area-inset-left, 0px)); }
.doc h1 { font-size: 40px; margin: 24px 0 8px; }
.doc h2 { font-size: 22px; margin: 32px 0 8px; }
.doc p, .doc li { color: var(--fg-2); max-width: 65ch; }
.doc strong { color: var(--fg); }
.doc .back { display: inline-flex; margin-top: 28px; }
