.collection-entry{display:flex;align-items:center;gap:24px}
.collection-entry h2{font-size:22px;margin-bottom:10px}
.collection-entry .muted{max-width:72ch;line-height:1.7}
.collection-entry-list{display:grid;gap:16px}
.collection-paper-panel{padding:26px}
.collection-paper-form{max-width:100%}
.collection-template-scope{margin:20px 0;display:grid;gap:10px;line-height:1.7;overflow-wrap:anywhere}
.collection-template-scope p{margin:0}
.collection-template-scope strong{margin-right:16px}
.collection-rule-details{padding:16px 0;border-top:1px solid var(--border)}
.collection-rule-details summary{cursor:pointer;font-weight:600;min-height:32px}
.collection-blocks{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:28px;padding:20px 0 8px}
.collection-blocks h3{display:flex;justify-content:space-between;gap:12px;margin-bottom:12px}
.collection-blocks h3 span{font-weight:500;color:var(--muted)}
.collection-rules input{max-width:105px;min-width:62px}
.collection-category-checks{border:0;padding:0;margin:16px 0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.collection-category-checks legend{margin-bottom:12px;font-weight:600}
.collection-category-checks label{display:flex;align-items:center;gap:10px;min-height:44px;padding:4px 0;line-height:1.5}
.collection-category-checks input{width:18px;min-height:18px;height:18px;flex-shrink:0}
.collection-generate-bar{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:20px;padding-top:18px;border-top:1px solid var(--border)}
.collection-generate-bar p{display:flex;align-items:baseline;gap:18px;flex-wrap:wrap;margin:0}
.collection-generate-bar strong{font-size:24px;font-variant-numeric:tabular-nums}
.collection-generate-bar span{color:var(--muted)}
.collection-browse{margin-top:32px}
.collection-category-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.collection-category{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:8px;padding:16px;text-align:left;border:1px solid var(--border);border-radius:12px;color:var(--ink);background:var(--surface);min-height:86px;cursor:pointer;font:inherit;line-height:1.5}
.collection-category span{font-weight:600;overflow-wrap:anywhere}
.collection-category small{color:var(--muted);font-size:12px}
.collection-category:hover{border-color:var(--blue)}
.collection-category.active{border-color:var(--blue);background:var(--blue-light)}
.collection-category:focus-visible{outline:2px solid var(--blue);outline-offset:3px}
.collection-practice-bar{display:flex;gap:14px;align-items:flex-end;flex-wrap:wrap;padding:18px 24px;border-bottom:1px solid var(--border)}
.collection-practice-bar label{display:grid;gap:6px;font-size:13px}
.collection-practice-bar input[type=number]{width:100px}
.collection-practice-bar select{max-width:230px}
.collection-paper-block{margin:26px 0 14px;font-size:18px;line-height:1.5}
#collection-question-panel{scroll-margin-top:84px}
@media(max-width:900px){.collection-category-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.collection-blocks{grid-template-columns:1fr;gap:20px}.collection-category-checks{grid-template-columns:1fr}}
@media(max-width:600px){.collection-entry{align-items:stretch;flex-direction:column;gap:16px}.collection-paper-panel{padding:18px}.collection-category-grid{grid-template-columns:1fr}.collection-generate-bar{flex-direction:column;align-items:stretch}.collection-generate-bar p{gap:10px}.collection-practice-bar{padding:16px;display:grid;grid-template-columns:1fr 1fr}.collection-practice-bar label:nth-child(3),.collection-practice-bar button{grid-column:1/-1}.collection-practice-bar select,.collection-practice-bar input[type=number]{width:100%;max-width:none}.collection-rules th,.collection-rules td{padding:9px 6px}.collection-rules input{max-width:82px}}

.collection-exam-blocks{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}
.paper-source-summary-row small{display:block;font-size:12px;line-height:1.6;color:var(--muted);overflow-wrap:anywhere}
.collection-blocks>section,.collection-entry .grow{min-width:0}
.collection-category.active small{color:inherit}
