/* Report su bianco: un gruppo di regole per blocco, nello stesso ordine della pagina. */

.report { padding: clamp(1rem, 3vw, 2rem) 0 clamp(3rem, 6vw, 5rem); }
.block { margin-bottom: clamp(5rem, 10vw, 8.5rem); }
.block:empty { display: none; }

.section-head { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(2.2rem, 4.4vw, 3.6rem); line-height: 1.02; letter-spacing: -.015em; }
.section-note { margin: .9rem 0 0; color: var(--ink-soft); font-weight: 300; font-size: 1.05rem; max-width: 36rem; }

/* Segnaposto con iniziale dorata */
.ph {
  display: grid; place-items: center;
  background: radial-gradient(circle at 30% 25%, #26262b, var(--black) 70%);
  color: var(--gold); font-family: var(--serif); font-style: italic; line-height: 1;
}

/* Scheletri in attesa */
.sk { position: relative; overflow: hidden; border-radius: .5rem; background: #F4F4F5; }
.sk::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(212, 162, 81, .14) 50%, transparent 80%);
  transform: translateX(-100%); animation: shimmer 1.8s var(--ease-soft) infinite;
}
.sk-line { height: .9rem; margin-bottom: .8rem; }
.sk-title { height: 2.6rem; width: 55%; margin-bottom: 1.5rem; }
.sk-row { height: 3.75rem; margin-bottom: .75rem; border-radius: 1rem; }
.sk-ring { position: absolute; inset: 4%; border-radius: 50%; border: 2px solid rgba(11, 11, 13, .06); border-top-color: var(--gold); animation: spin 2.4s linear infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

/* 1. Profilo + punteggio */
.overview > *, .reels > * { min-width: 0; }
.overview { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
.profile-top { display: flex; align-items: center; gap: 1.5rem; }
.avatar { width: 6rem; height: 6rem; flex: none; border-radius: 50%; overflow: hidden; object-fit: cover; }
.avatar.ph { font-size: 2.8rem; }
.profile-name { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(1.9rem, 3.4vw, 2.8rem); line-height: 1.05; word-break: break-word; }
.profile-handle { margin: .35rem 0 0; color: var(--ink-soft); font-size: 1.05rem; }
.profile-handle .city { color: var(--gold-ink); }
.profile-stats { display: flex; gap: clamp(1.5rem, 4vw, 3rem); margin: 2.25rem 0 0; padding: 1.5rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.profile-stats div { display: flex; flex-direction: column; }
.profile-stats strong { font-weight: 300; font-size: clamp(1.6rem, 2.6vw, 2.1rem); line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.profile-stats span { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); margin-top: .35rem; }
.profile-bio { margin: 1.75rem 0 0; white-space: pre-line; font-size: 1.05rem; line-height: 1.6; color: var(--ink-soft); }
.profile-bio.is-empty { font-style: italic; color: var(--ink-mute); }
.profile-link { display: inline-block; margin-top: .6rem; color: var(--gold-ink); font-size: .95rem; text-decoration: none; word-break: break-all; }

.score { text-align: center; }
.score-ring { position: relative; width: min(100%, 22rem); aspect-ratio: 1; margin: 0 auto; }
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring .track { stroke: rgba(11, 11, 13, .07); }
.score-ring .bar { transition: stroke-dashoffset 2s var(--ease); }
.score-center { position: absolute; inset: 0; display: grid; place-content: center; }
.score-value { font-family: var(--serif); font-size: clamp(6rem, 11vw, 8.5rem); line-height: .85; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.score-max { margin-top: .5rem; font-size: .8rem; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-mute); }
.score-grade { margin: 1.75rem 0 0; font-family: var(--serif); font-style: italic; font-size: clamp(1.6rem, 2.6vw, 2.1rem); color: var(--gold-ink); }
.score-stats { margin: .75rem 0 0; color: var(--ink-soft); font-size: 1rem; }
.score-stats .nowrap { white-space: nowrap; }
.score-stats .sep { color: var(--gold); margin: 0 .25rem; }

/* 2. Sei dimensioni */
.dims { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.dim { padding: 2rem 1.75rem 1.75rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); transition: border-color .6s var(--ease-soft), box-shadow .8s var(--ease); }
.dim:hover { border-color: rgba(212, 162, 81, .45); box-shadow: 0 24px 50px -30px rgba(11, 11, 13, .25); }
.dim-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.dim-label { margin: 0; font-size: 1.1rem; font-weight: 500; }
.dim-score { font-family: var(--serif); font-size: 2.4rem; line-height: 1; font-variant-numeric: tabular-nums; }
.dim-score small { font-family: var(--sans); font-size: .85rem; color: var(--ink-mute); margin-left: .15rem; }
.dim-bar { height: 2px; margin: 1.25rem 0 1.5rem; background: var(--line); border-radius: 2px; overflow: hidden; }
.dim-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light)); transform-origin: left; transform: scaleX(0); transition: transform 1.6s var(--ease) .2s; }
.dim.is-in .dim-bar span { transform: scaleX(var(--r)); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.check { display: grid; grid-template-columns: 1.1rem 1fr; gap: .6rem; font-size: .95rem; line-height: 1.4; }
.check-mark { font-weight: 600; text-align: center; }
.check.ok .check-mark { color: var(--gold); }
.check.no .check-mark { color: var(--ink-mute); font-weight: 400; }
.check.no .check-label { color: var(--ink-soft); }
.check-detail { display: block; font-size: .85rem; color: var(--ink-mute); margin-top: .1rem; }

/* 2b. Reel (approfondimento, non entra nel punteggio) */
.reels { display: grid; grid-template-columns: 1fr minmax(12rem, 15rem); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.reel-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 1px solid var(--line); }
.reel-stat { padding: 2rem 1.5rem 2rem 0; border-bottom: 1px solid var(--line); }
.reel-stat strong { display: block; font-weight: 200; font-size: clamp(2.8rem, 5.5vw, 4.6rem); line-height: 1; letter-spacing: -.035em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.reel-stat span { display: block; margin-top: .8rem; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute); max-width: 16rem; line-height: 1.5; }
.best-reel { display: block; text-decoration: none; color: var(--ink); }
.best-label { margin: 0 0 1rem; font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-ink); }
.best-media { position: relative; aspect-ratio: 9 / 16; border-radius: 1.1rem; overflow: hidden; box-shadow: 0 30px 60px -30px rgba(11, 11, 13, .45); }
.best-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.best-reel:hover .best-media img { transform: scale(1.03); }
.best-media.ph > svg { width: 2.2rem; height: 2.2rem; fill: none; stroke: var(--gold); stroke-width: 1.2; }
.best-views { font-family: var(--sans); font-style: normal; position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: .45rem; padding: 2.5rem 1rem 1rem; background: linear-gradient(transparent, rgba(11, 11, 13, .8)); color: var(--white); font-size: .95rem; font-variant-numeric: tabular-nums; }
.best-views svg { width: .85rem; height: .85rem; fill: var(--gold); }
.best-meta { display: flex; align-items: center; gap: .4rem; margin: .9rem 0 0; font-size: .9rem; color: var(--ink-soft); }
.best-meta svg { width: .85rem; height: .85rem; fill: var(--gold); }
.best-open { margin-left: auto; color: var(--gold-ink); }
.best-reel .sk.best-media { box-shadow: none; }

