/* SiteLode Modern SaaS Design System — Shared Shell & Tokens */
:root {
  --bg: #ffffff;
  --bg-subtle: #fafafa;
  --bg-muted: #f4f4f5;
  --surface: #ffffff;
  --ink: #09090b;
  --ink2: #52525b;
  --ink3: #71717a;
  --line: #e4e4e7;
  --line-strong: #d4d4d8;
  --accent: #059669;
  --accent-hover: #047857;
  --accent-soft: #ecfdf5;
  --accent-border: #a7f3d0;
  --primary: #09090b;
  --primary-hover: #27272a;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --warn: #b45309;
  --warn-bg: #fffbeb;
  --warn-border: #fde68a;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-xs: 0 1px 2px rgba(9, 9, 11, 0.04);
  --shadow-sm: 0 2px 8px -2px rgba(9, 9, 11, 0.06), 0 1px 2px rgba(9, 9, 11, 0.04);
  --shadow-md: 0 12px 32px -8px rgba(9, 9, 11, 0.08), 0 2px 6px rgba(9, 9, 11, 0.04);
  --shadow-lg: 0 24px 60px -16px rgba(9, 9, 11, 0.12), 0 0 0 1px rgba(9, 9, 11, 0.04);
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
}
.wrap { max-width: 1200px; margin-inline: auto; padding-inline: 24px; }
h1, h2, h3, h4 { color: var(--ink); letter-spacing: -0.025em; text-wrap: balance; }
p { text-wrap: pretty; }
table { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input, select, textarea { scroll-margin-top: 24px; font-family: inherit; }
button, a { touch-action: manipulation; }

/* Global Header */
header.global-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 0;
}
.head-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 24px;
  flex-wrap: nowrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  line-height: 0;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}
.brand > img { width: 132px; height: auto; display: block; }
.menu-toggle { display: none; }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  width: auto;
  overflow: visible;
  padding: 0;
}
.nav a {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink2);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  transition: color 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.nav a:hover { color: var(--ink); background: var(--bg-muted); }
.nav a.on, .nav [aria-current="page"] {
  color: var(--ink) !important;
  background: var(--bg-muted);
  font-weight: 600 !important;
}
.nav .nav-login {
  margin-left: 16px;
  padding-inline: 12px;
  color: var(--ink2);
}
.nav .nav-login:hover { color: var(--ink); background: var(--bg-muted); }
.nav a.buy-btn {
  margin-left: 6px;
  padding: 8px 15px;
  min-height: 36px;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff !important;
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xs);
  transition: background 0.15s ease, transform 0.1s ease;
}
.nav a.buy-btn:hover { background: var(--primary-hover); color: #ffffff !important; }

/* Global Footer */
footer.global-footer {
  background: var(--bg-subtle);
  border-top: 1px solid var(--line);
  padding: 40px 0;
  margin-top: 64px;
}
.footer-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-logo img, .footer-brand.site-logo > img { width: 124px; max-width: 100%; height: auto; display: block; }
.footer-tag { font-size: 12.5px; color: var(--ink3); margin: 8px 0 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center; }
.footer-links a {
  font-size: 13px;
  color: var(--ink2);
  text-decoration: none;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--ink); }
footer.global-footer p { font-size: 12px; color: var(--ink3); line-height: 1.6; margin: 0; }

