/* Worksheets page (builds on lessons.css). */
.msw-sec { padding-top: 28px; }
.msw-last { padding-bottom: 64px; }
.msw-sec[hidden] { display: none; }
.msw h2 { font-family: inherit; }
.msw-h2 { font-size: 22px; font-weight: 800; margin-bottom: 14px !important; }
.msw-h2 span { font-size: 15px; color: #6A5A5C; font-weight: 600; }

/* Study packs */
.msw-packs { background: #3F1019; color: #fff; border-radius: 22px; padding: 24px; }
.msw-packs-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 16px; }
.msw-packs-head h2 { font-size: 26px; font-weight: 800; color: #fff; line-height: 1.25; margin-top: 2px !important; }
.msw-packs-head > span { font-size: 14px; color: #E8D6BE; }
.msw-eyebrow { font-size: 13px; font-weight: 700; color: #C9A06A; letter-spacing: 1px; }
html[lang="ar"] .msw-eyebrow { letter-spacing: 0; font-weight: 800; }
.msw-pack-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.msw-pack { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: #fff !important; transition: background .2s, transform .2s; }
.msw-pack:hover { background: rgba(255, 255, 255, .12); transform: translateY(-2px); }
.msw-pack[hidden] { display: none; }
.msw-pack-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #E8D6BE; }
.msw-pack-n { background: #C9A06A; color: #3F1019; font-weight: 800; font-size: 13px; border-radius: 8px; padding: 1px 9px; font-family: 'Poppins', sans-serif; }
.msw-pack b { font-size: 16px; line-height: 1.3; }
html[dir="rtl"] .msw-pack b { text-align: right; }
.msw-tags { margin-top: auto; display: flex; gap: 6px; flex-wrap: wrap; font-size: 11.5px; font-weight: 700; }
.msw-tags span { background: rgba(201, 160, 106, .2); color: #F3DDB8; border-radius: 999px; padding: 1px 8px; }
.msw-pack-cta { border: 1.5px dashed rgba(201, 160, 106, .5); background: transparent; align-items: center; justify-content: center; text-align: center; color: #C9A06A !important; font-weight: 700; font-size: 14px; }

/* Topic worksheets */
.msw-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.msw-sheet { background: #fff; border: 1px solid #E0D6C6; border-radius: 16px; display: flex; flex-direction: column; overflow: hidden; transition: box-shadow .2s, transform .2s; }
.msw-sheet:hover { box-shadow: 0 10px 26px rgba(43, 28, 31, .1); transform: translateY(-2px); }
.msw-sheet[hidden] { display: none; }
.msw-sheet-main { padding: 14px; display: flex; gap: 12px; align-items: center; text-decoration: none; color: #2B1C1F !important; flex: 1; }
.msw-pdf { position: relative; width: 46px; height: 54px; flex: none; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.msw-pdf span { font-size: 9.5px; font-weight: 800; font-family: 'Poppins', sans-serif; }
.msw-sheet-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.msw-meta { display: flex; gap: 8px; align-items: center; font-size: 12px; font-weight: 700; }
.msw-n { font-weight: 800; font-size: 12.5px; color: #5E1A2A; font-family: 'Poppins', sans-serif; }
.msw-sheet-tx b { font-size: 15.5px; line-height: 1.3; }
html[dir="rtl"] .msw-sheet-tx b { text-align: right; }
.msw-chev { color: #6A5A5C; flex: none; }
.msw-quiz { display: block; padding: 7px 14px; border-top: 1px solid #F0E8DC; font-size: 12.5px; font-weight: 700; color: #2C7552 !important; text-decoration: none; background: #FBF8F3; }
.msw-quiz:hover { background: #E7F0E9; }

/* Revisions */
.msw-reviews { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.msw-review { background: #fff; border: 1px solid #E0D6C6; border-top: 4px solid #C9A06A; border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: #2B1C1F !important; transition: box-shadow .2s, transform .2s; }
.msw-review:hover { box-shadow: 0 10px 26px rgba(43, 28, 31, .1); transform: translateY(-2px); }
.msw-review[hidden] { display: none; }
.msw-review b { font-size: 16px; line-height: 1.3; }
html[dir="rtl"] .msw-review b { text-align: right; }
.msw-open { margin-top: auto; font-weight: 700; font-size: 14px; color: #5E1A2A; }

@media (max-width: 960px) {
	.msw-pack-grid, .msw-reviews { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.msw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
	.msw-sec { padding-top: 20px; }
	.msw-packs { padding: 16px; border-radius: 18px; }
	.msw-packs-head h2 { font-size: 20px; }
	.msw-pack-grid { display: flex; overflow-x: auto; margin-inline: -16px; padding: 0 16px 4px; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.msw-pack-grid::-webkit-scrollbar { display: none; }
	.msw-pack { flex: 0 0 200px; scroll-snap-align: start; }
	.msw-grid { grid-template-columns: 1fr; gap: 10px; }
	.msw-reviews { grid-template-columns: 1fr 1fr; gap: 10px; }
	.msw-last { padding-bottom: 40px; }
}
@media (prefers-reduced-motion: reduce) {
	.msw * { transition: none !important; }
}
