:root {
  --page-bg: #efe6d9;
  --page-glow: #fff9ef;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-strong: #ffffff;
  --surface-soft: #fbf6ee;
  --border: rgba(110, 92, 63, 0.18);
  --border-strong: rgba(41, 65, 92, 0.18);
  --ink: #172433;
  --muted: #617084;
  --accent: #0f766e;
  --accent-2: #bf6c07;
  --accent-soft: #dff4ef;
  --good: #1f8b4c;
  --warn: #a56700;
  --bad: #b42318;
  --shadow: 0 22px 60px rgba(70, 48, 19, 0.12);
  --terminal: #05080d;
  --terminal-border: #182231;
  --terminal-text: #dbe6f7;
  --terminal-muted: #7f91ab;
  --terminal-accent: #7fb4ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Aptos", "Segoe UI Variable Display", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 248, 231, 0.92), transparent 38%),
    radial-gradient(circle at 90% 10%, rgba(194, 247, 230, 0.35), transparent 28%),
    linear-gradient(180deg, var(--page-glow), var(--page-bg));
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  pointer-events: none;
  filter: blur(12px);
}

body::before {
  top: 72px;
  right: 4vw;
  width: 240px;
  height: 240px;
  border-radius: 999px;
  background: rgba(84, 160, 255, 0.08);
}

body::after {
  bottom: 80px;
  left: -40px;
  width: 180px;
  height: 180px;
  border-radius: 36px;
  transform: rotate(18deg);
  background: rgba(15, 118, 110, 0.09);
}

