:root {
  color-scheme: light;
  --ink: #1b2533;
  --muted: #627083;
  --paper: #f7f4ee;
  --surface: #ffffff;
  --line: #d9d5ca;
  --accent: #276f86;
  --accent-strong: #174a5c;
  --warn: #b4542d;
  --good: #2d7d59;
  --shadow: 0 18px 50px rgba(34, 40, 48, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(120deg, rgba(39, 111, 134, 0.13), transparent 42%),
    linear-gradient(180deg, #fbfaf7 0%, var(--paper) 100%);
  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(1440px, calc(100% - 36px));
  margin: 0 auto;
  padding: 34px 0 48px;
}

.hero {
  min-height: 310px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 34px;
  align-items: end;
  padding: 34px 0 44px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-strong);
  font-size: 0.83rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 16px;
  font-size: clamp(3.4rem, 9vw, 7.8rem);
  line-height: 0.88;
  letter-spacing: 0;
}

.lede {
  max-width: 760px;
  margin-bottom: 0;
  color: #3e4a59;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.55;
}

.hero-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
  padding: 22px;
  min-height: 130px;
  display: grid;
  align-content: end;
}

.hero-panel p {
  margin: 16px 0 0;
  color: #2d3847;
  line-height: 1.45;
}

.status-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 7px rgba(45, 125, 89, 0.12);
}

.workspace {
  display: grid;
  grid-template-columns: 470px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.form-panel,
.result-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.form-panel {
  position: sticky;
  top: 18px;
  padding: 22px;
}

.form-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.form-header h2,
.result-panel h2 {
  margin-bottom: 6px;
  font-size: 1.35rem;
}

.form-header p,
.setup-note {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

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

label {
  display: grid;
  gap: 7px;
}

label span {
  color: #334052;
  font-size: 0.82rem;
  font-weight: 800;
}

.wide {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cfc9bc;
  border-radius: 8px;
  background: #fffefb;
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
  transition: border 160ms ease, box-shadow 160ms ease;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(39, 111, 134, 0.12);
}

.primary-button,
.ghost-button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

.primary-button {
  width: 100%;
  margin: 18px 0 10px;
  background: var(--accent);
  color: #fff;
  padding: 14px 18px;
}

.primary-button:hover {
  background: var(--accent-strong);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.ghost-button {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: #fffdf8;
  color: var(--accent-strong);
  padding: 10px 12px;
  white-space: nowrap;
}

.result-panel {
  min-height: 680px;
  overflow: hidden;
}

.empty-state,
.loading {
  min-height: 680px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 42px;
  text-align: center;
}

.empty-state p,
.loading p {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.55;
}

.gauge {
  width: 96px;
  height: 96px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 2rem;
  font-weight: 900;
  background: #fffdf8;
}

.spinner {
  width: 58px;
  height: 58px;
  border: 5px solid rgba(39, 111, 134, 0.16);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 900ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.report {
  padding: 26px;
}

.report-top {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.score {
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--accent) calc(var(--score) * 1%), #e6e0d4 0);
}

.score span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fffefb;
  color: var(--ink);
  font-size: 1.75rem;
  font-weight: 900;
}

.verdict {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 10px;
  border-radius: 999px;
  background: rgba(180, 84, 45, 0.12);
  color: var(--warn);
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 900;
}

.report h2 {
  margin-bottom: 10px;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
}

.report p {
  color: #3f4b5a;
  line-height: 1.58;
}

.section {
  padding: 24px 0 4px;
  border-bottom: 1px solid var(--line);
}

.section:last-child {
  border-bottom: 0;
}

.section h3 {
  margin-bottom: 14px;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.list li,
.issue,
.check-card {
  border: 1px solid #ded8cc;
  border-radius: 8px;
  background: #fffdf8;
  padding: 14px;
}

.issue {
  display: grid;
  gap: 8px;
}

.issue-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.issue strong,
.check-card strong {
  color: #202b38;
}

.severity {
  border-radius: 999px;
  background: #eee7da;
  color: #4c5967;
  padding: 5px 8px;
  font-size: 0.74rem;
  font-weight: 900;
}

.severity.High,
.severity.Critical {
  background: rgba(180, 84, 45, 0.12);
  color: var(--warn);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.check-card ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.sources a {
  color: var(--accent-strong);
  overflow-wrap: anywhere;
}

.error {
  min-height: 680px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 42px;
  text-align: center;
}

.error strong {
  color: var(--warn);
}

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

  .form-panel {
    position: static;
  }
}

@media (max-width: 680px) {
  .shell {
    width: min(100% - 24px, 1440px);
    padding-top: 18px;
  }

  .hero {
    min-height: auto;
    gap: 20px;
    padding-bottom: 26px;
  }

  .form-header,
  .report-top,
  .two-col {
    grid-template-columns: 1fr;
    display: grid;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .ghost-button {
    width: 100%;
  }

  .report,
  .form-panel {
    padding: 18px;
  }
}
