@font-face {
  font-family: 'Kant';
  src:
    url('/fonts/Kant-Regular.woff2') format('woff2'),
    url('/fonts/Kant-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Kant';
  src:
    url('/fonts/Kant-RegularItalic.woff2') format('woff2'),
    url('/fonts/Kant-RegularItalic.woff') format('woff');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Kant';
  src:
    url('/fonts/Kant-Light.woff2') format('woff2'),
    url('/fonts/Kant-Light.woff') format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Kant';
  src:
    url('/fonts/Kant-LightItalic.woff2') format('woff2'),
    url('/fonts/Kant-LightItalic.woff') format('woff');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Kant';
  src:
    url('/fonts/Kant-Medium.woff2') format('woff2'),
    url('/fonts/Kant-Medium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Kant';
  src:
    url('/fonts/Kant-MediumItalic.woff2') format('woff2'),
    url('/fonts/Kant-MediumItalic.woff') format('woff');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Kant';
  src:
    url('/fonts/Kant-Bold.woff2') format('woff2'),
    url('/fonts/Kant-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Kant';
  src:
    url('/fonts/Kant-BoldItalic.woff2') format('woff2'),
    url('/fonts/Kant-BoldItalic.woff') format('woff');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Kant';
  src:
    url('/fonts/Kant-Black.woff2') format('woff2'),
    url('/fonts/Kant-Black.woff') format('woff');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Kant';
  src:
    url('/fonts/Kant-BlackItalic.woff2') format('woff2'),
    url('/fonts/Kant-BlackItalic.woff') format('woff');
  font-weight: 900;
  font-style: italic;
  font-display: swap;
}

:root {
  font-family: 'Kant', Arial, sans-serif;
  color: #000;
  background: #f4f4f0;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
}

button {
  font: inherit;
  font-weight: 700;
}

#app {
  position: relative;
  width: 100vw;
  min-height: 100vh;
  overflow: hidden;
}

.popup {
  position: absolute;
  left: calc(50% - 220px + var(--x));
  top: calc(50% - 130px + var(--y));
  z-index: var(--offset);
  width: min(440px, calc(100vw - 32px));
  min-height: 210px;
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  padding: 26px;
  background: #fff;
  border: 5px solid #000;
  overflow: auto;
}

.popup.is-buried {
  pointer-events: none;
}

.popup.is-entering {
  animation: popup-enter 180ms ease-out both;
}

.popup.is-exiting {
  pointer-events: none;
  animation: popup-exit 160ms ease-in both;
}

.popup--large {
  left: calc(50% - 300px + var(--x));
  top: calc(50% - 270px + var(--y));
  width: min(600px, calc(100vw - 64px));
  max-height: min(760px, calc(100vh - 56px));
  overflow: auto;
}

.popup--mini {
  left: calc(50% - 155px + var(--x));
  top: calc(50% - 86px + var(--y));
  width: min(310px, calc(100vw - 32px));
  min-height: 0;
  gap: 18px;
  padding: 18px;
}

.popup--notification {
  position: fixed;
  right: max(24px, env(safe-area-inset-right));
  left: auto;
  top: max(24px, env(safe-area-inset-top));
  z-index: 1000;
  width: min(400px, calc(100vw - 32px));
  min-height: 0;
  gap: 20px;
  padding: 20px;
}

.popup--notification p {
  font-size: 20px;
  line-height: 1.08;
}

.notification-list {
  margin: -10px 0 0;
  padding-left: 1.1em;
  font-size: 20px;
  line-height: 1.12;
}

.popup--three-actions:not(.popup--large):not(.popup--mini) {
  left: calc(50% - 280px + var(--x));
  width: min(560px, calc(100vw - 32px));
}

.popup--captcha {
  left: calc(50% - 190px + var(--x));
  width: min(380px, calc(100vw - 32px));
  gap: 22px;
}

.popup h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.02;
}

.popup p {
  margin: 0;
  font-size: 28px;
  line-height: 1.08;
}

.copy,
.note {
  white-space: pre-line;
}

.popup--large p {
  font-size: 22px;
  line-height: 1.12;
}

.popup--mini h1 {
  font-size: 24px;
}

.popup--mini p {
  font-size: 20px;
}

.preferences {
  display: grid;
  gap: 12px;
}

.preference {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
  cursor: pointer;
}

.preference input {
  width: 22px;
  height: 22px;
  margin: 2px 0 0;
  accent-color: #000;
}

.preference input:disabled {
  cursor: not-allowed;
}

.preference span {
  display: grid;
  gap: 2px;
  min-width: 0;
  font-size: 18px;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.preference strong {
  font-size: 18px;
}

.popup .note {
  font-size: 18px;
  line-height: 1.2;
}

.popup--large .note--preferences,
.note--preferences {
  font-size: 18px;
  line-height: 1.08;
}

.features {
  display: grid;
  gap: 9px;
}

.features p {
  margin: 0;
  font-size: 19px;
  line-height: 1.08;
}

.permissions {
  display: block;
  margin: 0;
  padding-left: 1.1em;
  list-style: disc;
}

.permission {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.progress-widget {
  display: grid;
  gap: 10px;
}

.progress-readout {
  margin: 0;
  font-size: 22px;
  line-height: 1;
}

.progress-track {
  width: 100%;
  height: 34px;
  padding: 5px;
  border: 4px solid #000;
}

.progress-bar {
  height: 100%;
  background: #000;
}

.progress-widget p:not(.progress-readout),
.countdown {
  margin: 0;
  font-size: 22px;
  line-height: 1.08;
}

.rating {
  display: flex;
  gap: 10px;
}

.rating button {
  width: 52px;
  height: 52px;
  padding: 0;
  color: #000;
  font-size: 34px;
  line-height: 1;
  background: #fff;
  border: 4px solid #000;
  cursor: pointer;
}

.rating button:hover {
  color: #fff;
  background: #000;
}

.rating.is-submitted p {
  margin: 0;
  font-size: 28px;
  line-height: 1.03;
}

.captcha {
  display: grid;
  gap: 12px;
}

.captcha strong {
  font-size: 20px;
  line-height: 1.05;
}

.captcha-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  width: 100%;
}

.captcha-square {
  aspect-ratio: 1;
  min-height: 0;
  background: #fff;
  border: 4px solid #000;
  cursor: pointer;
}

.captcha-square.is-selected {
  background: #000;
  box-shadow: inset 0 0 0 10px #fff;
}

.loader {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 40px;
}

.loader span {
  width: 14px;
  height: 14px;
  background: #000;
  animation: pulse 0.8s infinite alternate;
}

.loader span:nth-child(2) {
  animation-delay: 0.15s;
}

.loader span:nth-child(3) {
  animation-delay: 0.3s;
}

.download-bar {
  width: 100%;
  min-height: 46px;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  color: #000;
  text-align: left;
  line-height: 1.05;
  background: #fff;
  border: 4px solid #000;
  cursor: pointer;
}

.download-bar::before {
  content: '';
  flex: 0 0 auto;
  width: 58px;
  height: 12px;
  background:
    repeating-linear-gradient(
      90deg,
      #000 0,
      #000 10px,
      #fff 10px,
      #fff 14px
    );
}

.download-bar.is-paused::before {
  width: 14px;
  background: #000;
}

.end-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-content: center;
  padding: 32px;
  text-align: center;
  animation: popup-enter 220ms ease-out both;
}

.end-screen h1 {
  margin: 0;
  font-size: clamp(96px, 18vw, 260px);
  line-height: 0.82;
  letter-spacing: 0;
}

.end-screen p {
  position: absolute;
  left: 32px;
  right: 32px;
  top: calc(50% + clamp(54px, 9vw, 130px));
  margin: 0;
  font-size: clamp(22px, 3.2vw, 44px);
  line-height: 1.08;
}

.end-screen p.is-changing {
  animation: popup-enter 220ms ease-out both;
}

.end-screen-cta {
  position: absolute;
  left: 50%;
  top: calc(50% + clamp(160px, 18vw, 290px));
  max-width: min(760px, calc(100vw - 48px));
  display: grid;
  gap: 20px;
  justify-items: center;
  transform: translateX(-50%);
  animation: popup-enter 220ms ease-out both;
}

.end-screen-button {
  padding: 10px 16px;
  color: #000;
  font: inherit;
  font-size: clamp(18px, 2vw, 28px);
  font-weight: 400;
  line-height: 1.05;
  background: #fff;
  border: 5px solid #000;
  cursor: pointer;
}

.end-screen-button:hover {
  color: #fff;
  background: #000;
}

.end-screen-cta p {
  position: static;
  margin: 0;
  font-size: clamp(18px, 2vw, 28px);
  font-weight: 400;
  line-height: 1.08;
}

.end-screen-cta-note {
  opacity: 0;
}

.end-screen-cta-note.is-visible {
  animation: popup-enter 220ms ease-out both;
}

.font-tester-screen {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  animation: popup-enter 220ms ease-out both;
}

.font-tester-popup {
  width: min(1080px, calc(100vw - 48px));
  height: min(680px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 18px;
  padding: 28px;
  background: #fff;
  border: 5px solid #000;
  overflow: hidden;
}

.font-tester-input {
  width: 100%;
  min-height: 0;
  padding: 0;
  color: #000;
  font: inherit;
  letter-spacing: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
  outline: 0;
  white-space: pre-wrap;
  word-break: break-word;
  cursor: text;
}

.font-tester-input:empty::before {
  color: #b8b8b8;
  content: attr(data-placeholder);
}

.font-tester-input:focus:empty::before {
  content: '';
}

.font-tester-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.font-tester-controls,
.font-tester-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.font-tester-control {
  display: flex;
  gap: 5px;
  align-items: center;
  min-width: 0;
  font-size: 16px;
  line-height: 1;
}

.font-tester-control > span {
  font-weight: 700;
}

.font-tester-control--select {
  min-width: 205px;
}

.font-tester-control select {
  min-height: 42px;
  color: #000;
  font: inherit;
  font-weight: 700;
  background: #fff;
  border: 4px solid #000;
}

.font-tester-control select {
  padding: 6px 10px;
}

.font-tester-control input[type='range'] {
  width: 118px;
  height: 18px;
  margin: 0;
  accent-color: #000;
  cursor: pointer;
  appearance: none;
  background: transparent;
}

.font-tester-control input[type='range']::-webkit-slider-runnable-track {
  height: 2px;
  background: #fff;
  border: 1px solid #000;
}

.font-tester-control input[type='range']::-webkit-slider-thumb {
  width: 13px;
  height: 13px;
  margin-top: -6px;
  appearance: none;
  background: #000;
  border: 0;
}

.font-tester-control input[type='range']::-moz-range-track {
  height: 2px;
  background: #fff;
  border: 1px solid #000;
}

.font-tester-control input[type='range']::-moz-range-thumb {
  width: 13px;
  height: 13px;
  background: #000;
  border: 0;
  border-radius: 0;
}

.font-tester-actions button,
.font-tester-actions a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  color: #000;
  font: inherit;
  font-weight: 700;
  line-height: 1.05;
  text-decoration: none;
  background: #fff;
  border: 4px solid #000;
  cursor: pointer;
}

.font-tester-actions button:hover,
.font-tester-actions a:hover {
  color: #fff;
  background: #000;
}

.share-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 5100;
  width: min(430px, calc(100vw - 48px));
  display: grid;
  gap: 12px;
  padding: 16px;
  background: #fff;
  border: 5px solid #000;
  transform: translate(-50%, -50%);
  animation: popup-enter 180ms ease-out both;
}

