/* =========================================================
   WEBDOCS WEBSITE AUDIT
   Premium SaaS Dashboard CSS
   Supports:
   - New premium HTML section
   - Extended worker response
   - New JS-rendered dashboard
   - Category score cards
   - Recommendation cards
   - Detail cards
   - Graph-style weighted checks
========================================================= */


/* ===============================
   SECTION BASE
================================ */

.audit-section {
  position: relative;
  padding: 104px 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 7% 8%, rgba(90, 141, 184, .22), transparent 34%),
    radial-gradient(circle at 92% 10%, rgba(42, 71, 104, .18), transparent 34%),
    radial-gradient(circle at 52% 100%, rgba(121, 168, 212, .16), transparent 38%),
    linear-gradient(180deg, #f8fbff 0%, #edf4fb 100%);
}

.audit-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(42, 71, 104, .075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42, 71, 104, .075) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: .5;
  pointer-events: none;
}

.audit-section::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  right: -220px;
  top: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .45);
  filter: blur(18px);
  pointer-events: none;
}

.audit-section .container {
  position: relative;
  z-index: 1;
}


/* ===============================
   SHELL
================================ */

.audit-premium-shell,
.audit-saas-shell {
  max-width: 1240px;
  margin: 0 auto;
}


/* ===============================
   HERO
================================ */

.audit-premium-hero,
.audit-saas-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: stretch;
  gap: 24px;
  margin-bottom: 26px;
}

.audit-premium-copy,
.audit-saas-copy {
  min-width: 0;
}

.audit-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid rgba(42, 71, 104, .14);
  background: rgba(255, 255, 255, .76);
  color: #244b7a;
  font-size: .76rem;
  font-weight: 950;
  letter-spacing: .09em;
  text-transform: uppercase;
  box-shadow: 0 12px 28px rgba(20, 33, 48, .055);
}

.audit-eyebrow-dot,
.audit-badge-dot,
.audit-live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #27ae60;
  box-shadow: 0 0 0 5px rgba(39, 174, 96, .14);
}

.audit-premium-copy h2,
.audit-saas-copy h2 {
  max-width: 900px;
  margin: 0;
  color: #0f172a;
  font-size: clamp(2.15rem, 4.6vw, 4.45rem);
  line-height: .96;
  letter-spacing: -0.07em;
}

.audit-premium-copy p:not(.audit-eyebrow),
.audit-saas-copy p:not(.audit-eyebrow) {
  max-width: 790px;
  margin: 18px 0 0;
  color: #526579;
  font-size: 1.02rem;
  line-height: 1.65;
}

.audit-hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.audit-hero-points span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(42, 71, 104, .12);
  color: #244b7a;
  font-size: .82rem;
  font-weight: 850;
}

.audit-hero-points i {
  color: #27ae60;
}


/* ===============================
   HERO STATUS CARD
================================ */

.audit-premium-status-card,
.audit-saas-badge {
  min-width: 0;
  padding: 22px;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(248, 251, 255, .78));
  border: 1px solid rgba(42, 71, 104, .14);
  box-shadow:
    0 24px 54px rgba(20, 33, 48, .11),
    inset 0 1px 0 rgba(255, 255, 255, .95);
  backdrop-filter: blur(14px);
}

.audit-live-badge,
.audit-saas-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: 999px;
  background: #eef5fc;
  border: 1px solid #d8e7f5;
  color: #244b7a;
  font-size: .76rem;
  font-weight: 950;
}

.audit-mini-score {
  margin-top: 20px;
}

.audit-mini-score span {
  display: block;
  color: #102033;
  font-size: 3.5rem;
  line-height: .9;
  font-weight: 1000;
  letter-spacing: -0.08em;
}

.audit-mini-score small {
  display: block;
  margin-top: 8px;
  color: #64748b;
  font-size: .74rem;
  font-weight: 950;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.audit-premium-status-card p {
  margin: 16px 0 0;
  color: #526579;
  font-size: .88rem;
  line-height: 1.55;
}


/* ===============================
   MAIN PANEL
================================ */

.audit-dashboard-panel,
.audit-saas-panel,
.audit-saas-panel-stacked {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 16px;
  border-radius: 36px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .74), rgba(255, 255, 255, .44));
  border: 1px solid rgba(42, 71, 104, .14);
  box-shadow:
    0 36px 90px rgba(20, 33, 48, .14),
    inset 0 1px 0 rgba(255, 255, 255, .9);
  backdrop-filter: blur(16px);
}

.audit-control-card,
.audit-results-card,
.audit-scan-card,
.audit-result-card {
  min-width: 0;
  border-radius: 28px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  border: 1px solid #dbe7f3;
  box-shadow:
    0 20px 50px rgba(20, 33, 48, .075),
    inset 0 1px 0 #ffffff;
}


