:root {
  --bg: #100d2b; --bg2: #14103a; --panel: #1b1747; --panel2: #241e5c; --line: rgba(255, 255, 255, .09); --ink: #eef0ff; --muted: #9aa0c7;
  --v: #6b5bff; --c: #ffe15d; --pink: #ff5c7a; --ok: #34d399; --bad: #f87171; --r: 18px;
  --grad: linear-gradient(120deg, #ffe15d 0%, #ff5c7a 100%);
  font-family: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif; --disp: "Unbounded", "Figtree", sans-serif; color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); line-height: 1.55; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { width: min(1160px, 92vw); margin: 0 auto; }
h1, h2, h3 { line-height: 1.1; letter-spacing: -.03em; font-family: var(--disp); }
h1 { font-size: clamp(40px, 7vw, 78px); font-weight: 900; }
h2 { font-size: clamp(30px, 4.4vw, 48px); font-weight: 850; }
h3 { font-size: 20px; font-weight: 750; }
.muted { color: var(--muted); }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--c); margin-bottom: 14px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 24px; border-radius: 14px; font-weight: 800; font-size: 16px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; font-family: inherit; }
.btn:hover { transform: translateY(-2px); background: var(--panel2); }
.btn.main { background: var(--grad); border: 0; color: #100d2b; box-shadow: 0 10px 40px -10px rgba(139, 92, 246, .8); }
.btn.main:hover { box-shadow: 0 14px 50px -8px rgba(34, 211, 238, .6); background: var(--grad); }
.btn.sm { padding: 9px 16px; font-size: 14px; border-radius: 11px; }
.btn.danger { color: var(--bad); }
.btn:disabled { opacity: .5; pointer-events: none; }

/* nav */
.nav { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(16px); background: rgba(10, 11, 20, .72); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 900; font-size: 22px; letter-spacing: -.02em; }
.brand img { width: 34px; height: 34px; }
.links { display: flex; gap: 26px; font-weight: 650; color: var(--muted); font-size: 15px; }
.links a:hover { color: var(--ink); }
@media (max-width: 760px) { .links { display: none; } }

/* hero */
.hero { position: relative; padding: 96px 0 70px; text-align: center; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: -20% -10% auto; height: 760px; z-index: -1; background: radial-gradient(40% 50% at 30% 30%, rgba(139, 92, 246, .38), transparent 70%), radial-gradient(36% 46% at 72% 24%, rgba(34, 211, 238, .26), transparent 70%); filter: blur(10px); }
.hero p.lead { font-size: clamp(17px, 2vw, 21px); color: var(--muted); max-width: 640px; margin: 22px auto 34px; }
.cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.stats { display: flex; justify-content: center; gap: clamp(20px, 5vw, 64px); margin-top: 54px; flex-wrap: wrap; }
.stats b { display: block; font-size: clamp(30px, 4vw, 44px); font-weight: 900; }
.stats span { color: var(--muted); font-size: 14px; font-weight: 650; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: rgba(139, 92, 246, .14); border: 1px solid rgba(139, 92, 246, .35); font-size: 13px; font-weight: 750; margin-bottom: 26px; }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 12px var(--ok); }

