/* ==========================================================================
   admin-today.css — the Today surface. Prefix: .apx-td-
   Idiom: student dashboard, not a SaaS admin. Bare ground, hairline rules,
   Fraunces numerals, small-caps labels, underline-quiet actions. Tokens only.
   Dark-mode-native for free via theme-pure.css tokens.
   ========================================================================== */

.apx-td {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.6rem 1.1rem 4rem;
}

/* --- hero: the one graph ------------------------------------------------- */
.apx-td-hero {
  margin: 0.4rem 0 0.9rem;
}
.apx-td-spark {
  position: relative;
  display: block;
}
.apx-td-spark-svg {
  display: block;
  width: 100%;
  height: 132px;
  overflow: visible;
}
.apx-td-spark-area { fill: var(--accent-wash); stroke: none; }
.apx-td-spark-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
  /* keep the 2px stroke crisp regardless of the non-uniform viewBox scale */
  vector-effect: non-scaling-stroke;
}
.apx-td-spark-dot {
  fill: var(--accent);
  stroke: var(--surface);
  stroke-width: 2;
}
/* head row: small-caps label left, the current value right (out of the plot) */
.apx-td-spark-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 0.65rem;
}
.apx-td-spark-lab {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 0.45rem;
}
.apx-td-spark-read {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  line-height: 1;
}
.apx-td-spark-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 0.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.apx-td-hero-val {
  font-family: "Fraunces", Georgia, serif;
  font-size: 2.65rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.apx-td-hero-cap {
  margin-top: 0.15rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.apx-td-hero-flat {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  min-height: 132px;
  padding-top: 1rem;
}

/* --- the one hairline summary sentence ---------------------------------- */
.apx-td-sentence {
  margin: 0 0 1.8rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}
.apx-td-sentence b {
  color: var(--ink);
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* --- worklist section label --------------------------------------------- */
.apx-td-worklabel {
  margin: 0 0 0.9rem;
  font-family: "Hanken Grotesk", ui-sans-serif, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --- worklist cards: bare rows on ground, hairline-separated ------------ */
.apx-td-cards {
  display: flex;
  flex-direction: column;
}
.apx-td-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 0.5rem 1rem 0.65rem;
  border-top: 1px solid var(--line);
  outline: none;
}
.apx-td-card:last-child { border-bottom: 1px solid var(--line); }
.apx-td-card.is-focus {
  background: var(--surface-soft);
  box-shadow: inset 3px 0 0 0 var(--accent);
}
.apx-td-band {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: 0.5rem;
  border-radius: 50%;
}
.apx-td-band-red { background: var(--accent); }
.apx-td-band-amber { background: var(--warn); }

.apx-td-card-body {
  flex: 1 1 auto;
  min-width: 0;
}
.apx-td-card-title {
  margin: 0;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.3;
}
.apx-td-card-sub {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.apx-td-card-acts {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.35rem 0.9rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* actions: one filled primary; the rest are underline-quiet */
.apx-td-act {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}
.apx-td-act-primary {
  padding: 0.42rem 0.9rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}
.apx-td-act-primary:hover { background: var(--accent-strong); }
.apx-td-act-quiet {
  padding: 0.42rem 0.1rem;
  color: var(--muted);
  font-size: 0.88rem;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
  white-space: nowrap;
}
.apx-td-act-quiet:hover { color: var(--ink); text-decoration-color: var(--accent); }
.apx-td-act-nav {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
  background: none;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
}
.apx-td-act-nav:hover { border-color: var(--accent); color: var(--accent); }
.apx-td-act:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 999px;
}

/* --- empty state: the pen-stroke em signature --------------------------- */
.apx-td-empty {
  padding: 2.6rem 0 1.4rem;
  text-align: left;
}
.apx-td-empty-head {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.1;
}
.apx-td-empty-sub {
  margin: 0.7rem 0 0;
  font-size: 1.05rem;
  color: var(--muted);
}
/* the examiner's pen stroke, same data-URI technique as loop.css
   .loop-move-headline em (light-mode accent %23891d1a baked in). */
.apx-td-signoff {
  font-style: italic;
  color: var(--accent);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12' preserveAspectRatio='none'%3E%3Cpath d='M3 9 C 30 4 80 3.5 117 6.5' fill='none' stroke='%23891d1a' stroke-width='2.4' stroke-linecap='round' opacity='0.8'/%3E%3C/svg%3E") no-repeat bottom center / 100% 0.3em;
  padding-bottom: 0.16em;
}
/* dark theme: recolour the stroke to the dark accent (%23e0736a) —
   a data-URI can't read a token, so this override is the sanctioned exception. */
html[data-theme="dark"] .apx-td-signoff {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12' preserveAspectRatio='none'%3E%3Cpath d='M3 9 C 30 4 80 3.5 117 6.5' fill='none' stroke='%23e0736a' stroke-width='2.4' stroke-linecap='round' opacity='0.85'/%3E%3C/svg%3E");
}

/* --- mobile: 390px, no horizontal overflow ------------------------------ */
@media (max-width: 560px) {
  .apx-td { padding: 1.2rem 0.9rem 3rem; }
  .apx-td-hero-val { font-size: 2.1rem; }
  .apx-td-spark-svg { height: 108px; }
  .apx-td-card {
    flex-wrap: wrap;
    row-gap: 0.7rem;
  }
  .apx-td-card-acts {
    flex-basis: 100%;
    justify-content: flex-start;
    padding-left: 1.85rem;
  }
}
