/* Layout: agent head on top, one search line under it, the people globe appears below once there are results. */
:root {
  --bg: #ffffff;
  --soft: #f4f4f2;
  --ink: #111111;
  --ink-2: #55554f;
  --ink-3: #8f8f88;
  --line: #e6e6e1;
  --ok: #1f9d57;
  --font: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); overflow-x: clip; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

header:not(.jobany-site-header) { height: 64px; display: flex; align-items: center; gap: 14px; padding-inline: max(20px, calc((100vw - 1180px) / 2)); }
header .logo { font-weight: 850; font-size: 22px; letter-spacing: -0.03em; text-decoration: none; }
header .logo { display: inline-flex; align-items: center; gap: 9px; }
header .logo::before { content: ""; width: 89px; height: 34px; flex: 0 0 auto; background: url(/assets/logo.svg?v=logo-4) center/contain no-repeat; }
header .tag { color: var(--ink-3); font-size: 12px; }
header .cab { margin-left: auto; font-size: 14px; font-weight: 600; text-decoration: none; }

main { max-width: 1180px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left, 0px)) 40px; }

/* ---------- hero: the head, then the line */
.hero { display: flex; flex-direction: column; align-items: center; min-height: calc(100svh - 72px); justify-content: center; padding-bottom: 24px; overflow-x: clip; }
/* Reserve the full canvas above the title, never behind the sticky header.
   Camera framing also leaves room for the detective hat and search motions. */
