:root {
  color-scheme: dark;
  --black: 7, 7, 7;
  --gray: 164, 164, 164;
  --gray-light: 31, 31, 31;
  --gray-dark: 238, 238, 238;
  --ink: #070707;
  --surface: #101010;
  --surface-raised: #171717;
  --surface-hover: #202020;
  --red: #e52b38;
  --red-dark: #ff6670;
  --white: #f4f4f4;
  --off-white: #121212;
  --mid-gray: #a4a4a4;
  --line: #343434;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-atkinson), Arial, sans-serif;
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
}

button,
input,
select {
  font: inherit;
}

button,
select,
summary {
  cursor: pointer;
}


p.blockquote {
    color: cadetblue !important;
    font-size: 0.8em !important;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--red);
  color: #fff;
}

p.feature-head {
    color: cornflowerblue !important;
}

.site-header {
  z-index: 30;
  color: var(--white);
  border-bottom: 4px solid var(--red);
  background: #050505;
  position: sticky;
  top: 0;
}

.site-header nav {
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  width: min(1380px, 100% - 40px);
  min-height: 60px;
  margin: auto;
  display: flex;
}

.brand,
.nav-links a {
  text-decoration: none;
}

.brand {
  align-items: center;
  gap: 12px;
  font-weight: 700;
  display: flex;
}

.brand-mark {
  align-items: center;
  gap: 2px;
  height: 28px;
  display: inline-flex;
}

.brand-mark i {
  background: var(--white);
  clip-path: polygon(50% 0, 100% 22%, 72% 100%, 28% 100%, 0 22%);
  width: 14px;
  height: 22px;
  display: block;
}

.brand-mark i:last-child {
  background: var(--red);
}

.brand-mark b {
  color: var(--red);
  font-size: 13px;
}

.nav-links {
  gap: 24px;
  font-size: 14px;
  display: flex;
}

.nav-links a:hover {
  color: #ff6670;
}

main {
  width: min(1380px, 100% - 40px);
  margin: auto;
  padding-bottom: 80px;
}

.masthead {
  border-bottom: 8px solid var(--line);
  grid-template-columns: 1.35fr .65fr;
  align-items: end;
  gap: 70px;
  min-height: 330px;
  padding: 58px 0 44px;
  display: grid;
}

.kicker {
  color: var(--red-dark);
  text-transform: uppercase;
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
}

h1 {
  letter-spacing: 0;
  text-transform: uppercase;
  margin: 0;
  font-size: clamp(52px, 7vw, 96px);
  line-height: .88;
}

h1 span {
  color: var(--red);
}

.archive-summary {
  border-left: 5px solid var(--red);
  padding-left: 24px;
}

.archive-summary > p {
  max-width: 420px;
  margin: 0 0 30px;
  font-size: 19px;
}

.archive-summary dl {
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  display: grid;
}

.archive-summary dl div {
  border-right: 1px solid var(--line);
  padding-right: 14px;
}

.archive-summary dl div + div {
  padding-left: 14px;
}

.archive-summary dl div:last-child {
  border: 0;
}

.archive-summary dt {
  color: var(--mid-gray);
  text-transform: uppercase;
  font-size: 11px;
}

.archive-summary dd {
  margin: 2px 0 0;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
}

.toolbar {
  z-index: 20;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
  grid-template-columns: minmax(280px, 1fr) minmax(220px, .55fr) 250px;
  gap: 10px;
  padding: 12px 0;
  display: grid;
  position: sticky;
  top: 64px;
}

.toolbar label {
  position: relative;
}

.toolbar label span {
  z-index: 1;
  color: var(--mid-gray);
  text-transform: uppercase;
  pointer-events: none;
  font-size: 10px;
  font-weight: 700;
  position: absolute;
  top: 6px;
  left: 12px;
}

input,
select {
  background: var(--surface);
  width: 100%;
  height: 52px;
  color: var(--white);
  border: 1px solid #4a4a4a;
  border-radius: 0;
  padding: 20px 12px 4px;
}

input::placeholder {
  color: #828282;
  opacity: 1;
}

input:focus,
select:focus,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

.status-tabs {
  border: 1px solid #4a4a4a;
  grid-template-columns: repeat(3, 1fr);
  display: grid;
}

.status-tabs button {
  background: var(--surface);
  color: var(--white);
  border: 0;
  border-right: 1px solid #4a4a4a;
}

.status-tabs button:last-child {
  border: 0;
}

.status-tabs button.active {
  background: var(--red);
  color: #fff;
}

.status-tabs button:hover:not(.active) {
  background: var(--surface-hover);
}

.guide-layout {
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 42px;
  padding-top: 30px;
  display: grid;
}

aside {
  border: 1px solid var(--line);
  border-top: 4px solid var(--red);
  background: var(--surface);
  max-height: calc(100vh - 175px);
  color: var(--white);
  align-self: start;
  padding: 18px 0 22px;
  position: sticky;
  top: 148px;
  overflow-y: auto;
}