/* ===============================
   CONTROL CARD
================================ */

.audit-control-card,
.audit-scan-card,
.audit-scan-card-horizontal {
  padding: 24px;
}

.audit-control-header,
.audit-scan-topline,
.audit-results-header,
.audit-result-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 16px;
}

.audit-card-kicker,
.audit-card-label,
.audit-result-label {
  display: inline-flex;
  align-items: center;
  margin: 0 0 8px;
  padding: 7px 11px;
  border-radius: 999px;
  background: #eef5fc;
  color: #244b7a;
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.audit-control-header h3,
.audit-results-header h3,
.audit-result-top h3 {
  margin: 0;
  color: #102033;
  font-size: clamp(1.22rem, 1.8vw, 1.8rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.audit-privacy-note {
  max-width: 820px;
  margin: 0 0 18px;
  color: #6b7b8e;
  font-size: .84rem;
  line-height: 1.55;
}

.audit-status {
  min-height: 22px;
  color: #244b7a;
  font-size: .88rem;
  font-weight: 850;
  text-align: right;
}

.audit-status.loading {
  color: #244b7a;
}

.audit-status.success {
  color: #1e8f55;
}

.audit-status.error {
  color: #c0392b;
}


/* ===============================
   FORM
================================ */

.audit-form-grid,
.audit-scan-grid {
  display: grid;
  grid-template-columns: minmax(340px, 1.28fr) minmax(260px, .88fr) minmax(230px, .58fr);
  gap: 16px;
  align-items: end;
}

.audit-field,
.audit-url-field,
.audit-url-box,
.audit-email-row,
.audit-action-wrap {
  min-width: 0;
}

.audit-field label,
.audit-url-box label,
.audit-email-row label,
.audit-action-wrap label {
  display: block;
  margin: 0 0 8px;
  color: #102033;
  font-size: .84rem;
  font-weight: 950;
}

.audit-url-control {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 56px;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #cddceb;
  box-shadow:
    0 12px 24px rgba(20, 33, 48, .055),
    inset 0 1px 0 #ffffff;
  transition:
    border-color .18s ease,
    box-shadow .18s ease,
    transform .18s ease;
}

.audit-url-control:focus-within,
.audit-field input:focus,
.audit-email-row input:focus {
  border-color: #7fa2c3;
  box-shadow:
    0 0 0 4px rgba(127, 162, 195, .18),
    0 12px 24px rgba(20, 33, 48, .06);
}

.audit-url-prefix {
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0 14px;
  border-right: 1px solid #e4edf6;
  background: #f8fbff;
  color: #7a8ba0;
  font-size: .88rem;
  font-weight: 800;
}

.audit-url-control input,
.audit-field input,
.audit-email-row input {
  width: 100%;
  min-width: 0;
  min-height: 56px;
  padding: 0 14px;
  border: 0;
  outline: none;
  background: transparent;
  color: #102033;
  font-size: .96rem;
}

.audit-field input,
.audit-email-row input {
  border-radius: 18px;
  border: 1px solid #cddceb;
  background: #ffffff;
  box-shadow: inset 0 1px 0 #ffffff;
  transition:
    border-color .18s ease,
    box-shadow .18s ease;
}

.audit-url-control input::placeholder,
.audit-field input::placeholder,
.audit-email-row input::placeholder {
  color: #9aa9ba;
}

.audit-inline-action,
.audit-url-control button {
  height: 44px;
  margin-right: 6px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  background: #2a4768;
  color: #ffffff;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 12px 22px rgba(42, 71, 104, .22);
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    background .18s ease;
}

.audit-main-action {
  width: 100%;
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
  border: 0;
  border-radius: 18px;
  background:
    linear-gradient(135deg, #2a4768, #203a58);
  color: #ffffff;
  font-weight: 1000;
  cursor: pointer;
  box-shadow:
    0 16px 30px rgba(42, 71, 104, .24),
    inset 0 1px 0 rgba(255, 255, 255, .18);
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    background .18s ease;
}

.audit-inline-action:hover,
.audit-url-control button:hover,
.audit-main-action:hover {
  transform: translateY(-1px);
  background: #203a58;
  box-shadow: 0 18px 30px rgba(42, 71, 104, .30);
}


/* ===============================
   PROGRESS
================================ */

.audit-progress {
  height: 10px;
  margin: 20px 0 0;
  overflow: hidden;
  border-radius: 999px;
  background: #e5edf6;
  border: 1px solid rgba(42, 71, 104, .08);
}

.audit-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(90deg, #79a8d4, #2a4768);
  transition: width .35s ease;
}


/* ===============================
   RESULT CARD
================================ */

.audit-results-card,
.audit-result-card,
.audit-result-card-full {
  padding: 26px;
}

.audit-result-chip {
  display: inline-flex;
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eef5fc;
  color: #244b7a;
  border: 1px solid #d6e5f4;
  font-size: .74rem;
  font-weight: 950;
}

.audit-result-chip.success {
  background: rgba(39, 174, 96, .1);
  color: #1e8f55;
  border-color: rgba(39, 174, 96, .22);
}

.audit-result-chip.error {
  background: rgba(231, 76, 60, .1);
  color: #c0392b;
  border-color: rgba(231, 76, 60, .22);
}

.audit-result-chip.loading,
.audit-result-chip.ready {
  background: rgba(121, 168, 212, .13);
  color: #244b7a;
}


/* ===============================
   EMPTY / LOADING
================================ */

.audit-empty-state {
  display: grid;
  place-items: center;
  min-height: 360px;
  padding: 34px;
  text-align: center;
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 0%, rgba(121, 168, 212, .22), transparent 34%),
    linear-gradient(180deg, #f8fbff, #eef5fc);
  border: 1px dashed #bdd0e5;
}

.audit-empty-orb {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 24px;
  background: #ffffff;
  color: #2a4768;
  font-size: 1.5rem;
  box-shadow: 0 18px 40px rgba(20, 33, 48, .12);
}

.audit-empty-state h4 {
  margin: 0 0 8px;
  color: #102033;
  font-size: 1.25rem;
}

.audit-empty-state p {
  max-width: 560px;
  margin: 0;
  color: #536579;
  font-size: .9rem;
  line-height: 1.6;
}

.audit-empty-preview-grid {
  width: 100%;
  max-width: 560px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.audit-empty-preview-card {
  padding: 14px 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .78);
  border: 1px solid #dce8f4;
}

.audit-empty-preview-card span,
.audit-empty-preview-card strong {
  display: block;
}

.audit-empty-preview-card span {
  color: #64748b;
  font-size: .68rem;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.audit-empty-preview-card strong {
  margin-top: 6px;
  color: #102033;
  font-size: 1.25rem;
}


/* =========================================================
   JS RESULT DASHBOARD
========================================================= */

.audit-dashboard-result {
  display: grid;
  gap: 16px;
}


/* ===============================
   TOP RESULT ROW
================================ */

.audit-dashboard-row {
  display: grid;
  grid-template-columns: minmax(300px, 1.45fr) repeat(4, minmax(120px, .65fr));
  gap: 12px;
  align-items: stretch;
}

.audit-score-module,
.audit-stat-module {
  min-width: 0;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #dce8f4;
  box-shadow:
    0 14px 30px rgba(20, 33, 48, .055),
    inset 0 1px 0 #ffffff;
}

.audit-score-module {
  display: grid;
  grid-template-columns: 94px 1fr;
  gap: 14px;
  align-items: center;
  padding: 16px;
}

.audit-score-ring {
  --score: 0;
  width: 90px;
  height: 90px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    conic-gradient(#2a4768 calc(var(--score) * 1%), #dce8f4 0);
  box-shadow:
    0 16px 34px rgba(20, 33, 48, .14),
    inset 0 1px 0 rgba(255, 255, 255, .9);
}

.audit-score-inner {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #e3e9f1;
  line-height: 1;
}

.audit-score-inner strong {
  font-size: 1.42rem;
  font-weight: 1000;
}

.audit-score-inner span {
  margin-top: -8px;
  color: #64748b;
  font-size: .62rem;
  font-weight: 900;
}

.audit-score-module h4 {
  margin: 0 0 6px;
  color: #102033;
  font-size: 1.02rem;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.audit-score-module p {
  margin: 0;
  color: #526579;
  font-size: .78rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.audit-stat-module {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 116px;
  padding: 14px 10px;
  text-align: center;
}

.audit-stat-module span {
  color: #64748b;
  font-size: .68rem;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.audit-stat-module strong {
  margin-top: 8px;
  color: #102033;
  font-size: 1.42rem;
  line-height: 1;
  letter-spacing: -0.035em;
}

.audit-stat-module small {
  margin-top: 7px;
  color: #64748b;
  font-size: .70rem;
  line-height: 1.25;
}


/* ===============================
   SCORE COLORS
================================ */

.score-good {
  color: #27ae60;
}

.score-medium {
  color: #f39c12;
}

.score-bad {
  color: #e74c3c;
}


/* ===============================
   CATEGORY SCORE CARDS
================================ */

.audit-category-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.audit-category-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: center;
  padding: 13px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #dce8f4;
  box-shadow: 0 12px 24px rgba(20, 33, 48, .045);
}

.audit-category-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: #eef5fc;
  color: #2a4768;
}

.audit-category-card span,
.audit-category-card strong {
  display: block;
}

.audit-category-card span {
  color: #64748b;
  font-size: .67rem;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.audit-category-card strong {
  margin-top: 3px;
  color: #102033;
  font-size: 1.35rem;
  line-height: 1;
  letter-spacing: -0.045em;
}

.audit-score-good {
  border-color: rgba(39, 174, 96, .22);
}

.audit-score-medium {
  border-color: rgba(243, 156, 18, .26);
}

.audit-score-bad {
  border-color: rgba(231, 76, 60, .22);
}


/* ===============================
   MINI CHECKS ROW
================================ */

.audit-bar-summary {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 9px;
}

.audit-mini-check {
  min-width: 0;
  padding: 11px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #dce8f4;
  box-shadow: 0 10px 20px rgba(20, 33, 48, .04);
}

.audit-mini-check span,
.audit-mini-check strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audit-mini-check span {
  color: #526579;
  font-size: .66rem;
  font-weight: 950;
}

.audit-mini-check strong {
  margin-top: 5px;
  font-size: .73rem;
  font-weight: 950;
}

.audit-mini-pass {
  border-color: rgba(39, 174, 96, .20);
}

.audit-mini-partial {
  border-color: rgba(243, 156, 18, .24);
}

.audit-mini-fail {
  border-color: rgba(231, 76, 60, .22);
}

.audit-mini-pass strong,
.audit-check-pass strong {
  color: #1e9b55;
}

.audit-mini-partial strong,
.audit-check-partial strong {
  color: #d98905;
}

.audit-mini-fail strong,
.audit-check-fail strong {
  color: #e43d30;
}


/* ===============================
   SHORT FINDINGS
================================ */

.audit-short-findings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.audit-short-card {
  min-width: 0;
  min-height: 132px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid #dce8f4;
}

.audit-short-card strong {
  display: block;
  margin-bottom: 10px;
  color: #102033;
  font-size: .86rem;
  font-weight: 950;
}

.audit-short-card ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 17px;
}

.audit-short-card li,
.audit-short-card p {
  margin: 0;
  color: #344455;
  font-size: .78rem;
  line-height: 1.45;
}

.audit-good,
.audit-good-soft {
  border-color: rgba(39, 174, 96, .24);
  background: rgba(39, 174, 96, .055);
}

.audit-warning,
.audit-warning-soft {
  border-color: rgba(243, 156, 18, .30);
  background: rgba(243, 156, 18, .075);
}

.audit-issue,
.audit-issue-soft {
  border-color: rgba(231, 76, 60, .24);
  background: rgba(231, 76, 60, .065);
}


/* ===============================
   RECOMMENDATIONS
================================ */

.audit-recommendations-card,
.audit-detail-card,
.audit-more-details {
  min-width: 0;
  padding: 18px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #dce8f4;
  box-shadow:
    0 14px 30px rgba(20, 33, 48, .05),
    inset 0 1px 0 #ffffff;
}

.audit-section-title,
.audit-finding-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 13px;
  color: #102033;
}

.audit-section-title i,
.audit-finding-title i {
  color: #2a4768;
}

.audit-section-title strong,
.audit-finding-title strong {
  margin: 0;
  font-size: .92rem;
  font-weight: 1000;
}

.audit-recommendation-list {
  display: grid;
  gap: 10px;
}

.audit-recommendation {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border-radius: 18px;
  background: #f8fbff;
  border: 1px solid #dce8f4;
}

.audit-recommendation span {
  display: inline-flex;
  margin-bottom: 6px;
  color: #244b7a;
  font-size: .68rem;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.audit-recommendation strong {
  display: block;
  color: #102033;
  font-size: .88rem;
  line-height: 1.3;
}

.audit-recommendation p {
  margin: 6px 0 0;
  color: #526579;
  font-size: .78rem;
  line-height: 1.45;
}

.audit-recommendation em {
  padding: 6px 9px;
  border-radius: 999px;
  background: #eef5fc;
  color: #244b7a;
  font-size: .66rem;
  font-style: normal;
  font-weight: 950;
  text-transform: uppercase;
}

.audit-rec-high {
  border-color: rgba(231, 76, 60, .24);
}

.audit-rec-medium {
  border-color: rgba(243, 156, 18, .30);
}

.audit-rec-low {
  border-color: rgba(42, 71, 104, .16);
}


/* ===============================
   DETAIL GRID / DATA CARDS
================================ */

.audit-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.audit-detail-card-wide {
  grid-column: 1 / -1;
}

.audit-detail-card p {
  margin: 0;
  color: #526579;
  font-size: .8rem;
  line-height: 1.5;
}

.audit-data-list {
  display: grid;
  gap: 9px;
}

.audit-data-list-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.audit-data-list div {
  min-width: 0;
  padding: 12px;
  border-radius: 16px;
  background: #f8fbff;
  border: 1px solid #dce8f4;
}

.audit-data-list span,
.audit-data-list strong {
  display: block;
  min-width: 0;
}

.audit-data-list span {
  color: #64748b;
  font-size: .67rem;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.audit-data-list strong {
  margin-top: 5px;
  color: #102033;
  font-size: .8rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}


/* ===============================
   SIGNAL PILLS
================================ */

.audit-signal-pill-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.audit-signal-pill {
  min-width: 0;
  padding: 10px;
  border-radius: 15px;
  background: #f8fbff;
  border: 1px solid #dce8f4;
}

.audit-signal-pill span,
.audit-signal-pill strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audit-signal-pill span {
  color: #64748b;
  font-size: .64rem;
  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.audit-signal-pill strong {
  margin-top: 4px;
  font-size: .74rem;
  font-weight: 1000;
}

.audit-signal-pass {
  border-color: rgba(39, 174, 96, .20);
}

.audit-signal-pass strong {
  color: #1e9b55;
}

.audit-signal-fail {
  border-color: rgba(231, 76, 60, .18);
}

.audit-signal-fail strong {
  color: #e43d30;
}


/* ===============================
   METADATA / HEADINGS
================================ */

.audit-detected-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.audit-detected-row div {
  min-width: 0;
  padding: 14px;
  border-radius: 18px;
  background: #f8fbff;
  border: 1px solid #dce8f4;
}

.audit-detected-row strong,
.audit-detected-row span {
  display: block;
}

.audit-detected-row strong {
  margin-bottom: 6px;
  color: #102033;
  font-size: .68rem;
  font-weight: 950;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.audit-detected-row span {
  color: #526579;
  font-size: .79rem;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audit-heading-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.audit-heading-preview > div {
  min-width: 0;
  padding: 14px;
  border-radius: 18px;
  background: #f8fbff;
  border: 1px solid #dce8f4;
}

.audit-heading-preview strong {
  display: block;
  margin-bottom: 8px;
  color: #102033;
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.audit-heading-preview ul {
  display: grid;
  gap: 6px;
  max-height: 150px;
  overflow: auto;
  margin: 0;
  padding-left: 18px;
}

.audit-heading-preview li,
.audit-heading-preview p {
  margin: 0;
  color: #526579;
  font-size: .78rem;
  line-height: 1.4;
}

.audit-meta-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.audit-meta-metrics span {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  background: #eef5fc;
  border: 1px solid #d6e5f4;
  color: #244b7a;
  font-size: .7rem;
  font-weight: 850;
}


/* ===============================
   PILL CLOUD
================================ */

.audit-pill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.audit-pill-cloud span {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  background: #eef5fc;
  border: 1px solid #d6e5f4;
  color: #244b7a;
  font-size: .7rem;
  font-weight: 850;
}

.audit-pill-good span {
  background: rgba(39, 174, 96, .08);
  border-color: rgba(39, 174, 96, .2);
  color: #1e8f55;
}

.audit-pill-warning span {
  background: rgba(243, 156, 18, .08);
  border-color: rgba(243, 156, 18, .24);
  color: #c97905;
}


/* ===============================
   FULL DETAILS
================================ */

.audit-more-details {
  overflow: hidden;
}

.audit-more-details summary {
  cursor: pointer;
  color: #2a4768;
  font-weight: 1000;
  font-size: .95rem;
}

.audit-full-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.audit-compact-finding {
  min-width: 0;
  max-height: 280px;
  overflow: auto;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid #dce8f4;
}

.audit-compact-finding ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
}

.audit-compact-finding li,
.audit-compact-finding p {
  margin: 0;
  color: #344455;
  font-size: .78rem;
  line-height: 1.45;
}


/* ===============================
   GRAPH STYLE WEIGHTED CHECKS
   This fixes old one-row-per-check look.
   Now checks become compact graph cards in rows.
================================ */

.audit-checks {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e3e9f1;
}

.audit-checks > strong {
  display: block;
  margin-bottom: 12px;
  color: #102033;
  font-size: .9rem;
  font-weight: 1000;
}

.audit-checks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.audit-checks > strong {
  grid-column: 1 / -1;
}

.audit-check-row {
  position: relative;
  min-width: 0;
  display: grid;
  gap: 9px;
  padding: 13px;
  overflow: hidden;
  border-radius: 17px;
  background: #ffffff;
  border: 1px solid #dce8f4;
  box-shadow: 0 10px 20px rgba(20, 33, 48, .04);
  color: #344455;
  font-size: .78rem;
}

.audit-check-row::before {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 10px;
  height: 6px;
  border-radius: 999px;
  background: #e5edf6;
}

.audit-check-row::after {
  content: "";
  position: absolute;
  left: 13px;
  bottom: 10px;
  height: 6px;
  border-radius: 999px;
}

.audit-check-pass::after {
  width: calc(100% - 26px);
  background: #27ae60;
}

.audit-check-partial::after {
  width: calc((100% - 26px) * .55);
  background: #f39c12;
}

.audit-check-fail::after {
  width: calc((100% - 26px) * .18);
  background: #e74c3c;
}

.audit-check-row span {
  min-width: 0;
  padding-right: 8px;
  color: #102033;
  font-size: .78rem;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audit-check-row strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 10px;
  font-size: .74rem;
  font-weight: 1000;
  white-space: nowrap;
}

.audit-check-row strong small {
  color: #64748b;
  font-size: .68rem;
  font-weight: 900;
}


/* ===============================
   BOTTOM SIGNAL CARDS
================================ */

.audit-signal-grid,
.audit-premium-signal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.audit-info-card {
  min-width: 0;
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(42, 71, 104, .12);
  box-shadow: 0 18px 38px rgba(20, 33, 48, .08);
}

.audit-info-card span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 15px;
  background: #eef5fc;
  color: #2a4768;
}

.audit-info-card h3 {
  margin: 0 0 8px;
  color: #102033;
  font-size: 1rem;
}

.audit-info-card p {
  margin: 0;
  color: #536579;
  font-size: .88rem;
  line-height: 1.55;
}


/* ===============================
   DISCLAIMER
================================ */

.audit-disclaimer-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  align-items: start;
  margin-top: 18px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(42, 71, 104, .12);
  box-shadow: 0 18px 38px rgba(20, 33, 48, .07);
}

.audit-disclaimer-card div {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: #eef5fc;
  color: #2a4768;
}

.audit-disclaimer-card p {
  margin: 0;
  color: #536579;
  font-size: .86rem;
  line-height: 1.55;
}


/* ===============================
   HELPERS
================================ */

.audit-hidden {
  display: none !important;
}

.audit-muted {
  color: #64748b;
}

.audit-divider {
  height: 1px;
  margin: 14px 0;
  background: #e3e9f1;
}

.audit-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.audit-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: #eef5fc;
  color: #244b7a;
  border: 1px solid #d6e5f4;
  font-size: .74rem;
  font-weight: 850;
}


/* ===============================
   RESPONSIVE
================================ */

@media (max-width: 1180px) {
  .audit-premium-hero,
  .audit-saas-head {
    grid-template-columns: 1fr;
  }

  .audit-premium-status-card {
    max-width: 420px;
  }

  .audit-form-grid,
  .audit-scan-grid {
    grid-template-columns: 1fr;
  }

  .audit-control-header,
  .audit-scan-topline,
  .audit-results-header,
  .audit-result-top {
    flex-direction: column;
  }

  .audit-status {
    text-align: left;
  }

  .audit-dashboard-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .audit-score-module {
    grid-column: 1 / -1;
  }

  .audit-category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .audit-bar-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .audit-checks {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .audit-full-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .audit-detail-grid,
  .audit-short-findings,
  .audit-heading-preview {
    grid-template-columns: 1fr;
  }

  .audit-signal-grid,
  .audit-premium-signal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .audit-detected-row {
    grid-template-columns: 1fr;
  }

  .audit-checks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .audit-data-list-compact,
  .audit-signal-pill-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .audit-section {
    padding: 72px 0;
  }

  .audit-dashboard-panel,
  .audit-saas-panel,
  .audit-saas-panel-stacked {
    padding: 10px;
    border-radius: 26px;
  }

  .audit-control-card,
  .audit-results-card,
  .audit-scan-card,
  .audit-result-card,
  .audit-result-card-full {
    padding: 20px;
    border-radius: 22px;
  }

  .audit-url-control {
    grid-template-columns: 1fr;
    padding: 8px;
    gap: 8px;
  }

  .audit-url-prefix {
    display: none;
  }

  .audit-url-control input {
    min-height: 46px;
    padding: 0 10px;
  }

  .audit-inline-action,
  .audit-url-control button {
    width: 100%;
    margin: 0;
  }

  .audit-dashboard-row,
  .audit-category-grid,
  .audit-bar-summary,
  .audit-signal-grid,
  .audit-premium-signal-grid,
  .audit-checks,
  .audit-empty-preview-grid {
    grid-template-columns: 1fr;
  }

  .audit-score-module {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .audit-disclaimer-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .audit-control-card,
  .audit-results-card,
  .audit-scan-card,
  .audit-result-card,
  .audit-result-card-full {
    padding: 16px;
  }

  .audit-empty-state {
    min-height: 300px;
    padding: 22px;
  }

  .audit-premium-copy h2,
  .audit-saas-copy h2 {
    font-size: 2.25rem;
  }

  .audit-score-ring {
    width: 108px;
    height: 108px;
  }

  .audit-score-inner {
    width: 76px;
    height: 76px;
  }

  .audit-score-inner strong {
    font-size: 1.7rem;
  }

  .audit-recommendation {
    grid-template-columns: 1fr;
  }
}



/* ===============================
   TEMPLATE SEARCH LIBRARY — PREMIUM INSTITUTIONAL
================================ */

.template-library-wrap {
  position: relative;
  margin-top: 32px;
  padding: 34px;
  border: 1px solid #d9e2ec;
  border-radius: 28px;
  background-color: #f8fbfe;
  background-image:
    linear-gradient(#e2eaf2 1px, transparent 1px),
    linear-gradient(90deg, #e2eaf2 1px, transparent 1px);
  background-size: 30px 30px;
  box-shadow:
    0 22px 54px #dce5ee,
    inset 0 1px 0 #ffffff;
  overflow: hidden;
}

.template-library-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 0%, #eef8fb 0%, transparent 28%),
    radial-gradient(circle at 88% 12%, #fffaf0 0%, transparent 24%),
    linear-gradient(180deg, #ffffff 0%, transparent 44%);
  opacity: 0.72;
}

.template-library-wrap > * {
  position: relative;
  z-index: 1;
}

/* ===============================
   SEARCH BAR
================================ */

.template-search-bar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
  border: 1px solid #d9e2ec;
  border-radius: 22px;
  background: #ffffff;
  box-shadow:
    0 16px 34px #edf2f7,
    inset 0 1px 0 #ffffff;
}

.template-search-main label,
.template-search-filters label {
  display: block;
  margin-bottom: 8px;
  font-weight: 850;
  color: #102033;
  font-size: 0.84rem;
  letter-spacing: 0.02em;
}

.template-search-input-wrap {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.template-search-input-wrap input {
  flex: 1 1 420px;
  min-height: 54px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid #cbd8e6;
  background: #ffffff;
  color: #102033;
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 8px 18px #f1f5f9;
  font-size: 0.96rem;
}

.template-search-input-wrap input::placeholder {
  color: #8a98ae;
}

.template-search-input-wrap input:focus,
.template-search-filters select:focus {
  outline: none;
  border-color: #8da7c2;
  box-shadow:
    0 0 0 4px #eef5fc,
    0 10px 22px #edf2f7;
}

.template-search-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.template-search-filters select {
  width: 100%;
  min-height: 50px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid #cbd8e6;
  background: #ffffff;
  color: #102033;
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 8px 18px #f1f5f9;
  font-weight: 650;
}

/* ===============================
   META
================================ */

.template-library-meta {
  margin-top: 18px;
}

.template-library-meta .info-strip {
  padding: 15px 18px;
  border: 1px solid #cfe0f2;
  border-radius: 16px;
  background: #eef5fc;
  color: #244b7a;
  font-weight: 650;
  line-height: 1.55;
  box-shadow: 0 8px 18px #edf2f7;
}

/* ===============================
   MAIN GRID
================================ */

.template-library-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.25fr);
  gap: 32px;
  margin-top: 24px;
  align-items: start;
}

/* ===============================
   RESULTS
================================ */

.template-library-results {
  display: grid;
  gap: 16px;
  max-height: 900px;
  overflow: auto;
  padding-right: 14px;
}

.template-library-results::-webkit-scrollbar,
.template-preview-text::-webkit-scrollbar {
  width: 10px;
}

.template-library-results::-webkit-scrollbar-track,
.template-preview-text::-webkit-scrollbar-track {
  background: #edf2f7;
  border-radius: 999px;
}

.template-library-results::-webkit-scrollbar-thumb,
.template-preview-text::-webkit-scrollbar-thumb {
  background: #8da7c2;
  border-radius: 999px;
  border: 2px solid #edf2f7;
}

.template-library-item {
  position: relative;
  padding: 18px;
  border: 1px solid #d9e2ec;
  border-radius: 18px;
  background: #ffffff;
  cursor: pointer;
  box-shadow: 0 10px 24px #edf2f7;
  overflow: hidden;

  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.template-library-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 4px;
  border-radius: 999px;
  background: #cbd8e6;
  transition:
    background-color 0.2s ease,
    top 0.2s ease,
    bottom 0.2s ease;
}

.template-library-item:hover {
  transform: translateY(-2px);
  border-color: #8da7c2;
  box-shadow: 0 16px 34px #dce5ee;
  background: #ffffff;
}

.template-library-item:hover::before {
  background: #244b7a;
  top: 14px;
  bottom: 14px;
}

.template-library-item.active {
  border-color: #244b7a;
  background: #f8fbfe;
  box-shadow:
    0 0 0 2px #dce8f5,
    0 18px 38px #dce5ee;
}

.template-library-item.active::before {
  background: #244b7a;
  top: 12px;
  bottom: 12px;
}

.template-library-item .item-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.template-library-item h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
  color: #102033;
  font-weight: 850;
  letter-spacing: -0.015em;
}

.template-library-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 850;
  white-space: nowrap;
  border: 1px solid #cfe0f2;
  background: #eef5fc;
  color: #244b7a;
}

.template-library-item:nth-child(3n + 2) .template-library-badge {
  border-color: #c9e2ea;
  background: #eef8fb;
  color: #2f6f8f;
}

.template-library-item:nth-child(3n + 3) .template-library-badge {
  border-color: #ead7a8;
  background: #fffaf0;
  color: #6f5a24;
}

.template-library-item .item-meta {
  font-size: 0.9rem;
  color: #66788a;
  margin-bottom: 10px;
  font-weight: 600;
}

.template-library-item p {
  margin: 0;
  color: #526579;
  line-height: 1.58;
}

/* ===============================
   PREVIEW
================================ */

.template-library-preview {
  position: sticky;
  top: 20px;
  padding-left: 24px;
  border-left: 1px solid #d9e2ec;
}

.template-preview-box {
  padding: 26px;
  border: 1px solid #d9e2ec;
  border-radius: 24px;
  background: #ffffff;
  box-shadow:
    0 18px 40px #dce5ee,
    inset 0 1px 0 #ffffff;
}

.template-preview-box h3 {
  margin: 0 0 8px;
  color: #102033;
  font-size: clamp(1.35rem, 1.8vw, 1.85rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 850;
}

.template-preview-meta {
  margin-top: 10px;
  color: #66788a;
  font-weight: 650;
  line-height: 1.5;
}

.template-preview-text {
  margin-top: 18px;
  min-height: 360px;
  max-height: 720px;
  overflow: auto;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid #d9e2ec;
  background:
    linear-gradient(#f8fbfe 0%, #ffffff 100%);
  white-space: pre-wrap;
  line-height: 1.75;
  color: #102033;
  box-shadow: inset 0 1px 0 #ffffff;
}

.template-preview-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #e2eaf2;
}

.template-empty {
  padding: 24px;
  border: 1px dashed #8da7c2;
  border-radius: 18px;
  background: #f8fbfe;
  color: #526579;
  line-height: 1.6;
}

/* ===============================
   WEBSITE TEMPLATE LIBRARY
================================ */

.website-template-preview-media {
  margin-top: 18px;
  border: 1px solid #d9e2ec;
  border-radius: 18px;
  overflow: hidden;
  background: #f8fbfe;
  box-shadow: 0 10px 24px #edf2f7;
}

.website-template-preview-media img {
  display: block;
  width: 100%;
  height: auto;
}

.website-template-result {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 14px;
  align-items: start;
}

.website-template-thumb {
  width: 104px;
  height: 76px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid #d9e2ec;
  background: #f4f7fb;
  box-shadow: 0 8px 18px #edf2f7;
}

.website-template-result .item-meta {
  font-size: 0.9rem;
  color: #66788a;
  margin-bottom: 10px;
  font-weight: 600;
}

.website-template-result p {
  margin: 0;
  color: #526579;
  line-height: 1.58;
}

.template-load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

/* ===============================
   RESPONSIVE
================================ */

@media (max-width: 1100px) {
  .template-library-grid {
    grid-template-columns: 1fr;
  }

  .template-library-preview {
    position: relative;
    top: auto;
    padding-left: 0;
    border-left: 0;
  }

  .template-library-results {
    max-height: none;
    padding-right: 0;
  }
}

@media (max-width: 768px) {
  .template-library-wrap {
    padding: 20px;
    border-radius: 22px;
  }

  .template-search-bar {
    padding: 18px;
    border-radius: 18px;
  }

  .template-search-filters {
    grid-template-columns: 1fr;
  }

  .template-search-input-wrap input {
    flex-basis: 100%;
  }

  .template-library-item .item-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .template-library-badge {
    white-space: normal;
  }

  .website-template-result {
    grid-template-columns: 1fr;
  }

  .website-template-thumb {
    width: 100%;
    height: auto;
    max-height: 180px;
  }

  .template-preview-box {
    padding: 20px;
    border-radius: 20px;
  }

  .template-preview-text {
    min-height: 280px;
    max-height: 560px;
  }
}

@media (max-width: 520px) {
  .template-library-wrap {
    padding: 14px;
  }

  .template-search-bar {
    padding: 16px;
  }

  .template-preview-actions {
    flex-direction: column;
  }

  .template-preview-actions .btn,
  .template-preview-actions a,
  .template-preview-actions button {
    width: 100%;
  }
}

