/* Proxy Hearts: zinc neutrals, one deep-rose accent. Radius rule: cards 16px, inputs 10px, buttons + pills full. */
:root {
  --bg: #f6f6f7; --surface: #ffffff; --surface-2: #f0f0f2; --ink: #18181b; --ink-2: #3f3f46; --muted: #63636b;
  --line: #e4e4e7; --accent: #be2f55; --accent-ink: #ffffff; --accent-soft: #fbe9ee; --ok: #1d7a53; --ok-soft: #e4f4ec;
  --warn: #9a5b0c; --warn-soft: #fbf0df; --danger: #b42318; --shadow: 0 1px 2px rgba(24, 24, 27, .04), 0 8px 24px -12px rgba(24, 24, 27, .12);
  --ease: cubic-bezier(.32, .72, 0, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111113; --surface: #19191c; --surface-2: #222226; --ink: #f4f4f5; --ink-2: #d4d4d8; --muted: #a1a1aa;
    --line: #2e2e33; --accent: #ec5f84; --accent-ink: #1a0a10; --accent-soft: #3a1822; --ok: #4cc493; --ok-soft: #13271e;
    --warn: #e7a74a; --warn-soft: #2d2213; --danger: #f97066; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 Geist, ui-sans-serif, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a.link { color: var(--accent); font-weight: 500; } a.link:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; line-height: 1.15; font-weight: 600; }
h1 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); letter-spacing: -.035em; }
.hero h1 { font-size: clamp(2.1rem, 3.9vw, 3.2rem); }
h2 { font-size: 1.35rem; } h3 { font-size: 1rem; }
p { margin: 0; }
.mono { font-family: "Geist Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .small { font-size: 13px; } .xs { font-size: 12px; }
i.ph, i.ph-fill { line-height: 1; }

/* nav */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.nav-inner { max-width: 1180px; margin: 0 auto; height: 64px; padding: 0 20px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.02em; font-size: 17px; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 16px; }
.nav-links { display: flex; gap: 22px; flex: 1; }
.nav-links a { color: var(--muted); font-weight: 500; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; transition: color .2s; }
.nav-links a:hover, .nav-links a.on { color: var(--ink); }
.count { background: var(--accent); color: var(--accent-ink); border-radius: 99px; font-size: 11px; font-weight: 600; padding: 0 7px; line-height: 18px; }
.count:empty { display: none; }
.nav-auth { display: flex; gap: 10px; align-items: center; }
.nav-toggle { display: none; }
@media (max-width: 860px) {
  .nav-inner { gap: 12px; }
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 20px 16px; }
  .nav-links.open { display: flex; } .nav-links a { padding: 12px 0; font-size: 16px; }
  .nav-toggle { display: grid; margin-left: auto; background: none; border: 0; color: var(--ink); font-size: 22px; padding: 6px; cursor: pointer; }
  .nav-auth .btn-ghost { display: none; }
}

main { max-width: 1180px; margin: 0 auto; padding: 36px 20px 72px; min-height: 70dvh; outline: none; }
.foot { max-width: 1180px; margin: 0 auto; padding: 24px 20px 48px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; border: 0; border-radius: 999px; padding: 11px 20px; font: 600 14px Geist, sans-serif; cursor: pointer; background: var(--accent); color: var(--accent-ink); transition: transform .15s var(--ease), background .2s, opacity .2s; }
.btn:hover { filter: brightness(1.05); } .btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { background: var(--surface-2); filter: none; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn .ico { width: 26px; height: 26px; margin-right: -10px; border-radius: 99px; background: color-mix(in srgb, var(--accent-ink) 18%, transparent); display: grid; place-items: center; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.stack { display: grid; gap: 16px; } .stack-lg { display: grid; gap: 28px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; } .between { justify-content: space-between; }
.section { margin-top: 44px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }

/* pills */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: 12px; font-weight: 500; white-space: nowrap; max-width: 100%; }
.pill.wrap { white-space: normal; border-radius: 12px; }
.pill.accent { background: var(--accent-soft); color: var(--accent); } .pill.ok { background: var(--ok-soft); color: var(--ok); } .pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.danger { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.4s var(--ease) infinite; }
@keyframes pulse { 50% { opacity: .25; } }

/* avatars */
.av { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--surface-2); color: var(--muted); display: grid; place-items: center; font-weight: 600; font-size: 14px; flex: none; }
.av.xl { width: 104px; height: 104px; font-size: 30px; } .av.lg { width: 64px; height: 64px; font-size: 20px; } .av.sm { width: 32px; height: 32px; font-size: 12px; }
.av-pair { display: flex; } .av-pair .av + .av { margin-left: -10px; box-shadow: 0 0 0 2px var(--surface); }