/* Shared Notices & Banners (auth.js AL.showNotice) */
.banner {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--bg-subtle);
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.55;
  margin: 0 0 24px;
}
.banner b, .banner strong { display: block; font-weight: 600; margin-bottom: 2px; color: var(--ink); }
.banner.info { background: #f8fafc; border-color: #cbd5e1; color: #334155; }
.banner.info b, .banner.info strong { color: #0f172a; }
.banner.ok, .banner.success { background: var(--accent-soft); border-color: var(--accent-border); color: #065f46; }
.banner.ok b, .banner.success b { color: #064e3b; }
.banner.err, .banner.error { background: var(--danger-bg); border-color: var(--danger-border); color: #991b1b; }
.banner.err b, .banner.error b { color: #7f1d1d; }
.banner.warn { background: var(--warn-bg); border-color: var(--warn-border); color: #92400e; }

/* Auth Pages (login.html & signup.html) */
.authwrap {
  padding: 64px 0 88px;
  background: radial-gradient(60% 45% at 50% 0%, rgba(5, 150, 105, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
  min-height: calc(100svh - 200px);
}
.authcard {
  max-width: 420px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-md);
}
.authcard h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
  line-height: 1.25;
}
.authcard .sub {
  font-size: 14px;
  color: var(--ink2);
  margin: 0 0 24px;
  line-height: 1.55;
}
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.14);
}
.pwrow { display: flex; gap: 8px; }
.pwrow input { flex: 1; min-width: 0; }
.pwrow button {
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--ink2);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.pwrow button:hover { background: var(--bg-muted); color: var(--ink); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  transition: background 0.15s, border-color 0.15s;
}
.btn.primary { background: var(--primary); border-color: var(--primary); color: #ffffff; }
.btn.primary:hover { background: var(--primary-hover); }
.btn.ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn.ghost:hover { background: var(--bg-muted); }
.btn.small { height: 34px; padding: 0 12px; font-size: 12.5px; margin-top: 10px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.formmsg { margin-top: 14px; font-size: 13px; line-height: 1.5; min-height: 20px; }
.formmsg.err { color: var(--danger); }
.formmsg.ok { color: var(--accent); }
.formmsg .bl { display: block; margin-top: 4px; color: var(--ink2); }
.authfoot {
  margin: 18px 0 0;
  font-size: 13px;
  color: var(--ink2);
  text-align: center;
}
.authfoot a { color: var(--ink); font-weight: 600; margin-left: 6px; text-decoration: underline; text-underline-offset: 3px; }
.authwrap .fine {
  max-width: 420px;
  margin: 20px auto 0;
  text-align: center;
  font-size: 12px;
  color: var(--ink3);
  line-height: 1.6;
}
.authwrap .fine p { margin: 4px 0; }

/* Starred / Targets & Shared Subpage Patterns */
.tg-hero, .research-page-heading { padding: 48px 0 16px; }
.tg-hero .eyebrow, .research-page-heading .eyebrow {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 12px;
}
.tg-hero h1, .research-page-heading h1 {
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.035em;
  margin: 0 0 14px;
}
.tg-hero .lead, .research-page-heading > p:last-child {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink2);
  max-width: 680px;
  margin: 0;
}
.preview-access-note { font-size: 13px; color: var(--ink3); margin: 16px 0 0; }

.database-view-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  padding-top: 16px;
}
.database-view-tabs a {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--ink3);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  padding: 12px 0;
  border-bottom: 2px solid transparent;
  min-height: 44px;
  transition: color 0.15s;
}
.database-view-tabs a:hover { color: var(--ink); }
.database-view-tabs a.selected {
  border-color: var(--ink);
  color: var(--ink);
  font-weight: 600;
  background: transparent;
}
.curated-star { display: inline-flex; align-items: center; flex-shrink: 0; opacity: 0.8; }
.curated-star img { display: block; }

.target-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-top: 24px;
  border-block: 1px solid var(--line);
  padding: 14px 0;
}
.filter-options { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-options button {
  font: 500 13px var(--sans);
  padding: 8px 14px;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--ink2);
  background: transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.filter-options button:hover { background: var(--bg-muted); color: var(--ink); }
.filter-options button.selected {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}
.filter-options button:disabled, .target-search input:disabled { opacity: 0.5; cursor: not-allowed; }
.target-search input {
  font: 13.5px var(--sans);
  padding: 9px 14px;
  min-height: 40px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  width: 260px;
  color: var(--ink);
}
.target-search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}
.target-result-count { font-size: 13px; color: var(--ink3); margin: 16px 0 20px; }

.tgrid-wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.tcard {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  padding: 22px;
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.tcard:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.tcard-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.tdom { font: 600 16px var(--mono); color: var(--ink); text-decoration: none; }
.tdom:hover { color: var(--accent); }
.tcat, .tscore {
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
}
.tcat { background: var(--bg-muted); color: var(--ink2); }
.tscore { background: var(--accent-soft); color: var(--accent-hover); border: 1px solid var(--accent-border); font-family: var(--mono); }
.tgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  font-size: 13.5px;
  color: var(--ink);
}
.tgrid b {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink3);
  margin-bottom: 4px;
}
.ttodo { background: var(--bg-subtle); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; margin-top: 16px; }
.ttodo ul { font-size: 12.5px; color: var(--ink2); margin: 6px 0 0; padding-left: 18px; }
.tprobe {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  min-height: 40px;
  margin-top: 10px;
}
.tprobe:hover { text-decoration: underline; }
.bad { font-weight: 500; color: var(--warn); }
h2.tg { font-size: 22px; font-weight: 700; margin: 40px 0 8px; }
p.tg-sub { font-size: 14px; color: var(--ink2); margin: 0 0 20px; }
.lock {
  background: var(--primary);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  margin-top: 32px;
  text-align: center;
}
.lock h3 { color: #ffffff; font-size: 22px; font-weight: 700; margin: 0 0 10px; }
.lock p { font-size: 14.5px; color: #a1a1aa; max-width: 540px; margin: 0 auto 22px; }
.lock a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  font-weight: 600;
  min-height: 42px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--ink);
  text-decoration: none;
}
.lock a:hover { background: #f4f4f5; }

/* Responsive Shell */
@media (max-width: 900px) {
  .head-flex { flex-wrap: wrap; min-height: 60px; padding-block: 10px; gap: 0; }
  .menu-toggle {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    font: 500 13px var(--sans);
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    min-height: 40px;
    color: var(--ink);
    cursor: pointer;
  }
  .menu-toggle > img { width: 16px; height: 16px; display: block; }
  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin-top: 12px;
    border-top: 1px solid var(--line);
    padding-top: 10px;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 10px 8px; font-size: 14px; min-height: 44px; }
  .nav .nav-login { margin-left: 0; padding-inline: 8px; }
  .nav a.buy-btn { margin: 8px 0 4px; justify-content: center; min-height: 44px; }
  .tgrid-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .wrap { padding-inline: 18px; }
  .brand > img { width: 120px; }
  .authwrap { padding: 36px 0 56px; }
  .authcard { padding: 28px 20px; }
  .target-toolbar { flex-direction: column; align-items: stretch; gap: 12px; }
  .filter-options button { flex: 1; padding-inline: 10px; }
  .target-search input { width: 100%; font-size: 16px; }
  .footer-flex { flex-direction: column; align-items: flex-start; gap: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
