/* Base styles. These reproduce the parts of the main site's stylesheet that
   this puzzle was originally designed against. */

:root {
  --bs-font-sans-serif: system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
}

*,
::after,
::before {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--bs-font-sans-serif);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #212529;
  background-color: #fff;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

h1,
h2 {
  margin-top: 0;
  margin-bottom: .5rem;
  font-weight: 500;
  line-height: 1.2;
}

h1 {
  font-size: calc(1.375rem + 1.5vw);
}

@media (min-width: 1200px) {
  h1 {
    font-size: 2.5rem;
  }
}

h2 {
  font-size: calc(1.325rem + .9vw);
}

@media (min-width: 1200px) {
  h2 {
    font-size: 2rem;
  }
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

b {
  font-weight: bolder;
}

img {
  vertical-align: middle;
}

label {
  display: inline-block;
}

button {
  border-radius: 0;
}

button:focus:not(:focus-visible) {
  outline: 0;
}

button,
input {
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

button {
  text-transform: none;
}

[type=button],
button {
  -webkit-appearance: button;
}

[type=button]:not(:disabled),
button:not(:disabled) {
  cursor: pointer;
}

::-moz-focus-inner {
  padding: 0;
  border-style: none;
}

::-webkit-datetime-edit-day-field,
::-webkit-datetime-edit-fields-wrapper,
::-webkit-datetime-edit-hour-field,
::-webkit-datetime-edit-minute,
::-webkit-datetime-edit-month-field,
::-webkit-datetime-edit-text,
::-webkit-datetime-edit-year-field {
  padding: 0;
}

::-webkit-inner-spin-button {
  height: auto;
}

::-webkit-search-decoration {
  -webkit-appearance: none;
}

::-webkit-color-swatch-wrapper {
  padding: 0;
}

::file-selector-button {
  font: inherit;
}

::-webkit-file-upload-button {
  font: inherit;
  -webkit-appearance: button;
}

.container {
  width: 100%;
  padding-right: var(--bs-gutter-x, 0.75rem);
  padding-left: var(--bs-gutter-x, 0.75rem);
  margin-right: auto;
  margin-left: auto;
}

@media (min-width: 576px) {
  .container {
    max-width: 540px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 720px;
  }
}

@media (min-width: 992px) {
  .container {
    max-width: 960px;
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
}

@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
}

:root {
  --neutral-400: #c8cace;
  --neutral-500: #9b9fa6;
  --neutral-600: #71767f;
  --neutral-800: #26272a;
  --blue-300: #7fabf6;
  --white: #FFFFFF;
  --black: #000000;
}

html,
body {
  height: 100%;
  min-height: 100%;
}

body {
  background-color: var(--white);
  font-family: "Alright Sans LT", Helvetica, Arial, sans-serif;
}

@media screen and (min-width: 1200px) {
  .container {
    max-width: 1170px;
  }
}

@media screen and (max-width: 768px) {
  .container {
    padding: 0;
  }
}

h1 {
  font-weight: 800;
  font-size: 70px;
  line-height: 70px;
  color: var(--black);
  text-transform: uppercase;
}

@media screen and (max-width: 768px) {
  h1 {
    font-size: 48px;
    line-height: 1;
  }
}

h2 {
  font-size: 38px;
  font-weight: 500;
  letter-spacing: normal;
  line-height: 48px;
  margin-bottom: 20px;
  color: var(--black);
  text-transform: none;
}

@media screen and (max-width: 768px) {
  h2 {
    font-size: 30px;
    line-height: 37px;
  }
}

@media screen and (max-width: 576px) {
  h2 {
    font-size: 26px;
    line-height: 33px;
  }
}

p {
  font-size: 16px;
  font-weight: 300;
  letter-spacing: normal;
  line-height: 24px;
  margin-bottom: 12px;
  color: var(--black);
}

@media screen and (max-width: 768px) {
  p {
    font-size: 14px;
  }
}

button {
  border: 0;
  cursor: pointer;
}

img {
  max-width: 100%;
  vertical-align: middle;
}

.hide {
  display: none;
}

@media screen and (max-width: 768px) {
  h1 {
    font-size: 32px;
    line-height: 1.1;
  }
}


/* Puzzle styles */

.numberphile-2023 {
  font-family: "Alright Sans LT", Helvetica, Arial, sans-serif;
}

.numberphile-2023 .cc-window {
  display: none;
}

.numberphile-2023 #canvas-container-div {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  background-color: var(--white);
}

.numberphile-2023 #canvas-container-div #confetti-canvas {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0.8;
}

.numberphile-2023 .np23-column {
  position: relative;
  left: 50%;
  -webkit-transform: translate(-50%);
      -ms-transform: translate(-50%);
          transform: translate(-50%);
  max-width: 1200px;
}

.numberphile-2023 p {
  text-align: center;
  margin: 0;
  color: var(--neutral-800);
}

.numberphile-2023 img {
  max-width: none;
}

.numberphile-2023 .np23-page {
  position: relative;
  width: 100%;
  margin-top: 20px;
}

.numberphile-2023 .np23-content-container {
  position: relative;
  left: 50%;
  -webkit-transform: translate(-50%);
      -ms-transform: translate(-50%);
          transform: translate(-50%);
}

.numberphile-2023 .grid-container {
  position: relative;
  left: 50%;
  -webkit-transform: translate(-50%);
      -ms-transform: translate(-50%);
          transform: translate(-50%);
  width: 90%;
  aspect-ratio: 1/1;
  max-width: 600px;
  margin-top: 55px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
      flex-wrap: wrap;
}

.numberphile-2023 .grid-container .grid {
  position: absolute;
  left: 50%;
  top: 50%;
  -webkit-transform: translate(-50%, -50%);
      -ms-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
  width: 100.3%;
}

