.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-block: 24px;
}
.resource-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  overflow-wrap: anywhere;
  transition: border-color 0.2s;
}
.resource-card:hover {
  border-color: var(--green);
}
.resource-card > span {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}
.resource-card small {
  font-size: 13px;
  color: var(--muted);
}
.learning-resources {
  padding-block: 64px;
  border-top: 1px solid var(--line);
}
.learning-resources h2 {
  font-size: clamp(28px, 4vw, 42px);
  margin-block: 12px 20px;
}
.learning-resources > p:not(.eyebrow) {
  color: var(--muted);
  max-width: 720px;
}
.learning-page {
  font-size: 16px;
}
.learning-page .site-header nav {
  display: flex;
  font-size: 14px;
}
.learning-page .resource-languages {
  gap: 16px;
}
.resource-languages [aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 5px;
}
#resource-theme {
  border: 0;
  background: transparent;
  font-size: 24px;
  padding: 8px;
}
.learning-main {
  max-width: 1000px;
  padding-bottom: 64px;
}
.breadcrumbs {
  padding-block: 28px;
  font-size: 13px;
  color: var(--muted);
}
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.breadcrumbs li + li::before {
  content: "/";
  margin-right: 12px;
  color: var(--muted);
}
.learning-main a:not(.button):not(.resource-card) {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.resource-intro {
  padding-block: 28px 48px;
  border-bottom: 1px solid var(--line);
}
.resource-intro h1 {
  font-size: clamp(32px, 4.7vw, 54px);
  letter-spacing: -1.5px;
  line-height: 1.17;
  max-width: 850px;
  margin: 16px 0 24px;
  overflow-wrap: break-word;
  hyphens: auto;
}
.resource-intro > p:not(.eyebrow) {
  max-width: 780px;
  line-height: 1.8;
  color: var(--muted);
}
.resource-intro .language-reminder {
  margin-top: 12px;
  font-size: 14px;
}
.resource-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 28px;
  font-size: 14px;
}
.learning-main > section,
.learning-main > aside {
  margin-top: 48px;
}
.learning-main h2 {
  font-size: clamp(23px, 3vw, 30px);
  line-height: 1.35;
  margin-bottom: 16px;
}
.learning-main p {
  line-height: 1.8;
}
.learning-main > section > p {
  color: var(--muted);
}
.study-vocabulary dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.study-vocabulary dl > div {
  background: var(--soft);
  padding: 20px;
  border-radius: 12px;
}
.study-vocabulary dt {
  font-weight: 600;
}
.study-vocabulary dd {
  color: var(--muted);
  margin: 8px 0 0;
}
.study-question {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px;
  margin-block: 24px;
  background: var(--card);
  scroll-margin-top: 24px;
  overflow-wrap: anywhere;
}
.study-question .eyebrow {
  margin-bottom: 12px;
}
.study-question h2 {
  font-family: "DM Sans", sans-serif;
  font-size: clamp(20px, 2.6vw, 26px);
  font-weight: 600;
  margin-bottom: 12px;
}
.study-question .question-translation {
  color: var(--muted);
  margin-bottom: 24px;
}
.study-question figure {
  margin: 24px 0;
}
.study-question img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
  border-radius: 8px;
  background: white;
}
.study-question figcaption {
  color: var(--muted);
  margin-top: 8px;
  font-size: 13px;
}
.study-answers {
  padding-left: 28px;
  margin-block: 24px;
}
.study-answers li {
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
}
.study-answers li::marker {
  color: var(--muted);
  font-weight: 600;
}
.study-answers small,
.question-group small {
  display: block;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin-top: 4px;
}
.study-solution {
  background: var(--soft);
  border-radius: 10px;
}
.study-solution summary,
.question-group summary {
  cursor: pointer;
  font-weight: 600;
  padding: 18px;
}
.study-solution > div {
  padding: 0 20px 20px;
}
.study-solution .answer-explanation {
  margin-block: 16px;
}
.correct-answer {
  color: var(--deep);
}
.study-solution a,
.editorial-note a {
  font-size: 14px;
}
.question-jumps {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
  font-size: 14px;
}
.question-jumps a {
  padding: 8px 12px;
  background: var(--soft);
  border-radius: 6px;
}
.question-group {
  border-bottom: 1px solid var(--line);
}
.question-group summary {
  padding-inline: 0;
}
.question-group summary span {
  color: var(--muted);
  font-weight: 400;
}
.question-group ol {
  list-style: none;
  margin: 0;
  padding: 0 0 16px;
}
.question-group li a {
  display: block;
  padding: 12px 0;
  line-height: 1.6;
}
.question-number {
  color: var(--muted);
}
.catalogue-search {
  margin-block: 24px;
}
.catalogue-search label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}
.catalogue-search input {
  font: inherit;
  width: 100%;
  padding: 14px 16px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
}
#search-count {
  font-size: 14px;
  color: var(--muted);
  min-height: 26px;
  margin-top: 8px;
}
.practice-callout {
  padding: 32px;
  border-radius: 16px;
  background: var(--soft);
}
.practice-callout .button {
  margin-top: 20px;
}
.practice-callout small {
  display: block;
  color: var(--muted);
  margin-top: 12px;
}
.editorial-note > p + p {
  margin-top: 16px;
}
.learning-page .question-sources h2 {
  font-family: "DM Sans", sans-serif;
  font-size: 20px;
  font-weight: 600;
}
.learning-page .question-sources {
  font-size: 14px;
}
.learning-page .site-footer {
  padding-block: 32px;
  font-size: 14px;
}
summary:focus-visible,
input:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 900px) {
  .resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .resource-grid,
  .study-vocabulary dl {
    grid-template-columns: 1fr;
  }
  .resource-card {
    padding: 20px;
  }
  .learning-page .site-header {
    flex-wrap: wrap;
    gap: 16px;
  }
  .learning-page .site-header > nav {
    order: 3;
    width: 100%;
  }
  .learning-page .resource-languages {
    gap: 16px;
  }
  .resource-intro {
    padding-block: 16px 32px;
  }
  .learning-resources {
    padding-block: 40px;
  }
  .learning-main > section,
  .learning-main > aside {
    margin-top: 32px;
  }
  .study-question,
  .practice-callout {
    padding: 20px;
  }
  .study-solution summary {
    padding: 14px;
  }
  .study-solution > div {
    padding: 0 14px 16px;
  }
  .study-question .eyebrow {
    font-size: 9px;
  }
  .question-jumps {
    gap: 8px;
  }
  .resource-intro h1 {
    font-size: 34px;
    letter-spacing: -1px;
  }
}
