/* Invoice Assistant — sito pubblico. Nessuna risorsa esterna. */

:root {
  --paper: #fbfbf8;
  --paper-2: #f2f2ec;
  --ink: #1f3a93;
  --ink-dark: #172c70;
  --graphite: #23272e;
  --muted: #555b66;
  --rule: #e2e2da;
  --night: #18224a;
  --night-2: #222e5e;

  --t-preventivo: #c98a00;
  --t-ddt: #2e7d5b;
  --t-fattura: #1f3a93;
  --t-nota: #b3261e;
  --t-banco: #7c3aed;

  --font: "Avenir Next", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Avenir Next", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --r-sm: 4px;
  --r-md: 8px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--graphite);
  font: 400 1.0625rem/1.6 var(--font);
  font-variant-numeric: tabular-nums;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--ink); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink-dark); text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--t-preventivo);
  outline-offset: 2px;
  border-radius: 2px;
}

h1, h2, h3 { font-family: var(--font-display); color: var(--graphite); margin: 0; }
h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.4rem); line-height: 1.06; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem); line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; line-height: 1.3; font-weight: 600; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: 1rem; top: -3rem;
  background: var(--ink); color: #fff; padding: 0.5rem 1rem; border-radius: var(--r-sm); z-index: 10;
}
.skip:focus { top: 1rem; color: #fff; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--rule); background: var(--paper); }
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 4.25rem; }
.brand { white-space: nowrap; display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--graphite); font-weight: 700; font-size: 1.05rem; }
.brand:hover { color: var(--graphite); }
.brand img { width: 36px; height: 36px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 1.5rem; }
.nav a:not(.btn) { color: var(--graphite); text-decoration: none; font-size: 0.95rem; }
.nav a:not(.btn):hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 52rem) {
  .nav a:not(.btn) { display: none; }
}
@media (max-width: 30rem) {
  .nav .long { display: none; }
}
@media (max-width: 24rem) {
  .site-header .wrap { gap: 0.75rem; }
  .brand { font-size: 0.98rem; }
  .brand img { width: 30px; height: 30px; }
  .nav .btn-sm { padding: 0.4rem 0.7rem; font-size: 0.88rem; }
}

/* ---------- Buttons ---------- */
.btn {
  white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.75rem; padding: 0.6rem 1.15rem;
  border-radius: var(--r-sm); border: 1px solid var(--ink);
  font: 600 0.98rem/1.2 var(--font); text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--ink-dark); border-color: var(--ink-dark); color: #fff; text-decoration: none; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: #e9ecf6; color: var(--ink-dark); text-decoration: none; }
.btn-sm { min-height: 2.4rem; padding: 0.45rem 0.9rem; font-size: 0.92rem; }

/* ---------- Hero ---------- */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 6vw, 5.5rem); overflow: hidden; }
.hero .wrap { max-width: 80rem; display: grid; grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero-copy .lead { font-size: clamp(1.08rem, 1rem + 0.35vw, 1.25rem); color: var(--muted); max-width: 34rem; margin-top: 1.25rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.75rem 0 1.5rem; }
.hero-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; font-size: 0.95rem; color: var(--muted); }
.hero-facts li { display: flex; align-items: center; gap: 0.6rem; }
.hero-facts li::before { content: ""; width: 10px; height: 3px; border-radius: 2px; background: var(--ink); flex: none; }
.hero-facts li:nth-child(2)::before { background: var(--t-ddt); }
.hero-facts li:nth-child(3)::before { background: var(--t-preventivo); }

