/* SOS PC — stile principale */
:root {
  --navy: #0f2a5c;
  --navy-2: #163a7a;
  --blue: #2563eb;
  --yellow: #ffc72c;
  --red: #e63946;
  --green: #16a34a;
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-2: #eef2fa;
  --text: #0f172a;
  --muted: #55607a;
  --border: #dde3ef;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(15, 42, 92, .06), 0 8px 24px rgba(15, 42, 92, .08);
  --shadow-lg: 0 20px 50px rgba(15, 42, 92, .16);
  --maxw: 1180px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1220; --surface: #111a2e; --surface-2: #17223a; --text: #e8edf7; --muted: #9aa7c2;
    --border: #24314d; --blue: #6ea0ff; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1220; --surface: #111a2e; --surface-2: #17223a; --text: #e8edf7; --muted: #9aa7c2;
  --border: #24314d; --blue: #6ea0ff; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.3);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.65;
  color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--yellow); color: #000; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 12px; top: 12px; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; border-radius: 6px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; }
.brand img { width: 40px; height: 40px; }
.brand span b { color: var(--red); }
.nav-links { display: flex; gap: 4px; margin-left: auto; list-style: none; padding: 0; margin-block: 0; }
.nav-links a { display: block; padding: 8px 14px; border-radius: 999px; color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { background: var(--surface-2); }
.nav-cta { display: flex; gap: 8px; align-items: center; }
.menu-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: 10px; width: 44px; height: 44px; color: var(--text); cursor: pointer; }
.theme-toggle { background: none; border: 1px solid var(--border); border-radius: 999px; width: 40px; height: 40px; color: var(--text); cursor: pointer; display: grid; place-items: center; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 700; font-size: 1rem; text-decoration: none;
  border: 2px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s; font-family: inherit;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--yellow); color: #111; box-shadow: 0 6px 18px rgba(255, 199, 44, .35); }
.btn-primary:hover { box-shadow: 0 10px 26px rgba(255, 199, 44, .45); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn-sm { padding: 8px 16px; font-size: .92rem; }
.btn svg { width: 18px; height: 18px; }

/* Hero */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(255,199,44,.25), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(37,99,235,.45), transparent 60%),
    linear-gradient(135deg, #0b1f47 0%, #0f2a5c 55%, #163a7a 100%);
}
.hero .container { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; padding-top: 80px; padding-bottom: 90px; }
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; color: var(--yellow); }
.hero p.lead { font-size: 1.2rem; color: #cfdaf3; max-width: 36em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 24px; }
.hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.badges { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.badges li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); font-size: .9rem; color: #e1e9fb; }
.badges li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--yellow); margin-bottom: 14px; }
.section .eyebrow { color: var(--red); }