.agent-wrap { position: relative; width: min(100%, 720px); height: min(56vh, 580px); min-height: 280px; margin: 16px 0 12px; pointer-events: none; }
.agent { position: absolute; left: -12%; right: -12%; top: 0; bottom: -34%; }
.hero h1, .hero .search, .hero .status, .hero .meta, .hero .notice { position: relative; z-index: 2; }
.hero h1 { text-shadow: 0 0 3px var(--bg), 0 0 6px var(--bg); }
/* The backdrop is masked to the actual glyphs, not the heading's rectangle. */
.hero h1::before {
  content: ""; position: absolute; inset: -8px; z-index: -1; pointer-events: none;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  mask-image: var(--letter-halo, linear-gradient(transparent, transparent));
  -webkit-mask-image: var(--letter-halo, linear-gradient(transparent, transparent));
  mask-size: 100% 100%; -webkit-mask-size: 100% 100%;
  mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat;
}
h1 { font-size: clamp(26px, 3.4vw, 40px); line-height: 1.05; letter-spacing: -0.045em; margin: 4px 0 22px; text-align: center; text-wrap: balance; }
.search {
  display: flex; gap: 8px; width: min(100%, 640px); padding: 6px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
  box-shadow: 0 12px 34px rgba(17, 17, 17, 0.08);
}
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 16px; padding: 10px 6px 10px 18px; color: var(--ink); }
.search input::placeholder { color: var(--ink-3); }
.search:focus-within { border-color: var(--ink); }
.search button, .ghost { border: 0; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 700; padding: 0 26px; min-height: 46px; cursor: pointer; }
.search button:disabled, .ghost:disabled { opacity: 0.45; cursor: default; }
.status { margin: 14px 0 0; min-height: 1.4em; font-size: 14px; color: var(--ink-2); text-align: center; max-width: 560px; text-wrap: balance; }
.status.busy::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); margin-right: 8px; vertical-align: 1px; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0.15; } }
.meta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 14px; margin-top: 8px; max-width: 760px; }
.ext { font-size: 12.5px; color: var(--ink-3); }
.ext.ok::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); margin-right: 6px; vertical-align: 1px; }
.past { position: relative; }
.past summary { list-style: none; margin: 0; cursor: pointer; font-size: 12.5px; font-weight: 500; color: var(--ink-3); padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); }
.past summary::-webkit-details-marker { display: none; }
.past summary::after { content: " ▾"; }
.past[open] summary, .past summary:hover { color: var(--ink); border-color: var(--ink); }
.history { position: absolute; z-index: 20; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); width: max-content; max-width: min(340px, 90vw); display: flex; flex-direction: column; padding: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px rgba(17, 17, 17, 0.12); }
.history button { border: 0; background: none; text-align: left; border-radius: 9px; padding: 9px 12px; font-size: 13.5px; cursor: pointer; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history button:hover { background: var(--soft); }
.history button.on { font-weight: 700; }
.notice { margin-top: 14px; width: min(100%, 640px); padding: 12px 16px; border-radius: 14px; background: var(--soft); color: var(--ink-2); font-size: 14px; line-height: 1.45; }
.notice a { font-weight: 700; }

/* ---------- results */
.report { margin: 0 auto; max-width: 980px; padding-top: 28px; animation: rise 0.6s ease-out; scroll-margin-top: 12px; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.report-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px 28px; align-items: flex-end; }
.report-head > div:first-child { min-width: 0; flex: 1 1 380px; }
h2 { letter-spacing: -0.035em; font-size: 28px; margin: 0 0 8px; text-wrap: balance; }
#summary { margin: 0; color: var(--ink-2); line-height: 1.5; max-width: 62ch; }
.counts { display: flex; gap: 22px; }
.counts span { display: flex; flex-direction: column; font-size: 12px; color: var(--ink-3); }
.counts b { font-size: 28px; letter-spacing: -0.04em; color: var(--ink); font-variant-numeric: tabular-nums; }

.globe { position: relative; isolation: isolate; width: 100%; aspect-ratio: 1 / 0.78; max-height: 760px; margin-top: 8px; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.globe.dragging { cursor: grabbing; }
.globe.empty { aspect-ratio: auto; min-height: 160px; cursor: default; }
.people { position: absolute; inset: 0; }
.globe-empty[hidden] { display: none; }
.globe-empty { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--ink-3); font-size: 15px; }

/* a person: round avatar, short name under it */
.pp {
  position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; gap: 6px;
  border: 0; background: none; padding: 0; cursor: pointer; will-change: transform, opacity;
}
.pp .av {
  position: relative; width: 66px; height: 66px; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: rgb(var(--tone) var(--tone) var(--tone)); color: #fff; box-shadow: 0 0 0 3px var(--bg), 0 6px 16px rgba(17, 17, 17, 0.16);
  transition: box-shadow 0.15s;
}
.pp .av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pp .ini { font-size: 17px; font-weight: 700; letter-spacing: 0.02em; }
.pp .nm { font-size: 12.5px; font-weight: 650; white-space: nowrap; color: var(--ink); background: rgba(255, 255, 255, 0.85); padding: 1px 6px; border-radius: 6px; }
.pp.far .nm { opacity: 0; }
.pp[hidden] { display: none !important; }
.pp.employee .av, .pp.direct .av { width: 80px; height: 80px; box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--ink), 0 8px 20px rgba(17, 17, 17, 0.2); }
.pp.employee .ini, .pp.direct .ini { font-size: 20px; }
.pp.contact .av { width: 54px; height: 54px; }
.pp.contact .ini { font-size: 14px; }
.pp.solo .nm { font-weight: 600; }
.pp.hr .av::after { content: "HR"; position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%); font-size: 9px; font-weight: 800; letter-spacing: 0.05em; background: var(--ink); color: #fff; border-radius: 4px; padding: 1px 4px; }
.pp.rel .av { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--ok), 0 10px 24px rgba(31, 157, 87, 0.28); }
.pp.rel .nm { color: var(--ok); }
.pp:hover .av, .pp.on .av { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--ink), 0 12px 26px rgba(17, 17, 17, 0.26); }
.pp:focus-visible { outline: none; }
.pp:focus-visible .av { box-shadow: 0 0 0 3px var(--bg), 0 0 0 6px var(--ink); }

