/* IP Lens v2 — minimalist, light-default, ad-ready */
:root {
  color-scheme: light;
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #111111;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #0f766e;
  --accent-soft: #ccfbf1;
  --ad-bg: #f3f4f6;
  --ad-border: #d1d5db;
  --radius: 10px;
  --col: 720px;
  --gap-ad: 28px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  width: min(100% - 40px, var(--col));
  margin-inline: auto;
}
.page {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  min-height: 100vh;
}
@media (min-width: 1200px) {
  .page {
    grid-template-columns: 1fr var(--col) 320px 1fr;
    align-items: start;
  }
  .page > .rail-spacer { grid-column: 1; }
  .page > .main-col { grid-column: 2; }
  .page > .ad-rail { grid-column: 3; }
}

/* Header */
.site-header {
  padding: 28px 0 8px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: 1.125rem;
  color: var(--text);
  text-decoration: none;
}
.brand span { color: var(--accent); }
.site-header nav {
  display: flex;
  gap: 18px;
  font-size: 0.8125rem;
  color: var(--muted);
}
.site-header nav a { color: var(--muted); }
.site-header nav a:hover { color: var(--text); text-decoration: none; }

/* Hero / IP */
.hero {
  padding: 36px 0 8px;
  text-align: left;
}
.hero .eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}
.hero h1 {
  font-size: clamp(1.5rem, 3.5vw, 1.875rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin: 0 0 20px;
}
.ip-block {
  margin: 0 0 18px;
}
.ip-label {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0 0 6px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.ip {
  font: 700 clamp(1.75rem, 6vw, 3rem)/1.15 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
  margin: 0 0 16px;
  color: var(--text);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 16px;
  transition: border-color .15s, background .15s;
}
button:hover { border-color: #9ca3af; }
button:disabled { opacity: .55; cursor: wait; }
button.primary {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
  font-weight: 600;
}
button.primary:hover { background: #000; }
.status {
  min-height: 1.25rem;
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 4px 0 0;
}

/* Compact info row */
.info-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0 0;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.info-row dt {
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 4px;
}
.info-row dd {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 550;
  overflow-wrap: anywhere;
}
.info-row .sub {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--muted);
  margin-top: 2px;
}
@media (max-width: 560px) {
  .info-row { grid-template-columns: 1fr; gap: 14px; }
}

/* Protocols — compact secondary */
.protocols {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 16px;
  margin: 20px 0 0;
  font-size: 0.875rem;
}
.protocols .v4 strong {
  font: 600 1.05rem/1.3 ui-monospace, monospace;
  color: var(--text);
}
.protocols .v6 strong {
  font: 500 0.8125rem/1.35 ui-monospace, monospace;
  color: var(--muted);
}
.protocols .label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 4px;
}
.badge {
  display: inline-block;
  font-size: 0.625rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  margin-top: 6px;
}
@media (max-width: 560px) {
  .protocols { grid-template-columns: 1fr; }
}

/* Direct answer (AEO) */
.direct-answer {
  margin: 28px 0 0;
  padding: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 62ch;
}
.direct-answer p { margin: 0; }

/* Ad slots */
.ad-slot {
  background: var(--ad-bg);
  border: 1px dashed var(--ad-border);
  border-radius: var(--radius);
  color: #9ca3af;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  /* Reserved height prevents CLS when ads load */
}
.ad-slot::before { content: "Advertisement"; }
.ad-slot-below-hero {
  margin-top: var(--gap-ad); /* >=24px from Copy button */
  min-height: 90px;
  width: 100%;
}
.ad-slot-incontent {
  margin: 36px 0;
  min-height: 250px;
  width: 100%;
}
.ad-rail {
  display: none;
  position: sticky;
  top: 24px;
  padding-top: 100px;
  padding-left: 20px;
}
.ad-rail .ad-slot {
  width: 300px;
  min-height: 600px;
}
@media (min-width: 1200px) {
  .ad-rail { display: block; }
}

/* Sections */
.section {
  margin: 40px 0 0;
  padding: 0;
}
.section h2 {
  font-size: 1.125rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}
.lookup-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.lookup-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 14px;
  background: var(--surface);
  color: var(--text);
}
.lookup-form input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
#lookup-result {
  margin-top: 12px;
  font-size: 0.875rem;
  white-space: pre-line;
  color: var(--muted);
  min-height: 0;
}
#lookup-result:empty { display: none; }

.learn-grid {
  display: grid;
  gap: 20px;
}
.learn-grid article h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0 0 6px;
}
.learn-grid article p {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
  max-width: 62ch;
}
details {
  margin-top: 8px;
  font-size: 0.8125rem;
  color: var(--muted);
}
summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 0.8125rem;
}

/* FAQ (AEO/GEO) */
.faq {
  margin: 48px 0 0;
}
.faq h2 { margin-bottom: 20px; }
.faq-item {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.faq-item p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
  max-width: 62ch;
  line-height: 1.55;
}

/* About / E-E-A-T */
.about-tool {
  margin: 40px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  color: var(--muted);
}
.about-tool h2 {
  font-size: 0.9375rem;
  color: var(--text);
  margin: 0 0 8px;
}
.about-tool p { margin: 0 0 8px; max-width: 62ch; }
.updated { font-size: 0.75rem; color: #9ca3af; }

/* Footer */
.site-footer {
  margin: 48px 0 0;
  padding: 24px 0 40px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.75rem;
  color: var(--muted);
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

@media (max-width: 720px) {
  .wrap { width: min(100% - 32px, var(--col)); }
    .hero { padding-top: 28px; }
}
