:root {
  color-scheme: dark;
  --bg: #13062a;
  --surface: #1e0a3c;
  --surface-strong: #2b0d52;
  --line: #3e1f65;
  --text: #f5f1ee;
  --muted: #c9b8d4;
  --soft: #8f7aa6;
  --mint: #f39322;
  --mint-dark: #a85a0a;
  --blue: #b49dff;
  --rose: #f7a9c4;
  --amber: #ffb347;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 20% 0%, rgba(243, 147, 34, 0.1), transparent 28rem),
    radial-gradient(circle at 85% 8%, rgba(180, 157, 255, 0.08), transparent 26rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(62, 31, 101, 0.8);
  background: rgba(19, 6, 42, 0.92);
  backdrop-filter: blur(18px);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 3rem, 1200px);
  margin: 0 auto;
  padding: 1.25rem 0;
}

.announce-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  background: rgba(243, 147, 34, 0.08);
  border-bottom: 1px solid rgba(243, 147, 34, 0.18);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 750;
  text-align: center;
  flex-wrap: wrap;
}

.announce-bar a {
  color: var(--mint);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 180ms ease;
}

.announce-bar a:hover {
  opacity: 0.75;
}

.brand,
.header-actions,
.hero-actions,
.section-heading,
.toolbar,
.project-meta,
.status-pill,
.project-footer,
.audit-card-header,
.score-line,
.review-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 1rem;
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  background: #2B0A45;
  overflow: hidden;
}

.brand-mark svg {
  width: 2.2rem;
  height: 2.2rem;
}

.header-actions {
  gap: 0.5rem;
}

.header-actions a,
.button {
  min-height: 3.25rem;
  padding: 0.85rem 1.45rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.header-actions a:hover,
.button:hover {
  transform: translateY(-1px);
  border-color: rgba(52, 211, 153, 0.75);
}

main {
  width: min(100% - 3rem, 1200px);
  margin: 0 auto;
  padding-bottom: 2rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.65fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  min-height: 33rem;
  padding: clamp(4rem, 8vw, 7rem) 0 3rem;
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--mint);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2,
.empty-detail h2 {
  margin: 0;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 920px;
  font-size: clamp(3rem, 6vw, 5.9rem);
  line-height: 0.96;
}

.hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 1.35rem 0 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  line-height: 1.45;
  font-weight: 650;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.8rem;
  background: transparent;
}

.button.primary {
  border-color: transparent;
  background: var(--mint);
  color: #13062a;
}

.button.secondary {
  background: rgba(43, 10, 80, 0.5);
}

.button.compact {
  min-height: 2.85rem;
  white-space: nowrap;
}

.hidden-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.trust-panel,
.stats article,
.project-card,
.audit-detail,
.explorer-section,
.submit-section,
.review-section {
  border: 1px solid rgba(62, 31, 101, 0.8);
  background: rgba(30, 10, 60, 0.85);
  box-shadow: var(--shadow);
}

.trust-panel {
  padding: 1.5rem;
  border-radius: 1rem;
}

.trust-panel strong {
  display: block;
  margin: 0.35rem 0;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
}

.trust-panel span,
.panel-grid {
  color: var(--muted);
  font-weight: 700;
}

.panel-label {
  color: var(--mint);
}

.panel-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.7rem 1rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

