/* Pagina strumenti: calcolo volume scatola e peso volumetrico. */

.lvc-page {
  --lvc-ink: #0f1f33;
  --lvc-muted: #5b6676;
  --lvc-green: #0b7a4f;
  --lvc-green-dark: #08623f;
  --lvc-green-soft: #e6f6ee;
  --lvc-green-line: #bfe6d1;
  --lvc-border: #e3e8ee;
  --lvc-surface: #f5f8fa;
  --lvc-amber: #b45309;
  --lvc-amber-soft: #fff7e6;
  --lvc-amber-line: #f6dca0;
  --lvc-red: #b42318;
  --lvc-red-soft: #fdecea;
  color: var(--lvc-ink);
  background: #fff;
}

.lvc-page *,
.lvc-page *::before,
.lvc-page *::after { box-sizing: border-box; }
.lvc-page [hidden] { display: none !important; }
.lvc-page svg { width: 1em; height: 1em; flex: none; }

.lvc-page .lvc-container {
  width: min(calc(100% - 32px), 1120px);
  max-width: none;
  margin-inline: auto;
  padding: 0;
}

/* ---------- Tag / badge ---------- */
.lvc-tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--lvc-green-soft);
  color: var(--lvc-green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.lvc-tag--plain { padding: 0; background: none; letter-spacing: .14em; }
.lvc-tag--white { background: #fff; color: var(--lvc-green-dark); text-transform: none; letter-spacing: .02em; font-size: 12px; }

.lvc-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--lvc-green-line);
  border-radius: 999px;
  background: var(--lvc-green-soft);
  color: var(--lvc-green-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.lvc-badge__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lvc-green); }

/* ---------- Hero ---------- */
.lvc-hero { padding: 40px 0 28px; text-align: center; }
.lvc-hero__title {
  margin: 18px auto 14px;
  max-width: 820px;
  font-size: clamp(30px, 4.6vw, 48px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.02em;
}
.lvc-hero__title em { color: var(--lvc-green); font-style: normal; }
.lvc-hero__intro { max-width: 700px; margin: 0 auto 24px; color: var(--lvc-muted); font-size: 17px; line-height: 1.6; }

.lvc-jump { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.lvc-jump a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--lvc-border);
  border-radius: 10px;
  background: #fff;
  color: var(--lvc-ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(15, 31, 51, .04);
}
.lvc-jump a svg { color: var(--lvc-green); font-size: 17px; }
.lvc-jump a:hover { border-color: var(--lvc-green); color: var(--lvc-green); }
.lvc-jump__ghost { border-color: transparent !important; box-shadow: none !important; background: transparent !important; color: var(--lvc-muted) !important; }

/* ---------- Cards ---------- */
.lvc-tools { padding: 8px 0 56px; background: linear-gradient(#fff, var(--lvc-surface)); }
.lvc-tools__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }

.lvc-card {
  padding: 24px;
  border: 1px solid var(--lvc-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 31, 51, .05);
  scroll-margin-top: 96px;
}
.lvc-card__head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.lvc-card__title { margin: 8px 0 4px; font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.lvc-card__sub { margin: 0; color: var(--lvc-muted); font-size: 14px; }
.lvc-card__icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: none;
  place-items: center;
  border: 1px solid var(--lvc-border);
  border-radius: 10px;
  background: var(--lvc-surface);
  color: var(--lvc-muted);
  font-size: 20px;
}

/* ---------- Form ---------- */
.lvc-unit { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; padding: 8px 10px; border: 1px solid var(--lvc-border); border-radius: 10px; background: var(--lvc-surface); }
.lvc-unit__label { color: var(--lvc-muted); font-size: 13px; font-weight: 700; }
.lvc-seg { display: inline-flex; padding: 3px; border-radius: 8px; background: #e9eef2; margin-left: auto; }
.lvc-seg label { margin: 0; cursor: pointer; }
.lvc-seg input { position: absolute; opacity: 0; pointer-events: none; }
.lvc-seg span { display: block; padding: 5px 14px; border-radius: 6px; color: var(--lvc-muted); font-size: 13px; font-weight: 700; }
.lvc-seg input:checked + span { background: var(--lvc-green); color: #fff; }
.lvc-seg input:focus-visible + span { outline: 2px solid var(--lvc-green); outline-offset: 2px; }

.lvc-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.lvc-fields--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lvc-fields--1 { grid-template-columns: 1fr; }

.lvc-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  margin: 0;
  padding: 10px 14px 8px;
  border: 1px solid var(--lvc-border);
  border-radius: 10px;
  background: #fff;
  color: var(--lvc-muted);
  font-size: 12px;
  font-weight: 700;
}
.lvc-field b { font-weight: 700; }
.lvc-field:focus-within { border-color: var(--lvc-green); box-shadow: 0 0 0 3px rgba(11, 122, 79, .12); }
.lvc-field input,
.lvc-field select {
  width: 100%;
  min-height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--lvc-ink);
  font: inherit;
  font-size: 22px;
  font-weight: 800;
  box-shadow: none;
}
.lvc-field select { font-size: 15px; font-weight: 700; padding-right: 8px; }
.lvc-field input:focus,
.lvc-field select:focus { outline: 0; }
.lvc-field--sm input { font-size: 18px; }

.lvc-qty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid var(--lvc-border);
  border-radius: 10px;
  background: var(--lvc-surface);
}
.lvc-qty strong { display: block; font-size: 15px; }
.lvc-qty small { display: block; margin-top: 2px; color: var(--lvc-muted); font-size: 12px; }
.lvc-stepper { display: inline-flex; align-items: center; border: 1px solid var(--lvc-border); border-radius: 10px; background: #fff; overflow: hidden; }
.lvc-stepper button {
  display: grid;
  width: 38px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--lvc-ink);
  font-size: 16px;
  cursor: pointer;
}
.lvc-stepper button:hover { background: var(--lvc-green-soft); color: var(--lvc-green); }
.lvc-stepper input {
  width: 46px;
  height: 40px;
  padding: 0;
  border: 0;
  border-inline: 1px solid var(--lvc-border);
  background: #fff;
  color: var(--lvc-ink);
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  text-align: center;
  -moz-appearance: textfield;
}
.lvc-stepper input::-webkit-outer-spin-button,
.lvc-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.lvc-dims { margin-bottom: 12px; padding: 12px; border: 1px solid var(--lvc-border); border-radius: 12px; background: var(--lvc-surface); }
.lvc-dims .lvc-fields { margin-bottom: 0; }
.lvc-dims__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; color: var(--lvc-muted); font-size: 13px; font-weight: 700; }

