:root {
  --bg: #ffffff;
  --bg-2: #f7fff8;
  --panel: rgba(255, 255, 255, 0.34);
  --panel-strong: rgba(255, 255, 255, 0.44);
  --line: rgba(255, 255, 255, 0.52);
  --ink: #0c203d;
  --muted: #34527c;
  --brand: #1274ff;
  --brand-soft: #43c6ff;
  --critical: #b42318;
  --high: #d85f00;
  --medium: #8d6d00;
  --low: #0d7a45;
  --sec-profile: #3594ff;
  --sec-landscape: #00a8d9;
  --sec-controls: #00b894;
  --sec-register: #6f7cff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Manrope", sans-serif;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  color: var(--ink);
}

.backdrop {
  display: none;
}

.page {
  position: relative;
  z-index: 1;
  width: min(1200px, 92vw);
  margin: 1.6rem auto 3rem;
  display: grid;
  gap: 1rem;
}

.panel {
  position: relative;
  isolation: isolate;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 1.2rem;
  background: var(--panel);
  backdrop-filter: blur(22px) saturate(130%);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 14px 34px rgba(27, 66, 120, 0.16);
}

.panel::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.7);
  opacity: 0.72;
}

.panel::after {
  content: none;
}

.hero {
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.5), rgba(245, 252, 255, 0.3));
}

.section-hero {
  border-color: rgba(37, 124, 255, 0.48);
}

.section-profile {
  border-color: rgba(53, 148, 255, 0.46);
}

.section-results {
  border-color: rgba(0, 184, 148, 0.45);
}

.section-note {
  border-color: rgba(127, 92, 255, 0.42);
}

.kicker {
  margin: 0 0 0.45rem;
  font-size: 0.76rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-family: "JetBrains Mono", monospace;
  color: var(--brand);
}

h1 {
  margin: 0;
  font-size: clamp(1.9rem, 3.3vw, 2.8rem);
  font-weight: 800;
}

.subhead {
  margin: 0.7rem 0 0;
  max-width: 68ch;
  color: var(--muted);
  line-height: 1.5;
}

.form-wrap {
  display: grid;
  gap: 0.95rem;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  padding-bottom: 0.48rem;
  padding-left: 0.5rem;
  border-left: 3px solid rgba(255, 255, 255, 0.7);
}

.section-head h2,
.section-head p {
  margin: 0;
}

.section-head p {
  color: var(--muted);
  font-size: 0.92rem;
}

.profile-head {
  border-left-color: var(--sec-profile);
  border-bottom-color: rgba(53, 148, 255, 0.35);
}

.landscape-head {
  border-left-color: var(--sec-landscape);
  border-bottom-color: rgba(0, 168, 217, 0.35);
}

.controls-head {
  border-left-color: var(--sec-controls);
  border-bottom-color: rgba(0, 184, 148, 0.35);
}

.register-head {
  border-left-color: var(--sec-register);
  border-bottom-color: rgba(111, 124, 255, 0.35);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 0.72rem;
}

.full-row {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 0.34rem;
  font-size: 0.89rem;
  color: #0d2748;
}

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

input,
select,
textarea {
  width: 100%;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.84);
  background: rgba(255, 255, 255, 0.58);
  color: #0e2646;
  padding: 0.62rem 0.74rem;
}

.profile-grid input,
.profile-grid select,
.profile-grid textarea {
  border-color: rgba(53, 148, 255, 0.45);
}

.landscape-grid input,
.landscape-grid select,
.landscape-grid textarea {
  border-color: rgba(0, 168, 217, 0.45);
}

.register-grid input,
.register-grid select,
.register-grid textarea {
  border-color: rgba(111, 124, 255, 0.45);
}

.landscape-grid .chip-grid {
  border-color: rgba(0, 168, 217, 0.45);
}

.landscape-grid .chip-grid label {
  border-color: rgba(0, 168, 217, 0.35);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(18, 116, 255, 0.68);
  box-shadow: 0 0 0 4px rgba(18, 116, 255, 0.13);
}

textarea {
  resize: vertical;
}

.chip-grid {
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.35);
  padding: 0.72rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 0.45rem;
}

.chip-grid label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.34rem 0.58rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.85);
  font-size: 0.82rem;
}

