/**
 * Shared layout for multi-state exam shells (FAST, future programs).
 * Uses theme tokens from exam.json applied as --se-* on :root (see state-exam-runtime.js).
 */
:root {
  --se-accent: #1e3a6e;
  --se-accent-hover: #162d58;
  --se-accent-soft: #eef2f9;
  --se-page-bg: #f3f4f6;
  --se-card: #ffffff;
  --se-text: #1a2030;
  --se-text-mid: #4b5563;
  --se-muted: #6b7280;
  --se-border: #e2e6ea;
  --se-radius: 12px;
  --se-font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --se-container: 1120px;
}

.se-shell {
  margin: 0;
  min-height: 100vh;
  font-family: var(--se-font);
  background: var(--se-page-bg);
  color: var(--se-text);
  line-height: 1.55;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

.se-shell a {
  color: var(--se-accent);
  text-decoration: none;
}
.se-shell a:hover {
  text-decoration: underline;
}

.se-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--se-card);
  border-bottom: 1px solid var(--se-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.se-header__inner {
  max-width: var(--se-container);
  margin: 0 auto;
  padding: 0 1.5rem;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.se-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--se-text);
  text-decoration: none;
}
.se-brand:hover {
  text-decoration: none;
  color: var(--se-accent);
}
.se-brand__icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--se-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
}
.se-nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  font-size: 0.84rem;
  font-weight: 500;
}
.se-nav-links a {
  color: var(--se-text-mid);
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
}
.se-nav-links a:hover,
.se-nav-links a[aria-current="page"] {
  color: var(--se-accent);
  border-bottom-color: var(--se-accent);
  text-decoration: none;
}

.se-main {
  max-width: var(--se-container);
  margin: 0 auto;
  padding: 2rem 1.5rem 3.5rem;
}

.se-hero {
  text-align: center;
  padding: 2rem 0 2.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--se-border);
}
.se-hero h1 {
  font-size: clamp(1.45rem, 2.8vw, 1.95rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.65rem;
}
.se-hero p {
  max-width: 38rem;
  margin: 0 auto 1.25rem;
  color: var(--se-muted);
}

.se-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.2rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}
.se-btn:hover {
  text-decoration: none;
}
.se-btn--primary {
  background: var(--se-accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.se-btn--primary:hover {
  background: var(--se-accent-hover);
}
.se-btn--ghost {
  background: transparent;
  color: var(--se-text-mid);
  border: 1px solid var(--se-border);
}
.se-btn--ghost:hover {
  background: var(--se-accent-soft);
  color: var(--se-text);
}

.se-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.1rem;
}
.se-card {
  background: var(--se-card);
  border: 1px solid var(--se-border);
  border-radius: var(--se-radius);
  padding: 1.2rem 1.25rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}
.se-card h2 {
  font-size: 1rem;
  margin: 0 0 0.4rem;
}
.se-card p {
  font-size: 0.86rem;
  color: var(--se-muted);
  margin: 0 0 0.85rem;
  line-height: 1.45;
}

.se-foot {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--se-border);
  font-size: 0.8rem;
  color: var(--se-muted);
  text-align: center;
}

/* FAST modules hub — active vs inactive grade tiles */
.se-card--fast-grade {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.se-card--fast-grade .se-fast-pm {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--se-muted);
  margin: 0 0 0.5rem;
}
.se-fast-pm-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.65rem;
}
.se-fast-pm-pills span {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  border: 1px solid var(--se-border);
  color: var(--se-muted);
  background: var(--se-page-bg);
}
.se-fast-pm-pills span.is-pm-active {
  border-color: var(--se-accent);
  color: var(--se-accent);
  background: var(--se-accent-soft);
}
.se-card--active {
  border-color: var(--se-accent);
  box-shadow: 0 0 0 1px var(--se-accent-soft), 0 2px 10px rgba(0, 0, 0, 0.06);
}
.se-card--inactive {
  opacity: 0.58;
}

/* FAST onboarding */
.fast-grade-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1.25rem;
}
.fast-grade-btn {
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--se-border);
  background: var(--se-card);
  font-size: 0.86rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  color: var(--se-text-mid);
}
.fast-grade-btn:hover {
  border-color: var(--se-accent);
  color: var(--se-accent);
}
.fast-grade-btn[aria-pressed="true"] {
  background: var(--se-accent-soft);
  border-color: var(--se-accent);
  color: var(--se-accent);
}
.fast-subject-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}
.fast-subject-list li {
  margin: 0.35rem 0;
}
.fast-subject-list label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  color: var(--se-text);
  cursor: pointer;
}

/* FAST dashboard shell */
.fast-dash-wrap {
  max-width: 960px;
  margin: 0 auto;
}
.fast-dash-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.75rem 1.25rem;
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
  background: var(--se-card);
  border: 1px solid var(--se-border);
  border-radius: var(--se-radius);
  font-size: 0.86rem;
  color: var(--se-muted);
}
.fast-dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.1rem;
}
.fast-dash-card {
  background: var(--se-card);
  border: 1px solid var(--se-border);
  border-radius: var(--se-radius);
  padding: 1.2rem 1.25rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  border-top: 3px solid var(--se-accent);
}
.fast-dash-card h2 {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--se-muted);
  margin: 0 0 0.5rem;
}
.fast-dash-card .lead {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--se-text);
  margin: 0 0 0.5rem;
}
.fast-dash-card p {
  font-size: 0.86rem;
  color: var(--se-muted);
  margin: 0;
  line-height: 1.5;
}