.lvc-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--lvc-green);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.lvc-link:hover { color: var(--lvc-green-dark); text-decoration: underline; }

/* ---------- Risultati volume ---------- */
.lvc-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 16px; }
.lvc-tile { margin: 0; padding: 12px 10px; border: 1px solid var(--lvc-border); border-radius: 10px; background: #fff; text-align: center; min-width: 0; }
.lvc-tile dt { margin: 0 0 6px; color: var(--lvc-muted); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.lvc-tile dd { margin: 0; font-size: 17px; font-weight: 800; overflow-wrap: anywhere; }
.lvc-tile small { display: block; margin-top: 3px; color: var(--lvc-muted); font-size: 11px; }
.lvc-tile--main { border-color: var(--lvc-green-line); background: var(--lvc-green-soft); }
.lvc-tile--main dt,
.lvc-tile--main dd,
.lvc-tile--main small { color: var(--lvc-green-dark); }

/* ---------- Anteprima 3D ---------- */
.lvc-box3d { margin: 0; padding: 12px; border: 1px solid var(--lvc-border); border-radius: 12px; background: var(--lvc-surface); text-align: center; }
.lvc-box3d svg { width: 100%; max-width: 440px; height: auto; font-size: 1em; }
.lvc-box3d figcaption { margin-top: 4px; color: var(--lvc-muted); font-size: 12px; }
.lvc-box3d__top { fill: #d3efe0; stroke: var(--lvc-green); stroke-width: 1.5; stroke-linejoin: round; }
.lvc-box3d__left { fill: #8fd0b0; stroke: var(--lvc-green); stroke-width: 1.5; stroke-linejoin: round; }
.lvc-box3d__right { fill: #5fb88c; stroke: var(--lvc-green); stroke-width: 1.5; stroke-linejoin: round; }
.lvc-box3d__txt { fill: var(--lvc-ink); font-size: 12px; font-weight: 800; text-anchor: middle; }

/* ---------- Risultato peso ---------- */
.lvc-final { margin-top: 4px; padding: 16px; border: 1px solid var(--lvc-green-line); border-radius: 12px; background: var(--lvc-green-soft); }
.lvc-final__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.lvc-final__label { display: block; color: var(--lvc-green-dark); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.lvc-final small { color: var(--lvc-muted); font-size: 12px; }
.lvc-final__value { color: var(--lvc-green-dark); font-size: 34px; font-weight: 800; line-height: 1; letter-spacing: -.02em; }

.lvc-bar { display: flex; height: 8px; overflow: hidden; border-radius: 999px; background: #d7e9df; }
.lvc-bar__real { background: #9aa7b3; transition: width .25s ease; }
.lvc-bar__vol { background: var(--lvc-green); transition: width .25s ease; }
.lvc-legend { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; margin-top: 10px; color: var(--lvc-muted); font-size: 12px; font-weight: 600; }
.lvc-legend b { color: var(--lvc-ink); }
.lvc-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; }
.lvc-dot--real { background: #9aa7b3; }
.lvc-dot--vol { background: var(--lvc-green); }

.lvc-verdict { margin: 12px 0 0; padding: 12px 14px; border-radius: 10px; font-size: 14px; font-weight: 600; line-height: 1.5; }
.lvc-verdict:empty { display: none; }
.lvc-verdict[data-state="warn"] { border: 1px solid var(--lvc-amber-line); background: var(--lvc-amber-soft); color: #7a4a05; }
.lvc-verdict[data-state="ok"] { border: 1px solid var(--lvc-green-line); background: var(--lvc-green-soft); color: var(--lvc-green-dark); }
.lvc-verdict[data-state="neutral"] { border: 1px solid var(--lvc-border); background: var(--lvc-surface); color: var(--lvc-muted); }

.lvc-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--lvc-border); color: var(--lvc-muted); font-size: 12px; }
.lvc-card__foot span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Guida ---------- */
.lvc-guide { padding: 56px 0 24px; }
.lvc-guide__intro { max-width: 780px; }
.lvc-guide h2 { margin: 10px 0 14px; font-size: clamp(26px, 3.4vw, 34px); font-weight: 800; line-height: 1.15; letter-spacing: -.01em; }
.lvc-guide p { color: var(--lvc-muted); line-height: 1.7; }
.lvc-guide h3 { margin: 0 0 14px; font-size: 18px; font-weight: 800; }

.lvc-formula {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0 36px;
  padding: 16px 20px;
  border: 1px solid var(--lvc-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(15, 31, 51, .04);
}
.lvc-formula__icon { display: grid; width: 38px; height: 38px; flex: none; place-items: center; border-radius: 8px; background: var(--lvc-green); color: #fff; font-size: 18px; }
.lvc-formula small { display: block; color: var(--lvc-muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.lvc-formula strong { font-size: 18px; }
.lvc-formula p { margin: 0 0 0 auto; max-width: 260px; font-size: 13px; text-align: right; }

.lvc-examples { margin-bottom: 36px; }
.lvc-table-wrap { overflow-x: auto; border: 1px solid var(--lvc-border); border-radius: 12px; }
.lvc-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 760px; }
.lvc-table th,
.lvc-table td { padding: 12px 10px; border-bottom: 1px solid var(--lvc-border); text-align: left; vertical-align: middle; }
.lvc-table th:first-child,
.lvc-table td:first-child { padding-left: 14px; }
.lvc-table th:last-child,
.lvc-table td:last-child { padding-right: 14px; }
.lvc-table tbody tr:last-child td { border-bottom: 0; }
.lvc-table th { background: var(--lvc-surface); color: var(--lvc-muted); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.lvc-pill { display: inline-block; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 700; }
.lvc-pill--ok { background: var(--lvc-green-soft); color: var(--lvc-green-dark); }
.lvc-pill--warn { background: var(--lvc-amber-soft); color: var(--lvc-amber); }
.lvc-pill--bad { background: var(--lvc-red-soft); color: var(--lvc-red); }

.lvc-tips__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.lvc-tip { padding: 20px; border: 1px solid var(--lvc-border); border-radius: 12px; background: #fff; }
.lvc-tip__icon { display: grid; width: 36px; height: 36px; margin-bottom: 12px; place-items: center; border-radius: 8px; background: var(--lvc-green-soft); color: var(--lvc-green); font-size: 18px; }
.lvc-tip h4 { margin: 0 0 8px; font-size: 15px; font-weight: 800; line-height: 1.35; }
.lvc-tip p { margin: 0; font-size: 14px; line-height: 1.6; }

/* ---------- CTA ---------- */
.lvc-cta { padding: 40px 0; }
.lvc-cta__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 32px;
  border: 1px solid var(--lvc-green-line);
  border-radius: 16px;
  background: var(--lvc-green-soft);
}
.lvc-cta h2 { margin: 10px 0 8px; font-size: 26px; font-weight: 800; }
.lvc-cta p { max-width: 560px; margin: 0; color: var(--lvc-muted); line-height: 1.6; }
.lvc-cta__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.lvc-btn { display: inline-flex; min-height: 46px; align-items: center; padding: 0 20px; border-radius: 10px; font-size: 14px; font-weight: 800; text-decoration: none; }
.lvc-btn--primary { background: var(--lvc-green); color: #fff; }
.lvc-btn--primary:hover { background: var(--lvc-green-dark); color: #fff; }
.lvc-btn--secondary { border: 1px solid var(--lvc-border); background: #fff; color: var(--lvc-ink); }
.lvc-btn--secondary:hover { border-color: var(--lvc-green); color: var(--lvc-green); }

/* ---------- FAQ ---------- */
.lvc-faq { padding: 24px 0 64px; }
.lvc-faq__inner { max-width: 820px; text-align: center; }
.lvc-faq h2 { margin: 10px 0 24px; font-size: clamp(24px, 3vw, 30px); font-weight: 800; }
.lvc-faq__item { margin-bottom: 10px; border: 1px solid var(--lvc-border); border-radius: 12px; background: #fff; text-align: left; }
.lvc-faq__item[open] { box-shadow: 0 4px 14px rgba(15, 31, 51, .05); }
.lvc-faq__item summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; font-size: 15px; font-weight: 700; cursor: pointer; list-style: none; }
.lvc-faq__item summary::-webkit-details-marker { display: none; }
.lvc-faq__item summary svg { color: var(--lvc-muted); font-size: 18px; transition: transform .2s ease; }
.lvc-faq__item[open] summary svg { transform: rotate(180deg); }
.lvc-faq__item p { margin: 0; padding: 0 18px 18px; color: var(--lvc-muted); font-size: 14px; line-height: 1.7; }
.lvc-faq__note { margin-top: 20px; color: var(--lvc-muted); font-size: 13px; }
.lvc-faq__note a { color: var(--lvc-green); font-weight: 700; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .lvc-tools__grid { grid-template-columns: 1fr; }
  .lvc-tips__grid { grid-template-columns: 1fr; }
  .lvc-formula { flex-wrap: wrap; }
  .lvc-formula p { max-width: none; margin: 0; text-align: left; }
}

@media (max-width: 560px) {
  .lvc-hero { padding-top: 24px; }
  .lvc-card { padding: 18px 16px; }
  .lvc-card__icon { display: none; }
  .lvc-fields { gap: 8px; }
  .lvc-field { padding: 8px 10px 6px; }
  .lvc-field input { font-size: 18px; }
  .lvc-seg { margin-left: 0; width: 100%; }
  .lvc-seg label { flex: 1; }
  .lvc-seg span { text-align: center; padding-inline: 6px; }
  .lvc-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lvc-qty { flex-wrap: wrap; }
  .lvc-final__value { font-size: 28px; }
  .lvc-cta__inner { padding: 22px 18px; }
  .lvc-cta__actions { width: 100%; }
  .lvc-cta__actions .lvc-btn { flex: 1 1 100%; justify-content: center; }
  .lvc-jump a { padding: 9px 12px; font-size: 13px; }

  /* Tabella esempi a schede su mobile */
  .lvc-table-wrap { border: 0; overflow: visible; }
  .lvc-table { min-width: 0; }
  .lvc-table thead { display: none; }
  .lvc-table,
  .lvc-table tbody,
  .lvc-table tr,
  .lvc-table td { display: block; width: 100%; }
  .lvc-table tr { margin-bottom: 12px; border: 1px solid var(--lvc-border); border-radius: 12px; overflow: hidden; }
  .lvc-table td { display: flex; justify-content: space-between; gap: 12px; padding: 9px 14px; white-space: normal; text-align: right; }
  .lvc-table td::before { content: attr(data-label); color: var(--lvc-muted); font-size: 12px; font-weight: 700; text-align: left; }
}
