/* AgentList — light, product-style design */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=optional');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=optional');

/* ---------------------------------------------------------------------------
   Base / Reset
--------------------------------------------------------------------------- */

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

#ssr-content { display: none; }

:root {
  --color-bg:           #ffffff;
  --color-surface:      #f9fafb;
  --color-border:       #e5e7eb;
  --color-border-light: #f3f4f6;
  --color-text:         #111827;
  --color-text-muted:   #6b7280;
  --color-text-xmuted:  #9ca3af;
  --color-accent:       #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-accent-light: #eff6ff;
  --color-danger:       #dc2626;
  --color-success:      #16a34a;
  --color-vote:         #f59e0b;
  --color-vote-active:  #d97706;
  --radius-sm: 6px;
  --radius:    8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / .05);
  --shadow:    0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
  --transition: 150ms ease;
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------------------
   Header
--------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: -0.02em;
  cursor: pointer;
}
.site-logo:hover { text-decoration: none; color: var(--color-text); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.user-npub {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 3px 10px;
}

/* ---------------------------------------------------------------------------
   Buttons
--------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
  white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: scale(0.96); }

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}
.btn-primary:hover:not(:disabled) {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

.btn-secondary {
  background: var(--color-bg);
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn-secondary:hover:not(:disabled) { background: var(--color-surface); }

.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
  border-color: transparent;
}
.btn-ghost:hover:not(:disabled) { background: var(--color-surface); color: var(--color-text); }

.btn-link {
  background: transparent;
  border: none;
  color: var(--color-accent);
  padding: 0;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
}
.btn-link:hover { text-decoration: underline; }

.btn-sm { padding: 5px 11px; font-size: 13px; }

/* Vote button */
.vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}
.vote-btn:active:not(:disabled) { transform: scale(0.96); }
.vote-btn:hover:not(:disabled) {
  border-color: var(--color-vote);
  color: var(--color-vote-active);
  background: #fffbeb;
}
.vote-btn.voted {
  background: #fffbeb;
  border-color: var(--color-vote);
  color: var(--color-vote-active);
}
.vote-btn .vote-arrow { font-size: 10px; line-height: 1; }
.vote-btn:disabled { opacity: .5; cursor: not-allowed; }

/* Vote pill (inline in table) */
.vote-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: var(--color-surface);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border-light);
  font-variant-numeric: tabular-nums;
}
.vote-pill.has-votes {
  background: #fffbeb;
  color: var(--color-vote-active);
  border-color: #fde68a;
}

/* ---------------------------------------------------------------------------
   Main layout
--------------------------------------------------------------------------- */

.site-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

/* ---------------------------------------------------------------------------
   Page header (listing index)
--------------------------------------------------------------------------- */

.page-header { margin-bottom: 24px; }
.page-header h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
  text-wrap: balance;
}
.page-header p {
  font-size: 15px;
  color: var(--color-text-muted);
  margin-top: 4px;
  text-wrap: pretty;
}

.directory-meta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
}

.directory-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.directory-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text-muted);
  font-family: inherit;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.directory-stat:hover {
  color: var(--color-text);
  border-color: #c7d2fe;
  background: #f8fafc;
}
.directory-stat.active {
  color: var(--color-accent);
  border-color: #bfdbfe;
  background: var(--color-accent-light);
}
.directory-stat strong {
  color: var(--color-text);
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.directory-stat span {
  font-size: 12px;
  font-weight: 600;
}

.directory-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  font-size: 13px;
}
.directory-links a {
  color: var(--color-text-muted);
  text-decoration: none;
}
.directory-links a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

@media (max-width: 760px) {
  .directory-meta {
    align-items: stretch;
    flex-direction: column;
  }
  .directory-links {
    justify-content: flex-start;
  }
}

/* ---------------------------------------------------------------------------
   Toolbar (search + submit)
--------------------------------------------------------------------------- */

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.search-wrap { flex: 1; position: relative; }
.search-wrap svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-xmuted);
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-bg);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgb(37 99 235 / .1);
}
.search-input::placeholder { color: var(--color-text-xmuted); }

/* ---------------------------------------------------------------------------
   Tabs
--------------------------------------------------------------------------- */

.tabs {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 20px;
}

.tab-btn {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  flex: 0 0 auto;
  transition: color var(--transition), border-color var(--transition);
}
.tab-btn:hover { color: var(--color-text); }
.tab-btn.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.tab-hint {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: -12px 0 18px;
  line-height: 1.5;
}

