/* Stulete Foundation — shared design tokens + component patterns.
   Loaded by every page after the Google Fonts <link> and before each
   page's own <style> block, so page-specific rules can still override
   where a genuine exception is needed. No build step: plain CSS only. */

:root {
  /* Canonical palette — restated here as the single source of truth.
     Per-page :root blocks may keep duplicating these; they must not diverge. */
  --ink: #0E1A0F;
  --forest: #1B4332;
  --moss: #2D6A4F;
  --sage: #52B788;
  --mist: #B7E4C7;
  --cream: #F8F5EE;
  --warm: #EDE8DC;
  --gold: #C9A84C;
  --muted: #6B7A6E;
  --border: #D8D4C8;
  --gold-light: #DDC06A;
  --gold-dark: #8A6D1A;
  --alert: #A6564A;
  --alert-tint: rgba(166, 86, 74, .08);

  /* Spacing scale — 8px grid */
  --sp-1: .25rem;   /* 4px */
  --sp-2: .5rem;    /* 8px */
  --sp-3: .75rem;   /* 12px */
  --sp-4: 1rem;     /* 16px */
  --sp-5: 1.5rem;   /* 24px */
  --sp-6: 2rem;     /* 32px */
  --sp-7: 3rem;     /* 48px */
  --sp-8: 4.5rem;   /* 72px */

  /* Radius scale */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 999px;

  /* Shadow scale — neutral forest-tinted (rgba of --ink), never a colored glow */
  --shadow-xs: 0 1px 2px rgba(14, 26, 15, .06);
  --shadow-sm: 0 2px 8px rgba(14, 26, 15, .07), 0 1px 2px rgba(14, 26, 15, .05);
  --shadow-md: 0 8px 24px rgba(14, 26, 15, .09), 0 2px 6px rgba(14, 26, 15, .06);
  --shadow-lg: 0 20px 48px rgba(14, 26, 15, .14), 0 6px 16px rgba(14, 26, 15, .08);
  --shadow-hover: 0 14px 32px rgba(14, 26, 15, .12), 0 4px 10px rgba(14, 26, 15, .07);

  /* Type scale */
  --font-display: 'Spectral', serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mark: 'Bebas Neue', sans-serif;

  --fs-display: clamp(2.25rem, 4.5vw, 3.4rem);
  --fs-h1: clamp(1.75rem, 3vw, 2.4rem);
  --fs-h2: 1.35rem;
  --fs-h3: 1.05rem;
  --fs-body: .95rem;
  --fs-small: .8rem;
  --fs-label: .6875rem;
  --tracking-label: .12em;
}

/* Icon base sizing — follows font-size + currentColor by default */
.icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.125em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────
   GENERIC CARD
   ───────────────────────────────────────────────────────── */
.stu-card {
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: box-shadow .2s ease, transform .2s ease;
}
.stu-card--interactive { cursor: pointer; }
.stu-card--interactive:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.stu-card--interactive:active {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px) scale(.98);
}

/* ─────────────────────────────────────────────────────────
   METRIC / STAT CARD
   ───────────────────────────────────────────────────────── */
.stu-metric-card {
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: box-shadow .2s ease, transform .2s ease;
  position: relative;
}
.stu-metric-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.stu-metric-card:active {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px) scale(.98);
}
.stu-metric-accent {
  display: block;
  width: 28px;
  height: 2px;
  background: var(--gold);
  border-radius: var(--r-full);
  margin-top: .4rem;
}

/* ─────────────────────────────────────────────────────────
   DATA TABLE WRAP
   ───────────────────────────────────────────────────────── */
.stu-table-wrap {
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
.stu-table-head-dark {
  background: var(--forest) !important;
}
.stu-table-head-dark th {
  color: var(--mist) !important;
}

/* ─────────────────────────────────────────────────────────
   STATUS PILL — real CSS dot instead of an inline glyph
   ───────────────────────────────────────────────────────── */
.stu-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--r-full);
  font-weight: 700;
}
.stu-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────
   HERO / PAGE HEADER
   ───────────────────────────────────────────────────────── */
.stu-hero {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  padding-bottom: var(--sp-6);
}
.stu-hero-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--forest);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}
.stu-hero-title {
  font-family: var(--font-display);
  font-size: var(--fs-display);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
}

/* ─────────────────────────────────────────────────────────
   DARK CTA CARD — forest fill + subtle radial highlight
   (decorative highlight on a solid brand color, not a new gradient)
   ───────────────────────────────────────────────────────── */
.stu-cta-dark {
  background: var(--forest);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.stu-cta-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 100% 0%, rgba(183, 228, 199, .12), transparent 60%);
  pointer-events: none;
}

/* ─────────────────────────────────────────────────────────
   EMPTY STATE
   ───────────────────────────────────────────────────────── */
.stu-empty-state {
  text-align: center;
  padding: var(--sp-7) var(--sp-5);
  border: 1.5px dashed var(--border);
  border-radius: var(--r-lg);
  background: rgba(237, 232, 220, .35);
}
.stu-empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--mist);
  color: var(--forest);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin: 0 auto var(--sp-3);
}
.stu-empty-title {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: .3rem;
}
.stu-empty-sub {
  font-size: var(--fs-small);
  color: var(--muted);
}

/* ─────────────────────────────────────────────────────────
   MOBILE
   ───────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .stu-hero { flex-direction: column; gap: var(--sp-2); }
  .stu-hero-icon { width: 48px; height: 48px; font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  /* Keep the existing hover lift, drop only the new press-scale */
  .stu-card--interactive:active { transform: translateY(-2px); }
  .stu-metric-card:active { transform: translateY(-2px); }
}
