:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #100f0d;
  color: #f6f2e9;
  --muted: #c7bcaa;
  --gold: #ecc779;
  --line: #3b3121;
}

* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse at 75% 0, #2b2115 0, transparent 43rem); }
p, h1, h2, h3, figure, blockquote, dl, dd, ul { margin: 0; }
p { color: var(--muted); line-height: 1.6; }
ul { padding: 0; list-style: none; }
.wrap { width: min(100% - 2.5rem, 70rem); margin-inline: auto; }
.top { border-bottom: 1px solid var(--line); }
.top-inner { min-height: 4.4rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .4rem; font-weight: 680; letter-spacing: -.025em; }
.brand img { display: block; border-radius: 50%; margin-right: .25rem; }
.brand span, .tag { color: var(--gold); }
.tag { border: 1px solid #6b5530; background: #241d13; border-radius: 999px; padding: .34rem .68rem; font-size: .76rem; }

.hero { display: grid; grid-template-columns: minmax(0, .93fr) minmax(0, 1.07fr); gap: clamp(1.8rem, 5vw, 5rem); align-items: center; padding-block: clamp(3rem, 8vw, 6rem); }
h1, h2, h3 { line-height: 1.06; }
h1 { font-size: clamp(2.55rem, 5.6vw, 4.55rem); letter-spacing: -.07em; font-weight: 680; }
h1 em { color: var(--gold); font-style: normal; }
.intro p { max-width: 29rem; margin-top: 1.35rem; font-size: 1.04rem; }
.shortcut { display: inline-flex; align-items: center; gap: 1rem; min-height: 2.85rem; margin-top: 1.4rem; padding: .65rem .9rem; border: 1px solid #796038; border-radius: .72rem; color: var(--gold); font-size: .89rem; font-weight: 650; text-decoration: none; }
.shortcut:hover { background: #332618; }
.shortcut:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

.dashboard { background: linear-gradient(150deg, #272016, #141311 59%); border: 1px solid #5a452d; border-radius: 1.35rem; padding: clamp(1rem, 2.7vw, 1.75rem); box-shadow: 0 24px 72px -40px #000; }
.dashboard figcaption { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding-bottom: .8rem; border-bottom: 1px solid var(--line); }
.dashboard figcaption span { color: var(--muted); font-size: .75rem; }
.balance { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .5rem 1rem; margin-top: 1.05rem; }
.balance p, .change small, .dashboard-items dt { font-size: .76rem; }
.balance strong { display: block; margin-top: .15rem; font-size: clamp(2.1rem, 4.2vw, 3.45rem); letter-spacing: -.06em; line-height: 1; }
.change { display: grid; gap: .23rem; }
.change span { color: #9ad3b0; font-size: .95rem; font-weight: 700; }
.change small, .dashboard-items dt, .flow dt { color: var(--muted); }
.trend { margin-block: 1.1rem .9rem; }
.trend-bars, .trend-labels { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .45rem; }
.trend-bars { height: 6.75rem; align-items: end; padding-inline: .5rem; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to top, transparent 0 26px, #ffffff0d 26px 27px); }
.trend-bars span { background: linear-gradient(to top, #563d19, #cda356); border-radius: .3rem .3rem 0 0; }
.trend-bars span:nth-child(1) { height: 42%; }
.trend-bars span:nth-child(2) { height: 56%; }
.trend-bars span:nth-child(3) { height: 52%; }
.trend-bars span:nth-child(4) { height: 74%; }
.trend-bars span:nth-child(5) { height: 83%; }
.trend-bars span:nth-child(6) { height: 98%; background: linear-gradient(to top, #946b32, #f3d189); }
.trend-labels { margin-top: .4rem; text-align: center; font-size: .66rem; color: var(--muted); }
.dashboard-items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem .8rem; border-top: 1px solid var(--line); padding-top: .8rem; }
.dashboard-items dd { margin-top: .2rem; font-size: .9rem; font-weight: 650; }

#funzioni { scroll-margin-top: 1.4rem; }
h2 { font-size: clamp(1.55rem, 3.3vw, 2.4rem); letter-spacing: -.045em; }
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin-top: 1.15rem; }
.feature { min-width: 0; padding: clamp(1rem, 2.6vw, 1.6rem); border: 1px solid var(--line); border-radius: 1rem; background: #181612; }
.feature h3 { font-size: 1.13rem; letter-spacing: -.025em; }
.feature p { margin-top: .5rem; font-size: .9rem; }
.flow, .legend, .list { margin-top: .9rem; font-size: .84rem; }
.flow > div, .legend > li, .list > li { display: flex; justify-content: space-between; align-items: baseline; gap: .65rem; padding-block: .46rem; border-bottom: 1px solid #ffffff10; }
.flow dd, .legend b, .list b { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.positive { color: #9ad3b0; }
.negative { color: #f2aaa2; }
.allocation { display: flex; gap: 3px; height: .52rem; margin-top: 1rem; border-radius: 99px; overflow: hidden; }
.allocation span:nth-child(1) { flex: 62; background: #dbb66b; }
.allocation span:nth-child(2) { flex: 28; background: #9ebeaf; }
.allocation span:nth-child(3) { flex: 10; background: #756c60; }
.legend { margin-top: .35rem; }

.report { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: center; gap: 1.4rem; padding-block: clamp(2.3rem, 6vw, 4.1rem); }
.report > div p { margin-top: .7rem; }
.report blockquote { border: 1px solid #695234; border-radius: 1rem; background: linear-gradient(115deg, #2d2316, #1b1812); padding: 1.15rem; }
.report blockquote strong { color: var(--gold); font-size: .86rem; }
.report blockquote p { margin-top: .5rem; font-size: .9rem; }
.footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .55rem; padding-block: 1rem max(1rem, env(safe-area-inset-bottom)); }

@media (max-width: 48rem) {
  .hero, .report { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-block: 2.8rem; }
  .dashboard { max-width: 37rem; width: 100%; }
}

@media (max-width: 31rem) {
  .wrap { width: calc(100% - 2rem); }
  .features { grid-template-columns: minmax(0, 1fr); }
  .dashboard-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.intro .launch { margin-top: .78rem; font-size: .8rem; }
.launch time { color: var(--gold); font-weight: 650; }
.contents { display: flex; flex-wrap: wrap; gap: .45rem; padding-block: .8rem; margin-bottom: 1.4rem; border-block: 1px solid var(--line); }
.contents a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: .45rem .75rem; border-radius: .55rem; color: var(--gold); text-decoration: none; font-size: .9rem; }
.contents a:hover { background: #332618; }
.contents a:focus-visible { outline: 2px solid var(--gold); }
#strumenti, #calcolatori, #report { scroll-margin-top: 1.4rem; }
.screen-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 7rem), 1fr)); gap: .55rem; margin-top: 1rem; }
.screen-kpi > div { padding: .68rem .75rem; border: 1px solid var(--line); border-radius: .65rem; background: #ffffff06; }
.screen-kpi dt, .agenda small, .list small { color: var(--muted); font-size: .75rem; }
.screen-kpi dd { margin-top: .22rem; font-size: 1.04rem; font-weight: 680; font-variant-numeric: tabular-nums; }
.feature h4 { margin: 1.1rem 0 -.35rem; font-size: .83rem; font-weight: 650; }
.agenda { margin-top: .9rem; }
.agenda li { display: grid; grid-template-columns: 2.7rem minmax(0,1fr) auto; align-items: center; gap: .75rem; padding-block: .6rem; border-bottom: 1px solid #ffffff10; font-size: .86rem; }
.agenda time { display: grid; gap: .1rem; text-align: center; color: var(--gold); background: #302517; border-radius: .55rem; padding: .32rem; font-size: .72rem; }
.agenda time b { font-size: 1rem; }
.agenda small { display: block; margin-top: .18rem; }
.catalog-section { margin-top: clamp(2.5rem, 6vw, 4.5rem); }
.section-note { margin-top: .6rem; }
.catalog { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin-top: 1rem; }
.tools > div { padding: 1rem; border: 1px solid var(--line); border-radius: .85rem; background: #181612; }
.tools dt { font-weight: 680; }
.tools dd { margin-top: .4rem; color: var(--muted); font-size: .87rem; line-height: 1.55; }
.calculators li { padding-block: .55rem; padding-inline: .1rem; font-size: .87rem; }

@media (max-width: 48rem) {
  .catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 31rem) {
  .catalog { grid-template-columns: minmax(0, 1fr); }
  .screen-kpi { grid-template-columns: repeat(auto-fit, minmax(min(100%, 6.7rem), 1fr)); }
}
