.kh-page {
  background: #faf8f3;
  color: #1b2922;
}

.kh-main {
  --kh-ink: #1b2922;
  --kh-green: #2b4538;
  --kh-muted: #506057;
  --kh-line: #d9ded5;
  --kh-gold: #f0c488;
  --kh-serif: Georgia, "Times New Roman", serif;
}

.kh-shell {
  width: min(calc(100% - 3rem), 76rem);
  margin-inline: auto;
}

.kh-main h1,
.kh-main h2,
.kh-main h3,
.kh-main p,
.kh-main figure {
  margin: 0;
}

.kh-main h2 {
  font: 600 clamp(2rem, 3.7vw, 3.4rem)/1.07 var(--kh-serif);
  letter-spacing: -.035em;
  text-wrap: balance;
}

.kh-main h3 {
  font-size: 1.16rem;
  line-height: 1.3;
}

.kh-main :is(a, button, select):focus-visible {
  outline: 2px solid #8d5525;
  outline-offset: 4px;
}

.kh-main section[id] {
  scroll-margin-top: 9rem;
}

.kh-hero {
  padding-block: clamp(2.5rem, 4vw, 4.25rem);
  color: #f9f5ec;
  background: #151d19;
}

.kh-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  align-items: center;
  gap: clamp(2rem, 4.5vw, 4.5rem);
}

.kh-hero-copy {
  padding-block: .6rem;
}

.kh-attribution {
  color: #e4bb88;
  font-size: .91rem;
  font-weight: 650;
  letter-spacing: .075em;
}

.kh-hero h1 {
  margin-block: .35rem .2rem;
  font: 600 clamp(3.45rem, 7.45vw, 7.15rem)/.96 var(--kh-serif);
  letter-spacing: -.065em;
}

.kh-subtitle {
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  font-weight: 650;
  line-height: 1.18;
  letter-spacing: -.035em;
}

.kh-hero p.kh-lead {
  max-width: 42ch;
  margin-top: 1.3rem;
  color: #e0e4d9;
  font-size: clamp(1rem, 1.45vw, 1.18rem);
}

.kh-actions {
  display: flex;
  margin-top: 1.8rem;
}

.kh-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: .65rem 1.15rem;
  border: 1px solid transparent;
  border-radius: .4rem;
  font-family: inherit;
  font-size: .97rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.kh-button-gold {
  background: var(--kh-gold);
  color: #25190d;
}

.kh-button-gold:hover {
  background: #ffdaaa;
}

.kh-hero :is(a, button):focus-visible {
  outline-color: var(--kh-gold);
}

.kh-photo {
  position: relative;
  overflow: hidden;
  border: 1px solid #ffffff28;
  border-radius: .75rem;
  background: #354237;
}

.kh-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 1.32;
  object-fit: cover;
  object-position: 55% 50%;
}

.kh-photo figcaption {
  position: absolute;
  right: .75rem;
  bottom: .75rem;
  padding: .2rem .45rem;
  border-radius: .2rem;
  background: #111a16d9;
  color: #f9f5ec;
  font-size: .8125rem;
}

.kh-work {
  padding-block: clamp(2.75rem, 5vw, 4.5rem);
}

.kh-tasks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.65rem 0 0;
  padding: 0;
  list-style: none;
}

.kh-task {
  display: block;
  height: 100%;
  padding: 1.2rem;
  border: 1px solid var(--kh-line);
  border-top: 3px solid #728a77;
  border-radius: .45rem;
  background: #fff;
}

.kh-task:hover {
  border-color: #728a77;
  background: #f0f4ed;
}

.kh-task p,
.kh-directory-copy p {
  margin-top: .65rem;
  color: var(--kh-muted);
}

.kh-directory {
  padding-block: clamp(2.75rem, 5vw, 4.5rem);
  border-block: 1px solid var(--kh-line);
  background: #edf1e9;
}

.kh-directory-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr);
  gap: clamp(1.5rem, 4vw, 3.8rem);
}

.kh-directory-copy p {
  max-width: 40ch;
  margin-top: 1rem;
}

.kh-directory-panel {
  min-width: 0;
  padding: clamp(1rem, 3vw, 1.7rem);
  border: 1px solid var(--kh-line);
  border-radius: .65rem;
  background: #fff;
}

.kh-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: .75rem;
}

.kh-search label {
  display: block;
  margin-bottom: .35rem;
  font-size: .93rem;
  font-weight: 700;
}

.kh-search select {
  width: 100%;
  min-height: 3rem;
  padding: .55rem 2rem .55rem .75rem;
  border: 1px solid #859587;
  border-radius: .35rem;
  appearance: none;
  background: linear-gradient(45deg, transparent 50%, #476052 50%) right 1.05rem center/5px 5px no-repeat,
              linear-gradient(135deg, #476052 50%, transparent 50%) right .75rem center/5px 5px no-repeat #fff;
  color: var(--kh-ink);
  font: inherit;
  cursor: pointer;
}

.kh-button-dark {
  background: var(--kh-green);
  color: #fff;
}

.kh-button-dark:hover {
  background: #20372b;
}

.kh-button-secondary {
  border-color: #859587;
  color: var(--kh-green);
}

.kh-button-secondary:hover {
  background: #edf1e9;
}

.kh-reset {
  display: inline-block;
  margin-top: .65rem;
  color: var(--kh-green);
  font-size: .93rem;
  text-decoration: underline;
  text-underline-offset: .2em;
}

.kh-directory-panel .kh-selection {
  margin-top: 1rem;
  font-size: .93rem;
  font-weight: 650;
}

.kh-empty,
.kh-profile {
  margin-top: 1.1rem;
  padding: 1rem;
  border-radius: .35rem;
  background: #f3f5f0;
}

.kh-empty p,
.kh-profile p {
  margin-top: .35rem;
  color: var(--kh-muted);
}

.kh-profile dl {
  display: grid;
  gap: .6rem;
  margin-block: 1rem;
}

.kh-profile dt {
  font-weight: 700;
}

.kh-profile dd {
  margin: 0;
}

@media (max-width: 900px) {
  .kh-tasks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .kh-directory-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .kh-shell {
    width: calc(100% - 2rem);
  }
  .kh-hero-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .kh-hero h1 {
    font-size: clamp(2.65rem, 14.2vw, 6rem);
  }
  .kh-photo img {
    aspect-ratio: 1.5;
  }
}

@media (max-width: 510px) {
  .kh-tasks,
  .kh-search {
    grid-template-columns: 1fr;
  }
  .kh-tasks {
    gap: .65rem;
  }
  .kh-tasks .kh-task {
    padding: .95rem;
  }
  .kh-actions > a {
    flex: 1 1 100%;
  }
}

@media (max-width: 425px) {
  .kh-main section[id] {
    scroll-margin-top: 14rem;
  }
}