code {
  color: var(--text);
  font-size: 0.95rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.stats article {
  min-height: 9.5rem;
  padding: 2rem;
  border-radius: 0.9rem;
  text-align: center;
}

.stats strong {
  display: block;
  font-size: clamp(2.5rem, 5vw, 4.2rem);
}

.stats span {
  color: var(--muted);
  font-size: 1.2rem;
  font-weight: 800;
}

.explorer-section,
.submit-section,
.review-section {
  scroll-margin-top: 7rem;
  border-radius: 1rem;
  margin-bottom: 3rem;
  padding: 2.5rem;
}

.section-heading {
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-heading h2,
.empty-detail h2 {
  font-size: clamp(1.9rem, 3vw, 2.8rem);
}

.toolbar {
  gap: 1rem;
  margin-bottom: 2rem;
}

.search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

input,
select,
textarea {
  width: 100%;
  min-height: 3.65rem;
  border: 1px solid rgba(62, 31, 101, 0.8);
  border-radius: 0.75rem;
  background: rgba(43, 10, 80, 0.4);
  color: var(--text);
  padding: 0.9rem 1rem;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(243, 147, 34, 0.15);
}

input::placeholder,
textarea::placeholder {
  color: #6b567e;
}

#projectSearch {
  flex: 1;
  font-size: 1.25rem;
  font-weight: 750;
}

.toolbar select {
  max-width: 15rem;
}

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

.project-card {
  display: grid;
  gap: 1.35rem;
  min-height: 22rem;
  padding: 2rem;
  border-radius: 1rem;
  border-left: 4px solid var(--mint);
}

.project-card[data-verified="false"] {
  border-left-color: var(--amber);
}

.project-meta {
  gap: 1rem;
}

.avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 4.45rem;
  height: 4.45rem;
  border-radius: 0.85rem;
  background: rgba(243, 147, 34, 0.18);
  color: #f4a84a;
  font-size: 1.35rem;
  font-weight: 900;
}

.avatar.blue {
  background: rgba(180, 157, 255, 0.18);
  color: #b49dff;
}

.avatar.rose {
  background: rgba(247, 169, 196, 0.18);
  color: #f7a9c4;
}

.avatar.amber {
  background: rgba(255, 179, 71, 0.18);
  color: #ffb347;
}

.project-card h3 {
  margin: 0 0 0.15rem;
  font-size: 1.65rem;
}

.project-card p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 750;
}

.status-pill {
  width: max-content;
  gap: 0.45rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(243, 147, 34, 0.15);
  color: #f4a84a;
  font-weight: 900;
  border: 1px solid rgba(243, 147, 34, 0.25);
}

.status-pill.pending {
  background: rgba(180, 157, 255, 0.12);
  color: #b49dff;
  border-color: rgba(180, 157, 255, 0.25);
}

.risk-bar {
  overflow: hidden;
  height: 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.risk-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint), #e8841a);
}

.score-line {
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.6rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 850;
}

.score-line strong {
  color: var(--text);
}

.project-footer {
  justify-content: space-between;
  color: var(--muted);
  font-weight: 850;
}

.view-audits {
  width: 100%;
}

.audit-detail {
  margin-bottom: 3rem;
  padding: 2.5rem;
  border-radius: 1rem;
}

.audit-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 2rem;
}

.audit-summary h2 {
  margin: 0.35rem 0 0.75rem;
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.audit-summary p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.certificate-meta,
.review-meta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.7rem 1rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-weight: 800;
}

.certificate-meta a,
.certificate-meta strong,
.review-meta strong {
  min-width: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}

.certificate-meta code,
.review-meta code {
  min-width: 0;
  overflow-wrap: anywhere;
}

.audit-list {
  display: grid;
  gap: 1rem;
}

.audit-card {
  padding: 1.25rem;
  border: 1px solid rgba(62, 31, 101, 0.6);
  border-radius: 0.8rem;
  background: rgba(43, 10, 80, 0.5);
}

