/* LIC-Muse site shared styles (light theme) */
:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --border: #e5e7eb;
  --text: #1f2937;
  --text-2: #6b7280;
  --brand: #4f46e5;
  --brand-2: #7c3aed;
  --brand-soft: #eef2ff;
  --code-bg: #f3f4f6;
  --ok: #059669;
  --warn: #d97706;
  --radius: 12px;
  --mono: "Cascadia Code", "JetBrains Mono", Consolas, "Courier New", monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- top nav ---------- */
.topnav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 28px;
  padding: 0 28px; height: 60px;
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topnav .logo {
  font-family: var(--mono); font-weight: 700; font-size: 20px; letter-spacing: .5px;
}
.topnav .logo .lic { color: var(--brand); }
.topnav .logo .muse { color: var(--brand-2); }
.topnav .links { display: flex; gap: 22px; margin-left: auto; font-size: 15px; }
.topnav .links a { color: var(--text-2); }
.topnav .links a:hover { color: var(--brand); text-decoration: none; }
.topnav .links a.active { color: var(--brand); font-weight: 600; }
.nav-toggle { display: none; }

/* ---------- hero ---------- */
.hero {
  padding: 72px 28px 56px;
  background: linear-gradient(160deg, #eef2ff 0%, #faf5ff 55%, #f7f8fa 100%);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.hero .banner {
  font-family: var(--mono);
  font-size: clamp(8px, 2.1vw, 15px);
  line-height: 1.15;
  white-space: pre;
  display: inline-block;
  color: var(--brand);
  margin-bottom: 10px;
}
.hero .banner .muse { color: var(--brand-2); }
.hero h1 { font-size: clamp(26px, 4vw, 40px); margin: 14px 0 10px; }
.hero .tagline { color: var(--text-2); font-size: 17px; max-width: 760px; margin: 0 auto 26px; }
.hero .cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 11px 26px; border-radius: 10px;
  font-size: 15px; font-weight: 600; border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: #4338ca; text-decoration: none; }
.btn-ghost { background: var(--surface); color: var(--brand); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--brand); text-decoration: none; }
.chips { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.chip {
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 5px 16px; font-size: 13.5px; color: var(--text-2);
}
.chip b { color: var(--text); }

/* ---------- layout ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 40px 28px 80px; }
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--text-2); font-size: 14.5px; }
.card .icon { font-size: 26px; margin-bottom: 10px; }

.section-title { font-size: 26px; margin: 48px 0 6px; }
.section-sub { color: var(--text-2); margin: 0 0 22px; }

/* ---------- docs layout ---------- */
.docs-layout { display: grid; grid-template-columns: 240px 1fr; gap: 36px; align-items: start; }
@media (max-width: 900px) { .docs-layout { grid-template-columns: 1fr; } .docs-side { position: static !important; } }
.docs-side {
  position: sticky; top: 84px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
}
.docs-side .side-title { font-size: 13px; color: var(--text-2); text-transform: uppercase; letter-spacing: 1px; margin: 0 0 10px; }
.docs-side a { display: block; padding: 7px 10px; border-radius: 8px; color: var(--text-2); font-size: 14.5px; }
.docs-side a:hover { background: var(--brand-soft); color: var(--brand); text-decoration: none; }
.docs-side a.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.docs-content { min-width: 0; }
.docs-content section { margin-bottom: 44px; }
.docs-content h2 { font-size: 23px; margin: 0 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.docs-content h3 { font-size: 17.5px; margin: 24px 0 8px; }
.docs-content p, .docs-content li { font-size: 15px; }
.docs-content ul, .docs-content ol { padding-left: 22px; }

/* ---------- tables & code ---------- */
table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14px; background: var(--surface); }
th, td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; vertical-align: top; }
th { background: #f9fafb; font-weight: 600; }
td code, p code, li code { background: var(--code-bg); border-radius: 5px; padding: 1px 6px; font-size: 13px; font-family: var(--mono); }
pre {
  background: #1f2937; color: #e5e7eb; border-radius: 10px;
  padding: 16px 18px; overflow-x: auto; font-size: 13.5px; line-height: 1.6;
  font-family: var(--mono);
}
pre .c { color: #9ca3af; }
pre .s { color: #a5d6ff; }
.note {
  border-left: 4px solid var(--brand); background: var(--brand-soft);
  padding: 12px 16px; border-radius: 0 10px 10px 0; margin: 16px 0; font-size: 14.5px;
}
.note.warn { border-color: var(--warn); background: #fffbeb; }
.note.ok { border-color: var(--ok); background: #ecfdf5; }

/* ---------- console ---------- */
.console-grid { display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: start; }
@media (max-width: 980px) { .console-grid { grid-template-columns: 1fr; } }
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
}
.panel h3 { margin: 0 0 14px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
label.field { display: block; font-size: 13px; color: var(--text-2); margin: 12px 0 4px; }
input[type="text"], input[type="number"], input[type="password"], select, textarea {
  width: 100%; padding: 8px 11px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; font-family: inherit; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
textarea { resize: vertical; min-height: 70px; font-family: var(--mono); font-size: 13px; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }
.checkline { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-top: 12px; }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tabs button {
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  padding: 7px 18px; border-radius: 999px; font-size: 14px; cursor: pointer;
}
.tabs button.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.chat-log {
  border: 1px solid var(--border); border-radius: 10px; background: #fafafa;
  padding: 14px; min-height: 220px; max-height: 420px; overflow-y: auto; font-size: 14.5px;
}
.msg { margin-bottom: 14px; }
.msg .who { font-size: 12px; color: var(--text-2); margin-bottom: 3px; }
.msg .bubble {
  display: inline-block; padding: 9px 13px; border-radius: 10px; max-width: 92%;
  white-space: pre-wrap; word-break: break-word;
}
.msg.user .bubble { background: var(--brand); color: #fff; border-bottom-right-radius: 2px; }
.msg.assistant .bubble { background: #fff; border: 1px solid var(--border); border-bottom-left-radius: 2px; }
.msg.system .bubble { background: #f3f4f6; color: var(--text-2); font-size: 13px; }
.status-line { font-size: 13px; color: var(--text-2); margin-top: 10px; min-height: 20px; }
.status-line.ok { color: var(--ok); }
.status-line.err { color: #dc2626; }
.status-line.busy { color: var(--warn); }
.kv { font-family: var(--mono); font-size: 12.5px; color: var(--text-2); }
.raw-json {
  margin-top: 12px; background: #1f2937; color: #e5e7eb; border-radius: 10px;
  padding: 14px; font-size: 12.5px; font-family: var(--mono);
  max-height: 300px; overflow: auto; white-space: pre-wrap; word-break: break-all;
}
.hidden { display: none !important; }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--border); padding: 28px;
  text-align: center; color: var(--text-2); font-size: 13.5px; background: var(--surface);
}
.footer .logo { font-family: var(--mono); font-weight: 700; }
.footer .logo .lic { color: var(--brand); }
.footer .logo .muse { color: var(--brand-2); }

/* scroll-spy active state for docs */
.docs-content section:target h2 { color: var(--brand); }
