:root {
  --bg: #f6f8fa;
  --card: #ffffff;
  --text: #17212b;
  --muted: #5a6876;
  --line: #d9e0e7;
  --brand: #0b6e7f;
  --brand-dark: #08525f;
  --ok-bg: #e7f6ec; --ok-text: #135c2d;
  --warn-bg: #fff4e0; --warn-text: #7a4a00;
  --info-bg: #e8f1fb; --info-text: #1d4f86;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--brand); }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }
header.top { background: var(--card); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; flex-wrap: wrap; }
.logo { font-weight: 800; font-size: 1.15rem; color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
.logo span { color: var(--brand); }
nav a { margin-left: 14px; text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.hero { padding: 28px 0 8px; }
.hero h1 { font-size: clamp(1.5rem, 4.5vw, 2.2rem); line-height: 1.2; margin: 0 0 10px; }
.hero p { color: var(--muted); margin: 0; font-size: 1.05rem; }
.badge { display: inline-block; font-size: 0.8rem; font-weight: 700; background: var(--info-bg); color: var(--info-text); padding: 3px 10px; border-radius: 999px; margin-bottom: 10px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 18px 0; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } nav a { margin-left: 10px; } }
label { display: block; font-weight: 600; margin-bottom: 4px; font-size: 0.95rem; }
.hint { color: var(--muted); font-size: 0.85rem; font-weight: 400; }
input[type=text], input[type=email], input[type=date], input[type=number], select {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; background: #fff; color: var(--text); min-height: 44px;
}
input:focus, select:focus { outline: 3px solid rgba(11, 110, 127, 0.25); border-color: var(--brand); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 8px 0; }
.check input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
button, .btn {
  display: inline-block; background: var(--brand); color: #fff; border: 0; border-radius: 8px;
  padding: 12px 20px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; min-height: 44px;
}
button:hover, .btn:hover { background: var(--brand-dark); }
.btn.secondary { background: transparent; color: var(--brand); border: 2px solid var(--brand); }
.result { border-radius: var(--radius); padding: 16px 18px; margin-top: 16px; }
.result h3 { margin: 0 0 6px; font-size: 1.15rem; }
.result.ok { background: var(--ok-bg); color: var(--ok-text); }
.result.warn { background: var(--warn-bg); color: var(--warn-text); }
.result.info { background: var(--info-bg); color: var(--info-text); }
.result ul { margin: 8px 0 0; padding-left: 20px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; margin: 8px 0; font-size: 0.95rem; }
.kv dt { color: inherit; opacity: 0.85; }
.kv dd { margin: 0; font-weight: 700; }
.errors { color: #9b1c1c; font-weight: 600; }
.prices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 640px) { .prices { grid-template-columns: 1fr; } }
.price { border: 2px solid var(--line); border-radius: var(--radius); padding: 18px; background: #fff; }
.price.main { border-color: var(--brand); }
.price .amount { font-size: 2rem; font-weight: 800; }
.price .amount small { font-size: 1rem; font-weight: 600; color: var(--muted); }
.price ul { padding-left: 18px; margin: 10px 0; }
.features { padding-left: 20px; }
.features li { margin: 6px 0; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.hidden { display: none !important; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
footer.bottom { border-top: 1px solid var(--line); margin-top: 36px; padding: 20px 0 32px; color: var(--muted); font-size: 0.85rem; background: var(--card); }
footer.bottom a { margin-right: 14px; }
details { border-top: 1px solid var(--line); padding: 10px 0; }
details summary { font-weight: 700; cursor: pointer; }
h2 { font-size: 1.35rem; margin: 0 0 8px; }
.flush { margin-bottom: 0; }
.notice { background: #fff4e0; color: #7a4a00; text-align: center; font-size: 0.85rem; padding: 6px 16px; }
table.dati { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
table.dati th, table.dati td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; }
.scroll { overflow-x: auto; }
.riepilogo { white-space: pre-wrap; word-break: break-word; background: #f3f6f8; border: 1px solid var(--line); border-radius: 8px; padding: 14px; font: 0.85rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
#out-box button { margin: 4px 6px 4px 0; }
@media print {
  header.top, footer.bottom, #prep-form, .no-print, .notice, .hero { display: none !important; }
  body { background: #fff; }
  .card { border: 0; padding: 0; margin: 0; }
  .riepilogo { border: 0; background: #fff; font-size: 10pt; }
}
