/* Voice2Text — manuale d'uso (impaginato con Paged.js) */
:root {
  --navy: #0F2C4F;
  --blue: #1667A8;
  --teal: #17B3A9;
  --coral: #F26B4F;
  --muted: #5B6B80;
  --line: #DCE5EF;
  --soft: #EEF4FA;
  --grad: linear-gradient(135deg, #1667A8, #17B3A9);
}

@page {
  size: A4;
  margin: 22mm 19mm 20mm 19mm;
  @top-left { font: 500 7.5pt Inter, sans-serif; color: #8FA3BC; }
  @top-right { content: string(chapter); font: 500 7.5pt Inter, sans-serif; color: #8FA3BC; }
  @bottom-center { content: counter(page); font: 700 8pt Inter, sans-serif; color: var(--blue); }
}
@page cover { margin: 0; @top-left { content: none; } @top-right { content: none; } @bottom-center { content: none; } }
@page toc { @top-left { content: none; } @top-right { content: none; } @bottom-center { content: none; } }

html { font-size: 9.6pt; }
body {
  margin: 0; color: var(--navy); line-height: 1.58;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
:lang(zh) body, body:lang(zh) { font-family: Inter, "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", sans-serif; }
:lang(ja) body, body:lang(ja) { font-family: Inter, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans CJK JP", sans-serif; }
:lang(ar) body, body:lang(ar) { font-family: "Geeza Pro", "Noto Sans Arabic", Inter, sans-serif; line-height: 1.75; }
:lang(ru) body { font-family: Inter, "Helvetica Neue", Arial, sans-serif; }
h1, h2, h3 { line-height: 1.22; font-weight: 800; letter-spacing: -.01em; }
p { margin: 0 0 .7em; }
b { font-weight: 700; }
a { color: inherit; text-decoration: none; }
code { font-family: ui-monospace, Menlo, monospace; font-size: .86em; background: var(--soft); color: var(--blue); padding: .05em .35em; border-radius: 3px; }
kbd { font-family: Inter, sans-serif; font-size: .8em; font-weight: 700; padding: .05em .45em; border: 1px solid #C9D6E5; border-bottom-width: 2px; border-radius: 4px; background: #fff; white-space: nowrap; color: var(--navy); }
pre { font: 8pt/1.5 ui-monospace, Menlo, monospace; background: #0F2C4F; color: #DDEBFA; padding: 4mm 5mm; border-radius: 3mm; white-space: pre-wrap; direction: ltr; text-align: left; break-inside: avoid; }

/* ------------------------- copertina ------------------------- */
.cover {
  page: cover; break-after: page; height: 297mm; box-sizing: border-box; position: relative; overflow: hidden;
  padding: 20mm 20mm 16mm; color: #fff; display: flex; flex-direction: column;
  background: linear-gradient(160deg, #081B33 0%, #0F2C4F 30%, #134B85 62%, #1667A8 80%, #17B3A9 100%);
}
.glow { position: absolute; border-radius: 50%; filter: blur(2px); }
.g1 { width: 170mm; height: 170mm; right: -70mm; top: -60mm; background: radial-gradient(circle, rgba(23,179,169,.45), rgba(23,179,169,0) 65%); }
.g2 { width: 150mm; height: 150mm; left: -70mm; bottom: 20mm; background: radial-gradient(circle, rgba(242,107,79,.32), rgba(242,107,79,0) 65%); }
.cover-wave { position: absolute; left: -5mm; right: -5mm; width: 220mm; height: 46mm; top: 112mm; fill: rgba(255,255,255,.08); }
.cover-wave.w2 { top: 128mm; fill: rgba(23,179,169,.16); height: 34mm; }
.cover-top { position: relative; display: flex; align-items: center; gap: 4mm; }
.cover-icon { width: 17mm; height: 17mm; filter: drop-shadow(0 3mm 6mm rgba(0,0,0,.35)); }
.cover-brand { font-weight: 800; font-size: 15pt; letter-spacing: .06em; color: #fff; }
.cover-brand span { color: #5EEAD4; }
.cover-brand i { font-style: normal; font-size: 8pt; background: var(--blue); border-radius: 2mm; padding: .5mm 1.6mm; vertical-align: super; margin-left: 1mm; }
.cover-main { position: relative; margin-top: 16mm; }
.cover-kicker { display: inline-block; font-weight: 700; font-size: 10pt; letter-spacing: .18em; text-transform: uppercase; color: #0F2C4F; background: #5EEAD4; padding: 1.2mm 3.5mm; border-radius: 10mm; margin: 0 0 5mm; }
:lang(zh) .cover-kicker, :lang(ja) .cover-kicker, :lang(ar) .cover-kicker { letter-spacing: .05em; }
.cover h1 { font-size: 54pt; margin: 0; letter-spacing: -.02em; line-height: 1; }
.cover-claim { font-size: 19pt; font-weight: 700; margin: 4mm 0 3mm; background: linear-gradient(90deg, #A7F3EC, #FFFFFF); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cover-sub { font-size: 11pt; color: rgba(255,255,255,.82); max-width: 135mm; margin: 0; }
.cover-chips { display: flex; flex-wrap: wrap; gap: 2.5mm; margin-top: 7mm; }
.cover-chips span { font-size: 9pt; font-weight: 700; padding: 1.5mm 4mm; border-radius: 10mm; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.1); }
.cover-shot { position: relative; margin-top: auto; margin-bottom: 9mm; display: flex; justify-content: center; }
.win { width: 158mm; border-radius: 3mm; overflow: hidden; background: #fff; box-shadow: 0 12mm 28mm rgba(3,12,25,.55), 0 0 0 1px rgba(255,255,255,.25); transform: rotate(-2.2deg); }
.win-bar { height: 6mm; background: #E9EEF4; display: flex; align-items: center; gap: 1.6mm; padding-left: 3mm; }
.win-bar i { width: 2.4mm; height: 2.4mm; border-radius: 50%; background: #F26B4F; }
.win-bar i:nth-child(2) { background: #FBBF24; } .win-bar i:nth-child(3) { background: #22C55E; }
.win img { display: block; width: 100%; }
.cover-foot { position: relative; display: flex; justify-content: space-between; border-top: 1px solid rgba(255,255,255,.3); padding-top: 4mm; font-size: 9.5pt; font-weight: 600; color: rgba(255,255,255,.85); }

/* ------------------------- quarta di copertina ------------------------- */
.backcover {
  page: cover; break-before: page; height: 297mm; box-sizing: border-box; padding: 0 30mm; color: #fff; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(200deg, #081B33 0%, #0F2C4F 45%, #1667A8 85%, #17B3A9 100%);
}
.backcover img { width: 26mm; margin-bottom: 6mm; filter: drop-shadow(0 3mm 6mm rgba(0,0,0,.35)); }
.backcover .cover-brand { font-size: 20pt; }
.back-legal { font-size: 8.5pt; color: rgba(255,255,255,.72); max-width: 120mm; margin-top: 6mm; }

/* ------------------------- indice ------------------------- */
.toc { page: toc; break-after: page; padding-top: 6mm; }
.toc-title { font-size: 28pt; margin: 0 0 8mm; }
.toc-title::after { content: ""; display: block; width: 22mm; height: 1.4mm; border-radius: 1mm; background: var(--grad); margin-top: 4mm; }
.toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.toc li { counter-increment: toc; border-bottom: 1px solid var(--line); }
.toc a { display: flex; align-items: baseline; gap: 4mm; padding: 2.6mm 0; font-size: 11.5pt; font-weight: 600; }
.toc a::before { content: counter(toc, decimal-leading-zero); font-weight: 800; font-size: 10pt; color: var(--teal); min-width: 8mm; }
.toc a::after { content: target-counter(attr(href), page); margin-inline-start: auto; font-weight: 700; color: var(--blue); font-variant-numeric: tabular-nums; }

/* ------------------------- capitoli ------------------------- */
body { counter-reset: chap; }
.chapter { break-before: page; counter-increment: chap; }
.chapter > h1 { string-set: chapter content(text); font-size: 23pt; margin: 0 0 4mm; padding-top: 2mm; }
.chapter > h1::before {
  content: counter(chap, decimal-leading-zero); display: inline-flex; align-items: center; justify-content: center;
  width: 11mm; height: 11mm; border-radius: 3mm; background: var(--grad); color: #fff; font-size: 11pt; margin-inline-end: 4mm; vertical-align: 2mm;
}
.lead { font-size: 11pt; color: #33475F; border-inline-start: 1.2mm solid var(--teal); padding-inline-start: 4mm; margin: 0 0 5mm; }
h2 { font-size: 13pt; margin: 6mm 0 2mm; color: var(--navy); break-after: avoid; }
h3 { font-size: 10.5pt; margin: 4.5mm 0 1mm; color: var(--blue); break-after: avoid; }
ul, ol { padding-inline-start: 5.5mm; margin: 0 0 3mm; }
li { margin-bottom: 1.3mm; }
ul.checks { list-style: none; padding: 0; }
ul.checks li { position: relative; padding-inline-start: 7mm; }
ul.checks li::before { content: "✓"; position: absolute; inset-inline-start: 0; top: 0; width: 4.6mm; height: 4.6mm; border-radius: 50%; background: var(--teal); color: #fff; font-size: 7pt; font-weight: 800; display: flex; align-items: center; justify-content: center; }

figure { margin: 4mm 0 5mm; break-inside: avoid; }
.shot { border-radius: 2.2mm; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 2mm 6mm rgba(15,44,79,.12); }
.shot img { display: block; width: 100%; }
figcaption { font-size: 8.3pt; color: var(--muted); margin-top: 2mm; }
figcaption b { color: var(--blue); }

table { width: 100%; border-collapse: collapse; font-size: 8.8pt; margin: 2mm 0 4mm; break-inside: avoid; }
th { text-align: start; background: var(--navy); color: #fff; font-weight: 700; padding: 2mm 3mm; }
th:first-child { border-start-start-radius: 2mm; } th:last-child { border-start-end-radius: 2mm; }
td { padding: 2mm 3mm; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:nth-child(odd) td { background: #F7FAFD; }

.tip, .warn { border-radius: 2.5mm; padding: 3.5mm 4.5mm; margin: 4mm 0; break-inside: avoid; font-size: 9.2pt; }
.tip { background: #E7F7F5; border-inline-start: 1.4mm solid var(--teal); }
.warn { background: #FFF1EA; border-inline-start: 1.4mm solid #EA580C; }
.warn p:last-child, .tip p:last-child { margin-bottom: 0; }
.cover[dir="rtl"] h1 { text-align: right; }
