:root {
  --bg: #080b11;
  --panel: #10151d;
  --panel-2: #141b25;
  --line: #26303d;
  --text: #f0f4f7;
  --muted: #94a1af;
  --cyan: #3de2d0;
  --cyan-dark: #0e5f5c;
  --green: #6ce6a4;
  --red: #ff627d;
  --amber: #ffbf69;
  --blue: #7db3ff;
  --radius: 16px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--text);
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 78% 10%, rgba(61, 226, 208, 0.07), transparent 28rem),
    radial-gradient(circle at 12% 27%, rgba(125, 179, 255, 0.05), transparent 24rem),
    var(--bg);
}

button,
input {
  font: inherit;
}

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

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

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  z-index: 20;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

.site-header {
  height: 76px;
  border-bottom: 1px solid var(--line);
  padding: 0 clamp(20px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(8, 11, 17, 0.86);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 10;
}

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

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--bg);
  background: var(--cyan);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.05em;
  box-shadow: 0 0 24px rgba(61, 226, 208, 0.22);
}

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

.brand strong {
  font-size: 14px;
  letter-spacing: 0.01em;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 12px currentColor;
}

.status-dot.ready {
  background: var(--green);
}

.status-dot.missing {
  background: var(--red);
}

main {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: 76px 0 90px;
}

.hero {
  max-width: 890px;
}

.eyebrow,
.kicker {
  color: var(--cyan);
  font-size: 11px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow span {
  background: rgba(255, 98, 125, 0.13);
  color: var(--red);
  border: 1px solid rgba(255, 98, 125, 0.25);
  border-radius: 999px;
  padding: 5px 8px;
  margin-right: 9px;
}

h1 {
  font-size: clamp(42px, 6vw, 78px);
  line-height: 0.99;
  margin: 27px 0 24px;
  letter-spacing: -0.055em;
  font-weight: 700;
}

h1 em {
  color: var(--cyan);
  font-style: normal;
}

.hero > p {
  max-width: 760px;
  font-size: 17px;
  line-height: 1.72;
  color: #b9c3cc;
}

.hero code {
  font-size: 0.9em;
  color: var(--cyan);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  padding: 8px 12px;
  font-size: 11px;
}

.hero-meta b {
  color: var(--text);
  margin-left: 4px;
}

.danger-banner {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 50px 0 22px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 98, 125, 0.38);
  border-radius: 12px;
  color: #f4c6cd;
  background: rgba(255, 98, 125, 0.075);
  font-size: 13px;
  line-height: 1.55;
}

.danger-banner strong {
  color: #fff;
}

.danger-icon {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--red);
  color: #19070a;
  font-weight: 900;
}

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

.panel,
.timeline-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.018), transparent 45%),
    var(--panel);
  padding: 27px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.18);
}

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

.step-number {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border: 1px solid #344150;
  border-radius: 50%;
  color: var(--muted);
  font: 700 11px "SFMono-Regular", Consolas, monospace;
}

.kicker {
  margin: 0 0 6px;
  font-size: 9px;
}

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

h2 {
  margin-bottom: 0;
  font-size: 21px;
  letter-spacing: -0.025em;
}

label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

input[type="text"] {
  width: 100%;
  height: 46px;
  border: 1px solid #303b49;
  border-radius: 9px;
  outline: none;
  background: #0b1017;
  color: var(--text);
  padding: 0 13px;
  font-size: 13px;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease;
}

input[type="text"]:focus {
  border-color: var(--cyan-dark);
  box-shadow: 0 0 0 3px rgba(61, 226, 208, 0.08);
}

.input-wrap {
  position: relative;
}

.input-wrap input {
  padding-right: 78px;
}

.field-state {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.field-state.valid {
  color: var(--green);
}

.field-state.invalid {
  color: var(--red);
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}

.check-row {
  margin: 20px 0 12px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

.check-row strong {
  color: var(--text);
}

.button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--bg);
  background: var(--cyan);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  transition:
    transform 120ms ease,
    filter 120ms ease,
    opacity 120ms ease;
}

.button:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.button:active:not(:disabled) {
  transform: translateY(0);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.36;
}

.button.secondary {
  color: var(--text);
  background: #151c25;
  border-color: #303b49;
}

.button.control {
  min-width: 122px;
  background: var(--blue);
}

.button.exploit {
  width: 100%;
  background: var(--red);
  color: #19070a;
}

.button.full {
  width: 100%;
}

.path-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  background: #0c1118;
}

.control-path {
  display: flex;
  align-items: center;
  gap: 18px;
  justify-content: space-between;
  border-left: 3px solid var(--blue);
}

.exploit-path {
  border-left: 3px solid var(--red);
}

