@font-face { font-family: "Inter"; src: url(/fonts/inter-latin-wght-normal.woff2) format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Inter"; src: url(/fonts/inter-latin-ext-wght-normal.woff2) format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; src: url(/fonts/jetbrains-mono-latin-wght-normal.woff2) format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  --bg: #000; --label: #f5f5f7; --label2: rgba(235,235,245,.62); --label3: rgba(235,235,245,.36); --sep: rgba(255,255,255,.1);
  --fill: rgba(118,118,128,.24); --fill2: rgba(118,118,128,.16);
  --red: #ff453a; --orange: #ff9f0a; --blue: #0a84ff; --purple: #bf5af2; --pink: #ff2d55; --teal: #64d2ff; --green: #30d158;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  --spring: cubic-bezier(.32, .72, 0, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--label); font: 15px/1.4 var(--sans); -webkit-font-smoothing: antialiased; letter-spacing: -.01em; }
body::before { content: ""; position: fixed; inset: -20%; pointer-events: none; z-index: 0;
  background: radial-gradient(40% 40% at 50% 48%, rgba(80,90,130,.22), transparent 70%), radial-gradient(30% 30% at 72% 30%, rgba(255,69,58,.07), transparent 70%); }
button, input { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mono, code { font-family: var(--mono); letter-spacing: 0; }
.glass { background: rgba(30,30,34,.58); -webkit-backdrop-filter: saturate(180%) blur(28px); backdrop-filter: saturate(180%) blur(28px);
  border: .5px solid rgba(255,255,255,.13); border-radius: 22px; box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 20px 60px rgba(0,0,0,.5); }

#graph { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; cursor: grab; touch-action: none; opacity: 1; transition: opacity .6s; }
body.empty #graph { opacity: 0; }

/* brand + language */
.brand { position: fixed; z-index: 10; top: 22px; left: 26px; display: flex; align-items: center; gap: 9px; color: var(--label); text-decoration: none; font: 600 17px var(--display); letter-spacing: -.02em; }
.brand i { width: 9px; height: 9px; border-radius: 50%; background: var(--red); animation: beat 2s var(--spring) infinite; }
@keyframes beat { 0% { box-shadow: 0 0 0 0 rgba(255,69,58,.7); } 80%, 100% { box-shadow: 0 0 0 9px rgba(255,69,58,0); } }
.lang { position: fixed; z-index: 10; top: 18px; right: 22px; border: 0; background: var(--fill2); color: var(--label2); border-radius: 999px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; }
.lang:hover { color: var(--label); background: var(--fill); }

/* hero */
#hero { position: fixed; z-index: 5; left: 50%; top: 31%; transform: translate(-50%, -50%); width: min(820px, 90vw); text-align: center;
  transition: opacity .5s var(--spring), transform .8s var(--spring); }
#hero h1 { font: 700 clamp(40px, 6.4vw, 76px)/1.02 var(--display); letter-spacing: -.045em; margin: 0 0 20px; }
#hero h1 em { font-style: normal; white-space: nowrap; background: linear-gradient(100deg, #ff453a 10%, #ff9f0a 60%, #ffd60a); -webkit-background-clip: text; background-clip: text; color: transparent; }
#hero p { margin: 0 auto; max-width: 560px; color: var(--label2); font-size: 18px; line-height: 1.45; letter-spacing: -.015em; }
body:not(.empty) #hero { opacity: 0; pointer-events: none; transform: translate(-50%, -80%) scale(.96); }

/* search */
#search { position: fixed; z-index: 8; left: 50%; top: 53%; transform: translate(-50%, -50%); width: min(640px, 90vw); height: 62px;
  display: flex; align-items: center; gap: 4px; padding: 0 8px 0 22px; border-radius: 999px;
  background: rgba(44,44,48,.6); -webkit-backdrop-filter: saturate(180%) blur(28px); backdrop-filter: saturate(180%) blur(28px);
  border: .5px solid rgba(255,255,255,.16); box-shadow: 0 20px 60px rgba(0,0,0,.55), 0 0 0 0 rgba(10,132,255,0);
  transition: top .8s var(--spring), width .8s var(--spring), height .8s var(--spring), box-shadow .3s; }