.share-modal h2 {
  margin: 0 0 6px;
  font-size: 22px;
  line-height: 1;
}

.share-modal p {
  margin: 0;
  font-size: 17px;
  line-height: 1.1;
}

.share-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.share-modal-actions button {
  min-height: 38px;
  padding: 7px 12px;
  color: #000;
  font: inherit;
  font-weight: 700;
  line-height: 1.05;
  background: #fff;
  border: 3px solid #000;
  cursor: pointer;
}

.share-modal-actions button:hover {
  color: #fff;
  background: #000;
}

.chat-bot {
  position: fixed;
  right: 18px;
  bottom: 128px;
  z-index: 1200;
  width: min(330px, calc(100vw - 36px));
  max-height: min(430px, calc(100vh - 156px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  padding: 16px;
  background: #fff;
  border: 5px solid #000;
  animation: popup-enter 180ms ease-out both;
}

.chat-bot.is-paused {
  opacity: 0.45;
}

.chat-bot.is-paused .chat-bot-answers {
  pointer-events: none;
}

.chat-bot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chat-bot h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1;
}

.chat-bot-close {
  width: 24px;
  height: 24px;
  padding: 0;
  color: #000;
  font: inherit;
  font-weight: 700;
  line-height: 1;
  background: #fff;
  border: 3px solid #000;
  cursor: pointer;
}

.chat-bot-close:hover {
  color: #fff;
  background: #000;
}

.chat-bot-messages {
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding-right: 6px;
}

.chat-bot-message {
  margin: 0;
  display: grid;
  gap: 4px;
  font-size: 22px;
  line-height: 1.08;
}

.chat-bot-message strong {
  font-size: 15px;
  line-height: 1;
}

.chat-bot-message p {
  margin: 0;
}

.chat-bot-message--user {
  justify-self: end;
  max-width: 88%;
  font-size: 18px;
  font-weight: 700;
  text-align: right;
  animation: popup-enter 180ms ease-out both;
}

.chat-bot-message--question:not(:first-child) {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 2px solid #000;
  animation: popup-enter 180ms ease-out both;
}

.chat-bot-answers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-bot-answers button {
  min-height: 36px;
  padding: 6px 10px;
  color: #000;
  font: inherit;
  font-weight: 700;
  line-height: 1.05;
  background: #fff;
  border: 3px solid #000;
  cursor: pointer;
}

.chat-bot-answers button:hover {
  color: #fff;
  background: #000;
}

.typeface-teaser {
  position: fixed;
  left: 18px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 18px);
  z-index: 80;
  max-width: min(360px, calc(100vw - 36px));
  display: grid;
  gap: 8px;
  color: #000;
  animation: popup-enter 220ms ease-out both;
}

