.volt-ampere-converter-container {
  --va-ink: #2b2119;
  --va-muted: #67584a;
  --va-soft: #8a7763;
  --va-line: #6b5745;
  --va-line-soft: rgba(107, 87, 69, 0.32);
  --va-shell: #faf2e8;
  --va-paper: #fff7e8;
  --va-panel: #fffdf7;
  --va-input: #fffdf8;
  --va-chip: #faecd4;
  --va-action: #f2e3d3;
  --va-action-hover: #ead5bd;
  --va-green: #e3efd2;
  --va-blue: #dfeef8;
  --va-title-from: rgba(255, 253, 247, 0.92);
  --va-title-to: rgba(251, 240, 220, 0.88);
  --va-body-wash: rgba(255, 253, 247, 0.74);
  --va-note-bg: rgba(250, 236, 212, 0.46);
  --va-empty-bg: rgba(250, 236, 212, 0.38);
  --va-formula-bg: rgba(255, 247, 232, 0.72);
  --va-mode-bg: rgba(223, 238, 248, 0.42);
  --va-strip-card-bg: rgba(255, 253, 247, 0.92);
  --va-error: #a6332d;
  --va-shadow: rgba(43, 33, 25, 0.18);
  --va-grid: rgba(107, 87, 69, 0.055);
  width: min(960px, calc(100% - 24px));
  margin: 24px auto 34px;
  color: var(--va-ink);
  background:
    linear-gradient(90deg, var(--va-grid) 1px, transparent 1px),
    linear-gradient(0deg, var(--va-grid) 1px, transparent 1px),
    var(--va-shell);
  background-size: 18px 18px, 18px 18px, auto;
  border: 2px solid var(--va-line);
  border-radius: 0 !important;
  box-shadow: 5px 5px 0 var(--va-shadow);
  box-sizing: border-box;
  color-scheme: light;
  font-family: inherit;
  overflow: visible;
}

.volt-ampere-converter-container *,
.volt-ampere-converter-container *::before,
.volt-ampere-converter-container *::after {
  box-sizing: border-box;
  border-radius: 0 !important;
  letter-spacing: 0;
}

.voltamp-tool {
  position: relative;
  min-width: 0;
}

.voltamp-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 14px;
  padding: 16px 18px 15px;
  background:
    linear-gradient(135deg, var(--va-title-from), var(--va-title-to)),
    var(--va-paper);
}

.voltamp-title-copy {
  min-width: 0;
}

.voltamp-kicker,
.voltamp-panel-head p,
.voltamp-mode-help,
.voltamp-live-note {
  margin: 0;
  color: var(--va-muted);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.45;
}

.voltamp-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid var(--va-line);
  background: var(--va-chip);
  color: var(--va-ink);
  font-size: 12px;
  font-weight: 950;
}

.voltamp-title h2 {
  margin: 9px 0 4px;
  color: var(--va-ink);
  font-size: 24px;
  font-weight: 950;
  line-height: 1.14;
}

.voltamp-title-copy > p:last-child {
  max-width: 650px;
  margin: 0;
  color: var(--va-muted);
  font-size: 14px;
  font-weight: 760;
  line-height: 1.55;
}

.voltamp-title-mark {
  display: grid;
  grid-template-columns: repeat(4, 34px);
  gap: 5px;
  align-items: center;
  justify-content: end;
}

.voltamp-title-mark span {
  display: grid;
  min-width: 34px;
  min-height: 34px;
  place-items: center;
  border: 2px solid var(--va-line);
  background: var(--va-panel);
  color: var(--va-ink);
  font-size: 15px;
  font-weight: 950;
  line-height: 1;
  box-shadow: 2px 2px 0 rgba(43, 33, 25, 0.12);
}

.voltamp-body {
  padding: 14px;
  border-top: 2px solid var(--va-line);
  background:
    linear-gradient(90deg, rgba(107, 87, 69, 0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(107, 87, 69, 0.04) 1px, transparent 1px),
    var(--va-body-wash);
  background-size: 16px 16px, 16px 16px, auto;
}

.voltamp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.voltamp-panel {
  display: flex;
  min-width: 0;
  min-height: 100%;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 2px solid var(--va-line);
  background: var(--va-panel);
  box-shadow: 3px 3px 0 rgba(43, 33, 25, 0.14);
}

.voltamp-panel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--va-line-soft);
}

.voltamp-panel-head h3 {
  margin: 0;
  color: var(--va-ink);
  font-size: 17px;
  font-weight: 950;
  line-height: 1.22;
  text-align: right;
}

.voltamp-mode-field,
.voltamp-field {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.voltamp-mode-field label,
.voltamp-field label {
  color: var(--va-ink);
  font-size: 14px;
  font-weight: 920;
  line-height: 1.25;
}

.voltamp-mode-field select,
.voltamp-control input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  border: 2px solid var(--va-line);
  background: var(--va-input);
  color: var(--va-ink);
  font: inherit;
  font-size: 16px;
  line-height: 1.2;
  outline: none;
}

