/* Student hub pages — standalone layout (no legacy newstyle.css) */
.student-hub-page {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  background: #f8fafc;
  color: #0f172a;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

.student-hub-page *,
.student-hub-page *::before,
.student-hub-page *::after {
  box-sizing: border-box;
}

.student-hub-page h1,
.student-hub-page h2,
.student-hub-page h3,
.student-hub-page h4,
.student-hub-page p,
.student-hub-page li,
.student-hub-page td,
.student-hub-page th {
  font-family: inherit;
}

.student-hub-page #content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 16px 48px;
  width: 100%;
}

.student-hub-page .cbse-hero--compact {
  grid-template-columns: 1fr;
  padding: 24px 20px;
  margin-bottom: 24px;
}

.student-hub-page .cbse-hero h1 {
  font-size: clamp(1.45rem, 2.8vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.student-hub-page .cbse-resources h2 {
  font-size: 1.15rem;
  font-weight: 700;
}

/* Class accordion */
.student-hub-page .hub-class-panel {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  margin: 0 0 14px;
  padding: 0;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.student-hub-page .hub-class-panel > summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  background: #fff;
  user-select: none;
}

.student-hub-page .hub-class-panel > summary::-webkit-details-marker {
  display: none;
}

.student-hub-page .hub-class-panel[open] > summary {
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.student-hub-page .hub-class-panel--muted {
  border-style: dashed;
  background: #f8fafc;
}

.student-hub-page .hub-class-body--nested {
  padding-top: 0;
}

.student-hub-page .hub-class-body--nested .cbse-class-block {
  margin-top: 10px;
}

.student-hub-page .hub-class-panel > summary h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
}

.student-hub-page .hub-class-panel > summary .cbse-class-meta {
  margin: 0;
  font-size: 0.9rem;
  color: #64748b;
}

.student-hub-page .hub-class-panel > summary::after {
  content: "Expand ▾";
  margin-left: auto;
  font-size: 0.85rem;
  font-weight: 700;
  color: #2563eb;
  flex-shrink: 0;
}

.student-hub-page .hub-class-panel[open] > summary::after {
  content: "Collapse ▴";
}

.student-hub-page .hub-class-body {
  padding: 16px 18px 18px;
}

/* Section labels */
.student-hub-page .hub-section-label {
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.student-hub-page .hub-section-label--new {
  color: #1d4ed8;
}

.student-hub-page .hub-section-label--legacy {
  color: #64748b;
  margin-top: 20px;
}

/* Book / subject blocks */
.student-hub-page .hub-book-block,
.student-hub-page .hub-subject-block {
  margin: 0 0 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.student-hub-page .hub-book-block:last-child,
.student-hub-page .hub-subject-block:last-child {
  margin-bottom: 0;
}

.student-hub-page .hub-book-title,
.student-hub-page .hub-subject-block > .hub-subject-title {
  margin: 0;
  padding: 11px 14px;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.4;
  color: #1e3a8a;
  background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
  border-bottom: 1px solid #dbeafe;
}

.student-hub-page .hub-subject-block > .hub-subject-title {
  display: block;
}

/* Tables */
.student-hub-page .cbse-table-wrap {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.student-hub-page .cbse-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 320px;
  font-size: 0.95rem;
}

.student-hub-page .cbse-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #1d4ed8;
  color: #fff;
  text-align: left;
  padding: 11px 14px;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.student-hub-page .cbse-table td {
  padding: 11px 14px;
  border-bottom: 1px solid #eef2f7;
  vertical-align: middle;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #0f172a;
}

.student-hub-page .cbse-table td.hub-col-title {
  width: auto;
  max-width: 520px;
}

.student-hub-page .cbse-table td.hub-col-action {
  width: 130px;
  text-align: right;
  white-space: nowrap;
}

.student-hub-page .cbse-table tbody tr:hover td {
  background: #f8fafc;
}

.student-hub-page .cbse-table tr:last-child td {
  border-bottom: 0;
}

.student-hub-page .cbse-table tr[hidden] {
  display: none;
}

.student-hub-page .cbse-read-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 12px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff !important;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.85rem;
  white-space: nowrap;
}

.student-hub-page .cbse-read-btn:hover,
.student-hub-page .cbse-read-btn:focus-visible {
  filter: brightness(1.06);
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

.student-hub-page .cbse-read-btn--muted {
  background: #64748b;
}

/* Legacy archive — collapsed by default, visually secondary */
.student-hub-page .hub-legacy-panel {
  margin-top: 8px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #f1f5f9;
  overflow: hidden;
}

.student-hub-page .hub-legacy-panel > summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 14px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #475569;
  user-select: none;
}

.student-hub-page .hub-legacy-panel > summary::-webkit-details-marker {
  display: none;
}

.student-hub-page .hub-legacy-panel > summary::after {
  content: "Show older lists ▾";
  float: right;
  font-size: 0.82rem;
  font-weight: 700;
  color: #64748b;
}

.student-hub-page .hub-legacy-panel[open] > summary::after {
  content: "Hide older lists ▴";
}

.student-hub-page .hub-legacy-panel[open] > summary {
  border-bottom: 1px dashed #cbd5e1;
}

.student-hub-page .hub-legacy-panel .hub-class-body {
  padding: 12px 14px 14px;
}

.student-hub-page .hub-legacy-note {
  margin: 0 0 10px;
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.5;
}

.student-hub-page .hub-empty {
  color: #475569;
  padding: 20px 0;
  font-size: 1rem;
}

.student-hub-page .cbse-class-card strong {
  font-size: 1.1rem;
}

.student-hub-page .cbse-class-card span {
  font-size: 0.86rem;
}

.student-hub-page .cbse-class-card--board {
  border-color: #93c5fd;
  background: linear-gradient(180deg, #eff6ff 0%, #fff 100%);
}

.student-hub-page .hub-class-group-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 24px;
}

.student-hub-page .hub-class-group-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #fff;
  color: #0f172a !important;
  text-decoration: none !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

.student-hub-page .hub-class-group-link strong {
  font-size: 1.05rem;
  color: #1d4ed8;
}

.student-hub-page .hub-class-group-link span {
  font-size: 0.86rem;
  color: #64748b;
}

.student-hub-page .hub-class-group-link:hover,
.student-hub-page .hub-class-group-link:focus-visible {
  border-color: #93c5fd;
  background: #eff6ff;
  outline: none;
}

.student-hub-page .hub-class-group {
  margin: 0 0 28px;
  padding: 0;
}

.student-hub-page .hub-class-group-head {
  margin: 0 0 14px;
}

.student-hub-page .hub-class-group-head h2 {
  margin: 0 0 4px;
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
}

.student-hub-page .hub-class-group-head p {
  margin: 0;
  font-size: 0.92rem;
  color: #64748b;
}

.student-hub-page .cbse-class-cards--group {
  margin-bottom: 14px;
}

/* Sample papers — subject chips + year groups */
.student-hub-page .hub-subject-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
}

.student-hub-page .hub-subject-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #fff;
  color: #1e40af;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.2;
}

.student-hub-page .hub-subject-chip:hover,
.student-hub-page .hub-subject-chip:focus-visible {
  background: #eff6ff;
  border-color: #93c5fd;
  outline: none;
}

.student-hub-page .hub-subject-chip-year {
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  background: #2563eb;
  border-radius: 999px;
  padding: 2px 7px;
}

.student-hub-page .hub-subject-panel {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  margin: 0 0 10px;
  overflow: hidden;
}

.student-hub-page .hub-subject-panel > summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
  user-select: none;
}

