* { box-sizing: border-box; }
body {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  margin: 0; padding: 0; background: #f5f7fb; color: #1e2530;
  max-width: 1000px; margin: 0 auto;
}
header {
  padding: 2rem 1.5rem 1.25rem;
  border-bottom: 1px solid #e3e7ee;
  background: linear-gradient(180deg, #fff 0%, #f5f7fb 100%);
}
header h1 { margin: 0; font-size: 1.8rem; color: #0a2540; }
header .tagline { margin: .25rem 0 .75rem; color: #56657a; font-size: .9rem; }
.env-badge {
  display: inline-block; background: #eef4ff; color: #0a2540;
  border-radius: 999px; padding: .15rem .75rem; font-size: .8rem;
}

main { padding: 1.5rem; display: flex; flex-direction: column; gap: 1.5rem; }

.card {
  background: #fff; border: 1px solid #e3e7ee; border-radius: 10px;
  padding: 1.25rem 1.25rem 1rem;
}
.card h2 { margin: 0 0 .75rem; font-size: 1.1rem; color: #0a2540; }

label { display: block; font-size: .85rem; color: #56657a; margin-top: .5rem; }
label.inline { display: inline-block; margin-right: 1rem; }
textarea, input {
  width: 100%; padding: .5rem; border: 1px solid #c9d0db;
  border-radius: 6px; font: inherit; background: #fff;
}
textarea { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: .5rem; margin-top: .5rem;
}
.row { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .75rem; align-items: center; }
button {
  background: #0a2540; color: #fff; border: 0; border-radius: 6px;
  padding: .5rem .9rem; cursor: pointer; font: inherit;
}
button:hover { background: #132e4f; }
button.primary { background: #1a75d2; }
button.primary:hover { background: #2186e5; }
button:disabled { opacity: .5; cursor: wait; }

.status { color: #56657a; font-size: .85rem; }

.output {
  background: #0f1928; color: #d8e0ec; padding: .75rem;
  border-radius: 6px; font-size: .8rem; margin-top: .75rem;
  overflow: auto; max-height: 400px; white-space: pre-wrap;
}
.explain {
  margin-top: .75rem; padding: .75rem 1rem; background: #f0f7ff;
  border-left: 3px solid #1a75d2; border-radius: 6px;
  white-space: pre-wrap; font-size: .9rem; color: #1e2530;
}
.explain:empty { display: none; }

.stock-suggestions {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: .5rem; margin-top: .75rem;
}
.stock-suggestions .s {
  border: 1px solid #d6dce6; border-radius: 6px; padding: .5rem .6rem;
  background: #fafbfd; font-size: .85rem;
}
.stock-suggestions .s b { display: block; color: #0a2540; }
.stock-suggestions .s .smi {
  font-family: ui-monospace, monospace; font-size: .7rem; color: #56657a;
  word-break: break-all; margin: .15rem 0;
}
.stock-suggestions .s .r { color: #3d4c62; font-size: .8rem; }

.lit-results { display: flex; flex-direction: column; gap: .5rem; margin-top: .75rem; }
.lit-results .p {
  border: 1px solid #d6dce6; border-radius: 6px; padding: .6rem .75rem;
  background: #fff;
}
.lit-results .p .t { font-weight: 600; color: #0a2540; font-size: .95rem; }
.lit-results .p .m { font-size: .8rem; color: #56657a; margin: .2rem 0; }
.lit-results .p .tldr { font-size: .85rem; color: #1e2530; margin: .2rem 0; }
.lit-results .p .badge {
  display: inline-block; background: #eef4ff; color: #0a2540;
  border-radius: 999px; padding: 0 .5rem; font-size: .7rem; margin-right: .25rem;
}