/* ---------------------------------------------------------------------------
   Listing table
--------------------------------------------------------------------------- */

.listing-table-wrap {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  min-height: 70vh;
  overflow: hidden;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 640px) {
  .col-author, .col-date, .col-url { display: none; }
}

.listing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.listing-table thead th {
  text-align: left;
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.listing-table tbody tr {
  border-bottom: 1px solid var(--color-border-light);
  transition: background var(--transition);
  cursor: pointer;
}
.listing-table tbody tr:last-child { border-bottom: none; }
.listing-table tbody tr:hover { background: var(--color-surface); }

.listing-table td {
  padding: 12px 16px;
  vertical-align: top;
}

.col-rank {
  width: 40px;
  color: var(--color-text-xmuted);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.col-title .listing-title { font-weight: 600; color: var(--color-text); margin-bottom: 2px; }
.col-title .listing-desc {
  font-size: 13px;
  color: var(--color-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.col-author {
  width: 150px;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.col-url { width: 180px; }
.col-url a { font-size: 13px; color: var(--color-accent); word-break: break-all; }

.col-date {
  width: 110px;
  color: var(--color-text-muted);
  font-size: 13px;
  white-space: nowrap;
}

.col-votes { width: 80px; text-align: right; }

.table-empty, .table-loading {
  text-align: center;
  padding: 48px 16px;
  color: var(--color-text-muted);
  font-size: 14px;
}

.spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.error-msg {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  padding: 12px 16px;
  color: var(--color-danger);
  font-size: 14px;
  margin-bottom: 16px;
}

/* ---------------------------------------------------------------------------
   My agents
--------------------------------------------------------------------------- */

.my-agents-shell {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.my-agents-home,
.agent-flow {
  padding: 24px;
}

.my-agents-home {
  display: grid;
  gap: 16px;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.my-agents-home h2,
.agent-flow h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
  text-wrap: balance;
}

.my-agents-home p,
.agent-flow p {
  color: var(--color-text-muted);
  font-size: 14px;
  text-wrap: pretty;
}

.my-agents-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.my-agents-list-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
}

.my-agents-list {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  font-size: 14px;
}

.my-agents-list th {
  padding: 10px 14px;
  text-align: left;
  background: var(--color-surface);
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.my-agents-list td {
  padding: 14px;
  vertical-align: top;
  border-bottom: 1px solid var(--color-border-light);
}

.my-agents-list th:nth-child(4),
.my-agents-list td:nth-child(4) {
  min-width: 230px;
}

.my-agents-list th:last-child,
.my-agents-list td:last-child {
  width: 128px;
}

.my-agents-list tr:last-child td {
  border-bottom: none;
}

.my-agents-list strong,
.my-agents-list span,
.my-agents-list small {
  display: block;
}

.my-agents-list span,
.my-agents-list small {
  margin-top: 3px;
  color: var(--color-text-muted);
  font-size: 13px;
}

.my-agents-list small {
  font-size: 12px;
}

.my-agents-list code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-text-muted);
  background: transparent;
  white-space: nowrap;
}

.my-agents-list-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 8px;
  text-align: right;
}

.my-agents-list-actions .btn {
  min-width: 58px;
  min-height: 32px;
}

.agent-delete-action {
  color: var(--color-danger);
}

.agent-delete-action:hover {
  border-color: #fecaca;
  background: #fef2f2;
  color: var(--color-danger);
}

.agent-management-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: inset 0 0 0 1px var(--color-border);
}

.agent-management-panel strong,
.agent-management-panel span {
  display: block;
}

.agent-management-panel strong {
  font-size: 14px;
}

.agent-management-panel span {
  margin-top: 2px;
  color: var(--color-text-muted);
  font-size: 13px;
}

.agent-test-chat {
  gap: 16px;
}

.agent-test-messages {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow-y: auto;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: inset 0 0 0 1px var(--color-border);
}

.agent-test-message {
  max-width: min(620px, 86%);
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--color-bg);
  box-shadow: inset 0 0 0 1px var(--color-border-light);
}

.agent-test-message.customer {
  justify-self: end;
  background: var(--color-accent);
  color: #fff;
}

.agent-test-message.system {
  justify-self: center;
  max-width: 520px;
  background: #f8fafc;
  color: var(--color-text-muted);
}

.agent-test-message span {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.76;
}

.agent-test-message p {
  margin: 0;
  color: inherit;
  font-size: 14px;
  line-height: 1.45;
}

.agent-test-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: inset 0 0 0 1px var(--color-border-light);
}

