/* DABLEW's study catalogue: an editorial index, not a storefront. */
.test-library { margin: 56px 0; padding-top: 38px; border-top: 1px solid var(--line); scroll-margin-top: 106px; }
.test-library [hidden] { display: none !important; }
.test-library-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; padding: 5px; border: 1px solid #d6dfd6; border-radius: 12px 12px 0 0; border-bottom: 0; background: #edf0e9; }
.test-library-tabs button { display: flex; align-items: center; gap: 14px; min-height: 58px; padding: 12px 18px; border: 0; border-radius: 6px; background: transparent; color: #52645c; justify-content: center; text-align: center; font-size: .9375rem; font-weight: 600; }
.test-library-tabs button[aria-selected="true"] { color: #fff; background: var(--accent); }
.test-library-tabs button:hover:not([aria-selected="true"]) { background: #e1e8df; color: var(--accent-dark); }
#test-library-panel { display: grid; grid-template-columns: 242px minmax(0, 1fr); min-height: 470px; border: 1px solid #d6dfd6; border-radius: 0 0 12px 12px; background: #fff; }
.test-library-pyq-views { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 18px; border-bottom: 1px solid #dce3d9; background: #fafbf8; }
.test-library-pyq-views button { min-height: 42px; padding: 10px 18px; border: 1px solid #d6dfd6; border-radius: 24px; background: #fff; color: #52645c; font-size: .8125rem; font-weight: 600; }
.test-library-pyq-views button[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.test-library-pyq-views button:hover:not([aria-pressed="true"]) { background: #edf0e9; }
.test-library:is([data-mode="papers"], [data-mode="csat"]) #test-library-panel { grid-template-rows: auto 1fr; }
.test-library-index { padding: 30px 18px; border-right: 1px solid #dce3d9; background: #f0f3ec; border-radius: 0 0 0 12px; }
.test-library-index-label { margin: 0 12px 18px; color: #566b5e; font-size: .625rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.test-library-subjects { display: grid; gap: 4px; }
.test-library-subjects button { display: flex; align-items: center; gap: 10px; min-height: 49px; padding: 11px 12px; border: 1px solid transparent; border-radius: 6px; background: transparent; text-align: left; color: #3e5148; font-size: .8125rem; font-weight: 500; line-height: 1.45; }
.test-library-subjects button:hover { background: #e5ece1; color: var(--accent-dark); }
.test-library-subjects button[aria-pressed="true"] { background: #fff; border-color: #d9e2d6; color: var(--accent-dark); box-shadow: 0 2px 5px #243f2d04; font-weight: 650; }
.test-library-subject-number { font-size: .625rem; font-weight: 400; font-variant-numeric: tabular-nums; color: #6b7f70; }
.test-library-subject-name { flex: 1; }
.test-library-subject-arrow { font-size: .9375rem; opacity: 0; }
.test-library-subjects button[aria-pressed="true"] .test-library-subject-arrow { opacity: 1; }
.test-library-mobile-subject { display: none; }
.test-library-content { min-width: 0; padding: 30px; }
.test-library-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 25px; margin-bottom: 2px; border-bottom: 1px solid var(--line); }
.test-library-summary { min-width: 0; }
.test-library-summary h3 { font-family: var(--font-display); font-size: 1.75rem; font-weight: 600; line-height: 1.2; letter-spacing: -.025em; }
.test-library-summary p { margin-top: 7px; color: var(--muted-ink); font-size: .75rem; }
.test-library-search { display: block; position: relative; width: 100%; margin-bottom: 20px; }
.test-library-search svg { position: absolute; top: 14px; left: 12px; width: 16px; height: 16px; color: var(--muted-ink); pointer-events: none; }
.test-library-search input[type="search"] { min-height: 44px; padding: 10px 10px 10px 36px; border: 1px solid #e0e5de; border-radius: 6px; background: #fafbf8; font-size: .8125rem; font-weight: 400; }
.test-library-status { color: var(--muted-ink); font-size: .875rem; }
.test-library-status:not(:empty) { padding: 20px 0 4px; }
.test-library-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.test-library-card { min-width: 0; display: flex; flex-direction: column; gap: 22px; padding: 26px 0 22px; border: 0; border-bottom: 1px solid #e3e8df; border-radius: 0; background: transparent; }
.test-library-card-heading { display: flex; gap: 13px; align-items: baseline; }
.test-library-card-title { min-width: 0; }
.test-library-card-subject { margin: 0 0 7px; color: var(--muted-ink); font-size: .6875rem; line-height: 1.4; }
.test-library-card-number { color: #708071; font-size: .6875rem; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.test-library-card h4 { margin: 0; color: var(--ink); font-family: var(--font-display); font-size: 1.1875rem; font-weight: 550; line-height: 1.4; letter-spacing: -.015em; overflow-wrap: anywhere; text-wrap: pretty; }
.test-library-card-bottom { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; justify-content: space-between; }
.test-library-card-details { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.test-library-card-details li { display: flex; align-items: center; gap: 6px; color: #607067; font-size: .75rem; white-space: nowrap; }
.test-library-card-details svg { width: 14px; height: 14px; flex-shrink: 0; }
.test-library-start { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 7px 0; color: var(--accent-dark); text-decoration: none; font-size: .75rem; font-weight: 650; white-space: nowrap; }
.test-library-start span { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid #d9e3d7; border-radius: 50%; background: #f3f7f0; font-size: 1rem; transition: color .15s, background-color .15s, border-color .15s; }
.test-library-card:hover .test-library-start span, .test-library-start:focus-visible span { color: #fff; border-color: var(--accent); background: var(--accent); }
.test-library-card:hover h4 { color: var(--accent); }
.test-library-start:hover { text-decoration: underline; text-underline-offset: 4px; }
.test-library-start:disabled { border: 0; background: transparent; color: #738078; cursor: not-allowed; font-weight: 500; }
.test-library-start:disabled span { display: none; }
.test-library :is(button, a, input, select, [role="tabpanel"]):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.test-library-archive { padding: 0 12px; }
.test-library-archive .test-library-index-label { margin-inline: 0; }
.test-library-archive-years { display: flex; flex-direction: column; align-items: flex-start; margin: 30px 0 22px; color: var(--accent-dark); font-family: var(--font-display); font-size: 3rem; font-weight: 500; line-height: 1.2; letter-spacing: -.03em; }
.test-library-archive-years span { font-family: var(--font-ui); font-size: 1.5rem; line-height: 1.5; font-weight: 300; color: #93a48f; }
.test-library-card--paper { padding-block: 23px 17px; gap: 10px; }
.test-library-card--paper h4 { font-size: 2.5rem; font-weight: 500; line-height: 1.1; letter-spacing: -.03em; }
.test-library-card--csat { gap: 10px; }
.test-library-card--csat h4 { font-size: 2.1rem; font-weight: 500; line-height: 1.1; }
.test-library-card--csat .test-library-card-subject { margin: 0; }
.test-library-resource-details { margin: 0; color: var(--muted-ink); font-size: .75rem; line-height: 1.6; }
.test-library-resource-links { display: flex; flex-direction: column; align-items: flex-start; gap: 0; margin-top: auto; }
.test-library-resource-links .test-library-start { white-space: normal; }
.test-library-resource-note { margin: 14px 0 0; color: var(--muted-ink); font-size: .75rem; line-height: 1.65; }
.test-library-retry { margin-top: 16px; }
.test-library-toggle { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; margin: 22px auto 0; padding: 10px 24px; border: 1px solid #cfddcc; border-radius: 24px; background: #f3f7f0; color: var(--accent-dark); font-size: .8125rem; font-weight: 600; }
.test-library-toggle::after { content: ''; width: 7px; height: 7px; margin-top: -4px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.test-library-toggle[aria-expanded="true"]::after { margin-top: 4px; transform: rotate(225deg); }
.test-library-toggle:hover { border-color: var(--accent); background: #e7efe3; }
.roadmap-card .text-link { margin-top: 12px; font-size: .8125rem; }
@media (min-width: 1300px) {
  .test-library[data-mode="papers"] .test-library-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  #test-library-panel { grid-template-columns: 216px minmax(0, 1fr); }
  .test-library-index { padding-inline: 12px; }
  .test-library-content { padding: 26px 24px; }
  .test-library-toolbar { align-items: flex-start; flex-direction: column; gap: 16px; }
}
@media (max-width: 760px) {
  .test-library { margin: 36px 0; padding-top: 28px; }
  .test-library-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .test-library-tabs button { min-height: 60px; gap: 10px; padding: 12px; font-size: .8125rem; line-height: 1.4; }
  #test-library-panel { grid-template-columns: minmax(0, 1fr); min-height: 0; border-radius: 0 0 10px 10px; }
  .test-library-index { padding: 18px 20px; border-right: 0; border-bottom: 1px solid #dce3d9; border-radius: 0; }
  .test-library-index-label, .test-library-subjects { display: none; }
  .test-library-mobile-subject { display: block; color: #51665a; font-size: .6875rem; font-weight: 600; }
  .test-library-mobile-subject select { margin-top: 7px; min-height: 46px; width: 100%; border-radius: 6px; font-size: .875rem; font-weight: 500; background-color: #fff; }
  .test-library-archive { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0; }
  .test-library-archive-years { flex-direction: row; align-items: center; gap: 10px; margin: 0; font-size: 1.5rem; white-space: nowrap; }
  .test-library-archive-years span { font-size: .875rem; }
  .test-library-content { padding: 24px 20px 14px; }
  .test-library-toolbar { flex-direction: row; flex-wrap: wrap; padding-bottom: 20px; }
  .test-library-search { margin-bottom: 16px; }
  .test-library-summary h3 { font-size: 1.6rem; }
  .test-library-grid { gap: 0 24px; }
}
@media (max-width: 520px) {
  .test-library-grid { grid-template-columns: minmax(0, 1fr); }
  .test-library-card { gap: 14px; padding-block: 21px 15px; }
  .test-library-card h4 { font-size: 1.1875rem; }
  .test-library-card-bottom { padding-left: 26px; }
  .test-library-card--paper { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; }
  .test-library-card--paper h4 { font-size: 2rem; }
  .test-library-card--paper .test-library-card-bottom { flex-direction: column; align-items: flex-end; gap: 0; padding: 0; margin: 0; }
  .test-library-card--paper .test-library-card-details { gap: 7px; }
  .test-library-card--paper .test-library-card-details li { font-size: .6875rem; }
  .test-library-card--paper .test-library-card-details svg { display: none; }
  .test-library-card--paper .test-library-card-details li + li::before { content: '·'; margin-right: 1px; }
}
@media (prefers-reduced-motion: reduce) {
  .test-library-start span { transition: none; }
}
