:root {
  --ground: #F6F6F3;
  --surface: #FFFFFF;
  --ink: #121316;
  --ink-2: #2C2E33;
  --muted: #45474D;
  --muted-2: #6B6D74;
  --line: #E4E4DE;
  --accent: #3B3BD4;
  --accent-hover: #2A2AA8;
  --accent-soft: #EEEEFB;
  --display: 'Space Grotesk', system-ui, sans-serif;
  --body: Inter, system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.5; display: flex; flex-direction: column; min-height: 100vh; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.01em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; width: 100%; }
@media (min-width: 640px) { .wrap { padding: 0 24px; } }
.muted { color: var(--muted-2); font-size: 14px; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 20px; }
.brand:hover { color: var(--ink); }
.tool-nav { display: flex; gap: 4px; overflow-x: auto; max-width: 100%; }
.tool-nav a { padding: 10px 12px; border-radius: 8px; color: var(--muted); font-weight: 500; font-size: 15px; white-space: nowrap; }
.tool-nav a:hover { color: var(--ink); background: #F1F1EC; }
.tool-nav a.active { color: var(--ink); background: var(--accent-soft); }

/* Hero + search */
.hero { padding: 56px 16px 40px; }
.hero-tool { padding-top: 24px; }
.hero-inner { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.hero h1 { margin: 0; font-weight: 700; font-size: clamp(36px, 7vw, 56px); line-height: 1.05; letter-spacing: -0.02em; }
.lead { margin: 0; font-size: clamp(16px, 2.2vw, 19px); line-height: 1.55; color: var(--muted); max-width: 640px; }
.hint { margin: 0; font-size: 14px; color: var(--muted-2); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.chips span { padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 500; color: var(--muted); }

.search { width: 100%; max-width: 680px; display: flex; gap: 8px; flex-wrap: wrap; padding: 8px; background: var(--surface); border: 1.5px solid var(--ink); border-radius: 14px; margin-top: 8px; }
.search-field { flex: 999 1 260px; display: flex; align-items: center; gap: 10px; padding: 0 12px; }
.search .at { font-family: var(--display); font-weight: 600; font-size: 20px; color: #8A8C93; }
.search input[type=text] { flex: 1; min-width: 0; height: 52px; border: 0; outline: none; font: 400 18px var(--body); color: var(--ink); background: transparent; }
.search button { flex: 1 1 140px; height: 56px; padding: 0 28px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font: 600 17px var(--body); cursor: pointer; }
.search button:hover { background: var(--accent-hover); }
.search:focus-within { box-shadow: 0 0 0 4px var(--accent-soft); }
.search-compact { max-width: 560px; margin: 0; border-width: 1px; border-color: #D6D6CF; background: var(--surface); }
.search-compact input[type=text] { height: 44px; font-size: 16px; }
.search-compact button { height: 44px; flex: 0 0 auto; font-size: 15px; padding: 0 20px; }

/* Ads */
.ad-slot { border: 1px dashed #C9C9C2; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #8A8C93; font-size: 13px; }
.ad-leader { max-width: 970px; height: 90px; margin: 0 auto; }
.ad-rect { height: 250px; }

/* Sections */
.block { padding-top: 56px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 24px; }
.block h2 { margin: 0; font-size: 30px; font-weight: 700; }
.narrow { max-width: 820px; }
.band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.tool-card { display: flex; flex-direction: column; gap: 10px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; color: var(--ink); }
.tool-card:hover { border-color: var(--ink); color: var(--ink); }
.tool-card svg { color: var(--accent); }
.tool-card strong { font-size: 18px; }
.tool-card span { font-size: 15px; line-height: 1.5; color: var(--muted); }
.steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.steps li { display: flex; flex-direction: column; gap: 6px; }
.steps b { font-family: var(--display); font-size: 40px; color: var(--accent); line-height: 1; }
.steps strong { font-size: 18px; }
.steps span { font-size: 15px; color: var(--muted); }

.faq { display: flex; flex-direction: column; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.faq summary { font-weight: 600; font-size: 17px; cursor: pointer; }
.faq p { margin: 10px 0 0; font-size: 15px; line-height: 1.6; color: var(--muted); }

/* Tool pages */
.crumbs { padding-top: 16px; font-size: 14px; color: var(--muted-2); }
.two-col { display: flex; gap: 40px; flex-wrap: wrap; align-items: flex-start; padding-bottom: 64px; }
.prose { flex: 999 1 560px; min-width: 0; font-size: 16px; line-height: 1.7; color: var(--ink-2); }
.prose h1 { font-size: 40px; margin: 0 0 8px; }
.prose h2 { font-size: 26px; color: var(--ink); margin: 32px 0 8px; }
.prose h2:first-child { margin-top: 0; }
.side { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 8px; }

/* Result page */
.result { display: flex; gap: 32px; flex-wrap: wrap; align-items: flex-start; padding-top: 24px; padding-bottom: 64px; }
.result-main { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.status { margin: 0; color: var(--muted); }
.profile-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: flex; gap: 24px; flex-wrap: wrap; align-items: center; }
.avatar { width: 112px; height: 112px; border-radius: 999px; object-fit: cover; background: #DCDCF7; flex: none; }
.profile-info { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.name-row h1 { margin: 0; font-size: 28px; }
.badge { padding: 4px 10px; border-radius: 999px; background: #F1F1EC; font-size: 12px; font-weight: 600; color: var(--muted); }
.handle { color: var(--muted-2); }
.bio { margin: 0; color: var(--ink-2); }
.stats { display: flex; gap: 28px; flex-wrap: wrap; margin: 4px 0 0; }
.stats div { display: flex; flex-direction: column-reverse; }
.stats dt { font-size: 13px; color: var(--muted-2); }
.stats dd { margin: 0; font-family: var(--display); font-size: 22px; font-weight: 700; }
.profile-actions { display: flex; flex-direction: column; gap: 8px; flex: none; }
.btn-outline, .btn-ghost { height: 44px; display: flex; align-items: center; justify-content: center; padding: 0 18px; border-radius: 10px; font: 600 15px var(--body); cursor: pointer; }
.btn-outline { border: 1.5px solid var(--ink); background: var(--surface); color: var(--ink); }
.btn-outline.on { background: var(--ink); color: #fff; }
.btn-ghost { border: 1px solid var(--line); color: var(--ink); }
.tabs { display: flex; gap: 4px; padding: 4px; background: #ECECE7; border-radius: 12px; width: fit-content; max-width: 100%; flex-wrap: wrap; }
.tabs button { height: 44px; padding: 0 20px; border: 0; border-radius: 9px; font: 600 15px var(--body); background: transparent; color: #55575E; cursor: pointer; }
.tabs button[aria-selected=true] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(18,19,22,.08); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tile { aspect-ratio: 9 / 16; border-radius: 12px; background: #2C2E33 center / cover no-repeat; display: flex; align-items: flex-end; padding: 10px; color: #fff; }
.tile span { font-size: 13px; font-weight: 600; background: rgba(18,19,22,.72); padding: 4px 8px; border-radius: 6px; }
.empty { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 40px 24px; text-align: center; color: var(--muted); }

/* Footer */
.site-footer { margin-top: auto; background: var(--ink); color: #C9CAD0; }
.footer-row { display: flex; gap: 24px; flex-wrap: wrap; justify-content: space-between; padding-top: 36px; padding-bottom: 36px; }
.footer-brand { display: flex; flex-direction: column; gap: 6px; max-width: 360px; font-size: 13px; color: #A3A5AD; }
.footer-brand strong { font-family: var(--display); font-size: 18px; color: #fff; }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; font-size: 14px; }
.site-footer a { color: #C9CAD0; }
.site-footer a:hover { color: #fff; }

/* Live data additions */
.tile { position: relative; overflow: hidden; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile span { position: relative; }
.more { align-self: center; min-width: 160px; }
.pins { display: flex; flex-direction: column; gap: 6px; }
.stats { gap: 24px; }
.empty p { margin: 0 0 12px; }
.empty .btn-outline { display: inline-flex; }