/* 3. Consigli */
.tips { list-style: none; margin: 0; padding: 0; counter-reset: tip; }
.tip { display: grid; grid-template-columns: clamp(4rem, 9vw, 7rem) 1fr; gap: 1rem; padding: 2rem 0; border-top: 1px solid var(--line); }
.tip:last-child { border-bottom: 1px solid var(--line); }
.tip-num { font-family: var(--serif); font-size: clamp(2.6rem, 4.5vw, 3.6rem); line-height: .9; color: var(--gold); }
.tip-dim { margin: 0 0 .5rem; font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-ink); }
.tip-text { margin: 0; font-size: clamp(1.1rem, 1.7vw, 1.35rem); font-weight: 300; line-height: 1.5; max-width: 46rem; }

/* 4. Competitor */
.toggle-names {
  flex: none; display: inline-flex; align-items: center; gap: .6rem;
  border: 0; background: none; cursor: pointer; padding: .4rem 0;
  font-size: .8rem; letter-spacing: .08em; color: var(--ink-mute);
}
.toggle-names .knob { width: 1.9rem; height: 1.1rem; border-radius: 999px; border: 1px solid var(--line); position: relative; transition: background .4s, border-color .4s; }
.toggle-names .knob::after { content: ''; position: absolute; top: .15rem; left: .15rem; width: .7rem; height: .7rem; border-radius: 50%; background: var(--ink-mute); transition: transform .5s var(--ease), background .4s; }
.toggle-names[aria-pressed="true"] .knob { background: var(--black); border-color: var(--black); }
.toggle-names[aria-pressed="true"] .knob::after { transform: translateX(.8rem); background: var(--gold); }
html.present .toggle-names { display: none; }

