/* Anzianella - GUI "grande e leggibile": testo grande, alto contrasto, bersagli enormi, pochi elementi per schermata */
:root {
  --bg: #ffffff; --surface: #f4f0ff; --card: #ffffff; --ink: #14101f; --ink2: #3b3354; --ink3: #5a5075;
  --line: #cfc5ea; --p: #5326d9; --pd: #3b1aa8; --pl: #ece5ff; --on-p: #ffffff;
  --warn: #fff3cf; --warn-line: #d9a514; --shadow: 0 8px 24px rgba(40, 20, 90, .14);
  --f: 'Atkinson Hyperlegible', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
}
[data-theme="dark"] {
  --bg: #0e0b16; --surface: #1a1430; --card: #19132b; --ink: #f7f4ff; --ink2: #d3caee; --ink3: #b0a5d0;
  --line: #3d3360; --p: #b79cff; --pd: #d3c2ff; --pl: #2b2150; --on-p: #130d26;
  --warn: #3a2f10; --warn-line: #b58a12; --shadow: 0 8px 24px rgba(0, 0, 0, .5);
}
.k-iphone { --c: #2563eb; } .k-android { --c: #4d7c0f; } .k-windows { --c: #0e7490; } .k-whatsapp { --c: #15803d; }
.k-wifi-internet { --c: #b45309; } .k-email { --c: #b91c1c; } .k-sicurezza { --c: #7e22ce; } .k-start { --c: #5326d9; }
[data-theme="dark"] .k-iphone { --c: #7aa7ff; } [data-theme="dark"] .k-android { --c: #a3d95b; } [data-theme="dark"] .k-windows { --c: #5fd0e6; }
[data-theme="dark"] .k-whatsapp { --c: #5fdc8a; } [data-theme="dark"] .k-wifi-internet { --c: #ffb457; } [data-theme="dark"] .k-email { --c: #ff8a8a; }
[data-theme="dark"] .k-sicurezza { --c: #d6a6ff; } [data-theme="dark"] .k-start { --c: #b79cff; }

html { font-size: 112.5%; scroll-behavior: smooth; }
html[data-size="2"] { font-size: 131%; }
html[data-size="3"] { font-size: 150%; }
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-family: var(--f); font-size: 1rem; line-height: 1.7; background: var(--bg); color: var(--ink); -webkit-text-size-adjust: 100%; }
a { color: var(--p); }
img { max-width: 100%; }
h1, h2, h3 { font-weight: 700; line-height: 1.2; margin: 0; letter-spacing: -.01em; }
:focus-visible { outline: 4px solid #ff9f1c; outline-offset: 3px; border-radius: 8px; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 1.25rem; }

/* ---------- testata ---------- */
.topbar { background: var(--bg); border-bottom: 2px solid var(--line); }
.topbar-in { max-width: 960px; margin: 0 auto; padding: .6rem 1.25rem; display: flex; align-items: center; gap: .7rem; min-height: 72px; }
.logo { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); font-size: 1.5rem; font-weight: 700; margin-right: auto; }
.logo .mark { font-size: 1.9rem; line-height: 1; }
.logo b { color: var(--p); }
.tool { display: inline-flex; align-items: center; gap: .4rem; min-height: 52px; padding: 0 1rem; border: 2px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); font: 700 1rem var(--f); cursor: pointer; }
.tool:hover { border-color: var(--p); color: var(--p); }
.tool b { font-size: 1.15rem; }

/* ---------- ricerca ---------- */
.sbox { position: relative; display: block; max-width: 780px; }
.sfield { position: relative; display: flex; align-items: center; background: var(--card); border: 3px solid var(--p); border-radius: 18px; box-shadow: var(--shadow); }
.sfield:focus-within { box-shadow: 0 0 0 5px color-mix(in srgb, var(--p) 30%, transparent), var(--shadow); }
.sicon { flex: none; width: 30px; height: 30px; margin-left: 18px; color: var(--p); }
.sfield input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 1.3rem; padding: 21px 16px; outline: 0; -webkit-appearance: none; appearance: none; }
.sfield input::placeholder { color: var(--ink3); }
.sfield input::-webkit-search-cancel-button { -webkit-appearance: none; }
.go { display: block; width: 100%; margin-top: 12px; min-height: 66px; border: 0; border-radius: 18px; background: var(--p); color: var(--on-p); font: 700 1.35rem var(--f); cursor: pointer; letter-spacing: .02em; }
.go:hover { background: var(--pd); }
[data-theme="dark"] .go:hover { background: #cdb9ff; }
.sbox.row { display: flex; gap: 10px; align-items: stretch; max-width: 100%; }
.sbox.row .sfield { flex: 1; }
.sbox.row .sfield input { padding: 16px 12px; font-size: 1.15rem; }
.sbox.row .go { margin: 0; width: auto; min-height: 0; padding: 0 1.6rem; font-size: 1.15rem; }
.sdrop { position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: var(--card); border: 3px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 8px; max-height: min(62vh, 520px); overflow: auto; z-index: 300; text-align: left; }
.sitem { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 12px; text-decoration: none; color: var(--ink); min-height: 64px; }
.sitem:hover, .sitem.on { background: var(--pl); }
.sbadge, .cbadge, .ico { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; font-size: 1.8rem; line-height: 1; background: color-mix(in srgb, var(--c, var(--p)) 16%, var(--card)); border: 2px solid color-mix(in srgb, var(--c, var(--p)) 45%, transparent); }
.stext { display: flex; flex-direction: column; min-width: 0; }
.stext strong { font-size: 1.1rem; line-height: 1.3; }
.stext small { color: var(--ink3); font-size: .95rem; }
.smore { display: block; text-align: center; padding: 14px; font-weight: 700; font-size: 1.05rem; text-decoration: none; border-top: 2px solid var(--line); margin-top: 6px; }
.sempty { padding: 16px; color: var(--ink2); font-size: 1.05rem; }

/* ---------- home ---------- */
.hero { background: var(--surface); border-bottom: 2px solid var(--line); padding: 2rem 0 2.4rem; }
.ask { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.avatar { flex: none; width: 84px; height: 84px; border-radius: 50%; object-fit: cover; object-position: 50% 30%; border: 4px solid var(--p); background: var(--card); }
.say { background: var(--card); border: 2px solid var(--line); border-radius: 22px 22px 22px 4px; padding: .7rem 1.1rem; font-size: 1.15rem; font-weight: 700; }
.hero h1 { font-size: clamp(2.3rem, 7.5vw, 4rem); letter-spacing: -.02em; margin: 1.1rem 0 .6rem; }
.hero h1 em { display: block; font-style: normal; color: var(--p); }
.lead { font-size: 1.2rem; color: var(--ink2); max-width: 40rem; margin: 0 0 1.5rem; }
.try { margin-top: 1.3rem; font-weight: 700; color: var(--ink2); }
.chips { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .6rem; }
.chips a { display: inline-flex; align-items: center; min-height: 52px; padding: 0 1.2rem; border: 2px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.05rem; }
.chips a:hover { border-color: var(--p); color: var(--p); }

.section { padding: 2.6rem 0 0; scroll-margin-top: 10px; }
.section h2 { font-size: clamp(1.7rem, 4.6vw, 2.3rem); margin-bottom: .4rem; }
.sub { color: var(--ink2); font-size: 1.1rem; margin: 0 0 1.2rem; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; min-height: 168px; padding: 1.2rem; border: 3px solid var(--c); border-radius: 22px; background: var(--card); color: var(--ink); text-decoration: none; transition: transform .15s, background .15s; }
.tile:hover { transform: translateY(-3px); background: color-mix(in srgb, var(--c) 9%, var(--card)); }
.tile .ico { width: 66px; height: 66px; font-size: 2.1rem; border-radius: 50%; margin-bottom: .3rem; }
.tile strong { font-size: 1.4rem; line-height: 1.15; }
.tile small { color: var(--ink2); font-size: 1.02rem; }

.list { display: grid; gap: .8rem; }
.card { position: relative; display: flex; align-items: center; gap: 1rem; min-height: 88px; padding: 1rem 3rem 1rem 1.1rem; border: 2px solid var(--line); border-radius: 18px; background: var(--card); color: var(--ink); text-decoration: none; }
.card::after { content: "›"; position: absolute; right: 1.1rem; top: 50%; transform: translateY(-52%); font-size: 2.2rem; color: var(--p); font-weight: 700; line-height: 1; }
.card:hover { border-color: var(--c, var(--p)); background: color-mix(in srgb, var(--c, var(--p)) 7%, var(--card)); }
.cbody { display: flex; flex-direction: column; min-width: 0; gap: .1rem; }
.ctag { font-size: .82rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--c, var(--p)); }
.card h3 { font-size: 1.25rem; line-height: 1.3; }
.card p { margin: .15rem 0 0; color: var(--ink2); font-size: 1.02rem; line-height: 1.5; }
.cmeta { color: var(--ink3); font-size: .95rem; }

details.group { border: 3px solid var(--line); border-radius: 22px; background: var(--card); margin-bottom: .9rem; }
details.group > summary { display: flex; align-items: center; gap: 1rem; min-height: 84px; padding: .8rem 1.2rem; cursor: pointer; list-style: none; font-size: 1.4rem; font-weight: 700; }
details.group > summary::-webkit-details-marker { display: none; }
details.group > summary small { margin-left: auto; font-size: 1rem; font-weight: 400; color: var(--ink3); }
details.group > summary::after { content: "＋"; font-size: 1.5rem; color: var(--p); }
details.group[open] > summary::after { content: "－"; }
details.group[open] { border-color: var(--c); }
details.group .list { padding: 0 1rem 1.2rem; }

/* ---------- pagine interne ---------- */
.findbar { background: var(--surface); border-bottom: 2px solid var(--line); padding: .9rem 0; }
.pagehead { padding: 1.6rem 0 .4rem; }
.pagehead h1 { font-size: clamp(2rem, 6vw, 3rem); margin: .8rem 0 .5rem; }
.pagehead p { color: var(--ink2); font-size: 1.15rem; margin: 0; }
.back { display: inline-flex; align-items: center; gap: .5rem; min-height: 52px; padding: 0 1.1rem; border: 2px solid var(--line); border-radius: 14px; text-decoration: none; font-weight: 700; color: var(--ink); background: var(--card); }
.back:hover { border-color: var(--p); color: var(--p); }
.crumbs { font-size: .95rem; color: var(--ink3); margin-top: 1rem; }
.crumbs a { color: var(--ink2); }
.main-pad { padding-bottom: 2rem; }
.results-head { font-size: 1.2rem; font-weight: 700; margin: 1.4rem 0 1rem; }
.noresults { border: 2px dashed var(--line); border-radius: 18px; padding: 1.2rem; font-size: 1.1rem; color: var(--ink2); }

.guide { max-width: 820px; margin: 0 auto; padding: 0 1.25rem 2rem; }
.guide h1 { font-size: clamp(2rem, 6.4vw, 3.1rem); margin: 1rem 0 .9rem; }
.pills { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.pill { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem; border-radius: 999px; border: 2px solid var(--line); background: var(--card); font-weight: 700; font-size: 1rem; color: var(--ink); text-decoration: none; }
.pill.cat { border-color: var(--c); }
.guide .lead { margin: 1.2rem 0 1.5rem; max-width: none; font-size: 1.25rem; }
.need { background: var(--warn); border: 3px solid var(--warn-line); border-radius: 20px; padding: 1.1rem 1.4rem; margin-bottom: 1.8rem; }
.need h2 { font-size: 1.3rem; margin: 0 0 .4rem; }
.need ul { margin: 0; padding-left: 1.3rem; line-height: 1.8; font-size: 1.1rem; }
.guide h2.h { font-size: clamp(1.6rem, 4.6vw, 2.1rem); margin: 2.2rem 0 1rem; }
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.step { counter-increment: s; display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); column-gap: 1rem; padding: 1.3rem 1.3rem 1.4rem; border: 2px solid var(--line); border-radius: 22px; background: var(--card); break-inside: avoid; }
.step::before { content: counter(s); grid-row: 1 / span 2; display: grid; place-items: center; width: 3.4rem; height: 3.4rem; border-radius: 50%; background: var(--p); color: var(--on-p); font-weight: 700; font-size: 1.6rem; }
.step h3 { font-size: 1.35rem; margin: .15rem 0 .4rem; }
.step p { margin: 0; font-size: 1.15rem; line-height: 1.8; color: var(--ink); }
.note { color: var(--ink3); font-size: .98rem; margin: 1rem 0 0; }
.nonna { display: flex; gap: 1rem; align-items: flex-start; margin: 1.8rem 0; padding: 1.2rem 1.3rem; background: var(--pl); border-radius: 24px 24px 24px 6px; border: 2px solid var(--line); }
.nonna img { flex: none; width: 76px; height: 76px; border-radius: 50%; object-fit: cover; object-position: 50% 30%; border: 4px solid var(--p); }
.nonna p { margin: 0; font-size: 1.15rem; line-height: 1.75; }
details.faq { border: 2px solid var(--line); border-radius: 18px; background: var(--card); margin-bottom: .8rem; }
details.faq summary { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1.2rem; cursor: pointer; font-weight: 700; font-size: 1.2rem; list-style: none; line-height: 1.35; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "＋"; color: var(--p); font-size: 1.4rem; flex: none; }
details.faq[open] summary::after { content: "－"; }
details.faq p { margin: 0; padding: 0 1.2rem 1.2rem; font-size: 1.12rem; line-height: 1.8; }
.related { margin-top: 2.4rem; }
.actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1rem; }

/* ---------- footer ---------- */
.foot { margin-top: 3rem; background: var(--surface); border-top: 2px solid var(--line); padding: 2.2rem 0; font-size: 1.02rem; color: var(--ink2); }
.foot strong.brand { font-size: 1.5rem; color: var(--ink); }
.foot-cats { display: flex; flex-wrap: wrap; gap: .6rem 1.3rem; margin: 1.2rem 0; }
.foot a { color: var(--ink); font-weight: 700; }
.foot small { display: block; color: var(--ink3); font-size: .95rem; }

@media (min-width: 1000px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .tool span { display: none; }
  .topbar-in { padding: .5rem .9rem; gap: .5rem; }
  .logo { font-size: 1.3rem; } .logo .mark { font-size: 1.6rem; }
  .avatar { width: 68px; height: 68px; } .say { font-size: 1.02rem; }
  .sfield input { font-size: 1.15rem; padding: 18px 10px; } .sicon { margin-left: 14px; width: 26px; height: 26px; }
  .sbox.row { flex-direction: column; } .sbox.row .go { min-height: 56px; }
  .step { grid-template-columns: 2.9rem minmax(0, 1fr); column-gap: .8rem; padding: 1.1rem 1rem 1.2rem; }
  .step::before { width: 2.9rem; height: 2.9rem; font-size: 1.4rem; }
  .tile { min-height: 150px; padding: 1rem; } .tile strong { font-size: 1.2rem; }
  .card { gap: .8rem; padding-left: .9rem; } .cbadge, .ico, .sbadge { width: 48px; height: 48px; font-size: 1.5rem; }
}
@media print {
  .topbar, .findbar, .foot, .related, .actions, .back, .crumbs, .no-print { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  html, html[data-size] { font-size: 100%; }
  .step { border: 1px solid #999; } .step::before { background: #000; color: #fff; }
  details.faq summary::after { content: ""; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } html { scroll-behavior: auto; } }