.agent-test-status strong,
.agent-test-status span {
  font-size: 13px;
}

.agent-test-status span {
  color: var(--color-text-muted);
}

.agent-test-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.agent-inline-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  background: var(--color-surface);
}

.agent-inline-state strong {
  color: var(--color-text);
}

.agent-inline-state.error {
  color: #9f1239;
  border-color: #fecdd3;
  background: #fff1f2;
}

.agent-metric {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.agent-metric-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--color-accent, #2563eb);
  cursor: pointer;
  text-decoration: underline;
}

.agent-metric-link:hover {
  text-decoration: none;
}

.agent-flow-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.agent-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--color-border-light);
  overflow: hidden;
  margin-bottom: 24px;
}

.agent-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--color-accent);
  transition: width 180ms ease;
}

.agent-step {
  display: grid;
  gap: 20px;
}

.agent-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.agent-step .form-group {
  margin-bottom: 0;
}

.agent-step .form-group > span:first-child,
.secret-list span {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 6px;
}

.agent-step .compact-textarea {
  min-height: 104px;
  font-family: inherit;
  font-size: 14px;
}

.sample-switcher {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: inset 0 0 0 1px var(--color-border);
}

.sample-switcher > span {
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.sample-switcher div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sample-switcher button {
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-bg);
  color: var(--color-text);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.sample-switcher button.active {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.agent-flow p.agent-warning {
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text-muted);
  box-shadow: inset 0 0 0 1px var(--color-border);
  font-size: 13px;
}

.agent-flow p.agent-note {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.agent-flow .availability-event-card + p.agent-note {
  margin-top: 10px;
}

.availability-event-card {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
}

.availability-event-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.availability-event-head div {
  min-width: 0;
}

.availability-event-head span {
  display: block;
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.availability-event-head strong {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.availability-event-head .btn {
  flex: 0 0 auto;
}

.availability-field-list {
  display: grid;
  margin: 0;
}

.availability-field-list div {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 16px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--color-border-light);
}

.availability-field-list div:last-child {
  border-bottom: none;
}

.availability-field-list dt {
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 700;
}

.availability-field-list dd {
  min-width: 0;
}

.availability-field-list dd strong,
.availability-field-list dd span {
  display: block;
}

.availability-field-list dd strong {
  font-size: 14px;
}

.availability-field-list dd span {
  margin-top: 2px;
  color: var(--color-text-muted);
  font-size: 13px;
}

.calendar-day-demo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.calendar-day-board {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
}

.calendar-day-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.calendar-day-top strong {
  font-size: 15px;
}

.calendar-day-top span {
  color: var(--color-text-muted);
  font-size: 13px;
}

.calendar-all-day-row,
.calendar-time-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border-light);
}

.calendar-time-row:last-child {
  border-bottom: none;
}

.calendar-all-day-row > span:first-child,
.calendar-time-row > span:first-child {
  color: var(--color-text-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.calendar-entry-chip {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 7px;
  background: var(--color-accent-light);
  color: var(--color-accent);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.calendar-time-row.muted .calendar-entry-chip {
  background: var(--color-surface);
  color: var(--color-text-muted);
  box-shadow: inset 0 0 0 1px var(--color-border);
}

.calendar-entry-popover {
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg);
  box-shadow: var(--shadow);
}

.calendar-entry-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.calendar-entry-title span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-accent);
  flex: 0 0 auto;
}

.calendar-entry-title strong {
  font-size: 18px;
  line-height: 1.25;
}

.calendar-entry-popover dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.calendar-entry-popover dl div {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
}

.calendar-entry-popover dt,
.calendar-entry-popover dd {
  font-size: 13px;
}

.calendar-entry-popover dt {
  color: var(--color-text-muted);
  font-weight: 700;
}

.calendar-entry-popover dd {
  margin: 0;
  color: var(--color-text);
}

.agent-step-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

/* Grounded-fact capture */
.agent-facts {
  border-top: 1px solid var(--border, #e2e2e2);
  margin-top: 8px;
  padding-top: 12px;
}

.agent-facts-title {
  margin: 0 0 4px;
  font-size: 15px;
}

.agent-fact-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
}

.agent-fact-label {
  flex: 0 0 34%;
  font-size: 13px;
  color: var(--text-muted, #555);
}

.agent-fact-row .agent-fact-key {
  flex: 0 0 34%;
}

.agent-fact-row .agent-fact-value {
  flex: 1 1 auto;
}

.agent-fact-skip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted, #777);
  white-space: nowrap;
}

.agent-fact-remove {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: var(--text-muted, #999);
}

.agent-facts-coverage {
  margin-top: 8px;
  font-weight: 500;
}

/* Advanced workflow view */
.agent-advanced {
  margin-top: 16px;
}

.agent-advanced-toggle {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  font-size: 13px;
  text-decoration: underline;
  color: var(--accent, #2563eb);
}

.agent-advanced-panel {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--border, #e2e2e2);
  border-radius: 8px;
  background: var(--surface-muted, #fafafa);
}

.agent-pipeline {
  margin: 4px 0 12px;
  padding-left: 18px;
  font-size: 13px;
  color: var(--text-muted, #555);
}

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

.agent-routing-table td {
  padding: 5px 6px;
  border-bottom: 1px solid var(--border, #ececec);
}

.agent-routing-table td:last-child {
  text-align: right;
  white-space: nowrap;
}

.agent-routing-table .routing-ok {
  color: #15803d;
}

.agent-routing-table .routing-defer {
  color: #b45309;
}

.agent-complete-simple {
  max-width: 680px;
}

.agent-complete-main {
  min-width: 0;
}

.agent-complete-main h3 {
  margin: 0 0 8px;
  font-size: 18px;
  text-wrap: balance;
}

.secret-list {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.secret-row,
.secret-placeholder-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.secret-row .btn,
.secret-placeholder-row .btn {
  min-height: 40px;
}

.secret-list input {
  font-family: var(--font-mono);
  font-size: 12px;
}

.secret-placeholder {
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  background: var(--color-surface);
}

.calendar-time {
  display: block;
  margin-bottom: 3px;
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 760px) {
  .my-agents-home {
    grid-template-columns: 1fr;
  }

  .my-agents-list-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .agent-test-compose {
    grid-template-columns: 1fr;
  }

  .agent-form-grid {
    grid-template-columns: 1fr;
  }

  .sample-switcher {
    align-items: flex-start;
    flex-direction: column;
  }

  .availability-event-head,
  .availability-field-list div {
    grid-template-columns: 1fr;
  }

  .availability-event-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .calendar-day-demo {
    grid-template-columns: 1fr;
  }

  .calendar-entry-popover dl div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

@media (max-width: 520px) {
  .my-agents-home,
  .agent-flow {
    padding: 18px;
  }

  .agent-flow-header,
  .agent-step-actions,
  .agent-management-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .secret-row,
  .secret-placeholder-row {
    grid-template-columns: 1fr;
  }

  .agent-step-actions .btn,
  .agent-management-panel .btn,
  .secret-row .btn,
  .secret-placeholder-row .btn {
    width: 100%;
  }
}

/* ---------------------------------------------------------------------------
   Detail view
--------------------------------------------------------------------------- */

.detail-back { margin-bottom: 24px; }

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  align-items: start;
}
@media (max-width: 768px) { .detail-layout { grid-template-columns: 1fr; } }

.detail-main { min-width: 0; }

.detail-category-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-skill { background: #dbeafe; color: #1d4ed8; }
.badge-soul  { background: #f3e8ff; color: #7c3aed; }

/* Ant QA link — author column + detail sidebar */
.ant-qa-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  text-decoration: none;
  opacity: 0.4;
  transition: opacity 0.15s;
  vertical-align: middle;
  flex-shrink: 0;
}
.ant-qa-link:hover { opacity: 1; }

.ant-check {
  font-size: 10px;
  font-weight: 700;
  color: #16a34a;
  line-height: 1;
}

.ant-icon-sm {
  height: 14px;
  width: auto;
  image-rendering: pixelated;
  display: block;
}

/* Detail page animated gif + static freeze-frame (same size so transition looks instant) */
.ant-gif,
.ant-icon {
  height: 20px;
  width: auto;
  image-rendering: pixelated;
  display: block;
}

.detail-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
  line-height: 1.3;
  margin-bottom: 8px;
  text-wrap: balance;
}
@media (max-width: 768px) { .detail-title { font-size: 22px; } }

.detail-description {
  font-size: 16px;
  color: var(--color-text-muted);
  margin-bottom: 24px;
  line-height: 1.6;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

/* Markdown prose */
.prose { color: var(--color-text); line-height: 1.7; overflow-wrap: break-word; }
.prose h1, .prose h2, .prose h3, .prose h4 {
  margin-top: 24px; margin-bottom: 12px;
  font-weight: 700; letter-spacing: -0.01em; line-height: 1.3;
  text-wrap: balance;
}
.prose h1 { font-size: 22px; }
.prose h2 { font-size: 18px; }
.prose h3 { font-size: 16px; }
.prose p { margin-bottom: 16px; text-wrap: pretty; }
.prose ul, .prose ol { margin-bottom: 16px; padding-left: 24px; }
.prose li { margin-bottom: 4px; }
.prose pre {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
  overflow-x: auto;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.prose code {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.prose pre code { border: none; background: none; padding: 0; }
.prose blockquote {
  border-left: 3px solid var(--color-border);
  padding-left: 16px;
  margin-left: 0;
  color: var(--color-text-muted);
  font-style: italic;
  margin-bottom: 16px;
}
.prose a { color: var(--color-accent); }
.prose hr { border: none; border-top: 1px solid var(--color-border); margin: 24px 0; }
.prose table { width: 100%; border-collapse: collapse; margin-bottom: 16px; font-size: 14px; }
.prose th, .prose td { border: 1px solid var(--color-border); padding: 8px 12px; }
.prose th { background: var(--color-surface); font-weight: 600; }
.prose img { max-width: 100%; border-radius: var(--radius); outline: 1px solid rgba(0, 0, 0, 0.1); outline-offset: -1px; }

/* Detail sidebar */
.sidebar-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}

.sidebar-vote { text-align: center; padding: 24px 20px; }
.vote-error {
  font-size: 12px;
  color: var(--color-danger);
  margin-top: 10px;
  line-height: 1.4;
  text-align: left;
}

.sidebar-vote .vote-count {
  font-size: 36px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}
.sidebar-vote .vote-label {
  font-size: 12px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.usage-signal-card {
  padding: 16px 18px;
}
.usage-signal-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}
.usage-signal-primary {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-text);
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}
.usage-signal-detail {
  font-size: 12px;
  line-height: 1.45;
  color: var(--color-text-muted);
  overflow-wrap: break-word;
}

.sidebar-meta dt {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 2px;
}
.sidebar-meta dd {
  font-size: 13px;
  color: var(--color-text);
  margin-bottom: 12px;
  word-break: break-all;
}
.sidebar-meta dd:last-child { margin-bottom: 0; }
.sidebar-meta dd.mono { font-family: var(--font-mono); font-size: 12px; color: var(--color-text-muted); }

/* ---------------------------------------------------------------------------
   Comments
--------------------------------------------------------------------------- */

.comments-section {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
}
.comments-section h2 { font-size: 18px; font-weight: 700; margin-bottom: 20px; }

.comments-loading, .comments-empty {
  font-size: 14px;
  color: var(--color-text-muted);
  padding: 16px 0;
}

.comment {
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border-light);
}
.comment:last-child { border-bottom: none; }
.comment.depth-1 { padding-left: 24px; }
.comment.depth-2 { padding-left: 48px; }
.comment.depth-3 { padding-left: 72px; }

.comment-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.comment-author { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--color-text-muted); }
.comment-date { font-size: 12px; color: var(--color-text-xmuted); }
.comment-body {
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 6px;
}
.comment-replies { margin-top: 4px; }

.reply-form { padding: 12px 0; }
.reply-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-bg);
  resize: vertical;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.reply-textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgb(37 99 235 / .1);
}
.reply-actions { margin-top: 8px; }
.reply-error { font-size: 13px; color: var(--color-danger); margin-top: 6px; }
.reply-sent { font-size: 13px; color: var(--color-success); padding: 8px 0; }
.reply-gate { font-size: 14px; color: var(--color-text-muted); }

/* ---------------------------------------------------------------------------
   Identity modal
--------------------------------------------------------------------------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgb(0 0 0 / .4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 400px;
  overflow: hidden;
}

.modal-header { padding: 20px 24px 0; }
.modal-header h2 { font-size: 18px; font-weight: 700; color: var(--color-text); margin-bottom: 4px; }
.modal-header p { font-size: 14px; color: var(--color-text-muted); margin-bottom: 20px; }

.modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--color-border);
  margin: 0 24px;
}
.modal-tab-btn {
  flex: 1;
  padding: 10px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: color var(--transition), border-color var(--transition);
}
.modal-tab-btn.active { color: var(--color-accent); border-bottom-color: var(--color-accent); }
.modal-tab-btn:hover:not(.active) { color: var(--color-text); }

.modal-body { padding: 24px; }
.modal-action { width: 100%; }
.modal-error {
  font-size: 13px;
  color: var(--color-danger);
  margin-top: 10px;
  padding: 8px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
}

.passkey-info {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 12px;
  line-height: 1.5;
}

.modal-dev-auth {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border-light);
}

.modal-dev-auth p {
  margin: 10px 0 0;
  color: var(--color-text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.modal-notice {
  margin-top: 14px;
  padding: 14px 16px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.5;
  color: #78350f;
}
.modal-notice p { margin: 0 0 8px; }
.modal-notice p:last-of-type { margin-bottom: 10px; }
.modal-notice strong { color: #78350f; }
.modal-notice em { font-style: normal; font-weight: 600; }
.modal-notice-dots {
  display: inline-block;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 0 4px;
}
.modal-notice-copy { width: 100%; }

.modal-close-wrap { text-align: center; padding: 0 24px 20px; }

/* ---------------------------------------------------------------------------
   Submit page
--------------------------------------------------------------------------- */

.submit-page { max-width: 660px; margin: 0 auto; }
.submit-page h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; text-wrap: balance; }
.submit-page .page-desc { font-size: 15px; color: var(--color-text-muted); margin-bottom: 32px; }

.form-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
}
.form-group .hint { font-size: 12px; color: var(--color-text-muted); margin-top: 4px; }

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-bg);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgb(37 99 235 / .1);
}
.form-textarea {
  resize: vertical;
  min-height: 240px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.form-select { cursor: pointer; }

.category-select-group { display: flex; gap: 10px; margin-bottom: 24px; }
.category-btn {
  flex: 1;
  padding: 10px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  transition: background-color var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
  color: var(--color-text-muted);
}
.category-btn:active:not(:disabled) { transform: scale(0.96); }
.category-btn:hover { border-color: var(--color-accent); color: var(--color-accent); }
.category-btn.selected {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
  color: var(--color-accent);
}

.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }

