.subjects-section .section-lead {
  margin-bottom: 24px;
}

.subjects-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  align-items: start;
  gap: 32px;
}

.subjects-navigation {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) 116px;
  overflow: hidden;
  border: 1px solid var(--line, #d8ddd2);
  border-radius: 3px;
  background: var(--white, #fffefa);
}

.subject-tabs,
.subject-direct-links {
  display: grid;
  min-width: 0;
  grid-template-rows: repeat(7, 84px);
  align-content: start;
  gap: 0;
}

.subject-tabs {
  grid-column: 1;
}

.subject-direct-links {
  grid-column: 2;
  border-left: 1px solid var(--line, #d8ddd2);
}

.subject-tab {
  display: flex;
  width: 100%;
  min-width: 0;
  height: 84px;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  margin: 0;
  padding: 14px 20px;
  border: 0;
  border-bottom: 1px solid var(--line, #d8ddd2);
  border-radius: 0;
  background: transparent;
  color: var(--green, #183d34);
  cursor: pointer;
  font: 500 15px/1.35 var(--sans, "Segoe UI", Arial, sans-serif);
  text-align: left;
  transition: background-color .16s ease, color .16s ease;
}

.subject-tab:last-child,
.subject-direct-link:last-child {
  border-bottom: 0;
}

.subject-tab > svg,
.subject-tab .subject-tab-icon {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  place-items: center;
  color: #65816c;
}

.subject-tab .subject-tab-icon svg {
  width: 25px;
  height: 25px;
}

.subject-tab-title {
  display: block;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.subject-tab:hover {
  background: #edf0e7;
}

.subject-tab[aria-selected="true"] {
  border-bottom-color: var(--green, #183d34);
  background: var(--green, #183d34);
  color: var(--paper, #f6f5ee);
}

.subject-tab[aria-selected="true"] > svg,
.subject-tab[aria-selected="true"] .subject-tab-icon {
  color: #d0ddc5;
}

.subject-direct-link {
  display: flex;
  min-width: 0;
  min-height: 44px;
  height: 84px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line, #d8ddd2);
  background: #f9f9f2;
  color: #3d604a;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  transition: background-color .16s ease, color .16s ease;
}

.subject-direct-link:hover {
  background: #e8ede1;
  color: var(--green, #183d34);
}

.subject-direct-link svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
}

.subject-direct-link > span[aria-hidden] {
  font-size: 17px;
  font-weight: 400;
}

.subject-tab:focus-visible,
.subject-direct-link:focus-visible {
  position: relative;
  z-index: 1;
  outline: 3px solid var(--red, #ba4d3d);
  outline-offset: -4px;
}

.subject-panel {
  min-width: 0;
  align-self: start;
  padding: 36px;
  border: 1px solid #cdd8c7;
  border-radius: 3px;
  background: #e8eddf;
}

.subject-panel-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 24px;
  color: #647760;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 1.35px;
  text-transform: uppercase;
}

.subject-panel-eyebrow::before {
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  background: var(--red, #ba4d3d);
  content: "";
}

.subject-panel h3 {
  max-width: 390px;
  margin: 0 0 20px;
  color: var(--green, #183d34);
  font: 400 32px/1.17 var(--serif, Georgia, "Times New Roman", serif);
  letter-spacing: -.65px;
  overflow-wrap: anywhere;
}

.subject-panel #subject-description {
  max-width: 390px;
  margin: 0 0 28px;
  color: #586c58;
  font-size: 16px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.subject-panel .button {
  max-width: 100%;
  min-height: 48px;
  padding-inline: 18px;
  font-size: 13px;
  white-space: normal;
}

.subject-panel .button:focus-visible,
.subject-fallback a:focus-visible {
  outline: 3px solid var(--red, #ba4d3d);
  outline-offset: 5px;
}

.subject-all-descriptions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.subject-fallback {
  min-width: 0;
  padding: 25px;
  border: 1px solid var(--line, #d8ddd2);
  border-radius: 3px;
  background: var(--white, #fffefa);
}

.subject-fallback h3 {
  margin: 0 0 12px;
  font: 400 25px/1.2 var(--serif, Georgia, "Times New Roman", serif);
  letter-spacing: -.4px;
}

.subject-fallback p {
  margin: 0 0 18px;
  color: var(--muted, #65716c);
  font-size: 14px;
  line-height: 1.7;
}

.subject-fallback a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  color: var(--green, #183d34);
  font-size: 13px;
  font-weight: 600;
  text-underline-offset: 4px;
}

.subject-all-descriptions[hidden],
.subject-fallback[hidden],
.subject-panel[hidden],
.subjects-layout[hidden] {
  display: none !important;
}

@media (max-width: 1000px) {
  .subjects-layout {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    gap: 24px;
  }

  .subjects-navigation {
    grid-template-columns: minmax(0, 1fr) 100px;
  }

  .subject-tab {
    gap: 11px;
    padding-inline: 15px;
    font-size: 14px;
  }

  .subject-tab > svg,
  .subject-tab .subject-tab-icon,
  .subject-tab .subject-tab-icon svg {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
  }

  .subject-panel {
    padding: 28px;
  }

  .subject-panel h3 {
    font-size: 30px;
  }

  .subject-panel .button {
    font-size: 12px;
  }
}

@media (min-width: 641px) and (max-width: 780px) {
  .subjects-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .subject-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 28px;
    align-items: start;
  }

  .subject-panel-eyebrow,
  .subject-panel h3 {
    grid-column: 1 / -1;
  }

  .subject-panel #subject-description {
    margin-bottom: 0;
  }

  .subject-panel .button {
    align-self: end;
  }
}

@media (max-width: 640px) {
  .subjects-layout {
    grid-template-columns: minmax(0, 1fr) 80px;
    grid-auto-rows: minmax(80px, auto);
    gap: 0;
  }

  .subjects-navigation,
  .subject-tabs,
  .subject-direct-links {
    display: contents;
  }

  .subject-tab {
    grid-column: 1;
    grid-row: var(--subject-row, auto);
    min-height: 80px;
    height: 100%;
    gap: 0;
    padding: 10px 12px;
    border-left: 1px solid var(--line, #d8ddd2);
    font-size: 14px;
    line-height: 1.35;
  }

  .subject-tab > svg,
  .subject-tab .subject-tab-icon {
    display: none;
  }

  .subject-direct-link {
    grid-column: 2;
    grid-row: var(--subject-row, auto);
    min-height: 80px;
    height: 100%;
    gap: 5px;
    padding: 10px 7px;
    border-right: 1px solid var(--line, #d8ddd2);
    border-left: 1px solid var(--line, #d8ddd2);
    font-size: 11px;
  }

  .subject-tab:first-child,
  .subject-direct-link:first-child {
    border-top: 1px solid var(--line, #d8ddd2);
  }

  .subject-tab:last-child,
  .subject-direct-link:last-child {
    border-bottom: 1px solid var(--line, #d8ddd2);
  }

  .subject-direct-link svg {
    width: 13px;
    height: 13px;
    flex-basis: 13px;
  }

  .subject-direct-link > span[aria-hidden] {
    font-size: 15px;
  }

  .subject-panel {
    grid-column: 1 / -1;
    grid-row: var(--panel-row, auto);
    margin: 0;
    padding: 22px;
    border-radius: 0;
  }

  .subject-panel-eyebrow {
    margin-bottom: 14px;
    font-size: 9px;
    letter-spacing: 1.1px;
  }

  .subject-panel h3 {
    margin-bottom: 14px;
    font-size: 26px;
  }

  .subject-panel #subject-description {
    margin-bottom: 18px;
    font-size: 15px;
  }

  .subject-panel .button {
    font-size: 12px;
  }

  .subject-all-descriptions {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .subject-fallback {
    padding: 22px;
  }
}

@media (max-width: 360px) {
  .subject-tab {
    padding-inline: 10px;
    font-size: 13px;
  }

  .subject-panel {
    padding-inline: 20px;
  }

  .subject-panel .button {
    width: 100%;
    padding-inline: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .subject-tab,
  .subject-direct-link {
    transition: none;
  }
}
