:root {
  --bg: #f7f8fb;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #5f6b7a;
  --line: #d9e0ea;
  --base: #0a5cff;
  --teal: #087f7b;
  --amber: #a15c00;
  --red: #b42318;
  --shadow: 0 16px 48px rgba(18, 24, 40, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

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

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 42px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 20px;
  align-items: stretch;
  margin-bottom: 20px;
}

.hero-copy,
.network-panel,
.tool-panel,
.results-panel,
.proof-strip article,
.evidence-matrix {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 34px;
  min-height: 276px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow,
.label {
  margin: 0;
  color: var(--base);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  font-size: clamp(2.8rem, 6vw, 5.4rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1.25rem;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.05rem;
}

.hero-copy p:last-child,
.proof-strip p:last-child {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.network-panel,
.tool-panel,
.results-panel {
  padding: 22px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

select,
input,
textarea {
  width: 100%;
  margin-top: 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcff;
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
}

textarea {
  resize: vertical;
}

select:focus,
input:focus,
textarea:focus {
  border-color: var(--base);
  box-shadow: 0 0 0 3px rgba(10, 92, 255, 0.12);
}

.icon-button {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 7px;
}

button {
  border: 0;
  border-radius: 7px;
  background: var(--base);
  color: #fff;
  padding: 11px 15px;
  font-weight: 800;
  cursor: pointer;
}

button.secondary {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

.health-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0 0;
}

.health-grid div,
.score-card,
.findings,
.output-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfcff;
}

dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

dd {
  margin: 6px 0 0;
  font-size: 1.1rem;
  font-weight: 900;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
  gap: 20px;
  align-items: start;
}

.tool-panel {
  display: grid;
  gap: 16px;
}

label {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.results-panel {
  display: grid;
  gap: 14px;
}

.score-line {
  display: flex;
  align-items: end;
  gap: 14px;
  margin-top: 8px;
}

.score-line strong {
  font-size: 3.7rem;
  line-height: 0.9;
}

.score-line span {
  margin-bottom: 7px;
  color: var(--muted);
  font-weight: 900;
}

.meter {
  height: 9px;
  margin-top: 15px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ecf3;
}

.meter span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--teal);
  transition: width 180ms ease;
}

ul {
  margin: 12px 0 0;
  padding-left: 19px;
  color: var(--muted);
  line-height: 1.6;
}

pre {
  min-height: 280px;
  max-height: 460px;
  overflow: auto;
  margin: 14px 0 0;
  border-radius: 7px;
  background: #101828;
  color: #d8e3ff;
  padding: 16px;
  font-size: 0.84rem;
  line-height: 1.55;
}

.proof-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.proof-strip article {
  padding: 22px;
}

.evidence-matrix {
  margin-top: 20px;
  padding: 22px;
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.evidence-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
  padding: 15px;
}

.evidence-grid strong,
.evidence-grid span {
  display: block;
}

.evidence-grid strong {
  margin-bottom: 7px;
}

.evidence-grid span {
  color: var(--muted);
  line-height: 1.5;
}

@media (max-width: 860px) {
  .hero,
  .workspace,
  .proof-strip,
  .evidence-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    min-height: auto;
    padding: 26px;
  }

  .field-grid,
  .health-grid {
    grid-template-columns: 1fr;
  }
}