.shell {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 28px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 20px;
  align-items: center;
  padding: 22px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(251, 246, 238, 0.95)),
    linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(29, 78, 216, 0.03));
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.badge,
.pill,
.ghost,
button,
.node {
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.badge {
  display: inline-flex;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  background: rgba(15, 118, 110, 0.08);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.brand-name {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.site-logo {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(41, 65, 92, 0.12);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 24px rgba(70, 48, 19, 0.1);
}

.hero h1,
.card h2 {
  margin: 0;
  letter-spacing: -0.05em;
}

.hero h1 {
  margin-top: 10px;
  font-size: clamp(1.55rem, 3vw, 30px);
  line-height: 1.02;
}

.hero p {
  margin: 10px 0 0;
  max-width: 720px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.5;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(23, 36, 51, 0.1);
  background: rgba(255, 255, 255, 0.66);
  color: var(--ink);
  font-size: 0.88rem;
}

.search {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(41, 65, 92, 0.12);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  padding: 14px 12px;
  background: transparent;
  color: var(--ink);
  font-size: 0.97rem;
}

input::placeholder {
  color: #8392a5;
}

button {
  border: 0;
  cursor: pointer;
}

form button {
  min-height: 48px;
  padding: 0 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), #2d946d);
  color: #f7fffc;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 16px 28px rgba(15, 118, 110, 0.22);
}

form button:hover,
.node:hover,
.ghost:hover {
  transform: translateY(-1px);
}

.status {
  margin: 0 0 14px;
  padding: 13px 16px;
  border-radius: 18px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.status.info {
  border-color: rgba(29, 78, 216, 0.18);
  background: rgba(240, 246, 255, 0.88);
}

.status.success {
  border-color: rgba(31, 139, 76, 0.2);
  background: rgba(240, 252, 244, 0.9);
}

.status.warn {
  border-color: rgba(165, 103, 0, 0.2);
  background: rgba(255, 248, 235, 0.9);
}

.status.error {
  border-color: rgba(180, 35, 24, 0.2);
  background: rgba(255, 243, 242, 0.92);
}

.hidden {
  display: none;
}

.overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.metric,
.card {
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.metric {
  min-height: 126px;
  padding: 16px;
}

.metric-label,
.eyebrow,
.node small {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.metric-value {
  display: block;
  margin-top: 8px;
  font-size: 1.12rem;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.metric-note {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr);
  gap: 14px;
  align-items: start;
}

.left-column {
  display: grid;
  gap: 14px;
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 18px 18px 0;
}

.compact {
  padding-bottom: 4px;
}

.card-head h2 {
  margin-top: 3px;
  font-size: clamp(1.05rem, 2vw, 24px);
}

.card-head > span {
  color: var(--muted);
  white-space: nowrap;
}

.graph-card {
  min-height: 600px;
  display: flex;
  flex-direction: column;
}

.tree {
  flex: 1;
  padding: 18px 14px 22px;
  overflow: auto;
}

.node {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  min-width: 220px;
  max-width: 320px;
  padding: 12px 14px;
  margin: 6px;
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, #fbf6ee);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 14px 32px rgba(78, 59, 31, 0.08);
}

.node strong {
  display: block;
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.node.domain,
.node.ip {
  background: linear-gradient(180deg, #f7fbff, #edf4ff);
}

.node.domain {
  border-color: rgba(29, 78, 216, 0.28);
}

.node.ip {
  border-color: rgba(29, 78, 216, 0.18);
}

.node.dns {
  background: linear-gradient(180deg, #fffaf2, #fef2dd);
  border-color: rgba(191, 108, 7, 0.26);
}

.node.domain-profile,
.node.profile {
  background: linear-gradient(180deg, #f2fcf8, #e2f7ef);
  border-color: rgba(15, 118, 110, 0.26);
}

.node.org {
  background: linear-gradient(180deg, #f8f5ff, #efe9ff);
  border-color: rgba(106, 77, 255, 0.24);
}

.node.reverse,
.node.cidr {
  background: linear-gradient(180deg, #fffdf8, #f8f1e7);
}

.node.risk {
  background: linear-gradient(180deg, #fff9ef, #fff1dc);
  border-color: rgba(165, 103, 0, 0.26);
}

.node.risk.probable {
  background: linear-gradient(180deg, #fff5f4, #ffe4e1);
  border-color: rgba(180, 35, 24, 0.34);
}

.node.risk.not-detected,
.node.risk.not-applicable {
  background: linear-gradient(180deg, #f2fcf4, #e3f6e8);
  border-color: rgba(31, 139, 76, 0.3);
}

.node.risk.not-detected-hosted,
.node.risk.unknown-hosted {
  background: linear-gradient(180deg, #fff8ef, #fff0dd);
  border-color: rgba(191, 108, 7, 0.32);
}

.node.selected {
  border-color: var(--accent);
  box-shadow:
    0 0 0 3px rgba(15, 118, 110, 0.12),
    0 18px 36px rgba(78, 59, 31, 0.12);
}

.children {
  margin-left: 18px;
  padding-left: 14px;
  border-left: 1px dashed rgba(97, 112, 132, 0.32);
}

.edge {
  margin: 6px 0 2px 10px;
  color: var(--muted);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 0.78rem;
}

.records-card {
  padding-bottom: 16px;
}

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

.record-card {
  padding: 14px;
  border: 1px solid rgba(41, 65, 92, 0.1);
  border-radius: 22px;
  background: var(--surface-soft);
}

.record-card.full {
  grid-column: 1 / -1;
}

.record-card h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}

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

.record-card li {
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.record-card li strong {
  color: var(--ink);
}

.terminal-panel {
  min-height: 760px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--terminal-border);
  border-radius: 30px;
  background:
    radial-gradient(circle at top right, rgba(80, 120, 255, 0.12), transparent 26%),
    linear-gradient(180deg, #08101c, var(--terminal));
  color: var(--terminal-text);
  box-shadow: 0 30px 80px rgba(5, 8, 13, 0.45);
  overflow: hidden;
}

.terminal-head,
.terminal-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--terminal-border);
}

.terminal-dots {
  display: flex;
  gap: 8px;
}

.terminal-dots span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #ff5f57;
}

.terminal-dots span:nth-child(2) {
  background: #febc2e;
}

.terminal-dots span:nth-child(3) {
  background: #28c840;
}

.terminal-actions {
  display: flex;
  gap: 8px;
}

.ghost {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(127, 145, 171, 0.24);
  background: rgba(255, 255, 255, 0.04);
  color: var(--terminal-muted);
}

.ghost.active {
  border-color: rgba(127, 180, 255, 0.32);
  background: rgba(127, 180, 255, 0.16);
  color: #eff6ff;
}

.terminal-meta {
  align-items: flex-start;
}

.terminal-meta strong {
  color: #f8fbff;
  font-size: 0.98rem;
}

.terminal-meta span {
  color: var(--terminal-muted);
  font-size: 0.86rem;
  line-height: 1.5;
  text-align: right;
}

.terminal-scroll {
  flex: 1;
  overflow: auto;
}

.terminal-output {
  min-height: 100%;
  margin: 0;
  padding: 18px 18px 22px;
  background: transparent;
  color: var(--terminal-text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
  font-size: 0.84rem;
  line-height: 1.7;
}

.app-footer {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto 18px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

@media (max-width: 1100px) {
  .overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .terminal-panel {
    min-height: 620px;
  }
}

@media (max-width: 860px) {
  .shell {
    width: min(100% - 20px, 1320px);
    padding-top: 18px;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .site-logo {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
  }

  .search {
    flex-direction: column;
  }

  form button {
    width: 100%;
  }

  .overview,
  .record-grid {
    grid-template-columns: 1fr;
  }

  .metric,
  .graph-card,
  .terminal-panel {
    min-height: 0;
  }

  .terminal-meta {
    flex-direction: column;
  }

  .terminal-meta span {
    text-align: left;
  }

  .app-footer {
    width: min(100% - 20px, 1320px);
    margin-bottom: 14px;
  }
}
