.spelling-test-generator-page {
  background: #f7f8fc;
}

.stg-hero {
  background: radial-gradient(circle at 10% 20%, rgba(119, 91, 255, .17), transparent 36%),
    linear-gradient(135deg, #f8f7ff 0%, #eef6ff 100%);
  border-bottom: 1px solid #e4e7f1;
}

.stg-eyebrow,
.stg-step-label {
  color: #6750d8;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.stg-hero h1 {
  color: #1d2340;
  font-size: clamp(2.25rem, 5vw, 4.4rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.02;
  margin: 1rem 0;
}

.stg-lead,
.stg-section-lead {
  color: #566078;
  font-size: 1.12rem;
  line-height: 1.75;
  max-width: 760px;
}

.stg-badge {
  align-items: center;
  background: rgba(255, 255, 255, .88);
  border: 1px solid #dddff0;
  border-radius: 999px;
  color: #343b55;
  display: inline-flex;
  font-size: .9rem;
  font-weight: 650;
  gap: .45rem;
  padding: .55rem .85rem;
}

.stg-hero-note {
  align-items: flex-start;
  background: #fff;
  border: 1px solid #e1e3ef;
  border-radius: 20px;
  box-shadow: 0 20px 45px rgba(47, 51, 91, .09);
  display: flex;
  gap: 1rem;
  padding: 1.4rem;
}

.stg-hero-note > i {
  background: #eeeaff;
  border-radius: 14px;
  color: #6750d8;
  font-size: 1.25rem;
  padding: .9rem;
}

.stg-hero-note p {
  color: #687087;
  margin: .35rem 0 0;
}

.stg-tool-wrap {
  margin-top: -1rem;
  position: relative;
  z-index: 2;
}

.stg-tool-card,
.stg-result-card {
  background: #fff;
  border: 1px solid #e1e4ef;
  border-radius: 24px;
  box-shadow: 0 22px 60px rgba(39, 44, 78, .1);
  margin-bottom: 2rem;
  padding: clamp(1.25rem, 3vw, 2.2rem);
}

.stg-tool-heading {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1.4rem;
}

.stg-tool-heading h2,
.stg-result-card h2 {
  color: #202642;
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  font-weight: 780;
  margin: .35rem 0;
}

.stg-tool-heading p,
.stg-result-card p {
  color: #687087;
  margin: 0;
}

.stg-counter {
  background: #f0edff;
  border-radius: 999px;
  color: #5f49cd;
  font-size: .85rem;
  font-weight: 750;
  padding: .45rem .75rem;
  white-space: nowrap;
}

.stg-word-list {
  border-color: #ced3e1;
  border-radius: 16px;
  line-height: 1.65;
  min-height: 190px;
  resize: vertical;
}

.stg-word-list:focus,
.stg-answer-input:focus {
  border-color: #7965e2;
  box-shadow: 0 0 0 .22rem rgba(103, 80, 216, .13);
}

.stg-check-row {
  background: #f7f6ff;
  border: 1px solid #e2dffc;
  border-radius: 12px;
  padding: .7rem .9rem .7rem 2.35rem;
  width: 100%;
}

.stg-primary-btn {
  background: linear-gradient(135deg, #7358e6, #4f76e8);
  border: 0;
  color: #fff;
  font-weight: 700;
  padding: .72rem 1.2rem;
}

.stg-primary-btn:hover,
.stg-primary-btn:focus {
  background: linear-gradient(135deg, #6447dd, #4168dc);
  color: #fff;
}

.stg-test-item {
  background: #f9f9fc;
  border: 1px solid #e4e6ef;
  border-radius: 16px;
  margin-bottom: .9rem;
  padding: 1rem;
}

.stg-test-number {
  align-items: center;
  background: #ebe7ff;
  border-radius: 50%;
  color: #5f49cd;
  display: inline-flex;
  flex: 0 0 34px;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.stg-answer-input.is-correct {
  border-color: #279b68;
  background: #f0fbf6;
}

.stg-answer-input.is-incorrect {
  border-color: #d55665;
  background: #fff4f5;
}

.stg-feedback {
  font-size: .88rem;
  font-weight: 650;
  margin-top: .4rem;
}

.stg-score {
  background: #edf8f3;
  border: 1px solid #bfe5d2;
  border-radius: 14px;
  color: #176b49;
  font-size: 1.05rem;
  font-weight: 750;
  margin-bottom: 1rem;
  padding: .9rem 1rem;
}

.stg-worksheet-line {
  border-bottom: 2px solid #858ca0;
  min-height: 32px;
  width: 100%;
}

.stg-answer-key {
  border-top: 1px dashed #c9ccda;
  margin-top: 1.3rem;
  padding-top: 1rem;
}

.stg-soft-section {
  background: #f0f2f8;
  border-bottom: 1px solid #e3e5ee;
  border-top: 1px solid #e3e5ee;
}

.stg-info-card,
.stg-detail-card,
.stg-related-card {
  background: #fff;
  border: 1px solid #e1e4ed;
  border-radius: 18px;
  padding: 1.35rem;
}

.stg-info-card h3 {
  color: #252b47;
  font-size: 1.15rem;
  font-weight: 750;
  margin: .8rem 0 .45rem;
}

.stg-info-card p,
.stg-detail-card p,
.stg-detail-card li,
.stg-related-card p {
  color: #626a80;
  line-height: 1.7;
}

.stg-number {
  align-items: center;
  background: #ebe7ff;
  border-radius: 12px;
  color: #5f49cd;
  display: inline-flex;
  font-weight: 800;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.stg-card-icon,
.stg-detail-card h2 i {
  color: #6750d8;
}

.stg-table-wrap {
  background: #fff;
  border: 1px solid #dde0eb;
  border-radius: 18px;
  overflow: hidden;
}

.stg-table-wrap th {
  background: #eae7fb;
  color: #303650;
  white-space: nowrap;
}

.stg-example-box {
  background: #fff;
  border-left: 4px solid #6750d8;
  border-radius: 0 14px 14px 0;
  padding: 1rem 1.1rem;
}

.stg-detail-card h2,
.stg-related-card h2 {
  color: #252b47;
  font-size: 1.35rem;
  font-weight: 760;
}

.stg-faq {
  max-width: 900px;
}

.stg-faq .accordion-item {
  border: 1px solid #dee1eb;
  border-radius: 14px;
  margin-bottom: .8rem;
  overflow: hidden;
}

.stg-faq .accordion-button {
  color: #29304c;
  font-weight: 700;
}

.stg-related-card {
  align-items: center;
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
}

@media (max-width: 767.98px) {
  .stg-tool-heading,
  .stg-related-card {
    align-items: stretch;
    flex-direction: column;
  }

  .stg-tool-card,
  .stg-result-card {
    border-radius: 18px;
  }
}

@media print {
  body * {
    visibility: hidden;
  }

  #resultCard,
  #resultCard * {
    visibility: visible;
  }

  #resultCard {
    border: 0;
    box-shadow: none;
    left: 0;
    margin: 0;
    position: absolute;
    top: 0;
    width: 100%;
  }

  #printButton,
  #checkAnswersButton,
  #scorePanel {
    display: none !important;
  }
}