.chip-grid input {
  width: auto;
  margin: 0;
}

.controls-grid label {
  border: 1px solid rgba(0, 184, 148, 0.35);
  background: rgba(255, 255, 255, 0.28);
  border-radius: 13px;
  padding: 0.58rem;
}

.controls-grid select,
.controls-grid input,
.controls-grid textarea {
  border-color: rgba(0, 184, 148, 0.45);
}

.actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.btn {
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  padding: 0.62rem 0.9rem;
  background: rgba(255, 255, 255, 0.48);
  color: #0b2850;
  cursor: pointer;
}

.btn.primary {
  border-color: transparent;
  background: linear-gradient(120deg, var(--brand), var(--brand-soft));
  color: #fff;
  font-weight: 700;
}

.btn:hover {
  transform: translateY(-1px);
}

.results-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.results-tools {
  display: flex;
  align-items: flex-end;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.filter-label {
  display: grid;
  gap: 0.2rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.filter-label select {
  min-width: 140px;
}

#summary {
  margin: 0;
  color: var(--muted);
}

.risk-results.empty {
  border: 1px dashed rgba(255, 255, 255, 0.86);
  border-radius: 15px;
  padding: 1rem;
  color: var(--muted);
}

.domain-list {
  display: grid;
  gap: 0.88rem;
}

.domain-card {
  border: 1px solid rgba(18, 116, 255, 0.25);
  border-radius: 18px;
  background: var(--panel-strong);
  padding: 0.85rem;
}

.domain-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.65);
  padding-bottom: 0.5rem;
  margin-bottom: 0.55rem;
}

.domain-head h3,
.domain-head p {
  margin: 0;
}

.domain-head p {
  color: var(--muted);
  font-size: 0.86rem;
}

.risk-list {
  display: grid;
  gap: 0.45rem;
}

.risk-item {
  border: 1px solid rgba(111, 124, 255, 0.28);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.risk-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem;
}

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

.risk-item.critical { border-left: 6px solid var(--critical); }
.risk-item.high { border-left: 6px solid var(--high); }
.risk-item.medium { border-left: 6px solid var(--medium); }
.risk-item.low { border-left: 6px solid var(--low); }

.risk-summary-main {
  display: grid;
  gap: 0.12rem;
}

.risk-summary-main h4 {
  margin: 0;
  font-size: 0.98rem;
}

.risk-id {
  font-family: "JetBrains Mono", monospace;
  color: #2b4f81;
  font-size: 0.75rem;
}

.risk-summary-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pill,
.badge {
  border-radius: 999px;
  padding: 0.16rem 0.5rem;
  font-size: 0.72rem;
  border: 1px solid rgba(12, 50, 95, 0.25);
  background: rgba(255, 255, 255, 0.66);
  font-family: "JetBrains Mono", monospace;
}

.badge.critical { color: var(--critical); border-color: rgba(180, 35, 24, 0.3); }
.badge.high { color: var(--high); border-color: rgba(216, 95, 0, 0.32); }
.badge.medium { color: var(--medium); border-color: rgba(141, 109, 0, 0.3); }
.badge.low { color: var(--low); border-color: rgba(13, 122, 69, 0.3); }

.risk-detail {
  border-top: 1px solid rgba(255, 255, 255, 0.66);
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.42);
}

.risk-detail p {
  margin: 0.42rem 0;
  line-height: 1.45;
  color: #103058;
}

.status-inline {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.status-select {
  width: auto;
  min-width: 145px;
  padding: 0.28rem 0.5rem;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 0.2rem 0.7rem;
}

.risk-detail ul {
  margin: 0.3rem 0 0;
  padding-left: 1rem;
  color: #133866;
}

.disclaimer p {
  color: var(--muted);
  margin-bottom: 0;
}

@media (max-width: 1024px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .chip-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

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

@media (max-width: 760px) {
  .page {
    width: 94vw;
  }

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

  .results-head,
  .section-head,
  .risk-item summary {
    display: block;
  }

  .results-tools {
    margin-top: 0.4rem;
  }

  .risk-summary-meta {
    justify-content: flex-start;
    margin-top: 0.5rem;
  }

  #summary,
  .section-head p {
    margin-top: 0.3rem;
  }
}