.rank { margin: 0 0 2rem; font-size: clamp(1.15rem, 1.8vw, 1.4rem); font-weight: 300; }
.rank strong { font-weight: 500; color: var(--gold-ink); }
.cmp { width: 100%; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
.cmp th { padding: 0 1.25rem 1rem; font-size: .72rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); text-align: right; white-space: nowrap; }
.cmp th:first-child, .cmp td:first-child { text-align: left; }
.cmp td { padding: 1.35rem 1.25rem; border-top: 1px solid var(--line); text-align: right; font-size: 1.1rem; font-weight: 300; white-space: nowrap; }
.cmp .who { font-weight: 500; }
.cmp .who small { display: block; font-weight: 300; font-size: .85rem; color: var(--ink-mute); max-height: 0; opacity: 0; overflow: hidden; transition: max-height .6s var(--ease), opacity .6s var(--ease-soft); }
.cmp.show-names .who small { max-height: 1.5rem; opacity: 1; }
.cmp .best { color: var(--gold-ink); font-weight: 500; }
.cmp .pts { display: inline-flex; align-items: center; gap: .9rem; }
.cmp .pts i { display: inline-block; width: 4.5rem; height: 2px; background: var(--line); position: relative; }
.cmp .pts i::after { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--gold); }
.cmp tr.me td { background: var(--black); color: var(--white); border-top-color: transparent; }
.cmp tr.me td:first-child { border-radius: 1rem 0 0 1rem; }
.cmp tr.me td:last-child { border-radius: 0 1rem 1rem 0; }
.cmp tr.me + tr td { border-top-color: transparent; }
.cmp tr.me .best { color: var(--gold-light); }
.cmp tr.me .pts i { background: rgba(255, 255, 255, .18); }
.cmp tr.me .who small { color: var(--on-dark-mute); }
.muted-note { margin: 0; color: var(--ink-soft); font-size: 1.1rem; font-weight: 300; }

