/*
 * site/class10.css — Class 10 subject-selection page.
 *
 * Adds ONLY what home.css doesn't already provide: the breadcrumb and the
 * two-panel subject selector. Everything else (palette, Manrope, header,
 * footer, buttons, .ph-container grid, the .ph-page #main fix) is inherited
 * from home.css by sharing its `.ph-page` wrapper class — no tokens are
 * redeclared here, so the two pages can never drift apart in color or type.
 */

.subj-intro-section { padding-top: clamp(28px, 4.5vh, 56px); padding-bottom: clamp(56px, 8vh, 96px); }

/* ---- breadcrumb ---- */
.subj-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 28px;
  font-size: var(--text-meta);
  font-weight: 500;
  color: var(--text-muted);
}
.subj-breadcrumb a { color: var(--text-muted); text-decoration: none; }
.subj-breadcrumb a:hover { color: var(--text-secondary); }
.subj-breadcrumb [aria-current="page"] { color: var(--text-secondary); font-weight: 600; }
.subj-crumb-sep { color: var(--border); }

/* ---- page intro: eyebrow + question + one-line purpose ---- */
.subj-intro { max-width: 40rem; margin-bottom: clamp(20px, 3vh, 32px); }
.subj-intro .ph-eyebrow { margin-bottom: 10px; }
.subj-intro h1 {
  margin: 0 0 12px;
  font-size: clamp(1.75rem, 1.3rem + 2.2vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}
.subj-intro p { margin: 0; font-size: var(--text-body); font-weight: 500; line-height: 1.6; color: var(--text-secondary); }

/* ---- subject selector: two deliberately unequal panels, not a card grid.
   Science (live) carries primary visual weight; Mathematics (soon) is
   present but quieter — never a bare disabled-looking tile. ---- */
.subj-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(20px, 3vw, 32px);
  align-items: stretch;
}

.subj-panel {
  position: relative;
  overflow: hidden;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-card, 20px);
  border: 1px solid var(--border);
  padding: clamp(24px, 2.6vw, 36px);
}

.subj-panel.is-primary {
  background:
    radial-gradient(560px 380px at 100% 0%, rgba(200, 245, 226, 0.22), transparent 65%),
    linear-gradient(150deg, var(--surface-hover), var(--surface));
  border-color: var(--mint);
  box-shadow: 0 24px 60px rgba(3, 20, 14, 0.35);
}
.subj-panel.is-secondary {
  background: var(--surface);
}

.subj-status {
  position: absolute;
  top: clamp(22px, 3vw, 32px);
  right: clamp(22px, 3vw, 32px);
  font-size: var(--text-meta);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--mint);
  background: rgba(169, 232, 207, 0.14);
  padding: 4px 12px;
  border-radius: 999px;
}
.subj-panel.is-secondary .subj-status { color: var(--text-muted); background: rgba(255, 255, 255, 0.06); }

.subj-icon {
  display: grid; place-items: center;
  width: 56px; height: 56px;
  border-radius: 16px;
  margin-bottom: clamp(18px, 2.2vw, 24px);
  background: rgba(169, 232, 207, 0.16);
  color: var(--mint);
}
.subj-icon .ph-icon { width: 28px; height: 28px; }
.subj-panel.is-secondary .subj-icon { background: rgba(255, 255, 255, 0.07); color: var(--text-secondary); }

.subj-name { margin: 0 0 10px; font-size: var(--text-section); font-weight: 700; color: var(--text); }
.subj-desc { margin: 0; font-size: var(--text-body); line-height: 1.6; color: var(--text-secondary); flex: 1 1 auto; }
/* secondary (coming-soon) panel: read as "not yet available", not "broken" —
   keep body copy at the same secondary-text contrast as the rest of the
   site, don't dim the whole panel. */
.subj-panel.is-secondary .subj-desc { color: var(--text-secondary); }

.subj-cta { margin-top: clamp(18px, 2.2vw, 24px); align-self: flex-start; }

/* ---- mobile: Science first, full-width panels, Mathematics stays visible
   but visually secondary — no forced equal-height card grid. ---- */
@media (max-width: 760px) {
  .subj-grid { grid-template-columns: 1fr; }
  .subj-panel { padding: 26px; }
}

/* ---- list layout: for an index of many same-weight items (e.g. every chapter of a
   textbook), instead of the two deliberately-unequal subject-chooser panels above. ---- */
.subj-group { margin: 0 0 clamp(20px, 3vh, 32px); }
.subj-group:not(:first-child) { margin-top: clamp(36px, 5vh, 56px); }
.subj-group-heading {
  margin: 0 0 4px;
  font-size: var(--text-meta);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ====================================================================
 * ---- shared compact chapter card ----
 *
 * ONE reusable card for every "choose a chapter" grid (Class 8 Mathematics,
 * Class 10 Science, and any future subject index). Deliberately lean:
 * number + title + one short topic line + arrow, the whole card is the
 * click target, and status is communicated by that (a live chapter is a
 * link; a not-yet-live one is inert with a small "Coming soon" badge) —
 * never a badge repeated on every single card.
 *
 * Visually related to .ph-class-card (homepage "choose your class") and
 * the retired .sci-feature-mini pattern, kept consistent with both.
 * ------------------------------------------------------------------ */
.ch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.ch-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
  padding: 18px 18px;
  border-radius: var(--radius-card, 16px);
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
a.ch-card:hover {
  border-color: var(--mint-light);
  background: var(--surface-hover);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(3, 20, 14, 0.28);
}
a.ch-card:hover .ch-card-go .ph-icon { transform: translateX(2px); }
.ch-card:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
.ch-card-num {
  flex-shrink: 0;
  padding-top: 1px;
  font-size: var(--text-card-title);
  font-weight: 700;
  color: var(--mint);
  font-variant-numeric: tabular-nums;
}
.ch-card-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 auto; }
.ch-card-title { font-size: var(--text-body); font-weight: 700; line-height: 1.3; color: var(--text); }
.ch-card-meta { font-size: var(--text-meta); color: var(--text-muted); }
.ch-card-go { flex-shrink: 0; color: var(--mint); padding-top: 2px; }
.ch-card-go .ph-icon { width: 18px; height: 18px; transition: transform 0.15s ease; }

/* coming-soon: inert, quieter, no arrow — a small badge is the only status marker anywhere in the grid */
.ch-card.is-soon { cursor: default; color: inherit; }
.ch-card.is-soon .ch-card-num { color: var(--text-muted); }
.ch-card.is-soon .ch-card-title { color: var(--text-secondary); }
.ch-card-badge {
  flex-shrink: 0;
  align-self: flex-start;
  font-size: var(--text-meta);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.subj-curriculum-note {
  margin: clamp(24px, 3.5vh, 36px) 0 0;
  font-size: var(--text-meta);
  color: var(--text-muted);
  text-align: center;
}

@media (max-width: 760px) {
  .ch-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .ch-card, .ch-card-go .ph-icon { transition: none; }
  a.ch-card:hover { transform: none; }
}
