:root {
  --bg: #040b16;
  --card: rgba(10, 26, 44, 0.82);
  --line: rgba(167, 199, 234, 0.2);
  --text: #edf5ff;
  --muted: #a8bfd9;
  --gold: #ffc45d;
  --cyan: #35d8ff;
  --danger: #ff7979;
  --ok: #4de38f;
  --shadow: 0 24px 55px rgba(3, 11, 23, 0.45);
  --radius-lg: 22px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  min-height: 100vh;
  background:
    radial-gradient(980px 450px at 100% 0%, rgba(53, 216, 255, 0.13), transparent 56%),
    radial-gradient(900px 460px at 0% 100%, rgba(255, 196, 94, 0.1), transparent 58%),
    linear-gradient(145deg, #030915 0%, #061325 44%, #051122 100%);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  line-height: 1.12;
}

p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 5vw;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 15, 29, 0.76);
  backdrop-filter: blur(10px);
}

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

.brand img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.brand strong {
  display: block;
  letter-spacing: 0.08em;
  font-size: 0.84rem;
}

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

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

.topnav a {
  text-decoration: none;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.82rem;
  font-size: 0.82rem;
  font-weight: 700;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.topnav a:hover,
.topnav a:focus-visible {
  color: var(--text);
  border-color: rgba(53, 216, 255, 0.55);
  transform: translateY(-1px);
}

main {
  padding: 34px 5vw 60px;
  display: grid;
  gap: 12px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 20px;
}

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.search-panel h1 {
  font-size: clamp(2rem, 3.7vw, 3rem);
  margin-bottom: 8px;
}

.search-row {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(7, 19, 33, 0.9);
  color: var(--text);
  padding: 0.66rem 0.74rem;
}

input:focus {
  outline: none;
  border-color: rgba(53, 216, 255, 0.58);
}

.btn {
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.65rem 0.95rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.btn-gold {
  color: #231400;
  background: linear-gradient(115deg, #ffb733, var(--gold));
}

.btn-ghost {
  color: var(--text);
  border-color: var(--line);
  background: rgba(8, 20, 35, 0.84);
}

.error {
  color: #ffc5c5;
  min-height: 18px;
  font-size: 0.84rem;
  margin-top: 8px;
}

.query-helper {
  margin: 8px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.84rem;
}

.validation-panel {
  display: grid;
  gap: 10px;
}

.validation-panel h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.3rem);
}

.validation-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.validation-grid article {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(7, 17, 31, 0.72);
  padding: 10px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.validation-grid h3 {
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.validation-grid article:hover {
  transform: translateY(-2px);
  border-color: rgba(53, 216, 255, 0.5);
}

.hidden {
  display: none !important;
}

.result-panel {
  display: grid;
  gap: 12px;
}

.result-panel:not(.hidden) {
  border-color: rgba(77, 227, 143, 0.35);
}

.result-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 10px;
  flex-wrap: wrap;
}

.result-head h2 {
  font-size: 2rem;
}

.badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.22rem 0.56rem;
  font-size: 0.76rem;
  font-weight: 800;
}

.badge.ok {
  border-color: rgba(77, 227, 143, 0.45);
  color: #d2ffe5;
}

.badge.off {
  border-color: rgba(255, 121, 121, 0.45);
  color: #ffd4d4;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.result-grid > div {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(7, 17, 31, 0.74);
  padding: 9px;
}

.result-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
}

.result-grid strong {
  display: block;
  font-size: 0.84rem;
}

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

.result-note {
  font-size: 0.82rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(7, 17, 31, 0.72);
  padding: 9px;
}

@media (max-width: 1060px) {
  .validation-grid,
  .result-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .search-row {
    grid-template-columns: 1fr;
  }

  .validation-grid,
  .result-grid {
    grid-template-columns: 1fr;
  }
}
