:root {
  --ink: #0f172a;
  --muted: #64748b;
  --edge: #e2e8f0;
  --paper: #ffffff;
  --sea: #0284c7;
  --sea-dark: #0369a1;
  --sea-light: #f0f9ff;
  --success: #059669;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --font-stack: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: #f8fafc;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-stack);
  line-height: 1.5;
  color: var(--ink);
  background: #f8fafc;
}

/* Top Navigation Bar */
.site-nav {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--edge);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px 20px;
}

.nav-container {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #0f172a;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -.02em;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  color: #475569;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  transition: color 0.15s;
}

.nav-link:hover, .nav-link.active {
  color: var(--sea);
}

.nav-cta {
  background: var(--sea-light);
  color: var(--sea-dark);
  border: 1px solid #bae6fd;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s;
}

.nav-cta:hover {
  background: var(--sea);
  color: white;
  border-color: var(--sea);
}

.shell {
  margin: 0 auto;
  max-width: 980px;
  padding: 36px 20px 48px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.brand-icon {
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
}

.eyebrow, .label, .sponsor-label {
  color: var(--sea);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  margin: 0;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(28px, 5vw, 44px);
  letter-spacing: -.03em;
  line-height: 1.15;
  margin: 8px 0 0;
  color: #0f172a;
}

.lede {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
  margin: 10px 0 0;
}

.card {
  background: var(--paper);
  border: 1px solid var(--edge);
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.035);
  padding: 22px;
}

.card h2 {
  font-size: 18px;
  letter-spacing: -.02em;
  margin: 0 0 14px;
}

.input-row { display: flex; gap: 10px; }

input {
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  color: var(--ink);
  flex: 1;
  font: inherit;
  font-size: 14px;
  min-width: 0;
  padding: 12px 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus {
  border-color: var(--sea);
  box-shadow: 0 0 0 3px #bae6fd;
  outline: 0;
}

button {
  background: var(--sea);
  border: 1px solid var(--sea);
  border-radius: 9px;
  color: #fff;
  cursor: pointer;
  font: 700 14px inherit;
  padding: 0 22px;
  white-space: nowrap;
  transition: background 0.15s ease;
}

button:hover { background: var(--sea-dark); }

.privacy-note, footer, .muted {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.privacy-note { margin: 12px 0 0; }
code {
  background: #f1f5f9;
  border-radius: 4px;
  padding: 2px 6px;
  font-family: ui-monospace, SFMono-Regular, monospace;
}

.error {
  color: #e11d48;
  font-size: 13px;
  margin: 10px 0 0;
}

[hidden], #results[hidden], #welcome-state[hidden] {
  display: none !important;
}

#results {
  display: grid;
  gap: 20px;
  margin-top: 24px;
}

/* Welcome Landing State */
#welcome-state {
  display: grid;
  gap: 20px;
  margin-top: 24px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.feature-item {
  background: #f8fafc;
  border: 1px solid var(--edge);
  border-radius: 10px;
  padding: 16px;
}

.feature-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.feature-item h3 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 4px;
  color: #0f172a;
}

.feature-item p {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
  margin: 0;
}

.examples-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--edge);
}

.examples-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.example-chip {
  background: var(--sea-light);
  color: var(--sea-dark);
  border: 1px solid #bae6fd;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}

.example-chip:hover {
  background: #e0f2fe;
  border-color: var(--sea);
}

/* FAQ Accordion for Modern SEO & AI GEO */
.faq-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--edge);
}

.faq-title {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #334155;
  margin: 0 0 14px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: #f8fafc;
  border: 1px solid var(--edge);
  border-radius: 8px;
  padding: 12px 16px;
  transition: all 0.15s ease;
}

.faq-item[open] {
  background: white;
  border-color: #bae6fd;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.05);
}

.faq-item summary {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 16px;
  color: var(--sea);
  font-weight: 800;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin: 8px 0 0;
}

/* Target Identity Card */
.target-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
}

.target-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.site-favicon {
  border-radius: 6px;
  flex-shrink: 0;
  background: #f8fafc;
  padding: 2px;
}

.target-meta { min-width: 0; }

.target-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  background: #f1f5f9;
  color: #475569;
}

.success-badge {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-border);
}

.info-badge {
  background: var(--sea-light);
  color: var(--sea);
  border: 1px solid #bae6fd;
}

.muted-badge {
  background: #f1f5f9;
  color: #64748b;
}

.target-meta h2 {
  font-size: 16px;
  line-height: 1.35;
  margin: 0;
  overflow-wrap: anywhere;
  word-break: break-all;
  color: #0f172a;
}

.action-btn-outline {
  border: 1px solid var(--edge);
  border-radius: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  padding: 9px 14px;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s ease;
  background: white;
}

.action-btn-outline:hover {
  border-color: var(--sea);
  color: var(--sea);
  background: var(--sea-light);
}

