/* Page 3 / Button styles: default, hover and pressed. */
.button {
  --button-tone: var(--orange);
  --button-label: #fff;
  --button-pressed: #ff0000;
  position: relative;
  border: 2px solid transparent;
  background: var(--button-tone);
  color: var(--button-label);
  box-shadow: none;
  filter: none;
  transition: background-color .15s, color .15s, border-color .15s;
}
/* A single 2px ring keeps straight and diagonal edges equally thick.
 * The inner corner is 14 + 2 * sqrt(2) - 2 = 14.828427px from each edge.
 * Repeated bridge points close the transparent inner polygon (even-odd fill).
 */
.button::before {
  content: "";
  position: absolute;
  inset: -2px;
  pointer-events: none;
  opacity: 0;
  background: var(--button-tone);
  clip-path: polygon(evenodd,
    14px 0, 100% 0, 100% calc(100% - 14px),
    calc(100% - 14px) 100%, 0 100%, 0 14px, 14px 0,
    14.828427px 2px, 2px 14.828427px, 2px calc(100% - 2px),
    calc(100% - 14.828427px) calc(100% - 2px),
    calc(100% - 2px) calc(100% - 14.828427px),
    calc(100% - 2px) 2px, 14.828427px 2px, 14px 0
  );
}
.button-dark {
  --button-tone: var(--ink);
  --button-pressed: #6a7380;
}
.button-white {
  --button-tone: var(--pale);
  --button-label: var(--orange);
  --button-pressed: #d3d5dc;
}
.button-outline {
  background: transparent;
  border-color: transparent;
  color: var(--button-tone);
}
.button-outline::before { opacity: 1; }
.header-cta.button-outline { color: var(--button-label); }
.button:not(:disabled):hover {
  background: transparent;
  border-color: transparent;
  color: var(--button-tone);
  filter: none;
}
.button:not(:disabled):hover::before { opacity: 1; }
.button-outline:not(:disabled):hover {
  background: var(--button-tone);
  border-color: transparent;
  color: var(--button-label);
}
.button-outline:not(:disabled):hover::before { opacity: 0; }
.button .arrow,
.calc-primary::after,
.calc-secondary::after,
.text-link .arrow {
  pointer-events: none;
  transition: transform .15s;
}
.button:not(:disabled):hover .arrow,
.calc-primary:not(:disabled):hover::after,
.calc-secondary:not(:disabled):hover::after,
.text-link:hover .arrow { transform: rotate(90deg); }
.button:not(:disabled):active {
  background: var(--button-pressed);
  border-color: transparent;
  color: var(--button-label);
  filter: none;
}
.button:not(:disabled):active::before { opacity: 0; }
.button:not(:disabled):active .arrow,
.calc-primary:not(:disabled):active::after,
.calc-secondary:not(:disabled):active::after,
.text-link:active .arrow { transform: rotate(0); }
.text-link:active { color: #ff0000; }
/* The design uses existing control borders, without added focus rectangles. */
:focus { outline: none; }
:where(button, a, summary, input, select, textarea, [tabindex]) {
  -webkit-tap-highlight-color: transparent;
}
@media (prefers-reduced-motion: reduce) {
  .button, .button .arrow, .calc-primary::after, .calc-secondary::after, .text-link .arrow { transition: none; }
}