.audit-card-header {
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.audit-card h3 {
  margin: 0;
}

.audit-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.certificate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.certificate-note {
  margin-top: 1rem;
  color: var(--soft);
  font-size: 0.92rem;
  font-weight: 800;
}

.audit-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

.audit-flag {
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.flag-broken {
  background: rgba(247, 169, 196, 0.15);
  color: var(--rose);
  border: 1px solid rgba(247, 169, 196, 0.35);
}

.flag-outdated {
  background: rgba(244, 199, 107, 0.15);
  color: var(--amber);
  border: 1px solid rgba(244, 199, 107, 0.35);
}

.flag-no-pdf {
  background: rgba(143, 148, 139, 0.15);
  color: var(--soft);
  border: 1px solid rgba(143, 148, 139, 0.35);
}

.audit-card--broken {
  border-color: rgba(247, 169, 196, 0.3);
  background: rgba(80, 10, 40, 0.5);
}

.review-badge {
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: rgba(243, 147, 34, 0.12);
  color: var(--mint);
  font-weight: 900;
  border: 1px solid rgba(243, 147, 34, 0.25);
}

.submit-form {
  display: grid;
  gap: 1.25rem;
}

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

label {
  display: grid;
  gap: 0.5rem;
  color: var(--muted);
  font-weight: 850;
}

.upload-box {
  justify-items: center;
  padding: 2rem;
  border: 1px dashed rgba(243, 147, 34, 0.55);
  border-radius: 0.9rem;
  background: rgba(243, 147, 34, 0.06);
  text-align: center;
  cursor: pointer;
}

.upload-box input {
  max-width: 22rem;
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
}

.upload-box span {
  color: var(--text);
  font-size: 1.25rem;
}

.upload-box small {
  color: var(--soft);
}

.upload-box strong {
  color: var(--mint);
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.upload-box strong.file-error {
  color: var(--amber);
}

.form-status {
  min-height: 1.5rem;
  margin: 0;
  color: var(--mint);
  font-weight: 850;
}


.review-board {
  display: grid;
  gap: 1rem;
}

.review-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.6rem;
}

.import-trigger {
  margin: 0;
}

.review-item {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1.25rem;
  border: 1px solid rgba(62, 31, 101, 0.6);
  border-radius: 0.85rem;
  background: rgba(43, 10, 80, 0.5);
}

.review-item h3 {
  margin: 0.7rem 0 0.25rem;
  font-size: 1.35rem;
}

.review-item p,
.empty-review p,
.empty-results {
  margin: 0;
  color: var(--muted);
  font-weight: 750;
}

.review-meta {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.review-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.6rem;
}

.review-actions .button:disabled,
.certificate-actions .button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.empty-review,
.empty-results {
  padding: 1.25rem;
  border: 1px solid rgba(62, 31, 101, 0.6);
  border-radius: 0.85rem;
  background: rgba(43, 10, 80, 0.5);
}

.empty-review h3 {
  margin: 0 0 0.4rem;
}

.empty-detail {
  text-align: center;
  padding: 2rem 0;
}

.hidden {
  display: none;
}

.site-footer {
  border-top: 1px solid rgba(62, 31, 101, 0.8);
  background: rgba(19, 6, 42, 0.95);
  margin-top: 1rem;
}

.site-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  width: min(100% - 3rem, 1200px);
  margin: 0 auto;
  padding: 2rem 0 1.5rem;
}

.brand-footer {
  font-size: 1.25rem;
}

.footer-copy {
  margin: 0;
  color: var(--soft);
  font-size: 0.9rem;
  font-weight: 700;
}

.footer-nav {
  display: flex;
  gap: 0.75rem;
}

.footer-nav a {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
  white-space: nowrap;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.footer-nav a:hover {
  border-color: rgba(52, 211, 153, 0.6);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.footer-nav svg {
  flex-shrink: 0;
}

.footer-legal {
  width: 100%;
  margin: 0;
  padding: 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--soft);
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  width: min(100% - 3rem, 1200px);
  margin: 0 auto;
}

@media (max-width: 1000px) {
  .hero,
  .audit-layout,
  .review-item {
    grid-template-columns: 1fr;
  }

  .review-actions {
    justify-content: flex-start;
  }

  .review-tools {
    justify-content: flex-start;
  }

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .site-header-inner,
  main {
    width: min(100% - 1.25rem, 1200px);
  }

  .site-header-inner,
  .section-heading,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .header-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .header-actions a {
    min-height: 2.8rem;
    padding: 0.75rem;
    text-align: center;
  }

  .brand-mark {
    width: 3rem;
    height: 3rem;
  }

  .hero {
    min-height: auto;
    padding-top: 3rem;
  }

  .hero h1 {
    font-size: clamp(2.6rem, 14vw, 4rem);
  }

  .stats,
  .project-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .toolbar select {
    max-width: none;
  }

  .project-card,
  .audit-detail,
  .explorer-section,
  .submit-section,
  .review-section {
    padding: 1.25rem;
  }

  .site-footer-inner {
    width: min(100% - 1.25rem, 1200px);
    flex-direction: column;
    gap: 1rem;
  }

  .footer-legal {
    width: min(100% - 1.25rem, 1200px);
  }

  .certificate-meta,
  .review-meta {
    grid-template-columns: 1fr;
  }
}
