/* ELI / knowledge-spreadsheet grid (design/design.md §5) */

.eli-app {
  padding: 12px 20px;
}

.site-hero {
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.ks-toolbar {
  margin-bottom: 8px;
}

.ks-toolbar button {
  margin-right: 8px;
}

.ks-template-editor {
  display: inline-block;
  vertical-align: middle;
  font-size: 0.8em;
  opacity: 0.7;
}

.ks-template-editor summary {
  cursor: pointer;
  display: inline;
}

.ks-template-input {
  display: block;
  margin-top: 4px;
  width: 480px;
  max-width: 90vw;
  height: 3em;
  font: inherit;
  font-size: 0.95em;
}

.ks-table {
  border-collapse: collapse;
  width: 100%;
}

.ks-table th,
.ks-table td {
  border: 1px solid #ccc;
  padding: 6px 8px;
  vertical-align: top;
  text-align: left;
}

.ks-col-header,
.ks-row-header {
  background: #f5f5f5;
  min-width: 140px;
}

.ks-header-icon {
  font-size: 1.2em;
}

.ks-col-header input,
.ks-row-header input {
  width: 100%;
  border: none;
  background: transparent;
  font-weight: bold;
}

.ks-header-model {
  font-size: 0.75em;
  font-weight: normal;
  opacity: 0.6;
}

.ks-header-actions {
  font-size: 0.8em;
  opacity: 0.6;
}

.ks-header-actions a {
  margin-right: 6px;
  cursor: pointer;
}

.ks-cell {
  max-width: 320px;
  cursor: pointer;
}

/* Cell values are rendered markdown (hyperphor.way.markdown) -- tighten its
   default block margins for a table cell, same pattern as okc's .log-md. */
.ks-cell p {
  margin: 0 0 0.25em 0;
}

.ks-cell p:last-child {
  margin-bottom: 0;
}

.ks-cell ul,
.ks-cell ol {
  margin: 0 0 0.25em 0;
  padding-left: 1.2em;
}

.ks-cell.ks-empty {
  color: #999;
  font-style: italic;
}

.ks-cell.ks-stale {
  opacity: 0.5;
}

.ks-cell.ks-error {
  color: #b00020;
}

.ks-cell.ks-pending .ks-spinner {
  display: inline-block;
  animation: ks-spin 1s linear infinite;
}

@keyframes ks-spin {
  from { opacity: 0.3; }
  50%  { opacity: 1; }
  to   { opacity: 0.3; }
}
