/* SolutionTee Edu Academy — editorial
   =========================================================================
   The Education Information Centre: the section front, an article, the
   admission listings, and the apparatus around them.

   This is the one part of the site where the old editorial instincts
   were right and survive the rebuild almost unchanged. A news page is a
   document, not a dashboard: it wants a measured column, a real
   hierarchy between the lead and everything else, and rules rather than
   panels. Wrapping an article in glass would make it look like a widget.

   What did change is the material underneath — every colour, edge and
   rule now comes from the new tokens — and the two places where the old
   layout actually failed, noted at each.
   ====================================================================== */


/* ==========================================================================
   SECTION FRONT
   ==========================================================================
   Arranged by importance: a lead at the size it earns, seconds beside
   it, then a dated list. Deliberately NOT a grid of equal cards — a grid
   says every story matters the same, which is never true and is the
   reason most news pages read as a wall.
   ========================================================================== */

.front {
  display: grid;
  gap: var(--grid-gap);
}

@media (min-width: 900px) {
  .front {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    align-items: start;
  }
}

.kicker {
  font-family: var(--font-display);
  font-size: var(--step--2);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--ink-accent);
}

/* ---- The lead ---------------------------------------------------------- */
.lead__link {
  display: block;
  text-decoration: none;
  color: var(--ink);
}

.lead__media {
  margin-block-end: var(--space-5);
  border-radius: var(--r-4);
  overflow: hidden;
}

.lead__title {
  margin-block-start: var(--space-3);
  max-inline-size: 18ch;
  font-size: var(--step-4);
  font-weight: var(--weight-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-display);
  color: var(--ink);
}

.lead__link:hover .lead__title {
  color: var(--ink-accent);
}

.lead__dek {
  margin-block-start: var(--space-4);
  max-inline-size: var(--measure);
  font-size: var(--step-1);
  line-height: var(--lh-snug);
  color: var(--ink-muted);
}

.lead__meta {
  margin-block-start: var(--space-4);
}

/* ---- The seconds -------------------------------------------------------
   No images. Below the lead a row of thumbnails competes with the
   headlines instead of helping them. */
.seconds {
  border-block-start: 1px solid var(--edge);
}

@media (min-width: 900px) {
  .seconds {
    border-block-start: none;
    border-inline-start: 1px solid var(--edge);
    padding-inline-start: var(--space-5);
  }
}

.second {
  padding-block: var(--space-5);
  border-block-end: 1px solid var(--edge);
}

.second:last-child {
  border-block-end: none;
}

.second__link {
  display: block;
  text-decoration: none;
  color: var(--ink);
}

.second__title {
  margin-block: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-heading);
  color: var(--ink);
}

.second__link:hover .second__title {
  color: var(--ink-accent);
}

/* ---- The dated list ---------------------------------------------------- */
.article-row__date {
  min-inline-size: 6ch;
  font-family: var(--font-display);
  font-size: var(--step--2);
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--ink-faint);
  white-space: nowrap;
}

.article-row__title {
  font-size: var(--step-1);
}

/* ---- Sections index ---------------------------------------------------- */
.sections {
  border-block-start: 1px solid var(--edge);
}

.sections__link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  min-block-size: 44px;
  padding-block: var(--space-4);
  border-block-end: 1px solid var(--edge);
  text-decoration: none;
  color: var(--ink);
}

.sections__name {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-heading);
}

.sections__link:hover .sections__name {
  color: var(--ink-accent);
}

.sections__count {
  font-family: var(--font-display);
  font-size: var(--step--2);
  font-variant-numeric: tabular-nums;
  color: var(--ink-faint);
}


/* ==========================================================================
   AN ARTICLE
   ==========================================================================
   One measured column. Nothing competes with the prose.
   ========================================================================== */

.article__kicker {
  margin-block-start: var(--space-5);
}

.article__title {
  margin-block-start: var(--space-3);
  max-inline-size: 20ch;
  font-size: var(--step-4);
  font-weight: var(--weight-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-display);
  color: var(--ink);
}

