.sch-reveal-stage {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: rgba(10, 18, 32, 0.62);
  backdrop-filter: blur(8px);
  overflow: auto;
}

.sch-reveal-frame {
  position: relative;
  width: min(360px, calc(100vw - 32px));
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 450ms cubic-bezier(0.22, 1, 0.36, 1);
}

.sch-reveal-stage.is-wide .sch-reveal-frame {
  width: min(860px, calc(100vw - 48px));
}

.sch-mail {
  position: relative;
  width: 100%;
  height: 220px;
  perspective: 1600px;
}

.sch-reveal-stage.is-wide .sch-mail {
  height: auto;
}

.sch-flipper {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 50%;
  height: 200px;
  margin-top: -100px;
  transform-style: preserve-3d;
  z-index: 3;
  transition: opacity 320ms ease, transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.sch-reveal-stage.is-flip .sch-flipper {
  animation: schFlipOpen 1.1s cubic-bezier(0.45, 0.05, 0.2, 1) forwards;
}

@keyframes schFlipOpen {
  from { transform: rotateY(0deg); }
  to { transform: rotateY(180deg); }
}

.sch-reveal-stage.is-gone .sch-flipper {
  opacity: 0;
  transform: rotateY(180deg) translateY(16px);
  pointer-events: none;
}

.sch-flip-face {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}

.sch-flip-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 16px;
  text-align: center;
  color: #fff;
  background: linear-gradient(160deg, #12243a 0%, #1a365d 48%, #2d5a8c 100%);
  box-shadow: 0 16px 32px rgba(26, 54, 93, 0.28);
}

.sch-flip-brand::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  pointer-events: none;
}

.sch-flip-label {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  opacity: 0.85;
}

.sch-flip-name {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
  max-width: 14ch;
}

.sch-flip-logo {
  width: 68px;
  height: 68px;
  object-fit: contain;
  border-radius: 14px;
  background: #fff;
}

.sch-flip-open {
  transform: rotateY(180deg);
}

.sch-env,
.sch-env-body {
  position: absolute;
  inset: 0;
}

.sch-env-body {
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(180deg, #244b7a 0%, #1a365d 58%, #152a4a 100%);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.18);
}

.sch-env-flap {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 46%;
  background: linear-gradient(180deg, #3b7ab8 0%, #1f4470 100%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  opacity: 0.92;
}

.sch-env-pocket {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 58%;
  z-index: 3;
  background: linear-gradient(180deg, #2d5a8c, #152a4a);
  clip-path: polygon(0 0, 50% 62%, 100% 0, 100% 100%, 0 100%);
}

.sch-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  border-radius: 16px;
  background: #fffcf7;
  border: 1px solid rgba(26, 54, 93, 0.08);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  transform: translateY(48px);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition:
    transform 550ms cubic-bezier(0.22, 1, 0.36, 1),
    max-width 450ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 550ms ease,
    opacity 280ms ease;
}

.sch-reveal-stage.is-peek .sch-card {
  opacity: 1;
  visibility: visible;
}

.sch-reveal-stage.is-out .sch-card {
  z-index: 4;
  transform: translateY(-40px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
}

.sch-reveal-stage.is-wide .sch-card {
  max-width: 860px;
  transform: translateY(0);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.16);
}

.sch-card-peek {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 88px;
  padding: 18px 20px 12px;
  color: #1a365d;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.sch-card-peek-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ecfdf3;
  color: #067647;
  font-size: 14px;
}

.sch-reveal-stage.is-content .sch-card-peek {
  display: none;
}

.sch-results {
  display: none;
  padding: 32px 36px 28px;
  text-align: center;
  color: #12243a;
}

.sch-reveal-stage.is-content .sch-results {
  display: block;
  animation: schRevealIn 300ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes schRevealIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.sch-results-title {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.25;
}

.sch-results-sub {
  margin: 0 auto 28px;
  max-width: 38ch;
  font-size: 15px;
  line-height: 1.6;
  color: #64748b;
}

.sch-results-empty {
  margin: 0 auto 8px;
  max-width: 36ch;
  font-size: 15px;
  line-height: 1.65;
  color: #475569;
}

.sch-results-disclaimer {
  margin: 16px 0 0;
  max-width: none;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.45;
  color: #b42318;
  text-align: right;
}

.sch-results-table-wrap {
  width: 100%;
}

.sch-results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.sch-results-table th,
.sch-results-table td {
  padding: 14px 12px;
  border-bottom: 1px solid #eef2f7;
  text-align: center;
  vertical-align: middle;
}

.sch-results-table th {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.sch-results-table td:first-child {
  color: #1a365d;
  font-weight: 800;
  text-align: right;
  padding-right: 4px;
}

.sch-results-table td:last-child {
  text-align: right;
}

.sch-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 26px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.sch-badge.is-yes {
  background: #ecfdf3;
  color: #067647;
}

.sch-badge.is-no {
  background: #fef3f2;
  color: #b42318;
}

.sch-badge.is-maybe {
  background: #fffaeb;
  color: #b54708;
}

.sch-badge.is-muted {
  background: #f8fafc;
  color: #64748b;
}

.sch-results-detail {
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.sch-apply-copy {
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
}

.sch-found-link {
  color: #2d5a8c;
  font-size: 14px;
  font-weight: 800;
  text-decoration: underline;
}

.sch-found-note {
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
}

.sch-results-cards {
  display: none;
}

.sch-result-card {
  text-align: right;
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 14px;
  padding: 16px 16px 14px;
  margin: 0 0 12px;
}

.sch-result-card h3 {
  margin: 0 0 10px;
  font-size: 17px;
  color: #1a365d;
}

.sch-result-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.sch-result-card p {
  margin: 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
}

.sch-results-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

.sch-pdf-btn,
.sch-done-btn {
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 12px 20px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}

.sch-pdf-btn {
  background: #eef3fa;
  color: #1a365d;
}

.sch-done-btn {
  background: linear-gradient(135deg, #1a365d 0%, #2d5a8c 100%);
  color: #fff;
}

@media (max-width: 720px) {
  .sch-reveal-stage.is-wide .sch-reveal-frame,
  .sch-reveal-stage.is-wide .sch-card {
    width: min(100%, calc(100vw - 24px));
    max-width: none;
  }

  .sch-results {
    padding: 24px 18px 22px;
  }

  .sch-results-title {
    font-size: 22px;
  }

  .sch-results-table-wrap {
    display: none;
  }

  .sch-results-cards {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sch-flipper,
  .sch-card,
  .sch-reveal-frame,
  .sch-results {
    transition: none !important;
    animation: none !important;
  }

  .sch-reveal-stage.is-reduced .sch-flipper {
    opacity: 0;
  }

  .sch-reveal-stage.is-reduced .sch-card {
    transform: none;
    max-width: 860px;
  }

  .sch-reveal-stage.is-reduced .sch-results {
    display: block;
    opacity: 1;
    transform: none;
  }

  .sch-reveal-stage.is-reduced .sch-card-peek {
    display: none;
  }
}
