.savings-bar {
  display: flex;
  justify-content: center;
  padding: 5px 12px 12px;
}

:is(.site-header, .detail-header):has(+ .savings-bar) {
  border-bottom-color: transparent;
}

#valutenze-savings-control .savings-switch {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 2px 9px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font-size: .875rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}

.savings-switch__copy {
  display: grid;
  align-content: start;
  gap: 2px;
  min-height: 1.2rem;
  line-height: 1.35;
}

#valutenze-savings-control .savings-switch:hover .savings-switch__label {
  color: var(--blue);
}

#valutenze-savings-control .savings-switch:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.savings-wall {
  display: grid;
  place-items: center;
  width: 88px;
  height: 52px;
  border: 1px solid light-dark(#c7d1dc, #8497ab);
  border-radius: 9px;
  background: linear-gradient(160deg, #fdfefe 15%, #f3f6fa 66%, #dce4ed 100%);
  box-shadow: inset 0 1px 1px #fff, inset 0 -2px 2px #10233f18,
    0 1px 1px #10233f25, 0 4px 8px #10233f22;
}

.savings-wall__socket {
  display: grid;
  place-items: center;
  width: 60px;
  height: 38px;
  border-radius: 4px;
  background: #8d9aa9;
  box-shadow: inset 0 1px 3px #10233f6b;
  perspective: 90px;
}

.savings-wall__rocker {
  --rocker-angle: 18deg;
  display: grid;
  place-items: end center;
  width: 57px;
  height: 33px;
  padding-bottom: 6px;
  border: 1px solid #b2becb;
  border-radius: 3px;
  background: linear-gradient(#fff, #f1f5f9 68%, #e5ebf1);
  box-shadow: inset 0 1px 1px #fff, 0 3px 0 #a4b0be, 0 4px 3px #10233f70;
  transform: rotateX(var(--rocker-angle));
}

.savings-wall__indicator {
  width: 10px;
  height: 2px;
  border-radius: 2px;
  background: #275dc4;
}

.savings-switch[aria-checked="true"] .savings-wall__rocker {
  --rocker-angle: -18deg;
  background: linear-gradient(#e0e7ef, #f1f5f9 46%, #fdfefe);
  box-shadow: inset 0 -1px 1px #fff, 0 -3px 0 #a4b0be, 0 -4px 3px #10233f70;
}

.savings-switch[aria-checked="true"] .savings-wall__indicator {
  background: #8796a7;
}

html[data-valutenze-theme="dark"] {
  color-scheme: dark;
  --paper: #0a1423;
  --ink: #ecf3ff;
  --ink-soft: #bac9dd;
  --blue: #9bbfff;
  --blue-deep: #a8c6ff;
  --sky: #bee0fa;
  --sky-soft: #13243a;
  --mint: #91e3a1;
  --mint-soft: #112c26;
  --lavender: #262443;
  --line: #334860;
  --shadow-soft: 0 20px 52px rgba(0, 0, 0, .25);
}

html[data-valutenze-theme="dark"] :focus-visible {
  outline-color: #9bbfff;
}

/* Continue the home hero's navy base through the switch and the menu. */
html[data-valutenze-theme="dark"] :is(
  .savings-bar:has(+ .hero),
  .site-header:has(+ .savings-bar + .hero)
) {
  background-color: #122236;
}
