@import url("https://unpkg.com/modern-normalize@3.0.1/modern-normalize.css");

:root { --m: #888; }
* { box-sizing: border-box; }
body { font: 14px/1.7 "SF Mono", "Cascadia Code", "Fira Code", Menlo, monospace; max-width: 640px; margin: 0 auto; padding: 16px; }
a { color: #000; }
a:hover { opacity: .5; }
h1 { font-size: 16px; font-weight: 600; margin: 0 0 12px; padding: 0 0 8px; border-bottom: 1px solid #000; }
h2 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--m); margin: 0 0 8px; }
p { margin: 0; }
pre { white-space: pre-wrap; word-break: break-word; font: inherit; margin: 4px 0 0; padding: 8px; background: #f5f5f5; border: 1px solid #e0e0e0; }
code { font: inherit; background: #f5f5f5; padding: 1px 4px; }

nav { display: flex; gap: 16px; margin-bottom: 20px; padding-bottom: 8px; border-bottom: 1px solid #e0e0e0; font-size: 13px; align-items: center; flex-wrap: wrap; }
nav a { text-decoration: none; text-transform: uppercase; letter-spacing: .04em; }
nav .brand { font-weight: 700; }
.nav-spacer { margin-left: auto; }
.nav-cost {
  color: var(--m);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.working-card { border-color: #d0d0d0; background: #fafafa; }
.working-details summary {
  cursor: pointer;
  font-size: 13px;
  list-style: none;
}
.working-details summary::-webkit-details-marker { display: none; }
.working-details summary::marker { display: none; content: ""; }
.working-indicator {
  margin-right: 4px;
}
.working-details .inbox-output {
  max-height: 240px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #f5f5f5;
  margin-top: 8px;
}

.section { margin-bottom: 24px; }
.card { padding: 12px; border: 1px solid #e0e0e0; margin-bottom: 8px; }
.meta { font-size: 12px; color: var(--m); }
.muted { color: var(--m); }
.skill-files { margin-top: 8px; }
.skill-file-link { text-decoration: none; }
.row { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px solid #f0f0f0; font-size: 13px; }
.row:first-child { border-top: 0; }
.fields p { font-size: 13px; margin: 2px 0; }
.fields strong { color: var(--m); font-weight: 400; }
.empty { color: var(--m); font-size: 13px; }
.card.user-post { background: #fffbeb; border-color: #e5d9a0; }
.card.inbox-failed { border-color: #e5c5c5; }
.message-body { margin-top: 6px; font-size: 13px; word-break: break-word; }
.message-body > * + * { margin-top: 8px; }
.message-body p { margin: 0; }
.message-body ul,
.message-body ol { margin: 0; padding-left: 20px; }
.message-body li + li { margin-top: 4px; }
.message-body pre { margin: 0; }
.inbox-meta { margin-top: 4px; }
.inbox-output-wrap { margin-top: 8px; }
.inbox-output {
  max-height: 180px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fafafa;
}
.pagination { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; font-size: 13px; }
.pagination a { text-decoration: none; }
.tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.tab {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid transparent;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 12px;
}
.tab.is-active {
  border-color: #000;
  background: #fff;
  color: #000;
}
.error { background: #fee; border: 1px solid #ecc; padding: 4px 8px; font-size: 13px; margin: 4px 0; }
details { margin-top: 4px; }
summary { cursor: pointer; font-size: 12px; color: var(--m); }
.run-cost-breakdown { margin: 6px 0 8px; }

textarea, input[type="text"] { width: 100%; font: inherit; font-size: 13px; padding: 6px 8px; border: 1px solid #ccc; background: #fff; }
textarea { resize: vertical; min-height: 60px; }
button { font: inherit; font-size: 12px; padding: 5px 12px; background: #000; color: #fff; border: 1px solid #000; cursor: pointer; text-transform: uppercase; letter-spacing: .04em; }
button:hover { background: #fff; color: #000; }
.inline-form { display: flex; gap: 6px; margin-top: 6px; }
.inline-form input { flex: 1; }
.trigger-form { margin-top: 8px; }
.trigger-form textarea { margin-bottom: 6px; }

.textarea-wrap { position: relative; }
.ac-dropdown { position: absolute; background: #fff; border: 1px solid #ccc; max-height: 180px; overflow-y: auto; z-index: 10; min-width: 200px; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.ac-dropdown.hidden { display: none; }
.ac-item { padding: 6px 10px; font-size: 13px; cursor: pointer; transition: background .1s; }
.ac-item:hover { background: #f0f0f0; }
.ac-item.active, .ac-item.active:hover { background: #000; color: #fff; }

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 40;
}
.modal:target { display: block; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.82);
}
.modal-card {
  position: relative;
  width: min(680px, calc(100vw - 32px));
  margin: 48px auto;
  padding: 16px;
  border: 1px solid #000;
  background: #fff;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 8px;
}
.modal-close {
  text-decoration: none;
  text-transform: uppercase;
  font-size: 14px;
  line-height: 1;
}
