/* The public subject URL is the study workspace, including individual guides. */
.study-page .content-header { gap: 1.25rem; }
.study-page .content-brand { gap: .9rem; font-size: 1.05rem; letter-spacing: .01em; }
.study-page .content-brand img { width: 46px; height: 46px; filter: none; }
.study-page .content-brand small { display: block; margin-top: .3rem; font-size: .84rem; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.study-page .content-header nav { margin-left: auto; }
.study-account { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .35rem .65rem; border: 1px solid var(--line); border-radius: 12px; font-size: .95rem; text-decoration: none; }
.study-account svg { width: 28px; height: 28px; padding: 5px; border-radius: 50%; background: var(--surface-soft); }
.study-page .content-main { padding-block: 1.5rem 3rem; }
.study-page .content-breadcrumbs ol { flex-wrap: wrap; width: auto; }
.study-page .content-breadcrumbs li { white-space: normal; max-width: 100%; }
.study-page .content-breadcrumbs [aria-current] { white-space: normal; max-width: none; overflow: visible; }
.study-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 2rem; }
.study-heading .content-eyebrow { font-size: .7rem; margin: 0 0 .65rem; }
.study-heading h1, .study-subject-title { margin: 0; font-family: var(--display); font-size: clamp(1.8rem, 3.6vw, 2.65rem); font-weight: 600; line-height: 1.15; letter-spacing: -.03em; }
.study-switcher { position: relative; flex: none; font-size: .9rem; }
.study-switcher > summary { cursor: pointer; padding: .6rem .8rem; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; }
.study-switcher nav { position: absolute; right: 0; top: calc(100% + .5rem); z-index: 25; min-width: 270px; padding: .5rem; border: 1px solid var(--line); border-radius: 12px; background: var(--page); box-shadow: 0 8px 24px #00000014; }
.study-switcher a { display: block; padding: .6rem .8rem; text-decoration: none; border-radius: 6px; }
.study-switcher a:hover, .study-switcher a[aria-current] { background: var(--surface-soft); color: var(--primary); }
.study-workspace { display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.study-browser { position: sticky; top: 96px; max-height: calc(100vh - 112px); overflow-y: auto; padding: 0 1.25rem 1rem 0; border-right: 1px solid var(--line); scrollbar-width: thin; }
.study-search { position: sticky; top: 0; background: var(--page); padding-bottom: 1rem; z-index: 1; }
.study-search label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .5rem; }
.study-search > div { display: flex; border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; }
.study-search input { width: 100%; min-width: 0; padding: .7rem .65rem; min-height: 44px; background: var(--page); color: var(--text); border: 0; font: inherit; font-size: .82rem; }
.study-search button { border: 0; border-left: 1px solid var(--line); padding: 0 .6rem; background: var(--surface-soft); color: var(--text); font: inherit; font-size: .8rem; cursor: pointer; }
.study-search-result { font-size: .85rem; color: var(--muted); }
.study-part { font-size: .85rem; font-weight: 600; line-height: 1.4; margin: 1.5rem 0 .65rem; color: var(--muted); }
.study-chapter { border-bottom: 1px solid var(--line); }
.study-chapter > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .85rem .25rem; font-size: .92rem; font-weight: 600; line-height: 1.4; }
.study-chapter > summary::-webkit-details-marker, .study-reading > summary::-webkit-details-marker { display: none; }
.study-chapter > summary::after, .study-reading > summary::after { content: '+'; color: var(--primary); flex: none; }
.study-chapter[open] > summary::after, .study-reading[open] > summary::after { content: '−'; }
.study-chapter ul { list-style: none; padding: 0 0 .6rem; margin: 0; }
.study-chapter a { display: flex; justify-content: space-between; align-items: center; gap: .7rem; padding: .65rem .6rem; min-height: 44px; font-size: .88rem; line-height: 1.4; border-radius: 8px; text-decoration: none; color: var(--muted); }
.study-chapter a span { flex: none; }
.study-chapter a:hover { background: var(--surface-soft); color: var(--text); }
.study-chapter a[aria-current] { background: var(--surface-soft); color: var(--primary); font-weight: 600; }
.study-detail { min-width: 0; }
.study-back { display: inline-block; color: var(--primary); font-size: .85rem; margin-bottom: 1rem; text-decoration: none; }
.study-chapter-trail { color: var(--muted); font-size: .8rem; margin: 0 0 .65rem; line-height: 1.5; }
#topic-title { font-family: var(--display); font-size: clamp(1.65rem, 2.8vw, 2.25rem); font-weight: 600; line-height: 1.18; margin: 0; letter-spacing: -.025em; }
.study-detail .content-button { margin-top: 1.35rem; min-height: 46px; }
.study-detail section > h2 { font-size: .9rem; font-family: inherit; font-weight: 600; color: var(--muted); margin: 2rem 0 .6rem; line-height: 1.45; }
.study-concepts { list-style: none; counter-reset: concepts; margin: 0; padding: 0; }
.study-concepts li { counter-increment: concepts; display: grid; grid-template-columns: 1.5rem minmax(0, 1fr); gap: .7rem; padding: .9rem 0; line-height: 1.6; }
.study-concepts li::before { content: counter(concepts, decimal-leading-zero); font: .72rem 'Space Mono', monospace; color: var(--primary); padding-top: .3rem; }
.study-reading { border-bottom: 1px solid var(--line); margin-top: 1rem; }
.study-reading > summary { display: flex; justify-content: space-between; padding: .8rem 0; cursor: pointer; list-style: none; font-size: .92rem; font-weight: 600; }
.study-reference { overflow-wrap: anywhere; }
.study-reference h3 { font-size: .95rem; font-weight: 600; margin: 1rem 0 .5rem; }
.study-reference ul { padding-left: 1.1rem; color: var(--muted); font-size: .85rem; }
.study-questions { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; padding: .5rem 0 1rem; }
.study-questions a { font-size: .9rem; color: var(--primary); min-height: 36px; }
.study-related .study-topic-list li { padding: .7rem 0; }
.study-topic-list a { font-size: .95rem; font-weight: 500; text-decoration: none; }
.study-topic-list a:hover { color: var(--primary); text-decoration: underline; }
.study-page :is(input, button, summary):focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
@media (max-width: 999px) {
  .study-page .content-header .primary-nav { display: flex; }
  .study-account { margin-left: auto; }
}
@media (max-width: 760px) {
  .study-workspace { display: block; }
  .study-browser { position: static; max-height: none; overflow: visible; border: 0; padding: 0; }
  .study-workspace:not(.has-topic) .study-detail { display: none; }
  .study-workspace.has-topic .study-browser { display: none; }
  .study-heading { align-items: flex-start; flex-direction: column; gap: .85rem; margin-bottom: 1.5rem; }
  .study-switcher nav { left: 0; right: auto; }
  .study-heading h1, .study-subject-title { font-size: 1.75rem; }
  .study-detail .content-button { display: flex; }
  .study-page .content-main { padding-top: .75rem; }
  .study-chapter a { font-size: .95rem; }
  .study-page .content-header { flex-direction: row; min-height: 80px; }
  .study-page .content-brand { font-size: .92rem; gap: .6rem; }
  .study-page .content-brand small { font-size: .7rem; }
  .study-page .content-brand img { width: 40px; height: 40px; }
  .study-account span { display: none; }
  .study-account { padding: .35rem; }
}

.study-practice-error { padding: .75rem 0 0; color: var(--text); font-size: .9rem; }
.study-workspace:not(.has-topic) .study-back { display: none; }

.study-question-links { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; width: 100%; }
.study-question-links > :first-child { font-weight: 600; }

/* Curriculum references can contain long titles and section locators. */
.curriculum-detail { overflow-wrap: anywhere; min-width: 0; }
.curriculum-readings { padding-left: 1.25rem; }
.curriculum-readings > li { margin-bottom: 1rem; }
.curriculum-readings p { margin: .35rem 0; }
.curriculum-mobile-search { display: none; }
@media (max-width: 760px) { .curriculum-mobile-search { display: block; } }
.curriculum-detail .study-search button { flex: none; white-space: nowrap; }
.curriculum-subjects .study-topic-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; }
@media (max-width: 760px) { .curriculum-subjects .study-topic-list { grid-template-columns: 1fr; } }