#search:focus-within { box-shadow: 0 20px 60px rgba(0,0,0,.55), 0 0 0 4px rgba(10,132,255,.35); }
body:not(.empty) #search { top: 38px; width: min(520px, calc(100vw - 340px)); height: 48px; }
.glass-ic { width: 20px; height: 20px; color: var(--label3); flex: none; }
#q { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; padding: 0 10px; font-size: 18px; letter-spacing: -.01em; }
body:not(.empty) #q { font-size: 16px; }
#q::placeholder { color: var(--label3); }
.attach, .go { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; border: 0; background: none; color: var(--label2); position: relative; transition: background .2s, transform .2s var(--spring); }
.attach:hover { background: var(--fill2); color: var(--label); }
.attach svg, .go svg { width: 21px; height: 21px; }
.attach input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.go { background: var(--label); color: #000; }
.go:hover { transform: scale(1.06); } .go:active { transform: scale(.94); }
body:not(.empty) .attach, body:not(.empty) .go { width: 36px; height: 36px; }
body:not(.empty) .go svg, body:not(.empty) .attach svg { width: 18px; height: 18px; }
#progress { position: absolute; left: 24px; right: 24px; bottom: 0; height: 2px; border-radius: 2px; overflow: hidden; opacity: 0; transition: opacity .3s; }
#progress::after { content: ""; position: absolute; inset: 0; width: 35%; background: linear-gradient(90deg, transparent, var(--blue), transparent); animation: slide 1.1s linear infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
body.busy #progress { opacity: 1; }

/* examples */
#try { position: fixed; z-index: 6; left: 50%; top: calc(53% + 62px); transform: translateX(-50%); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; width: min(760px, 92vw);
  transition: opacity .4s; }
#try span { color: var(--label3); font-size: 14px; margin-right: 4px; }
#try button { border: 0; background: none; color: var(--label2); font-size: 14.5px; padding: 6px 11px; border-radius: 999px; transition: background .2s, color .2s; }
#try button:hover { background: var(--fill2); color: var(--label); }
#try .mono { font-size: 13px; }
#fine { position: fixed; z-index: 6; left: 0; right: 0; bottom: 26px; text-align: center; margin: 0; color: var(--label3); font-size: 12.5px; transition: opacity .4s; }
body:not(.empty) #try, body:not(.empty) #fine { opacity: 0; pointer-events: none; }

/* status under the compact search */
#status { position: fixed; z-index: 7; left: 50%; top: 72px; transform: translateX(-50%); color: var(--label2); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; transition: opacity .3s; }
body.empty #status, #status:empty { opacity: 0; }

/* summary card */
#summary { position: fixed; z-index: 6; left: 24px; bottom: 24px; width: min(460px, calc(100vw - 48px)); padding: 22px 24px 20px; opacity: 0; transform: translateY(16px);
  transition: opacity .6s var(--spring), transform .8s var(--spring); pointer-events: none; }