.article__dek {
  margin-block-start: var(--space-5);
  max-inline-size: var(--measure);
  font-size: var(--step-1);
  line-height: var(--lh-snug);
  color: var(--ink-muted);
}

.article__byline {
  display: grid;
  gap: var(--space-1);
  margin-block-start: var(--space-5);
  padding-block-start: var(--space-4);
  border-block-start: 1px solid var(--edge);
}

.article__stale {
  margin-block-start: var(--space-5);
}

.article__hero {
  margin-block-start: var(--space-6);
  border-radius: var(--r-4);
  overflow: hidden;
}

/* Long-form prose is held to a readable measure by .prose; this is the
   article's own rhythm on top of it. */
.article__body {
  font-size: var(--step-0);
  color: var(--ink-muted);
}

/* Enough air above a heading that it reads as starting a section rather
   than ending the paragraph before it. */
.article__body h2 {
  margin-block-start: var(--space-8);
  font-size: var(--step-2);
  color: var(--ink);
}

.article__body h3 {
  margin-block-start: var(--space-6);
  font-size: var(--step-1);
  color: var(--ink);
}

.article__body table {
  margin-block: var(--space-5);
  font-size: var(--step--1);
}

.article__body th,
.article__body td {
  padding: var(--space-3);
  border-block-end: 1px solid var(--edge);
  text-align: start;
  vertical-align: top;
}

.article__body th {
  color: var(--ink);
}

.article__body blockquote {
  margin-block: var(--space-5);
  padding-inline-start: var(--space-5);
  border-inline-start: 2px solid var(--edge-gold);
  color: var(--ink);
}

/* ---- Contents ---------------------------------------------------------- */
.toc {
  margin-block-end: var(--space-6);
}

@media (min-width: 1024px) {
  .toc {
    position: sticky;
    inset-block-start: calc(var(--header-h) + var(--space-6));
    margin-block-end: 0;
  }
}

.toc__heading {
  margin-block-end: var(--space-3);
  font-family: var(--font-display);
  font-size: var(--step--2);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--ink-faint);
}

.toc__item {
  padding-block: var(--space-2);
  border-block-start: 1px solid var(--edge);
  font-size: var(--step--1);
  line-height: var(--lh-snug);
}

.toc__item--h3 {
  padding-inline-start: var(--space-4);
}

.toc__item a {
  color: var(--ink-muted);
  text-decoration: none;
}

.toc__item a:hover {
  color: var(--ink-accent);
}

/* ---- Tags -------------------------------------------------------------- */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-block-start: var(--space-7);
  padding-block-start: var(--space-5);
  border-block-start: 1px solid var(--edge);
}

.tags__item {
  padding: 0.24em 0.7em;
  background: var(--glass-2);
  border: 1px solid var(--edge);
  border-radius: var(--r-pill);
  font-size: var(--step--2);
  color: var(--ink-muted);
}


/* ==========================================================================
   ADMISSION LISTINGS
   ==========================================================================
   Status and freshness are shown together everywhere, and that pairing
   is the whole point of this component: "Open" means much less if nobody
   has checked it in two months.

   Colour is never the carrier. Every state also has a word, because a
   candidate deciding whether to apply cannot be asked to distinguish
   amber from red on a phone in daylight.
   ========================================================================== */

.listing__meta {
  align-items: baseline;
}

.listing__status {
  font-weight: var(--weight-semibold);
}

.listing__status--open { color: var(--success); }
.listing__status--closing_soon { color: var(--warning); }
.listing__status--opening_soon { color: var(--info); }
.listing__status--closed { color: var(--ink-faint); }
.listing__status--undated { color: var(--ink-faint); }

.listing__freshness--fresh { color: var(--ink-faint); }
.listing__freshness--ageing { color: var(--warning); }

.listing__freshness--stale {
  color: var(--danger);
  font-weight: var(--weight-semibold);
}

