/* ---------- ISC Subjects ---------- */
.subj-sym { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--navy-800); color: var(--white); font: 700 1.2rem var(--serif); letter-spacing: -.01em; flex: none; box-shadow: inset 0 -3px 0 var(--gold); }
.subj-sym.sm { width: 26px; height: 26px; border-radius: 7px; font-size: .78rem; box-shadow: inset 0 -2px 0 var(--gold); }
.subj-sym.big { width: 92px; height: 92px; border-radius: 20px; font-size: 2.3rem; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25); box-shadow: inset 0 -4px 0 var(--gold); }
.subj-sym.xl { width: 84px; height: 84px; border-radius: 18px; font-size: 2.1rem; background: var(--white); color: var(--navy-800); box-shadow: inset 0 -4px 0 var(--gold); }

.subject-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 960px) { .subject-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .subject-grid { grid-template-columns: 1fr; } }
.subject-tile { display: flex; flex-direction: column; gap: 14px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; color: var(--ink); transition: box-shadow .2s, transform .2s, border-color .2s; }
.subject-tile:hover { text-decoration: none; box-shadow: var(--shadow); transform: translateY(-2px); border-color: #c3cfe6; }
.subject-info { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.subject-info b { font-size: 1.15rem; color: var(--navy-800); }
.subject-info small { font-size: .78rem; font-weight: 600; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.subject-info span { font-size: .9rem; color: var(--muted); margin-top: 6px; }
.subject-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 1px dashed var(--line); font-size: .85rem; }
.subject-foot em { font-style: normal; color: var(--muted); }
.subject-foot .go { font-weight: 600; color: var(--navy-600); }

.subject-hero { background: var(--navy-800) url('/img/math-bg.svg') repeat; color: var(--white); padding: 28px 0 40px; }
.crumbs { font-size: .85rem; color: #a9b8d8; margin-bottom: 22px; }
.crumbs a { color: #d6def0; }
.subject-hero-row { display: flex; gap: 22px; align-items: center; }
.subject-hero h1 { font-family: var(--serif); font-size: clamp(1.9rem, 4vw, 2.7rem); margin: 0; letter-spacing: -.01em; }
.subj-code { margin: 2px 0 8px; color: var(--gold); font-weight: 600; font-size: .9rem; }
.subj-blurb { margin: 0; color: #c9d4ec; }
.subj-count { margin: 10px 0 0; font-size: .88rem; color: #a9b8d8; }
@media (max-width: 560px) { .subject-hero-row { flex-direction: column; align-items: flex-start; } }

.subject-tabs-wrap { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 68px; z-index: 30; }
.subject-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0; }
.subject-tab { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; color: var(--navy-800); font-weight: 600; font-size: .92rem; white-space: nowrap; border: 1px solid transparent; }
.subject-tab:hover { text-decoration: none; background: var(--navy-50); }
.subject-tab.active { background: var(--navy-50); border-color: #c3cfe6; }
.subj-heading { font-family: var(--serif); color: var(--navy-800); margin: 0; font-size: 1.5rem; }

/* Paper card: two independent purchases */
.buy-rows { display: flex; flex-direction: column; border-top: 1px dashed var(--line); margin-top: 4px; }
.buy-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.buy-row:last-child { border-bottom: 0; padding-bottom: 0; }
.buy-label { display: flex; flex-direction: column; }
.buy-label b { color: var(--navy-800); font-size: .95rem; }
.buy-label small { color: var(--muted); font-size: .8rem; }
.buy-label .owned-note { color: var(--ok); font-weight: 600; }

/* Admin extras */
.row-key td { background: #fbfcfe; }
.row-key td:nth-child(2) { padding-left: 30px; }
.subj-pill { font-size: .72rem; font-weight: 700; padding: 3px 7px; border-radius: 6px; background: var(--navy-100); color: var(--navy-800); }