/* 2-Column Preview & Timeline Grid */
.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* Browser Mockup Preview Card */
.preview-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.window-bar {
  background: #f1f5f9;
  border-bottom: 1px solid var(--edge);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.window-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.window-dot.red { background: #ef4444; }
.window-dot.yellow { background: #f59e0b; }
.window-dot.green { background: #10b981; }

.window-url {
  font-size: 11px;
  color: #64748b;
  margin-left: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.preview-img-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #0f172a;
  overflow: hidden;
}

.site-screenshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

.preview-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}

/* Timeline Card */
.timeline-card {
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 15px;
  font-weight: 800;
  margin: 0 0 16px;
  color: #0f172a;
}

.timeline-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.timeline-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.item-icon {
  font-size: 20px;
  line-height: 1;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 8px;
  flex-shrink: 0;
}

.item-content { flex: 1; }

.item-label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .08em;
  color: #64748b;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.item-value {
  font-size: 13.5px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 6px;
}

.mini-btn {
  display: inline-block;
  background: var(--sea);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.15s;
}

.mini-btn:hover { background: var(--sea-dark); }

.mini-btn-secondary {
  display: inline-block;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s;
}

.mini-btn-secondary:hover {
  background: #e2e8f0;
  color: #0f172a;
}

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

.save-btn {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--sea);
  background: var(--sea-light);
  border: 1px solid #bae6fd;
  border-radius: 5px;
  padding: 4px 9px;
  text-decoration: none;
  transition: background 0.15s;
}

.save-btn:hover { background: #e0f2fe; }

/* Direct Archives */
.section-title {
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: .04em;
  margin: 0 0 12px;
  color: #334155;
  text-transform: uppercase;
}

.sources {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.source {
  background: var(--paper);
  border: 1px solid var(--edge);
  border-radius: 12px;
  color: var(--ink);
  min-height: 104px;
  padding: 16px;
  text-decoration: none;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.source:hover {
  border-color: var(--sea);
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.08);
  transform: translateY(-2px);
}

.source.primary {
  background: #f0fdfa;
  border-color: #99f6e4;
}

.source-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.source-tag {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  background: #ccfbf1;
  color: #0d9488;
}

.source-tag.alt {
  background: #f1f5f9;
  color: #475569;
}

.source-tag.search {
  background: #e0f2fe;
  color: #0369a1;
}

.source strong { font-size: 15px; }

.source span {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
  margin-top: 6px;
}

.source b { color: var(--sea); }

/* WHOIS / RDAP */
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.heading-links { display: flex; gap: 12px; }

.text-link {
  color: var(--sea);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.text-link:hover { text-decoration: underline; }

dl {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

dd {
  font-size: 13.5px;
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  color: #0f172a;
  font-weight: 500;
}

.sponsor-card {
  border-style: dashed;
  background: #fafafa;
  padding: 16px 20px;
}

.sponsor-label {
  color: #94a3b8;
  font-size: 10px;
  letter-spacing: .14em;
  margin-bottom: 6px;
}

.sponsor-text {
  margin: 0;
  font-size: 12px;
}

footer {
  border-top: 1px solid var(--edge);
  margin-top: 36px;
  padding-top: 20px;
  text-align: center;
}

/* Category Navigation & Howto Hub */
.category-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0 28px;
}

.category-pill {
  background: white;
  border: 1px solid var(--edge);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  text-decoration: none;
  transition: all 0.15s;
}

.category-pill:hover, .category-pill.active {
  background: var(--sea-light);
  border-color: #bae6fd;
  color: var(--sea-dark);
}

.guides-container {
  display: grid;
  gap: 24px;
}

.guide-card {
  padding: 28px;
}

.guide-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--sea);
  background: var(--sea-light);
  border: 1px solid #bae6fd;
  border-radius: 4px;
  padding: 3px 8px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.guide-card h2 {
  font-size: 22px;
  letter-spacing: -.02em;
  margin: 4px 0 6px;
  color: #0f172a;
}

.guide-body {
  font-size: 14.5px;
  line-height: 1.7;
  color: #334155;
  margin-top: 18px;
  border-top: 1px solid var(--edge);
  padding-top: 18px;
}

.guide-body h3 {
  font-size: 16px;
  margin: 18px 0 6px;
  color: #0f172a;
}

.guide-body ul, .guide-body ol {
  padding-left: 22px;
  margin: 10px 0;
}

.guide-body li {
  margin-bottom: 6px;
}

/* Fallback Card for Screenshot Preview */
.preview-fallback {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0b192c 0%, #022c4b 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  color: white;
}

.fallback-icon {
  font-size: 36px;
  margin-bottom: 8px;
}

.fallback-domain {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.fallback-note {
  font-size: 12px;
  color: #94a3b8;
  max-width: 280px;
  margin: 0 0 14px;
}

@media (max-width: 768px) {
  .site-nav { padding: 12px 16px; }
  .nav-menu { gap: 12px; }
  .nav-link { font-size: 12.5px; }
  .shell { padding: 24px 16px 40px; }
  .preview-grid { grid-template-columns: 1fr; }
  .target-card { flex-direction: column; align-items: flex-start; }
  .action-btn-outline { width: 100%; text-align: center; }
  dl { grid-template-columns: 1fr; }
}
