/* ============================================================
   SDM School - CBSE Mandatory Disclosure
   Figma: SDM School Website Final / CBSE DESIGN (1441 x 2421)
   Shared tokens, header and footer live in styles.css.

   --u is one design pixel: 1px on the 1440 frame, scaling down with the
   screen. Positions use it so the band keeps the frame's proportions;
   text sizes use clamp() so copy stays legible.
   ============================================================ */

.page-cbse {
  --nav-ink: #3934c9;                       /* the CBSE frame sets its menu in blue */
  --u: calc(min(100vw, 1440px) / 1440);
}

/* ============================================================
   Hero - the orange band (y 118 on the frame), cut by a white wave
   ============================================================ */
.cb-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: var(--hero-gap);   /* clears the header bar */
  min-height: calc(390 * var(--u));
  padding: calc(134 * var(--u)) 0 calc(144 * var(--u));
}
/* Figma blurs the band 2px, which softens its top edge under the header. */
.cb-hero::before {
  content: '';
  position: absolute;
  inset: 0 -30px -40px;
  z-index: -2;
  background: var(--tangerine);
  filter: blur(2px);
}

/* Figma: a 1711 x 1103 white shape, flipped and turned 171.63deg, its
   centre at (864, 789) on the frame. It is anchored to the band's foot
   (270u above the art's top edge) so a taller band on phones keeps the
   same curve along its bottom. */
.cb-wave {
  position: absolute;
  z-index: -1;
  left: calc(8.4 * var(--u));
  top: calc(100% - 270 * var(--u));
  width: calc(1711.2 * var(--u));
  max-width: none;
  height: auto;
  rotate: 171.63deg;
  scale: 1 -1;
  pointer-events: none;
}

.cb-hero-copy {
  padding: 0 20px 0 calc(167 * var(--u));
  color: #fff;
}
.cb-title {
  font-size: var(--fs-title);
  line-height: 1.15;
}
.cb-sub {
  max-width: 697px;
  margin-top: 4px;
  font-size: var(--fs-lede);
  line-height: 1.22;
}

/* ============================================================
   The disclosure - section headings with lists of documents
   ============================================================ */
.cb-body {
  /* Figma: copy starts 160px in and runs 1131px wide. */
  padding: max(40px, calc(135 * var(--u))) max(20px, calc(149 * var(--u))) max(80px, calc(240 * var(--u))) calc(160 * var(--u));
  font-size: var(--fs-lede);      /* the site's body-copy size */
  font-weight: 500;
  color: var(--grey-dark);
}

.cb-group + .cb-group { margin-top: 1.2em; }
.cb-group:has(.cb-docs) + .cb-group { margin-top: 1.6em; }

.cb-group h2 {
  font-size: var(--fs-h5);
  font-weight: 700;
  line-height: 1.25;
  color: var(--navy);
}

.cb-docs {
  margin-top: 0.1em;
  padding-left: 1.5em;
  list-style: disc;
  line-height: 1.5625;               /* 50px on 32px, as in Figma */
}
.cb-docs li::marker { font-size: 0.6em; }

.cb-body a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-offset: 0.12em;
  transition: color var(--dur) var(--ease);
}
.cb-body a:hover { color: var(--pink); }

/* ============================================================
   Sub-pages (D. Teaching staff, E. Infrastructure): one table each
   ============================================================ */
.cb-kicker {
  margin-bottom: 6px;
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}

.cb-body .cb-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
}
.cb-back::before { content: '←'; transition: transform var(--dur) var(--ease); }
.cb-body .cb-back:hover { color: var(--pink); }
.cb-back:hover::before { transform: translateX(-4px); }

.cb-table-wrap {
  margin-top: 28px;
  max-width: 980px;
  overflow-x: auto;                   /* never widens the page on a phone */
  border-radius: 0 max(24px, calc(39 * var(--u)));
  background: var(--mist-line);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 6px 2px rgba(0, 0, 0, 0.15);
}
.cb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-body);
  line-height: 1.35;
  color: var(--grey-dark);
}
.cb-table th,
.cb-table td {
  padding: 16px 22px;
  text-align: left;
  vertical-align: top;
}
.cb-table thead th {
  background: var(--navy);
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
}
.cb-table tbody tr + tr { border-top: 1px solid rgba(55, 76, 159, 0.15); }
.cb-table tbody th { font-weight: 600; color: var(--navy); }
.cb-table tbody td:first-child { width: 4.5em; color: var(--grey); }
.cb-table tbody td:last-child { font-weight: 700; color: var(--navy); white-space: nowrap; }
/* Tables whose details are sentences (General Information): let them
   wrap, give the details the wider column and keep labels from squeezing. */
.cb-table--text tbody td:last-child { white-space: normal; width: 55%; }
.cb-table--text tbody th { white-space: nowrap; }
/* On phones each row stacks: number, then label, with its details below. */
@media (max-width: 760px) {
  .cb-table--text thead { display: none; }
  .cb-table--text tbody tr {
    display: grid;
    grid-template-columns: 2.5em minmax(0, 1fr);
  }
  .cb-table--text tbody td:first-child { width: auto; grid-row: 1 / span 2; }
  .cb-table--text tbody th { white-space: normal; padding-bottom: 2px; }
  .cb-table--text tbody td:last-child {
    grid-column: 2;
    width: auto;
    padding-top: 2px;
    overflow-wrap: break-word;
  }
}
/* Breakdown rows (PGT/TGT/PRT, each laboratory) sit indented under their item. */
.cb-sub-row th { padding-left: 46px; font-weight: 500; }
.cb-sub-row th::before { content: '–'; margin: 0 10px 0 -18px; color: var(--grey); }
.cb-sub-row + tr:not(.cb-sub-row),
tr:not(.cb-sub-row) + .cb-sub-row { border-top-color: rgba(55, 76, 159, 0.15); }
.cb-sub-row + .cb-sub-row { border-top-color: transparent; }

@media (max-width: 760px) {
  .cb-table th, .cb-table td { padding: 12px 14px; }
  .cb-table tbody td:first-child { width: 2.5em; }
  .cb-table tbody td:last-child { white-space: normal; }
  .cb-sub-row th { padding-left: 32px; }
}

@media (max-width: 760px) {
  .cb-hero { padding: 40px 0 calc(170 * var(--u) + 40px); }
  .cb-hero-copy { padding-left: 20px; }
  .cb-body { padding-left: 20px; }
  .cb-docs { line-height: 1.45; }
  .cb-docs li + li { margin-top: 0.5em; }
  .cb-group h2 a { display: inline-block; padding-block: 10px; }   /* a full tap height */
}
