:root {
  --canvas: #fff; --sidebar: #f6f8f7; --surface: #f7f9f8;
  --ink: #202d28; --muted: #62716a; --line: #e2e8e4; --control-line: #829388;
  --accent: #176448; --accent-soft: #e7f1eb; --danger: #a12d24; --radius: 9px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  color: var(--ink); background: var(--canvas); font-synthesis: none; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 15px; }
button, input, select, textarea { font: inherit; }
button, a, input, select { touch-action: manipulation; }
button { cursor: pointer; }
a { color: var(--accent); text-underline-offset: 3px; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
button:disabled { cursor: wait; opacity: .65; }
[hidden] { display: none !important; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 100; padding: 10px 18px; background: var(--ink); color: white; border-radius: 6px; }
.skip-link:focus { top: 12px; }
.layout { display: grid; grid-template-columns: 222px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 32px 18px 20px; display: flex; flex-direction: column; overflow-y: auto; border-right: 1px solid var(--line); background: var(--sidebar); }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 12px; color: var(--ink); text-decoration: none; font-size: 21px; font-weight: 650; letter-spacing: .5px; line-height: 1.3; }
.brand-icon { flex: 0 0 34px; width: 34px; height: 34px; color: var(--accent); }
.brand small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 400; letter-spacing: .1px; }
.side-caption { margin: 23px 12px 24px; font-size: 12px; color: var(--muted); }
.primary-nav { display: grid; gap: 5px; }
.nav { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; padding: 10px 12px; border-radius: 7px; background: transparent; color: var(--muted); text-align: left; font-size: 14px; min-height: 43px; }
.nav svg { width: 17px; height: 17px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.35; stroke-linejoin: round; }
.nav > span { margin-left: auto; font-size: 12px; font-variant-numeric: tabular-nums; }
.nav:hover, .shelf-button:hover { background: #edf1ee; color: var(--ink); }
.nav.active { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
a.nav { text-decoration: none; }
.mobile-nav a { display: inline-flex; align-items: center; min-height: 48px; font-size: 14px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.shelf-title { padding: 0 12px; margin: 32px 0 10px; font-size: 12px; color: var(--muted); }
#shelf-nav { display: grid; gap: 2px; }
.shelf-button { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 7px 12px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 13px; text-align: left; }
.shelf-button span { font-size: 12px; font-variant-numeric: tabular-nums; }
.shelf-button.selected { color: var(--ink); background: #e9eeeb; font-weight: 600; }
.side-foot { padding: 28px 12px 0; margin-top: auto; font-size: 12px; }
.side-foot a { display: flex; justify-content: space-between; color: var(--muted); text-decoration: none; }
.side-foot a:hover { color: var(--accent); }
.side-foot p { margin: 14px 0 0; color: var(--muted); font-size: 11px; }
.live-dot { display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--accent); vertical-align: 1px; }
main { min-width: 0; container-type: inline-size; }
main:focus { outline: none; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; height: 72px; padding: 0 40px; border-bottom: 1px solid var(--line); }
.workspace-label { color: var(--muted); font-size: 13px; }
.workspace-label > span:last-child { color: var(--ink); }
.breadcrumb-divider { display: inline-block; margin: 0 12px; color: #a4afa9; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 500; line-height: 1.5; }
.button:hover { background: var(--surface); border-color: #bacbc1; }
.button.primary, .button.dark { color: white; background: var(--accent); border-color: var(--accent); }
.button.primary:hover, .button.dark:hover { background: #115239; border-color: #115239; }
.button.quiet { background: transparent; border-color: transparent; color: var(--muted); }
.button.quiet:hover { background: var(--surface); color: var(--ink); }
.mobile-brand, .mobile-nav, .mobile-category { display: none; }
.page-body { max-width: 1360px; padding: 0 40px; margin: 0 auto; }
.page-heading { margin: 31px 0 27px; }
.title-line { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
h1 { margin: 0; font-size: 30px; font-weight: 650; line-height: 1.4; letter-spacing: -.6px; }
.view-total { display: inline-flex; align-items: center; gap: 5px; margin-top: 3px; color: var(--muted); font-size: 13px; }
.view-total strong { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.page-heading > p { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.catalog-controls { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.search-wrap { display: flex; align-items: center; flex: 1; min-width: 150px; height: 43px; gap: 10px; padding: 0 13px; border: 1px solid var(--control-line); border-radius: 8px; background: white; }
.search-wrap:focus-within { border-color: var(--accent); outline: 2px solid var(--accent-soft); }
.search-wrap svg { width: 18px; height: 18px; flex-shrink: 0; stroke: var(--muted); stroke-width: 1.6; stroke-linecap: round; }
.search-wrap input { border: 0; min-width: 0; width: 100%; padding: 9px 0; color: var(--ink); outline: none; font-size: 14px; background: transparent; }
input::placeholder, textarea::placeholder { color: #718078; opacity: 1; }
.filter-controls { display: flex; align-items: center; gap: 8px; }
select { min-height: 41px; max-width: 170px; padding: 8px 28px 8px 12px; border: 1px solid var(--control-line); border-radius: 7px; background: white; color: var(--ink); font-size: 13px; }
.content-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 15px; }
.content-heading > div { display: flex; align-items: baseline; gap: 11px; }
.content-heading h2 { margin: 0; font-size: 15px; font-weight: 600; }
#result-count { font-size: 12px; color: var(--muted); }
#checked-label { font-size: 12px; color: var(--muted); text-align: right; }
.catalog-list { border-top: 1px solid var(--line); }
.list-heading, .tool-row { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr) minmax(0, .7fr) 76px; column-gap: 25px; }
.list-heading { padding: 11px 12px; color: var(--muted); font-size: 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
.tool-row { position: relative; padding: 23px 12px; border-bottom: 1px solid var(--line); align-items: start; transition: background .15s ease; }
.tool-row:hover { background: #fbfcfb; }
.tool-identity { display: flex; align-items: flex-start; gap: 13px; min-width: 0; }
.tool-mark { width: 39px; height: 39px; flex: 0 0 39px; display: grid; place-items: center; border: 1px solid #e0e9e3; border-radius: 10px; color: #426b56; background: #eff5f1; font-size: 16px; line-height: 1; font-weight: 600; }
.tool-copy { min-width: 0; }
.tool-copy h2 { margin: 0 0 4px; font-size: 16px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.tool-summary { margin: 0 0 7px; color: var(--muted); font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.tool-category { display: inline-block; color: var(--muted); font-size: 12px; }
.tool-cost, .tool-setup { min-width: 0; }
.field-label { display: none; }
.tool-cost p { margin: 0; color: #45574d; font-size: 13px; line-height: 1.75; overflow-wrap: anywhere; }
.setup-level { display: inline-block; color: var(--muted); font-size: 12px; line-height: 1.6; }
.setup-level[data-level="easy"] { color: var(--accent); }
.setup-level::before { content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 6px; border-radius: 50%; background: currentColor; vertical-align: 2px; }
.tool-setup p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.tool-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 9px; }
.text-button { border: 0; background: transparent; color: var(--accent); padding: 0; min-height: 28px; font-size: 13px; font-weight: 500; text-align: left; white-space: nowrap; }
.text-button:hover { text-decoration: underline; text-underline-offset: 4px; }
.repo-link { color: var(--muted); text-decoration: none; font-size: 12px; min-height: 25px; display: inline-flex; align-items: center; gap: 4px; }
.repo-link:hover { color: var(--accent); text-decoration: underline; }
.agent-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.agent-card { display: flex; flex-direction: column; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; background: white; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.category-tag, .agent-phase { font-size: 12px; color: var(--accent); background: var(--accent-soft); padding: 3px 8px; border-radius: 4px; }
.agent-phase { align-self: flex-start; margin-bottom: 16px; }
.agent-facts { border-top: 1px solid var(--line); padding-top: 14px; margin: 0 0 18px; }
.agent-facts p { display: flex; align-items: baseline; gap: 12px; margin: 0 0 7px; font-size: 13px; line-height: 1.8; }
.agent-facts .field-label { display: block; flex-shrink: 0; color: var(--muted); }
.agent-card h2, .inbox-card h2 { margin: 0 0 10px; font-size: 19px; line-height: 1.55; font-weight: 600; overflow-wrap: anywhere; }
.card-description { font-size: 14px; line-height: 1.8; color: var(--muted); margin: 0 0 20px; overflow-wrap: anywhere; }
.cost-line { display: flex; align-items: baseline; gap: 12px; margin: 0; border-top: 1px solid var(--line); padding-top: 16px; font-size: 13px; line-height: 1.8; }
.cost-line b { flex-shrink: 0; font-weight: 500; color: var(--muted); }
.time-line { font-size: 13px; line-height: 1.7; color: var(--muted); margin: 8px 0 15px; }
.agent-status { background: var(--surface); padding: 10px 12px; border-radius: 5px; color: #77532a; font-size: 13px; line-height: 1.8; margin: 0 0 22px; }
.agent-card > .button { align-self: flex-start; margin-top: auto; }
.inbox-grid { display: grid; gap: 16px; }
.inbox-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 25px; min-width: 0; }
.inbox-card .card-description { white-space: pre-wrap; }
.inbox-card time { font-size: 12px; color: var(--muted); }
.card-bottom { display: flex; justify-content: space-between; margin-top: 18px; }
.detail-tags { display: flex; gap: 7px; flex-wrap: wrap; }
.detail-tags span { font-size: 12px; color: var(--muted); background: var(--surface); padding: 4px 9px; border: 1px solid var(--line); border-radius: 5px; }
.empty { padding: 66px 20px; text-align: center; color: var(--muted); font-size: 14px; line-height: 1.8; }
.empty strong { display: block; font-size: 19px; font-weight: 500; color: var(--ink); margin-bottom: 8px; }
.loading-message { color: var(--muted); padding: 24px 12px; }
footer { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-top: 38px; padding: 20px 0 28px; color: var(--muted); font-size: 12px; }
footer a { color: var(--muted); text-decoration: none; white-space: nowrap; }
footer a:hover { color: var(--accent); }
dialog { width: min(560px, calc(100% - 36px)); max-height: min(88vh, 960px); overflow: auto; padding: 28px; border: 1px solid var(--line); border-radius: 13px; background: white; color: var(--ink); box-shadow: 0 24px 90px #10241a24; }
dialog::backdrop { background: #15241cb3; }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.dialog-heading h2 { margin: 0; font-size: 24px; font-weight: 600; }
.eyebrow { font-size: 12px; color: var(--muted); margin: 0 0 8px; }
.icon-button { display: inline-grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--muted); font-size: 23px; font-weight: 300; line-height: 1; }
.icon-button:hover { background: var(--surface); color: var(--ink); }
.muted { color: var(--muted); font-size: 14px; line-height: 1.8; }
form > label { display: block; margin-top: 19px; font-size: 14px; font-weight: 500; }
.optional { color: var(--muted); font-size: 12px; font-weight: 400; margin-left: 6px; }
form input, form textarea { display: block; width: 100%; padding: 10px 12px; margin-top: 7px; border: 1px solid var(--control-line); border-radius: 7px; background: white; color: var(--ink); font-size: 15px; line-height: 1.6; }
textarea { resize: vertical; }
.form-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 22px; }
.form-bottom small { color: var(--muted); font-size: 12px; }
.form-error { color: var(--danger); font-size: 13px; }
.detail-dialog { width: min(790px, calc(100% - 36px)); padding: 0 32px 32px; }
.detail-heading { position: sticky; top: 0; z-index: 1; align-items: center; margin: 0 -32px; padding: 19px 32px 13px; background: white; border-bottom: 1px solid var(--line); }
.detail-heading .eyebrow { margin: 0; }
.detail-dialog h2 { font-size: 29px; line-height: 1.5; margin: 25px 0 12px; font-weight: 600; overflow-wrap: anywhere; }
.detail-lead { color: var(--muted); font-size: 16px; line-height: 1.85; margin-bottom: 25px; }
.detail-row { margin: 23px 0; font-size: 15px; line-height: 1.9; color: #45574d; overflow-wrap: anywhere; }
.detail-row > strong { display: block; margin-bottom: 5px; font-size: 13px; color: var(--ink); font-weight: 600; }
.detail-row p { margin: 0; }
.experiment-note { border-left: 3px solid var(--accent); padding: 15px 18px; background: var(--accent-soft); border-radius: 0 7px 7px 0; }
.source-list { font-size: 13px; line-height: 1.9; overflow-wrap: anywhere; }
.source-list a { display: block; margin: 6px 0; }
.prompt-box { padding: 16px 18px; border: 1px solid #dce8e0; background: var(--accent-soft); border-radius: 8px; font-size: 14px; line-height: 1.85; overflow-wrap: anywhere; }
.doc-tabs { display: flex; gap: 8px; margin: 22px 0; flex-wrap: wrap; }
.doc-tabs button { min-height: 40px; border: 1px solid var(--line); border-radius: 6px; background: white; color: var(--muted); font-size: 13px; padding: 8px 12px; }
.doc-tabs button.active { color: var(--accent); border-color: #b7d0c1; background: var(--accent-soft); }
.markdown-content { color: #45574d; font-size: 15px; line-height: 1.95; overflow-wrap: anywhere; }
.markdown-content h1, .markdown-content h2 { font-size: 23px; color: var(--ink); margin: 30px 0 14px; line-height: 1.6; letter-spacing: 0; }
.markdown-content h3 { font-size: 18px; color: var(--ink); margin: 28px 0 10px; line-height: 1.6; }
.markdown-content h4 { font-size: 16px; color: var(--ink); margin: 24px 0 8px; }
.markdown-content ul, .markdown-content ol { padding-left: 24px; }
.markdown-content li { margin-bottom: 7px; }
.markdown-content p { margin: 14px 0; }
.markdown-content code { background: var(--surface); padding: 2px 5px; border-radius: 3px; font-size: .9em; }
.markdown-content pre { overflow: auto; padding: 16px; border-radius: 7px; background: var(--surface); font-size: 13px; line-height: 1.8; }
.markdown-content pre code { padding: 0; }
.markdown-content blockquote { margin: 18px 0; padding: 1px 16px; border-left: 3px solid #bdcec2; color: var(--muted); }
.doc-table { overflow-x: auto; margin: 18px 0; border: 1px solid var(--line); border-radius: 7px; }
.markdown-content table { width: 100%; min-width: 430px; border-collapse: collapse; font-size: 13px; line-height: 1.8; }
.markdown-content th, .markdown-content td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.markdown-content th { font-weight: 600; background: var(--surface); }
.markdown-content .align-right { text-align: right; }
.markdown-content .align-center { text-align: center; }
.markdown-content tr:last-child td { border-bottom: 0; }
.notice { color: var(--accent); background: var(--accent-soft); border-radius: 7px; padding: 13px 16px; margin: 0 0 18px; font-size: 14px; }
.error-notice { color: var(--danger); background: #fff0ed; }

@container (max-width: 860px) {
  .catalog-controls { flex-wrap: wrap; }
  .search-wrap { flex-basis: 100%; }
  .list-heading { display: none; }
  .tool-row { grid-template-columns: minmax(0, 1fr) 175px; row-gap: 15px; }
  .tool-identity { grid-column: 1; grid-row: 1; }
  .tool-setup { grid-column: 2; grid-row: 1; text-align: right; }
  .tool-cost { grid-column: 1 / -1; margin-left: 52px; display: flex; align-items: baseline; gap: 12px; }
  .field-label { display: block; flex-shrink: 0; color: var(--muted); font-size: 12px; }
  .tool-actions { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; align-items: center; gap: 20px; }
}
@media (max-width: 960px) {
  .layout { display: block; }
  .sidebar, .workspace-label { display: none; }
  .topbar { padding: 0 28px; height: 69px; }
  .mobile-brand { display: flex; align-items: baseline; gap: 10px; font-size: 19px; font-weight: 600; color: var(--ink); text-decoration: none; }
  .mobile-brand span { font-size: 11px; color: var(--muted); font-weight: 400; }
  .mobile-nav { display: flex; gap: 26px; padding: 0 28px; border-bottom: 1px solid var(--line); }
  .mobile-nav button { min-height: 48px; padding: 10px 0; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 14px; }
  .mobile-nav button.active { border-color: var(--accent); color: var(--accent); font-weight: 600; }
  .mobile-category { display: block; }
  .page-body { padding: 0 28px; }
}
@container (max-width: 600px) {
  .agent-grid { grid-template-columns: 1fr; }
  .tool-row { padding: 20px 0; grid-template-columns: minmax(0, 1fr); row-gap: 13px; }
  .tool-identity { grid-column: 1; }
  .tool-setup { grid-column: 1; grid-row: auto; text-align: left; margin-left: 52px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
  .tool-setup p { margin: 0; }
  .tool-cost { grid-column: 1; margin-left: 52px; }
  .tool-actions { grid-column: 1; justify-content: flex-start; margin-left: 52px; }
  .content-heading { align-items: flex-start; }
  #checked-label { max-width: 170px; }
}
@media (max-width: 520px) {
  .topbar { padding: 0 20px; height: 66px; gap: 12px; }
  .mobile-brand span { display: none; }
  .mobile-nav { padding: 0 20px; gap: 24px; }
  .page-body { padding: 0 20px; }
  .page-heading { margin: 27px 0 24px; }
  h1 { font-size: 27px; }
  .title-line { gap: 12px; }
  .catalog-controls { margin-bottom: 24px; gap: 10px; }
  .filter-controls { width: 100%; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 6px; }
  select { width: 100%; min-width: 0; padding: 8px 20px 8px 8px; max-width: none; font-size: 12px; }
  .filter-controls .quiet { padding: 8px 4px; font-size: 12px; }
  .content-heading { flex-wrap: wrap; gap: 6px; }
  #checked-label { max-width: none; font-size: 11px; }
  .tool-summary, .tool-cost p { font-size: 14px; }
  .tool-mark { width: 36px; height: 36px; flex-basis: 36px; font-size: 15px; }
  .tool-identity { gap: 12px; }
  .tool-cost, .tool-setup, .tool-actions { margin-left: 48px; }
  .agent-card, .inbox-card { padding: 22px; }
  footer { flex-wrap: wrap; gap: 10px; margin-top: 26px; font-size: 11px; }
  dialog { width: calc(100% - 24px); max-height: 90vh; padding: 22px; }
  .detail-dialog { padding: 0 22px 24px; }
  .detail-heading { margin: 0 -22px; padding: 14px 22px; }
  .detail-dialog h2 { font-size: 25px; }
  .detail-lead { font-size: 15px; }
  .form-bottom { flex-wrap: wrap; }
}
@media (max-width: 360px) {
  .filter-controls { display: flex; flex-wrap: wrap; }
  .filter-controls select { width: auto; max-width: 145px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
@media (max-width: 380px) {
  .mobile-nav { gap: 12px; }
  .mobile-nav button, .mobile-nav a { font-size: 13px; }
}