/* 5. Analisi AI (dark card, il momento clou) */
.ai-card {
  position: relative; overflow: hidden;
  padding: clamp(2rem, 5vw, 4.5rem);
  border-radius: 1.75rem;
  background: var(--black); color: var(--white);
  box-shadow: 0 40px 80px -40px rgba(11, 11, 13, .55);
}
.ai-card::before {
  content: ''; position: absolute; inset: -40% -20% auto auto; width: 70%; height: 120%;
  background: radial-gradient(closest-side, rgba(212, 162, 81, .2), transparent 70%);
  pointer-events: none;
}
.ai-card > * { position: relative; }
.ai-card .eyebrow { display: flex; align-items: center; gap: .6rem; }
.ai-spark { width: 1rem; height: 1rem; fill: var(--gold); }
.ai-title { margin: 0 0 2.25rem; font-family: var(--serif); font-weight: 400; font-size: clamp(2.2rem, 4.4vw, 3.6rem); line-height: 1; }
.ai-title em { color: var(--gold); }
.ai-sintesi { margin: 0; font-family: var(--serif); font-size: clamp(1.55rem, 2.7vw, 2.3rem); line-height: 1.25; max-width: 54rem; }
.ai-confronto { margin: 1.5rem 0 0; font-size: clamp(1.05rem, 1.5vw, 1.2rem); font-weight: 300; line-height: 1.6; color: var(--on-dark-soft); max-width: 48rem; }
.ai-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(1.5rem, 3vw, 2.5rem); margin-top: clamp(2.5rem, 5vw, 3.5rem); padding-top: clamp(2.5rem, 5vw, 3.5rem); border-top: 1px solid var(--line-dark); }
.ai-label { margin: 0 0 1rem; font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.ai-side { display: grid; gap: 2.25rem; align-content: start; }
.ai-name { margin: 0; font-family: var(--serif); font-size: clamp(1.7rem, 2.6vw, 2.2rem); line-height: 1.1; }
.ai-reel { margin: 0; font-size: 1.1rem; font-weight: 300; line-height: 1.6; color: rgba(255, 255, 255, .86); }

.ig-card { background: var(--white); color: var(--ink); border-radius: 1.25rem; padding: 1.5rem 1.5rem 1.25rem; }
.ig-head { display: flex; align-items: center; gap: .9rem; margin-bottom: 1rem; }
.ig-head .avatar { width: 3.25rem; height: 3.25rem; }
.ig-head .avatar.ph { font-size: 1.5rem; }
.ig-user { font-weight: 600; font-size: .95rem; }
.ig-name { font-size: .88rem; color: var(--ink-soft); }
.ig-bio { margin: 0; white-space: pre-line; font-size: 1rem; line-height: 1.5; }
.ig-foot { display: flex; justify-content: flex-end; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.copy-btn { display: inline-flex; align-items: center; gap: .5rem; height: 2.6rem; padding: 0 1.25rem; border-radius: 999px; border: 1px solid var(--black); background: var(--black); color: var(--white); cursor: pointer; font-size: .9rem; font-weight: 500; transition: background .4s, color .4s, border-color .4s; }
.copy-btn:hover { background: var(--gold); border-color: var(--gold); color: var(--black); }
.copy-btn.is-done { background: var(--gold); border-color: var(--gold); color: var(--black); }
.copy-btn svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* Testo che compare parola per parola */
.words .w { opacity: 0; filter: blur(4px); animation: word-in .7s var(--ease) forwards; animation-delay: var(--wd); }
@keyframes word-in { to { opacity: 1; filter: none; } }

/* AI in scrittura */
.ai-writing { display: flex; align-items: center; gap: .9rem; margin: 0 0 2rem; font-size: 1.15rem; font-weight: 300; color: var(--on-dark-soft); }
.dots { display: inline-flex; gap: .35rem; }
.dots i { width: .45rem; height: .45rem; border-radius: 50%; background: var(--gold); animation: dot 1.2s var(--ease-soft) infinite; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.ai-card .sk { background: rgba(255, 255, 255, .06); }
.ai-card .sk::after { background: linear-gradient(100deg, transparent 20%, rgba(212, 162, 81, .22) 50%, transparent 80%); }
.ai-card .sk-line { height: 1.3rem; }

/* 6. Ultimi post */
.posts { display: grid; grid-template-columns: repeat(9, 1fr); gap: .75rem; }
.post { display: block; text-decoration: none; color: var(--ink-soft); }
.post-media { position: relative; aspect-ratio: 4 / 5; border-radius: .75rem; overflow: hidden; }
.post-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.post:hover .post-media img { transform: scale(1.04); }
.post-media.ph { font-size: 1.6rem; }
.post-media.ph svg { width: 1.4rem; height: 1.4rem; fill: none; stroke: var(--gold); stroke-width: 1.4; }
.post-badge { position: absolute; top: .5rem; right: .5rem; width: 1.5rem; height: 1.5rem; display: grid; place-items: center; border-radius: 50%; background: rgba(11, 11, 13, .55); }
.post-badge svg { width: .8rem; height: .8rem; fill: var(--white); }
.post-meta { display: flex; gap: .6rem; margin-top: .55rem; font-size: .8rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.post-meta span { display: inline-flex; align-items: center; gap: .25rem; }
.post-meta svg { width: .8rem; height: .8rem; fill: var(--gold); }

/* Fine report */
.block-end { text-align: center; margin-bottom: 1rem; }
.elapsed { margin: 0 0 2rem; font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.4rem); }
.elapsed strong { font-weight: 400; color: var(--gold-ink); font-style: italic; }

/* Telefono e tablet */
@media (max-width: 1000px) {
  .dims { grid-template-columns: repeat(2, 1fr); }
  .posts { grid-template-columns: repeat(5, 1fr); }
  .ai-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .overview { grid-template-columns: 1fr; gap: 3.5rem; }
  .overview .score { order: -1; }
  .reels { grid-template-columns: 1fr; }
  .reel-stat { padding: 1.5rem 1rem 1.5rem 0; }
  .reel-stat strong { font-size: 2.5rem; }
  .reel-stat span { font-size: .7rem; }
  .best-reel { max-width: 15rem; }
  .avatar { width: 4.5rem; height: 4.5rem; }
  .avatar.ph { font-size: 2.1rem; }
  .profile-stats { gap: 3rem; }
  .score-ring { width: min(80%, 18rem); }
  .dims { grid-template-columns: 1fr; }
  .dim { padding: 1.5rem 1.35rem; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .tip { grid-template-columns: 3.25rem 1fr; padding: 1.5rem 0; }
  .posts { grid-template-columns: repeat(3, 1fr); gap: .6rem; }

  /* La tabella diventa una pila di schede compatte: nome e punteggio in alto, quattro numeri sotto */
  .cmp, .cmp tbody { display: block; }
  .cmp thead { display: none; }
  .cmp tr { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem .5rem; padding: 1.1rem 1.15rem 1.2rem; border: 1px solid var(--line); border-radius: 1rem; margin-bottom: .7rem; }
  .cmp tr.me { background: var(--black); color: var(--white); border-color: var(--black); }
  .cmp td { display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; padding: 0; border: 0; font-size: 1rem; text-align: left; }
  .cmp td::before { content: attr(data-label); font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute); font-weight: 400; white-space: normal; line-height: 1.2; }
  .cmp td.who { grid-column: 1 / 3; font-size: 1.1rem; justify-content: center; }
  .cmp td.who::before { display: none; }
  .cmp td:nth-child(2) { grid-column: 3 / 5; align-items: flex-end; justify-content: center; font-size: 1.5rem; }
  .cmp td:nth-child(2)::before { display: none; }
  .cmp tr.me td { background: none; }
  .cmp tr.me td::before { color: var(--on-dark-mute); }
  .cmp .pts { gap: .7rem; }
  .cmp .pts i { width: 2.75rem; }
}
