.tool-shell {
  padding: 2rem 0 5rem;
  position: relative;
}

.confetti-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2000;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  display: block;
  bottom: 0;
  border-radius: 3px;
  animation-name: confetti-burst;
  animation-timing-function: cubic-bezier(0.08, 0.82, 0.2, 1);
  animation-fill-mode: forwards;
  will-change: transform, opacity;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

@keyframes confetti-burst {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
    opacity: 1;
  }
  14% {
    opacity: 1;
  }
  100% {
    transform: translate3d(var(--drift-x, 0), var(--burst-height, -520px), 0) rotate(var(--spin, 900deg));
    opacity: 0;
  }
}

.tool-header {
  margin-bottom: 1.5rem;
}

.tool-intro {
  max-width: 58rem;
  color: #4f4f4f;
}

.privacy-note,
.legal-disclaimer,
.save-state,
.server-state {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.legal-disclaimer {
  border-left: 4px solid #6c757d;
  background: #f5f5f5;
}

.privacy-note {
  border-left: 4px solid #bd1220;
  background: #fff7f7;
}

.save-state {
  display: none;
  border-left: 4px solid #1f6feb;
  background: #eef4ff;
  color: #274690;
}

.server-state {
  display: none;
  border-left: 4px solid #1f6feb;
  background: #f4f8ff;
  color: #274690;
}

.server-state code {
  word-break: break-all;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.summary-card {
  padding: 1.25rem;
  border: 1px solid #ececec;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 30px -24px rgba(0, 0, 0, 0.35);
}

.summary-card h3 {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: #6a6a6a;
  text-transform: uppercase;
  letter-spacing: 0.08rem;
}

.summary-card strong {
  display: block;
  color: #111;
  font-size: 1.8rem;
  line-height: 1.1;
}

.summary-card p {
  margin: 0.5rem 0 0;
  color: #5a5a5a;
}

.meta-section,
.question-section,
.results-panel {
  margin-bottom: 2rem;
  padding: 1.5rem;
  border: 1px solid #e3e3e3;
  border-radius: 12px;
  background: #f9f9f9;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.field-label,
.question-title {
  display: block;
  margin-bottom: 0.6rem;
  color: #1c1c1c;
  font-weight: 700;
}

.field-input,
.field-textarea {
  width: 100%;
  padding: 0.8rem 0.95rem;
  border: 1px solid #d5d5d5;
  border-radius: 8px;
  background: #fff;
}

.field-textarea {
  min-height: 110px;
  resize: vertical;
}

.section-heading {
  margin-bottom: 0.35rem;
  color: #111;
  font-size: 1.35rem;
  font-weight: 700;
}

.section-subtitle,
.question-text,
.question-help {
  color: #4d4d4d;
}

.reference-links {
  margin-top: 0.75rem;
  font-size: 0.92rem;
}

.reference-links a {
  margin-right: 0.75rem;
  white-space: nowrap;
}

.reference-summary {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-left: 4px solid #bd1220;
  border-radius: 8px;
  background: #fff;
  color: #4d4d4d;
  font-size: 0.94rem;
  line-height: 1.6;
}

.reference-summary strong {
  color: #111;
}

.question-item {
  margin-top: 1.35rem;
  padding-top: 1.35rem;
  border-top: 1px solid #e3e3e3;
}

.question-item:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.btn-answer {
  min-width: 122px;
  border-width: 2px;
  font-weight: 500;
  opacity: 0.8;
  background: #f3f4f6 !important;
  border-color: #c7ccd3 !important;
  color: #49515a !important;
}

.btn-answer.active {
  opacity: 1;
  box-shadow: 0 0 0 0.2rem rgba(189, 18, 32, 0.18);
  background-color: #bd1220 !important;
  border-color: #bd1220 !important;
  color: #fff !important;
}

.btn-scope {
  min-width: 108px;
}

.question-help {
  margin-top: 0.6rem;
  font-size: 0.92rem;
}

.module-note {
  margin-top: 1rem;
}

.results-panel {
  display: none;
  background: #fff;
  margin-top: 2rem;
}

.result-banner {
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  border-radius: 10px;
  background: #f5f5f5;
}

.result-banner--high {
  background: #fff4e5;
  border: 1px solid #f0c36d;
  color: #7a4a00;
}

.result-banner--medium {
  background: #eef4ff;
  border: 1px solid #9ec0ff;
  color: #274690;
}

.result-banner--low {
  background: #edf7ed;
  border: 1px solid #add7b0;
  color: #1d5c2f;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.result-card {
  padding: 1rem 1.1rem;
  border: 1px solid #ededed;
  border-radius: 10px;
  background: #fafafa;
}

.result-card h4 {
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

.result-card p,
.results-panel li {
  color: #4d4d4d;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0;
}

.actions-wrap {
  margin-top: 2rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  border: 1px solid #e3e3e3;
  border-radius: 12px;
  background: #fff;
}

.contact-cta {
  margin-top: 1.5rem;
}

.contact-cta .btn {
  min-width: 220px;
}

.print-only {
  display: none;
}

@media (max-width: 991.98px) {
  .summary-grid,
  .results-grid,
  .meta-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  .no-print,
  .site-navbar-wrap,
  .site-footer,
  .save-state {
    display: none !important;
  }

  .print-only {
    display: block;
  }

  body {
    background: #fff;
  }

  .tool-shell {
    padding: 0;
  }

  .tool-hero,
  .meta-section,
  .question-section,
  .results-panel {
    box-shadow: none;
    border-color: #d9d9d9;
  }
}
