.sac-llm-tool {
  max-width: 1100px;
  margin: 32px auto;
  padding: 0;
  font-family: inherit;
  color: #172033;
}

.sac-llm-hero,
.sac-llm-form,
.sac-llm-summary-card,
.sac-llm-detected,
.sac-llm-section,
.sac-llm-next-steps,
.sac-llm-disclaimer,
.sac-llm-error,
.sac-llm-loader {
  background: #ffffff;
  border: 1px solid #e6e9ef;
  border-radius: 18px;
  box-shadow: 0 12px 35px rgba(17, 24, 39, 0.06);
}

.sac-llm-hero {
  padding: 34px;
  background: linear-gradient(135deg, #f8fbff 0%, #ffffff 100%);
}

.sac-llm-hero h2 {
  margin: 6px 0 12px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
}

.sac-llm-hero p {
  max-width: 820px;
  margin: 0;
  font-size: 17px;
  line-height: 1.65;
  color: #4b5563;
}

.sac-llm-eyebrow {
  margin: 0 0 8px;
  color: #2658d9;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
}

.sac-llm-form {
  margin-top: 20px;
  padding: 24px;
}

.sac-llm-form label {
  display: block;
  margin-bottom: 10px;
  font-weight: 700;
}

.sac-llm-input-row {
  display: flex;
  gap: 12px;
}

.sac-llm-input-row input {
  flex: 1;
  width: 100%;
  min-height: 52px;
  border: 1px solid #d6dbe6;
  border-radius: 12px;
  padding: 0 16px;
  font-size: 16px;
}

.sac-llm-input-row button,
.sac-llm-print {
  min-height: 52px;
  border: 0;
  border-radius: 12px;
  padding: 0 22px;
  background: #2658d9;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  transition: transform .15s ease, box-shadow .15s ease;
}

.sac-llm-input-row button:hover,
.sac-llm-print:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(38, 88, 217, 0.22);
}

.sac-llm-help,
.sac-llm-score-note {
  margin: 12px 0 0;
  color: #6b7280;
  font-size: 14px;
}

.sac-llm-loader,
.sac-llm-error {
  margin-top: 20px;
  padding: 18px 20px;
}

.sac-llm-loader {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sac-llm-loader[hidden],
.sac-llm-error[hidden],
.sac-llm-results[hidden] {
  display: none;
}

.sac-llm-spinner {
  width: 20px;
  height: 20px;
  border: 3px solid #dbe4ff;
  border-top-color: #2658d9;
  border-radius: 50%;
  animation: sacspin 0.8s linear infinite;
}

@keyframes sacspin {
  to { transform: rotate(360deg); }
}

.sac-llm-error {
  border-color: #fecaca;
  color: #991b1b;
  background: #fff5f5;
}

.sac-llm-results {
  margin-top: 24px;
}

.sac-llm-summary-card {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 22px;
  align-items: center;
  padding: 26px;
  margin-bottom: 20px;
}

.sac-llm-score {
  font-size: 64px;
  line-height: 1;
  font-weight: 800;
  color: #111827;
}

.sac-llm-score span {
  font-size: 26px;
  color: #6b7280;
}

.sac-llm-counts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.sac-llm-counts span {
  border: 1px solid #e6e9ef;
  border-radius: 14px;
  padding: 16px;
  background: #f9fafb;
  text-align: center;
  color: #4b5563;
}

.sac-llm-counts strong {
  display: block;
  font-size: 28px;
  color: #111827;
}

.sac-llm-detected,
.sac-llm-section,
.sac-llm-next-steps,
.sac-llm-disclaimer {
  margin-top: 20px;
  padding: 24px;
}

.sac-llm-detected h3,
.sac-llm-section h3,
.sac-llm-next-steps h3 {
  margin: 0 0 16px;
  font-size: 22px;
}

.sac-llm-detected-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.sac-llm-detected-grid div {
  background: #f9fafb;
  border: 1px solid #edf0f5;
  border-radius: 12px;
  padding: 14px;
  overflow-wrap: anywhere;
}

.sac-llm-detected details {
  margin-top: 14px;
}

.sac-llm-detected summary {
  cursor: pointer;
  font-weight: 700;
}

.sac-llm-actions {
  margin: 18px 0;
  text-align: right;
}

.sac-llm-items {
  display: grid;
  gap: 14px;
}

.sac-llm-result-item {
  border: 1px solid #e6e9ef;
  border-left-width: 5px;
  border-radius: 14px;
  padding: 16px;
  background: #ffffff;
}

.sac-llm-result-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.sac-llm-result-head h4 {
  margin: 2px 0 8px;
  font-size: 16px;
  line-height: 1.4;
}

.sac-llm-result-item p {
  margin: 0 0 10px;
  color: #4b5563;
}

.sac-llm-recommendation {
  background: #f9fafb;
  border-radius: 10px;
  padding: 12px;
  color: #374151;
}

.sac-llm-pill {
  white-space: nowrap;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.sac-status-pass {
  border-left-color: #16a34a;
}
.sac-status-pass .sac-llm-pill {
  background: #dcfce7;
  color: #166534;
}

.sac-status-warning {
  border-left-color: #f59e0b;
}
.sac-status-warning .sac-llm-pill {
  background: #fef3c7;
  color: #92400e;
}

.sac-status-fail {
  border-left-color: #dc2626;
}
.sac-status-fail .sac-llm-pill {
  background: #fee2e2;
  color: #991b1b;
}

.sac-status-manual {
  border-left-color: #6366f1;
}
.sac-status-manual .sac-llm-pill {
  background: #e0e7ff;
  color: #3730a3;
}

.sac-llm-next-steps ol {
  margin-bottom: 0;
}

.sac-llm-disclaimer {
  color: #4b5563;
  background: #f9fafb;
}

@media (max-width: 780px) {
  .sac-llm-input-row,
  .sac-llm-summary-card,
  .sac-llm-counts,
  .sac-llm-detected-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .sac-llm-input-row button {
    width: 100%;
  }

  .sac-llm-hero,
  .sac-llm-form,
  .sac-llm-summary-card,
  .sac-llm-detected,
  .sac-llm-section,
  .sac-llm-next-steps,
  .sac-llm-disclaimer {
    padding: 20px;
  }
}

@media print {
  .sac-llm-form,
  .sac-llm-actions,
  .sac-llm-disclaimer {
    display: none !important;
  }

  .sac-llm-tool {
    max-width: 100%;
    margin: 0;
  }

  .sac-llm-hero,
  .sac-llm-summary-card,
  .sac-llm-detected,
  .sac-llm-section,
  .sac-llm-next-steps {
    box-shadow: none;
    border-color: #cccccc;
  }
}
