:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-soft: #f3f7ff;
  --text: #101828;
  --muted: #667085;
  --border: #dfe6f1;
  --blue: #1769ff;
  --blue-dark: #0e56dc;
  --purple: #7c3aed;
  --green: #079455;
  --orange: #f79009;
  --red: #d92d20;
  --shadow: 0 16px 40px rgba(16, 24, 40, .07);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 13% 8%, rgba(23, 105, 255, .10), transparent 25rem),
    radial-gradient(circle at 84% 9%, rgba(124, 58, 237, .08), transparent 24rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input { font: inherit; }
a { color: inherit; }
.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255,255,255,.88);
  border-bottom: 1px solid rgba(223,230,241,.9);
  backdrop-filter: blur(16px);
}
.header-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; gap: 10px; align-items: center; font-size: 20px; font-weight: 800; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; color: var(--blue); display: inline-flex; }
.brand-mark svg { width: 100%; height: 100%; }
.header-nav { display: flex; align-items: center; gap: 26px; font-size: 14px; font-weight: 650; }
.header-nav > a:not(.github-button) { text-decoration: none; color: #475467; }
.header-nav > a:not(.github-button):hover { color: var(--text); }
.github-button { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; background: #101828; color: white; text-decoration: none; }
.github-button svg { width: 18px; height: 18px; }

.hero { padding: 76px 0 34px; text-align: center; }
.hero-copy { width: min(840px, 100%); margin: 0 auto; }
.eyebrow { margin: 0 0 8px; color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(40px, 6vw, 68px); line-height: 1.04; letter-spacing: -.05em; }
h1 span { background: linear-gradient(92deg, var(--blue), var(--purple)); -webkit-background-clip: text; color: transparent; }
.hero-description { width: min(720px, 100%); margin: 20px auto 0; color: #475467; font-size: clamp(17px, 2vw, 21px); line-height: 1.55; }

.trust-strip { margin: 34px auto; width: min(900px, 100%); display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; text-align: left; }
.trust-item { display: flex; align-items: center; gap: 12px; justify-content: center; }
.trust-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; background: #eef4ff; font-size: 21px; }
.trust-item strong, .trust-item small { display: block; }
.trust-item small { margin-top: 3px; color: var(--muted); font-size: 12px; }

.upload-card {
  margin: 36px auto 0;
  padding: 48px 28px 34px;
  border: 2px dashed #a9c8ff;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(244,248,255,.92));
  box-shadow: var(--shadow);
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.upload-card.is-dragging { border-color: var(--blue); transform: translateY(-2px); background: #edf4ff; }
.upload-icon { width: 58px; height: 58px; margin: 0 auto 16px; color: var(--blue); }
.upload-icon svg { width: 100%; height: 100%; }
.upload-card h2 { margin: 0; font-size: 26px; }
.upload-card > p { margin: 7px 0 0; color: var(--muted); }
.primary-button { margin-top: 22px; min-width: 210px; border: 0; border-radius: 999px; padding: 13px 24px; color: #fff; background: linear-gradient(100deg, var(--blue), #2588ff); font-weight: 800; cursor: pointer; box-shadow: 0 10px 24px rgba(23,105,255,.2); }
.primary-button:hover { background: var(--blue-dark); }
.privacy-note { font-size: 13px !important; margin-top: 18px !important; }
.inline-message { min-height: 22px; margin-top: 12px; color: var(--red); font-weight: 700; }

.section { padding: 38px 0; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 28px; margin-bottom: 20px; }
.section-heading h2, .results-head h2 { margin: 0; font-size: 30px; letter-spacing: -.03em; }
.section-heading > p { margin: 0 0 2px; color: var(--muted); max-width: 460px; text-align: right; }
.format-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 12px; }
.format-card { min-height: 96px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 16px; background: rgba(255,255,255,.82); font-weight: 800; font-size: 13px; }
.format-card span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: #edf4ff; color: var(--blue); font-size: 11px; }
.format-card:nth-child(3n+2) span { background: #ecfdf3; color: var(--green); }
.format-card:nth-child(3n+3) span { background: #f4f0ff; color: var(--purple); }

.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature-card { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: rgba(255,255,255,.84); box-shadow: 0 8px 24px rgba(16,24,40,.035); }
.feature-card h3 { margin: 16px 0 8px; }
.feature-card p { margin: 0; color: var(--muted); line-height: 1.6; font-size: 14px; }
.feature-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; font-weight: 900; }
.feature-icon.blue { color: var(--blue); background: #eef4ff; }
.feature-icon.green { color: var(--green); background: #ecfdf3; }
.feature-icon.purple { color: var(--purple); background: #f4f0ff; }
.feature-icon.orange { color: var(--orange); background: #fffaeb; }

.results-section { scroll-margin-top: 90px; padding-bottom: 70px; }
.results-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 20px; }
.secondary-button { border: 1px solid #cfd7e5; background: #fff; color: #344054; border-radius: 12px; padding: 10px 15px; font-weight: 750; cursor: pointer; }
.report-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(350px, .95fr); gap: 18px; }
.preview-card, .detector-panel, .details-card { border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.preview-card { overflow: hidden; }
.preview-frame { aspect-ratio: 4/3; background: #eff3f8; display: grid; place-items: center; overflow: hidden; }
.preview-frame img { width: 100%; height: 100%; object-fit: contain; background: #111827; }
.preview-fallback { color: var(--muted); font-size: 14px; padding: 24px; text-align: center; }
.file-summary { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; }
.file-summary span { color: var(--muted); font-size: 13px; }
.detector-panel { padding: 20px; }
.progress-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 750; }
.progress-track { height: 7px; margin: 11px 0 18px; border-radius: 999px; background: #eaf0f7; overflow: hidden; }
.progress-track span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--blue), var(--purple)); transition: width .2s ease; }
.detector-list { display: grid; gap: 10px; }
.detector-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 13px; border: 1px solid #e7ecf3; border-radius: 14px; }
.detector-badge { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #f2f4f7; color: #667085; font-weight: 900; }
.detector-row[data-status="found"] .detector-badge { color: var(--green); background: #ecfdf3; }
.detector-row[data-status="warning"] .detector-badge { color: var(--orange); background: #fffaeb; }
.detector-row[data-status="error"] .detector-badge { color: var(--red); background: #fef3f2; }
.detector-copy strong { display: block; font-size: 14px; }
.detector-copy span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.status-pill { white-space: nowrap; font-size: 11px; font-weight: 850; padding: 5px 8px; border-radius: 999px; background: #f2f4f7; color: #667085; }
.detector-row[data-status="found"] .status-pill { color: #067647; background: #ecfdf3; }
.detector-row[data-status="warning"] .status-pill { color: #b54708; background: #fffaeb; }
.detector-row[data-status="error"] .status-pill { color: #b42318; background: #fef3f2; }
.details-card { margin-top: 18px; padding: 0 20px; }
.details-card summary { cursor: pointer; padding: 18px 0; font-weight: 800; }
.details-content { border-top: 1px solid var(--border); padding: 20px 0; display: grid; gap: 20px; }
.detail-block h3 { margin: 0 0 10px; font-size: 15px; }
.detail-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.detail-table th, .detail-table td { border-bottom: 1px solid #eef1f5; padding: 8px 10px; text-align: left; vertical-align: top; word-break: break-word; }
.detail-table th { width: 34%; color: #475467; }
.code-block { margin: 0; max-height: 320px; overflow: auto; padding: 14px; border-radius: 12px; background: #101828; color: #e4e7ec; font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-word; }

.site-footer { border-top: 1px solid var(--border); background: rgba(255,255,255,.6); color: var(--muted); font-size: 13px; padding: 28px 0; text-align: center; }

@media (max-width: 980px) {
  .format-grid { grid-template-columns: repeat(4, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .report-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .container { width: min(100% - 28px, 1180px); }
  .header-inner { min-height: 64px; }
  .brand { font-size: 17px; }
  .header-nav > a:not(.github-button) { display: none; }
  .github-button { padding: 9px 11px; font-size: 13px; }
  .hero { padding-top: 52px; }
  h1 { font-size: clamp(38px, 12vw, 54px); }
  .hero-description { font-size: 17px; }
  .trust-strip { grid-template-columns: 1fr; width: min(390px, 100%); gap: 12px; }
  .trust-item { justify-content: flex-start; }
  .upload-card { padding: 36px 18px 26px; border-radius: 20px; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 8px; text-align: left; }
  .format-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: 1fr; }
  .results-head { align-items: flex-end; }
  .detector-row { grid-template-columns: 40px minmax(0, 1fr); }
  .status-pill { grid-column: 2; justify-self: start; }
}