/* hero */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; padding: 8px 0 12px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p.lede { font-size: 17px; color: var(--muted); max-width: 44ch; margin: 18px 0 26px; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; gap: 32px; } }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.stats > div { background: var(--surface); padding: 18px 20px; }
.stats b { display: block; font-size: 26px; letter-spacing: -.03em; font-weight: 600; }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* people grid */
.people { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.person { display: grid; gap: 12px; padding: 18px; transition: transform .25s var(--ease), border-color .2s; }
.person:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* chat */
.chat { display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 80%; padding: 10px 14px; border-radius: 18px; animation: rise .35s var(--ease); font-size: 14.5px; }
.msg .who { font-size: 11.5px; font-weight: 600; opacity: .72; margin-bottom: 2px; display: flex; gap: 6px; }
.msg.a { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 6px; }
.msg.b { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 6px; }
.typing { align-self: flex-start; display: flex; gap: 4px; padding: 12px 14px; background: var(--surface-2); border-radius: 18px; }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: pulse 1s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; } .typing span:nth-child(3) { animation-delay: .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .msg, .person, .live-dot, .typing span { animation: none !important; transition: none !important; } }

/* judge */
.score-big { font-size: 56px; font-weight: 600; letter-spacing: -.04em; line-height: 1; color: var(--accent); }
.dims { display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; font-size: 14px; align-items: center; }
.dim-bar { grid-column: 1 / -1; height: 3px; border-radius: 3px; background: var(--accent); margin-top: -6px; transform-origin: left; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
@media (max-width: 960px) { .split { grid-template-columns: 1fr; } }
.sticky { position: sticky; top: 84px; }

/* traits */
.traits { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.trait { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: grid; gap: 6px; }
.trait b { font-weight: 600; } .trait .ev { color: var(--muted); font-size: 13.5px; }
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.bento > * { grid-column: span 4; } .bento .w8 { grid-column: span 8; } .bento .w6 { grid-column: span 6; } .bento .w12 { grid-column: span 12; }
@media (max-width: 860px) { .bento > *, .bento .w8, .bento .w6 { grid-column: span 12; } }
.tint { background: var(--accent-soft); border-color: transparent; }
ul.clean { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; }

/* tables */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12.5px; padding: 0 10px 10px; }
.table td { padding: 12px 10px; border-top: 1px solid var(--line); vertical-align: middle; }
.table tr.click { cursor: pointer; } .table tr.click:hover td { background: var(--surface-2); }
.rank-n { font-weight: 600; font-size: 15px; width: 36px; color: var(--muted); }
.scroll-x { overflow-x: auto; }

/* forms */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field .help { font-size: 12.5px; color: var(--muted); }
.field .err { font-size: 12.5px; color: var(--danger); min-height: 0; }
.field.bad input, .field.bad select { box-shadow: inset 0 0 0 1px var(--danger); }
input, select { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 0; box-shadow: inset 0 0 0 1px var(--line); border-radius: 10px; padding: 11px 13px; transition: box-shadow .2s; }
input:focus, select:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } @media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }
.form-err { color: var(--danger); font-size: 14px; }
.auth-wrap { max-width: 560px; margin: 0 auto; }

/* pipeline */
.steps { display: grid; gap: 0; }
.step { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 10px 0; align-items: start; }
.step .dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-size: 14px; }
.step.done .dot { background: var(--ok-soft); color: var(--ok); } .step.now .dot { background: var(--accent-soft); color: var(--accent); }
.step.fail .dot { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.spin { animation: spin 1s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } }

/* skeleton */
.sk { background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: sk 1.3s infinite; border-radius: 10px; }
@keyframes sk { to { background-position: -200% 0; } }

details.raw summary { cursor: pointer; color: var(--muted); font-size: 14px; }
pre { white-space: pre-wrap; word-break: break-word; font: 12px/1.5 "Geist Mono", monospace; background: var(--surface-2); border-radius: 12px; padding: 14px; max-height: 420px; overflow: auto; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: 14px; opacity: 0; pointer-events: none; transition: all .3s var(--ease); z-index: 50; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); display: grid; gap: 12px; justify-items: center; }
.empty i { font-size: 32px; color: var(--accent); }
.how { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.how > div { grid-column: span 6; } .how > .w4 { grid-column: span 4; } .how > .w8 { grid-column: span 8; }
@media (max-width: 860px) { .how > div, .how > .w4, .how > .w8 { grid-column: span 12; } }
.how .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 20px; margin-bottom: 12px; }