.hero-card {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); border-radius: 24px; padding: 28px;
  backdrop-filter: blur(10px); box-shadow: var(--shadow-lg);
}
.hero-card h2 { font-size: 1.25rem; color: #fff; }
.hero-card ol { list-style: none; padding: 0; margin: 18px 0 22px; counter-reset: s; }
.hero-card li { counter-increment: s; display: flex; gap: 14px; align-items: flex-start; padding: 10px 0; color: #dbe5fa; }
.hero-card li::before { content: counter(s); flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--yellow); color: #111; font-weight: 800; font-size: .9rem; }
.hero-card li strong { color: #fff; display: block; }

/* Sections */
.section { padding: 88px 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--border); }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.1rem; }

.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
  display: flex; flex-direction: column;
}
a.card { color: inherit; text-decoration: none; }
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--blue) 40%, var(--border)); }
.card p { color: var(--muted); }
.card .more { margin-top: auto; font-weight: 700; color: var(--blue); }
.icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px;
  background: color-mix(in srgb, var(--blue) 12%, transparent); color: var(--blue);
}
.icon svg { width: 26px; height: 26px; }
.icon.y { background: color-mix(in srgb, var(--yellow) 25%, transparent); color: #b7860b; }
.icon.r { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
.icon.g { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green); }

.service-card { padding: 34px; }
.service-card ul { padding-left: 0; list-style: none; margin: 0 0 22px; }
.service-card li { padding: 6px 0 6px 28px; position: relative; color: var(--muted); }
.service-card li::before { content: ""; position: absolute; left: 0; top: 13px; width: 16px; height: 9px; border-left: 3px solid var(--green); border-bottom: 3px solid var(--green); transform: rotate(-45deg); }

/* Steps */
.steps { counter-reset: st; }
.step { position: relative; padding-top: 64px; }
.step::before {
  counter-increment: st; content: counter(st); position: absolute; top: 0; left: 28px;
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; transform: translateY(20px);
  background: var(--navy); color: var(--yellow); font-weight: 800; font-size: 1.2rem;
}
:root[data-theme="dark"] .step::before { background: var(--yellow); color: #111; }

/* Problems chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.chip { padding: 9px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-weight: 600; font-size: .95rem; color: var(--text); text-decoration: none; }
a.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* CTA band */
.cta-band {
  border-radius: 28px; padding: 52px; color: #fff; display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center;
  background: radial-gradient(600px 300px at 100% 0, rgba(255,199,44,.25), transparent 60%), linear-gradient(135deg, #0f2a5c, #163a7a);
  box-shadow: var(--shadow-lg);
}
.cta-band h2 { color: #fff; margin-bottom: .3em; }
.cta-band p { color: #cfdaf3; margin: 0; }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-band .btn-ghost { color: #fff; border-color: rgba(255,255,255,.4); }

/* Page header */
.page-hero {
  background: linear-gradient(135deg, #0b1f47, #163a7a); color: #fff; padding: 64px 0 56px;
}
.page-hero h1 { color: #fff; font-size: clamp(1.9rem, 4vw, 3rem); max-width: 22em; }
.page-hero p { color: #cfdaf3; font-size: 1.15rem; max-width: 42em; margin: 0; }
.crumbs { font-size: .88rem; color: #a9bbe2; margin-bottom: 14px; }
.crumbs a { color: #d6e1f7; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span { margin: 0 6px; opacity: .6; }
.meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.meta .tag { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); color: #e1e9fb; }

.tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.tag.facile { color: var(--green); }
.tag.medio { color: #b7860b; }
.tag.avanzato { color: var(--red); }

/* Guides list */
.guide-tools { display: flex; flex-direction: column; gap: 20px; margin-bottom: 36px; }
.search {
  display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 8px 6px 20px; box-shadow: var(--shadow); max-width: 640px;
}
.search svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.search input { flex: 1; border: 0; background: transparent; font: inherit; color: var(--text); padding: 10px 0; outline: none; min-width: 0; }
.hero .search { margin-top: 8px; }
.guide-card h3 { font-size: 1.1rem; margin: 12px 0 8px; }
.guide-card p { font-size: .95rem; margin-bottom: 14px; }
.guide-card .foot { margin-top: auto; display: flex; gap: 8px; align-items: center; font-size: .85rem; color: var(--muted); }
.guide-card .cat { font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); }
.empty { text-align: center; color: var(--muted); padding: 40px 0; display: none; }

/* Article */
.article-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; padding: 56px 20px 80px; }
.prose { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(22px, 4vw, 48px); box-shadow: var(--shadow); min-width: 0; }
.prose h2 { font-size: 1.55rem; margin-top: 1.8em; scroll-margin-top: 90px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.5em; scroll-margin-top: 90px; }
.prose > p:first-child { font-size: 1.15rem; color: var(--muted); }
.prose ol, .prose ul { padding-left: 1.4em; margin: 0 0 1.2em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--blue); font-weight: 700; }
.prose code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; font-size: .9em; }
.prose pre { background: #0b1220; color: #e8edf7; padding: 16px; border-radius: 12px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose kbd { border: 1px solid var(--border); border-bottom-width: 3px; border-radius: 6px; padding: 1px 6px; font-size: .85em; background: var(--surface-2); font-family: inherit; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; }
.prose th { background: var(--surface-2); }
.prose blockquote { margin: 0 0 1.2em; padding: 14px 20px; border-left: 4px solid var(--border); color: var(--muted); }
.callout { display: flex; gap: 14px; margin: 1.4em 0; padding: 16px 20px; border-radius: 14px; border: 1px solid; }
.callout p { margin: 0; color: var(--text); }
.callout p + p { margin-top: .6em; }
.callout::before { flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: .9rem; margin-top: 1px; }
.callout.tip { background: color-mix(in srgb, var(--green) 9%, transparent); border-color: color-mix(in srgb, var(--green) 30%, transparent); }
.callout.tip::before { content: "✓"; background: var(--green); color: #fff; }
.callout.warning { background: color-mix(in srgb, var(--red) 8%, transparent); border-color: color-mix(in srgb, var(--red) 30%, transparent); }
.callout.warning::before { content: "!"; background: var(--red); color: #fff; }
.callout.note { background: color-mix(in srgb, var(--blue) 8%, transparent); border-color: color-mix(in srgb, var(--blue) 28%, transparent); }
.callout.note::before { content: "i"; background: var(--blue); color: #fff; }

.aside { display: flex; flex-direction: column; gap: 20px; }
.aside .sticky { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 20px; }
.toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.toc h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 10px; }
.toc ol { list-style: none; padding: 0; margin: 0; }
.toc a { display: block; padding: 6px 0 6px 12px; border-left: 2px solid var(--border); color: var(--text); text-decoration: none; font-size: .92rem; }
.toc a:hover, .toc a.active { border-color: var(--blue); color: var(--blue); }
.help-box { background: linear-gradient(135deg, #0f2a5c, #163a7a); color: #fff; border-radius: var(--radius); padding: 24px; }
.help-box h2 { font-size: 1.15rem; color: #fff; }
.help-box p { color: #cfdaf3; font-size: .95rem; }
.help-box .btn { width: 100%; margin-top: 8px; }
.help-box .btn-ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.related { margin-top: 40px; }

/* FAQ */
.faq { max-width: 860px; margin: 0 auto; }
.faq h2 { margin-top: 1.6em; font-size: 1.4rem; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 12px; box-shadow: var(--shadow); }
.faq summary { cursor: pointer; padding: 18px 22px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--blue); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 22px 18px; color: var(--muted); }
.faq details > div p:last-child { margin: 0; }

/* RustDesk */
.os-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.os-tabs button { font: inherit; font-weight: 700; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.os-tabs button[aria-selected="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.os-panel[hidden] { display: none; }
.download-box { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; background: var(--surface-2); border-radius: var(--radius-sm); padding: 20px 22px; margin: 0 0 20px; }
.download-box strong { display: block; }
.download-box small { color: var(--muted); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 28px; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list .icon { margin: 0; flex: none; width: 46px; height: 46px; }
.contact-list strong { display: block; }
.contact-list a { font-weight: 700; text-decoration: none; }
form.request { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: .92rem; }
.field input, .field select, .field textarea {
  font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; width: 100%;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--blue); border-color: transparent; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-note { font-size: .85rem; color: var(--muted); margin: 0; }
.radio-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.radio-cards label { border: 1px solid var(--border); border-radius: 12px; padding: 12px; cursor: pointer; font-weight: 600; font-size: .92rem; display: flex; gap: 8px; align-items: center; background: var(--bg); }
.radio-cards input { accent-color: var(--navy); }
.radio-cards label:has(input:checked) { border-color: var(--blue); background: color-mix(in srgb, var(--blue) 8%, var(--bg)); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 56px; }
.stat { text-align: left; }
.stat b { display: block; font-size: 2rem; font-weight: 800; color: var(--yellow); letter-spacing: -.02em; }
.stat span { color: #cfdaf3; font-size: .95rem; }

/* Footer */
.site-footer { background: #081631; color: #b5c3e0; padding: 64px 0 28px; margin-top: 0; }
.site-footer a { color: #e1e9fb; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h2 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .95rem; }
.site-footer .brand { color: #fff; margin-bottom: 14px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 44px; padding-top: 22px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: .85rem; }

/* Floating help button (mobile) */
.fab { display: none; }

.prose-plain { max-width: 820px; }
.prose-plain h2 { margin-top: 1.6em; font-size: 1.4rem; }

/* Responsive */
@media (max-width: 1020px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .article-wrap { grid-template-columns: 1fr; }
  .aside .sticky { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 880px) {
  .nav-links {
    display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--border); padding: 10px 16px 18px; box-shadow: var(--shadow-lg);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; border-radius: 10px; }
  .menu-toggle { display: grid; place-items: center; margin-left: auto; }
  .nav-cta .btn { display: none; }
  .hero .container { grid-template-columns: 1fr; padding-top: 56px; padding-bottom: 64px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .cta-band { grid-template-columns: 1fr; padding: 34px 26px; }
  .contact-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 64px 0; }
  .fab {
    display: inline-flex; position: fixed; right: 16px; bottom: 16px; z-index: 60; box-shadow: var(--shadow-lg);
  }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .grid-4 { grid-template-columns: 1fr; }
  .row-2, .radio-cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .article-wrap { padding: 28px 16px 60px; }
  .hero-actions .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
