:root {
  --bg0: #060a12;
  --bg1: #0a1220;
  --bg2: #101c30;
  --line: rgba(96, 165, 255, 0.16);
  --text: #eef4ff;
  --muted: #8ba3c7;
  --accent: #3b9eff;
  --accent-bright: #5cb8ff;
  --accent-dim: rgba(59, 158, 255, 0.14);
  --accent-glow: rgba(59, 158, 255, 0.35);
  --warn: #e8b84a;
  --bad: #f07178;
  --good: #4fd1a5;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --radius: 14px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(59, 158, 255, 0.18), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(37, 99, 235, 0.14), transparent 50%),
    radial-gradient(700px 400px at 50% 100%, rgba(29, 78, 216, 0.08), transparent 60%),
    linear-gradient(180deg, var(--bg0), #040810 100%);
  background-attachment: fixed;
}

a { color: var(--accent-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

.shell {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  height: 52px;
  width: auto;
  display: block;
  filter: drop-shadow(0 0 18px rgba(59, 158, 255, 0.25));
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(59, 158, 255, 0.35), rgba(37, 99, 235, 0.25)),
    var(--bg2);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--accent-bright);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand-sub {
  display: block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.1rem;
  letter-spacing: 0.02em;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(10, 18, 32, 0.75);
  font-size: 0.82rem;
  color: var(--muted);
}

.pill.ok { color: var(--good); border-color: rgba(79, 209, 165, 0.35); background: rgba(79, 209, 165, 0.1); }
.pill.bad { color: var(--bad); border-color: rgba(240, 113, 120, 0.35); background: rgba(240, 113, 120, 0.1); }
.pill.warn { color: var(--warn); border-color: rgba(232, 184, 74, 0.35); background: rgba(232, 184, 74, 0.1); }
.pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}

.hero {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
  animation: rise 0.7s ease both;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.hero-logo {
  height: clamp(72px, 14vw, 110px);
  width: auto;
  filter: drop-shadow(0 0 28px rgba(59, 158, 255, 0.3));
}

.hero-copy {
  flex: 1 1 240px;
  min-width: 0;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 560;
  font-size: clamp(2rem, 4.5vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.hero p {
  margin: 0.65rem 0 0;
  max-width: 46ch;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0.85rem 1.2rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(180deg, #4dabff, #2563eb);
  color: #f8fbff;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #6bbcff, #3b82f6);
  box-shadow: 0 10px 28px rgba(59, 130, 246, 0.4);
}
.btn-ghost {
  background: rgba(16, 28, 48, 0.75);
  border-color: var(--line);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: rgba(96, 165, 255, 0.4);
  background: rgba(16, 28, 48, 0.95);
}

.panel {
  background: linear-gradient(180deg, rgba(16, 28, 48, 0.92), rgba(10, 18, 32, 0.95));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.35rem;
  animation: rise 0.8s ease both;
}

.panel + .panel { margin-top: 1rem; }

.panel h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
}

.panel .lede {
  margin: 0 0 1.1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.lookup-row {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.lookup-row input {
  flex: 1 1 220px;
  min-width: 0;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(6, 10, 18, 0.65);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  outline: none;
}
.lookup-row input:focus {
  border-color: rgba(59, 158, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(59, 158, 255, 0.14);
}
.lookup-row input::placeholder { color: #5f7386; letter-spacing: 0; font-family: var(--font-body); }

.steps {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}
.steps li {
  display: grid;
  grid-template-columns: 1.6rem 1fr;
  gap: 0.65rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}
.steps .n {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--accent-dim);
  color: var(--accent-bright);
  font-size: 0.75rem;
  font-weight: 700;
}

/* Report page */
.report-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  animation: rise 0.55s ease both;
}

.report-head h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.02em;
}

.run-id {
  margin-top: 0.35rem;
  font-family: var(--font-mono);
  color: var(--muted);
  font-size: 0.9rem;
}
.run-id strong { color: var(--text); font-weight: 500; }

.grid-specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

@media (max-width: 820px) {
  .grid-specs { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .grid-specs { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; align-items: flex-start; }
}

.spec {
  background: rgba(6, 10, 18, 0.45);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.95rem 1rem;
  min-height: 84px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.spec:hover { border-color: rgba(96, 165, 255, 0.28); background: rgba(6, 10, 18, 0.65); }
.spec .label {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.spec .value {
  font-size: 1rem;
  font-weight: 560;
  line-height: 1.35;
  word-break: break-word;
}

.security-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}
@media (max-width: 640px) {
  .security-grid { grid-template-columns: 1fr; }
}

.check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(6, 10, 18, 0.4);
}
.check .left {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}
.check .icon {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex: 0 0 auto;
}
.check.pass .icon { background: rgba(79, 209, 165, 0.12); color: var(--good); }
.check.fail .icon { background: rgba(240, 113, 120, 0.12); color: var(--bad); }
.check.unk .icon { background: rgba(232, 184, 74, 0.12); color: var(--warn); }
.check .name { font-weight: 560; }
.check .state {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.85rem;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.table th, .table td {
  text-align: left;
  padding: 0.65rem 0.4rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.table th {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.table td { word-break: break-word; }
.table td.cell-good { color: var(--good); font-weight: 560; }
.table td.cell-bad { color: var(--bad); font-weight: 560; }
.table td.cell-unk { color: var(--muted); }
.table td.cell-note { color: var(--muted); font-size: 0.85rem; }

.empty, .error, .loading {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--muted);
}
.error { color: var(--bad); }

.footer-note {
  margin-top: 2rem;
  color: #607588;
  font-size: 0.8rem;
  text-align: center;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Report app with side tabs ===== */
body.report-page {
  background:
    radial-gradient(900px 500px at 0% 0%, rgba(59, 158, 255, 0.12), transparent 55%),
    linear-gradient(180deg, #050912, #04070e 100%);
}

body.report-page #content {
  min-height: 100vh;
}

.report-loading {
  width: min(480px, calc(100% - 2rem));
  margin: 4rem auto;
}

.report-app {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  animation: rise 0.45s ease both;
}

.report-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.35rem 1rem 1.25rem;
  border-right: 1px solid var(--line);
  background: rgba(8, 14, 24, 0.92);
  position: sticky;
  top: 0;
  height: 100vh;
}

.report-sidebar .brand {
  padding: 0.25rem 0.55rem;
}

.report-sidebar .brand-logo {
  height: 44px;
}

.report-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.report-nav-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 560;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.report-nav-btn:hover {
  color: var(--text);
  background: rgba(59, 158, 255, 0.08);
}

.report-nav-btn.active {
  color: var(--accent-bright);
  background: rgba(59, 158, 255, 0.16);
  box-shadow: inset 3px 0 0 var(--accent);
}

.report-side-foot {
  padding: 0.75rem 0.9rem;
  border-top: 1px solid var(--line);
}

.report-side-foot .label {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 0.35rem;
}

.report-side-foot .value {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text);
  word-break: break-all;
}

.report-side-foot a {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.82rem;
}

.report-main {
  padding: 1.5rem 1.75rem 2.5rem;
  min-width: 0;
}

.report-main-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.report-main-head h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.5vw, 1.9rem);
  letter-spacing: -0.02em;
}

.report-panel {
  display: none;
  animation: rise 0.35s ease both;
}

.report-panel.active {
  display: block;
}

.report-panel .panel {
  animation: none;
}

.report-panel .panel + .panel {
  margin-top: 1rem;
}

.report-mobile-nav {
  display: none;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.report-mobile-nav .report-nav-btn {
  border: 1px solid var(--line);
  background: rgba(10, 18, 32, 0.7);
  font-size: 0.82rem;
  padding: 0.55rem 0.75rem;
}

@media (max-width: 900px) {
  .report-app {
    grid-template-columns: 1fr;
  }

  .report-sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding-bottom: 1rem;
  }

  .report-nav {
    display: none;
  }

  .report-mobile-nav {
    display: flex;
  }

  .report-main {
    padding: 1.1rem 1rem 2rem;
  }

  .grid-specs {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .grid-specs {
    grid-template-columns: 1fr;
  }
}

/* ===== Soft site protection (watermark + no-select) ===== */
.site-protected,
.site-protected body {
  -webkit-user-select: none;
  user-select: none;
}

.site-protected input,
.site-protected textarea,
.site-protected [contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
}

.protect-watermark {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  pointer-events: none;
  overflow: hidden;
}

.protect-watermark-item {
  position: absolute;
  transform: translate(-50%, -50%) rotate(-32deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  opacity: 0.005;
  color: #dbe7ff;
  font-family: var(--font-body), system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.15;
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.15);
}

.protect-watermark-item span:first-child {
  font-size: clamp(1.1rem, 2.2vw, 1.65rem);
}

.protect-watermark-item span:last-child {
  font-size: clamp(0.85rem, 1.6vw, 1.15rem);
  letter-spacing: 0.2em;
  font-weight: 600;
  opacity: 0.9;
}
