:root {
  /* IPSleuth brand palette (derived from logo: deep navy + neon cyan/blue glow) */
  --bg: #050a14;
  --bg2: #071325;
  --panel: rgba(10, 28, 56, 0.62);
  --panel-border: rgba(66, 171, 255, 0.18);
  --panel-border-strong: rgba(66, 171, 255, 0.32);
  --text: rgba(255, 255, 255, 0.93);
  --muted: rgba(219, 236, 255, 0.72);
  --accent: #1fb6ff;
  --accent2: #00d4ff;
  --lime: #b8ff2c;
  /* Opaque banner background so header + page + outer margins match exactly */
  --banner-bg: linear-gradient(180deg, #030a16, #061325);
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu,
    Cantarell, Noto Sans, Helvetica Neue, Arial, "Apple Color Emoji",
    "Segoe UI Emoji";
  background: var(--banner-bg);
  color: var(--text);
}

a {
  color: inherit;
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 22px 18px 64px;
  background: var(--banner-bg);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--banner-bg);
  backdrop-filter: blur(10px);
}

.topbarInner {
  max-width: 1180px;
  margin: 0 auto;
  /* Keep a fixed header height regardless of logo size */
  height: 120px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-direction: row;
  flex-wrap: nowrap;
  min-width: 0;
}

.logoLink {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logoImg {
  /* Use native intrinsic size for sharpness, but render at a header-friendly height */
  display: block;
  height: 121px;
  width: auto;
  /* allow the logo to be larger than the header without affecting layout */
  transform: translateY(2px);
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(0, 212, 255, 0.18));
}

@media (max-width: 1100px) {
  .logoImg {
    height: 60px;
    max-width: 360px;
  }
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  white-space: nowrap;
  min-width: 0;
  overflow: visible;
}

@media (max-width: 860px) {
  .topbarInner {
    flex-direction: column;
    align-items: flex-start;
    height: auto;
    padding: 10px 14px;
  }

  .nav {
    width: 100%;
    justify-content: flex-start;
    padding-bottom: 4px;
    flex-wrap: wrap;
  }
}

.navLink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  user-select: none;
  line-height: 1.2;
}

.navLink:hover {
  border-color: rgba(66, 171, 255, 0.24);
  background: rgba(10, 28, 56, 0.5);
}

.navDropdown {
  position: relative;
}

.navDropdown > summary {
  list-style: none;
}

.navDropdown > summary::-webkit-details-marker {
  display: none;
}

.caret {
  color: rgba(0, 212, 255, 0.88);
  font-size: 12px;
}

.dropdownPanel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 230px;
  background: rgba(6, 19, 37, 0.92);
  border: 1px solid rgba(66, 171, 255, 0.22);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  z-index: 100;
}

.dropdownItem {
  display: block;
  padding: 10px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid transparent;
}

.dropdownItem:hover {
  background: rgba(10, 28, 56, 0.62);
  border-color: rgba(66, 171, 255, 0.22);
}

.leafletMap {
  background: rgba(6, 19, 37, 0.62);
}

.textInput {
  appearance: none;
  border-radius: 12px;
  padding: 12px 12px;
  border: 1px solid rgba(66, 171, 255, 0.22);
  background: rgba(6, 19, 37, 0.55);
  color: rgba(255, 255, 255, 0.92);
  outline: none;
  font-family: var(--mono);
  font-size: 14px;
}

.textInput:focus {
  border-color: rgba(0, 212, 255, 0.45);
  box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.08);
}

.primaryButton {
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(0, 212, 255, 0.35);
  background: linear-gradient(
    180deg,
    rgba(0, 212, 255, 0.18),
    rgba(31, 182, 255, 0.08)
  );
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--mono);
  font-size: 14px;
  cursor: pointer;
}

.primaryButton:hover {
  border-color: rgba(0, 212, 255, 0.55);
  background: linear-gradient(
    180deg,
    rgba(0, 212, 255, 0.24),
    rgba(31, 182, 255, 0.12)
  );
}

.primaryButton:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.secondaryButton {
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(66, 171, 255, 0.22);
  background: rgba(6, 19, 37, 0.35);
  color: rgba(219, 236, 255, 0.85);
  font-family: var(--mono);
  font-size: 14px;
  cursor: pointer;
}

.secondaryButton:hover {
  border-color: rgba(66, 171, 255, 0.38);
  background: rgba(6, 19, 37, 0.5);
}

.secondaryButton:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.iconButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(66, 171, 255, 0.22);
  background: rgba(6, 19, 37, 0.35);
  color: rgba(219, 236, 255, 0.85);
  cursor: pointer;
  padding: 0;
}

.iconButton:hover {
  border-color: rgba(66, 171, 255, 0.38);
  background: rgba(6, 19, 37, 0.5);
}

.iconButton:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.iconButtonSmall {
  width: 28px;
  height: 28px;
  border-radius: 9px;
}

.tooltipWrap {
  position: relative;
  display: inline-flex;
}

.tooltipBubble {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(66, 171, 255, 0.22);
  background: rgba(6, 19, 37, 0.92);
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 120ms ease, transform 120ms ease;
  z-index: 20;
}

.tooltipWrap:hover .tooltipBubble,
.tooltipWrap:focus-within .tooltipBubble {
  opacity: 1;
  transform: translateY(0);
}