.submit-success { text-align: center; padding: 40px 20px; }
.submit-success h2 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.submit-success p { font-size: 14px; color: var(--color-text-muted); margin-bottom: 20px; }

.preview-toggle { margin-bottom: 8px; }
.preview-pane {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  min-height: 240px;
  background: var(--color-surface);
}

.auth-gate {
  text-align: center;
  padding: 40px 20px;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-lg);
  color: var(--color-text-muted);
}
.auth-gate p { margin-bottom: 16px; font-size: 15px; }

/* ---------------------------------------------------------------------------
   Utility
--------------------------------------------------------------------------- */

[x-cloak] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ---------------------------------------------------------------------------
   Sort select (toolbar)
--------------------------------------------------------------------------- */

.sort-select {
  padding: 7px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-bg);
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
  white-space: nowrap;
}
.sort-select:focus { border-color: var(--color-accent); }

/* ---------------------------------------------------------------------------
   Author column link
--------------------------------------------------------------------------- */

.author-link {
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
}
.author-link:hover { color: var(--color-accent); text-decoration: underline; }

/* ---------------------------------------------------------------------------
   Author profile page
--------------------------------------------------------------------------- */

.author-header {
  margin-bottom: 28px;
}

.author-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.author-npub {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
}

.reputation-badge {
  font-size: 12px;
  font-weight: 600;
}

