/* Letter-Grid Lab — research + play + benchmark */
.lgl-shell {
  max-width: min(1180px, 100%);
  margin: 0 auto;
  padding: 8px 12px 40px;
  color: var(--ink, #e6edf3);
}
.lgl-hero h2 {
  margin: 0 0 4px;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
.lgl-hero p {
  margin: 0 0 10px;
  font-size: 0.86rem;
  color: var(--muted, #8b9bb0);
  line-height: 1.4;
  max-width: 70ch;
}
.lgl-hero b {
  color: #64d2ff;
}
.lgl-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
}
.lgl-tabs button {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: #8b9bb0;
  border-radius: 8px;
  padding: 7px 14px;
  font: 650 0.8rem/1.2 ui-sans-serif, system-ui, sans-serif;
  cursor: pointer;
}
.lgl-tabs button.on {
  color: #fff;
  background: rgba(10, 132, 255, 0.22);
  border-color: rgba(10, 132, 255, 0.45);
}
.lgl-pane {
  display: none;
}
.lgl-pane.is-on {
  display: block;
}
.lgl-research-grid,
.lgl-bench-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 860px) {
  .lgl-research-grid,
  .lgl-bench-grid {
    grid-template-columns: 1fr;
  }
}
.lgl-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.18);
}
.lgl-card--wide {
  grid-column: 1 / -1;
}
.lgl-card h3 {
  margin: 0 0 8px;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #a8b3c0;
}
.lgl-hint {
  margin: 0 0 8px;
  font-size: 0.72rem;
  color: #8b9bb0;
}
.lgl-flow-canvas {
  width: 100%;
  height: 160px;
  display: block;
  border-radius: 8px;
  background: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.lgl-word-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.lgl-word-actions button {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #e6edf3;
  border-radius: 6px;
  padding: 5px 10px;
  font: 600 0.7rem/1.2 ui-sans-serif, system-ui, sans-serif;
  cursor: pointer;
}
.lgl-word-actions button.primary {
  background: rgba(10, 132, 255, 0.28);
  border-color: rgba(10, 132, 255, 0.55);
}
.lgl-lang {
  font-size: 0.72rem;
  color: #8b9bb0;
  display: flex;
  align-items: center;
  gap: 4px;
}
.lgl-lang input {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.28);
  color: #e6edf3;
  border-radius: 4px;
  padding: 3px 6px;
  font: 600 0.72rem/1 ui-monospace, Menlo, monospace;
  width: 3rem;
}
.lgl-research-meta {
  font: 600 0.65rem/1.3 ui-monospace, Menlo, monospace;
  color: #8b9bb0;
}
.lgl-spark {
  display: block;
  width: 72px;
  height: 22px;
  vertical-align: middle;
}
.lgl-pat {
  max-width: 6rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lgl-word-table th[data-sort]:hover {
  color: #58a6ff;
}
.lgl-flow-meta {
  margin-top: 6px;
  font: 600 0.68rem/1.35 ui-monospace, Menlo, monospace;
  color: #8b9bb0;
  word-break: break-all;
}
.lgl-sort-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}
.lgl-sort-bar button,
.lgl-bench-actions button,
.lgl-xref-bar button,
.lgl-search-row button {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #e6edf3;
  border-radius: 6px;
  padding: 4px 8px;
  font: 600 0.68rem/1.2 ui-sans-serif, system-ui, sans-serif;
  cursor: pointer;
}
.lgl-sort-bar button.on,
.lgl-bench-actions button.primary,
.lgl-xref-bar button.primary,
.lgl-search-row button.primary {
  background: rgba(10, 132, 255, 0.28);
  border-color: rgba(10, 132, 255, 0.55);
}
.lgl-word-table-wrap,
.lgl-ledger-wrap {
  max-height: 280px;
  overflow: auto;
}
.lgl-word-table,
.lgl-ledger {
  width: 100%;
  border-collapse: collapse;
  font: 600 0.72rem/1.3 ui-monospace, Menlo, monospace;
}
.lgl-word-table th,
.lgl-ledger th,
.lgl-word-table td,
.lgl-ledger td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 4px 6px;
  text-align: left;
}
.lgl-word-table th,
.lgl-ledger th {
  color: #8b9bb0;
  position: sticky;
  top: 0;
  background: #12161c;
}
.lgl-word-table .num,
.lgl-ledger .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.lgl-word-table .mono,
.lgl-ledger .mono {
  font-size: 0.65rem;
  color: #a8b3c0;
}
.lgl-word-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: #64d2ff;
  font: inherit;
  cursor: pointer;
  padding: 0;
}
.lgl-xref-bar,
.lgl-search-row,
.lgl-bench-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.lgl-xref-bar input,
.lgl-search-row input,
.lgl-bench-form input,
.lgl-bench-form select,
.lgl-search-row select {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.28);
  color: #e6edf3;
  border-radius: 6px;
  padding: 5px 8px;
  font: 600 0.78rem/1.2 ui-monospace, Menlo, monospace;
}
.lgl-xref-bar input {
  width: 2.5rem;
  text-align: center;
  text-transform: uppercase;
}
.lgl-search-row input {
  flex: 1;
  min-width: 140px;
}
.lgl-xref-out,
.lgl-bench-status {
  margin: 0;
  font: 600 0.7rem/1.4 ui-monospace, Menlo, monospace;
  color: #a8b3c0;
  white-space: pre-wrap;
  max-height: 220px;
  overflow: auto;
}
.lgl-search-hits {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 240px;
  overflow: auto;
}
.lgl-hit {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  font-size: 0.78rem;
}
.lgl-hit:hover {
  border-color: rgba(10, 132, 255, 0.4);
}
.lgl-hit b {
  color: #0a84ff;
  margin-right: 8px;
}
.lgl-hit p {
  margin: 4px 0 0;
  color: #c5d0dc;
  line-height: 1.35;
}
.lgl-bench-form label {
  font-size: 0.72rem;
  color: #a8b3c0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.lgl-bench-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}
.lgl-check {
  gap: 4px !important;
}
/* when lab embeds letter-grid, tighten hero duplication */
.lgl-play-mount .dlg-hero h2 {
  font-size: 1.05rem;
}
