/* /infinigram/ page styling */

#ig-app {
  max-width: 760px;
  margin: 2em auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.95rem;
}

.ig-status {
  padding: 10px 14px;
  border-radius: 6px;
  background: #f0f4f8;
  color: #334155;
  border: 1px solid #cbd5e1;
  margin-bottom: 16px;
  font-size: 0.9rem;
}
.ig-status[data-kind="loading"] { background: #fef9c3; color: #713f12; border-color: #facc15; }
.ig-status[data-kind="ready"]   { background: #ecfdf5; color: #065f46; border-color: #6ee7b7; }
.ig-status[data-kind="error"]   { background: #fef2f2; color: #991b1b; border-color: #fca5a5; }

#ig-load {
  padding: 10px 24px;
  background: #4f46e5;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
#ig-load:hover:not(:disabled) { background: #4338ca; }
#ig-load:disabled { opacity: 0.5; cursor: not-allowed; }

#ig-input {
  width: 100%;
  min-height: 90px;
  padding: 10px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.95rem;
  line-height: 1.4;
  resize: vertical;
}
#ig-input:focus { outline: none; border-color: #6366f1; }

.ig-section {
  margin-top: 18px;
}
.ig-section h3 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #475569;
  margin: 0 0 6px;
}

.ig-match {
  padding: 10px 14px;
  background: #fafafa;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.88rem;
  line-height: 1.5;
  word-break: break-word;
}
.ig-match-lead {
  color: #475569;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}
.ig-match-text {
  background: #fef3c7;
  border-radius: 2px;
  padding: 0 2px;
}
.ig-trunc {
  color: #94a3b8;
  text-decoration: line-through;
  text-decoration-color: #cbd5e1;
}

.ig-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.ig-table th {
  text-align: left;
  font-weight: 600;
  color: #475569;
  padding: 4px 8px;
  border-bottom: 1px solid #e2e8f0;
}
.ig-table td {
  padding: 4px 8px;
  border-bottom: 1px solid #f1f5f9;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.ig-table tr:hover td { background: #f8fafc; }
.ig-cont-char code {
  background: #eef2ff;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.95em;
}
.ig-cont-byte { color: #94a3b8; }
.ig-cont-count { text-align: right; color: #475569; }
.ig-cont-prob { position: relative; min-width: 90px; }
.ig-bar {
  display: inline-block;
  height: 6px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  border-radius: 3px;
  margin-left: 6px;
  vertical-align: middle;
  max-width: 60px;
}

.ig-empty {
  color: #94a3b8;
  font-style: italic;
  padding: 6px 0;
}

#ig-examples {
  list-style: none;
  padding: 0;
  margin: 0;
}
#ig-examples li {
  padding: 6px 10px;
  background: #fafafa;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  margin-bottom: 4px;
  font-size: 0.78rem;
  line-height: 1.4;
  overflow-x: auto;
  white-space: nowrap;
}
#ig-examples code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: #475569;
}
#ig-examples mark {
  background: #fef3c7;
  color: #713f12;
  padding: 0 2px;
  border-radius: 2px;
}

.ig-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 14px 0 10px;
  flex-wrap: wrap;
}
.ig-controls label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: #475569;
}
#ig-temperature {
  width: 120px;
}
#ig-temperature-value {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: #475569;
  min-width: 2.5em;
}
#ig-generate, #ig-stop {
  padding: 6px 14px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  background: white;
  font-size: 0.85rem;
  cursor: pointer;
  font-weight: 500;
}
#ig-generate:hover { background: #f1f5f9; }
#ig-stop {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fca5a5;
}

#ig-output {
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  min-height: 60px;
  white-space: pre-wrap;
  word-break: break-word;
  color: #334155;
}
