/* KT Appliance's clipped letter / paired-arrow roll, in Carabela's palette.
   Motion values: captured shared CSS 7350–7387, 9330–9403. */
.kt-button {
  --kt-height: 54px;
  --kt-fill: #ffffffa6;
  --kt-fill-hover: #e7ddf5;
  --kt-ink: #111;
  --kt-icon-fill: #fff;
  --kt-icon-ink: #211733;
  --kt-icon-ink-hover: #111;
  --kt-arrow-x: 0em;
}
body:not(.page-home) .kt-button.bank-button { --kt-fill: #eee; --kt-fill-hover: #e0d9ee; }
.hero-copy .kt-button { --kt-fill: #ffffffa6; }
.connected-chapter .physics-heading .kt-button { --kt-fill: #fff; --kt-icon-fill: #e6e0ef; }
.serenox-footer .kt-button { --kt-fill: #ffffffed; --kt-ink: #1c1732; }
.kt-button.button { --kt-height: 48px; --kt-fill: #eeeef0; --kt-fill-hover: #e0d9ee; }
.kt-button.button.dark { --kt-fill: var(--ink, #171715); --kt-fill-hover: #101010; --kt-ink: #fff; --kt-icon-fill: #373735; --kt-icon-ink: #fff; --kt-icon-ink-hover: #e7ddf5; }
.kt-button.cdd-book { --kt-height: 56px; --kt-fill: #d5c6f5; --kt-fill-hover: #c4b0ed; --kt-ink: #211733; --kt-icon-fill: #f4efff; }

:is(.bank-button, .button, .cdd-book).kt-button[data-kt-button] {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--kt-height);
  padding-top: 0;
  padding-bottom: 0;
  padding-right: calc(var(--kt-height) * .25);
  border-radius: 100px;
  background: var(--kt-fill);
  color: var(--kt-ink);
  line-height: 1.1;
  white-space: nowrap;
  transform: none;
  transition: background-color .5s cubic-bezier(.19, 1, .22, 1);
}
:is(.bank-button, .button, .cdd-book).kt-button[data-kt-button]::before { content: none; }
:is(.bank-button, .button, .cdd-book).kt-button[data-kt-button].is-kt-active {
  --kt-arrow-x: 2em;
  background: var(--kt-fill-hover);
  transform: none;
}
.kt-button[data-kt-button]:focus-visible { outline: 3px solid #6454ce; outline-offset: 4px; }

/* The label's shadow is the second row; its accessible name lives on the link. */
.kt-button[data-kt-button] > .kt-label {
  display: block;
  position: relative;
  width: auto;
  height: auto;
  min-width: 0;
  flex: 0 1 auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  line-height: 1.1;
  pointer-events: none;
  text-shadow: 0 1.1em;
  overflow: clip;
  transform: none;
  transition: none;
}
.kt-button .kt-text { display: block; }
.kt-button .kt-word, .kt-button .kt-char { position: relative; display: inline-block; }
.kt-button .kt-char { will-change: transform; }

/* Exactly two 1em arrows, separated by 1em, inside a stationary 2em window. */
.kt-button[data-kt-button] > .kt-icon {
  display: flex;
  position: relative;
  align-items: center;
  justify-content: flex-end;
  gap: 1em;
  width: 2em;
  height: 2em;
  flex: 0 0 2em;
  padding: 0 .5em;
  box-sizing: border-box;
  border: 0;
  border-radius: 50%;
  background: var(--kt-icon-fill);
  color: var(--kt-icon-ink);
  font-size: calc(var(--kt-height) * .25);
  line-height: 1;
  pointer-events: none;
  overflow: hidden;
  transform: none;
  transition: none;
}
.kt-button[data-kt-button].is-kt-active > .kt-icon { color: var(--kt-icon-ink-hover); }
.kt-button[data-kt-button] .kt-icon > .kt-arrow {
  display: block;
  width: 1em;
  height: 1em;
  flex: none;
  fill: none;
  overflow: visible;
  transform: translateX(var(--kt-arrow-x));
  will-change: transform;
  transition: filter 1s cubic-bezier(.19, 1, .22, 1), transform 1s cubic-bezier(.19, 1, .22, 1);
}

/* Match the project's existing compact bank-button height. */
@media (max-width: 800px) {
  .kt-button.bank-button { --kt-height: 50px; }
}
.kt-button[data-kt-motion="paused"] .kt-char,
.motion-paused .kt-button .kt-char { transform: none !important; will-change: auto; }
.kt-button[data-kt-motion="paused"] .kt-icon > .kt-arrow,
.motion-paused .kt-button .kt-icon > .kt-arrow { transform: none; transition: none; will-change: auto; }
.kt-button[data-kt-motion="paused"], .motion-paused .kt-button[data-kt-button] { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .kt-button[data-kt-button] { transition: none; }
  .kt-button[data-kt-button] .kt-char { transform: none !important; will-change: auto; }
  .kt-button[data-kt-button] .kt-icon > .kt-arrow { transform: none; transition: none; will-change: auto; }
}