.student-hub-page .hub-subject-panel > summary::-webkit-details-marker {
  display: none;
}

.student-hub-page .hub-subject-panel > summary .hub-subject-title {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 1rem;
  font-weight: 800;
  color: #1e3a8a;
}

.student-hub-page .hub-subject-panel > summary .hub-subject-meta {
  margin: 0;
  font-size: 0.86rem;
  color: #64748b;
}

.student-hub-page .hub-subject-panel > summary::after {
  content: "Show papers ▾";
  margin-left: auto;
  font-size: 0.82rem;
  font-weight: 700;
  color: #2563eb;
}

.student-hub-page .hub-subject-panel[open] > summary::after {
  content: "Hide papers ▴";
}

.student-hub-page .hub-subject-panel[open] > summary {
  border-bottom: 1px solid #dbeafe;
}

.student-hub-page .hub-subject-body {
  padding: 12px 14px 14px;
}

.student-hub-page .hub-year-group {
  margin: 0 0 14px;
}

.student-hub-page .hub-year-group:last-child {
  margin-bottom: 0;
}

.student-hub-page .hub-year-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
}

.student-hub-page .hub-year-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #1d4ed8;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.student-hub-page .hub-year-count {
  font-size: 0.82rem;
  color: #64748b;
  font-weight: 600;
}

