/* F24 Smart — tema Corporate Swiss (IBM Plex + colori logo) */
:root {
  --brand: #005696;
  --brand-ink: #003d6b;
  --gold: #e8b923;
  --ink: #1a1f24;
  --muted: #4a5560;
  --paper: #ffffff;
  --page: #f3f5f7;
  --line: #d5dde3;
  --ok: #1b7a45;
  --danger: #b00020;
  --warn: #FF6A00;
  --font: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --text: 1.05rem;
  --lead: 1.7;
  --h1: clamp(1.7rem, 1.4rem + 1vw, 2.05rem);
  --h2: 1.28rem;
  --radius: 4px;
}
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: var(--text);
  font-weight: 400;
  line-height: var(--lead);
  color: var(--ink);
  background: var(--page);
  border-top: 4px solid var(--gold);
}
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}
p, .lede, .note, .note-ok, .note-warning, .flow-list li, .plain-list li, .flusso-steps li {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}
h1, h2, h3, .section-title, .mini-title, .brand, .site-nav, .site-footer, .btn, th, td, label, .session-badge {
  text-align: left;
  hyphens: none;
}
h1, h2, h3, .section-title, .mini-title, .scan-wait-title {
  font-family: var(--font);
  font-weight: 600;
  line-height: 1.25;
  color: var(--brand-ink);
  letter-spacing: 0;
}
h1 { margin: 0 0 12px; font-size: var(--h1); }
h2, .section-title { margin: 0 0 10px; font-size: var(--h2); }
h3, .mini-title { margin: 0 0 8px; font-size: var(--text); color: var(--brand); }
code { font-family: var(--mono); font-size: 0.92em; color: var(--ink); }

.page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 0;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