.author-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

.section-heading {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

/* ---------------------------------------------------------------------------
   Author actions (edit/delete)
--------------------------------------------------------------------------- */

.author-actions-card { }

.delete-btn { color: var(--color-text-muted); }
.btn-danger-confirm {
  background: #fef2f2;
  color: var(--color-danger);
  border-color: #fecaca;
}
.btn-danger-confirm:hover { background: #fee2e2; }

.delete-hint {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 8px;
  line-height: 1.4;
}

/* ---------------------------------------------------------------------------
   Raw tip banner
--------------------------------------------------------------------------- */

.raw-tip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-accent-light);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.raw-tip a { font-weight: 500; }

/* Inline URL shown inside the tip banner. Uses <code> instead of <a> so
   Google Analytics' cross-domain linker can't inject _gl= into the URL,
   which breaks copy-paste into tools like Google AI Edge Gallery. */
.raw-tip-url {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 12px;
  background: var(--color-bg, #fff);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  padding: 1px 6px;
  color: var(--color-text);
  word-break: break-all;
}

.raw-tip-copy {
  padding: 2px 8px;
  font-size: 11px;
  vertical-align: baseline;
  margin: 0 2px;
}

.raw-tip-dismiss {
  margin-left: auto;
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-xmuted);
  font-size: 16px;
  line-height: 1;
  padding: 4px 6px;
  min-width: 32px;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.raw-tip-dismiss:hover { color: var(--color-text-muted); }

/* Copy button */
.copy-btn {
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}
.copy-btn:active { transform: scale(0.96); }
.copy-btn:hover { border-color: var(--color-accent); color: var(--color-accent); }


/* Side-by-side form row for tool + format selects */
.form-group-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 0;
}
@media (max-width: 480px) { .form-group-row { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------------------
   Paid For category
--------------------------------------------------------------------------- */

/* Badge */
.badge-paid { background: #fef9c3; color: #854d0e; border: 1px solid #fde047; }

/* Paid-service disclaimer banner on detail page */
.paid-disclaimer {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-left: 3px solid #f59e0b;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

/* Pricing column in paid table */
.col-pricing { width: 160px; font-size: 13px; }
.pricing-text { color: var(--color-text-muted); }

/* ---------------------------------------------------------------------------
   Try this API
--------------------------------------------------------------------------- */

.try-api-card { text-align: center; }

.try-api-hint {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 10px;
  line-height: 1.4;
}

.invoice-string-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  margin-bottom: 12px;
}

.invoice-string {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 4px 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 240px;
}

#invoice-qr {
  display: block;
  margin: 0 auto 16px;
  border-radius: var(--radius);
}

/* ---- Skill-folder callout (skill detail page) ---- */
.skill-folder-callout {
  margin: 16px 0;
  padding: 12px 16px;
  background: var(--color-bg-secondary, #f8f9fa);
  border: 1px solid var(--color-border, #e0e0e0);
  border-radius: 8px;
}
.skill-folder-callout-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.skill-folder-callout-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
}
.skill-folder-callout-label a {
  color: var(--color-primary, #6366f1);
}
.skill-folder-callout-url {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.skill-folder-callout-url code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  background: none;
  color: var(--color-text);
  word-break: break-all;
}

/* ---- Collapsible explainer (submit form) ---- */
.submit-note {
  margin-top: 10px;
  font-size: 13px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
}
.submit-note summary {
  cursor: pointer;
  padding: 8px 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  user-select: none;
}
.submit-note summary:hover { color: var(--color-text); }
.submit-note p {
  margin: 0 12px 10px;
  line-height: 1.55;
  color: var(--color-text-muted);
}

/* ---- Agent clone card (agent detail page) ---- */
/* The card shell is shared: `.install-card` originally dressed the MCP install
   snippet, which is gone, but the agent clone card still builds on it. */
.install-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 28px;
  overflow: hidden;
}
.install-card-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
}
.install-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
  flex-shrink: 0;
}
.install-card-body {
  position: relative;
}
.clone-card-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
}
.clone-card-hint,
.clone-card-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--color-text-muted);
}
.clone-card-note {
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}
.clone-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.clone-row-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.clone-row-value {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.clone-row-value code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  background: none;
  color: var(--color-text);
  word-break: break-all;
}

/* ---- Skill source code block (scripts/index.html) ---- */
.skill-source {
  margin: 16px 0;
  border: 1px solid var(--color-border, #e0e0e0);
  border-radius: 8px;
  overflow: hidden;
}
.skill-source summary {
  cursor: pointer;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  user-select: none;
  background: var(--color-bg-secondary, #f8f9fa);
  display: flex;
  align-items: center;
  gap: 8px;
}
.skill-source-size {
  font-weight: 400;
  color: var(--color-text-muted);
}
.skill-source-pre {
  margin: 0;
  padding: 14px;
  overflow-x: auto;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  line-height: 1.5;
  background: var(--color-bg, #fff);
  white-space: pre;
}

/* ---- GitHub import row (submit form, skill category) ---- */
.github-import-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.github-import-row .form-input { flex: 1; }

/* ---- GitHub source attribution (detail sidebar) ---- */
.github-source-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 13px;
  transition: color var(--transition);
}
.github-source-link:hover { color: var(--color-text); }