.student-hub-page .hub-paper-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid #eef2f7;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.student-hub-page .hub-paper-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #eef2f7;
}

.student-hub-page .hub-paper-list li:last-child {
  border-bottom: 0;
}

.student-hub-page .hub-paper-list li[hidden],
.student-hub-page .hub-subject-panel[hidden],
.student-hub-page .hub-year-group[hidden] {
  display: none;
}

.student-hub-page .hub-paper-link {
  flex: 1;
  min-width: 0;
  color: #0f172a;
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
}

.student-hub-page .hub-paper-link:hover,
.student-hub-page .hub-paper-link:focus-visible {
  color: #1d4ed8;
  text-decoration: underline;
}

.student-hub-page .hub-paper-btn {
  flex-shrink: 0;
  min-height: 32px;
  padding: 5px 10px;
  font-size: 0.8rem;
}

/* Mobile: stack table rows as cards */
@media (max-width: 640px) {
  .student-hub-page #content {
    padding: 12px 12px 40px;
  }

  .student-hub-page .hub-class-panel > summary,
  .student-hub-page .hub-class-body {
    padding-left: 14px;
    padding-right: 14px;
  }

  .student-hub-page .cbse-table thead {
    display: none;
  }

  .student-hub-page .cbse-table,
  .student-hub-page .cbse-table tbody,
  .student-hub-page .cbse-table tr,
  .student-hub-page .cbse-table td {
    display: block;
    width: 100%;
  }

  .student-hub-page .cbse-table tr {
    padding: 12px 14px;
    border-bottom: 1px solid #eef2f7;
  }

  .student-hub-page .cbse-table tr:last-child {
    border-bottom: 0;
  }

  .student-hub-page .cbse-table td {
    padding: 0;
    border: 0;
  }

  .student-hub-page .cbse-table td.hub-col-title {
    margin-bottom: 10px;
    font-size: 0.98rem;
    font-weight: 600;
  }

  .student-hub-page .cbse-table td.hub-col-action {
    text-align: left;
  }

  .student-hub-page .cbse-read-btn {
    width: 100%;
    min-height: 42px;
    font-size: 0.9rem;
  }

  .student-hub-page .hub-class-group-nav {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .student-hub-page .cbse-class-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .student-hub-page .hub-paper-list li {
    flex-direction: column;
    align-items: stretch;
  }

  .student-hub-page .hub-paper-btn {
    width: 100%;
    min-height: 40px;
  }

  .student-hub-page .hub-subject-chip {
    font-size: 0.84rem;
  }
}

.student-hub-page .hub-new-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #dcfce7;
  border: 1px solid #86efac;
  color: #166534;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

.student-hub-page .hub-notes-latest {
  margin: 0 0 20px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #bbf7d0;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  color: #14532d;
  font-size: 0.95rem;
  line-height: 1.5;
}

.student-hub-page .hub-notes-latest code {
  font-size: 0.86rem;
  background: #fff;
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid #bbf7d0;
}

.student-hub-page .notes-chapter--new {
  border-color: #86efac;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.12);
}

.student-hub-page .hub-notes-featured {
  margin-bottom: 24px;
}

.student-hub-page .hub-notes-featured-lead {
  margin: -8px 0 14px;
  color: #475569;
  font-size: 0.92rem;
}

.student-hub-page .hub-notes-subject-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.student-hub-page .hub-notes-subject-card {
  padding: 14px 14px 12px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
}

.student-hub-page .hub-notes-subject-card[hidden] {
  display: none;
}

.student-hub-page .hub-notes-subject-name {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.student-hub-page .hub-notes-subject-meta {
  margin: 0 0 12px;
  font-size: 0.86rem;
  color: #64748b;
}

.student-hub-page .hub-notes-subject-meta strong {
  color: #166534;
}

.student-hub-page .hub-notes-subject-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.student-hub-page .hub-notes-subject-actions .cbse-read-btn {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 0.84rem;
}

.student-hub-page .hub-notes-preview {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid #f1f5f9;
  padding-top: 10px;
}

.student-hub-page .hub-notes-preview li {
  margin: 0 0 6px;
}

.student-hub-page .hub-notes-preview a {
  display: inline;
  color: #2563eb;
  font-size: 0.84rem;
  font-weight: 500;
  text-decoration: none;
  line-height: 1.45;
}

.student-hub-page .hub-notes-preview a:hover {
  text-decoration: underline;
}

.student-hub-page .hub-notes-class-index {
  margin: 8px 0 0;
}