body.loaded #summary { opacity: 1; transform: none; pointer-events: auto; }
.s-label { font: 500 14px var(--mono); color: var(--label2); letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-big { font: 700 64px/1 var(--display); letter-spacing: -.045em; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.s-big small { font-size: 22px; font-weight: 600; letter-spacing: -.02em; color: var(--label2); margin-left: 6px; }
.s-line { color: var(--label2); font-size: 15px; }
.s-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 16px; background: var(--sep); border-radius: 14px; overflow: hidden; }
.s-grid.c4 { grid-template-columns: repeat(4, 1fr); }
.s-grid div { background: rgba(30,30,34,.92); padding: 10px 12px; }
.s-grid b { display: block; font: 600 20px var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.s-grid span { font-size: 12px; color: var(--label2); }
.s-grid .hot b { color: var(--red); } .s-grid .ok b { color: var(--green); } .s-grid .teal b { color: var(--teal); }
.s-sev { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; font-size: 13px; color: var(--label2); }
.s-sev span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-right: 6px; box-shadow: 0 0 8px var(--c); }
.s-note { margin-top: 12px; font-size: 11.5px; color: var(--label3); }

/* right sheet */
#sheet { position: fixed; z-index: 6; top: 84px; right: 24px; bottom: 24px; width: 360px; display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; transform: translateX(24px); transition: opacity .6s var(--spring), transform .8s var(--spring); pointer-events: none; }
body.loaded.audited #sheet { opacity: 1; transform: none; pointer-events: auto; }
#sheet h3 { margin: 0; padding: 18px 20px 10px; font: 600 20px var(--display); letter-spacing: -.02em; display: flex; align-items: baseline; gap: 8px; }
#sheet h3 span { color: var(--label3); font-weight: 500; font-size: 17px; }
#findings { overflow: auto; flex: 1; padding-bottom: 8px; }
#findings .none { padding: 0 20px 20px; color: var(--label2); margin: 0; }
.find { display: grid; grid-template-columns: 10px 1fr auto; gap: 1px 12px; align-items: center; width: calc(100% - 16px); margin: 0 8px; text-align: left; background: none; border: 0; border-radius: 14px; padding: 10px 12px; transition: background .15s; }
.find:hover { background: var(--fill2); }
.find i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); grid-row: span 2; }
.find .nm { font: 600 14px var(--mono); letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.find .nm small { color: var(--label3); font-weight: 400; }
.find .sv { font-size: 12px; color: var(--c); font-weight: 600; text-transform: capitalize; }
.find .ti { grid-column: 2 / 4; font-size: 13px; color: var(--label2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#findings::-webkit-scrollbar { width: 0; }

#detail { overflow: auto; flex: 1; padding: 14px 20px 20px; animation: in .45s var(--spring); }
@keyframes in { from { opacity: 0; transform: translateX(18px); } }
#sheet.detail #findings { display: none; }
.back { border: 0; background: none; color: var(--blue); font-size: 15px; padding: 2px 0; margin-bottom: 10px; display: inline-flex; align-items: center; gap: 2px; }
.back svg { width: 18px; height: 18px; }
.dn { font: 600 22px var(--mono); letter-spacing: -.01em; word-break: break-all; }
.dn small { color: var(--label3); font-weight: 400; font-size: 17px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 18px; }
.tags span { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--fill2); color: var(--label2); }
.tags .teal { color: var(--teal); } .tags .warn { color: var(--orange); }
.sec { font-size: 12px; font-weight: 600; color: var(--label3); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 8px; }
.why { display: flex; flex-direction: column; gap: 1px; font: 13px/1.6 var(--mono); letter-spacing: 0; color: var(--label2); margin-bottom: 20px; }
.why span { padding-left: calc(var(--k) * 14px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.why span:last-child { color: var(--label); font-weight: 600; }
.adv { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.adv li { background: var(--fill2); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.adv .sv { font-size: 12px; font-weight: 600; color: var(--c); text-transform: capitalize; }
.adv a { color: var(--label); text-decoration: none; font-size: 14.5px; line-height: 1.35; }
.adv a:hover { color: var(--blue); }
.adv small { font: 11.5px var(--mono); color: var(--label3); letter-spacing: 0; }
.note { font-size: 13.5px; color: var(--orange); margin: 0 0 16px; }
.clean { color: var(--green); font-size: 14.5px; margin: 0; }
.ext { display: inline-block; margin-top: 18px; font-size: 14px; color: var(--blue); text-decoration: none; }

/* modes */
#modes { position: fixed; z-index: 7; left: 50%; bottom: 24px; transform: translate(-50%, 16px); display: flex; padding: 4px; gap: 2px; border-radius: 999px;
  opacity: 0; transition: opacity .6s var(--spring), transform .8s var(--spring); pointer-events: none; }
body.loaded #modes { opacity: 1; transform: translateX(-50%); pointer-events: auto; }
#modes button { border: 0; background: none; color: var(--label2); padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 500; transition: background .25s var(--spring), color .2s; white-space: nowrap; }
#modes button:hover:not(:disabled) { color: var(--label); }
#modes button.on { background: rgba(255,255,255,.92); color: #000; font-weight: 600; }
#modes button:disabled { opacity: .3; cursor: default; }

#tip { position: fixed; z-index: 9; pointer-events: none; padding: 10px 14px; border-radius: 14px; max-width: 340px; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: var(--label2); }
#tip b { font: 600 14px var(--mono); color: var(--label); letter-spacing: 0; }
#tip b small { color: var(--label3); font-weight: 400; }

#toast { position: fixed; z-index: 12; left: 50%; top: 96px; transform: translateX(-50%); padding: 10px 18px; border-radius: 999px; font-size: 14px; color: var(--label); max-width: 90vw; }
body.empty #toast { top: auto; bottom: 70px; }
#toast::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); margin-right: 10px; }

#dropzone { position: fixed; inset: 0; z-index: 20; display: none; place-items: center; background: rgba(0,0,0,.6); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
#dropzone div { border: 1.5px dashed rgba(255,255,255,.4); border-radius: 28px; padding: 64px 90px; font: 600 26px var(--display); letter-spacing: -.02em; }
body.drag #dropzone { display: grid; }

@media (max-width: 1000px) {
  body:not(.empty) #search { width: calc(100vw - 200px); }
  #sheet { display: none; }
  #summary { padding: 16px 18px; bottom: 84px; } .s-big { font-size: 44px; }
  #modes { bottom: 18px; max-width: calc(100vw - 24px); overflow-x: auto; }
  #modes button { padding: 7px 12px; font-size: 13px; }
}
@media (max-width: 640px) {
  .brand { top: 18px; left: 18px; } .brand span { display: none; }
  body:not(.empty) #search { left: auto; right: 64px; transform: translateY(-50%); width: calc(100vw - 150px); }
  #hero { top: 27%; } #hero p { font-size: 16px; }
  #search { top: 50%; } #try { top: calc(50% + 50px); }
  body:not(.empty) .brand { font-size: 0; gap: 0; }
  .s-grid.c4 { grid-template-columns: repeat(2, 1fr); }
  #summary .s-note { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