.voltamp-mode-field select {
  padding: 0 12px;
  font-weight: 900;
}

.voltamp-mode-field select:focus,
.voltamp-control input:focus {
  border-color: var(--va-ink);
  box-shadow: 0 0 0 3px rgba(210, 170, 85, 0.32);
}

.voltamp-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.voltamp-control {
  position: relative;
  min-width: 0;
}

.voltamp-control input {
  padding: 0 58px 0 12px;
  font-weight: 950 !important;
  font-variant-numeric: tabular-nums;
}

.voltamp-control input::placeholder {
  color: var(--va-soft);
  font-weight: 700;
  opacity: 1;
}

.voltamp-suffix {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  min-width: 40px;
  min-height: 28px;
  padding: 0 7px;
  transform: translateY(-50%);
  place-items: center;
  border: 1px solid var(--va-line-soft);
  background: var(--va-chip);
  color: var(--va-ink);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}

.voltamp-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
  margin-top: 1px;
}

.voltamp-action {
  display: inline-flex;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 2px solid var(--va-line);
  background: var(--va-action);
  color: var(--va-ink);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 950;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  box-shadow: 2px 2px 0 rgba(43, 33, 25, 0.15);
  transition: background-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.voltamp-action:hover,
.voltamp-action:focus-visible {
  background: var(--va-action-hover);
  color: var(--va-ink);
}

.voltamp-action:focus-visible {
  outline: 3px solid rgba(210, 170, 85, 0.38);
  outline-offset: 2px;
}

.voltamp-action:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 rgba(43, 33, 25, 0.2);
}

.voltamp-compat-action[hidden] {
  display: none !important;
}

.voltamp-live-note {
  margin-top: auto;
  padding: 9px 10px;
  border: 1px dashed var(--va-line-soft);
  background: var(--va-note-bg);
}

.voltamp-output {
  display: grid;
  min-height: 142px;
  gap: 10px;
  align-content: start;
}

.voltamp-empty {
  display: grid;
  min-height: 142px;
  place-items: center;
  padding: 18px;
  border: 1px dashed var(--va-line-soft);
  background: var(--va-empty-bg);
  text-align: center;
}

.voltamp-empty strong {
  color: var(--va-ink);
  font-size: 18px;
  font-weight: 950;
  line-height: 1.2;
}

.voltamp-empty p {
  max-width: 280px;
  margin: 6px 0 0;
  color: var(--va-muted);
  font-size: 14px;
  font-weight: 760;
  line-height: 1.5;
}

.voltamp-result-hero {
  display: grid;
  gap: 7px;
  min-height: 96px;
  align-content: center;
  padding: 16px;
  border: 2px solid var(--va-line);
  background: var(--va-green);
  text-align: center;
}

.voltamp-result-hero span,
.voltamp-secondary span {
  color: var(--va-muted);
  font-size: 13px;
  font-weight: 880;
  line-height: 1.2;
}

.voltamp-result-hero strong {
  overflow-wrap: anywhere;
  color: var(--va-ink);
  font-size: 27px;
  font-weight: 950;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.voltamp-secondary {
  display: flex;
  min-height: 43px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--va-line-soft);
  background: var(--va-blue);
}

