:root { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #18242d; background: #f4f6f8; }
* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
.shell { max-width: 1180px; margin: 0 auto; padding: 28px; }
.shell [hidden] { display: none !important; }
.shell h1 { font-size: 26px; line-height: 1.25; margin: 8px 0; }
.shell h2 { font-size: 19px; line-height: 1.4; margin: 0; }
.shell .eyebrow, .shell .kicker, .shell .agent-name, .shell .agent-top > span { letter-spacing: 0; }
.shell button, .shell input, .shell select, .shell textarea { min-width: 0; max-width: 100%; }
.shell select, .shell textarea { font: inherit; }
.shell button:focus-visible { outline: 2px solid #287970; outline-offset: 3px; }
.shell button:disabled { cursor: default; }
.login-shell { min-height: 100vh; display: grid; place-items: center; max-width: 560px; }
.login-panel { width: 100%; }
.login-panel h1 { margin-bottom: 26px; }
.topbar { align-items: center; border-bottom: 1px solid #d8e0e5; display: flex; gap: 20px; justify-content: space-between; padding-bottom: 18px; }
.top-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 14px; }
.live-dot { color: #287970; font-size: 12px; font-weight: 700; }
.eyebrow, .kicker { color: #287970; font-size: 11px; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; }
h1 { font-size: clamp(34px, 5vw, 56px); letter-spacing: 0; line-height: 1; margin: 14px 0 12px; }
h2 { font-size: 23px; letter-spacing: 0; margin: 8px 0 0; }
p { color: #63717a; line-height: 1.6; margin: 0; }
.topbar p { font-size: 17px; }
.layout { align-items: start; display: grid; gap: 28px; grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); padding-top: 24px; }
.workspace-tabs { border-bottom: 1px solid #d8e0e5; display: flex; flex-wrap: wrap; gap: 4px; margin-top: 18px; }
.workspace-tabs button { background: transparent; border-bottom: 2px solid transparent; border-radius: 0; color: #63717a; font-size: 14px; padding: 13px 18px; }
.workspace-tabs button[aria-selected="true"] { border-bottom-color: #287970; color: #216b63; }
.workspace-tabs button:hover { background: #e9f0ee; }
.site-context { align-items: center; border-bottom: 1px solid #d8e0e5; display: flex; gap: 24px; justify-content: space-between; padding: 20px 0; }
.current-site { display: grid; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.current-site strong { font-size: 17px; }
.current-site > span:last-child { color: #63717a; font-size: 13px; }
.site-context .site-selector { flex: 0 1 420px; min-width: 0; }
.site-selector label { margin-bottom: 10px; }
.selector-count, .site-results { color: #63717a; font-size: 12px; }
.site-results { margin-bottom: 12px; }
.site-pagination { align-items: center; display: flex; gap: 12px; justify-content: space-between; margin-top: 20px; }
.site-pagination span { color: #63717a; font-size: 13px; }
.site-pagination button { font-size: 13px; padding: 9px 12px; }
.operations-workspace { margin-top: 24px; min-width: 0; }
.progress-panel { background: #18242d; border: 1px solid #18242d; border-radius: 6px; color: #fff; margin-top: 24px; padding: 26px; }
.progress-heading { align-items: flex-start; display: flex; gap: 16px; justify-content: space-between; }
.progress-heading p { color: #afc0c7; margin-top: 7px; }
.progress-panel .kicker { color: #82c7bd; }
.progress-total { display: grid; gap: 3px; text-align: right; }
.progress-total strong { color: #82c7bd; font-size: 24px; line-height: 1.2; }
.progress-total span, .checked-at { color: #afc0c7; font-size: 12px; }
.progress-summary { border-bottom: 1px solid #3a4b55; border-top: 1px solid #3a4b55; display: flex; gap: 20px; margin: 22px 0 16px; padding: 13px 0; }
.progress-summary span { color: #afc0c7; font-size: 12px; }
.progress-summary b { color: #fff; font-size: 16px; margin-right: 4px; }
.progress-summary .next-task { margin-left: auto; }
.overall-track { background: #3a4b55; border-radius: 999px; height: 8px; margin-top: 22px; overflow: hidden; }
.overall-track i { background: #82c7bd; border-radius: inherit; display: block; height: 100%; transition: width .35s ease; }
.agent-grid { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.agent-card { min-width: 0; overflow-wrap: anywhere; background: #22333d; border: 1px solid #3a4b55; border-radius: 5px; min-height: 198px; padding: 16px; position: relative; transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.agent-card:hover { background: #263a45; border-color: #5d7a85; transform: translateY(-1px); }
.agent-card-completed { border-color: #356f67; }
.agent-card-active { border-color: #967b3a; }
.agent-card-blocked { border-color: #984c4c; }
.agent-top, .agent-meta { align-items: center; display: flex; justify-content: space-between; }
.agent-top > span:last-child { color: #afc0c7; font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.agent-index { color: #6f858e !important; font-variant-numeric: tabular-nums; }
.agent-title { align-items: baseline; display: flex; justify-content: space-between; gap: 12px; }
.agent-card h3 { font-size: 16px; line-height: 1.3; margin: 5px 0 0; }
.agent-name { color: #82c7bd; display: block; font-size: 11px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.agent-title strong { color: #82c7bd; font-size: 18px; }
.agent-card p { color: #c3d0d5; font-size: 13px; min-height: 42px; }
.agent-task { margin-top: 15px; }
.status { align-items: center; border-radius: 999px; display: inline-flex; font-size: 10px; font-weight: 750; gap: 5px; padding: 4px 7px; }
.status i { background: currentColor; border-radius: 50%; display: block; height: 5px; width: 5px; }
.status-completed { background: #276e61; color: #d8fff6; }
.status-active { background: #876b2b; color: #fff3c5; }
.status-blocked { background: #873d3d; color: #ffe0e0; }
.status-queued { background: #52636d; color: #e5edf0; }
.agent-progress-label { color: #7f969f; display: flex; font-size: 10px; justify-content: space-between; margin-top: 13px; }
.bar { background: #3a4b55; border-radius: 999px; height: 7px; margin: 6px 0 10px; overflow: hidden; }
.bar i { background: #82c7bd; border-radius: inherit; display: block; height: 100%; transition: width .45s ease; }
.agent-card-active .bar i { background: #e0bf63; }
.agent-card-blocked .bar i { background: #ef8585; }
.agent-meta span { color: #82c7bd; font-size: 12px; font-weight: 750; }
.agent-meta small { color: #afc0c7; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-meta small:first-child { max-width: 72%; }
.agent-loading { border: 1px dashed #3a4b55; color: #afc0c7; margin-top: 12px; padding: 16px; text-align: center; }
.checked-at { margin-top: 16px; }
.panel { background: #fff; border: 1px solid #d8e0e5; border-radius: 6px; padding: 24px; }
.panel-heading { align-items: flex-start; display: flex; gap: 16px; justify-content: space-between; margin-bottom: 20px; }
.layout > .panel, .content-panel { background: transparent; border: 0; border-radius: 0; padding: 0; }
.form-panel { border-right: 1px solid #d8e0e5 !important; padding-right: 28px !important; }
.step, .count { color: #287970; font-size: 13px; font-weight: 750; }
label { color: #43515b; display: block; font-size: 13px; font-weight: 650; margin-bottom: 18px; }
input { background: #fbfcfd; border: 1px solid #cbd6dc; border-radius: 4px; display: block; margin-top: 7px; padding: 11px 12px; width: 100%; }
input:focus { border-color: #287970; box-shadow: 0 0 0 3px #28797020; outline: 0; }
button { border: 0; border-radius: 4px; cursor: pointer; font-weight: 700; padding: 11px 16px; }
button:disabled { cursor: wait; opacity: .55; }
.primary { background: #287970; color: #fff; width: 100%; }
.ghost { background: transparent; border: 1px solid #bdcbd1; color: #43515b; }
.notice { color: #287970; font-size: 13px; margin-top: 14px; }
.error { color: #b64343; font-size: 13px; margin-top: 14px; }
.muted { color: #87949c; }
.empty { border: 1px dashed #cbd6dc; border-radius: 4px; display: grid; gap: 7px; padding: 32px; text-align: center; }
.empty span { color: #87949c; font-size: 13px; }
.site-list { display: grid; gap: 0; }
.site-row { align-items: center; border-bottom: 1px solid #e8edf0; display: flex; justify-content: space-between; padding: 14px 0; }
.site-row:last-child { border-bottom: 0; }
.site-row div { display: grid; gap: 5px; }
.site-row span, .site-row small { color: #6f7d86; font-size: 13px; }
.site-row small { white-space: nowrap; }
@media (max-width: 920px) { .agent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .shell { padding: 32px 18px; } .topbar { gap: 18px; flex-direction: column; } .layout, .agent-grid { grid-template-columns: minmax(0, 1fr); } .progress-summary { flex-wrap: wrap; } .progress-summary .next-task { margin-left: 0; width: 100%; } }

/* 内容管理工作区：沿用现有工作台的颜色和间距体系。 */
.site-row { background: transparent; border: 0; border-bottom: 1px solid #e1e8eb; border-radius: 0; color: inherit; cursor: pointer; gap: 12px; padding: 13px 8px; text-align: left; width: 100%; }
.site-row strong { font-size: 14px; }
.site-row small { flex-shrink: 0; font-size: 11px; }
.site-row:hover, .site-row.selected { background: #f0f7f5; }
.site-row:focus-visible { box-shadow: inset 0 0 0 2px #287970; outline: 0; }
.content-panel { margin-top: 24px; }
.content-heading { align-items: center; gap: 24px; }
.content-heading p { font-size: 13px; margin-top: 7px; }
.site-selector { flex: 0 1 360px; margin-bottom: 0; }
.site-selector select, select, textarea { background: #fbfcfd; border: 1px solid #cbd6dc; border-radius: 4px; display: block; margin-top: 7px; padding: 11px 12px; width: 100%; }
select:focus, textarea:focus { border-color: #287970; box-shadow: 0 0 0 3px #28797020; outline: 0; }
.loading-block { background: #f7fafb; border: 1px dashed #cbd6dc; border-radius: 4px; color: #6f7d86; padding: 28px; text-align: center; }
.content-message { margin: 0 0 16px; }
.content-grid { display: grid; gap: 28px; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
.content-card { border: 0; border-radius: 0; padding: 0; }
.content-card-heading { align-items: flex-start; display: flex; justify-content: space-between; margin-bottom: 16px; }
.content-card h3 { font-size: 16px; margin: 7px 0 0; }
.item-list { display: grid; gap: 2px; }
.item-row { align-items: center; border-bottom: 1px solid #e8edf0; display: flex; gap: 12px; justify-content: space-between; min-width: 0; padding: 12px 0; }
.item-row:last-child { border-bottom: 0; }
.item-row > div { display: grid; gap: 4px; min-width: 0; }
.item-row strong, .item-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-row span, .item-row small { color: #6f7d86; font-size: 12px; }
.item-row small { flex: 0 0 auto; }
.article-row { align-items: flex-start; }
.article-row .article-status { border-radius: 999px; font-weight: 700; padding: 4px 7px; }
.status-draft { background: #eef2f4; color: #52636d; }
.status-published { background: #d9f2eb; color: #287970; }
.status-archived { background: #f3e4e4; color: #873d3d; }
.subform { border-top: 1px solid #e1e8eb; margin-top: 18px; padding-top: 18px; }
.subform h4 { font-size: 15px; margin: 0 0 16px; }
.subform label { margin-bottom: 14px; }
.subform textarea { min-height: 150px; resize: vertical; }
.compact { margin-top: 6px; padding: 22px 14px; }
.template-workspace { display: grid; gap: 28px; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); margin-top: 18px; }
.template-row { flex-wrap: wrap; }
.template-row > div:first-child { flex: 1; }
.template-row .template-actions { display: flex; flex-shrink: 0; flex-wrap: wrap; gap: 8px; }
.template-actions button { font-size: 12px; padding: 7px 10px; }
.form-pair { display: grid; gap: 12px; grid-template-columns: 1fr 120px; }
.preview-card { min-height: 280px; }
.template-preview { background: #18242d; border-radius: 4px; color: #d8fff6; font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; max-width: 100%; min-height: 170px; overflow: auto; overflow-wrap: anywhere; padding: 16px; white-space: pre-wrap; }
.public-site { background: #f7f8f6; color: #18242d; min-height: 100vh; padding: 72px 24px; }
.public-header, .public-articles { margin: 0 auto; max-width: 960px; }
.public-header { border-bottom: 1px solid #d8e0e5; padding-bottom: 30px; }
.public-header h1 { font-size: clamp(36px, 6vw, 68px); margin: 14px 0; }
.public-header p { font-size: 17px; }
.public-articles { display: grid; gap: 18px; padding-top: 28px; }
.public-article { background: #fff; border: 1px solid #d8e0e5; border-radius: 6px; padding: 22px; }
.public-article h2 { margin: 0 0 10px; }
.public-article p { white-space: pre-wrap; }
.public-article time { color: #87949c; display: block; font-size: 12px; margin-top: 14px; }
.public-empty { color: #63717a; padding: 48px 0; text-align: center; }
.public-template-view { background: #fff; padding: 0; }
.public-template-view .public-header { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); }
.public-template-content { display: block; width: 100%; min-width: 0; }
@media (max-width: 900px) { .content-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .content-heading { align-items: stretch; flex-direction: column; } .site-selector { flex-basis: auto; width: 100%; } .template-workspace, .form-pair { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .shell { padding: 22px 16px; }
  .topbar { align-items: flex-start; gap: 12px; }
  .top-actions { gap: 10px; }
  .workspace-tabs { gap: 0; }
  .workspace-tabs button { flex: 1 0 auto; font-size: 13px; padding: 12px; }
  .site-context { align-items: stretch; flex-direction: column; gap: 16px; }
  .site-context .site-selector { flex-basis: auto; }
  .form-panel { border-bottom: 1px solid #d8e0e5 !important; border-right: 0 !important; padding: 0 0 24px !important; }
  .progress-panel { padding: 18px; }
  .progress-heading > div:first-child { min-width: 0; overflow-wrap: anywhere; }
  .progress-total { flex-shrink: 0; }
  .progress-total strong { font-size: 22px; }
  .progress-summary { gap: 12px; }
  .article-card, .preview-card { border-top: 1px solid #d8e0e5; padding-top: 22px; }
}

/* Public subpages keep full article text readable at desktop and mobile widths. */
.public-page { background: #fff; color: #18242d; margin: 0 auto; max-width: 960px; min-height: 100vh; overflow-wrap: anywhere; padding: clamp(20px, 5vw, 56px); }
.public-page h1 { font-size: clamp(28px, 5vw, 44px); line-height: 1.25; margin: 24px 0; }
.public-page h2 { line-height: 1.4; }
.public-page a, .public-empty a { color: #216b63; text-underline-offset: 3px; }
.public-page-nav { display: flex; flex-wrap: wrap; gap: 16px; line-height: 1.6; }
.public-article-meta { color: #63717a; font-size: 14px; margin-bottom: 24px; }
.public-article-body { font-size: 17px; line-height: 1.85; white-space: pre-wrap; }
.public-page-articles { display: grid; gap: 28px; margin: 28px 0; }
.public-page-articles article { border-bottom: 1px solid #d8e0e5; padding-bottom: 24px; }
.public-page-articles p { margin-top: 12px; }
.public-page-empty { border: 1px dashed #cbd6dc; padding: 28px; }
.public-empty { overflow-wrap: anywhere; }
.public-empty h2, .public-empty p { margin-bottom: 18px; }
.public-empty button { margin-left: 16px; }

.public-pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 16px; max-width: 960px; margin: 24px auto; padding: 16px; color: #18242d; background: #fff; line-height: 1.6; }
.public-pagination a { color: #216b63; padding: 8px 12px; text-underline-offset: 3px; }

/* Long role evidence and domain names must shrink within mobile grid tracks. */
.agent-title > div, .site-row > div, .panel, .content-card { min-width: 0; overflow-wrap: anywhere; }
.agent-title strong { flex-shrink: 0; }

/* The trusted article directory stays separate from editable home-page lists. */
.public-article-discovery { max-width: 960px; margin: 24px auto; padding: 16px; text-align: center; color: #18242d; background: #fff; overflow-wrap: anywhere; line-height: 1.6; }
.public-article-discovery a { display: inline-block; color: #216b63; padding: 8px 12px; text-underline-offset: 3px; }

.qa-panel { margin-top: 24px; }
.qa-panel .panel-heading { gap: 16px; flex-wrap: wrap; }
.qa-import { display: grid; gap: 12px; margin: 24px 0; }
.qa-import input { max-width: 100%; }
.qa-list { display: grid; gap: 24px; }
.qa-draft { border-top: 1px solid #d8e0e5; padding-top: 24px; min-width: 0; overflow-wrap: anywhere; }
.qa-answer, .qa-source blockquote { white-space: pre-wrap; line-height: 1.8; margin: 18px 0; }
.qa-draft details { padding: 16px; background: #f7fafb; border: 1px solid #d8e0e5; }
.qa-draft summary { cursor: pointer; }
.qa-source { border-top: 1px solid #d8e0e5; margin-top: 16px; padding-top: 16px; }
.qa-source p, .qa-draft details > p { margin: 12px 0; }
.qa-source a { color: #216b63; }
.qa-source blockquote { padding-left: 14px; border-left: 3px solid #cbd6dc; }
.qa-review { margin-top: 18px; }
.qa-review textarea { min-height: 100px; }
.qa-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