.listing__headline {
  margin-block-start: var(--space-4);
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-heading);
  color: var(--ink);
}

/* ---- Filters ------------------------------------------------------------
   The inputs here defer to forms.css for their appearance and only
   override the sizing the row needs. The old rule restated the whole
   field — background, border, colour — which is how this row ended up
   being the one place on the site whose inputs did not match the
   others. */
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-block-end: var(--space-5);
}

.filters .input {
  flex: 1 1 180px;
  inline-size: auto;
}

.filters select.input {
  flex: 0 1 200px;
}

.filters__closed {
  font-size: var(--step--2);
  color: var(--ink-muted);
}

.filters__count {
  margin-block-end: var(--space-4);
}


/* ==========================================================================
   MISCELLANY
   ========================================================================== */

/* A JAMB profile code, a centre number, a subject combination — anything
   a candidate has to copy exactly. Monospaced so the characters cannot
   be misread, which on a registration page is the entire job. */
.cell-reference {
  font-family: var(--font-mono);
  font-size: var(--step--2);
}


/* ==========================================================================
   COMMENTS
   ==========================================================================
   The one part of an article page a reader can write to.

   A comment is a person's words, so the visual weight sits on the words
   and not on the furniture: no card, no shadow, no avatar the size of a
   thumbnail. A hairline between comments and an indent for a reply is the
   whole of the structure, which is as much as two levels of nesting needs.

   The reply indent is a margin on the left, not a nested list. A nested
   list is the honest markup for arbitrary depth; this thread is capped at
   one level in the service, and a flat sequence with an indented variant
   is easier to read in the template and does not shift when a reply is
   removed.
   ========================================================================== */

.cmts {
  display: grid;
  gap: 0;
}

.cmt {
  padding-block: var(--space-5);
  border-block-start: 1px solid var(--edge);
}

.cmt:first-child { border-block-start: none; padding-block-start: 0; }

/* A reply is indented and sits on a rule rather than a tint, because a
   tinted block behind two sentences reads as a warning. */
.cmt--reply {
  margin-inline-start: var(--space-5);
  padding-inline-start: var(--space-5);
  border-inline-start: 2px solid var(--edge);
}

@media (min-width: 48rem) {
  .cmt--reply {
    margin-inline-start: var(--space-7);
  }
}

.cmt__who {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.cmt__by { min-inline-size: 0; }

.cmt__name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--step--1);
  font-weight: var(--weight-semibold);
  color: var(--ink);
}

/* A reply from the academy is marked, because a reader needs to tell an
   answer from another reader's guess — and on a page about examination
   deadlines that difference is the whole value of the thread. */
.cmt__badge {
  padding: 0.12em 0.5em;
  border: 1px solid color-mix(in oklab, var(--ink-accent) 40%, transparent);
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-size: var(--step--2);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--ink-accent);
}

.cmt__when {
  margin-block-start: 1px;
  font-size: var(--step--2);
  color: var(--ink-faint);
}

.cmt__text {
  margin-block-start: var(--space-3);
  font-size: var(--step--1);
  line-height: var(--lh-body);
}

.cmt__act {
  margin-block-start: var(--space-3);
}


/* ---- The form ---------------------------------------------------------
   Given a ground, because it is the one thing on this page that is not
   reading matter and the reader should be able to find it by shape. */

.cform {
  padding: var(--space-5);
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: var(--r-4);
}

@media (min-width: 48rem) {
  .cform { padding: var(--space-6); }
}

.cform__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin-block-end: var(--space-4);
}

.cform__title {
  font-family: var(--font-display);
  font-size: var(--step-0);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-heading);
  color: var(--ink);
}

.cform__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  margin-block-start: var(--space-5);
}

/* The moderation rule, said before somebody types rather than discovered
   afterwards when nothing appears on the page. */
.cform__note {
  flex: 1 1 18rem;
  font-size: var(--step--2);
  line-height: var(--lh-snug);
  color: var(--ink-faint);
  text-wrap: pretty;
}
