:root {
  --bg: #f7f8fa;
  --paper: #fff;
  --text: #192832;
  --muted: #75818a;
  --line: #e4e9ec;
  --accent: #087f72;
  --accent-light: #e9f5f1;
  --mono: Consolas, "SFMono-Regular", monospace;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    14px/1.6 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
a {
  color: var(--accent);
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #61b5a9;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 238px;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 23px;
  font-weight: 750;
  letter-spacing: -1px;
  color: var(--text);
}
.brand-icon {
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  width: 33px;
  height: 35px;
  text-align: center;
  font-size: 27px;
  line-height: 33px;
}
.version {
  font: 10px var(--mono);
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 3px 5px;
  border-radius: 4px;
  margin-left: auto;
}
.workspace-label,
.repo-heading {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--muted);
}
.workspace-label {
  margin: 47px 10px 12px;
}
.nav-item {
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: center;
  border: 0;
  background: none;
  padding: 11px 13px;
  text-align: left;
  color: #586670;
  font-weight: 550;
  border-radius: 7px;
  margin-bottom: 4px;
}
.nav-item span {
  font-size: 20px;
  width: 20px;
  line-height: 1;
}
.nav-item.active {
  background: var(--accent-light);
  color: var(--accent);
}
.nav-item:hover {
  background: #f1f6f4;
}
.repo-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 38px 10px 12px;
}
.repo-heading button {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 20px;
}
.index-list {
  overflow: auto;
  flex: 1;
}
.index-card {
  border: 1px solid transparent;
  padding: 10px 9px;
  border-radius: 7px;
  display: flex;
  gap: 5px;
  margin: 4px 0;
}
.index-card.selected {
  border-color: #bfdbd3;
  background: #f5faf8;
}
.index-select {
  border: 0;
  background: none;
  text-align: left;
  min-width: 0;
  flex: 1;
  color: var(--text);
}
.index-select strong {
  display: block;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.index-select small {
  font-size: 10px;
  color: var(--muted);
}
.delete-index {
  border: 0;
  background: none;
  color: #89949a;
  font-size: 18px;
}
.sidebar-footer {
  font-size: 11px;
  color: #596a73;
  padding: 18px 8px 0;
  border-top: 1px solid var(--line);
}
.sidebar-footer p {
  font-size: 10px;
  color: var(--muted);
  margin: 5px 0;
}
.online-dot,
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #27a481;
  border-radius: 50%;
  margin-right: 5px;
}
.status-dot {
  background: #a4adb4;
  flex-shrink: 0;
}
main {
  margin-left: 238px;
}
.topbar {
  height: 70px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 42px;
  background: #ffffffc9;
  color: var(--muted);
  font-size: 12px;
}
.topbar span {
  margin: 0 15px;
  color: #bac3c8;
}
.topbar strong {
  font-weight: 500;
  color: var(--text);
}
#search-view,
#evaluation-view {
  padding: 38px 42px 20px;
  max-width: 1600px;
  margin: auto;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  gap: 20px;
}
.eyebrow {
  font: 10px var(--mono);
  letter-spacing: 1.8px;
  color: var(--accent);
  margin: 0 0 9px;
}
h1 {
  font-size: clamp(26px, 3vw, 39px);
  font-weight: 650;
  letter-spacing: -1.6px;
  line-height: 1.2;
  margin: 0 0 10px;
}
.subtitle {
  color: var(--muted);
  margin: 0;
  font-size: 13px;
}
.tag {
  font: 9px var(--mono);
  letter-spacing: 1px;
  color: var(--accent);
  border: 1px solid #c9e1d9;
  border-radius: 20px;
  padding: 7px 11px;
  white-space: nowrap;
}
.investigation-grid {
  display: grid;
  grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
  gap: 27px;
  align-items: start;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 3px 7px #21372e03;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}
h2 {
  font-size: 14px;
  margin: 0;
  font-weight: 650;
  letter-spacing: -0.2px;
}
.step {
  font: 10px var(--mono);
  color: var(--accent);
  background: var(--accent-light);
  border-radius: 5px;
  padding: 4px 6px;
}
label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  margin: 0 0 7px;
}
label .muted {
  font-weight: 400;
  font-size: 10px;
  margin-left: 3px;
}
input,
textarea,
select {
  width: 100%;
  border: 1px solid #dce3e6;
  background: #fff;
  border-radius: 6px;
  padding: 10px 11px;
  color: var(--text);
  font-size: 12px;
}
input::placeholder,
textarea::placeholder {
  color: #94a0a7;
}
textarea {
  resize: vertical;
  min-height: 132px;
  line-height: 1.8;
}
select {
  padding-right: 5px;
}
.input-row {
  display: flex;
  align-items: end;
  gap: 10px;
  margin-top: 13px;
}
.input-row > div {
  flex: 1;
  min-width: 0;
}
.secondary,
.quiet {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 12px;
  background: white;
  color: #52616b;
  font-size: 11px;
  white-space: nowrap;
}
.secondary:hover,
.quiet:hover {
  background: #eff7f4;
}
.input-row > .secondary {
  padding: 10px 13px;
}
.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 15px;
}
.checkbox input {
  width: auto;
}
.or-demo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  font-size: 10px;
  color: var(--muted);
}
.text-button {
  background: none;
  border: 0;
  padding: 3px 0;
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
}
.active-index {
  display: flex;
  align-items: center;
  background: #f7faf9;
  border: 1px solid #e4ede9;
  padding: 11px 10px;
  border-radius: 6px;
  margin-top: 20px;
  gap: 5px;
  min-width: 0;
}
.active-index strong {
  display: block;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.active-index small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.active-index.ready .status-dot {
  background: #27a481;
}
.active-index.indexing .status-dot,
.active-index.queued .status-dot {
  background: #d39b33;
  animation: pulse 1s infinite;
}
.divider {
  border-top: 1px solid var(--line);
  margin: 24px 0;
}
.options {
  margin: 16px 0 20px;
}
.primary {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  border-radius: 6px;
  font-weight: 600;
  font-size: 12px;
}
.primary:hover:enabled {
  background: #096c62;
}
.fine-print {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
  margin: 12px 0 0;
}
.results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 20px;
}
.empty-state {
  border: 1px dashed #d7dfe1;
  border-radius: 12px;
  min-height: 530px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(160deg, #f9fbfb, #f1f6f3);
}
.lens-art {
  width: 85px;
  height: 85px;
  display: grid;
  place-items: center;
  border: 1px solid #d3e5df;
  border-radius: 25px;
  transform: rotate(-9deg);
  background: #eef5f1;
  margin-bottom: 10px;
  box-shadow: 10px 10px 0 #e4ede780;
}
.lens-art span {
  font-size: 65px;
  color: #3a8c78;
  line-height: 1;
  transform: rotate(9deg);
}
.empty-state h3 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.6px;
  margin: 20px 0 0;
}
.empty-state p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.9;
}
.flow {
  display: flex;
  gap: 13px;
  align-items: center;
  margin: 20px 0;
}
.flow span {
  border: 1px solid #dbe5df;
  border-radius: 6px;
  padding: 5px 13px;
  background: #fff;
  font: 10px var(--mono);
  color: #687c72;
}
.flow i {
  color: #a2b4ab;
  font-style: normal;
}
.search-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -7px 0 16px;
}
.metric-pill {
  font: 10px var(--mono);
  border: 1px solid var(--line);
  background: #fff;
  padding: 5px 8px;
  border-radius: 5px;
  color: #65777f;
}
.result-card {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  margin-bottom: 12px;
  overflow: hidden;
}
.result-card summary {
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  list-style: none;
}
.result-card summary::after {
  content: "+";
  margin-left: auto;
  color: var(--muted);
}
.result-card[open] summary::after {
  content: "−";
}
.rank {
  font: 11px var(--mono);
  background: var(--accent-light);
  color: var(--accent);
  padding: 5px 8px;
  border-radius: 5px;
}
.result-name {
  font: 12px var(--mono);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.result-score {
  display: block;
  font: 9px var(--mono);
  color: var(--muted);
  margin-top: 4px;
}
.snippet {
  border-top: 1px solid var(--line);
}
.snippet-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 15px;
  background: #f9fafb;
  font: 10px var(--mono);
  gap: 10px;
}
.snippet pre {
  margin: 0;
  padding: 15px 0;
  background: #192831;
  color: #d7e2e6;
  overflow: auto;
  max-height: 390px;
  font: 11px/1.9 var(--mono);
  tab-size: 4;
}
.code-line {
  display: block;
  white-space: pre;
  padding-right: 15px;
}
.line-number {
  display: inline-block;
  width: 44px;
  user-select: none;
  color: #73838b;
  text-align: right;
  margin-right: 17px;
  padding-right: 9px;
  border-right: 1px solid #3b4951;
}
.code-line mark {
  background: #29544a;
  color: #d8f6e7;
  border-radius: 2px;
}
.evidence {
  padding: 10px 15px;
  color: #73818a;
  font-size: 10px;
}
.evidence strong {
  color: var(--accent);
  font-weight: 500;
}
.bottom-note {
  border-top: 1px solid var(--line);
  margin: 30px 0 0;
  padding: 17px 0;
  color: #88959c;
  font: 10px var(--mono);
}
.bottom-note span {
  color: #576b70;
  font-size: 9px;
  letter-spacing: 1px;
  margin-right: 14px;
}
.notice {
  padding: 12px 18px;
  margin: 20px 42px 0;
  border: 1px solid #edd9b4;
  background: #fff8e9;
  color: #826026;
  border-radius: 7px;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 11px;
}
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 22px;
}
.metric-card {
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.metric-card span {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.metric-card strong {
  font-size: 31px;
  font-weight: 600;
  letter-spacing: -1px;
  display: block;
  margin: 4px 0;
}
.metric-card small {
  font-size: 10px;
  color: var(--accent);
}
.eval-columns {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 20px;
  margin-bottom: 22px;
}
.eval-columns p,
.eval-columns li {
  font-size: 12px;
  color: #6e7c85;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 11px;
}
th {
  font-weight: 500;
  color: #7c898e;
  font-size: 10px;
}
td,
th {
  border-bottom: 1px solid var(--line);
  padding: 11px 10px;
}
td:first-child {
  font-family: var(--mono);
}
.score-track {
  width: 80px;
  background: #edf2f1;
  display: inline-block;
  height: 5px;
  border-radius: 3px;
  margin-right: 9px;
  overflow: hidden;
  vertical-align: middle;
}
.score-fill {
  background: #369e87;
  height: 5px;
  display: block;
}
.score-track.full .score-fill {
  width: 100%;
}
.score-track.half .score-fill {
  width: 50%;
}
.score-track.zero .score-fill {
  width: 0;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 27px;
  max-width: 420px;
  width: 90%;
  color: var(--text);
}
dialog::backdrop {
  background: #16232a66;
}
.dialog-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.dialog-actions .primary {
  width: auto;
  flex: 1;
  justify-content: center;
}
@keyframes pulse {
  50% {
    opacity: 0.3;
  }
}
@media (min-width: 1500px) {
  .investigation-grid {
    grid-template-columns: 420px 1fr;
  }
  .compose {
    padding: 30px;
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 200px;
    padding: 25px 15px;
  }
  main {
    margin-left: 200px;
  }
  #search-view,
  #evaluation-view {
    padding: 28px 25px;
  }
  .topbar {
    padding: 0 25px;
  }
  .page-heading .tag {
    display: none;
  }
  .investigation-grid {
    gap: 18px;
    grid-template-columns: 310px minmax(0, 1fr);
  }
  .compose {
    padding: 19px;
  }
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 850px) {
  .investigation-grid {
    grid-template-columns: 1fr;
  }
  .empty-state {
    min-height: 300px;
  }
  .eval-columns {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 580px) {
  .sidebar {
    position: static;
    width: 100%;
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    font-size: 21px;
  }
  .version {
    margin-left: 5px;
  }
  .workspace-label,
  .repo-heading,
  .sidebar-footer {
    display: none;
  }
  .sidebar nav {
    display: flex;
    margin-top: 15px;
    gap: 7px;
  }
  .nav-item {
    font-size: 11px;
    padding: 7px 8px;
    justify-content: center;
  }
  .nav-item span {
    display: none;
  }
  .index-list {
    max-height: 140px;
    display: flex;
    gap: 7px;
  }
  .index-card {
    min-width: 165px;
    max-width: 210px;
  }
  .index-list > .small {
    display: none;
  }
  main {
    margin-left: 0;
  }
  .topbar {
    height: 50px;
    padding: 0 18px;
  }
  #search-view,
  #evaluation-view {
    padding: 24px 17px;
  }
  .page-heading {
    margin-bottom: 22px;
  }
  h1 {
    letter-spacing: -1px;
  }
  .subtitle {
    font-size: 12px;
  }
  .bottom-note {
    line-height: 2;
  }
  .bottom-note span {
    display: block;
  }
  .notice {
    margin: 15px 17px 0;
  }
  .metrics-grid {
    gap: 9px;
  }
  .metric-card {
    padding: 16px;
  }
  .metric-card strong {
    font-size: 27px;
  }
}
:is(.results-area, .compose, .panel) {
  min-width: 0;
}
#explain-button {
  margin-top: 18px;
}
#explanation {
  margin-top: 14px;
  font-size: 12px;
}
#explanation blockquote {
  margin: 8px 0;
  border-left: 3px solid var(--accent);
  padding: 8px 12px;
  background: var(--accent-light);
  font-family: var(--mono);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
