:root {
  color-scheme: light;
  --bg: #f3f7fb;
  --bg-soft: #f8fafc;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-solid: #ffffff;
  --surface-muted: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #14b8a6;
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #dc2626;
  --critical: #dc2626;
  --high: #ea580c;
  --medium: #d97706;
  --low: #2563eb;
  --info: #64748b;
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 18px 50px rgba(15, 23, 42, 0.09);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 8%, rgba(37, 99, 235, 0.12), transparent 30%),
    radial-gradient(circle at 88% 4%, rgba(20, 184, 166, 0.12), transparent 32%),
    linear-gradient(180deg, #f8fafc 0%, var(--bg) 42%, #eef5fb 100%);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.035) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 72%);
}

button,
input,
select {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.24);
}

.brand-mark i {
  font-size: 1.15rem;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1.05rem;
  letter-spacing: 0;
}

.brand small,
.topbar-status {
  color: var(--muted);
  font-size: 0.88rem;
}

.topbar-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

.status-dot {
  width: 9px;
  height: 9px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(22, 163, 74, 0.12);
}

.scan-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(420px, 1fr);
  gap: 24px;
  align-items: stretch;
  overflow: hidden;
  padding: clamp(20px, 3vw, 30px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(239, 246, 255, 0.92)),
    radial-gradient(circle at 85% 20%, rgba(20, 184, 166, 0.16), transparent 34%);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 26px;
  box-shadow: var(--shadow-md);
}

.scan-panel::after {
  content: "";
  position: absolute;
  right: -92px;
  bottom: -124px;
  width: 310px;
  height: 310px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.14), transparent 67%);
  pointer-events: none;
}

.intro,
.scan-form {
  position: relative;
  z-index: 1;
}

.intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary-dark);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
  font-weight: 600;
}

strong,
b {
  font-weight: 600;
}

h1 {
  max-width: 760px;
  font-size: clamp(2rem, 4.2vw, 3.35rem);
  line-height: 1;
  letter-spacing: -0.028em;
}

h2 {
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
}

.summary {
  max-width: 680px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.trust-row span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 12px;
  color: #0f766e;
  background: rgba(240, 253, 250, 0.9);
  border: 1px solid #ccfbf1;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
}

.scan-form {
  align-self: center;
  display: grid;
  gap: 16px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 22px;
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

.scan-form > label {
  color: var(--text);
  font-weight: 600;
}

.input-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0;
  min-height: 62px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.input-row:focus-within {
  border-color: rgba(37, 99, 235, 0.65);
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.12), 0 18px 38px rgba(15, 23, 42, 0.08);
}

.input-icon {
  padding-left: 18px;
  color: var(--primary);
  font-size: 1rem;
  font-weight: 600;
}

.input-row input {
  min-width: 0;
  height: 60px;
  padding: 0 14px;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 1rem;
}

.input-row input::placeholder {
  color: #94a3b8;
}

.input-row button {
  height: 46px;
  margin-right: 8px;
  padding: 0 22px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: 0;
  border-radius: 14px;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.24);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.input-row button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.3);
}

