:root {
  --bg: #0a0c12;
  --surface: #141823;
  --surface2: #1c2130;
  --line: #272d3f;
  --text: #e9ecf3;
  --muted: #8d95ab;
  --accent: #f3b640;
  --accent2: #ff7a59;
  --ok: #39d98a;
  --bad: #ff5c7a;
  --info: #6ea8fe;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--info); }
h2 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
h3.sub { margin: 22px 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.muted { color: var(--muted); }
.small-text { font-size: 14px; margin: 0 0 12px; }
.hidden { display: none !important; }
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 20px; }

/* Hero */
.hero {
  padding: 52px 0 38px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(1100px 480px at 15% -10%, rgba(243, 182, 64, .20), transparent 60%),
    radial-gradient(800px 400px at 95% 0%, rgba(110, 168, 254, .14), transparent 60%);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #1a1200;
  display: grid; place-items: center; font-family: Georgia, serif; font-weight: 700; font-size: 18px;
}
h1 { font-size: clamp(34px, 5.2vw, 58px); line-height: 1.04; letter-spacing: -.025em; margin: 20px 0 14px; font-weight: 800; }
h1 em { font-style: normal; color: var(--accent); }
.lede { max-width: 740px; color: var(--muted); font-size: 17px; margin: 0; }

.search { display: flex; gap: 10px; margin-top: 26px; flex-wrap: wrap; }
.search input {
  flex: 1 1 320px; padding: 14px 16px; font-size: 17px; font-family: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: var(--text); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(243, 182, 64, .22); }
.btn {
  padding: 13px 20px; font-size: 15px; font-weight: 600; font-family: inherit; cursor: pointer;
  background: var(--surface2); border: 1px solid var(--line); border-radius: 12px; color: var(--text);
  transition: background .15s, transform .05s, border-color .15s;
}
.btn:hover { background: #242a3b; border-color: #333a50; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--accent); color: #1a1200; border-color: var(--accent); }
.btn.primary:hover { background: #ffc552; }
.btn.small { padding: 7px 12px; font-size: 13px; border-radius: 9px; }

.seed {
  margin-top: 18px; padding: 10px 14px; border-radius: 10px; font-size: 14px;
  background: rgba(110, 168, 254, .10); border: 1px solid rgba(110, 168, 254, .25); color: #c9dcff;
}
.seed.done { background: rgba(57, 217, 138, .08); border-color: rgba(57, 217, 138, .25); color: #bff3d9; }
.seed.error { background: rgba(255, 92, 122, .10); border-color: rgba(255, 92, 122, .3); color: #ffd0da; }
.seed .mini { height: 4px; background: rgba(255,255,255,.08); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.seed .mini i { display: block; height: 100%; width: 0; background: var(--info); transition: width .4s; }

/* Panels */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-top: 22px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.grid2 > .panel { margin-top: 22px; }

/* Progress */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { background: var(--surface2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; min-width: 118px; flex: 1 1 auto; }
.chip b { display: block; font-family: var(--mono); font-size: 19px; font-weight: 600; }
.chip span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.bar { height: 6px; background: var(--surface2); border-radius: 3px; overflow: hidden; margin: 16px 0 12px; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width .2s; }
.bar.indeterminate i { width: 35%; animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { 0% { margin-left: -35%; } 100% { margin-left: 100%; } }
.log { list-style: none; padding: 0; margin: 0; font-size: 14px; color: var(--muted); max-height: 190px; overflow: auto; }
.log li { padding: 5px 0; border-bottom: 1px dashed var(--line); }
.log li.hit { color: var(--ok); }
.log li.warn { color: var(--accent); }
.log li.err { color: var(--bad); }
.log li time { font-family: var(--mono); font-size: 12px; margin-right: 8px; opacity: .7; }

/* Result */
.verdict { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.verdict .num { font-family: var(--mono); font-size: 68px; font-weight: 600; line-height: 1; color: var(--accent); }
.verdict .num small { font-size: 16px; color: var(--muted); font-family: var(--sans); font-weight: 500; display: block; margin-top: 4px; }
.verdict .text h2 { font-size: 24px; margin-bottom: 6px; }
.verdict .text p { margin: 0; color: var(--muted); }
.verdict.bad .num { color: var(--bad); }
.badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.badge {
  display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  background: var(--surface2); color: var(--muted); border: 1px solid var(--line);
}
.badge.ok { background: rgba(57, 217, 138, .14); color: var(--ok); border-color: rgba(57, 217, 138, .3); }
.badge.bad { background: rgba(255, 92, 122, .14); color: var(--bad); border-color: rgba(255, 92, 122, .3); }
.badge.info { background: rgba(110, 168, 254, .14); color: var(--info); border-color: rgba(110, 168, 254, .3); }
.badge.warn { background: rgba(243, 182, 64, .14); color: var(--accent); border-color: rgba(243, 182, 64, .3); }
.result-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.share { margin-top: 22px; padding: 16px; border: 1px solid #262c3d; border-radius: 14px; background: rgba(255, 255, 255, .025); }
.share-head { display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; margin-bottom: 10px; }
.share-head b { font-size: 15px; }
.share-head span { color: var(--muted); font-size: 13px; }
.share-card { font-family: var(--mono); font-size: 13px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; margin: 0 0 12px; padding: 12px 14px; border-radius: 10px; background: #0f121b; border: 1px solid #262c3d; color: #dfe4f2; }
.share-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn.net { color: inherit; text-decoration: none; display: inline-flex; align-items: center; }
.btn.net[data-net="x"]:hover { border-color: #e7e9ee; color: #fff; }
.btn.net[data-net="whatsapp"]:hover { border-color: #25d366; color: #25d366; }
.btn.net[data-net="telegram"]:hover { border-color: #2aabee; color: #2aabee; }
.btn.net[data-net="facebook"]:hover { border-color: #1877f2; color: #6ea8fe; }
.btn.net[data-net="reddit"]:hover { border-color: #ff4500; color: #ff4500; }
.btn.net[data-net="bluesky"]:hover { border-color: #0085ff; color: #4da3ff; }
.invite-line { margin: 14px 0 0; color: var(--muted); font-size: 14px; }
.linklike { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linklike:hover { color: #ffc552; }
#invite-box { margin-top: 14px; max-width: 740px; }
.callout { margin: 14px 0; padding: 12px 14px; border-radius: 12px; background: rgba(243, 182, 64, .12); border: 1px solid rgba(243, 182, 64, .35); color: #ffd98a; font-size: 14px; line-height: 1.5; }
.result-meta { color: var(--muted); font-size: 14px; margin-top: 10px; }

.chain { list-style: none; padding: 0; margin: 26px 0 0; }
.chain li { display: grid; grid-template-columns: 44px 96px 1fr; gap: 16px; align-items: start; position: relative; padding: 14px 0; }
.chain li + li::before { content: ""; position: absolute; left: 21px; top: -16px; height: 30px; border-left: 2px dashed var(--line); }
.chain li + li::after {
  content: attr(data-edge); position: absolute; left: 34px; top: -10px; font-size: 11px; color: var(--muted);
  font-family: var(--mono); background: var(--surface); padding: 0 6px;
}
.step-no {
  width: 44px; height: 44px; border-radius: 50%; background: var(--surface2); border: 1px solid var(--line);
  display: grid; place-items: center; font-family: var(--mono); font-weight: 600; font-size: 15px;
}
.chain li.target .step-no { background: var(--accent); color: #1a1200; border-color: var(--accent); }
.chain li.start .step-no { border-color: var(--info); color: var(--info); }
.thumb { width: 96px; height: 96px; border-radius: 10px; object-fit: cover; background: var(--surface2); border: 1px solid var(--line); display: block; }
.thumb.empty { display: grid; place-items: center; color: var(--muted); font-size: 26px; font-family: Georgia, serif; }
.step h3 { margin: 0 0 2px; font-size: 19px; line-height: 1.25; }
.step h3 a { color: var(--text); text-decoration: none; }
.step h3 a:hover { color: var(--accent); }
.step .desc { color: var(--muted); font-size: 13px; margin: 0 0 6px; }
.step p.extract { margin: 0; font-size: 14px; color: #c3c9d8; }
.step .src { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-left: 8px; font-weight: 600; }
.step .src.index { color: var(--info); }
.step .src.refs { color: var(--bad); }

/* Stats */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.tile { background: var(--surface2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.tile b { display: block; font-family: var(--mono); font-size: 20px; font-weight: 600; }
.tile span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.hist { display: flex; flex-direction: column; gap: 6px; }
.hist .row { display: grid; grid-template-columns: 28px 1fr 70px; align-items: center; gap: 10px; font-size: 13px; }
.hist .row b { font-family: var(--mono); color: var(--muted); font-weight: 500; }
.hist .row .track { height: 14px; background: var(--surface2); border-radius: 4px; overflow: hidden; }
.hist .row .track i { display: block; height: 100%; background: linear-gradient(90deg, var(--info), var(--accent)); border-radius: 4px; }
.hist .row span { font-family: var(--mono); text-align: right; font-size: 12px; }
.theory { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 14px; }
.theory .big { font-family: var(--mono); font-size: 22px; font-weight: 600; }
.theory .big.ok { color: var(--ok); }
.mt { margin-top: 10px; }
.theory .big.bad { color: var(--bad); }

/* Lookup */
.input {
  width: 100%; padding: 11px 14px; font-size: 15px; font-family: inherit; background: var(--surface2);
  border: 1px solid var(--line); border-radius: 10px; color: var(--text); outline: none;
}
.input:focus { border-color: var(--accent); }
.lookup-list { list-style: none; padding: 0; margin: 10px 0 0; }
.lookup-list li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.lookup-list li:hover { background: var(--surface2); }
.lookup-list li .d { font-family: var(--mono); color: var(--accent); }
.lookup-detail { margin-top: 12px; padding: 12px 14px; background: var(--surface2); border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.lookup-detail .mini-chain { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.lookup-detail .mini-chain a { color: var(--text); text-decoration: none; background: var(--surface); border: 1px solid var(--line); padding: 4px 9px; border-radius: 8px; font-size: 13px; }
.lookup-detail .mini-chain a:hover { border-color: var(--accent); }
.lookup-detail .mini-chain .arr { color: var(--muted); }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table td { padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .t { cursor: pointer; color: var(--text); font-weight: 500; }
.table .t:hover { color: var(--accent); }
.table .d { font-family: var(--mono); text-align: right; white-space: nowrap; }
.table .d.ok { color: var(--ok); } .table .d.bad { color: var(--bad); } .table .d.fail { color: var(--muted); }
.table .m { color: var(--muted); font-size: 12px; white-space: nowrap; text-align: right; }
.empty { color: var(--muted); font-size: 14px; padding: 8px 0; }

.how ol { margin: 0; padding-left: 20px; color: #c3c9d8; font-size: 15px; }
.how li { margin-bottom: 8px; }
.foot { padding: 30px 20px 40px; color: var(--muted); font-size: 13px; }

.error-box { padding: 14px 16px; background: rgba(255, 92, 122, .10); border: 1px solid rgba(255, 92, 122, .3); border-radius: 10px; color: #ffd0da; }
.error-box .sugg { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }

@media (max-width: 820px) {
  .grid2 { grid-template-columns: 1fr; }
  .chain li { grid-template-columns: 36px 64px 1fr; gap: 12px; }
  .chain li + li::before { left: 17px; }
  .chain li + li::after { left: 28px; }
  .step-no { width: 36px; height: 36px; font-size: 13px; }
  .thumb { width: 64px; height: 64px; }
  .verdict .num { font-size: 52px; }
  .hero { padding: 36px 0 28px; }
}

/* Autocomplete under the search box */
.ac-wrap { position: relative; flex: 1 1 320px; display: flex; }
.ac-wrap input { width: 100%; box-sizing: border-box; }
.ac {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30;
  list-style: none; margin: 0; padding: 6px; max-height: 340px; overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .45);
}
.ac li { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.ac li:hover, .ac li.active { background: var(--surface2); }
.ac li b { font-weight: 600; font-size: 15px; }
.ac li span { font-size: 12.5px; color: var(--muted); }

/* "Did you mean" suggestions and error box */
.error-box { font-size: 15px; line-height: 1.5; }
.error-box > b { color: var(--bad); }
.sugg { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sugg .btn { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; }
.sugg .btn small { color: var(--muted); font-weight: 400; font-size: 12px; }

/* Clear (×) button inside the search box */
.ac-wrap input { padding-right: 44px; }
.clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--surface2); color: var(--muted); font-size: 20px; line-height: 1; font-family: inherit;
  display: flex; align-items: center; justify-content: center; padding: 0 0 2px;
  transition: background .15s, color .15s;
}
.clear:hover { background: #2a3146; color: var(--text); }
.clear:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
