:root {
  --cpat-orange: #ff6b00;
  --cpat-dark: #181818;
  --cpat-white: #ffffff;
  --cpat-focus: #005fcc;
}

.cpat-root,
.cpat-root * {
  box-sizing: border-box;
}

.cpat-root {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 2147483000;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.35;
  color: var(--cpat-dark);
}

.cpat-toggle {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 3px solid var(--cpat-white);
  border-radius: 50%;
  background: var(--cpat-orange);
  color: var(--cpat-white);
  box-shadow: 0 5px 20px rgba(0, 0, 0, .32);
  cursor: pointer;
}

.cpat-toggle:hover {
  background: #d95700;
}

.cpat-toggle svg {
  width: 38px;
  height: 38px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cpat-toggle svg circle {
  stroke: none;
}

.cpat-toggle:focus-visible,
.cpat-panel button:focus-visible {
  outline: 4px solid var(--cpat-focus);
  outline-offset: 3px;
}

.cpat-panel {
  position: absolute;
  left: 0;
  bottom: 72px;
  width: min(360px, calc(100vw - 28px));
  max-height: min(680px, calc(100vh - 110px));
  overflow: auto;
  padding: 18px;
  border: 2px solid #292929;
  border-radius: 18px;
  background: var(--cpat-white);
  box-shadow: 0 12px 42px rgba(0, 0, 0, .35);
}

.cpat-panel[hidden] {
  display: none !important;
}

.cpat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.cpat-kicker {
  margin: 0 0 3px;
  color: #9a3c00;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .09em;
}

.cpat-header h2 {
  margin: 0;
  color: var(--cpat-dark);
  font: 700 21px/1.25 Arial, Helvetica, sans-serif;
}

.cpat-close {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 2px solid #d0d0d0;
  border-radius: 10px;
  background: #f5f5f5;
  color: #111;
  font-size: 29px;
  line-height: 1;
  cursor: pointer;
}

.cpat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.cpat-control {
  min-height: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 9px 7px;
  border: 2px solid #d7d7d7;
  border-radius: 12px;
  background: #fff;
  color: #151515;
  font: 700 14px/1.25 Arial, Helvetica, sans-serif;
  text-align: center;
  cursor: pointer;
}

.cpat-control:hover {
  border-color: var(--cpat-orange);
  background: #fff6ef;
}

.cpat-control[aria-pressed="true"] {
  border-color: #111;
  background: var(--cpat-orange);
  color: #111;
}

.cpat-symbol {
  font-size: 25px;
  font-weight: 800;
  line-height: 1;
}

.cpat-status {
  margin: 14px 0 9px;
  color: #333;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.cpat-reset {
  width: 100%;
  min-height: 46px;
  border: 2px solid #1b1b1b;
  border-radius: 10px;
  background: #1b1b1b;
  color: #fff;
  font: 700 15px/1.2 Arial, Helvetica, sans-serif;
  cursor: pointer;
}

html.cpat-contrast body,
html.cpat-contrast body :not(img):not(video):not(svg):not(path):not(.cpat-root):not(.cpat-root *) {
  background-color: #000 !important;
  color: #fff !important;
  border-color: #fff !important;
  text-shadow: none !important;
}

html.cpat-contrast body a:not(.cpat-root a) {
  color: #ffe600 !important;
}

html.cpat-grayscale body {
  filter: grayscale(100%);
}

html.cpat-links body a:not(.cpat-root a) {
  text-decoration: underline !important;
  text-decoration-thickness: 3px !important;
  text-underline-offset: 3px !important;
}

html.cpat-readable body :not(.cpat-root):not(.cpat-root *) {
  font-family: Arial, Helvetica, sans-serif !important;
  letter-spacing: .015em !important;
  line-height: 1.65 !important;
}

html.cpat-large-cursor,
html.cpat-large-cursor body,
html.cpat-large-cursor body * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='40' viewBox='0 0 32 40'%3E%3Cpath fill='white' stroke='black' stroke-width='2' d='M3 2v29l8-7 6 13 6-3-6-13h11z'/%3E%3C/svg%3E") 3 2, auto !important;
}

html.cpat-reduce-motion,
html.cpat-reduce-motion *:not(.cpat-root):not(.cpat-root *) {
  scroll-behavior: auto !important;
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .001ms !important;
}

@media (prefers-reduced-motion: reduce) {
  .cpat-root *,
  .cpat-root *::before,
  .cpat-root *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 480px) {
  .cpat-root {
    left: 14px;
    bottom: 14px;
  }
  .cpat-toggle {
    width: 54px;
    height: 54px;
  }
  .cpat-panel {
    bottom: 66px;
    width: calc(100vw - 28px);
    padding: 14px;
  }
  .cpat-control {
    min-height: 82px;
    font-size: 13px;
  }
}

