.sc-vat, .sc-iban, .sc-loan {
  max-width: 48rem;
  padding: clamp(1rem, 3vw, 2rem);
  margin-block: 1.5rem;
  border: 1px solid #d7e2e9;
  border-radius: 0.85rem;
  background: #f7fbfd;
  color: #183d51;
}
.sc-vat h2, .sc-iban h2, .sc-loan h2 { margin-top: 0; }
.sc-vat-grid, .sc-tool-grid { display: grid; gap: 0.7rem; }
.sc-vat-grid label, .sc-tool-grid label { font-weight: 650; }
.sc-vat input, .sc-vat select, .sc-iban input, .sc-loan input {
  box-sizing: border-box;
  width: 100%;
  max-width: 28rem;
  padding: 0.7rem;
  font: inherit;
  color: #183d51;
  background: #fff;
  border: 1px solid #8b9eab;
  border-radius: 0.35rem;
}
.sc-vat-field-group { display: grid; gap: 0.7rem; }
.sc-vat-field-group[hidden] { display: none; }
.sc-vat-note, .sc-tool-note { font-size: 0.95rem; }
.sc-vat button, .sc-iban button, .sc-loan button {
  margin-block: 0.4rem;
  padding: 0.75rem 1.1rem;
  border: 0;
  border-radius: 0.4rem;
  background: #0c6575;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.sc-vat button:hover, .sc-iban button:hover, .sc-loan button:hover { background: #084d59; }
:is(.sc-vat, .sc-iban, .sc-loan) :is(input, select, button):focus-visible { outline: 3px solid #eea600; outline-offset: 3px; }
.sc-vat-result, .sc-tool-result { min-height: 2rem; margin-bottom: 0; font-variant-numeric: tabular-nums; }
.sc-vat-result.error, .sc-tool-result.error { color: #a32719; font-weight: 650; }

/* Shared presentation for native tool templates and their local module imports. */
.sc-native-tool {
  max-width: 48rem;
  margin-block: 1.5rem;
  color: #183d51;
}
.sc-native-tool .tool-card {
  box-sizing: border-box;
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid #d7e2e9;
  border-radius: 0.85rem;
  background: #f7fbfd;
}
.sc-native-tool .tool-card h2 { margin-top: 0; }
.sc-native-tool .field-group,
.sc-native-tool .form-grid,
.sc-native-tool #percent-form { display: grid; gap: 0.7rem; }
.sc-native-tool .field-group { min-width: 0; }
.sc-native-tool label { font-weight: 650; }
.sc-native-tool input:not([type="checkbox"]),
.sc-native-tool textarea,
.sc-native-tool select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 0.7rem;
  font: inherit;
  color: #183d51;
  background: #fff;
  border: 1px solid #8b9eab;
  border-radius: 0.35rem;
}
.sc-native-tool textarea { display: block; resize: vertical; max-width: 100%; }
.sc-native-tool .password-output { overflow-wrap: anywhere; word-break: break-word; }
.sc-native-tool .button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.65rem; }
.sc-native-tool button:disabled { opacity: 0.58; cursor: not-allowed; }
.sc-native-tool .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.sc-native-tool .choice { display: flex; align-items: flex-start; gap: 0.55rem; }
.sc-native-tool .choice input { flex: 0 0 auto; margin-top: 0.4rem; }
.sc-native-tool [hidden] { display: none !important; }
.sc-native-tool button {
  justify-self: start;
  margin-block: 0.4rem;
  padding: 0.75rem 1.1rem;
  border: 0;
  border-radius: 0.4rem;
  background: #0c6575;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.sc-native-tool button:hover { background: #084d59; }
.sc-native-tool :is(input,select,textarea,button):focus-visible { outline: 3px solid #eea600; outline-offset: 3px; }
.sc-native-tool .result { display: block; min-height: 2rem; margin-block: 0.5rem; font-variant-numeric: tabular-nums; }
.sc-native-tool .result.error { color: #a32719; font-weight: 650; }
.sc-native-tool .field-hint,
.sc-native-tool .fine-print { margin-block: 0.4rem; font-size: 0.95rem; font-weight: 400; }
.sc-native-tool .field-error { color: #a32719; font-weight: 650; margin-block: 0.35rem; }
.sc-native-tool .hours-day {
  box-sizing: border-box;
  min-width: 0;
  padding: 1rem;
  margin-block: 0.7rem;
  border: 1px solid #d7e2e9;
  border-radius: 0.5rem;
}
.sc-native-tool .hours-panel { min-width: 0; }
.sc-native-tool .table-scroll { max-width: 100%; overflow-x: auto; }
.sc-native-tool .amortization table {
  width: 100%;
  min-width: 35rem;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.sc-native-tool .amortization :is(th,td) {
  padding: 0.45rem 0.6rem;
  text-align: right;
  border-bottom: 1px solid #d7e2e9;
}
.sc-native-tool .amortization th:first-child { text-align: left; }
.sc-native-tool .tool-card > section + section { margin-top: 1.6rem; padding-top: 1.6rem; border-top: 1px solid #d7e2e9; }
/* v0.6 additions: QR canvas, compound-interest detail and TFR guidance. */
.sc-native-tool .qr-canvas {
  display: block;
  max-width: 100%;
  height: auto;
  margin-block: 1rem;
  image-rendering: pixelated;
}
.sc-native-tool .field-hint.error { color: #a32719; font-weight: 650; }
.sc-native-tool .ic-result { min-width: 0; overflow-wrap: anywhere; }
.sc-native-tool .ic-values,
.sc-native-tool .ic-inputs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.5rem 0.85rem;
  margin-block: 0.9rem;
}
.sc-native-tool .ic-values dt,
.sc-native-tool .ic-inputs dt { font-weight: 650; }
.sc-native-tool .ic-values dd,
.sc-native-tool .ic-inputs dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.sc-native-tool .ic-detail table { min-width: 34rem; width: 100%; border-collapse: collapse; }
.sc-native-tool .ic-detail :is(th,td) {
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid #d7e2e9;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.sc-native-tool .ic-detail th:first-child { text-align: left; }
@media (min-width: 44rem) {
  .sc-native-tool .form-grid--two-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sc-native-tool .grid-wide { grid-column: 1 / -1; }
}
/* v0.8: salary long-form disclosure and readable result breakdown. */
.sc-native-tool-salary :is(.salary-context, .salary-advanced) {
  min-width: 0;
  padding: 0.75rem 0.9rem;
  margin-block: 0.9rem;
  border: 1px solid #d7e2e9;
  border-radius: 0.5rem;
  background: #fff;
}
.sc-native-tool-salary summary { cursor: pointer; font-weight: 650; }
.sc-native-tool-salary details[open] summary { margin-bottom: 0.8rem; }
.sc-native-tool-salary .salary-breakdown {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 0.55rem 0.85rem;
  margin-block: 1rem;
  font-size: 0.94rem;
}
.sc-native-tool-salary .salary-breakdown dt {
  min-width: 0;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.sc-native-tool-salary .salary-breakdown dd {
  min-width: 0;
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.sc-native-tool-salary .salary-breakdown :is(dt,dd) { padding-block: 0.25rem; border-bottom: 1px solid #d7e2e9; }
.sc-native-tool-salary #salary-result { overflow-wrap: anywhere; }
@media (max-width: 29rem) {
  .sc-native-tool-salary .salary-breakdown { grid-template-columns: minmax(0, 1fr); gap: 0.1rem; }
  .sc-native-tool-salary .salary-breakdown dd { padding-bottom: 0.5rem; text-align: left; }
  .sc-native-tool-salary .salary-breakdown dt { border-bottom: 0; }
}
/* STEP181C #85 — allineamento RAL / Regione */
.sc-native-tool-salary .form-grid--two-column > .field-group {
  align-content: start;
}
