/* sps-simulator.css */
.sps-page-wrapper {
  --sps-ink: #1A1613;
  --sps-ink-2: #221D19;
  --sps-ink-3: #2A2420;
  --sps-ink-4: #1F1A16;
  --sps-ink-5: #332C26;
  --sps-crimson: #9B1B30;
  --sps-crimson-deep: #7A1425;
  --sps-cream: #F8F4EC;
  --sps-cream-dim: rgba(248, 244, 236, 0.72);
  --sps-cream-ghost: rgba(248, 244, 236, 0.14);
  --sps-dark-text: #181412;
  --sps-dark-dim: rgba(24, 20, 18, 0.72);

  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--sps-ink);
  color: var(--sps-cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.sps-page-wrapper * {
  box-sizing: border-box;
}

/* Accessibility: Skip link */
.sps-skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--sps-crimson);
  color: var(--sps-cream);
  padding: 8px 16px;
  z-index: 100;
  transition: top 0.2s;
  text-decoration: none;
}
.sps-skip-link:focus {
  top: 0;
  outline: 2px solid var(--sps-cream);
  outline-offset: 2px;
}

/* Typography */
.sps-page-wrapper h1,
.sps-page-wrapper h2,
.sps-page-wrapper h3 {
  font-family: Georgia, serif;
  font-weight: normal;
  margin-top: 0;
  margin-bottom: 1rem;
}

.sps-title {
  font-size: 2.5rem;
  line-height: 1.2;
  color: var(--sps-cream);
}

.sps-subtitle {
  font-size: 1.125rem;
  color: var(--sps-cream-dim);
  max-width: 600px;
  margin-bottom: 2rem;
}

/*
 * Eyebrow: option (b). Text is cream (16.4:1 on ink, passes WCAG AA) while the
 * crimson rule preserves the brand accent. Crimson TEXT on dark ink is only
 * 2.22:1 and would fail AA, so the crimson is carried by the rule, not the type.
 */
.sps-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--sps-cream);
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.14em;
  margin-bottom: 1rem;
  font-weight: 600;
}
.sps-eyebrow::before {
  content: "";
  flex: 0 0 auto;
  width: 28px;
  height: 2px;
  background-color: var(--sps-crimson);
}

/* Layout */
.sps-section {
  padding: 5rem 1.5rem;
}

.sps-container {
  max-width: 1200px;
  margin: 0 auto;
}

.sps-container--wide {
  max-width: 1440px;
}

.sps-grid {
  display: grid;
  gap: 2rem;
}

.sps-grid--3 {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .sps-grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Buttons */
.sps-button-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .sps-button-group {
    flex-direction: row;
    align-items: center;
  }
}

.sps-button-group--center {
  justify-content: center;
}

.sps-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.5rem;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.sps-btn:focus-visible {
  outline: 2px solid var(--sps-crimson);
  outline-offset: 4px;
}

.sps-btn--primary {
  background-color: var(--sps-crimson);
  color: var(--sps-cream);
}

.sps-btn--primary:hover {
  background-color: var(--sps-crimson-deep);
}

.sps-btn--secondary {
  background-color: transparent;
  color: var(--sps-cream);
  border: 1px solid var(--sps-ink-5);
}

.sps-btn--secondary:hover {
  background-color: var(--sps-ink-3);
  border-color: var(--sps-cream-dim);
}

/* Hero Section */
.sps-hero {
  background-color: var(--sps-ink);
  padding-top: 6rem;
  padding-bottom: 6rem;
}

@media (min-width: 1024px) {
  .sps-title {
    font-size: 3.5rem;
  }
  .sps-hero {
    padding-top: 8rem;
    padding-bottom: 8rem;
  }
}

/* Cards */
.sps-card {
  padding: 2rem;
  height: 100%;
}

.sps-card__rule {
  width: 40px;
  height: 2px;
  background-color: var(--sps-crimson);
  margin-bottom: 1.5rem;
}

.sps-card__title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.sps-card__text {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
}

/* Dark Condition Section */
.sps-condition {
  background-color: var(--sps-ink-2);
  border-top: 1px solid var(--sps-cream-ghost);
  /* Tightened so the problem cards stay but the calculator sits closer to the top. */
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.sps-card--dark {
  background-color: var(--sps-ink-3);
  border: 1px solid var(--sps-ink-5);
}

.sps-card--dark .sps-card__title {
  color: var(--sps-cream);
}

.sps-card--dark .sps-card__text {
  color: var(--sps-cream-dim);
}

/* Simulator Section */
.sps-simulator-section {
  background-color: var(--sps-ink);
  border-top: 1px solid var(--sps-crimson);
  padding: 2.5rem 1.5rem 3.5rem;
}

.sps-simulator-head {
  margin-bottom: 1.25rem;
  max-width: 720px;
}

/* Credential line (replaces the removed three-figure proof band) */
.sps-credential {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--sps-cream-dim);
  margin: 0;
}

.sps-credential__link {
  color: var(--sps-cream);
  text-decoration: none;
  border-bottom: 1px solid var(--sps-crimson);
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.sps-credential__link:hover {
  color: var(--sps-crimson);
  border-color: var(--sps-crimson);
}

.sps-credential__link:focus-visible {
  outline: 2px solid var(--sps-crimson);
  outline-offset: 3px;
}

/* Visually hidden but present for assistive tech (the simulator region heading) */
.sps-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.sps-app {
  width: 100%;
  /* Clear the fixed site nav (68px) when the hero CTA jumps to #simulator. */
  scroll-margin-top: 88px;
}

.sps-app__frame {
  width: 100%;
  min-height: 600px;
  /* Light panel: the calculator is a dense data-entry instrument, so it sits on
     a cream surface set into the dark section rather than fighting a dark reskin. */
  background-color: var(--sps-cream);
  color: var(--sps-dark-text);
  border: 1px solid var(--sps-ink-5);
  border-radius: 8px;
  /* Mobile: vertical inset only, so the calculator keeps full container width
     and never clips. Larger screens get a framed inset. */
  padding: 0.75rem 0;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
  /* No overflow clipping here: it would trap the calculator's sticky score
     board and stop the live projection from staying in view while scrolling. */
}

/* Keep the calculator's sticky score board pinned clear of the fixed site nav
   (68px) so the live score + grade stay visible while the inputs are edited. */
.sps-app__frame .sticky {
  top: 76px;
}

@media (min-width: 768px) {
  .sps-app__frame {
    padding: 2.25rem;
  }
}

/* Closing Section */
.sps-closing {
  background-color: var(--sps-ink);
  text-align: center;
  padding: 6rem 1.5rem;
}

.sps-closing .sps-title {
  margin-bottom: 1rem;
}

.sps-closing .sps-subtitle {
  margin: 0 auto 2.5rem auto;
}