.path-tag {
  color: var(--blue);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.exploit-path .path-tag {
  color: var(--red);
}

.path-card h3 {
  margin: 7px 0 9px;
  font-size: 15px;
}

.path-card code {
  display: block;
  color: #a8c8f3;
  font-size: 10px;
  overflow-wrap: anywhere;
}

.exploit-path code {
  color: #ff9daf;
}

.path-card p {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.path-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
}

.path-divider span {
  height: 1px;
  background: var(--line);
}

.path-divider b {
  color: #65717e;
  font-size: 9px;
  text-transform: uppercase;
}

.acknowledgment {
  margin: 18px 0 13px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
  line-height: 1.4;
  cursor: pointer;
}

.acknowledgment input {
  accent-color: var(--red);
  margin-top: 1px;
}

.empty-state {
  min-height: 316px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: var(--muted);
}

.empty-state strong {
  color: #c7d0d8;
  font-size: 13px;
}

.empty-state p {
  max-width: 300px;
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.5;
}

.radar {
  width: 82px;
  height: 82px;
  margin-bottom: 23px;
  position: relative;
  border: 1px solid #2d3946;
  border-radius: 50%;
}

.radar::before,
.radar::after {
  content: "";
  position: absolute;
  background: #2d3946;
}

.radar::before {
  width: 1px;
  top: 10px;
  bottom: 10px;
  left: 50%;
}

.radar::after {
  height: 1px;
  left: 10px;
  right: 10px;
  top: 50%;
}

.radar i {
  position: absolute;
  inset: 12px;
  border: 1px solid #24303c;
  border-radius: 50%;
}

.radar i:nth-child(2) {
  inset: 26px;
}

.radar i:nth-child(3) {
  width: 5px;
  height: 5px;
  inset: 22px auto auto 49px;
  border: 0;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}

.verdict {
  display: flex;
  align-items: center;
  gap: 13px;
  border: 1px solid rgba(108, 230, 164, 0.3);
  border-radius: 11px;
  background: rgba(108, 230, 164, 0.07);
  padding: 14px;
  margin-bottom: 16px;
}

.verdict.failed {
  border-color: rgba(255, 98, 125, 0.35);
  background: rgba(255, 98, 125, 0.07);
}

.verdict-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #06140c;
  font-weight: 900;
}

.failed .verdict-icon {
  background: var(--red);
}

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

.verdict small {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.15em;
}

.verdict strong {
  margin-top: 3px;
  font-size: 12px;
}

.evidence-list {
  margin: 0;
}

.evidence-list > div {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #212a35;
  font-size: 11px;
}

.evidence-list dt {
  color: var(--muted);
}

.evidence-list dd {
  margin: 0;
  text-align: right;
  color: #dbe3e9;
}

.truncate {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.selectable {
  user-select: all;
  overflow-wrap: anywhere;
}

.permission-box {
  margin: 17px 0;
  border: 1px solid rgba(61, 226, 208, 0.24);
  border-radius: 10px;
  padding: 13px;
  background: rgba(61, 226, 208, 0.045);
}

.permission-box > span {
  display: block;
  color: var(--cyan);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.14em;
  margin-bottom: 9px;
}

.permission-box > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  font-size: 10px;
}

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

.permission-box b {
  text-align: right;
  overflow-wrap: anywhere;
}

.cleanup-state {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0c1118;
}

.cleanup-state > span {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 12px rgba(255, 191, 105, 0.5);
}

.cleanup-state.danger > span {
  background: var(--red);
}

.cleanup-state.clean > span {
  background: var(--green);
}

.cleanup-state strong {
  display: block;
  font-size: 12px;
}

.cleanup-state p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.cleanup-explainer {
  margin: 18px 0 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.command {
  min-height: 86px;
  margin: 0 0 13px;
  padding: 13px;
  border: 1px solid #2d3845;
  border-radius: 9px;
  background: #080c12;
  color: #c5d3df;
  font-size: 10px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  user-select: all;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.timeline-panel {
  margin-top: 20px;
}

.timeline-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
}

.text-button {
  border: 0;
  background: none;
  color: var(--cyan);
  cursor: pointer;
  font-size: 11px;
}

.timeline {
  margin: 0;
  padding: 18px 0 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 13px;
  padding: 7px 0;
  color: #b8c3cc;
  font-size: 11px;
}

.timeline time {
  color: #5e6a77;
  font-family: "SFMono-Regular", Consolas, monospace;
}

.timeline .error {
  color: #ff9daf;
}

.timeline .success {
  color: var(--green);
}

footer {
  border-top: 1px solid var(--line);
  min-height: 72px;
  padding: 0 clamp(20px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #5e6874;
  font-size: 10px;
}

.toast {
  position: fixed;
  z-index: 30;
  right: 24px;
  bottom: 24px;
  max-width: min(390px, calc(100% - 48px));
  padding: 12px 15px;
  border: 1px solid #34414f;
  border-radius: 10px;
  background: #18202a;
  color: var(--text);
  font-size: 11px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.42);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

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

  main {
    padding-top: 52px;
  }
}

@media (max-width: 620px) {
  .site-header {
    padding: 0 16px;
  }

  .brand small,
  .header-status span:last-child {
    display: none;
  }

  main {
    width: min(100% - 24px, 1240px);
  }

  h1 {
    font-size: 42px;
  }

  .panel,
  .timeline-panel {
    padding: 20px;
  }

  .two-column,
  .button-row {
    grid-template-columns: 1fr;
  }

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

  .control-path .button {
    width: 100%;
  }

  footer {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