.input-row button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.options-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.checkbox-row,
.select-row {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  color: var(--muted);
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.select-row select {
  height: 30px;
  padding: 0 8px;
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-weight: 600;
}

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.status {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 18px;
  padding: 16px 18px;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}

.status.loading {
  color: #0f766e !important;
  background: linear-gradient(135deg, #f0fdfa, #eff6ff) !important;
  border-color: #99f6e4 !important;
}

.spinner {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border: 3px solid rgba(20, 184, 166, 0.18);
  border-top-color: var(--secondary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loader-copy {
  display: grid;
  gap: 3px;
}

.loader-copy small {
  color: var(--muted);
}

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

.hidden {
  display: none;
}

.results {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.results.hidden {
  display: none;
}

.score-card,
.panel,
.sidebar-card {
  background: var(--surface);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(14px);
}

.score-card {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  padding: 28px;
}

.results-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 18px;
  align-items: start;
}

.results-main {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.summary-sidebar {
  position: sticky;
  top: 18px;
  grid-column: 2;
  grid-row: 1;
}

.results-main {
  grid-column: 1;
  grid-row: 1;
}

.sidebar-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

#sidebar-score {
  font-size: 2.8rem;
  line-height: 1;
  letter-spacing: -0.05em;
}

.risk-label {
  display: inline-flex;
  justify-content: center;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 999px;
  font-weight: 600;
}

.risk-label.low {
  color: #15803d;
  background: #f0fdf4;
}

.risk-label.medium {
  color: var(--medium);
  background: #fffbeb;
}

.risk-label.high {
  color: var(--high);
  background: #fff7ed;
}

.risk-label.critical {
  color: var(--critical);
  background: #fef2f2;
}

.sidebar-stat {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.sidebar-stat span {
  color: var(--muted);
}

.sidebar-card .toolbar {
  display: grid;
  justify-content: stretch;
}

.sidebar-card .toolbar button {
  width: 100%;
}

.score-orb {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 240px;
  height: 240px;
  padding: 42px;
  text-align: center;
  background:
    radial-gradient(circle at center, #ffffff 61%, transparent 62%),
    conic-gradient(from 180deg, var(--primary), var(--secondary), #bfdbfe, var(--primary));
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.7), 0 18px 40px rgba(37, 99, 235, 0.14);
}

.score-orb .eyebrow {
  margin: 0 0 8px;
  font-size: 0.62rem;
  line-height: 1.2;
}

#score {
  display: block;
  color: var(--text);
  max-width: 155px;
  margin: 0 auto;
  overflow: hidden;
  font-size: clamp(1.9rem, 3.1vw, 2.65rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  white-space: nowrap;
}

.score-details {
  display: grid;
  gap: 10px;
}

.risk-summary {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.severity-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(96px, 1fr));
  gap: 10px;
}

.category-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(105px, 1fr));
  gap: 10px;
  margin-top: 2px;
}

.category-card {
  display: grid;
  gap: 4px;
  min-height: 70px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.category-card-label {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.2;
  text-transform: uppercase;
}

.category-card strong {
  color: var(--text);
  font-size: 1.65rem;
  line-height: 1;
}

.category-card.server {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.category-card.frontend {
  border-color: #ccfbf1;
  background: #f0fdfa;
}

.category-card.backend {
  border-color: #fed7aa;
  background: #fff7ed;
}

.category-card.metadata {
  border-color: #e9d5ff;
  background: #faf5ff;
}

.category-card.dns {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.summary-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 8px 10px;
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.summary-pill.critical {
  color: var(--critical);
  background: #fef2f2;
  border-color: #fecaca;
}

.summary-pill.high {
  color: var(--high);
  background: #fff7ed;
  border-color: #fed7aa;
}

.summary-pill.medium {
  color: var(--medium);
  background: #fffbeb;
  border-color: #fde68a;
}

.summary-pill.low {
  color: var(--low);
  background: #eff6ff;
  border-color: #bfdbfe;
}

.summary-pill.info {
  color: #475569;
  background: #f8fafc;
  border-color: var(--line);
}

.scan-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px;
  grid-column: 2;
}

.scan-meta span,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  color: var(--muted);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.toolbar button,
.history-row {
  min-height: 42px;
  padding: 9px 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.toolbar button:hover,
.history-row:hover {
  color: var(--primary-dark);
  border-color: rgba(37, 99, 235, 0.38);
  box-shadow: 0 14px 26px rgba(37, 99, 235, 0.1);
  transform: translateY(-1px);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.panel {
  padding: 22px;
}

.panel-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.recommendations-panel .panel-heading {
  align-items: flex-start;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.recommendation-icon {
  color: #0f766e;
  background: #f0fdfa;
  border-color: #99f6e4;
}

.panel-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.recommendation-list {
  display: grid;
  gap: 12px;
}

.recommendation {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 16px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  border: 1px solid var(--line);
  border-left: 4px solid var(--info);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.035);
}

.recommendation.critical {
  border-left-color: var(--critical);
}

.recommendation.high {
  border-left-color: var(--high);
}

.recommendation.medium {
  border-left-color: var(--medium);
}

.recommendation.low {
  border-left-color: var(--low);
}

.recommendation-rank {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--primary-dark);
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  font-weight: 600;
}

.recommendation-copy {
  display: grid;
  gap: 7px;
}

.recommendation-title-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.recommendation p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.recommendation small {
  color: var(--muted);
}

.findings-heading {
  align-items: flex-start;
  justify-content: space-between;
}

.findings-heading > div:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
}

.finding-controls {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.severity-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  max-width: 720px;
}

.severity-filters button,
.category-filters button,
.sort-control select {
  min-height: 36px;
  padding: 7px 11px;
  color: var(--muted);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 600;
  text-transform: capitalize;
}

.severity-filters button.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-color: transparent;
}

.category-filters button.active {
  color: var(--primary-dark);
  background: #eff6ff;
  border-color: #bfdbfe;
}

.sort-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.panel-icon {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  color: var(--primary-dark);
  background: linear-gradient(135deg, #eff6ff, #f0fdfa);
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
}

.facts {
  display: grid;
  gap: 12px;
  margin: 0;
}

.facts div {
  display: grid;
  gap: 5px;
  padding: 12px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.facts dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.facts dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  line-height: 1.45;
}

.tag-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.check-list li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.check-list li.check-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  background: transparent;
  border: 0;
}

.check-summary-card {
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-weight: 600;
  text-align: center;
  text-transform: capitalize;
}

.check-summary-card.pass {
  color: #15803d;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.check-summary-card.fail {
  color: #c2410c;
  background: #fff7ed;
  border-color: #fed7aa;
}

.check-row.pass {
  border-left: 4px solid var(--success);
}

.check-row.fail {
  border-left: 4px solid var(--high);
}

.check-icon {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
}

.check-icon.pass {
  color: #15803d;
  background: #dcfce7;
}

.check-icon.fail {
  color: #c2410c;
  background: #ffedd5;
}

.check-title {
  display: block;
  color: var(--text);
  font-weight: 600;
}

.check-value {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.check-status {
  justify-self: end;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.check-status.pass {
  color: #15803d;
  background: #f0fdf4;
}

.check-status.fail {
  color: #c2410c;
  background: #fff7ed;
}

.findings {
  display: grid;
  gap: 14px;
}

.finding {
  display: grid;
  gap: 10px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 6px solid var(--info);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.finding summary {
  list-style: none;
  cursor: pointer;
}

.finding summary::-webkit-details-marker {
  display: none;
}

.finding.critical {
  border-left-color: var(--critical);
}

.finding.high {
  border-left-color: var(--high);
}

.finding.medium {
  border-left-color: var(--medium);
}

.finding.low {
  border-left-color: var(--low);
}

.finding.info {
  border-left-color: var(--info);
}

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

.finding-title {
  display: block;
  color: var(--text);
  font-size: 1.02rem;
  font-weight: 600;
}

.finding-summary-copy {
  display: grid;
  gap: 6px;
}

.category-badge {
  display: inline-flex;
  width: fit-content;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #ffffff;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
}

.category-badge.server {
  color: var(--primary-dark);
  background: #eff6ff;
  border-color: #bfdbfe;
}

.category-badge.frontend {
  color: #0f766e;
  background: #f0fdfa;
  border-color: #99f6e4;
}

.category-badge.backend {
  color: #c2410c;
  background: #fff7ed;
  border-color: #fed7aa;
}

.category-badge.metadata {
  color: #7e22ce;
  background: #faf5ff;
  border-color: #e9d5ff;
}

.category-badge.dns {
  color: #475569;
  background: #f8fafc;
  border-color: #cbd5e1;
}

.finding-short {
  color: var(--muted);
  line-height: 1.45;
}

.finding-body {
  display: grid;
  gap: 10px;
  padding-top: 4px;
}

.severity {
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
}

.severity.critical {
  color: var(--critical);
  background: #fef2f2;
}

.severity.high {
  color: var(--high);
  background: #fff7ed;
}

.severity.medium {
  color: var(--medium);
  background: #fffbeb;
}

.severity.low {
  color: var(--low);
  background: #eff6ff;
}

.severity.info {
  color: #475569;
  background: #f1f5f9;
}

.finding p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.finding-page {
  overflow-wrap: anywhere;
  color: var(--primary-dark) !important;
  font-size: 0.86rem;
  font-weight: 600;
}

.fix-box,
.guided-fix {
  display: grid;
  gap: 12px;
  margin-top: 4px;
  padding: 14px;
  background: linear-gradient(180deg, #f8fafc, #ffffff);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.fix-box strong,
.guided-fix > strong {
  color: var(--text);
}

.fix-steps {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.55;
}

.fix-example {
  position: relative;
  margin: 0;
  padding: 13px 62px 13px 13px;
  overflow-x: auto;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.copy-code {
  position: absolute;
  top: 8px;
  right: 8px;
  min-height: 28px;
  padding: 4px 9px;
  color: var(--primary-dark);
  background: #ffffff;
  border: 1px solid #bfdbfe;
  border-radius: 9px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.code-tabs {
  display: grid;
  gap: 10px;
}

.code-tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.code-tab-list button {
  min-height: 32px;
  padding: 6px 10px;
  color: var(--muted);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

.code-tab-list button.active {
  color: var(--primary-dark);
  background: #eff6ff;
  border-color: #bfdbfe;
}

.technical-panel {
  padding: 0;
  overflow: hidden;
}

.technical-panel > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 22px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.technical-panel > summary::-webkit-details-marker {
  display: none;
}

.technical-panel[open] > summary {
  border-bottom: 1px solid var(--line);
}

.details-grid {
  padding: 18px;
}

.inner-card {
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.inner-card h2 {
  margin-bottom: 14px;
}

.fix-example code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.platform-details {
  display: grid;
  gap: 10px;
}

.platform-details summary {
  cursor: pointer;
  color: var(--primary-dark);
  font-weight: 600;
}

.platform-fix,
.verify-box {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.platform-name {
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plain-list {
  display: grid;
  gap: 10px;
}

.plain-row {
  padding: 14px;
  overflow-wrap: anywhere;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.plain-row strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
}

.plain-row span,
.plain-row p {
  color: var(--muted);
  line-height: 1.5;
}

.plain-row p {
  margin: 8px 0 0;
}

.history-panel {
  margin-top: 18px;
}

.history-row {
  display: grid;
  gap: 4px;
  width: 100%;
  text-align: left;
}

.history-row span {
  color: var(--muted);
  font-size: 0.86rem;
}

.empty {
  color: var(--muted);
}

@media (max-width: 980px) {
  .scan-panel,
  .score-card,
  .dashboard-grid,
  .results-layout {
    grid-template-columns: 1fr;
  }

  .summary-sidebar,
  .results-main {
    grid-column: auto;
    grid-row: auto;
  }

  .summary-sidebar {
    position: static;
    order: -1;
  }

  .score-card {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .score-orb {
    width: 210px;
    height: 210px;
    padding: 36px;
  }

  .scan-meta {
    grid-column: auto;
  }

  .severity-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scan-meta,
  .toolbar,
  .severity-filters,
  .category-filters {
    justify-content: flex-start;
  }

  .finding-controls {
    justify-items: start;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 24px, 1240px);
    padding: 18px 0 32px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .scan-panel {
    border-radius: 22px;
  }

  h1 {
    font-size: clamp(2.1rem, 13vw, 3.2rem);
  }

  .scan-form {
    padding: 16px;
    border-radius: 18px;
  }

  .input-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
  }

  .input-icon {
    padding-left: 4px;
  }

  .input-row input {
    height: 46px;
    padding: 0 4px;
  }

  .input-row button {
    width: 100%;
    margin: 0;
  }

  .score-orb {
    width: 190px;
    height: 190px;
    padding: 32px;
  }

  #score {
    max-width: 130px;
    font-size: 2.05rem;
  }

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

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

  .panel,
  .score-card {
    padding: 16px;
    border-radius: 18px;
  }

  .finding-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media print {
  body {
    background: #ffffff;
  }

  body::before,
  .topbar,
  .scan-panel,
  .toolbar,
  .history-panel,
  .status {
    display: none;
  }

  .shell {
    width: 100%;
    padding: 0;
  }

  .panel,
  .score-card,
  .finding {
    box-shadow: none;
    break-inside: avoid;
  }
}

