/* =====================================================================
 * ionik-mark-panel.css — predicted exam mark panel
 * ---------------------------------------------------------------------
 * Sits on ionik-cream tokens only. No new colours, no new radii, no
 * gradients. Panels stay square-leaning per the cream rule (soft 24px
 * cards read as template filler); pills stay round.
 *
 * Load order:
 *   ionik-cream.css -> ionik-motion.css -> ionik-mark-panel.css
 *
 * Motion is left to the .fx-* classes in ionik-motion.css. The only
 * transitions declared here are on elements cream does not already
 * cover (the scale marker and the gap bars).
 * ===================================================================== */

/* ── Headline ────────────────────────────────────────────────────── */

.mk-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.mk-band {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-muted);
}

.mk-nums {
  font-size: 46px;
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 500;          /* cream caps body weight at 600; 500 reads calmer at this size */
  color: var(--ink);
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}
.mk-nums .mk-dash {
  color: var(--ink-faint);
  margin: 0 6px;
  font-weight: 300;
}

.mk-sub {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 8px;
}
.mk-sub .mk-reach { color: var(--r-green); }

/* Info affordance — a circle, matching .bell / .avatar geometry. */
.mk-info {
  flex: 0 0 auto;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sans);
  padding: 0;
}
.mk-info:hover { background: var(--panel); color: var(--ink); }

.mk-note {
  margin-top: 14px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--rule-soft);
  border-radius: var(--r-sm);
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* ── Provisional (operator override) ─────────────────────────────
   A dashed outline on the whole panel rather than an accent edge: the
   state applies to everything inside it, so it reads on every side. The
   scale's own colours are left alone, since they already mean something. */

.panel.is-provisional {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--r-amber) 48%, var(--rule));
}

.mk-prov {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: -4px 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule-faint);
  flex-wrap: wrap;
}
.mk-prov .tag {
  background: color-mix(in srgb, var(--r-amber) 14%, transparent);
  color: var(--r-amber);
  border-color: color-mix(in srgb, var(--r-amber) 34%, transparent);
  flex: 0 0 auto;
}
.mk-prov-why {
  font-size: 11.5px;
  color: var(--ink-muted);
  line-height: 1.55;
  flex: 1 1 240px;
  min-width: 0;
}

/* ── Band scale ──────────────────────────────────────────────────── */

.mk-scale { margin-top: 26px; }

.mk-track {
  position: relative;
  height: 34px;
  border-bottom: 1px solid var(--rule);
}

/* The interval, not a point. Width carries the uncertainty honestly. */
.mk-interval {
  position: absolute;
  top: 10px; height: 8px;
  background: var(--ink);
  border-radius: var(--r-pill);
  opacity: 0.85;
}

.mk-point {
  position: absolute;
  top: 4px;
  width: 2px; height: 20px;
  background: var(--bg);
  border-radius: 1px;
}

/* NESA fixes these cut-offs, so they are drawn as rules, not decoration. */
.mk-cut {
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--rule);
}
.mk-cut span {
  position: absolute;
  top: 100%; left: 0;
  transform: translateX(-50%);
  padding-top: 6px;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  white-space: nowrap;
}

.mk-scale-legend {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

/* ── Year strip ──────────────────────────────────────────────────── */

.mk-years {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--rule-soft);
}

.mk-years-hd {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: 4px;
}
.mk-years-sub {
  font-size: 11.5px;
  color: var(--ink-faint);
  margin-bottom: 16px;
}

.mk-year-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.mk-year {
  border: 1px solid var(--rule-soft);
  border-radius: var(--r-sm);
  background: var(--bg-2);
  padding: 12px 8px 10px;
  text-align: center;
}
.mk-year.is-b6 {
  border-color: color-mix(in srgb, var(--r-green) 34%, transparent);
  background: color-mix(in srgb, var(--r-green) 8%, var(--bg-2));
}

.mk-year .yr {
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}
.mk-year .al {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-top: 5px;
  font-variant-numeric: tabular-nums;
}
.mk-year.is-b6 .al { color: var(--r-green); }
.mk-year .cut {
  font-size: 10px;
  color: var(--ink-faint);
  margin-top: 5px;
}
/* A year resting on thin crowdsourced data must not look as solid as one
   corroborated by two sources. */
.mk-year.thin { opacity: 0.62; }
.mk-year.thin .al { font-weight: 400; }

/* ── Basis + empty state ─────────────────────────────────────────── */

.mk-basis {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--rule-soft);
  font-size: 11.5px;
  color: var(--ink-muted);
  line-height: 1.6;
}

.mk-empty-hd {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.mk-empty-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.mk-empty-list li {
  font-size: 13px;
  color: var(--ink-soft);
  padding: 9px 0 9px 18px;
  border-bottom: 1px solid var(--rule-faint);
  position: relative;
}
.mk-empty-list li:last-child { border-bottom: 0; }
.mk-empty-list li::before {
  content: '';
  position: absolute; left: 2px; top: 16px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--ink-faint);
}

/* ── Narrow ──────────────────────────────────────────────────────── */

@media (max-width: 720px) {
  .mk-nums { font-size: 38px; }
  .mk-year-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .mk-gap { grid-template-columns: 78px 1fr 56px; gap: 10px; }
}