@media (max-width: 60rem) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- App mock ---------- */
.mock-stage { position: relative; padding-right: 22px; }
.mock {
  position: relative; z-index: 1;
  background: #fff; border: 1px solid #cfd2dc; border-radius: 10px;
  box-shadow: 0 1px 0 rgba(24, 34, 74, 0.04), 0 24px 48px -24px rgba(24, 34, 74, 0.35);
  overflow: hidden; font-size: 12px; line-height: 1.35; color: var(--graphite);
}
.mock-bar { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; background: #1b1f2a; color: #c9ccd6; font-weight: 600; font-size: 11px; }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.mock-bar i:nth-child(2) { background: #febc2e; }
.mock-bar i:nth-child(3) { background: #28c840; margin-right: 8px; }
.mock-body { display: grid; grid-template-columns: 9rem minmax(0, 1fr); }
.mock-side { background: var(--night); color: #dfe3f1; padding: 12px 0; }
.mock-side b { display: block; padding: 0 12px; color: #fff; font-size: 12.5px; }
.mock-side small { display: block; padding: 0 12px 8px; color: #9aa3c4; font-size: 10.5px; }
.mock-side span { display: flex; align-items: center; gap: 7px; padding: 3px 12px; font-size: 11.5px; }
.mock-side span em { font-style: normal; color: #9aa3c4; font-size: 10px; padding-top: 6px; }
.mock-side span.on { background: var(--night-2); margin: 0 6px; padding-left: 6px; border-radius: 4px; }
.mock-side .d { width: 7px; height: 7px; border-radius: 2px; flex: none; }
.d-prev { background: var(--t-preventivo); }
.d-ddt { background: var(--t-ddt); }
.d-fatt { background: #5a7be0; }
.d-nota { background: #e0483f; }
.d-banco { background: #9a6bff; }
.mock-main { padding: 12px 14px; min-width: 0; }
.mock-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.mock-head strong { font-size: 15px; }
.mock-search { flex: 1; min-width: 0; height: 24px; border: 1px solid #d6d8e0; border-radius: 4px; color: #8a8f9b; padding: 4px 7px; font-size: 11px; white-space: nowrap; overflow: hidden; }
.mock-btn { background: var(--ink); color: #fff; border-radius: 4px; padding: 5px 8px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.mock-table { width: 100%; border-collapse: collapse; border: 1px solid #e3e5ec; table-layout: fixed; }
.mock-table th { text-align: left; font-weight: 600; color: #555b66; background: #f4f5f8; padding: 6px 6px; font-size: 11px; }
.mock-table td { padding: 6px 6px; border-top: 1px solid #eceef3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-table .num { text-align: right; }
.mock-table th:nth-child(1) { width: 29%; }
.mock-table th:nth-child(2) { width: 15%; }
.mock-table th:nth-child(4) { width: 15%; }
.mock-table th:nth-child(5) { width: 19%; }
.tipo { display: flex; align-items: center; gap: 6px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.tipo::before { content: ""; width: 3px; height: 14px; border-radius: 2px; background: var(--c, var(--ink)); flex: none; }
.tipo small { display: block; font-weight: 400; color: #6b7080; overflow: hidden; text-overflow: ellipsis; }
.k-prev { --c: var(--t-preventivo); }
.k-ddt { --c: var(--t-ddt); }
.k-fatt { --c: var(--t-fattura); }
.k-nota { --c: var(--t-nota); }
.k-banco { --c: var(--t-banco); }
.pill { display: inline-block; padding: 2px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 600; }
.pill-ok { background: #e3f1ea; color: #1f5e43; }
.pill-wait { background: #fbefd2; color: #7a5300; }
.pill-info { background: #e6eaf7; color: #1f3a93; }
.pill-grey { background: #eceef2; color: #4a4f5c; }

/* index tabs protruding from the window, like the app icon */
.mock-tabs { position: absolute; right: 0; top: 64px; display: grid; gap: 6px; z-index: 0; }
.mock-tabs span { display: block; width: 40px; height: 34px; border-radius: 0 6px 6px 0; background: var(--c); }
.mock-tabs span:nth-child(1) { --c: var(--t-preventivo); }
.mock-tabs span:nth-child(2) { --c: var(--t-ddt); }
.mock-tabs span:nth-child(3) { --c: #3b5cc4; }
.mock-tabs span:nth-child(4) { --c: var(--t-nota); }
.mock-tabs span:nth-child(5) { --c: var(--t-banco); }

@media (max-width: 40rem) {
  .mock-body { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .mock-side { display: none; }
  .mock-table th:nth-child(2), .mock-table td:nth-child(2),
  .mock-table th:nth-child(5), .mock-table td:nth-child(5) { display: none; }
  .mock-table th:nth-child(1) { width: 44%; }
  .mock-table th:nth-child(4) { width: 27%; }
  .mock-table td, .mock-table th { padding: 6px 4px; }
  .mock-head .mock-search { display: none; }
  .mock-head .mock-btn { margin-left: auto; }
  .mock-stage { padding-right: 14px; }
  .mock-tabs span { width: 28px; height: 26px; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; border-top: 1px solid var(--rule); }
.section-tint { background: var(--paper-2); }
.section-head { max-width: 40rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head p { color: var(--muted); margin-top: 0.85rem; font-size: 1.08rem; }

/* document flow strip */
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.75rem; }
.flow li { position: relative; background: #fff; border: 1px solid var(--rule); border-top: 0; border-radius: 0 0 var(--r-md) var(--r-md); padding: 1.1rem 1rem 1rem; }
.flow li::before { content: ""; position: absolute; left: -1px; right: -1px; top: 0; height: 6px; background: var(--c); }
.flow .tab { display: inline-block; margin: -1.1rem 0 0.85rem -1rem; padding: 0.55rem 0.9rem 0.45rem; background: var(--c); color: #fff; font-weight: 700; font-size: 0.95rem; border-radius: 0 0 var(--r-sm) 0; }
.flow p { margin: 0; font-size: 0.95rem; color: var(--muted); }
.flow-note { margin-top: 1.75rem; max-width: 46rem; }
.flow-note strong { color: var(--graphite); }
.c-prev { --c: var(--t-preventivo); }
.c-ddt { --c: var(--t-ddt); }
.c-fatt { --c: var(--t-fattura); }
.c-nota { --c: var(--t-nota); }
.c-banco { --c: var(--t-banco); }
@media (max-width: 60rem) { .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 30rem) { .flow { grid-template-columns: minmax(0, 1fr); } }

/* features: ruled list, two columns */
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(2rem, 5vw, 4.5rem); margin: 0; }
.feature { padding: 1.5rem 0 1.6rem; border-top: 1px solid var(--rule); }
.feature h3 { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.5rem; }
.feature h3::before { content: ""; width: 4px; height: 1.1em; border-radius: 2px; background: var(--c, var(--ink)); flex: none; }
.feature p { margin: 0; color: var(--muted); max-width: 32rem; }
.feature ul { margin: 0.6rem 0 0; padding-left: 1.1rem; color: var(--muted); }
.feature li { margin: 0.15rem 0; }
@media (max-width: 48rem) { .features { grid-template-columns: minmax(0, 1fr); } }

/* steps */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 0; }
.step { counter-increment: step; display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 1.25rem; padding: 1.75rem 0; border-top: 1px solid var(--rule); }
.step:last-child { border-bottom: 1px solid var(--rule); }
.step::before {
  content: counter(step);
  font: 700 2.75rem/1 var(--font-display); color: var(--ink);
  font-variant-numeric: lining-nums;
}
.step h3 { margin-bottom: 0.4rem; font-size: 1.25rem; }
.step p { color: var(--muted); max-width: 44rem; }
.step p:last-child { margin-bottom: 0; }
.step .where { font-size: 0.92rem; color: var(--graphite); }
.code-box {
  display: inline-flex; align-items: baseline; gap: 0.75rem; flex-wrap: wrap;
  margin: 0.4rem 0 1rem; padding: 0.7rem 1rem; border: 1px dashed var(--ink); border-radius: var(--r-sm); background: #fff;
}
.code-box span { color: var(--muted); font-size: 0.92rem; }
.code-box code { font: 700 1.5rem/1 var(--font-display); letter-spacing: 0.12em; color: var(--ink); }
@media (max-width: 30rem) {
  .step { grid-template-columns: minmax(0, 1fr); gap: 0.5rem; }
  .step::before { font-size: 2rem; }
}

/* download */

.downloads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; max-width: 52rem; }
.dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.25rem 1rem; align-items: center; padding: 1.25rem; background: #fff; border: 1px solid var(--rule); border-radius: var(--r-md); }
.dl svg { grid-row: span 2; width: 40px; height: 40px; color: var(--graphite); }
.dl h3, .dl h2 { font-size: 1.1rem; margin: 0; }
.install { padding: clamp(2rem, 5vw, 3rem) 0 0; }
.install h2 { margin-top: 0; }
.dl p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.dl .btn { grid-column: 1 / -1; margin-top: 0.9rem; }
.dl .dl-alt { grid-column: 1 / -1; margin-top: 0.6rem; text-align: center; font-size: 0.95rem; }
.dl-note { margin-top: 1.25rem; color: var(--muted); font-size: 0.95rem; max-width: 46rem; }
@media (max-width: 40rem) { .downloads { grid-template-columns: minmax(0, 1fr); } }

/* contact */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact h2 { margin-bottom: 1rem; }
.contact .mail { font-size: clamp(1.15rem, 1rem + 0.8vw, 1.5rem); font-weight: 600; word-break: break-word; }
.ask { margin: 0; padding: 1.25rem 1.5rem; background: #fff; border: 1px solid var(--rule); border-left: 4px solid var(--t-preventivo); border-radius: 0 var(--r-md) var(--r-md) 0; }
.ask h3 { margin-bottom: 0.5rem; }
.ask ul { margin: 0; padding-left: 1.1rem; color: var(--muted); }
.ask li { margin: 0.25rem 0; }
@media (max-width: 48rem) { .contact { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Footer ---------- */
.site-footer { background: var(--night); color: #cdd3ea; padding: 2.5rem 0; font-size: 0.93rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; justify-content: space-between; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #fff; }
.site-footer p { margin: 0 0 0.35rem; }
.site-footer .brand { color: #fff; margin-bottom: 0.5rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-items: flex-start; }
.placeholder { color: #ffd479; }
.placeholder-block { background: #fff6dc; border: 1px dashed var(--t-preventivo); color: #6b4a00; padding: 0.15rem 0.4rem; border-radius: 3px; }

/* ---------- Prose pages ---------- */
.prose { max-width: 44rem; padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.prose h1 { font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem); margin-bottom: 1rem; }
.prose h2 { font-size: 1.35rem; margin: 2.25rem 0 0.75rem; }
.prose p, .prose li { color: var(--graphite); }
.prose ul { padding-left: 1.2rem; }
.prose li { margin: 0.35rem 0; }
.notice { margin: 1.5rem 0; padding: 1rem 1.25rem; background: #fff6dc; border: 1px solid #e8c766; border-left: 4px solid var(--t-preventivo); border-radius: 0 var(--r-md) var(--r-md) 0; color: #4d3600; }
.notice p:last-child { margin-bottom: 0; }
.updated { color: var(--muted); font-size: 0.95rem; }

/* ---------- 404 ---------- */
.missing { padding-top: clamp(3rem, 10vw, 7rem); padding-bottom: clamp(3rem, 10vw, 7rem); }
.missing h1 { font-size: clamp(1.6rem, 1.2rem + 2vw, 2.25rem); }
.missing .sheet { position: relative; max-width: 30rem; background: #fff; border: 1px solid var(--rule); border-radius: var(--r-md); padding: 2rem 1.75rem 1.75rem; margin-bottom: 2rem; }
.missing .sheet::before { content: "Documento non trovato"; position: absolute; top: -1px; left: -1px; background: var(--t-nota); color: #fff; font-weight: 700; font-size: 0.85rem; padding: 0.35rem 0.8rem; border-radius: var(--r-md) 0 var(--r-sm) 0; }
.missing .sheet p { margin: 0.75rem 0 0; color: var(--muted); }
.missing .num { font: 700 3.5rem/1 var(--font-display); color: var(--graphite); margin-top: 1rem; }

.nav .short { display: none; }
@media (max-width: 30rem) { .nav .short { display: inline; } }

/* footer always at the bottom on short pages */
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }

/* ---------- Acquisto (acquista.html) e pagina dell'ordine (api.invoiceassistant.it/v1/shop/ordine.php) ---------- */
[hidden] { display: none !important; }
.buy { padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(3rem, 6vw, 5rem); }
.buy-head { max-width: 44rem; margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.buy-head h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 2.9rem); }
.buy-head .lead { color: var(--muted); font-size: 1.12rem; margin-top: 0.85rem; }
.buy-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 20rem); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.buy-form { grid-column: 1; grid-row: 1; }
.buy-summary {
  grid-column: 2; grid-row: 1; position: sticky; top: 1.5rem;
  background: #fff; border: 1px solid var(--rule); border-top: 6px solid var(--ink); border-radius: var(--r-md); padding: 1.4rem 1.4rem 1.2rem;
}
.buy-summary h2 { font-size: 1.15rem; letter-spacing: 0; }
.buy-price { margin: 0.6rem 0 0.1rem; font: 700 2.4rem/1.1 var(--font-display); color: var(--ink); letter-spacing: -0.02em; }
.buy-vat { color: var(--muted); font-size: 0.9rem; margin-bottom: 1rem; }
.buy-includes { list-style: none; margin: 0 0 1rem; padding: 1rem 0 0; border-top: 1px solid var(--rule); display: grid; gap: 0.55rem; font-size: 0.95rem; }
.buy-includes li { position: relative; padding-left: 1.5rem; }
.buy-includes li::before { content: ""; position: absolute; left: 0.15rem; top: 0.45em; width: 0.75rem; height: 0.42rem; border-left: 2px solid var(--t-ddt); border-bottom: 2px solid var(--t-ddt); transform: rotate(-45deg); }
.buy-small { font-size: 0.85rem; color: var(--muted); margin: 0; }
@media (max-width: 56rem) {
  .buy-grid { grid-template-columns: minmax(0, 1fr); }
  .buy-summary { grid-column: 1; grid-row: 1; position: static; }
  .buy-form { grid-row: 2; }
}

.buy-box { margin: 0 0 1.25rem; padding: 1.3rem 1.4rem 1.1rem; background: #fff; border: 1px solid var(--rule); border-radius: var(--r-md); min-width: 0; }
.buy-box legend { padding: 0 0.4rem; margin-left: -0.4rem; font: 700 1.05rem/1.3 var(--font-display); color: var(--graphite); }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.2rem 1rem; }
.fields .span-2 { grid-column: 1 / -1; }
@media (max-width: 36rem) { .fields { grid-template-columns: minmax(0, 1fr); } }
.field { margin-top: 0.35rem; }
.field label { display: block; font-weight: 600; font-size: 0.93rem; margin-bottom: 0.3rem; }
.field label small, .check small { font-weight: 400; color: var(--muted); }
.buy input[type="text"], .buy input:not([type]), .buy input[type="email"] {
  width: 100%; min-height: 2.75rem; padding: 0.55rem 0.75rem; font: inherit; font-size: 1rem; color: var(--graphite);
  background: var(--paper); border: 1px solid #c9c9bf; border-radius: var(--r-sm);
}
.buy input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(31, 58, 147, 0.18); background: #fff; }
.buy input[aria-invalid="true"] { border-color: var(--t-nota); background: #fdf3f2; }
.buy .upper { text-transform: uppercase; }
.buy .upper::placeholder { text-transform: none; }
.buy .mono-input { font-family: ui-monospace, "SF Mono", Consolas, Menlo, monospace; letter-spacing: 0.04em; }
.hint { font-size: 0.86rem; color: var(--muted); margin: 0.35rem 0 0; }
.field-error { color: var(--t-nota); font-size: 0.88rem; font-weight: 600; margin: 0.3rem 0 0; min-height: 0; }
.field-error:empty { display: none; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.choice-row, .pay-list { display: grid; gap: 0.6rem; }
.choice-row { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 0.6rem; }
@media (max-width: 36rem) { .choice-row { grid-template-columns: minmax(0, 1fr); } }
.choice { display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.8rem 0.9rem; border: 1px solid var(--rule); border-radius: var(--r-sm); background: var(--paper); cursor: pointer; }
.choice:hover { border-color: #b9c3e3; }
.choice:has(input:checked) { border-color: var(--ink); background: #f2f5fc; box-shadow: inset 0 0 0 1px var(--ink); }
.choice input, .check input { margin: 0.25rem 0 0; width: 1.05rem; height: 1.05rem; accent-color: var(--ink); flex: none; }
.choice strong { display: block; font-size: 0.98rem; }
.choice small { display: block; color: var(--muted); font-size: 0.86rem; line-height: 1.45; }
.bank-warning {
  margin: 0.8rem 0 0; padding: 0.8rem 0.95rem; font-size: 0.92rem; line-height: 1.5;
  background: #fff8e6; border: 1px solid #ecd28e; border-left: 4px solid var(--t-preventivo); border-radius: var(--r-sm); color: #4d3800;
}
.bank-warning strong { display: block; color: #3d2c00; }
.bank-warning.active { box-shadow: 0 0 0 3px rgba(201, 138, 0, 0.25); }
.check { display: flex; gap: 0.65rem; align-items: flex-start; font-size: 0.95rem; margin: 0.25rem 0 0.4rem; cursor: pointer; }
.buy-alert { margin: 0 0 1.25rem; padding: 0.85rem 1rem; border-radius: var(--r-sm); background: #fdf0ef; border: 1px solid #efc2bd; color: #7d1d17; font-weight: 600; }
.buy-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.2rem; margin-top: 0.5rem; }
.buy-submit .btn { min-width: 14rem; min-height: 3rem; font-size: 1.02rem; }
.buy-submit .hint { margin: 0; flex: 1 1 16rem; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

.shop-narrow { max-width: 46rem; padding-top: clamp(2rem, 5vw, 3.5rem); padding-bottom: clamp(3rem, 6vw, 4.5rem); }
.order-state { background: #fff; border: 1px solid var(--rule); border-top: 6px solid var(--ink); border-radius: var(--r-md); padding: 1.5rem 1.5rem 1.2rem; margin-bottom: 1.5rem; }
.order-state.ok { border-top-color: var(--t-ddt); }
.order-state.wait { border-top-color: var(--t-preventivo); }
.order-state.bad { border-top-color: var(--t-nota); }
.order-state h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem); margin-bottom: 0.7rem; }
.order-summary h2 { font-size: 1.15rem; margin-bottom: 0.6rem; }
.order-facts { display: grid; grid-template-columns: minmax(7rem, max-content) minmax(0, 1fr); gap: 0.45rem 1.2rem; margin: 0 0 1rem; }
.order-facts dt { color: var(--muted); font-size: 0.93rem; }
.order-facts dd { margin: 0; overflow-wrap: anywhere; }
.order-facts.bank { padding: 1rem 1.1rem; background: var(--paper-2); border-radius: var(--r-sm); font-size: 1.02rem; }
.order-actions { margin: 1rem 0 0; }
.shop-note { padding: 0.8rem 0.95rem; background: #fff8e6; border: 1px solid #ecd28e; border-left: 4px solid var(--t-preventivo); border-radius: var(--r-sm); font-size: 0.95rem; }
.mono { font-family: ui-monospace, "SF Mono", Consolas, Menlo, monospace; letter-spacing: 0.02em; }
@media (max-width: 30rem) { .order-facts { grid-template-columns: minmax(0, 1fr); gap: 0.1rem; } .order-facts dd { margin-bottom: 0.5rem; } }
