:root {
  color-scheme: light;
  --paper: #f6f5f0;
  --white: #fffefa;
  --ink: #1d2522;
  --muted: #545d57;
  --rule: #cecfc5;
  --green: #222c26;
  --gold: #ffd35d;
  --gold-light: #fff0c1;
  --focus: #155649;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

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

body {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
}

h1, h2, p {
  margin: 0;
}

a {
  color: inherit;
  text-underline-offset: .24em;
}

a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.layout {
  width: min(100% - 3rem, 74rem);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  inset: .5rem auto auto .5rem;
  z-index: 1;
  padding: .7rem 1rem;
  background: var(--gold);
  transform: translateY(calc(-100% - 1rem));
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  border-bottom: 1px solid var(--rule);
}

.header-inner, .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.header-inner {
  min-height: 4.65rem;
}

.brand {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  gap: .65rem;
  font-weight: 750;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  flex: 0 0 2rem;
  height: 2rem;
  overflow: hidden;
  border-radius: .26rem;
  background: var(--green);
}

.brand-mark::before {
  position: absolute;
  inset: -.2rem .54rem;
  border-inline: 2px solid var(--gold);
  content: "";
  transform: skewX(-26deg);
}

.brand-mark::after {
  position: absolute;
  inset: -.2rem auto -.2rem calc(50% - 1px);
  border-left: 2px dashed var(--gold);
  content: "";
  transform: skewX(-26deg);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(.85rem, 3vw, 2.25rem);
}

.site-nav a {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  font-weight: 620;
  text-decoration: none;
}

.site-nav a:hover {
  text-decoration: underline;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(0, 1fr);
  min-height: clamp(27rem, 44vw, 33rem);
  margin-top: 1.65rem;
  overflow: hidden;
  border-radius: .5rem;
  background: var(--green);
  color: var(--white);
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(2rem, 4.55vw, 4.25rem);
}

.hero-topic {
  margin-bottom: 1.3rem;
  color: var(--gold);
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.hero-topic span {
  padding-inline: .3em;
}

.hero h1 {
  font-size: clamp(3rem, 6.05vw, 6rem);
  font-weight: 800;
  line-height: .96;
  letter-spacing: -.045em;
}

.hero h1 span {
  color: var(--gold);
}

.hero-description {
  max-width: 39ch;
  margin-block: 1.35rem 1.55rem;
  color: #e3e5dd;
  font-size: clamp(1rem, 1.4vw, 1.125rem);
}

.hero-photo {
  position: relative;
  min-width: 0;
  background: #51594d;
}

.hero-photo img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 52% center;
}

.button {
  display: inline-flex;
  min-height: 3.125rem;
  align-items: center;
  gap: .85rem;
  padding: .6rem 1rem;
  border-radius: .25rem;
  background: var(--gold);
  color: var(--ink);
  font-weight: 750;
  text-decoration: none;
}

.button:hover {
  background: #ffe193;
}

.button:focus-visible {
  outline-color: var(--gold);
}

.arrow {
  position: relative;
  display: inline-block;
  flex: 0 0 .92rem;
  width: .92rem;
  height: .92rem;
}

.arrow::before, .arrow::after {
  position: absolute;
  content: "";
}

.arrow::before {
  inset: calc(50% - 1px) .12rem auto .04rem;
  border-top: 2px solid currentColor;
}

.arrow::after {
  top: 50%;
  right: .12rem;
  width: .44rem;
  height: .44rem;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
}

.arrow-down {
  rotate: 90deg;
}

.arrow-up {
  rotate: -90deg;
}

.sets-section {
  padding-top: clamp(2.5rem, 6vw, 4.4rem);
}

.section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem 1rem;
  margin-bottom: 1.15rem;
}

h2 {
  font-size: clamp(1.7rem, 3.7vw, 2.8rem);
  font-weight: 780;
  line-height: 1.1;
  letter-spacing: -.04em;
}

.section-heading p, .material-card p {
  color: var(--muted);
}

.set-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 1px;
  list-style: none;
  border-radius: .33rem;
  background: var(--rule);
}

.set-grid li {
  min-width: 0;
}

.set-grid a {
  position: relative;
  display: flex;
  min-height: 4.35rem;
  height: 100%;
  align-items: baseline;
  gap: .4rem;
  padding: .65rem clamp(.75rem, 1.7vw, 1.3rem);
  background: var(--white);
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}

.set-grid a:hover {
  background: var(--gold-light);
  color: var(--ink);
}

.set-grid a:focus-visible {
  z-index: 1;
  outline-offset: -3px;
}

.set-grid strong {
  color: var(--ink);
  font-size: 1.8rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.055em;
}

.set-grid .arrow {
  align-self: center;
  margin-left: auto;
  color: var(--focus);
}

.materials-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-block: clamp(2.3rem, 5vw, 3.75rem);
}

.material-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(1.3rem, 3vw, 2.2rem);
  scroll-margin-top: 1rem;
  border: 1px solid var(--rule);
  border-radius: .45rem;
  background: var(--white);
}

.material-card h2 {
  font-size: clamp(1.65rem, 3.2vw, 2.45rem);
}

.material-card p {
  margin: .65rem 0 .9rem;
}

.flashcard-panel {
  border-color: #e3d095;
  background: var(--gold-light);
}

.text-link {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  gap: .55rem;
  margin-top: auto;
  color: var(--focus);
  font-weight: 750;
}

.text-link:hover {
  text-decoration-thickness: 2px;
}

.site-footer {
  border-top: 1px solid var(--rule);
}

.footer-inner {
  min-height: 4.65rem;
  color: var(--muted);
}

.footer-inner p {
  font-weight: 650;
}

.footer-inner .text-link {
  margin-top: 0;
}

@media (max-width: 57rem) {
  .set-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 46rem) {
  .layout {
    width: calc(100% - 2rem);
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 1rem;
  }

  .hero-content {
    padding: clamp(1.5rem, 5vw, 2.5rem);
  }

  .hero h1 {
    font-size: clamp(2.8rem, 11vw, 4.9rem);
  }

  .hero-photo {
    min-height: clamp(13rem, 48vw, 19rem);
  }
}

@media (max-width: 34rem) {
  .header-inner {
    flex-wrap: wrap;
    gap: 0 1.5rem;
    padding-top: .35rem;
  }

  .site-nav {
    gap: 1rem;
  }

  .set-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .set-grid li:last-child {
    grid-column: span 2;
  }

  .materials-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: .8rem;
  }

  .footer-inner {
    gap: .65rem;
  }
}