.preBlock {
  margin: 0;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(66, 171, 255, 0.18);
  background: rgba(6, 19, 37, 0.55);
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.prose {
  max-width: 880px;
  margin: 0 auto;
}

.prose p,
.prose ul,
.prose ol {
  color: rgba(219, 236, 255, 0.86);
  line-height: 1.65;
}

.prose h2 {
  margin-top: 18px;
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 850;
  letter-spacing: 0.2px;
  color: rgba(255, 255, 255, 0.92);
}

.prose h3 {
  margin-top: 14px;
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.9);
}

.prose code {
  font-family: var(--mono);
  font-size: 0.95em;
  color: rgba(255, 255, 255, 0.92);
}

.prose hr {
  border: none;
  border-top: 1px solid rgba(66, 171, 255, 0.18);
  margin: 16px 0;
}

.hero {
  margin: 6px 0 16px;
  padding: 14px 14px 16px;
  border-radius: 16px;
  background: var(--banner-bg);
  border: 1px solid rgba(66, 171, 255, 0.18);
}

.heroTitle {
  font-size: 22px;
  font-weight: 750;
  letter-spacing: 0.2px;
}

.heroSubtitle {
  color: var(--muted);
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.45;
}

.ipHero {
  display: grid;
  justify-items: center;
  margin-top: 12px;
}

.ipHeroRows {
  display: grid;
  gap: 10px;
  width: 100%;
  max-width: 760px;
}

.ipHeroLine {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.ipHeroLine .value {
  margin: 0;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 860px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }
}

.twoColGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 860px) {
  .twoColGrid {
    grid-template-columns: 1fr 1fr;
  }
}

.card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 16px;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.cardTitle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}

.label {
  font-size: 12px;
  letter-spacing: 0.3px;
  color: var(--muted);
  text-transform: uppercase;
}

.value {
  font-family: var(--mono);
  font-size: 18px;
  line-height: 1.25;
  word-break: break-word;
  margin: 0;
}

.ipRows {
  display: grid;
  gap: 12px;
}

.ipRow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.ipRowLabel {
  font-family: var(--mono);
  font-size: 18px;
  line-height: 1.25;
  color: rgba(219, 236, 255, 0.78);
}

.ipRowLabelWrap {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.ipHeroLabelWrap {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}

.helpIconLink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  color: rgba(0, 212, 255, 0.9);
  text-decoration: none;
  flex: 0 0 auto;
}

.helpIconSvg {
  width: 1em;
  height: 1em;
  display: block;
}

.helpIconLink:hover {
  color: rgba(0, 212, 255, 1);
}

.helpIconLink:focus-visible {
  outline: 2px solid rgba(0, 212, 255, 0.5);
  outline-offset: 3px;
  border-radius: 999px;
}

.ipRowValue {
  text-align: right;
}

.muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.faqList {
  display: grid;
  gap: 10px;
}

.faqItem {
  border: 1px solid rgba(66, 171, 255, 0.18);
  background: rgba(6, 19, 37, 0.35);
  border-radius: 12px;
  padding: 12px 12px;
  scroll-margin-top: 140px;
}

.faqItem[open] {
  border-color: rgba(66, 171, 255, 0.34);
  background: rgba(6, 19, 37, 0.5);
}

.faqItem:target {
  border-color: rgba(0, 212, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.10);
}

.faqQuestion {
  list-style: none;
  cursor: pointer;
  font-weight: 750;
  color: rgba(255, 255, 255, 0.92);
}

.faqQuestion::-webkit-details-marker {
  display: none;
}

.faqQuestion::after {
  content: "+";
  float: right;
  color: rgba(0, 212, 255, 0.9);
  font-family: var(--mono);
}

.faqItem[open] > .faqQuestion::after {
  content: "–";
}

.faqAnswer {
  margin-top: 10px;
}

.footer {
  margin-top: 28px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 12px;
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
  padding: 0 18px 22px;
}

.footerCopyright {
  color: rgba(219, 236, 255, 0.75);
}

.footerLinks {
  display: inline-flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.footerSocial {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

.socialIcon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(66, 171, 255, 0.22);
  background: rgba(6, 19, 37, 0.35);
  color: rgba(219, 236, 255, 0.85);
  text-decoration: none;
}

.socialIcon:hover {
  border-color: rgba(66, 171, 255, 0.38);
  background: rgba(6, 19, 37, 0.5);
}

.footerLink {
  text-decoration: none;
  border-bottom: 1px solid rgba(66, 171, 255, 0.28);
  padding-bottom: 1px;
}

.footerLink:hover {
  border-bottom-color: rgba(66, 171, 255, 0.55);
}

.smallLink {
  text-decoration: none;
  color: rgba(0, 212, 255, 0.92);
  border-bottom: 2px solid rgba(0, 212, 255, 0.45);
  padding-bottom: 1px;
  transition: border-color 120ms ease, color 120ms ease, text-shadow 120ms ease;
}

.smallLink:hover {
  color: rgba(0, 212, 255, 1);
  border-bottom-color: rgba(0, 212, 255, 0.85);
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.22);
}

.smallLink:focus-visible {
  outline: 2px solid rgba(0, 212, 255, 0.55);
  outline-offset: 3px;
  border-radius: 8px;
}