/* Nav — riga unica desktop, hamburger < 992px */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 28px;
  padding: 8px 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-right: 4px;
  padding: 6px 8px;
  color: var(--brand-ink) !important;
  font-weight: 600 !important;
  text-decoration: none;
  border-radius: var(--radius);
}
.nav-brand:hover { background: #eef4f8; }
.nav-logo { width: 32px; height: 32px; display: block; border-radius: 3px; }
.nav-toggler {
  display: none;
  margin-left: auto;
  align-self: center;
  appearance: none;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  padding: 8px 10px;
  cursor: pointer;
  line-height: 0;
}
.nav-toggler:hover { background: #eef4f8; }
.nav-toggler-icon {
  display: block;
  width: 1.4rem;
  height: 1.4rem;
  background: no-repeat center / 1.4rem
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='%23005696' stroke-linecap='round' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}
.nav-toggler[aria-expanded="true"] .nav-toggler-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='%23005696' stroke-linecap='round' stroke-width='2' d='M8 8l14 14M22 8L8 22'/%3E%3C/svg%3E");
}
.nav-collapse {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  min-width: 0;
  gap: 4px;
}
.nav-main, .nav-end {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 2px;
}
.nav-main { flex: 1 1 auto; min-width: 0; }
.nav-sep {
  display: inline-block;
  width: 1px;
  height: 1.2em;
  margin: 0 8px;
  background: var(--line);
  flex: 0 0 auto;
  align-self: center;
}
.nav-end { margin-left: auto; flex: 0 0 auto; }
.site-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: var(--text);
  font-weight: 400;
  padding: 6px 8px;
  border-radius: var(--radius);
  white-space: nowrap;
}
.site-nav a:hover { color: var(--brand-ink); background: #eef4f8; }
.site-nav a.is-active { color: #fff; background: var(--brand); }
.site-nav a:focus-visible,
.nav-toggler:focus-visible,
.nav-account-toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.nav-account { position: relative; flex: 0 0 auto; }
.nav-account-toggle {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  padding: 6px 8px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: var(--text);
}
.nav-account-toggle::-webkit-details-marker { display: none; }
.nav-account-toggle::after { content: "▾"; margin-left: 4px; font-size: 10px; opacity: 0.7; }
.nav-account-toggle:hover,
.nav-account[open] > .nav-account-toggle { color: var(--brand-ink); background: #eef4f8; }
.nav-account-icon { display: block; }
.nav-account-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 40;
  min-width: 240px;
  padding: 6px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-account-menu a,
.nav-account-menu .nav-logout-btn,
.nav-logout-btn {
  display: block;
  width: 100%;
  text-align: left;
  color: var(--muted);
  font: inherit;
  font-size: var(--text);
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
}
.nav-account-menu a:hover,
.nav-logout-btn:hover { color: var(--brand-ink); background: #eef4f8; }
.nav-account-menu a.is-active { color: #fff; background: var(--brand); }
.nav-account-email { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-account-sep { height: 0; margin: 4px 6px; border: 0; border-top: 1px solid var(--line); }
.nav-account-promo {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--brand-ink) !important;
  background: color-mix(in srgb, var(--brand) 14%, var(--paper)) !important;
  border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--line));
  border-radius: var(--radius);
  margin: 2px 4px;
}
.nav-account-promo:hover {
  background: color-mix(in srgb, var(--brand) 22%, var(--paper)) !important;
  color: var(--brand-ink) !important;
}
.nav-account-promo.is-active {
  color: #fff !important;
  background: var(--brand) !important;
  border-color: var(--brand);
}
.nav-credit-icon {
  flex: 0 0 auto;
  width: 1.35rem;
  height: 1.35rem;
  color: var(--brand-ink);
}
.nav-account-promo .nav-credit-icon {
  color: #9a7408;
}
.nav-account-promo.is-active .nav-credit-icon,
.btn.primary .nav-credit-icon {
  color: #f5d04a;
}
.nav-logout { margin: 0; width: 100%; }

@media (max-width: 991.98px) {
  .nav-toggler { display: inline-flex; align-items: center; justify-content: center; }
  .nav-collapse {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 6px 0 4px;
  }
  .nav-collapse.is-open { display: flex; }
  .nav-main, .nav-end {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    margin-left: 0;
  }
  .nav-sep {
    display: block;
    width: auto;
    height: 0;
    margin: 6px 12px;
    background: none;
    border-top: 1px solid var(--line);
  }
  .site-nav a:not(.nav-brand),
  .nav-account-toggle,
  .nav-logout-btn { width: 100%; padding: 10px 12px; }
  .nav-account { width: 100%; }
  .nav-account-menu { position: static; width: 100%; min-width: 0; }
}
@media (min-width: 992px) {
  .site-nav, .nav-collapse, .nav-main { flex-wrap: nowrap; }
  .nav-toggler { display: none; }
  .nav-collapse { display: flex !important; flex-direction: row; }
}

/* Footer — fascia corporate a tutta larghezza, in fondo alla colonna .page */
.site-footer-spacer {
  order: 99;
  flex: 1 1 0;
  min-height: 0;
  pointer-events: none;
}
.site-footer {
  order: 100;
  flex-shrink: 0;
  margin-top: 2rem;
  background: var(--brand-ink);
  color: #d5dde3;
  border-top: 4px solid var(--gold);
  width: 100vw;
  max-width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  box-sizing: border-box;
}
.site-footer-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 20px;
}
.site-footer-grid {
  display: grid;
  gap: 28px 40px;
  grid-template-columns: minmax(14rem, 1.2fr) minmax(11rem, 1fr) minmax(12rem, 1fr);
}
.site-footer-lockup {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.site-footer-lockup img {
  width: 32px;
  height: 32px;
  display: block;
  border-radius: 3px;
  background: var(--paper);
}
.site-footer-brand p,
.site-footer-col p {
  margin: 0 0 10px;
  color: #d5dde3;
  text-align: left;
  hyphens: none;
}
.site-footer-legal { font-size: 0.92rem; }
.site-footer-legal code { color: #fff; }
.site-footer-title {
  margin: 0 0 10px;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}
.site-footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.site-footer a {
  color: #d7e4ee;
  text-decoration: none;
  font-weight: 400;
}
.site-footer a:hover { color: #fff; }
.site-footer a.is-active { color: var(--gold); font-weight: 600; }
.site-footer a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.site-footer-col ul a {
  display: inline-block;
  padding: 4px 0;
}
.site-footer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 20px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(232, 185, 35, 0.35);
}
.site-footer-bar p {
  margin: 0;
  font-size: 0.92rem;
  color: #9aadb8;
  text-align: left;
  hyphens: none;
}
.site-footer-build {
  font-size: 0.8rem;
  color: #7d8f9a;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 720px) {
  .site-footer-inner { width: calc(100% - 24px); padding: 24px 0 16px; }
  .site-footer-grid { grid-template-columns: 1fr; gap: 22px; }
}

.preview-ip-banner {
  margin: 0 0 10px;
  padding: 10px 14px;
  border: 1px solid color-mix(in srgb, var(--warn) 42%, var(--line));
  background: color-mix(in srgb, var(--warn) 8%, var(--paper));
  color: var(--warn);
  font-weight: 600;
  border-radius: var(--radius);
}
.preview-ip-banner strong { font-family: var(--mono); }

.brand {
  margin: 0 0 8px;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 600;
}
.brand-lockup { margin: 0 0 10px; }
.brand-lockup .brand { margin: 0; }
.hero { margin: 0 0 8px; }
.lede {
  margin: 0;
  width: 100%;
  max-width: none;
  color: var(--muted);
}

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 16px 0;
}
.panel.is-danger { color: var(--danger); font-weight: 600; }
.panel.is-ok { color: var(--ok); font-weight: 600; border-color: #2e7d32; }
.note { margin: 10px 0 0; color: var(--muted); }
.note.is-warn { color: var(--warn); font-weight: 600; }
.note-ok {
  margin-top: 8px;
  padding: 10px 14px;
  border: 1px solid #9dceb0;
  border-left: 4px solid #2e7d32;
  background: #f0faf4;
  color: #0b2e1a;
  font-weight: 600;
}
.note-warning {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--warn) 38%, var(--line));
  border-left: 4px solid var(--warn);
  background: color-mix(in srgb, var(--warn) 7%, var(--paper));
  color: color-mix(in srgb, var(--warn) 55%, var(--ink));
}
.section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin: 0 0 10px;
}
.section-heading .section-title { margin: 0; }
.session-badge {
  margin: 0;
  padding: 6px 10px;
  border: 1px solid #9dceb0;
  background: #f0faf4;
  font-weight: 600;
  white-space: nowrap;
  border-radius: var(--radius);
}

.btn {
  appearance: none;
  display: inline-block;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 10px 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.btn-warning { background: var(--warn); border-color: var(--warn); color: #fff; }
.btn:hover { filter: brightness(1.04); }
button.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.login-actions { margin-top: 0; flex-wrap: wrap; align-items: center; gap: 8px; }

.upload { display: flex; flex-direction: column; gap: 10px; font-weight: 600; margin-bottom: 14px; }
.upload input[type="text"],
.upload input[type="email"],
.upload input[type="url"],
.upload input[type="tel"],
.upload input[type="password"],
.upload input[type="number"],
.upload input[type="file"],
.upload select,
.upload textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 11px;
  background: var(--paper);
  color: var(--ink);
}
.upload textarea { min-height: 64px; resize: vertical; }
.pdf-password-field { -webkit-text-security: disc; }

.home-grid { display: grid; gap: 0 24px; align-items: start; }
@media (min-width: 900px) {
  .home-grid { grid-template-columns: minmax(0, 1.45fr) minmax(16rem, 0.7fr); }
  .home-grid > .home-aside { margin-top: 16px; }
}
.convert-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: start;
}
.convert-layout.has-login-prompt { grid-template-columns: 1fr; }
.login-box, .upload-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: #f8fafb;
}
.login-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
}
.login-box-copy { flex: 1 1 220px; min-width: 0; }
.upload-box.is-disabled { opacity: 0.72; }
.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 140px;
  margin: 0 0 14px;
  padding: 18px 14px;
  border: 1px dashed #9bb4c8;
  border-radius: var(--radius);
  background: var(--paper);
  text-align: center;
  cursor: pointer;
}
.dropzone:hover, .dropzone.is-dragover { border-color: var(--brand); background: #eef4f8; }
.dropzone.is-disabled { cursor: not-allowed; pointer-events: none; background: #f3f6f9; }
.dropzone input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone-title { font-weight: 600; }
.dropzone-hint { color: var(--muted); text-align: center; }
.dropzone-file { margin-top: 4px; font-weight: 600; color: var(--brand); word-break: break-all; }
.upload-file-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 14px;
  margin: 0 0 14px;
}
.upload-file-tools .upload { flex: 1 1 220px; min-width: 0; margin-bottom: 0; }
.convert-submit-actions {
  margin-top: 0;
  align-items: stretch;
  justify-content: space-between;
}
.convert-submit-actions .convert-credits-btn {
  margin-left: auto;
}
.convert-submit-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.flusso-steps {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  counter-reset: flusso;
}
.flusso-steps li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
}
.flusso-steps li::before {
  flex: 0 0 auto;
  min-width: 1.6em;
  font-weight: 700;
  color: var(--brand);
  counter-increment: flusso;
  content: counter(flusso) ")";
}
.plain-list { margin: 0; padding-left: 18px; color: var(--muted); }
.plain-list li { margin: 4px 0; }
.flow-list { margin: 0; padding-left: 20px; color: var(--muted); }
.flow-list li { margin: 8px 0; }
.flow-list strong { color: var(--ink); }
.steps h2 { margin: 0 0 8px; }