.numberphile-2023 .grid-container .grid.letters {
  opacity: 0;
  pointer-events: none;
}

.numberphile-2023 .grid-container .cell {
  position: relative;
  width: 9.09090909%;
  aspect-ratio: 1/1;
  cursor: pointer;
  margin: 0;
}

.numberphile-2023 .grid-container .cell-img {
  position: absolute;
  left: 50%;
  top: 50%;
  -webkit-transform: translate(-50%, -50%);
      -ms-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
  display: none;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
}

.numberphile-2023 .grid-container .cell-img.star {
  width: 65%;
}

.numberphile-2023 .grid-container .cell-img.x {
  width: 20%;
}

.numberphile-2023 .grid-container .toggle-container {
  position: absolute;
  top: 102.5%;
  width: 100%;
}

.numberphile-2023 .grid-container .toggle-container.clear-markers-container p {
  position: relative;
  left: 3px;
  text-align: left;
  color: var(--blue-300);
  display: inline-block;
}

.numberphile-2023 .grid-container .toggle-container.letter-toggle-container {
  right: 120px;
}

.numberphile-2023 .grid-container .toggle-container p {
  position: absolute;
  right: 38px;
  top: -2px;
  font-size: 10px;
  margin: 0;
  cursor: pointer;
  color: var(--neutral-800);
}

.numberphile-2023 .grid-container .toggle-container .slider {
  position: absolute;
  right: 2px;
  width: 30px;
  height: 18px;
  background-color: #8db2e1;
  border-radius: 9px;
  cursor: pointer;
  -webkit-transition: 200ms;
  -o-transition: 200ms;
  transition: 200ms;
}

.numberphile-2023 .grid-container .toggle-container .slider .toggle {
  position: relative;
  left: 14px;
  top: 2px;
  width: 14px;
  height: 14px;
  border-radius: 100%;
  background-color: var(--white);
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
}

.numberphile-2023 .correct-notification {
  position: absolute;
  top: 0;
  left: 50%;
  -webkit-transform: translate(-50%, 0);
      -ms-transform: translate(-50%, 0);
          transform: translate(-50%, 0);
  width: 100%;
  display: none;
}

.numberphile-2023 .correct-notification .text-container {
  position: absolute;
  top: 350px;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
      -ms-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
  width: 90%;
}

.numberphile-2023 .correct-notification .text-container .correct-heading {
  text-align: center;
  font-weight: 700;
  font-size: 60px;
  line-height: 1.1;
}

.numberphile-2023 .correct-notification .text-container .correct-subheading {
  text-align: center;
  font-size: 22px;
  margin-top: 53px;
  font-weight: 700;
  line-height: 27px;
}

.numberphile-2023 .correct-notification .text-container .np23-reset {
  margin-top: 35px;
  color: var(--neutral-500);
  font-size: 10px;
  text-align: center;
  cursor: pointer;
}

.numberphile-2023 .correct-notification .text-container .np23-reset:hover {
  color: var(--neutral-400);
}

.numberphile-2023 .intro-text {
  position: relative;
  left: 50%;
  -webkit-transform: translate(-50%);
      -ms-transform: translate(-50%);
          transform: translate(-50%);
  width: 90%;
  max-width: 600px;
}

.numberphile-2023 .intro-text h1 {
  color: var(--neutral-800);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.4;
}

.numberphile-2023 .intro-text h2 {
  color: var(--neutral-800);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.5;
  margin: 20px 0 0 0;
}

.numberphile-2023 form {
  position: relative;
  left: 50%;
  -webkit-transform: translate(-50%);
      -ms-transform: translate(-50%);
          transform: translate(-50%);
  width: 90%;
  max-width: 600px;
  margin-top: 110px;
  height: 180px;
}

.numberphile-2023 #answer-entry {
  font-size: 14px;
  height: 40px;
  border: 2px solid var(--neutral-800);
  border-radius: 4px;
  width: 66%;
  padding: 1px 0 0 13px;
  background-color: var(--white);
  color: var(--neutral-800);
}

.numberphile-2023 #answer-entry:focus {
  outline: none;
}

.numberphile-2023 #answer-entry::-webkit-input-placeholder {
  color: var(--neutral-600);
}

.numberphile-2023 #answer-entry:-ms-input-placeholder {
  color: var(--neutral-600);
}

.numberphile-2023 #answer-entry::-ms-input-placeholder {
  color: var(--neutral-600);
}

.numberphile-2023 #answer-entry::placeholder {
  color: var(--neutral-600);
}

.numberphile-2023 #answer-entry:focus::-webkit-input-placeholder {
  opacity: 0;
}

.numberphile-2023 #answer-entry:focus:-ms-input-placeholder {
  opacity: 0;
}

.numberphile-2023 #answer-entry:focus::-ms-input-placeholder {
  opacity: 0;
}

.numberphile-2023 #answer-entry:focus::placeholder {
  opacity: 0;
}

.numberphile-2023 button {
  height: 40px;
  border-radius: 27.5px;
  color: var(--white);
  -webkit-transition: 0.3s;
  -o-transition: 0.3s;
  transition: 0.3s;
  cursor: pointer;
}

.numberphile-2023 button#submit-button {
  float: right;
  width: 32%;
  background-color: var(--neutral-800);
}

.numberphile-2023 button#submit-button:hover {
  background-color: var(--blue-300);
}

.numberphile-2023 button .label {
  position: relative;
  top: 0px;
  margin: 0;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .05em;
  color: var(--white);
}

.numberphile-2023 .incorrect-notification {
  position: absolute;
  width: 100%;
  text-align: center;
  font-size: 16px;
  top: 60px;
  color: var(--blue-300);
  display: none;
}