.voltamp-secondary strong {
  color: var(--va-ink);
  font-size: 16px;
  font-weight: 950;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.voltamp-formula-line {
  min-width: 0;
  padding: 10px 11px;
  border: 1px dashed var(--va-line-soft);
  background: var(--va-formula-bg);
  color: var(--va-ink);
  font-size: 14px;
  font-weight: 820;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.voltamp-mode-card {
  display: grid;
  gap: 5px;
  margin-top: auto;
  padding: 10px 11px;
  border: 1px solid var(--va-line-soft);
  background: var(--va-mode-bg);
}

.voltamp-mode-card span {
  color: var(--va-ink);
  font-size: 15px;
  font-weight: 950;
  line-height: 1.2;
}

.voltamp-mode-card p {
  margin: 0;
  color: var(--va-muted);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.45;
}

.voltamp-formula-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.voltamp-formula-strip article {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 11px 12px;
  border: 2px solid var(--va-line);
  background: var(--va-strip-card-bg);
  box-shadow: 2px 2px 0 rgba(43, 33, 25, 0.12);
}

.voltamp-formula-strip strong {
  color: var(--va-ink);
  font-size: 15px;
  font-weight: 950;
  line-height: 1.2;
}

.voltamp-formula-strip span {
  color: var(--va-muted);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.45;
}

.voltamp-toast {
  position: fixed;
  right: max(16px, calc((100vw - 960px) / 2));
  bottom: 22px;
  z-index: 1000;
  display: grid;
  min-width: 240px;
  max-width: min(360px, calc(100vw - 28px));
  gap: 3px;
  padding: 12px 14px;
  transform: translateY(12px);
  border: 2px solid var(--va-line);
  background: var(--va-panel);
  color: var(--va-ink);
  box-shadow: 4px 4px 0 var(--va-shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.voltamp-toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.voltamp-toast.is-error {
  border-color: var(--va-error);
}

.voltamp-toast strong {
  font-size: 14px;
  font-weight: 950;
  line-height: 1.2;
}

.voltamp-toast span {
  color: var(--va-muted);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.45;
}

@media (prefers-color-scheme: dark) {
  .volt-ampere-converter-container {
    --va-ink: #f5ead9;
    --va-muted: #cdbda8;
    --va-soft: #bba98f;
    --va-line: #c9aa80;
    --va-line-soft: rgba(201, 170, 128, 0.36);
    --va-shell: #211a15;
    --va-paper: #2a2119;
    --va-panel: #2e251d;
    --va-input: #18130f;
    --va-chip: #3a2c1f;
    --va-action: #4a3828;
    --va-action-hover: #594431;
    --va-green: #30452d;
    --va-blue: #243949;
    --va-title-from: rgba(46, 37, 29, 0.96);
    --va-title-to: rgba(37, 29, 23, 0.94);
    --va-body-wash: rgba(33, 26, 21, 0.82);
    --va-note-bg: rgba(58, 44, 31, 0.68);
    --va-empty-bg: rgba(58, 44, 31, 0.54);
    --va-formula-bg: rgba(42, 33, 25, 0.88);
    --va-mode-bg: rgba(36, 57, 73, 0.58);
    --va-strip-card-bg: rgba(46, 37, 29, 0.94);
    --va-shadow: rgba(0, 0, 0, 0.34);
    --va-grid: rgba(201, 170, 128, 0.085);
    color-scheme: dark;
  }
}

html.dark .volt-ampere-converter-container,
body.dark .volt-ampere-converter-container,
body.dark-mode .volt-ampere-converter-container,
[data-theme="dark"] .volt-ampere-converter-container {
  --va-ink: #f5ead9;
  --va-muted: #cdbda8;
  --va-soft: #bba98f;
  --va-line: #c9aa80;
  --va-line-soft: rgba(201, 170, 128, 0.36);
  --va-shell: #211a15;
  --va-paper: #2a2119;
  --va-panel: #2e251d;
  --va-input: #18130f;
  --va-chip: #3a2c1f;
  --va-action: #4a3828;
  --va-action-hover: #594431;
  --va-green: #30452d;
  --va-blue: #243949;
  --va-title-from: rgba(46, 37, 29, 0.96);
  --va-title-to: rgba(37, 29, 23, 0.94);
  --va-body-wash: rgba(33, 26, 21, 0.82);
  --va-note-bg: rgba(58, 44, 31, 0.68);
  --va-empty-bg: rgba(58, 44, 31, 0.54);
  --va-formula-bg: rgba(42, 33, 25, 0.88);
  --va-mode-bg: rgba(36, 57, 73, 0.58);
  --va-strip-card-bg: rgba(46, 37, 29, 0.94);
  --va-shadow: rgba(0, 0, 0, 0.34);
  --va-grid: rgba(201, 170, 128, 0.085);
  color-scheme: dark;
}

@media (max-width: 760px) {
  .volt-ampere-converter-container {
    width: min(100% - 20px, 620px);
    margin: 16px auto 28px;
    box-shadow: 3px 3px 0 var(--va-shadow);
  }

  .voltamp-title {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    padding: 14px;
  }

  .voltamp-title-mark {
    justify-content: start;
  }

  .voltamp-body {
    padding: 12px;
  }

  .voltamp-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .voltamp-panel {
    min-height: auto;
  }

  .voltamp-formula-strip {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 430px) {
  .volt-ampere-converter-container {
    width: calc(100% - 16px);
    margin-top: 12px;
  }

  .voltamp-title h2 {
    font-size: 22px;
  }

  .voltamp-title-copy > p:last-child {
    font-size: 13px;
  }

  .voltamp-title-mark {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
  }

  .voltamp-title-mark span {
    min-width: 0;
  }

  .voltamp-panel {
    gap: 11px;
    padding: 12px;
  }

  .voltamp-panel-head {
    display: grid;
    align-items: start;
  }

  .voltamp-panel-head h3 {
    text-align: left;
  }

  .voltamp-field-grid,
  .voltamp-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .voltamp-mode-field select,
  .voltamp-control input {
    min-height: 45px;
    font-size: 15px;
  }

  .voltamp-action {
    min-height: 42px;
    font-size: 14px;
  }

  .voltamp-result-hero strong {
    font-size: 24px;
  }

  .voltamp-toast {
    right: 14px;
    left: 14px;
    min-width: 0;
  }
}