.login-page-panel { max-width: 420px; }
.login-page-form .actions { margin-top: 4px; }
.login-forgot { margin: 0 0 12px; text-align: left; hyphens: none; }
.login-forgot a { font-weight: 600; color: var(--brand); }
.privacy-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 18px;
}
.privacy-consent input[type="checkbox"] { margin-top: 3px; width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--brand); }
.privacy-consent a { font-weight: 700; color: var(--brand); }

/* Switch on/off — Funzioni avanzate */
.feature-switch-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 0 18px;
}
.feature-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafb;
  font-weight: 600;
  cursor: pointer;
}
.feature-switch-text { flex: 1 1 auto; color: var(--ink); }
.feature-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.feature-switch-ui {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #c5ced6;
  transition: background 0.15s ease;
}
.feature-switch-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s ease;
}
.feature-switch input:checked + .feature-switch-ui {
  background: var(--brand);
}
.feature-switch input:checked + .feature-switch-ui::after {
  transform: translateX(18px);
}
.feature-switch input:focus-visible + .feature-switch-ui {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.author-dl {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(9rem, 12rem) 1fr;
  gap: 10px 16px;
}
.author-dl dt { margin: 0; color: var(--muted); font-weight: 600; }
.author-dl dd { margin: 0; font-weight: 600; word-break: break-word; text-align: left; }
.author-dl a { color: var(--brand); font-weight: 700; }
.author-company-logo { display: block; width: min(160px, 40%); height: auto; margin: 0 0 16px; }
.author-contact-img { display: block; margin: 18px 0 0; }
.author-reach {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(16rem, 22rem) 1fr;
  align-items: start;
}
.author-reach address {
  font-style: normal;
  margin: 0 0 12px;
  font-weight: 600;
}
.author-map {
  width: 100%;
  min-height: 280px;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #eef4f8;
}
.author-map iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
@media (max-width: 720px) {
  .author-reach { grid-template-columns: 1fr; }
  .author-map { min-height: 240px; aspect-ratio: 4 / 3; }
}

.plugin-gallery {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  margin-top: 14px;
}
@media (min-width: 800px) {
  .plugin-gallery { grid-template-columns: 1fr 1fr; }
}
.plugin-shot {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  overflow: hidden;
}
.plugin-shot a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: #0e261a;
}
.plugin-shot a:focus-visible { outline: 2px solid var(--gold); outline-offset: -4px; }
.plugin-shot img {
  display: block;
  width: 100%;
  max-width: 440px;
  height: auto;
}
.plugin-shot.is-page a {
  padding: 0;
  background: var(--bg);
}
.plugin-shot.is-page img {
  max-width: none;
}
.plugin-shot figcaption { padding: 14px 16px 16px; }
.plugin-shot .mini-title { margin-bottom: 6px; }
.plugin-shot p { margin: 0; color: var(--muted); }

