:root {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: #0f172a;
  background-color: #f1f5f9;
  --surface: rgba(255, 255, 255, 0.9);
  --border: rgba(99, 102, 241, 0.15);
}

*, *::before, *::after {
  box-sizing: border-box;
}

::selection {
  background: rgba(124, 58, 237, 0.28);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem clamp(1rem, 3vw, 3rem);
  background: radial-gradient(circle at top, #eef2ff, #f8fafc 45%, #ecfeff 90%);
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.4), transparent 70%);
  filter: blur(70px);
  z-index: 0;
  opacity: 0.65;
}

body::before {
  top: -130px;
  left: -80px;
}

body::after {
  bottom: -150px;
  right: -60px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.35), transparent 70%);
}

.dashboard-container {
  width: 100%;
  max-width: 1180px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
  z-index: 1;
}

.page-header {
  text-align: center;
}

.page-header h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.9rem);
  letter-spacing: -0.02em;
}

.page-header p {
  margin: 0.35rem auto 0;
  color: #475569;
  max-width: 620px;
}

.tab-list {
  display: inline-flex;
  gap: 0.55rem;
  background: rgba(226, 232, 255, 0.9);
  border-radius: 999px;
  padding: 0.4rem;
  align-self: center;
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.2);
}

.tab-button {
  border: none;
  background: transparent;
  color: #475569;
  padding: 0.6rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.tab-button.is-active {
  background: #fff;
  color: #1e3a8a;
  box-shadow: 0 10px 25px rgba(30, 58, 138, 0.2);
  transform: translateY(-1px);
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.95fr);
  gap: 1.25rem;
  align-items: stretch;
}

.form-card,
.results-card,
.notes-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 1.8rem;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}

.form-card::before,
.results-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at top, rgba(99, 102, 241, 0.18), transparent 60%);
  pointer-events: none;
}

.form-card::after,
.results-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.35);
  mix-blend-mode: overlay;
  pointer-events: none;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  z-index: 1;
}

.inline-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

label {
  font-weight: 600;
  color: #1e293b;
  font-size: 0.95rem;
}

input[type="text"],
input[type="url"] {
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 16px;
  padding: 0.85rem 0.95rem;
  font-size: 0.98rem;
  background: rgba(255, 255, 255, 0.85);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

input[type="text"]:focus,
input[type="url"]:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.25);
  background: #fff;
  transform: translateY(-1px);
}

.fieldset {
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 20px;
  padding: 1.2rem 1.15rem;
}

.fieldset legend {
  padding: 0 0.65rem;
  font-weight: 600;
  color: #475569;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.65rem 0.85rem;
  margin-top: 0.85rem;
}

.checkbox-grid label {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-weight: 500;
  font-size: 0.95rem;
  color: #475569;
  padding: 0.5rem 0.55rem;
  border-radius: 14px;
  background: rgba(99, 102, 241, 0.08);
  transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.checkbox-grid label:hover {
  background: rgba(79, 70, 229, 0.18);
  color: #1e3a8a;
  transform: translateY(-1px);
}

.checkbox-grid input {
  accent-color: #2563eb;
}

.primary {
  border: none;
  border-radius: 999px;
  padding: 1rem 1.65rem;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 25px 45px rgba(37, 99, 235, 0.35);
}

.primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.primary:not(:disabled):hover {
  transform: translateY(-2px) scale(1.01);
}

.results-card {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.results-header {
  text-align: center;
  position: relative;
  z-index: 1;
}

.result-label {
  font-size: 0.78rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #94a3b8;
  margin: 0;
}

.score-meter {
  width: 210px;
  height: 210px;
  margin: 0.55rem auto 0.35rem;
  border-radius: 50%;
  position: relative;
  background: conic-gradient(
    from -90deg,
    #7c3aed 0deg,
    #2563eb calc(var(--percent, 0) * 1deg),
    rgba(226, 232, 240, 0.85) calc(var(--percent, 0) * 1deg)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  position: relative;
}

.score-meter::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.25);
  z-index: 1;
}

.score-value {
  position: relative;
  z-index: 2;
  font-size: 2.8rem;
  font-weight: 900;
  color: #030712;
  text-shadow: 0 2px 6px rgba(15, 23, 42, 0.35);
}

.score-subtext {
  margin: 0.3rem 0 0;
  color: #475569;
  font-size: 0.92rem;
}

.badge-chip {
  display: inline-flex;
  align-self: center;
  margin-top: 0.95rem;
  padding: 0.45rem 1.05rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: capitalize;
}

#results-content {
  border-top: 1px solid rgba(148, 163, 184, 0.4);
  padding-top: 1rem;
  min-height: 160px;
}

.result-evidence {
  margin-top: 0.5rem;
}

.evidence-list {
  margin: 0.25rem 0 0;
  padding-left: 1.2rem;
  color: #1f2937;
}

.evidence-list li {
  margin-bottom: 0.4rem;
}

.muted {
  color: #94a3b8;
}

.status {
  margin: 0;
  padding: 0.35rem 0;
  color: #0f172a;
}

.status-error {
  color: #b91c1c;
}

.notes-card h2 {
  margin-top: 0;
  margin-bottom: 0.45rem;
}

.notes-card p {
  margin-top: 0;
  margin-bottom: 0.7rem;
  line-height: 1.68;
  color: #445065;
}

@media (max-width: 1024px) {
  body {
    padding: 1.5rem;
  }

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

  .score-meter {
    width: 190px;
    height: 190px;
  }
}

@media (max-width: 640px) {
  .tab-list {
    flex-direction: column;
    border-radius: 30px;
    width: 100%;
  }

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

  .form-card,
  .results-card,
  .notes-card {
    padding: 1.35rem;
  }
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-thumb {
  background: rgba(79, 70, 229, 0.35);
  border-radius: 999px;
}
