@charset "UTF-8";
:root {
  color-scheme: light;
  --bg: #f5f7f6; --panel: #fff; --line: #e4e9e6; --text: #26352e; --muted: #748078;
  --accent: #2d7560; --accent-soft: #eaf3ee; --danger: #b65050; --radius: 14px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: not-allowed; }
button, input, select, a { outline-offset: 4px; }
:focus-visible { outline: 2px solid var(--accent); }
a { color: inherit; text-decoration: none; }
svg.icon { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 26px; font-weight: 650; letter-spacing: -.7px; }
h2 { font-size: 19px; font-weight: 650; }
h3 { font-size: 15px; font-weight: 600; }
.grow { flex: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -60px; left: 12px; z-index: 50; padding: 10px 16px; border-radius: 8px; background: var(--panel); }
.skip-link:focus { top: 10px; }
.site-header { height: 76px; background: var(--panel); border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1456px; height: 100%; margin: 0 auto; padding: 0 40px; display: flex; align-items: center; gap: 22px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 650; white-space: nowrap; letter-spacing: .4px; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; background: var(--accent); color: #fff; border-radius: 11px; }
.brand-mark svg.icon { width: 26px; height: 26px; stroke-width: 1.5; }
.header-divider { width: 1px; height: 20px; background: var(--line); }
.header-label { color: var(--muted); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 24px; }
.connection { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.status-dot { width: 6px; height: 6px; border-radius: 100%; background: #88a498; flex: 0 0 auto; }
.connection.online .status-dot { background: #4a9b76; box-shadow: 0 0 0 3px #eef7f1; }
.connection.error .status-dot { background: var(--danger); }
.session { display: flex; align-items: center; gap: 10px; }
.user-badge { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.workspace { max-width: 1456px; margin: 0 auto; padding: 38px 40px 64px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 26px; min-height: 40px; }
.page-title { display: flex; align-items: center; gap: 12px; }
.count { display: inline-grid; place-items: center; min-width: 27px; height: 25px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: #eef1ef; font-size: 13px; font-variant-numeric: tabular-nums; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.button, .icon-button { display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-height: 38px; padding: 8px 13px; border: 1px solid #dce3de; border-radius: 8px; background: var(--panel); color: var(--text); font-weight: 500; white-space: nowrap; line-height: 20px; transition: background .15s, border-color .15s; }
.button:hover:not(:disabled), .icon-button:hover:not(:disabled) { background: #f3f6f4; border-color: #b7c8bd; }
.button.primary { background: var(--accent); color: white; border-color: var(--accent); }
.button.primary:hover:not(:disabled) { background: #22614e; border-color: #22614e; }
.button.quiet { background: transparent; border-color: transparent; color: var(--muted); }
.button.danger { color: var(--danger); border-color: #ecd8d8; }
.button.danger:hover:not(:disabled) { background: #fcf1f1; border-color: #d9aaaa; }
.button.small, .icon-button { min-height: 34px; padding: 6px 10px; font-size: 13px; }
.icon-button { width: 34px; flex: 0 0 auto; padding: 7px; color: var(--muted); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.toolbar-actions { display: flex; align-items: center; gap: 12px; min-width: 0; }
#svg-toggle { flex: 0 0 auto; }
#svg-toggle[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.filters { display: flex; min-width: 0; overflow-x: auto; gap: 4px; padding: 4px; background: #e9eeeb; border-radius: 9px; }
.filters button { border: 0; padding: 7px 18px; border-radius: 6px; background: transparent; color: #68776e; font-size: 13px; font-weight: 500; white-space: nowrap; }
.filters button[aria-pressed="true"] { background: white; color: var(--accent); box-shadow: 0 1px 4px #243d2e0a; }
.filters button:hover { color: var(--accent); }
.search { display: flex; align-items: center; gap: 9px; padding: 0 12px; width: 254px; height: 40px; background: white; border: 1px solid var(--line); border-radius: 8px; color: #8b978f; }
.search:focus-within { border-color: var(--accent); }
.search input { width: 100%; min-width: 0; border: 0; outline: none; padding: 0; background: transparent; font-size: 13px; color: var(--text); }
input::placeholder { color: #98a29c; }
main { display: flex; flex-direction: column; gap: 18px; }
.channel { min-width: 0; overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 2px 4px #193b2502; content-visibility: auto; contain-intrinsic-size: auto 650px; }
.channel.status-only { contain-intrinsic-size: auto 86px; }
.ch-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 19px 22px; }
.channel-identity { display: flex; align-items: center; gap: 13px; min-width: 0; }
.channel-avatar { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; background: #edf3ff; color: #627ec1; border: 1px solid #e6ecf8; border-radius: 10px; font-size: 16px; font-weight: 600; }
.channel-avatar.claude { background: #fbf0e9; color: #bc8966; border-color: #f1e6db; }
.channel-avatar.grok { background: #f0edfa; color: #8c7ab5; border-color: #e9e3f5; }
.channel-avatar.other { background: #eef1f3; color: #758994; border-color: #e5e9ec; }
.channel-avatar.domestic { background: #eaf4ee; color: #3d8567; border-color: #dcece2; }
.channel-name { min-width: 0; }
.channel-name h2 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 7px; font-size: 15px; font-weight: 600; letter-spacing: -.2px; }
.channel-number { color: var(--muted); font-size: 12px; font-weight: 400; overflow-wrap: anywhere; }
.channel-label { overflow-wrap: anywhere; }
.channel-model { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.channel-meta { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 14px; flex: 0 0 auto; }
.multiplier { color: #6d7c72; font-size: 13px; font-variant-numeric: tabular-nums; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #8b968f; white-space: nowrap; }
.status.good { color: var(--accent); }
.status.good .status-dot { background: #65a684; }
.status.bad { color: var(--danger); }
.status.bad .status-dot { background: #cb7777; }
.status.busy { color: #ad8841; }
.status.busy .status-dot { background: #c9a152; }
.channel-controls { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 12px; border-left: 1px solid var(--line); }
.channel-error { margin: 0 22px 16px; border: 1px solid #efdddd; border-radius: 8px; color: var(--danger); background: #fdf7f7; padding: 9px 12px; font-size: 13px; }
.channel-error summary { cursor: pointer; }
.channel-error p { margin-top: 8px; overflow-wrap: anywhere; white-space: pre-wrap; }
.timeline { display: flex; align-items: stretch; gap: 12px; padding: 0 22px 18px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: 22px; scrollbar-width: thin; scrollbar-color: #d4ded7 transparent; }
.test-row { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 0; }
.test-row + .test-row { border-top: 1px solid var(--line); padding-top: 18px; }
.test-label { padding: 10px 0 0 22px; font-size: 14px; font-weight: 600; color: var(--text); }
.test-label span { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; font-weight: 400; }
.test-row .timeline { min-width: 0; padding-left: 12px; scroll-padding-left: 12px; }
.svg-hidden .timeline { display: none; }
.svg-hidden .attribution { padding-top: 10px; }
.attribution { grid-column: 2; min-width: 0; padding: 0 22px 18px 12px; font-size: 12px; }
.attribution summary { cursor: pointer; overflow-wrap: anywhere; }
.attribution-probability, .attribution-count, .attribution-empty { color: var(--muted); }
.attribution-fingerprint { font-size: 13px; }
.attribution-fingerprint.match { color: var(--accent); }
.attribution-fingerprint.mismatch { color: var(--danger); }
.attribution-fingerprint.unknown { color: var(--muted); }
.attribution-progress { display: block; color: var(--accent); margin-bottom: 6px; }
.attribution-detail { padding: 10px 12px; margin-top: 8px; background: #f8faf9; border-radius: 8px; overflow-wrap: anywhere; }
.attribution-detail p + p { margin-top: 6px; }
.attribution-detail a { color: var(--accent); text-decoration: underline; }
.attribution-error { color: var(--danger); overflow-wrap: anywhere; }
.attribution-table { overflow-x: auto; margin: 10px 0; }
.attribution-table table { width: 100%; text-align: left; border-collapse: collapse; }
.attribution-table th, .attribution-table td { padding: 5px 10px 5px 0; border-bottom: 1px solid var(--line); }
.attribution-table th { white-space: nowrap; }
.attribution-table td:nth-child(1), .attribution-table td:nth-child(2), .attribution-table td:nth-child(4) { white-space: nowrap; width: 1%; }
.candy { grid-column: 2; min-width: 0; padding: 0 22px 18px 12px; font-size: 12px; }
.candy summary { cursor: pointer; overflow-wrap: anywhere; }
.candy-empty, .candy-time, .candy-metadata { color: var(--muted); }
.candy-undetermined { color: var(--muted); }
.candy-progress, .candy-pass { color: var(--accent); }
.candy-progress { display: block; margin-bottom: 6px; }
.candy-fail, .candy-error { color: var(--danger); }
.candy-detail { padding: 10px 12px; margin-top: 8px; background: #f8faf9; border-radius: 8px; overflow-wrap: anywhere; }
.candy-detail p + p { margin-top: 6px; }
.candy-table { overflow-x: auto; margin: 10px 0; }
.candy-table table { width: 100%; text-align: left; border-collapse: collapse; }
.candy-table th, .candy-table td { padding: 5px 10px 5px 0; border-bottom: 1px solid var(--line); }
.candy-table th { white-space: nowrap; }
.candy-table td { font-variant-numeric: tabular-nums; }
.candy-full-answer pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.6 ui-monospace, monospace; }
.monitoring-history { grid-column: 2; min-width: 0; padding: 0 22px 18px 12px; font-size: 12px; }
.monitoring-history summary { cursor: pointer; overflow-wrap: anywhere; }
.monitoring-history-note, .monitoring-history-time, .monitoring-history-empty { color: var(--muted); }
.monitoring-history-note { margin: 8px 0; }
.monitoring-history-entry { padding: 8px 0; border-top: 1px solid var(--line); }
.monitoring-history-more { margin-top: 8px; }
.monitoring-history-error { color: var(--danger); margin-top: 8px; overflow-wrap: anywhere; }
.card { flex: 0 0 288px; min-width: 0; display: flex; flex-direction: column; scroll-snap-align: start; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: white; }
.card .meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 10px 12px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; order: 2; border-top: 1px solid var(--line); }
.card .meta .run-info { display: inline-flex; align-items: center; gap: 6px; }
.card .meta .run-info svg { width: 13px; height: 13px; color: #95a199; }
.frame-slot { height: 210px; position: relative; background: #f5f8f6; }
.frame-slot:empty::after { content: ''; position: absolute; width: 28px; height: 22px; top: 50%; left: 50%; border: 1px solid #dce5de; border-radius: 5px; transform: translate(-50%, -50%); }
iframe { display: block; width: 100%; height: 210px; border: 0; background: #f5f8f6; }
.frame-error { height: 210px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: #fdf8f7; color: #ba7770; padding: 20px; }
.frame-error > .icon { width: 28px; height: 28px; }
.frame-error details { max-width: 100%; text-align: center; font-size: 13px; }
.frame-error summary { cursor: pointer; }
.frame-error pre { margin: 8px 0 0; max-height: 112px; overflow: auto; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.6 ui-monospace, monospace; color: #9b6861; }
.timeline .older { display: flex; flex: 0 0 100px; align-items: center; justify-content: center; gap: 6px; border: 1px dashed #dae2dc; border-radius: 10px; background: #fafcfb; color: var(--muted); font-size: 13px; }
.timeline .older:hover { border-color: var(--accent); color: var(--accent); }
.timeline .empty { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 100px; width: 100%; background: #f8faf9; border: 1px dashed #e6ebe7; border-radius: 8px; color: #909c94; font-size: 13px; }
.pending-preview { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; height: 210px; color: var(--muted); background: #f4f8f5; font-size: 13px; }
.spinner { display: inline-block; width: 22px; height: 22px; border: 2px solid #dce9e0; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { min-height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; color: var(--muted); background: white; border: 1px dashed #dae2dc; border-radius: var(--radius); }
.empty-state > .icon { width: 32px; height: 32px; color: #a5b6ac; }
.notification { position: fixed; z-index: 20; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; align-items: center; max-width: min(540px, calc(100% - 32px)); padding: 12px 18px; border-radius: 10px; background: #273d32; color: white; box-shadow: 0 5px 24px #1d3b2a26; overflow-wrap: anywhere; }
.notification.error { background: #974f4f; }
dialog { width: min(440px, calc(100% - 32px)); max-height: calc(100dvh - 48px); border: 1px solid var(--line); border-radius: 16px; padding: 0; color: var(--text); background: white; box-shadow: 0 20px 80px #172d2533; overscroll-behavior: contain; }
dialog::backdrop { background: #1b342746; backdrop-filter: blur(3px); }
.wide-dialog { width: min(640px, calc(100% - 32px)); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 24px 18px; border-bottom: 1px solid #edf0ed; }
.dialog-heading .icon-button { border: none; }
.form-body { display: flex; flex-direction: column; gap: 18px; padding: 24px; }
.form-stack { display: flex; flex-direction: column; gap: 18px; }
.form-body label { display: flex; flex-direction: column; gap: 8px; font-size: 13px; font-weight: 500; }
.form-body input:not([type="checkbox"]):not([type="radio"]), .form-body select { width: 100%; min-width: 0; min-height: 42px; border: 1px solid #dce3de; border-radius: 8px; background: #fff; color: var(--text); padding: 9px 11px; font-size: 14px; }
.form-body input:focus, .form-body select:focus { border-color: var(--accent); outline: 2px solid #2d75601c; outline-offset: 1px; }
.form-body input:disabled, .form-body select:disabled { background: #f5f7f6; color: var(--muted); }
.dialog-footer { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 18px 24px; border-top: 1px solid #edf0ed; }
.form-error { padding: 10px 12px; color: var(--danger); background: #fdf3f2; border-radius: 7px; font-size: 13px; overflow-wrap: anywhere; }
.source-choice { display: flex; gap: 24px; border: 0; padding: 0; margin: 0; }
.source-choice label { flex-direction: row; align-items: center; gap: 8px; }
input[type="radio"] { accent-color: var(--accent); margin: 0; width: 16px; height: 16px; }
.form-body .switch-row { flex-direction: row; justify-content: space-between; align-items: center; min-height: 28px; }
input[role="switch"] { appearance: none; width: 34px; height: 20px; border-radius: 12px; background: #dce2de; position: relative; cursor: pointer; flex: 0 0 auto; margin: 0; transition: background .15s; }
input[role="switch"]::before { content: ''; position: absolute; width: 14px; height: 14px; top: 3px; left: 3px; border-radius: 50%; background: white; transition: transform .15s; box-shadow: 0 1px 2px #243a2520; }
input[role="switch"]:checked { background: var(--accent); }
input[role="switch"]:checked::before { transform: translateX(14px); }
.account-list { display: flex; flex-direction: column; gap: 10px; }
.account { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; }
.account.active { border-color: #bcd8c8; background: #f8fcf9; }
.account-name { flex: 1; min-width: 140px; }
.account-name strong { display: block; font-size: 14px; font-weight: 600; }
.account-name .status { margin-left: 7px; }
.account-name small { color: var(--muted); font-size: 12px; }
.account-balance { display: flex; gap: 16px; margin-right: 5px; }
.account-balance span { color: var(--muted); font-size: 12px; }
.account-balance strong { display: block; color: var(--text); font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; }
.account-form { border-top: 1px solid var(--line); background: #fafcfb; }
.form-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.justify-end { justify-content: flex-end; }
.snapshot-time { color: var(--muted); font-size: 13px; }
@media (min-width: 1650px) { .card { flex-basis: 306px; } }
@media (max-width: 900px) {
  .header-inner { padding: 0 24px; }
  .workspace { padding: 30px 24px 48px; }
  .header-label, .header-divider { display: none; }
  .ch-head { flex-wrap: wrap; gap: 14px; }
  .channel-meta { margin-left: auto; }
  .page-heading { align-items: flex-start; flex-wrap: wrap; gap: 16px; }
  .filters button { padding: 7px 14px; }
}
@media (max-width: 600px) {
  .site-header { height: 66px; }
  .header-inner { padding: 0 16px; gap: 10px; }
  .brand { font-size: 15px; gap: 8px; }
  .brand-mark { width: 31px; height: 31px; border-radius: 9px; }
  .brand-mark svg.icon { width: 23px; height: 23px; }
  .header-actions { gap: 8px; }
  .connection { display: none; }
  .header-actions .button { font-size: 12px; padding: 6px 10px; min-height: 34px; }
  .user-badge { max-width: 90px; font-size: 12px; }
  .workspace { padding: 25px 16px 40px; }
  h1 { font-size: 23px; }
  .page-heading { margin-bottom: 20px; gap: 18px; }
  .page-heading .actions { width: 100%; }
  .page-heading .actions .button { flex: 1; padding: 7px 9px; font-size: 12px; }
  .page-heading .actions svg { width: 15px; height: 15px; }
  .toolbar { flex-direction: column; align-items: stretch; gap: 14px; margin-bottom: 18px; }
  .filters { justify-content: space-between; gap: 1px; }
  .filters button { flex: 1 0 auto; padding: 7px 8px; }
  .search { width: 100%; }
  .toolbar-actions .search { flex: 1; min-width: 0; }
  .ch-head { padding: 16px; }
  .channel-identity { flex: 1 1 100%; gap: 10px; }
  .channel-avatar { width: 34px; height: 34px; border-radius: 9px; }
  .channel-meta { width: 100%; justify-content: flex-start; gap: 14px; }
  .channel-controls { width: 100%; border: 0; padding: 0; }
  .channel-name h2 { font-size: 14px; }
  .test-row { display: block; }
  .test-label { display: flex; align-items: baseline; gap: 8px; padding: 0 16px 10px; }
  .test-label span { margin: 0; }
  .test-row .timeline { padding-left: 16px; scroll-padding-left: 16px; }
  .attribution { padding: 0 16px 16px; }
  .candy { padding: 0 16px 16px; }
  .monitoring-history { padding: 0 16px 16px; }
  .timeline { padding: 0 16px 16px; gap: 10px; scroll-padding-inline: 16px; }
  .card { flex-basis: min(270px, calc(100vw - 84px)); }
  .frame-slot, iframe, .frame-error, .pending-preview { height: 196px; }
  .channel-error { margin: 0 16px 16px; }
  .dialog-heading { padding: 18px 20px 16px; }
  .form-body { padding: 20px; }
  .dialog-footer { padding: 16px 20px; }
  .account { padding: 13px; }
  .account-balance { flex: 1; }
  .account-toolbar { gap: 6px; }
  .account-toolbar .button { padding: 7px 9px; font-size: 12px; }
  .account-toolbar .grow { display: none; }
  .snapshot-time { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
