/* Diskusi Muse — gaya bersih dan sederhana, tanpa CDN. */
:root {
  --bg: #f6f8f7;
  --paper: #ffffff;
  --ink: #1c2622;
  --muted: #5a6d64;
  --line: #dde7e1;
  --brand: #087f5b;
  --brand-dark: #066649;
  --brand-soft: #e7f4ec;
  --danger: #b3261e;
  --danger-soft: #fdecea;
  --radius: 12px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
h1, h2, h3, p { margin: 0; }
button { font: inherit; cursor: pointer; }
button:disabled { opacity: 0.55; cursor: not-allowed; }
input, textarea, select {
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  width: 100%;
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
  border-color: var(--brand);
}
textarea { resize: vertical; }

.shell { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.site-head { background: #fff; border-bottom: 1px solid var(--line); }
.head-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-block: 18px;
}
.brand h1 { font-size: 24px; letter-spacing: -0.02em; }
.brand p { color: var(--muted); font-size: 13px; margin-top: 2px; }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
  padding-block: 24px 40px;
}
.main-col, .side-col { display: grid; gap: 20px; min-width: 0; }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.card h2 { font-size: 16px; letter-spacing: -0.01em; margin-bottom: 14px; }

.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.field-inline { margin-bottom: 0; max-width: 170px; }
.form-row { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hint { font-size: 12px; color: var(--muted); line-height: 1.7; margin-top: 12px; }

.button {
  min-height: 40px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--paper); color: var(--ink);
  font-size: 13px; font-weight: 600; text-decoration: none;
}
.button:hover { border-color: #9db8a8; background: #f7faf8; }
.button-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.button-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.button-small { min-height: 34px; padding: 5px 10px; font-size: 12px; }
.key-row { display: flex; gap: 8px; }
.key-row input { flex: 1; min-width: 0; }

.status-line { font-size: 12px; color: var(--brand-dark); min-height: 18px; margin-top: 8px; }
.status-line.error { color: var(--danger); }

.disc-head {
  display: flex; align-items: start; justify-content: space-between; gap: 12px;
  margin-bottom: 14px;
}
.disc-head h2 { margin-bottom: 2px; }
.disc-meta { font-size: 12px; color: var(--muted); }
.status {
  font-size: 12px; font-weight: 650; color: var(--brand-dark);
  background: var(--brand-soft); border: 1px solid #c8e2d2;
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}
.status.done { color: var(--muted); background: #f0f3f1; border-color: var(--line); }

.transcript { display: grid; gap: 14px; }
.msg { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.msg-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin-bottom: 6px;
}
.msg-seat { font-size: 13px; font-weight: 750; color: var(--brand-dark); }
.msg-time { font-size: 11px; color: var(--muted); }
.msg-body { font-size: 14px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-body p { margin: 0 0 8px; }
.msg-body p:last-child { margin-bottom: 0; }
.msg-body ul, .msg-body ol { margin: 0 0 8px; padding-left: 20px; }
.msg-body li { margin-bottom: 2px; }
.msg-body code {
  font: 600 12px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace;
  background: #eef4ef; border: 1px solid #d5e3d9; border-radius: 4px; padding: 1px 5px;
}
.msg-body pre {
  background: #10231d; color: #dff0e6; border-radius: 8px;
  padding: 10px 12px; overflow-x: auto; margin: 0 0 8px;
}
.msg-body pre code { background: none; border: 0; color: inherit; padding: 0; }
.msg.summary { border-color: #9db8a8; background: #f4faf6; }
.msg.summary .msg-seat { color: var(--brand-dark); }
.msg.thinking { color: var(--muted); font-style: italic; }
.msg.error { border-color: #eec5c2; background: var(--danger-soft); }
.msg.error .msg-seat { color: var(--danger); }
.msg.error .msg-body { color: #7a1f19; font-size: 13px; }

.saved-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.saved-list button {
  display: block; width: 100%; text-align: left;
  background: #fff; border: 1px solid var(--line); border-radius: 9px;
  padding: 10px 12px; color: var(--ink);
}
.saved-list button:hover { border-color: #9db8a8; }
.saved-list button[aria-current="true"] { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.saved-title { display: block; font-size: 13px; font-weight: 650; line-height: 1.45; }
.saved-meta { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }
.saved-del {
  float: right; border: 0; background: none; color: var(--muted);
  font-size: 12px; padding: 2px 6px; border-radius: 6px;
}
.saved-del:hover { color: var(--danger); background: var(--danger-soft); }

.footer {
  display: flex; justify-content: space-between; gap: 16px;
  padding-block: 16px; border-top: 1px solid var(--line);
  font-size: 11px; color: var(--muted);
}

@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .shell { width: calc(100% - 32px); }
  .brand h1 { font-size: 20px; }
}
