* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: #f4f6f8;
  color: #1c1f24;
  line-height: 1.45;
}

.container { max-width: 1024px; margin: 0 auto; padding: 16px; }

header {
  background: #1c2733;
  color: #fff;
  padding: 12px 0;
  border-bottom: 3px solid #2563eb;
}
header h1 { margin: 0; font-size: 1.25rem; }
.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.muted { color: #c8d1dc; }
.badges { display: flex; gap: 6px; }
.badge {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  border: 1px solid transparent;
}
.badge-on { background: #14532d; color: #d1fae5; border-color: #166534; }
.badge-off { background: #3a3a3a; color: #cbd5e1; border-color: #4b5563; }

.card {
  background: #fff;
  border-radius: 8px;
  padding: 14px 16px;
  margin: 14px 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.card h2 { margin: 0 0 10px 0; font-size: 1rem; color: #334155; }
.card.error { border-left: 4px solid #dc2626; background: #fff7f7; }
.card.error h2 { color: #991b1b; }

.row { display: flex; gap: 8px; }
input[type=text] {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 1rem;
}
button {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
}
button:hover { background: #1d4ed8; }
button:disabled { background: #9ca3af; cursor: not-allowed; }

.examples { margin-top: 12px; }
.example-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.example {
  background: #eef2ff;
  color: #1e3a8a;
  border: 1px solid #c7d2fe;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  cursor: pointer;
}
.example:hover { background: #e0e7ff; }

pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 12px;
  border-radius: 6px;
  overflow: auto;
  font-size: 0.85rem;
  white-space: pre-wrap;
  word-break: break-word;
}

#answer {
  background: #f8fafc;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.95rem;
}

.table-wrap { overflow: auto; max-height: 480px; border: 1px solid #e2e8f0; border-radius: 6px; }
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
th, td {
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}
thead th {
  background: #f1f5f9;
  position: sticky;
  top: 0;
  z-index: 1;
}
tbody tr:hover { background: #f8fafc; }

details { margin: 6px 0; }
summary { cursor: pointer; user-select: none; padding: 4px 0; color: #334155; }

.hidden { display: none; }