aside > p {
  border-bottom: 1px solid var(--line);
  color: var(--mid-gray);
  text-transform: uppercase;
  margin: 0;
  padding: 0 18px 13px;
  font-size: 11px;
  font-weight: 700;
}

aside nav {
  display: block;
}

aside a {
  color: #ddd;
  border-left: 3px solid #0000;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  padding: 9px 18px;
  font-size: 13px;
  line-height: 1.25;
  text-decoration: none;
  display: grid;
}

aside a span {
  color: var(--red);
  font-weight: 700;
}

aside a:hover {
  border-left-color: var(--red);
  background: var(--surface-hover);
  color: var(--white);
}

.guide-content {
  min-width: 0;
}

.result-count {
  color: var(--mid-gray);
  margin: 0 0 24px;
  font-size: 13px;
}

.operation {
  margin-bottom: 56px;
  scroll-margin-top: 150px;
}

.operation-title {
  border-bottom: 3px solid #505050;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  padding-bottom: 12px;
  display: flex;
}

.operation-title div {
  align-items: baseline;
  gap: 12px;
  display: flex;
}

.operation-title span {
  color: var(--red-dark);
  font-size: 12px;
  font-weight: 700;
}

.operation-title h2 {
  letter-spacing: 0;
  margin: 0;
  font-size: 27px;
  line-height: 1.1;
}

.operation-title p {
  color: var(--mid-gray);
  margin: 0;
  font-size: 12px;
}

.challenge {
  border-bottom: 1px solid var(--line);
  background: var(--ink);
}

.challenge[open] {
  border-bottom-color: #555;
}

.challenge summary {
  grid-template-columns: 48px minmax(190px, 1.2fr) minmax(130px, .75fr) minmax(170px, 1fr) 24px;
  align-items: center;
  gap: 16px;
  min-height: 74px;
  padding: 12px 8px;
  list-style: none;
  display: grid;
}

.challenge summary::-webkit-details-marker {
  display: none;
}

.challenge summary:hover {
  background: var(--surface);
}

.challenge[open] summary {
  box-shadow: inset 5px 0 0 var(--red);
  background: var(--surface-raised);
  color: var(--white);
}

.challenge .id {
  color: var(--mid-gray);
  font-size: 12px;
}

.challenge[open] .id {
  color: #aaa;
}

.challenge-name {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
}

.technique {
  color: var(--mid-gray);
  font-size: 13px;
}

.challenge[open] .technique {
  color: #bbb;
}

.answer {
  color: var(--red-dark);
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
}

.challenge[open] .answer {
  color: #ff626d;
}

.answer.missing {
  color: var(--mid-gray);
  font-family: inherit;
  font-style: italic;
  font-weight: 400;
}

.toggle {
  width: 14px;
  height: 14px;
  position: relative;
}

.toggle:before,
.toggle:after {
  content: "";
  background: var(--red);
  position: absolute;
}

.toggle:before {
  width: 14px;
  height: 2px;
  top: 6px;
  left: 0;
}

.toggle:after {
  width: 2px;
  height: 14px;
  transition: transform .15s;
  top: 0;
  left: 6px;
}

.challenge[open] .toggle:after {
  transform: rotate(90deg);
}

.solution {
  border-left: 5px solid var(--red);
  background: var(--surface);
  grid-template-columns: 150px minmax(0, 760px);
  gap: 34px;
  padding: 32px 38px 38px 72px;
  display: grid;
}

.solution-label {
  color: var(--red-dark);
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
}

.solution-body {
  min-width: 0;
}

.original-challenge {
  border-bottom: 1px solid #454545;
  padding-bottom: 30px;
}

.challenge-copy {
  color: #d7d7d7;
}

.challenge-copy > :first-child {
  margin-top: 0;
}

.challenge-copy > :last-child {
  margin-bottom: 0;
}

.challenge-copy p,
.challenge-copy ul,
.challenge-copy ol {
  margin-top: 0;
  margin-bottom: 14px;
}

.challenge-copy ul,
.challenge-copy ol {
  padding-left: 24px;
}

.challenge-copy pre {
  border: 1px solid #404040;
  background: #0a0a0a;
  max-width: 100%;
  padding: 14px;
  overflow-x: auto;
}

.challenge-copy code {
  overflow-wrap: anywhere;
}

.challenge-image {
  border: 1px solid #454545;
  background: #fff;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 760px;
  margin: 20px auto;
  object-fit: contain;
  display: block;
}

.challenge-source-note {
  border-left: 3px solid #666;
  color: var(--mid-gray);
  margin: 18px 0 0;
  padding: 8px 12px;
  font-size: 13px;
}

.resources.download-files {
  display: block;
}

.resources.download-files .challenge-downloads {
  width: 100%;
}

.resources.download-files .challenge-file {
  color: #fff;
  text-decoration: none;
}

.resources.download-files .challenge-file:hover {
  color: #fff;
}

.challenge-downloads {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  display: flex;
}

