:root {
  --ink: #17211b;
  --muted: #637069;
  --paper: #f4f2eb;
  --card: #fffefa;
  --line: #dcded7;
  --green: #1e5b45;
  --lime: #d9f46a;
  --orange: #db7046;
  --red: #bd3840;
  --yellow: #d6a21c;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: var(--green); }
.site-header, .site-footer {
  max-width: 1180px;
  margin: auto;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { color: var(--ink); text-decoration: none; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: white; }
.header-note, .site-footer { color: var(--muted); font-size: 14px; }
.hero {
  max-width: 1124px;
  margin: 30px auto 0;
  padding: 80px 72px;
  border-radius: 28px;
  color: white;
  background:
    radial-gradient(circle at 88% 18%, rgba(217,244,106,.25), transparent 27%),
    linear-gradient(135deg, #163e31, #1e5b45);
  box-shadow: 0 30px 70px rgba(18, 57, 43, .16);
}
.eyebrow { color: #6b7b72; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.hero .eyebrow { color: var(--lime); }
.hero h1 { margin: 18px 0; font-size: clamp(42px, 7vw, 78px); line-height: .98; letter-spacing: -.055em; max-width: 850px; }
.hero h1 span { color: var(--lime); }
.hero-copy { max-width: 650px; color: #dce8e1; font-size: 19px; line-height: 1.55; }
.scan-form { max-width: 810px; margin-top: 40px; }
.scan-form label { display: block; margin-bottom: 10px; font-size: 14px; font-weight: 700; }
.input-row { display: flex; gap: 10px; padding: 8px; border-radius: 14px; background: white; }
.input-row input { min-width: 0; flex: 1; border: 0; outline: 0; padding: 13px 16px; font: inherit; font-size: 17px; }
button, .button {
  border: 0; border-radius: 10px; padding: 15px 22px; color: var(--ink); background: var(--lime);
  font: inherit; font-weight: 800; cursor: pointer; text-decoration: none; display: inline-block;
}
button:disabled { opacity: .6; cursor: wait; }
.form-error { min-height: 20px; color: #ffd6cb; }
.limits { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 22px; color: #bfd0c7; font-size: 13px; }
.limits span::before { content: "✓"; margin-right: 7px; color: var(--lime); }
.features { max-width: 1124px; margin: 28px auto 80px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.features article { padding: 30px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.55); }
.feature-number { color: var(--green); font-size: 12px; font-weight: 800; }
.features h2 { margin: 24px 0 8px; font-size: 20px; }
.features p { margin: 0; color: var(--muted); line-height: 1.55; }
.status-shell { min-height: 70vh; display: grid; place-items: center; padding: 40px 20px; }
.status-card { width: min(620px, 100%); padding: 55px; border-radius: 24px; background: var(--card); text-align: center; box-shadow: 0 20px 60px rgba(39,50,43,.1); }
.status-card h1 { margin: 16px 0 10px; font-size: 42px; letter-spacing: -.04em; }
.status-card p { color: var(--muted); line-height: 1.6; }
.spinner { width: 56px; height: 56px; margin: 0 auto 28px; border: 5px solid #dfe5e0; border-top-color: var(--green); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.status-check, .status-error { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 28px; border-radius: 50%; color: white; background: var(--green); font-size: 28px; font-weight: 900; }
.status-error { background: var(--red); }
.progress { height: 8px; margin: 28px 0; border-radius: 20px; overflow: hidden; background: #e5e8e4; }
.progress span { display: block; width: 12%; height: 100%; background: var(--green); transition: width .5s ease; }
.scan-meta { display: flex; justify-content: center; gap: 45px; margin: 25px 0; }
.scan-meta div { text-align: left; }
.scan-meta dt { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.scan-meta dd { margin: 4px 0 0; font-weight: 700; }
.hidden { display: none; }
.report-page { background: #e9e9e3; }
.report { max-width: 1080px; margin: 36px auto; padding: 52px; background: var(--card); box-shadow: 0 10px 40px rgba(30,38,33,.08); }
.report-header { display: flex; justify-content: space-between; gap: 30px; align-items: center; padding-bottom: 36px; border-bottom: 1px solid var(--line); }
.report-header h1 { margin: 9px 0; font-size: 40px; word-break: break-word; }
.report-header p { color: var(--muted); }
.score { flex: 0 0 145px; height: 145px; display: flex; flex-direction: column; justify-content: center; align-items: center; border-radius: 50%; border: 10px solid; }
.score strong { font-size: 42px; line-height: 1; }
.score span, .score small { color: var(--muted); font-size: 12px; }
.score small { margin-top: 4px; font-weight: 800; text-transform: uppercase; }
.score-low { border-color: #65a978; }.score-medium { border-color: var(--yellow); }.score-high { border-color: var(--orange); }.score-critical { border-color: var(--red); }
.report-summary { margin: 28px 0; padding: 28px; border-radius: 16px; background: #eef5ef; }
.report-summary h2 { margin-top: 0; }
.report-summary p { margin-bottom: 0; line-height: 1.6; }
.report-section { margin-top: 54px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; }
.section-heading h2 { margin: 8px 0 0; font-size: 30px; }
.finding-count { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: white; font-weight: 800; }
.finding-list { margin-top: 22px; display: grid; gap: 14px; }
.finding { padding: 24px; border: 1px solid var(--line); border-radius: 14px; }
.finding-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.severity { padding: 5px 8px; border-radius: 5px; color: white; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.severity-low { background: #568266; }.severity-medium { background: var(--yellow); }.severity-high { background: var(--orange); }.severity-critical { background: var(--red); }
.finding-type { color: var(--muted); font-family: ui-monospace, monospace; font-size: 12px; }
.finding h3 { margin-bottom: 8px; }
.finding p { color: #48544d; line-height: 1.55; }
.finding a { font-size: 13px; word-break: break-all; }
.evidence, .recommendation { margin-top: 15px; padding: 14px; border-radius: 8px; background: #f3f3ee; color: #4f5a54; font-size: 14px; line-height: 1.5; }
.recommendation { background: #edf4d3; }
.evidence b, .recommendation b { display: block; margin-bottom: 4px; color: var(--ink); }
.evidence pre {
  margin: 10px 0 0;
  max-height: 260px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
}
.two-column { margin-top: 50px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.action-card { padding: 28px; border-radius: 16px; background: #eef5ef; }
.action-card.legal { background: #f3efe1; }
.action-card h2 { margin: 8px 0 18px; }
.action-card li { margin: 10px 0; line-height: 1.45; }
.disclaimer { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.55; }

@media (max-width: 760px) {
  .header-note { display: none; }
  .hero { margin: 10px 14px 0; padding: 48px 24px; }
  .input-row { display: block; }
  .input-row input, .input-row button { width: 100%; }
  .features { margin: 14px 14px 50px; grid-template-columns: 1fr; }
  .status-card { padding: 38px 22px; }
  .report { margin: 0; padding: 28px 18px; }
  .report-header { align-items: flex-start; }
  .score { flex-basis: 105px; height: 105px; border-width: 7px; }
  .score strong { font-size: 30px; }
  .two-column { grid-template-columns: 1fr; }
}

@media print {
  body, .report-page { background: white; }
  .report { margin: 0; max-width: none; box-shadow: none; }
  .finding { break-inside: avoid; }
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.summary-grid div {
  padding: 16px 0;
  border-top: 2px solid var(--ink);
}
.summary-grid strong,
.summary-grid span {
  display: block;
}
.summary-grid strong {
  font-size: 28px;
}
.summary-grid span {
  margin-top: 5px;
  color: var(--muted);
}
.severity-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.severity-info { background: #e7f2ff; color: #174f86; }
.severity-low { background: #e8f5ec; color: #226239; }
.severity-medium { background: #fff3d6; color: #77510a; }
.severity-high { background: #ffe5dc; color: #8b2d17; }
.severity-critical { background: #f7dfe5; color: #7e1830; }
.technical-appendix > details > summary {
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
}
.discovery-evidence {
  margin-bottom: 18px;
}
.discovery-evidence pre {
  max-height: 520px;
  overflow: auto;
  padding: 14px;
  background: #f6f7f8;
  border: 1px solid var(--line);
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
}
.technical-list {
  line-height: 1.8;
}
.page-diagnostic {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.page-diagnostic > summary {
  cursor: pointer;
  font-weight: 600;
}
@media (max-width: 720px) {
  .risk-overview {
    grid-template-columns: 1fr;
  }
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.risk-overview {
  display: grid;
  grid-template-columns: minmax(180px, 0.35fr) 1fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 24px;
}
.risk-overview strong {
  display: inline-block;
  margin: 6px 10px 6px 0;
  font-size: 34px;
}
.risk-overview p {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
}
.executive-status {
  margin-bottom: 6px !important;
  font-weight: 800;
}
.raw-diagnostic {
  margin-top: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.raw-diagnostic > summary {
  cursor: pointer;
  font-weight: 700;
}
.raw-diagnostic pre {
  max-height: 220px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
}
.policy-checks {
  padding-left: 20px;
  line-height: 1.7;
}
.check-passed { color: #226239; }
.check-missing { color: #8b2d17; }