.typeface-teaser button {
  width: fit-content;
  padding: 0;
  color: #000;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #000;
  cursor: pointer;
}

.typeface-teaser p {
  margin: 0;
  padding: 0;
  white-space: pre-line;
  font-size: 14px;
  line-height: 1.12;
}

@keyframes pulse {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-12px);
  }
}

@keyframes popup-enter {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes popup-exit {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.actions button {
  min-height: 42px;
  padding: 8px 14px;
  color: #000;
  font-size: inherit;
  line-height: 1.05;
  background: #fff;
  border: 4px solid #000;
  cursor: pointer;
}

.actions button:hover {
  color: #fff;
  background: #000;
}

.actions button.is-selected {
  color: #fff;
  background: #000;
}

@media (max-width: 560px) {
  .popup {
    left: calc(50% - ((100vw - 48px) / 2) + (var(--x) * 0.25));
    top: calc(50% - 120px + (var(--y) * 0.35));
    width: calc(100vw - 48px);
    min-height: 190px;
    padding: 20px;
  }

  .popup p {
    font-size: 23px;
  }

  .popup h1 {
    font-size: 28px;
  }

  .popup--large {
    left: calc(24px + (var(--x) * 0.12));
    top: calc(18px + (var(--y) * 0.12));
    width: calc(100vw - 48px);
    max-height: calc(100vh - 96px);
  }

  .popup--mini {
    left: calc(50% - ((100vw - 72px) / 2) + (var(--x) * 0.22));
    top: calc(50% - 86px + (var(--y) * 0.3));
    width: calc(100vw - 72px);
  }

  .popup--notification {
    right: 16px;
    left: auto;
    top: 16px;
    width: calc(100vw - 32px);
  }

  .popup--large p {
    font-size: 19px;
  }

  .preference span {
    font-size: 15px;
  }

  .preference strong {
    font-size: 16px;
  }
}