.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-top: 6px; font-size: 12.5px; color: var(--ink-2); }
.legend .ghost { margin-left: auto; min-height: 40px; padding: 0 20px; font-size: 13.5px; }
.k { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 7px; vertical-align: -2px; background: #9a9a95; }
.k.contact { background: #6d6d68; box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--ink); }
.k.pair { width: 10px; height: 10px; margin-right: 0; background: var(--ink); }
.k.pair.b { margin: 0 8px 0 2px; background: #9a9a95; }

/* card for the chosen person */
.detail {
  position: absolute; z-index: 1200; left: 0; top: 0; width: min(330px, calc(100% - 16px));
  background: var(--bg); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px;
  box-shadow: 0 22px 50px rgba(17, 17, 17, 0.16); cursor: default; will-change: transform;
}
.detail::after { content: ""; position: absolute; left: var(--tip, 50%); bottom: -7px; width: 12px; height: 12px; background: var(--bg); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: translateX(-50%) rotate(45deg); }
.detail.below::after { bottom: auto; top: -7px; transform: translateX(-50%) rotate(225deg); }
.detail .d-head { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 12px; }
.detail .d-face { width: 52px; height: 52px; margin: 0; }
.detail .d-head > div { min-width: 0; }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } }
.d-close { position: absolute; top: 10px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; font-size: 22px; cursor: pointer; color: var(--ink-3); }
.d-close:hover { background: var(--soft); color: var(--ink); }
.d-face { position: relative; width: 64px; height: 64px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: #8a8a85; color: #fff; margin-bottom: 12px; }
.d-face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.d-face b { font-size: 19px; }
.d-head { display: flex; flex-direction: column; align-items: flex-start; }
.d-head h3 { margin: 6px 0 4px; font-size: 22px; letter-spacing: -0.02em; }
.d-head h3 a { text-decoration: none; }
.d-head p { margin: 0 0 10px; color: var(--ink-2); line-height: 1.45; }
.pill { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); }
.badge { display: inline-block; margin: 0 6px 6px 0; padding: 4px 9px; border-radius: 999px; background: var(--soft); font-size: 12px; color: var(--ink-2); }
.d-say { margin: 12px 0 0; font-size: 14.5px; line-height: 1.5; color: var(--ink); }
.d-label { margin: 16px 0 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); }
.d-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.d-list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--line); }
.d-list li span { grid-column: 1 / -1; grid-row: 2; color: var(--ink-3); font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-list li a { font-size: 13px; white-space: nowrap; }
.d-list button { border: 0; background: none; padding: 0; font-weight: 700; cursor: pointer; text-align: left; }
.d-list button:hover { text-decoration: underline; }
.d-note { color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.d-exp { padding-left: 18px; color: var(--ink-2); font-size: 13.5px; line-height: 1.6; }
.d-src { font-size: 13px; margin: 10px 0 0; }
details summary { cursor: pointer; font-size: 13.5px; font-weight: 600; margin-top: 10px; }
.sources { margin-top: 18px; color: var(--ink-2); font-size: 13.5px; }
.sources p { margin: 6px 0; overflow-wrap: anywhere; }

footer { margin: 44px auto 0; max-width: 980px; display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; justify-content: space-between; color: var(--ink-3); font-size: 12.5px; border-top: 1px solid var(--line); padding-top: 18px; }
footer p { margin: 0; max-width: 60ch; line-height: 1.5; }
.quiet { border: 0; background: none; color: var(--ink-3); text-decoration: underline; cursor: pointer; padding: 4px 0; font-size: 12.5px; }
.quiet:disabled { opacity: 0.5; }

@media (max-width: 640px) {
  header:not(.jobany-site-header) { height: 56px; }
  .hero { min-height: calc(100svh - 72px); justify-content: flex-start; padding-top: 18px; padding-bottom: 24px; }
  .agent-wrap { height: 40vh; min-height: 240px; margin: 0 0 12px; }
  .agent { left: -12%; right: -12%; top: 0; bottom: -34%; }
  .search { border-radius: 18px; }
  .search button { padding: 0 18px; }
  .globe { aspect-ratio: 1 / 1.1; }
  .pp .av { width: 44px; height: 44px; }
  .pp .ini { font-size: 13px; }
  .pp.employee .av, .pp.direct .av { width: 54px; height: 54px; }
  .pp.contact .av { width: 36px; height: 36px; }
  .pp .nm { font-size: 11px; }
  .legend .ghost { margin-left: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .status.busy::before { animation: none; } .report { animation: none; } }