.video-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 14px;
}
.video-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  overflow: hidden;
}
.video-card:hover { border-color: var(--brand); }
.video-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.video-card.is-soon { color: var(--muted); cursor: default; }
.video-card.is-soon:hover { border-color: var(--line); }
.video-card.is-soon .video-thumb { opacity: 0.5; }
.video-card.is-soon .video-title { color: var(--muted); }
.video-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: #0e261a;
  overflow: hidden;
}
.video-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.video-thumb img.is-yt { object-fit: cover; }
.video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  margin: -26px 0 0 -26px;
  border-radius: 50%;
  background: var(--brand);
  border: 2px solid #fff;
}
.video-play::after {
  content: "";
  position: absolute;
  left: 20px;
  top: 16px;
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent #fff;
}
.video-copy { display: block; padding: 12px 14px 14px; }
.video-title { display: block; font-weight: 600; color: var(--brand-ink); }
.video-meta { display: block; margin-top: 2px; color: var(--muted); font-size: 0.92em; }

.two-col { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.compat-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.compat-card {
  display: block;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  text-decoration: none;
  color: inherit;
}
.compat-card:hover { border-color: var(--brand); }
.compat-card.is-soon { color: var(--muted); }
.compat-logo { height: 36px; width: auto; }
.compat-logo-square { width: 36px; height: 36px; object-fit: contain; }
.compat-meta { margin-top: 8px; }
.compat-name { margin: 0; font-weight: 600; }
.compat-url { margin: 0; color: var(--brand); }
.compat-mark {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: #d9dee4; color: #6a7380; font-weight: 700; border-radius: var(--radius);
}

.contact-form { margin-top: 8px; }
.contact-grid { display: grid; gap: 12px; }
.contact-topics-wrap { margin: 8px 0; }
.contact-topics-wrap legend { font-weight: 600; }
.contact-topics { display: flex; flex-wrap: wrap; gap: 8px; }
.contact-topic { display: inline-flex; align-items: center; }
.contact-topic span {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}
.contact-topic input { position: absolute; opacity: 0; pointer-events: none; }
.contact-topic input:checked + span { background: var(--brand); color: #fff; border-color: var(--brand); }
.contact-hp { position: absolute; left: -9999px; }
.contact-challenge {
  margin: 16px 0 8px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafb;
}
.contact-challenge-label { margin: 0 0 10px; font-weight: 600; }
.contact-challenge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-bottom: 8px;
}
.contact-challenge-code {
  margin: 0;
  padding: 12px 14px;
  flex: 0 0 auto;
  font-family: ui-monospace, Consolas, "Courier New", monospace;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-align: center;
  color: var(--ink);
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: 9px;
  user-select: none;
  -webkit-user-select: none;
}
.contact-challenge-entry {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 12rem;
  min-width: 0;
  font-weight: 600;
}
.contact-challenge-cells {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
}
.contact-challenge-cell {
  width: 2.4rem;
  height: 2.75rem;
  box-sizing: border-box;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font-family: ui-monospace, Consolas, "Courier New", monospace;
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}
.contact-challenge-cell:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
  border-color: var(--brand);
}
@media (min-width: 520px) {
  .contact-challenge-code { letter-spacing: 0.38em; }
  .contact-challenge-cell { width: 2.65rem; height: 2.9rem; }
}
.contact-challenge .note { margin-top: 0; }