.challenge-file {
  border: 2px solid #c00000;
  background: #ab0000;
  width: min-content;
  min-height: 40px;
  min-width: 0;
  color: #fff;
  text-align: center;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 10px;
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  text-decoration: none;
  transition: background-color .15s ease-in-out, border-color .15s ease-in-out;
  display: inline-flex;
}

.challenge-file:hover {
  border-color: #c80202;
  background: #c80202;
}

.challenge-file:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.challenge-file-icon {
  color: #fff;
  flex: 0 0 auto;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  display: inline-block;
}

.challenge-file-name {
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  font-size: 12px;
  line-height: 20px;
  display: block;
}

.overview {
  margin: 0 0 20px;
  font-size: 17px;
  font-weight: 700;
}

.solution ol {
  margin: 0;
  padding-left: 22px;
}

.solution li {
  margin-bottom: 13px;
  padding-left: 6px;
}

.solution li::marker {
  color: var(--red-dark);
  font-weight: 700;
}

.note {
  border-left: 3px solid var(--red);
  background: var(--surface-raised);
  color: #d0d0d0;
  margin: 22px 0 0;
  padding: 12px 14px;
  font-size: 14px;
}

.resources {
  border-top: 1px solid #454545;
  flex-wrap: wrap;
  gap: 7px 20px;
  margin-top: 24px;
  padding-top: 16px;
  display: flex;
}

.resources > span {
  color: var(--mid-gray);
  text-transform: uppercase;
  flex-basis: 100%;
  font-size: 10px;
  font-weight: 700;
}

.resources a {
  color: var(--red-dark);
  text-underline-offset: 3px;
  font-size: 13px;
  font-weight: 700;
  text-decoration-thickness: 1px;
}

.resources a:hover {
  color: var(--white);
}

.empty-state {
  border: 1px dashed var(--mid-gray);
  text-align: center;
  color: var(--mid-gray);
  padding: 50px 20px;
}

.about-head {
  border-bottom: 8px solid var(--line);
  padding: 70px 0 45px;
}

.about-copy {
  max-width: 760px;
  padding: 48px 0 70px;
}

.about-copy h2 {
  margin: 34px 0 8px;
  font-size: 24px;
}

.about-copy h2:first-child {
  margin-top: 0;
}

.about-copy p {
  color: #cecece;
  margin: 0;
  font-size: 18px;
}

footer {
  border-top: 5px solid var(--red);
  color: #aaa;
  background: #050505;
  justify-content: space-between;
  gap: 30px;
  padding: 28px max(20px, 50vw - 690px);
  font-size: 13px;
  display: flex;
}

footer p {
  margin: 0;
}

.sr-only {
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  position: absolute !important;
}

@media (width <= 1040px) {
  .masthead {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .archive-summary {
    max-width: 650px;
  }

  .toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .status-tabs {
    grid-column: 1 / -1;
    min-height: 44px;
  }

  .guide-layout {
    grid-template-columns: 1fr;
  }

  aside {
    display: none;
  }

  .challenge summary {
    grid-template-columns: 45px minmax(180px, 1.2fr) minmax(120px, .7fr) minmax(150px, 1fr) 20px;
  }
}

@media (width <= 700px) {
  .site-header nav,
  main {
    width: calc(100% - 28px);
  }

  .site-header nav {
    min-height: 56px;
  }

  .brand > span:last-child {
    font-size: 14px;
  }

  .nav-links {
    gap: 14px;
    font-size: 13px;
  }

  .masthead {
    border-bottom-width: 5px;
    min-height: 0;
    padding: 38px 0 30px;
  }

  .about-head {
    border-bottom-width: 5px;
    padding: 44px 0 30px;
  }

  h1 {
    font-size: 48px;
  }

  .archive-summary {
    padding-left: 16px;
  }

  .archive-summary > p {
    font-size: 17px;
  }

  .archive-summary dd {
    font-size: 25px;
  }

  .toolbar {
    grid-template-columns: 1fr;
    padding: 12px 0;
    position: relative;
    top: auto;
  }

  .status-tabs {
    grid-column: auto;
    min-height: 44px;
  }

  .guide-layout {
    padding-top: 20px;
  }

  .operation {
    margin-bottom: 42px;
    scroll-margin-top: 75px;
  }

  .operation-title {
    align-items: start;
  }

  .operation-title div {
    display: block;
  }

  .operation-title h2 {
    margin-top: 3px;
    font-size: 22px;
  }

  .challenge summary {
    grid-template-columns: 36px minmax(0, 1fr) 18px;
    gap: 9px;
    min-height: 94px;
    padding: 12px 4px;
  }

  .challenge-name {
    font-size: 16px;
  }

  .challenge .technique,
  .challenge .answer {
    grid-column: 2;
    font-size: 12px;
  }

  .toggle {
    grid-area: 1 / 3 / span 3;
  }

  .solution {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 24px 18px 28px 22px;
  }

  .overview {
    font-size: 16px;
  }

  .challenge-file {
    width: 100%;
  }

  footer {
    padding: 24px 14px;
    display: block;
  }

  footer p + p {
    margin-top: 10px;
  }
}