/* doc-01 共享样式 —— 浅色主题 */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: #1f2937;
  background: #f8fafc;
  padding: 24px 32px;
  max-width: 1200px;
  margin: 0 auto;
}

h1, h2, h3 {
  color: #0f172a;
  font-weight: 600;
  margin: 16px 0 12px;
}

h1 { font-size: 24px; }
h2 { font-size: 18px; margin-top: 24px; }
h3 { font-size: 16px; margin-top: 18px; }

p { margin: 8px 0; color: #334155; }

a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

.demo-nav {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 24px;
}

.demo-nav ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.demo-nav a {
  display: block;
  padding: 8px 12px;
  background: #f1f5f9;
  border-radius: 4px;
  font-size: 13px;
}

.demo-nav a:hover { background: #e0e7ff; }

.panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px 20px;
  margin: 12px 0;
}

.panel-title {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.console {
  background: #0f172a;
  color: #cbd5e1;
  font-family: "JetBrains Mono", Consolas, "Courier New", monospace;
  font-size: 12px;
  padding: 12px 16px;
  border-radius: 6px;
  max-height: 280px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.console .key { color: #f59e0b; }
.console .str { color: #10b981; }
.console .num { color: #60a5fa; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th, td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #e2e8f0;
}

th {
  background: #f1f5f9;
  font-weight: 600;
  color: #475569;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

tbody tr:hover { background: #f8fafc; }

.controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin: 12px 0;
}

button {
  padding: 6px 14px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}

button:hover { background: #1d4ed8; }
button:disabled { background: #94a3b8; cursor: not-allowed; }

select, input[type="number"] {
  padding: 5px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
}

svg { display: block; }

.legend {
  font-size: 12px;
  color: #64748b;
  margin-top: 8px;
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  background: #e0e7ff;
  color: #3730a3;
  margin-right: 4px;
}

.tag.cyan { background: #cffafe; color: #155e75; }
.tag.green { background: #d1fae5; color: #065f46; }
.tag.amber { background: #fef3c7; color: #92400e; }
.tag.red { background: #fee2e2; color: #991b1b; }

.note {
  background: #fffbeb;
  border-left: 3px solid #f59e0b;
  padding: 10px 14px;
  margin: 12px 0;
  font-size: 13px;
  color: #78350f;
  border-radius: 0 4px 4px 0;
}