:root {
  --custausu-purple: #662d91;
  --custausu-purple-soft: #faf5ff;
  --custausu-text: #1f2937;
  --custausu-muted: #6b7280;
  --custausu-border: #e5e7eb;
  --custausu-bg: #f8fafc;
  --custausu-ok-bg: #ecfdf5;
  --custausu-ok: #166534;
  --custausu-warn-bg: #fff7ed;
  --custausu-warn: #9a3412;
  --custausu-error-bg: #fef2f2;
  --custausu-error: #991b1b;
  --custausu-info-bg: #eff6ff;
  --custausu-info: #1d4ed8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--custausu-bg);
  color: var(--custausu-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.55;
}

.custausu-rpt-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 18px 56px;
}

.custausu-rpt-hero {
  border: 1px solid rgba(102,45,145,.20);
  border-left: 7px solid var(--custausu-purple);
  border-radius: 18px;
  padding: 24px;
  background: linear-gradient(135deg, #ffffff 0%, #faf7fd 100%);
  box-shadow: 0 14px 36px rgba(17,24,39,.08);
  margin-bottom: 18px;
}

.custausu-rpt-hero h1 {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.15;
  color: var(--custausu-purple);
}

.custausu-rpt-hero p {
  margin: 0;
  color: #374151;
  font-weight: 650;
}

.custausu-rpt-note {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-weight: 700;
}

.custausu-rpt-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.custausu-rpt-summary-item {
  padding: 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--custausu-border);
  box-shadow: 0 6px 18px rgba(17,24,39,.04);
  min-width: 0;
}

.custausu-rpt-summary-item span {
  display: block;
  margin-bottom: 6px;
  color: var(--custausu-muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .045em;
}

.custausu-rpt-summary-item strong {
  display: block;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.custausu-rpt-section {
  margin: 16px 0;
  padding: 18px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--custausu-border);
  box-shadow: 0 8px 22px rgba(17,24,39,.045);
}

.custausu-rpt-section h2 {
  margin: 0 0 14px;
  color: var(--custausu-purple);
  font-size: 21px;
  line-height: 1.25;
}

.custausu-rpt-subcard {
  margin: 12px 0;
  padding: 14px;
  border-radius: 14px;
  background: #fbfdff;
  border: 1px solid #e5e7eb;
}

.custausu-rpt-subcard h3 {
  margin: 0 0 10px;
  color: #374151;
  font-size: 15px;
}

.custausu-rpt-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.custausu-rpt-table th,
.custausu-rpt-table td {
  vertical-align: top;
  text-align: left;
  padding: 10px 12px;
  border-top: 1px solid #eef2f7;
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}

.custausu-rpt-table tr:first-child > th,
.custausu-rpt-table tr:first-child > td {
  border-top: 0;
}

.custausu-rpt-table th {
  width: 220px;
  max-width: 280px;
  color: #475569;
  font-weight: 850;
  background: #fbfdff;
}

.custausu-rpt-card-list,
.custausu-rpt-subcard,
.custausu-rpt-section,
.custausu-rpt-summary-item {
  min-width: 0;
}

.custausu-rpt-kv-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  min-width: 0;
}

.custausu-rpt-kv-item {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}

.custausu-rpt-kv-label {
  display: block;
  margin-bottom: 5px;
  color: #64748b;
  font-size: 11px;
  line-height: 1.25;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .035em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.custausu-rpt-kv-value {
  min-width: 0;
  color: #1f2937;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.custausu-rpt-list {
  margin: 0;
  padding-left: 22px;
}

.custausu-rpt-list li {
  margin: 4px 0;
}

.custausu-rpt-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  font-weight: 850;
  border: 1px solid transparent;
}

.custausu-rpt-pill--ok {
  background: var(--custausu-ok-bg);
  color: var(--custausu-ok);
  border-color: #bbf7d0;
}

.custausu-rpt-pill--warn {
  background: var(--custausu-warn-bg);
  color: var(--custausu-warn);
  border-color: #fed7aa;
}

.custausu-rpt-pill--error {
  background: var(--custausu-error-bg);
  color: var(--custausu-error);
  border-color: #fecaca;
}

.custausu-rpt-pill--info {
  background: var(--custausu-info-bg);
  color: var(--custausu-info);
  border-color: #bfdbfe;
}

.custausu-rpt-pill--neutral {
  background: #f3f4f6;
  color: #374151;
  border-color: #d1d5db;
}

.custausu-rpt-code {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.custausu-rpt-pre {
  margin: 0;
  max-height: 420px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  padding: 12px;
  border-radius: 12px;
  background: #0f172a;
  color: #e5e7eb;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.5;
}

.custausu-rpt-muted {
  color: var(--custausu-muted);
  font-style: italic;
}

details.custausu-rpt-json {
  margin: 22px 0 0;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--custausu-border);
  overflow: hidden;
}

details.custausu-rpt-json summary {
  cursor: pointer;
  padding: 15px 18px;
  font-weight: 850;
  color: var(--custausu-purple);
  background: var(--custausu-purple-soft);
}

details.custausu-rpt-json .custausu-rpt-json-body {
  padding: 16px;
}

.custausu-rpt-footer {
  margin-top: 28px;
  color: var(--custausu-muted);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 782px) {
  .custausu-rpt-wrap {
    padding: 20px 12px 42px;
  }

  .custausu-rpt-hero {
    padding: 18px;
    border-radius: 16px;
  }

  .custausu-rpt-hero h1 {
    font-size: 24px;
  }

  .custausu-rpt-summary {
    grid-template-columns: 1fr;
  }

  .custausu-rpt-section {
    padding: 14px;
  }

  .custausu-rpt-kv-item {
    padding: 9px 10px;
    border-radius: 10px;
  }

  .custausu-rpt-kv-label {
    font-size: 10px;
  }

  .custausu-rpt-table,
  .custausu-rpt-table tbody,
  .custausu-rpt-table tr,
  .custausu-rpt-table th,
  .custausu-rpt-table td {
    display: block;
    width: 100%;
  }

  .custausu-rpt-table th {
    padding-bottom: 4px;
    background: transparent;
    border-top: 1px solid #eef2f7;
  }

  .custausu-rpt-table td {
    padding-top: 2px;
    border-top: 0;
  }
}

@media print {
  body {
    background: #fff;
  }

  .custausu-rpt-wrap {
    max-width: none;
    padding: 0;
  }

  .custausu-rpt-section,
  .custausu-rpt-hero,
  .custausu-rpt-summary-item {
    box-shadow: none;
    break-inside: avoid;
  }

  details.custausu-rpt-json {
    display: none;
  }
}