.pack-picker { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 12px; }
@media (min-width: 720px) { .pack-picker { grid-template-columns: 1.15fr 0.85fr; } }
.pack-picker-field { display: flex; flex-direction: column; gap: 8px; font-weight: 700; }
.pack-select {
  width: 100%;
  appearance: none;
  font: inherit;
  font-weight: 600;
  padding: 14px 44px 14px 14px;
  border: 2px solid var(--brand);
  border-radius: var(--radius);
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23005696' stroke-width='2.4'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
  cursor: pointer;
}
.pack-showcase {
  border-radius: var(--radius);
  padding: 22px 24px;
  color: #fff;
  background: var(--brand);
  min-height: 160px;
}
.assist-showcase { background: var(--brand-ink); }
.pack-showcase-name { margin: 0; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; opacity: 0.85; }
.pack-showcase-price { margin: 10px 0 0; font-size: 1.75rem; font-weight: 700; line-height: 1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.pack-showcase-vat { font-size: var(--text); font-weight: 500; }
.pack-showcase-gross { margin: 8px 0 0; font-weight: 600; }
.pack-showcase-scans { margin: 18px 0 0; font-weight: 700; }
.pack-showcase-unit { margin: 6px 0 0; opacity: 0.85; }
.order-total { margin-top: 8px; }
.order-total-dl { display: grid; grid-template-columns: minmax(8rem, 12rem) 1fr; gap: 8px 16px; margin: 0; }
.order-total-dl dt { color: var(--muted); font-weight: 600; }
.order-total-dl dd { margin: 0; font-weight: 700; text-align: left; }
.order-total-dl dd strong { font-size: 1.25rem; }
.order-discount, .invite-discount-amount { color: var(--ok); }
.order-total-dl .is-hidden, .order-total-dl dt.is-hidden { display: none; }
.invite-banner { border-color: #2e7d32; background: #f3faf5; }
.pay-options .note { margin-bottom: 12px; }
.pay-options.is-soon { color: var(--muted); }
.pay-options.is-soon .section-title { color: var(--muted); }
.pay-options.is-soon fieldset { border: 0; margin: 0; padding: 0; }

.transfer-card {
  margin-top: 14px;
  padding: 14px;
  border: 1px dashed #9bb4c8;
  background: #f4f8fb;
  border-radius: var(--radius);
}
.transfer-dl { display: grid; grid-template-columns: minmax(110px, 140px) 1fr; gap: 8px 12px; margin: 10px 0 0; }
.transfer-dl dt { margin: 0; color: var(--muted); font-weight: 600; }
.transfer-dl dd { margin: 0; text-align: left; }
.causale { display: inline-block; padding: 6px 8px; background: var(--paper); border: 1px solid var(--line); }

.browser-list { list-style: none; margin: 0; padding: 0; }
.browser-list li { margin: 8px 0; padding: 10px 12px; border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius); }
.browser-list li.ok { border-color: #9dceb0; background: #f0faf4; }
.browser-list li.soon { color: var(--muted); }

.simple-table { width: 100%; border-collapse: collapse; }
.simple-table th, .simple-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px 6px;
  text-align: left;
  vertical-align: middle;
}
.simple-table th { color: var(--muted); }
.simple-table .col-action { width: 1%; white-space: nowrap; }
.simple-table .col-action form { margin: 0; }
.invite-table { width: max-content; min-width: 100%; }
.invite-table th, .invite-table td { white-space: nowrap; }
.invite-table .col-code code { white-space: nowrap; }
.invite-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.invite-table .col-resend { width: 1%; text-align: center; }
.invite-table .col-resend form { margin: 0; }
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  min-width: 32px;
  line-height: 1;
}
.btn-icon svg { display: block; }
.credits-table .num { font-variant-numeric: tabular-nums; text-align: right; }
.credits-table .tx-plus { color: #1b7a45; font-weight: 600; }
.credits-table .tx-minus { color: #b00020; font-weight: 600; }
.credits-table .col-credits {
  text-align: center;
  width: 1%;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.tx-ledger .col-plus,
.tx-ledger .col-minus { width: 5.5rem; white-space: nowrap; }
.credits-table tfoot th,
.credits-table tfoot td {
  color: var(--ink);
  font-weight: 700;
  border-bottom: none;
  padding-top: 12px;
}
.tx-ledger tfoot .tx-colonne th,
.tx-ledger tfoot .tx-colonne td {
  background: color-mix(in srgb, var(--brand) 12%, var(--paper));
}
.tx-ledger tfoot .tx-colonne th {
  color: var(--brand-ink);
}
.tx-ledger tfoot .tx-final th,
.tx-ledger tfoot .tx-final td {
  border-top: 2px solid var(--line);
  padding-top: 14px;
}
.credits-table .fattura-discount td { background: #f3faf5; }

.advertiser-banner { display: block; max-width: 250px; height: 48px; }
.advertiser-cartolina { max-width: 100%; height: auto; }
.inline-send { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.inline-send-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.inline-send-row label { flex: 1 1 auto; min-width: 0; margin: 0; }
.inline-send-row input[type="email"],
.inline-send input[type="email"] {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 11px;
}
.inline-send-row input[type="email"] { width: 100%; min-width: 12rem; }
.inline-check { display: inline-flex; align-items: center; gap: 6px; }
form.is-disabled { opacity: 0.72; }
fieldset.pack-create { border: 0; margin: 0; padding: 0; }
.pack-dest-row { display: flex; flex-wrap: nowrap; align-items: flex-end; gap: 10px; margin-top: 4px; }
.pack-dest-row label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; margin: 0; min-width: 0; }
.pack-dest-row label:first-child { flex: 0 1 280px; }
.pack-dest-row #ad-email-wrap { flex: 1 1 220px; }
.pack-dest-row select,
.pack-dest-row input[type="email"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 11px;
}

.preview {
  width: 100%;
  font-family: var(--mono);
  font-size: 0.85rem;
  background: #101820;
  color: #dbe7f2;
  border: 0;
  border-radius: var(--radius);
  padding: 12px;
}
.sr-only, .visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.riepilogo { margin: 16px 0 20px; }
.riepilogo-sezione { margin: 12px 0; border: 1px solid var(--line); overflow: hidden; background: var(--paper); }
.riepilogo-sezione.is-mismatch { border-color: color-mix(in srgb, var(--warn) 38%, var(--line)); box-shadow: inset 4px 0 0 var(--warn); }
.riepilogo-sezione.is-ok { box-shadow: inset 4px 0 0 #2e7d32; }
.riepilogo-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px;
  padding: 10px 14px 8px; background: #f7fafc; border-bottom: 1px solid var(--line);
}
.riepilogo-head h3 { margin: 0; }
.riepilogo-count { color: var(--muted); }
.riepilogo-badge { font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 2px 8px; }
.badge-ok { background: #e7f6ec; color: var(--ok); }
.badge-diff { background: color-mix(in srgb, var(--warn) 14%, var(--paper)); color: var(--warn); }
.riepilogo-scroll { overflow-x: auto; }
.riepilogo-table { width: 100%; border-collapse: collapse; }
.riepilogo-table th, .riepilogo-table td { padding: 6px 10px; border-top: 1px solid #eef3f7; vertical-align: top; }
.riepilogo-table thead th { text-align: left; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.riepilogo-table .col-n { width: 2.2rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.riepilogo-table .num { font-variant-numeric: tabular-nums; text-align: right; }
.cell-ok { color: var(--ok); }
.cell-diff { color: var(--warn); font-weight: 600; }
.riepilogo-empty { padding: 12px; color: var(--muted); }
.riepilogo-saldo { margin-top: 8px; }
.riepilogo-saldo.is-ok { color: var(--ok); }
.riepilogo-saldo.is-mismatch { color: var(--warn); }

.scan-wait {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 80;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(26, 31, 36, 0.48);
}
.scan-wait.is-on { display: flex; }
.scan-wait-card {
  width: min(420px, 100%);
  padding: 28px 24px;
  border: 1px solid var(--line);
  background: var(--paper);
  text-align: center;
  border-radius: var(--radius);
}
.scan-wait-spinner {
  display: inline-block;
  width: 36px; height: 36px;
  margin-bottom: 14px;
  border: 3px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: scan-spin 0.8s linear infinite;
}
.scan-wait-title { margin: 0 0 8px; font-size: var(--h2); }
.scan-wait-hint { margin: 0; color: var(--muted); text-align: center; }
body.is-scanning { overflow: hidden; }
@keyframes scan-spin { to { transform: rotate(360deg); } }

.coming-soon { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; }
.coming-soon .hero, .coming-soon .panel { text-align: center; max-width: 36rem; margin-left: auto; margin-right: auto; }
.coming-soon p { text-align: center; }

.invoice-toolbar { margin-bottom: 12px; }
.invoice-table { table-layout: fixed; min-width: 52rem; }
.invoice-table .inv-col-date { width: 7.2rem; }
.invoice-table .inv-col-desc { width: auto; }
.invoice-table .inv-col-credits { width: 5.2rem; }
.invoice-table .inv-col-status { width: 6.5rem; }
.invoice-table .inv-col-amount { width: 6.8rem; }
.invoice-table .inv-col-advertiser { width: 16.5rem; }
.invoice-table .inv-col-invoice { width: 6.5rem; }
.invoice-table th, .invoice-table td { overflow-wrap: anywhere; }
.invoice-table .inv-credits, .invoice-table .inv-invoice { text-align: center; }
.invoice-table .inv-amount { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.invoice-table .advertiser-banner { width: 100%; max-width: 250px; height: 48px; }
.invoice-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tz-badge {
  display: inline-block;
  padding: 4px 8px;
  border: 1px solid var(--line);
  background: #f4f7fa;
  color: var(--muted);
  font-weight: 700;
}
.invoice-month-form select { border: 1px solid var(--line); padding: 8px 10px; background: var(--paper); }
.invoice-download { position: relative; }
.invoice-download > summary { cursor: pointer; list-style: none; }
.invoice-download > summary::-webkit-details-marker { display: none; }
.invoice-download > summary::after { content: " ▾"; font-size: 10px; }
.invoice-download-menu {
  position: absolute; z-index: 20; min-width: 180px;
  padding: 6px; background: var(--paper); border: 1px solid var(--line);
}
.invoice-download-menu a { display: block; padding: 8px 10px; color: var(--ink); text-decoration: none; }
.invoice-download-menu a:hover { background: #eef4f8; }
.invoice-view { color: var(--brand); }
.invoice-view:hover { color: var(--ink); text-decoration: none; }
.fattura-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

@media (max-width: 720px) {
  .page { width: calc(100% - 24px); padding: 20px 0 0; }
  .author-dl { grid-template-columns: 1fr; }
  .login-actions { flex-direction: column; align-items: stretch; }
  .login-actions .btn { width: 100%; text-align: center; }
  .transfer-dl { grid-template-columns: 1fr; }
}

/* Torna su — da sfumato a colori pieni (--back-top-p 0→1 con lo scroll) */
.back-to-top {
  --back-top-p: 0;
  position: fixed;
  z-index: 90;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: max(20px, env(safe-area-inset-bottom, 0px));
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  opacity: var(--back-top-p);
  box-shadow: 0 2px 8px rgb(19 32 51 / 18%);
  transition: opacity 180ms ease, background-color 160ms ease, border-color 160ms ease;
  pointer-events: none;
}
.back-to-top:not([hidden]) { pointer-events: auto; }
.back-to-top[hidden] { display: none !important; }
.back-to-top:hover {
  background: var(--brand-ink);
  border-color: var(--brand-ink);
}
.back-to-top:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.back-to-top-icon { display: block; flex: 0 0 auto; }
.back-to-top-label { white-space: nowrap; }
@media (max-width: 520px) {
  .back-to-top-label { display: none; }
  .back-to-top { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .back-to-top { transition: none; }
}

@media print {
  .no-print, .site-nav, .site-footer, .site-footer-spacer, .preview-ip-banner, .back-to-top { display: none !important; }
  body { background: #fff; border-top: 0; }
  .page { width: auto; margin: 0; padding: 0; }
  .panel { border: 0; }
}
