:root {
  --ink: #17130d;
  --muted: #6f6554;
  --paper: #f7efe1;
  --card: rgba(255, 252, 244, 0.9);
  --line: rgba(23, 19, 13, 0.14);
  --accent: #d55c2b;
  --accent-dark: #8e3317;
  --good: #1f7a4d;
  --warn: #b26a00;
  --bad: #b42318;
  --shadow: 0 24px 70px rgba(54, 37, 12, 0.18);
  font-family: Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 10%, rgba(213, 92, 43, 0.24), transparent 28rem),
    radial-gradient(circle at 88% 18%, rgba(31, 122, 77, 0.16), transparent 30rem),
    linear-gradient(135deg, #fbf4e8 0%, #f3e1bf 45%, #e8c98e 100%);
}

.shell { width: min(1180px, calc(100vw - 32px)); margin: 0 auto; padding: 38px 0; }
.hero { display: grid; grid-template-columns: 1.35fr 0.65fr; gap: 24px; align-items: stretch; }
.panel, .report-card, .module-card { background: var(--card); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); }
.panel { padding: 34px; position: relative; overflow: hidden; }
.panel::after { content: ''; position: absolute; inset: auto -50px -70px auto; width: 220px; height: 220px; border-radius: 50%; background: rgba(213, 92, 43, 0.18); }
h1 { font-size: clamp(2.5rem, 8vw, 6.2rem); line-height: 0.9; letter-spacing: -0.08em; margin: 0 0 18px; max-width: 780px; }
h2 { margin: 0 0 14px; font-size: 1.45rem; }
p { color: var(--muted); line-height: 1.6; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
button { border: 0; border-radius: 999px; padding: 13px 18px; background: var(--ink); color: #fff9eb; cursor: pointer; font-weight: 700; }
button.secondary { background: #fff7e7; color: var(--ink); border: 1px solid var(--line); }
button:disabled { opacity: 0.55; cursor: progress; }
.score { display: grid; place-items: center; min-height: 260px; text-align: center; }
.score strong { font-size: 5rem; line-height: 1; letter-spacing: -0.08em; }
.score span { color: var(--muted); text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.82rem; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.module-card, .report-card { padding: 18px; }
.status { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 5px 10px; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; }
.status.pass { background: rgba(31, 122, 77, 0.12); color: var(--good); }
.status.warn, .status.risk { background: rgba(178, 106, 0, 0.14); color: var(--warn); }
.status.fail { background: rgba(180, 35, 24, 0.13); color: var(--bad); }
.finding { border-top: 1px solid var(--line); padding: 12px 0; }
pre { max-height: 320px; overflow: auto; background: #19140e; color: #fff2d6; padding: 14px; border-radius: 16px; font-size: 0.78rem; }
.muted { color: var(--muted); }

/* ---- Findings Alert Banner (between hero and grid) ---- */
.findings-alert-zone { margin-top: 18px; }
.alert-banner {
  background: linear-gradient(135deg, rgba(180, 35, 24, 0.06) 0%, rgba(178, 106, 0, 0.06) 100%);
  border: 2px solid rgba(180, 35, 24, 0.25);
  border-radius: 28px;
  padding: 28px 30px;
  box-shadow: var(--shadow);
}
.alert-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.alert-header h2 {
  margin: 0;
  font-size: 1.35rem;
  color: var(--bad);
}
.alert-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(180, 35, 24, 0.12);
  color: var(--bad);
  font-size: 1.4rem;
  flex-shrink: 0;
}
.alert-list { display: flex; flex-direction: column; gap: 14px; }
.alert-item {
  background: rgba(255, 252, 244, 0.85);
  border-radius: 18px;
  padding: 16px 20px;
  border-left: 4px solid var(--line);
}
.alert-item.alert-critical { border-left-color: var(--bad); }
.alert-item.alert-high { border-left-color: #d45a00; }
.alert-item.alert-medium { border-left-color: var(--warn); }
.alert-item.alert-low { border-left-color: var(--muted); }
.alert-item-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.severity-badge {
  display: inline-block;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.severity-critical { background: rgba(180, 35, 24, 0.14); color: var(--bad); }
.severity-high { background: rgba(212, 90, 0, 0.12); color: #d45a00; }
.severity-medium { background: rgba(178, 106, 0, 0.12); color: var(--warn); }
.severity-low { background: rgba(111, 101, 84, 0.12); color: var(--muted); }
.alert-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
}
.alert-explanation {
  margin: 4px 0 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted);
}
.alert-evidence {
  margin-top: 8px;
  font-size: 0.82rem;
}
.alert-evidence summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.78rem;
}

@media (max-width: 760px) {
  .hero, .grid { grid-template-columns: 1fr; }
  .shell { width: min(100vw - 20px, 1180px); padding: 14px 0; }
  .panel { padding: 24px; border-radius: 22px; }
  .alert-banner { padding: 20px; border-radius: 22px; }
  .alert-item { padding: 12px 14px; }
}
