:root {
  --bg:        #14110d;
  --bg-panel:  #1c1812;
  --bg-panel-2:#231d15;
  --border:    #3a2f1f;
  --amber:     #ffb640;
  --amber-dim: #a87a2f;
  --text:      #e8dfc8;
  --text-dim:  #8f8672;
  --green:     #7fdba0;
  --red:       #ff8a80;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  min-height: 100vh;
  position: relative;
}

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,182,64,0.015) 0px,
    rgba(255,182,64,0.015) 1px,
    transparent 1px,
    transparent 3px
  );
  z-index: 1;
}

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 28px 20px 80px;
  position: relative;
  z-index: 2;
}

.term-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
  opacity: 0.7;
}
.term-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--border);
}
.term-path {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  margin-left: 8px;
}

h1 {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 30px;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}
.prompt { color: var(--amber); }

.sub {
  color: var(--text-dim);
  font-size: 15px;
  margin: 0 0 28px;
  max-width: 55ch;
}

#lookup-form {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}

#domain-input {
  flex: 1;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
  padding: 13px 16px;
  border-radius: 4px;
  outline: none;
  transition: border-color 0.15s;
}
#domain-input::placeholder { color: var(--text-dim); }
#domain-input:focus {
  border-color: var(--amber-dim);
}

#submit-btn {
  background: var(--amber);
  color: #14110d;
  border: none;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 14px;
  padding: 0 22px;
  border-radius: 4px;
  cursor: pointer;
  transition: filter 0.15s;
  min-width: 140px;
}
#submit-btn:hover { filter: brightness(1.08); }
#submit-btn:active { filter: brightness(0.95); }
#submit-btn:disabled { cursor: wait; filter: brightness(0.85); }

.dots span { animation: blink 1.4s infinite; }
.dots span:nth-child(2) { animation-delay: 0.2s; }
.dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.2; } 40% { opacity: 1; } }

.error-msg {
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--red);
  margin-top: 14px;
  padding: 10px 14px;
  background: rgba(255, 138, 128, 0.08);
  border: 1px solid rgba(255, 138, 128, 0.25);
  border-radius: 4px;
}

#report { margin-top: 36px; }

.report-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 20px;
}
#report-domain { color: var(--amber); font-weight: 600; }

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.card-wide { grid-column: 1 / -1; }

.card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 18px 20px 20px;
}

.card h2 {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.tag {
  font-family: var(--mono);
  font-size: 11px;
  color: #14110d;
  background: var(--amber-dim);
  padding: 1px 6px;
  border-radius: 3px;
}

.card-body { font-size: 13.5px; }

/* --- record rows --- */
.rec-group { margin-bottom: 14px; }
.rec-group:last-child { margin-bottom: 0; }
.rec-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--amber-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 5px;
}
.rec-value {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
  word-break: break-all;
  line-height: 1.6;
}
.rec-empty { color: var(--text-dim); font-style: italic; }

.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 3px;
  background: rgba(127, 219, 160, 0.12);
  color: var(--green);
  border: 1px solid rgba(127, 219, 160, 0.3);
  margin-top: 6px;
}

.kv-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 13px;
}
.kv-row:last-child { border-bottom: none; }
.kv-key { color: var(--text-dim); font-family: var(--mono); font-size: 12px; }
.kv-val { text-align: right; font-family: var(--mono); }

pre.whois-raw {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-dim);
  background: var(--bg-panel-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 14px 16px;
  max-height: 320px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
  margin-top: 12px;
}

.cms-name {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 600;
  color: var(--amber);
}

details summary {
  cursor: pointer;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 12px;
  margin-top: 8px;
}

@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  #lookup-form { flex-direction: column; }
  #submit-btn { padding: 13px; }
}