section { padding: 84px 0; }
.head { max-width: 680px; margin-bottom: 44px; }
.head p { color: var(--muted); font-size: 18px; margin-top: 14px; }
.center { text-align: center; margin-inline: auto; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.card { background: linear-gradient(180deg, var(--panel), var(--bg2)); border: 1px solid var(--line); border-radius: var(--r); padding: 26px; transition: transform .2s, border-color .2s; }
.card:hover { transform: translateY(-4px); border-color: rgba(139, 92, 246, .5); }
.card .ico { font-size: 30px; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 15px; background: rgba(139, 92, 246, .14); margin-bottom: 18px; }
.card p { color: var(--muted); margin-top: 8px; font-size: 15.5px; }

/* template showcase */
.tpl { display: grid; grid-template-columns: 300px 1fr; gap: 20px; align-items: start; }
.tabs { display: grid; gap: 8px; }
.tab { text-align: left; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); color: var(--ink); font: inherit; font-weight: 750; cursor: pointer; transition: .15s; }
.tab:hover { border-color: rgba(139, 92, 246, .5); }
.tab[aria-selected="true"] { background: var(--panel2); border-color: var(--tc, var(--v)); box-shadow: 0 0 0 1px var(--tc, var(--v)) inset; }
.tab .e { font-size: 22px; }
.tpanel { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 30px; min-height: 420px; }
.tpanel h3 { font-size: 30px; margin-bottom: 6px; }
.tpanel .roles { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 22px; }
.role { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .05); font-weight: 700; font-size: 14px; }
.role i { width: 11px; height: 11px; border-radius: 50%; background: var(--rc); }
.tree { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.tree .cat { background: var(--bg2); border-radius: 14px; padding: 14px 16px; border: 1px solid var(--line); }
.tree .cat b { font-size: 12.5px; letter-spacing: .06em; color: var(--muted); display: block; margin-bottom: 8px; }
.tree .ch { font-size: 14.5px; padding: 2px 0; color: #cfd3f5; }
.tree .ch::before { content: "# "; color: var(--muted); }
.tree .ch.v::before { content: "🔊 "; }
@media (max-width: 860px) { .tpl { grid-template-columns: 1fr; } .tabs { grid-template-columns: repeat(2, 1fr); } }

/* mock dashboard */
.mock { border-radius: 22px; border: 1px solid var(--line); background: var(--bg2); overflow: hidden; box-shadow: 0 40px 100px -40px rgba(139, 92, 246, .5); }
.mock .bar { display: flex; gap: 7px; padding: 14px 18px; background: var(--panel); border-bottom: 1px solid var(--line); }
.mock .bar i { width: 11px; height: 11px; border-radius: 50%; background: #3b3f66; }
.mock .body { display: grid; grid-template-columns: 200px 1fr; min-height: 340px; }
.mock .side { padding: 18px; border-right: 1px solid var(--line); display: grid; gap: 6px; align-content: start; font-weight: 700; font-size: 14.5px; color: var(--muted); }
.mock .side span { padding: 9px 12px; border-radius: 10px; }
.mock .side span.on { background: rgba(139, 92, 246, .18); color: var(--ink); }
.mock .main { padding: 24px; display: grid; gap: 14px; align-content: start; }
.mrow { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: var(--panel); border-radius: 12px; font-weight: 650; }
.sw { width: 42px; height: 24px; border-radius: 999px; background: #323764; position: relative; flex: none; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .2s; }
.sw.on { background: var(--v); } .sw.on::after { left: 21px; }
@media (max-width: 700px) { .mock .body { grid-template-columns: 1fr; } .mock .side { display: none; } }

.cmds { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.cmd { padding: 20px 22px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.cmd h3 { font-size: 17px; margin-bottom: 10px; }
code { font-family: "Cascadia Code", Consolas, monospace; background: rgba(139, 92, 246, .16); color: #d8ccff; padding: 2px 8px; border-radius: 7px; font-size: 13.5px; margin: 3px 4px 3px 0; display: inline-block; }

details { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 750; font-size: 17px; }
details p { color: var(--muted); margin-top: 10px; }
.final { text-align: center; padding: 96px 0; background: radial-gradient(60% 80% at 50% 100%, rgba(139, 92, 246, .3), transparent 70%); }
footer { border-top: 1px solid var(--line); padding: 34px 0; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s, transform .6s; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ---------- dashboard ---------- */
.dash { display: grid; grid-template-columns: 270px 1fr; min-height: calc(100vh - 68px); }
.dside { border-right: 1px solid var(--line); padding: 22px 16px; background: var(--bg2); position: sticky; top: 68px; height: calc(100vh - 68px); overflow: auto; }
.dside h4 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 8px 12px; }
.gitem { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; cursor: pointer; border: 1px solid transparent; width: 100%; background: none; color: var(--ink); font: inherit; font-weight: 700; text-align: left; }
.gitem:hover { background: var(--panel); }
.gitem.on { background: var(--panel2); border-color: rgba(139, 92, 246, .5); }
.gitem img, .gico { width: 38px; height: 38px; border-radius: 12px; flex: none; background: var(--panel2); display: grid; place-items: center; font-weight: 900; }
.gitem small { display: block; font-weight: 600; color: var(--muted); font-size: 12px; }
.dmain { padding: 32px clamp(18px, 4vw, 48px) 80px; max-width: 980px; width: 100%; }
.dmain h1 { font-size: 34px; margin-bottom: 6px; }
.tnav { display: flex; gap: 6px; flex-wrap: wrap; margin: 24px 0; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.tnav button { padding: 9px 16px; border-radius: 10px; border: 0; background: none; color: var(--muted); font: inherit; font-weight: 750; cursor: pointer; }
.tnav button:hover { color: var(--ink); } .tnav button.on { background: var(--panel2); color: var(--ink); }
.sect { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 24px; margin-bottom: 16px; display: grid; gap: 16px; }
.sect h3 { font-size: 18px; }
.f { display: grid; gap: 7px; }
.f label, .f .lbl { font-weight: 700; font-size: 14px; }
.f small { color: var(--muted); font-size: 13px; }
input[type=text], input[type=number], select, textarea { width: 100%; padding: 11px 14px; border-radius: 11px; border: 1px solid var(--line); background: var(--bg2); color: var(--ink); font: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--v); outline-offset: 1px; }
textarea { min-height: 90px; resize: vertical; }
.sw-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 4px 0; }
.sw-row span { font-weight: 700; } .sw-row small { display: block; font-weight: 500; color: var(--muted); }
.tgl { appearance: none; width: 46px; height: 26px; border-radius: 999px; background: #323764; position: relative; cursor: pointer; flex: none; border: 0; transition: .2s; padding: 0; }
.tgl::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .2s; }
.tgl:checked { background: var(--v); } .tgl:checked::after { left: 23px; }
.tgl:focus-visible { outline: 2px solid var(--c); outline-offset: 2px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } @media (max-width: 700px) { .two { grid-template-columns: 1fr; } .dash { grid-template-columns: 1fr; } .dside { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); } }
.savebar { position: sticky; bottom: 16px; display: flex; gap: 12px; align-items: center; justify-content: space-between; background: rgba(20, 23, 48, .94); backdrop-filter: blur(12px); border: 1px solid rgba(139, 92, 246, .5); padding: 14px 18px; border-radius: 16px; margin-top: 20px; box-shadow: 0 20px 50px -20px #000; }
.statrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stat { background: var(--bg2); padding: 16px; border-radius: 14px; border: 1px solid var(--line); } .stat b { display: block; font-size: 28px; font-weight: 900; } .stat span { color: var(--muted); font-size: 13px; font-weight: 650; }
.tcard { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); }
.tcard .e { font-size: 30px; } .tcard > div { flex: 1; } .tcard p { color: var(--muted); font-size: 14px; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 99; padding: 14px 20px; border-radius: 14px; background: var(--panel2); border: 1px solid var(--line); font-weight: 700; box-shadow: 0 20px 50px -10px #000; max-width: 380px; }
.toast.ok { border-color: var(--ok); } .toast.bad { border-color: var(--bad); }
.empty { text-align: center; padding: 70px 20px; color: var(--muted); } .empty h2 { color: var(--ink); margin-bottom: 10px; font-size: 28px; }
.rwd { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; align-items: center; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 12px; top: 12px; z-index: 100; background: #fff; color: #000; padding: 8px 12px; border-radius: 8px; }

/* pagine legali */
.legal { max-width: 820px; padding: 56px 0 90px; }
.legal h1 { font-size: clamp(32px, 5vw, 48px); margin-bottom: 12px; }
.legal h2 { font-size: 22px; margin: 34px 0 10px; }
.legal p, .legal li { color: #cfd3f5; margin-bottom: 10px; }
.legal ul { padding-left: 22px; margin-bottom: 10px; }
.legal a { color: var(--c); text-decoration: underline; }
.ctab { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: 15px; }
.ctab th, .ctab td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ctab th { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.fl { display: flex; gap: 14px; flex-wrap: wrap; }
.fl a { text-decoration: underline; text-decoration-color: transparent; } .fl a:hover { text-decoration-color: currentColor; }
/* founder */
.ftable { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.ftable th, .ftable td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ftable th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.ftable img { width: 32px; height: 32px; border-radius: 9px; }
.badge { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; background: rgba(255,255,255,.08); }
.badge.bad { background: rgba(248,113,113,.18); color: var(--bad); } .badge.ok { background: rgba(52,211,153,.16); color: var(--ok); }
.scroll { overflow-x: auto; }
