/* Manuale utente (14.18). Stesse variabili e stesso tono del resto del sito; funziona anche da destra a sinistra (arabo) e in stampa. */
:root {
    --bg: #000; --surface: #0a0a0b; --card: #121214; --border: #27272a; --text: #ededed; --muted: #a1a1aa;
    --primary: #3b82f6; --success: #10b981; --warn: #f59e0b; --danger: #ef4444;
}
:root[data-theme="light"] { --bg: #fff; --surface: #f6f6f7; --card: #fff; --border: #e4e4e7; --text: #18181b; --muted: #52525b; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body.mn-body { margin: 0; background: var(--bg); color: var(--text); font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
[lang="ja"] body, [lang="zh"] body, [lang="ko"] body { line-height: 1.8; }
[lang="ar"] body, [lang="hi"] body { line-height: 1.85; }

.mn-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.mn-brand { font-weight: 800; font-size: 20px; letter-spacing: -.5px; color: var(--text); text-decoration: none; }
.mn-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.mn-lang { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.mn-lang select, .mn-btn { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font: inherit; font-size: 14px; cursor: pointer; text-decoration: none; }
.mn-btn.mn-primary { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.mn-btn:hover, .mn-lang select:hover { border-color: var(--primary); }
.mn-lang select:focus-visible, .mn-btn:focus-visible, .mn-search:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.mn-wrap { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 40px; max-width: 1180px; margin: 0 auto; padding: 28px 16px 80px; }
.mn-side { position: sticky; top: 76px; align-self: start; max-height: calc(100vh - 92px); overflow: auto; }
.mn-tocbox { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 4px 8px 8px; }
.mn-tocbox > summary { cursor: pointer; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); padding: 10px 8px; list-style: none; }
.mn-tocbox > summary::-webkit-details-marker { display: none; }
.mn-toc { list-style: none; margin: 0; padding: 0; }
.mn-toc a { display: flex; gap: 10px; align-items: baseline; padding: 7px 8px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 14px; line-height: 1.4; }
.mn-toc a:hover { background: var(--surface); }
.mn-toc .mn-n, h2 .mn-n { color: var(--primary); font-weight: 700; font-variant-numeric: tabular-nums; min-width: 1.6em; }
.mn-toc li[hidden], .mn-sec[hidden] { display: none; }

.mn-main { min-width: 0; }
.mn-head h1 { font-size: 34px; letter-spacing: -.8px; line-height: 1.15; margin: 0 0 10px; }
.mn-sub { color: var(--muted); margin: 0 0 6px; max-width: 70ch; }
.mn-ver { font-size: 12px; color: var(--muted); margin: 0 0 18px; text-transform: uppercase; letter-spacing: .6px; }
.mn-search { width: 100%; max-width: 520px; padding: 12px 14px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 10px; font: inherit; font-size: 16px; }
.mn-count { color: var(--muted); font-size: 13px; min-height: 1.4em; margin: 8px 0 0; }
.mn-loading { color: var(--muted); }
.mn-err { color: #fca5a5; background: rgba(239, 68, 68, .08); border: 1px solid rgba(239, 68, 68, .3); border-radius: 8px; padding: 10px 14px; }

.mn-sec { padding: 28px 0 8px; border-top: 1px solid var(--border); margin-top: 20px; }
.mn-sec h2 { font-size: 25px; letter-spacing: -.4px; line-height: 1.25; margin: 0 0 14px; display: flex; gap: 10px; align-items: baseline; }
.mn-anchor { margin-inline-start: auto; color: var(--muted); text-decoration: none; opacity: 0; font-weight: 400; }
.mn-sec h2:hover .mn-anchor, .mn-anchor:focus-visible { opacity: 1; }
.mn-sec h3 { font-size: 17px; margin: 24px 0 8px; }
.mn-sec p, .mn-sec li, .mn-sec dd { max-width: 76ch; overflow-wrap: anywhere; }
.mn-sec ul, .mn-sec ol { padding-inline-start: 1.4em; margin: 8px 0 14px; }
.mn-sec li { margin: 6px 0; }
.mn-sec a { color: var(--primary); }
strong { font-weight: 700; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace; font-size: .88em; background: var(--surface); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; }
kbd.mn-ui { font: 600 .86em/1.2 'Inter', system-ui, sans-serif; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px; padding: 1px 7px; white-space: nowrap; display: inline-block; }

.mn-box { display: flex; gap: 10px; align-items: baseline; border: 1px solid var(--border); border-inline-start-width: 4px; border-radius: 10px; padding: 12px 14px; margin: 14px 0; background: var(--card); max-width: 76ch; }
.mn-box-t { flex: none; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; }
.mn-tip { border-inline-start-color: var(--success); } .mn-tip .mn-box-t { color: var(--success); }
.mn-warn { border-inline-start-color: var(--warn); } .mn-warn .mn-box-t { color: var(--warn); }
.mn-note { border-inline-start-color: var(--primary); } .mn-note .mn-box-t { color: var(--primary); }

.mn-tablewrap { overflow-x: auto; margin: 12px 0 18px; border: 1px solid var(--border); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; min-width: 520px; }
th, td { text-align: start; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
thead th { background: var(--surface); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
tbody th { font-weight: 600; width: 26%; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }

.mn-faq { border: 1px solid var(--border); border-radius: 10px; margin: 8px 0; background: var(--card); max-width: 76ch; }
.mn-faq summary { cursor: pointer; font-weight: 600; padding: 12px 14px; }
.mn-faq p { margin: 0; padding: 0 14px 14px; color: var(--muted); }
dl { max-width: 76ch; } dt { font-weight: 700; margin-top: 14px; } dd { margin: 2px 0 0; margin-inline-start: 0; color: var(--muted); }
.mn-foot { margin-top: 40px; }

@media (max-width: 900px) {
    .mn-wrap { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-top: 16px; }
    .mn-side { position: static; max-height: none; overflow: visible; }
    .mn-head h1 { font-size: 28px; }
    .mn-sec h2 { font-size: 22px; }
    .mn-top { padding: 10px 12px; }
    .mn-lang span { display: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
    .mn-top, .mn-side, .mn-search, .mn-count, .mn-foot, .mn-anchor { display: none !important; }
    :root, :root[data-theme] { --bg: #fff; --surface: #f4f4f5; --card: #fff; --border: #d4d4d8; --text: #111; --muted: #444; }
    body.mn-body { font-size: 11pt; }
    .mn-wrap { display: block; padding: 0; max-width: none; }
    .mn-sec { break-inside: auto; border-top: 1px solid #ccc; }
    .mn-box, .mn-faq, tr { break-inside: avoid; }
    a { color: inherit; text-decoration: none; }
}
